(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const re of document.querySelectorAll('link[rel="modulepreload"]'))L(re);new MutationObserver(re=>{for(const ve of re)if(ve.type==="childList")for(const Ce of ve.addedNodes)Ce.tagName==="LINK"&&Ce.rel==="modulepreload"&&L(Ce)}).observe(document,{childList:!0,subtree:!0});function S(re){const ve={};return re.integrity&&(ve.integrity=re.integrity),re.referrerPolicy&&(ve.referrerPolicy=re.referrerPolicy),re.crossOrigin==="use-credentials"?ve.credentials="include":re.crossOrigin==="anonymous"?ve.credentials="omit":ve.credentials="same-origin",ve}function L(re){if(re.ep)return;re.ep=!0;const ve=S(re);fetch(re.href,ve)}})();var ck=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var I8={exports:{}},R5={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vB;function jae(){if(vB)return R5;vB=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function S(L,re,ve){var Ce=null;if(ve!==void 0&&(Ce=""+ve),re.key!==void 0&&(Ce=""+re.key),"key"in re){ve={};for(var Be in re)Be!=="key"&&(ve[Be]=re[Be])}else ve=re;return re=ve.ref,{$$typeof:e,type:L,key:Ce,ref:re!==void 0?re:null,props:ve}}return R5.Fragment=n,R5.jsx=S,R5.jsxs=S,R5}var pB;function Uae(){return pB||(pB=1,I8.exports=jae()),I8.exports}var Vt=Uae(),D8={exports:{}},Ru={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mB;function qae(){if(mB)return Ru;mB=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ve=Symbol.for("react.consumer"),Ce=Symbol.for("react.context"),Be=Symbol.for("react.forward_ref"),Xe=Symbol.for("react.suspense"),Ke=Symbol.for("react.memo"),vt=Symbol.for("react.lazy"),yt=Symbol.for("react.activity"),Gt=Symbol.iterator;function $t(ma){return ma===null||typeof ma!="object"?null:(ma=Gt&&ma[Gt]||ma["@@iterator"],typeof ma=="function"?ma:null)}var gr={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sr=Object.assign,nr={};function jr(ma,_a,Li){this.props=ma,this.context=_a,this.refs=nr,this.updater=Li||gr}jr.prototype.isReactComponent={},jr.prototype.setState=function(ma,_a){if(typeof ma!="object"&&typeof ma!="function"&&ma!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,ma,_a,"setState")},jr.prototype.forceUpdate=function(ma){this.updater.enqueueForceUpdate(this,ma,"forceUpdate")};function Ne(){}Ne.prototype=jr.prototype;function an(ma,_a,Li){this.props=ma,this.context=_a,this.refs=nr,this.updater=Li||gr}var yn=an.prototype=new Ne;yn.constructor=an,sr(yn,jr.prototype),yn.isPureReactComponent=!0;var Lr=Array.isArray;function $r(){}var dn={H:null,A:null,T:null,S:null},Jn=Object.prototype.hasOwnProperty;function xn(ma,_a,Li){var so=Li.ref;return{$$typeof:e,type:ma,key:_a,ref:so!==void 0?so:null,props:Li}}function Na(ma,_a){return xn(ma.type,_a,ma.props)}function zn(ma){return typeof ma=="object"&&ma!==null&&ma.$$typeof===e}function ta(ma){var _a={"=":"=0",":":"=2"};return"$"+ma.replace(/[=:]/g,function(Li){return _a[Li]})}var qa=/\/+/g;function la(ma,_a){return typeof ma=="object"&&ma!==null&&ma.key!=null?ta(""+ma.key):_a.toString(36)}function ja(ma){switch(ma.status){case"fulfilled":return ma.value;case"rejected":throw ma.reason;default:switch(typeof ma.status=="string"?ma.then($r,$r):(ma.status="pending",ma.then(function(_a){ma.status==="pending"&&(ma.status="fulfilled",ma.value=_a)},function(_a){ma.status==="pending"&&(ma.status="rejected",ma.reason=_a)})),ma.status){case"fulfilled":return ma.value;case"rejected":throw ma.reason}}throw ma}function pa(ma,_a,Li,so,Ro){var co=typeof ma;(co==="undefined"||co==="boolean")&&(ma=null);var $o=!1;if(ma===null)$o=!0;else switch(co){case"bigint":case"string":case"number":$o=!0;break;case"object":switch(ma.$$typeof){case e:case n:$o=!0;break;case vt:return $o=ma._init,pa($o(ma._payload),_a,Li,so,Ro)}}if($o)return Ro=Ro(ma),$o=so===""?"."+la(ma,0):so,Lr(Ro)?(Li="",$o!=null&&(Li=$o.replace(qa,"$&/")+"/"),pa(Ro,_a,Li,"",function(Ml){return Ml})):Ro!=null&&(zn(Ro)&&(Ro=Na(Ro,Li+(Ro.key==null||ma&&ma.key===Ro.key?"":(""+Ro.key).replace(qa,"$&/")+"/")+$o)),_a.push(Ro)),1;$o=0;var $u=so===""?".":so+":";if(Lr(ma))for(var Bo=0;Bo<ma.length;Bo++)so=ma[Bo],co=$u+la(so,Bo),$o+=pa(so,_a,Li,co,Ro);else if(Bo=$t(ma),typeof Bo=="function")for(ma=Bo.call(ma),Bo=0;!(so=ma.next()).done;)so=so.value,co=$u+la(so,Bo++),$o+=pa(so,_a,Li,co,Ro);else if(co==="object"){if(typeof ma.then=="function")return pa(ja(ma),_a,Li,so,Ro);throw _a=String(ma),Error("Objects are not valid as a React child (found: "+(_a==="[object Object]"?"object with keys {"+Object.keys(ma).join(", ")+"}":_a)+"). If you meant to render a collection of children, use an array instead.")}return $o}function Ra(ma,_a,Li){if(ma==null)return ma;var so=[],Ro=0;return pa(ma,so,"","",function(co){return _a.call(Li,co,Ro++)}),so}function vi(ma){if(ma._status===-1){var _a=ma._result;_a=_a(),_a.then(function(Li){(ma._status===0||ma._status===-1)&&(ma._status=1,ma._result=Li)},function(Li){(ma._status===0||ma._status===-1)&&(ma._status=2,ma._result=Li)}),ma._status===-1&&(ma._status=0,ma._result=_a)}if(ma._status===1)return ma._result.default;throw ma._result}var Pi=typeof reportError=="function"?reportError:function(ma){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof ma=="object"&&ma!==null&&typeof ma.message=="string"?String(ma.message):String(ma),error:ma});if(!window.dispatchEvent(_a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",ma);return}console.error(ma)},Eo={map:Ra,forEach:function(ma,_a,Li){Ra(ma,function(){_a.apply(this,arguments)},Li)},count:function(ma){var _a=0;return Ra(ma,function(){_a++}),_a},toArray:function(ma){return Ra(ma,function(_a){return _a})||[]},only:function(ma){if(!zn(ma))throw Error("React.Children.only expected to receive a single React element child.");return ma}};return Ru.Activity=yt,Ru.Children=Eo,Ru.Component=jr,Ru.Fragment=S,Ru.Profiler=re,Ru.PureComponent=an,Ru.StrictMode=L,Ru.Suspense=Xe,Ru.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=dn,Ru.__COMPILER_RUNTIME={__proto__:null,c:function(ma){return dn.H.useMemoCache(ma)}},Ru.cache=function(ma){return function(){return ma.apply(null,arguments)}},Ru.cacheSignal=function(){return null},Ru.cloneElement=function(ma,_a,Li){if(ma==null)throw Error("The argument must be a React element, but you passed "+ma+".");var so=sr({},ma.props),Ro=ma.key;if(_a!=null)for(co in _a.key!==void 0&&(Ro=""+_a.key),_a)!Jn.call(_a,co)||co==="key"||co==="__self"||co==="__source"||co==="ref"&&_a.ref===void 0||(so[co]=_a[co]);var co=arguments.length-2;if(co===1)so.children=Li;else if(1<co){for(var $o=Array(co),$u=0;$u<co;$u++)$o[$u]=arguments[$u+2];so.children=$o}return xn(ma.type,Ro,so)},Ru.createContext=function(ma){return ma={$$typeof:Ce,_currentValue:ma,_currentValue2:ma,_threadCount:0,Provider:null,Consumer:null},ma.Provider=ma,ma.Consumer={$$typeof:ve,_context:ma},ma},Ru.createElement=function(ma,_a,Li){var so,Ro={},co=null;if(_a!=null)for(so in _a.key!==void 0&&(co=""+_a.key),_a)Jn.call(_a,so)&&so!=="key"&&so!=="__self"&&so!=="__source"&&(Ro[so]=_a[so]);var $o=arguments.length-2;if($o===1)Ro.children=Li;else if(1<$o){for(var $u=Array($o),Bo=0;Bo<$o;Bo++)$u[Bo]=arguments[Bo+2];Ro.children=$u}if(ma&&ma.defaultProps)for(so in $o=ma.defaultProps,$o)Ro[so]===void 0&&(Ro[so]=$o[so]);return xn(ma,co,Ro)},Ru.createRef=function(){return{current:null}},Ru.forwardRef=function(ma){return{$$typeof:Be,render:ma}},Ru.isValidElement=zn,Ru.lazy=function(ma){return{$$typeof:vt,_payload:{_status:-1,_result:ma},_init:vi}},Ru.memo=function(ma,_a){return{$$typeof:Ke,type:ma,compare:_a===void 0?null:_a}},Ru.startTransition=function(ma){var _a=dn.T,Li={};dn.T=Li;try{var so=ma(),Ro=dn.S;Ro!==null&&Ro(Li,so),typeof so=="object"&&so!==null&&typeof so.then=="function"&&so.then($r,Pi)}catch(co){Pi(co)}finally{_a!==null&&Li.types!==null&&(_a.types=Li.types),dn.T=_a}},Ru.unstable_useCacheRefresh=function(){return dn.H.useCacheRefresh()},Ru.use=function(ma){return dn.H.use(ma)},Ru.useActionState=function(ma,_a,Li){return dn.H.useActionState(ma,_a,Li)},Ru.useCallback=function(ma,_a){return dn.H.useCallback(ma,_a)},Ru.useContext=function(ma){return dn.H.useContext(ma)},Ru.useDebugValue=function(){},Ru.useDeferredValue=function(ma,_a){return dn.H.useDeferredValue(ma,_a)},Ru.useEffect=function(ma,_a){return dn.H.useEffect(ma,_a)},Ru.useEffectEvent=function(ma){return dn.H.useEffectEvent(ma)},Ru.useId=function(){return dn.H.useId()},Ru.useImperativeHandle=function(ma,_a,Li){return dn.H.useImperativeHandle(ma,_a,Li)},Ru.useInsertionEffect=function(ma,_a){return dn.H.useInsertionEffect(ma,_a)},Ru.useLayoutEffect=function(ma,_a){return dn.H.useLayoutEffect(ma,_a)},Ru.useMemo=function(ma,_a){return dn.H.useMemo(ma,_a)},Ru.useOptimistic=function(ma,_a){return dn.H.useOptimistic(ma,_a)},Ru.useReducer=function(ma,_a,Li){return dn.H.useReducer(ma,_a,Li)},Ru.useRef=function(ma){return dn.H.useRef(ma)},Ru.useState=function(ma){return dn.H.useState(ma)},Ru.useSyncExternalStore=function(ma,_a,Li){return dn.H.useSyncExternalStore(ma,_a,Li)},Ru.useTransition=function(){return dn.H.useTransition()},Ru.version="19.2.0",Ru}var yB;function RP(){return yB||(yB=1,D8.exports=qae()),D8.exports}var Ua=RP();const aa=rh(Ua);var O8={exports:{}},I5={},z8={exports:{}},N8={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gB;function Vae(){return gB||(gB=1,(function(e){function n(pa,Ra){var vi=pa.length;pa.push(Ra);e:for(;0<vi;){var Pi=vi-1>>>1,Eo=pa[Pi];if(0<re(Eo,Ra))pa[Pi]=Ra,pa[vi]=Eo,vi=Pi;else break e}}function S(pa){return pa.length===0?null:pa[0]}function L(pa){if(pa.length===0)return null;var Ra=pa[0],vi=pa.pop();if(vi!==Ra){pa[0]=vi;e:for(var Pi=0,Eo=pa.length,ma=Eo>>>1;Pi<ma;){var _a=2*(Pi+1)-1,Li=pa[_a],so=_a+1,Ro=pa[so];if(0>re(Li,vi))so<Eo&&0>re(Ro,Li)?(pa[Pi]=Ro,pa[so]=vi,Pi=so):(pa[Pi]=Li,pa[_a]=vi,Pi=_a);else if(so<Eo&&0>re(Ro,vi))pa[Pi]=Ro,pa[so]=vi,Pi=so;else break e}}return Ra}function re(pa,Ra){var vi=pa.sortIndex-Ra.sortIndex;return vi!==0?vi:pa.id-Ra.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ve=performance;e.unstable_now=function(){return ve.now()}}else{var Ce=Date,Be=Ce.now();e.unstable_now=function(){return Ce.now()-Be}}var Xe=[],Ke=[],vt=1,yt=null,Gt=3,$t=!1,gr=!1,sr=!1,nr=!1,jr=typeof setTimeout=="function"?setTimeout:null,Ne=typeof clearTimeout=="function"?clearTimeout:null,an=typeof setImmediate<"u"?setImmediate:null;function yn(pa){for(var Ra=S(Ke);Ra!==null;){if(Ra.callback===null)L(Ke);else if(Ra.startTime<=pa)L(Ke),Ra.sortIndex=Ra.expirationTime,n(Xe,Ra);else break;Ra=S(Ke)}}function Lr(pa){if(sr=!1,yn(pa),!gr)if(S(Xe)!==null)gr=!0,$r||($r=!0,ta());else{var Ra=S(Ke);Ra!==null&&ja(Lr,Ra.startTime-pa)}}var $r=!1,dn=-1,Jn=5,xn=-1;function Na(){return nr?!0:!(e.unstable_now()-xn<Jn)}function zn(){if(nr=!1,$r){var pa=e.unstable_now();xn=pa;var Ra=!0;try{e:{gr=!1,sr&&(sr=!1,Ne(dn),dn=-1),$t=!0;var vi=Gt;try{t:{for(yn(pa),yt=S(Xe);yt!==null&&!(yt.expirationTime>pa&&Na());){var Pi=yt.callback;if(typeof Pi=="function"){yt.callback=null,Gt=yt.priorityLevel;var Eo=Pi(yt.expirationTime<=pa);if(pa=e.unstable_now(),typeof Eo=="function"){yt.callback=Eo,yn(pa),Ra=!0;break t}yt===S(Xe)&&L(Xe),yn(pa)}else L(Xe);yt=S(Xe)}if(yt!==null)Ra=!0;else{var ma=S(Ke);ma!==null&&ja(Lr,ma.startTime-pa),Ra=!1}}break e}finally{yt=null,Gt=vi,$t=!1}Ra=void 0}}finally{Ra?ta():$r=!1}}}var ta;if(typeof an=="function")ta=function(){an(zn)};else if(typeof MessageChannel<"u"){var qa=new MessageChannel,la=qa.port2;qa.port1.onmessage=zn,ta=function(){la.postMessage(null)}}else ta=function(){jr(zn,0)};function ja(pa,Ra){dn=jr(function(){pa(e.unstable_now())},Ra)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(pa){pa.callback=null},e.unstable_forceFrameRate=function(pa){0>pa||125<pa?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Jn=0<pa?Math.floor(1e3/pa):5},e.unstable_getCurrentPriorityLevel=function(){return Gt},e.unstable_next=function(pa){switch(Gt){case 1:case 2:case 3:var Ra=3;break;default:Ra=Gt}var vi=Gt;Gt=Ra;try{return pa()}finally{Gt=vi}},e.unstable_requestPaint=function(){nr=!0},e.unstable_runWithPriority=function(pa,Ra){switch(pa){case 1:case 2:case 3:case 4:case 5:break;default:pa=3}var vi=Gt;Gt=pa;try{return Ra()}finally{Gt=vi}},e.unstable_scheduleCallback=function(pa,Ra,vi){var Pi=e.unstable_now();switch(typeof vi=="object"&&vi!==null?(vi=vi.delay,vi=typeof vi=="number"&&0<vi?Pi+vi:Pi):vi=Pi,pa){case 1:var Eo=-1;break;case 2:Eo=250;break;case 5:Eo=1073741823;break;case 4:Eo=1e4;break;default:Eo=5e3}return Eo=vi+Eo,pa={id:vt++,callback:Ra,priorityLevel:pa,startTime:vi,expirationTime:Eo,sortIndex:-1},vi>Pi?(pa.sortIndex=vi,n(Ke,pa),S(Xe)===null&&pa===S(Ke)&&(sr?(Ne(dn),dn=-1):sr=!0,ja(Lr,vi-Pi))):(pa.sortIndex=Eo,n(Xe,pa),gr||$t||(gr=!0,$r||($r=!0,ta()))),pa},e.unstable_shouldYield=Na,e.unstable_wrapCallback=function(pa){var Ra=Gt;return function(){var vi=Gt;Gt=Ra;try{return pa.apply(this,arguments)}finally{Gt=vi}}}})(N8)),N8}var _B;function Hae(){return _B||(_B=1,z8.exports=Vae()),z8.exports}var F8={exports:{}},Ip={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var xB;function Gae(){if(xB)return Ip;xB=1;var e=RP();function n(Xe){var Ke="https://react.dev/errors/"+Xe;if(1<arguments.length){Ke+="?args[]="+encodeURIComponent(arguments[1]);for(var vt=2;vt<arguments.length;vt++)Ke+="&args[]="+encodeURIComponent(arguments[vt])}return"Minified React error #"+Xe+"; visit "+Ke+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function S(){}var L={d:{f:S,r:function(){throw Error(n(522))},D:S,C:S,L:S,m:S,X:S,S,M:S},p:0,findDOMNode:null},re=Symbol.for("react.portal");function ve(Xe,Ke,vt){var yt=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:yt==null?null:""+yt,children:Xe,containerInfo:Ke,implementation:vt}}var Ce=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Be(Xe,Ke){if(Xe==="font")return"";if(typeof Ke=="string")return Ke==="use-credentials"?Ke:""}return Ip.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,Ip.createPortal=function(Xe,Ke){var vt=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ke||Ke.nodeType!==1&&Ke.nodeType!==9&&Ke.nodeType!==11)throw Error(n(299));return ve(Xe,Ke,null,vt)},Ip.flushSync=function(Xe){var Ke=Ce.T,vt=L.p;try{if(Ce.T=null,L.p=2,Xe)return Xe()}finally{Ce.T=Ke,L.p=vt,L.d.f()}},Ip.preconnect=function(Xe,Ke){typeof Xe=="string"&&(Ke?(Ke=Ke.crossOrigin,Ke=typeof Ke=="string"?Ke==="use-credentials"?Ke:"":void 0):Ke=null,L.d.C(Xe,Ke))},Ip.prefetchDNS=function(Xe){typeof Xe=="string"&&L.d.D(Xe)},Ip.preinit=function(Xe,Ke){if(typeof Xe=="string"&&Ke&&typeof Ke.as=="string"){var vt=Ke.as,yt=Be(vt,Ke.crossOrigin),Gt=typeof Ke.integrity=="string"?Ke.integrity:void 0,$t=typeof Ke.fetchPriority=="string"?Ke.fetchPriority:void 0;vt==="style"?L.d.S(Xe,typeof Ke.precedence=="string"?Ke.precedence:void 0,{crossOrigin:yt,integrity:Gt,fetchPriority:$t}):vt==="script"&&L.d.X(Xe,{crossOrigin:yt,integrity:Gt,fetchPriority:$t,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0})}},Ip.preinitModule=function(Xe,Ke){if(typeof Xe=="string")if(typeof Ke=="object"&&Ke!==null){if(Ke.as==null||Ke.as==="script"){var vt=Be(Ke.as,Ke.crossOrigin);L.d.M(Xe,{crossOrigin:vt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0})}}else Ke==null&&L.d.M(Xe)},Ip.preload=function(Xe,Ke){if(typeof Xe=="string"&&typeof Ke=="object"&&Ke!==null&&typeof Ke.as=="string"){var vt=Ke.as,yt=Be(vt,Ke.crossOrigin);L.d.L(Xe,vt,{crossOrigin:yt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0,nonce:typeof Ke.nonce=="string"?Ke.nonce:void 0,type:typeof Ke.type=="string"?Ke.type:void 0,fetchPriority:typeof Ke.fetchPriority=="string"?Ke.fetchPriority:void 0,referrerPolicy:typeof Ke.referrerPolicy=="string"?Ke.referrerPolicy:void 0,imageSrcSet:typeof Ke.imageSrcSet=="string"?Ke.imageSrcSet:void 0,imageSizes:typeof Ke.imageSizes=="string"?Ke.imageSizes:void 0,media:typeof Ke.media=="string"?Ke.media:void 0})}},Ip.preloadModule=function(Xe,Ke){if(typeof Xe=="string")if(Ke){var vt=Be(Ke.as,Ke.crossOrigin);L.d.m(Xe,{as:typeof Ke.as=="string"&&Ke.as!=="script"?Ke.as:void 0,crossOrigin:vt,integrity:typeof Ke.integrity=="string"?Ke.integrity:void 0})}else L.d.m(Xe)},Ip.requestFormReset=function(Xe){L.d.r(Xe)},Ip.unstable_batchedUpdates=function(Xe,Ke){return Xe(Ke)},Ip.useFormState=function(Xe,Ke,vt){return Ce.H.useFormState(Xe,Ke,vt)},Ip.useFormStatus=function(){return Ce.H.useHostTransitionStatus()},Ip.version="19.2.0",Ip}var bB;function WX(){if(bB)return F8.exports;bB=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),F8.exports=Gae(),F8.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var wB;function Xae(){if(wB)return I5;wB=1;var e=Hae(),n=RP(),S=WX();function L(j){var Q="https://react.dev/errors/"+j;if(1<arguments.length){Q+="?args[]="+encodeURIComponent(arguments[1]);for(var xe=2;xe<arguments.length;xe++)Q+="&args[]="+encodeURIComponent(arguments[xe])}return"Minified React error #"+j+"; visit "+Q+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function re(j){return!(!j||j.nodeType!==1&&j.nodeType!==9&&j.nodeType!==11)}function ve(j){var Q=j,xe=j;if(j.alternate)for(;Q.return;)Q=Q.return;else{j=Q;do Q=j,(Q.flags&4098)!==0&&(xe=Q.return),j=Q.return;while(j)}return Q.tag===3?xe:null}function Ce(j){if(j.tag===13){var Q=j.memoizedState;if(Q===null&&(j=j.alternate,j!==null&&(Q=j.memoizedState)),Q!==null)return Q.dehydrated}return null}function Be(j){if(j.tag===31){var Q=j.memoizedState;if(Q===null&&(j=j.alternate,j!==null&&(Q=j.memoizedState)),Q!==null)return Q.dehydrated}return null}function Xe(j){if(ve(j)!==j)throw Error(L(188))}function Ke(j){var Q=j.alternate;if(!Q){if(Q=ve(j),Q===null)throw Error(L(188));return Q!==j?null:j}for(var xe=j,Ue=Q;;){var xt=xe.return;if(xt===null)break;var Bt=xt.alternate;if(Bt===null){if(Ue=xt.return,Ue!==null){xe=Ue;continue}break}if(xt.child===Bt.child){for(Bt=xt.child;Bt;){if(Bt===xe)return Xe(xt),j;if(Bt===Ue)return Xe(xt),Q;Bt=Bt.sibling}throw Error(L(188))}if(xe.return!==Ue.return)xe=xt,Ue=Bt;else{for(var Gr=!1,Nn=xt.child;Nn;){if(Nn===xe){Gr=!0,xe=xt,Ue=Bt;break}if(Nn===Ue){Gr=!0,Ue=xt,xe=Bt;break}Nn=Nn.sibling}if(!Gr){for(Nn=Bt.child;Nn;){if(Nn===xe){Gr=!0,xe=Bt,Ue=xt;break}if(Nn===Ue){Gr=!0,Ue=Bt,xe=xt;break}Nn=Nn.sibling}if(!Gr)throw Error(L(189))}}if(xe.alternate!==Ue)throw Error(L(190))}if(xe.tag!==3)throw Error(L(188));return xe.stateNode.current===xe?j:Q}function vt(j){var Q=j.tag;if(Q===5||Q===26||Q===27||Q===6)return j;for(j=j.child;j!==null;){if(Q=vt(j),Q!==null)return Q;j=j.sibling}return null}var yt=Object.assign,Gt=Symbol.for("react.element"),$t=Symbol.for("react.transitional.element"),gr=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),nr=Symbol.for("react.strict_mode"),jr=Symbol.for("react.profiler"),Ne=Symbol.for("react.consumer"),an=Symbol.for("react.context"),yn=Symbol.for("react.forward_ref"),Lr=Symbol.for("react.suspense"),$r=Symbol.for("react.suspense_list"),dn=Symbol.for("react.memo"),Jn=Symbol.for("react.lazy"),xn=Symbol.for("react.activity"),Na=Symbol.for("react.memo_cache_sentinel"),zn=Symbol.iterator;function ta(j){return j===null||typeof j!="object"?null:(j=zn&&j[zn]||j["@@iterator"],typeof j=="function"?j:null)}var qa=Symbol.for("react.client.reference");function la(j){if(j==null)return null;if(typeof j=="function")return j.$$typeof===qa?null:j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){case sr:return"Fragment";case jr:return"Profiler";case nr:return"StrictMode";case Lr:return"Suspense";case $r:return"SuspenseList";case xn:return"Activity"}if(typeof j=="object")switch(j.$$typeof){case gr:return"Portal";case an:return j.displayName||"Context";case Ne:return(j._context.displayName||"Context")+".Consumer";case yn:var Q=j.render;return j=j.displayName,j||(j=Q.displayName||Q.name||"",j=j!==""?"ForwardRef("+j+")":"ForwardRef"),j;case dn:return Q=j.displayName||null,Q!==null?Q:la(j.type)||"Memo";case Jn:Q=j._payload,j=j._init;try{return la(j(Q))}catch{}}return null}var ja=Array.isArray,pa=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ra=S.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vi={pending:!1,data:null,method:null,action:null},Pi=[],Eo=-1;function ma(j){return{current:j}}function _a(j){0>Eo||(j.current=Pi[Eo],Pi[Eo]=null,Eo--)}function Li(j,Q){Eo++,Pi[Eo]=j.current,j.current=Q}var so=ma(null),Ro=ma(null),co=ma(null),$o=ma(null);function $u(j,Q){switch(Li(co,Q),Li(Ro,j),Li(so,null),Q.nodeType){case 9:case 11:j=(j=Q.documentElement)&&(j=j.namespaceURI)?CS(j):0;break;default:if(j=Q.tagName,Q=Q.namespaceURI)Q=CS(Q),j=kS(Q,j);else switch(j){case"svg":j=1;break;case"math":j=2;break;default:j=0}}_a(so),Li(so,j)}function Bo(){_a(so),_a(Ro),_a(co)}function Ml(j){j.memoizedState!==null&&Li($o,j);var Q=so.current,xe=kS(Q,j.type);Q!==xe&&(Li(Ro,j),Li(so,xe))}function ns(j){Ro.current===j&&(_a(so),_a(Ro)),$o.current===j&&(_a($o),S_._currentValue=vi)}var Do,lu;function io(j){if(Do===void 0)try{throw Error()}catch(xe){var Q=xe.stack.trim().match(/\n( *(at )?)/);Do=Q&&Q[1]||"",lu=-1<xe.stack.indexOf(`
    at`)?" (<anonymous>)":-1<xe.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Do+j+lu}var $c=!1;function sf(j,Q){if(!j||$c)return"";$c=!0;var xe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var Ue={DetermineComponentFrameRoot:function(){try{if(Q){var Mo=function(){throw Error()};if(Object.defineProperty(Mo.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Mo,[])}catch(ro){var Zi=ro}Reflect.construct(j,[],Mo)}else{try{Mo.call()}catch(ro){Zi=ro}j.call(Mo.prototype)}}else{try{throw Error()}catch(ro){Zi=ro}(Mo=j())&&typeof Mo.catch=="function"&&Mo.catch(function(){})}}catch(ro){if(ro&&Zi&&typeof ro.stack=="string")return[ro.stack,Zi.stack]}return[null,null]}};Ue.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var xt=Object.getOwnPropertyDescriptor(Ue.DetermineComponentFrameRoot,"name");xt&&xt.configurable&&Object.defineProperty(Ue.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var Bt=Ue.DetermineComponentFrameRoot(),Gr=Bt[0],Nn=Bt[1];if(Gr&&Nn){var Wa=Gr.split(`
`),Hi=Nn.split(`
`);for(xt=Ue=0;Ue<Wa.length&&!Wa[Ue].includes("DetermineComponentFrameRoot");)Ue++;for(;xt<Hi.length&&!Hi[xt].includes("DetermineComponentFrameRoot");)xt++;if(Ue===Wa.length||xt===Hi.length)for(Ue=Wa.length-1,xt=Hi.length-1;1<=Ue&&0<=xt&&Wa[Ue]!==Hi[xt];)xt--;for(;1<=Ue&&0<=xt;Ue--,xt--)if(Wa[Ue]!==Hi[xt]){if(Ue!==1||xt!==1)do if(Ue--,xt--,0>xt||Wa[Ue]!==Hi[xt]){var xo=`
`+Wa[Ue].replace(" at new "," at ");return j.displayName&&xo.includes("<anonymous>")&&(xo=xo.replace("<anonymous>",j.displayName)),xo}while(1<=Ue&&0<=xt);break}}}finally{$c=!1,Error.prepareStackTrace=xe}return(xe=j?j.displayName||j.name:"")?io(xe):""}function rv(j,Q){switch(j.tag){case 26:case 27:case 5:return io(j.type);case 16:return io("Lazy");case 13:return j.child!==Q&&Q!==null?io("Suspense Fallback"):io("Suspense");case 19:return io("SuspenseList");case 0:case 15:return sf(j.type,!1);case 11:return sf(j.type.render,!1);case 1:return sf(j.type,!0);case 31:return io("Activity");default:return""}}function gd(j){try{var Q="",xe=null;do Q+=rv(j,xe),xe=j,j=j.return;while(j);return Q}catch(Ue){return`
Error generating stack: `+Ue.message+`
`+Ue.stack}}var Fp=Object.prototype.hasOwnProperty,yv=e.unstable_scheduleCallback,Id=e.unstable_cancelCallback,Bp=e.unstable_shouldYield,jp=e.unstable_requestPaint,nv=e.unstable_now,P1=e.unstable_getCurrentPriorityLevel,zv=e.unstable_ImmediatePriority,R0=e.unstable_UserBlockingPriority,L1=e.unstable_NormalPriority,WT=e.unstable_LowPriority,xg=e.unstable_IdlePriority,YT=e.log,Sw=e.unstable_setDisableYieldValue,I0=null,_d=null;function Am(j){if(typeof YT=="function"&&Sw(j),_d&&typeof _d.setStrictMode=="function")try{_d.setStrictMode(I0,j)}catch{}}var xd=Math.clz32?Math.clz32:Ew,ZT=Math.log,$T=Math.LN2;function Ew(j){return j>>>=0,j===0?32:31-(ZT(j)/$T|0)|0}var bg=256,R1=262144,yy=4194304;function Nv(j){var Q=j&42;if(Q!==0)return Q;switch(j&-j){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return j&261888;case 262144:case 524288:case 1048576:case 2097152:return j&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return j&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return j}}function I1(j,Q,xe){var Ue=j.pendingLanes;if(Ue===0)return 0;var xt=0,Bt=j.suspendedLanes,Gr=j.pingedLanes;j=j.warmLanes;var Nn=Ue&134217727;return Nn!==0?(Ue=Nn&~Bt,Ue!==0?xt=Nv(Ue):(Gr&=Nn,Gr!==0?xt=Nv(Gr):xe||(xe=Nn&~j,xe!==0&&(xt=Nv(xe))))):(Nn=Ue&~Bt,Nn!==0?xt=Nv(Nn):Gr!==0?xt=Nv(Gr):xe||(xe=Ue&~j,xe!==0&&(xt=Nv(xe)))),xt===0?0:Q!==0&&Q!==xt&&(Q&Bt)===0&&(Bt=xt&-xt,xe=Q&-Q,Bt>=xe||Bt===32&&(xe&4194048)!==0)?Q:xt}function nu(j,Q){return(j.pendingLanes&~(j.suspendedLanes&~j.pingedLanes)&Q)===0}function lf(j,Q){switch(j){case 1:case 2:case 4:case 8:case 64:return Q+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return Q+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vf(){var j=yy;return yy<<=1,(yy&62914560)===0&&(yy=4194304),j}function ep(j){for(var Q=[],xe=0;31>xe;xe++)Q.push(j);return Q}function gv(j,Q){j.pendingLanes|=Q,Q!==268435456&&(j.suspendedLanes=0,j.pingedLanes=0,j.warmLanes=0)}function t0(j,Q,xe,Ue,xt,Bt){var Gr=j.pendingLanes;j.pendingLanes=xe,j.suspendedLanes=0,j.pingedLanes=0,j.warmLanes=0,j.expiredLanes&=xe,j.entangledLanes&=xe,j.errorRecoveryDisabledLanes&=xe,j.shellSuspendCounter=0;var Nn=j.entanglements,Wa=j.expirationTimes,Hi=j.hiddenUpdates;for(xe=Gr&~xe;0<xe;){var xo=31-xd(xe),Mo=1<<xo;Nn[xo]=0,Wa[xo]=-1;var Zi=Hi[xo];if(Zi!==null)for(Hi[xo]=null,xo=0;xo<Zi.length;xo++){var ro=Zi[xo];ro!==null&&(ro.lane&=-536870913)}xe&=~Mo}Ue!==0&&r0(j,Ue,0),Bt!==0&&xt===0&&j.tag!==0&&(j.suspendedLanes|=Bt&~(Gr&~Q))}function r0(j,Q,xe){j.pendingLanes|=Q,j.suspendedLanes&=~Q;var Ue=31-xd(Q);j.entangledLanes|=Q,j.entanglements[Ue]=j.entanglements[Ue]|1073741824|xe&261930}function tp(j,Q){var xe=j.entangledLanes|=Q;for(j=j.entanglements;xe;){var Ue=31-xd(xe),xt=1<<Ue;xt&Q|j[Ue]&Q&&(j[Ue]|=Q),xe&=~xt}}function Up(j,Q){var xe=Q&-Q;return xe=(xe&42)!==0?1:D1(xe),(xe&(j.suspendedLanes|Q))!==0?0:xe}function D1(j){switch(j){case 2:j=1;break;case 8:j=4;break;case 32:j=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:j=128;break;case 268435456:j=134217728;break;default:j=0}return j}function O1(j){return j&=-j,2<j?8<j?(j&134217727)!==0?32:268435456:8:2}function Kc(){var j=Ra.p;return j!==0?j:(j=window.event,j===void 0?32:XS(j.type))}function Dd(j,Q){var xe=Ra.p;try{return Ra.p=j,Q()}finally{Ra.p=xe}}var D0=Math.random().toString(36).slice(2),Il="__reactFiber$"+D0,Fv="__reactProps$"+D0,z1="__reactContainer$"+D0,KT="__reactEvents$"+D0,JT="__reactListeners$"+D0,_x="__reactHandles$"+D0,YE="__reactResources$"+D0,Xo="__reactMarker$"+D0;function QT(j){delete j[Il],delete j[Fv],delete j[KT],delete j[JT],delete j[_x]}function O0(j){var Q=j[Il];if(Q)return Q;for(var xe=j.parentNode;xe;){if(Q=xe[z1]||xe[Il]){if(xe=Q.alternate,Q.child!==null||xe!==null&&xe.child!==null)for(j=b_(j);j!==null;){if(xe=j[Il])return xe;j=b_(j)}return Q}j=xe,xe=j.parentNode}return null}function gy(j){if(j=j[Il]||j[z1]){var Q=j.tag;if(Q===5||Q===6||Q===13||Q===31||Q===26||Q===27||Q===3)return j}return null}function Sm(j){var Q=j.tag;if(Q===5||Q===26||Q===27||Q===6)return j.stateNode;throw Error(L(33))}function N1(j){var Q=j[YE];return Q||(Q=j[YE]={hoistableStyles:new Map,hoistableScripts:new Map}),Q}function av(j){j[Xo]=!0}var ZE=new Set,$E={};function z0(j,Q){F1(j,Q),F1(j+"Capture",Q)}function F1(j,Q){for($E[j]=Q,j=0;j<Q.length;j++)ZE.add(Q[j])}var yL=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),KE={},JE={};function gL(j){return Fp.call(JE,j)?!0:Fp.call(KE,j)?!1:yL.test(j)?JE[j]=!0:(KE[j]=!0,!1)}function xx(j,Q,xe){if(gL(Q))if(xe===null)j.removeAttribute(Q);else{switch(typeof xe){case"undefined":case"function":case"symbol":j.removeAttribute(Q);return;case"boolean":var Ue=Q.toLowerCase().slice(0,5);if(Ue!=="data-"&&Ue!=="aria-"){j.removeAttribute(Q);return}}j.setAttribute(Q,""+xe)}}function Mw(j,Q,xe){if(xe===null)j.removeAttribute(Q);else{switch(typeof xe){case"undefined":case"function":case"symbol":case"boolean":j.removeAttribute(Q);return}j.setAttribute(Q,""+xe)}}function N0(j,Q,xe,Ue){if(Ue===null)j.removeAttribute(xe);else{switch(typeof Ue){case"undefined":case"function":case"symbol":case"boolean":j.removeAttribute(xe);return}j.setAttributeNS(Q,xe,""+Ue)}}function nm(j){switch(typeof j){case"bigint":case"boolean":case"number":case"string":case"undefined":return j;case"object":return j;default:return""}}function In(j){var Q=j.type;return(j=j.nodeName)&&j.toLowerCase()==="input"&&(Q==="checkbox"||Q==="radio")}function _L(j,Q,xe){var Ue=Object.getOwnPropertyDescriptor(j.constructor.prototype,Q);if(!j.hasOwnProperty(Q)&&typeof Ue<"u"&&typeof Ue.get=="function"&&typeof Ue.set=="function"){var xt=Ue.get,Bt=Ue.set;return Object.defineProperty(j,Q,{configurable:!0,get:function(){return xt.call(this)},set:function(Gr){xe=""+Gr,Bt.call(this,Gr)}}),Object.defineProperty(j,Q,{enumerable:Ue.enumerable}),{getValue:function(){return xe},setValue:function(Gr){xe=""+Gr},stopTracking:function(){j._valueTracker=null,delete j[Q]}}}}function Cw(j){if(!j._valueTracker){var Q=In(j)?"checked":"value";j._valueTracker=_L(j,Q,""+j[Q])}}function eA(j){if(!j)return!1;var Q=j._valueTracker;if(!Q)return!0;var xe=Q.getValue(),Ue="";return j&&(Ue=In(j)?j.checked?"true":"false":j.value),j=Ue,j!==xe?(Q.setValue(j),!0):!1}function F0(j){if(j=j||(typeof document<"u"?document:void 0),typeof j>"u")return null;try{return j.activeElement||j.body}catch{return j.body}}var bx=/[\n"\\]/g;function am(j){return j.replace(bx,function(Q){return"\\"+Q.charCodeAt(0).toString(16)+" "})}function kw(j,Q,xe,Ue,xt,Bt,Gr,Nn){j.name="",Gr!=null&&typeof Gr!="function"&&typeof Gr!="symbol"&&typeof Gr!="boolean"?j.type=Gr:j.removeAttribute("type"),Q!=null?Gr==="number"?(Q===0&&j.value===""||j.value!=Q)&&(j.value=""+nm(Q)):j.value!==""+nm(Q)&&(j.value=""+nm(Q)):Gr!=="submit"&&Gr!=="reset"||j.removeAttribute("value"),Q!=null?Tu(j,Gr,nm(Q)):xe!=null?Tu(j,Gr,nm(xe)):Ue!=null&&j.removeAttribute("value"),xt==null&&Bt!=null&&(j.defaultChecked=!!Bt),xt!=null&&(j.checked=xt&&typeof xt!="function"&&typeof xt!="symbol"),Nn!=null&&typeof Nn!="function"&&typeof Nn!="symbol"&&typeof Nn!="boolean"?j.name=""+nm(Nn):j.removeAttribute("name")}function B1(j,Q,xe,Ue,xt,Bt,Gr,Nn){if(Bt!=null&&typeof Bt!="function"&&typeof Bt!="symbol"&&typeof Bt!="boolean"&&(j.type=Bt),Q!=null||xe!=null){if(!(Bt!=="submit"&&Bt!=="reset"||Q!=null)){Cw(j);return}xe=xe!=null?""+nm(xe):"",Q=Q!=null?""+nm(Q):xe,Nn||Q===j.value||(j.value=Q),j.defaultValue=Q}Ue=Ue??xt,Ue=typeof Ue!="function"&&typeof Ue!="symbol"&&!!Ue,j.checked=Nn?j.checked:!!Ue,j.defaultChecked=!!Ue,Gr!=null&&typeof Gr!="function"&&typeof Gr!="symbol"&&typeof Gr!="boolean"&&(j.name=Gr),Cw(j)}function Tu(j,Q,xe){Q==="number"&&F0(j.ownerDocument)===j||j.defaultValue===""+xe||(j.defaultValue=""+xe)}function xh(j,Q,xe,Ue){if(j=j.options,Q){Q={};for(var xt=0;xt<xe.length;xt++)Q["$"+xe[xt]]=!0;for(xe=0;xe<j.length;xe++)xt=Q.hasOwnProperty("$"+j[xe].value),j[xe].selected!==xt&&(j[xe].selected=xt),xt&&Ue&&(j[xe].defaultSelected=!0)}else{for(xe=""+nm(xe),Q=null,xt=0;xt<j.length;xt++){if(j[xt].value===xe){j[xt].selected=!0,Ue&&(j[xt].defaultSelected=!0);return}Q!==null||j[xt].disabled||(Q=j[xt])}Q!==null&&(Q.selected=!0)}}function Hf(j,Q,xe){if(Q!=null&&(Q=""+nm(Q),Q!==j.value&&(j.value=Q),xe==null)){j.defaultValue!==Q&&(j.defaultValue=Q);return}j.defaultValue=xe!=null?""+nm(xe):""}function _y(j,Q,xe,Ue){if(Q==null){if(Ue!=null){if(xe!=null)throw Error(L(92));if(ja(Ue)){if(1<Ue.length)throw Error(L(93));Ue=Ue[0]}xe=Ue}xe==null&&(xe=""),Q=xe}xe=nm(Q),j.defaultValue=xe,Ue=j.textContent,Ue===xe&&Ue!==""&&Ue!==null&&(j.value=Ue),Cw(j)}function xy(j,Q){if(Q){var xe=j.firstChild;if(xe&&xe===j.lastChild&&xe.nodeType===3){xe.nodeValue=Q;return}}j.textContent=Q}var iv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function QE(j,Q,xe){var Ue=Q.indexOf("--")===0;xe==null||typeof xe=="boolean"||xe===""?Ue?j.setProperty(Q,""):Q==="float"?j.cssFloat="":j[Q]="":Ue?j.setProperty(Q,xe):typeof xe!="number"||xe===0||iv.has(Q)?Q==="float"?j.cssFloat=xe:j[Q]=(""+xe).trim():j[Q]=xe+"px"}function uf(j,Q,xe){if(Q!=null&&typeof Q!="object")throw Error(L(62));if(j=j.style,xe!=null){for(var Ue in xe)!xe.hasOwnProperty(Ue)||Q!=null&&Q.hasOwnProperty(Ue)||(Ue.indexOf("--")===0?j.setProperty(Ue,""):Ue==="float"?j.cssFloat="":j[Ue]="");for(var xt in Q)Ue=Q[xt],Q.hasOwnProperty(xt)&&xe[xt]!==Ue&&QE(j,xt,Ue)}else for(var Bt in Q)Q.hasOwnProperty(Bt)&&QE(j,Bt,Q[Bt])}function cp(j){if(j.indexOf("-")===-1)return!1;switch(j){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var bd=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),uc=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Od(j){return uc.test(""+j)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":j}function bc(){}var wd=null;function wx(j){return j=j.target||j.srcElement||window,j.correspondingUseElement&&(j=j.correspondingUseElement),j.nodeType===3?j.parentNode:j}var Vu=null,wg=null;function tA(j){var Q=gy(j);if(Q&&(j=Q.stateNode)){var xe=j[Fv]||null;e:switch(j=Q.stateNode,Q.type){case"input":if(kw(j,xe.value,xe.defaultValue,xe.defaultValue,xe.checked,xe.defaultChecked,xe.type,xe.name),Q=xe.name,xe.type==="radio"&&Q!=null){for(xe=j;xe.parentNode;)xe=xe.parentNode;for(xe=xe.querySelectorAll('input[name="'+am(""+Q)+'"][type="radio"]'),Q=0;Q<xe.length;Q++){var Ue=xe[Q];if(Ue!==j&&Ue.form===j.form){var xt=Ue[Fv]||null;if(!xt)throw Error(L(90));kw(Ue,xt.value,xt.defaultValue,xt.defaultValue,xt.checked,xt.defaultChecked,xt.type,xt.name)}}for(Q=0;Q<xe.length;Q++)Ue=xe[Q],Ue.form===j.form&&eA(Ue)}break e;case"textarea":Hf(j,xe.value,xe.defaultValue);break e;case"select":Q=xe.value,Q!=null&&xh(j,!!xe.multiple,Q,!1)}}}var Pw=!1;function Tg(j,Q,xe){if(Pw)return j(Q,xe);Pw=!0;try{var Ue=j(Q);return Ue}finally{if(Pw=!1,(Vu!==null||wg!==null)&&(N2(),Vu&&(Q=Vu,j=wg,wg=Vu=null,tA(Q),j)))for(Q=0;Q<j.length;Q++)tA(j[Q])}}function B0(j,Q){var xe=j.stateNode;if(xe===null)return null;var Ue=xe[Fv]||null;if(Ue===null)return null;xe=Ue[Q];e:switch(Q){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(Ue=!Ue.disabled)||(j=j.type,Ue=!(j==="button"||j==="input"||j==="select"||j==="textarea")),j=!Ue;break e;default:j=!1}if(j)return null;if(xe&&typeof xe!="function")throw Error(L(231,Q,typeof xe));return xe}var n0=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zd=!1;if(n0)try{var Em={};Object.defineProperty(Em,"passive",{get:function(){zd=!0}}),window.addEventListener("test",Em,Em),window.removeEventListener("test",Em,Em)}catch{zd=!1}var fp=null,Lw=null,Ph=null;function eM(){if(Ph)return Ph;var j,Q=Lw,xe=Q.length,Ue,xt="value"in fp?fp.value:fp.textContent,Bt=xt.length;for(j=0;j<xe&&Q[j]===xt[j];j++);var Gr=xe-j;for(Ue=1;Ue<=Gr&&Q[xe-Ue]===xt[Bt-Ue];Ue++);return Ph=xt.slice(j,1<Ue?1-Ue:void 0)}function Rw(j){var Q=j.keyCode;return"charCode"in j?(j=j.charCode,j===0&&Q===13&&(j=13)):j=Q,j===10&&(j=13),32<=j||j===13?j:0}function Nd(){return!0}function Dc(){return!1}function vu(j){function Q(xe,Ue,xt,Bt,Gr){this._reactName=xe,this._targetInst=xt,this.type=Ue,this.nativeEvent=Bt,this.target=Gr,this.currentTarget=null;for(var Nn in j)j.hasOwnProperty(Nn)&&(xe=j[Nn],this[Nn]=xe?xe(Bt):Bt[Nn]);return this.isDefaultPrevented=(Bt.defaultPrevented!=null?Bt.defaultPrevented:Bt.returnValue===!1)?Nd:Dc,this.isPropagationStopped=Dc,this}return yt(Q.prototype,{preventDefault:function(){this.defaultPrevented=!0;var xe=this.nativeEvent;xe&&(xe.preventDefault?xe.preventDefault():typeof xe.returnValue!="unknown"&&(xe.returnValue=!1),this.isDefaultPrevented=Nd)},stopPropagation:function(){var xe=this.nativeEvent;xe&&(xe.stopPropagation?xe.stopPropagation():typeof xe.cancelBubble!="unknown"&&(xe.cancelBubble=!0),this.isPropagationStopped=Nd)},persist:function(){},isPersistent:Nd}),Q}var Mm={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(j){return j.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_v=vu(Mm),by=yt({},Mm,{view:0,detail:0}),xL=vu(by),zs,wy,qp,Ty=yt({},by,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:iA,button:0,buttons:0,relatedTarget:function(j){return j.relatedTarget===void 0?j.fromElement===j.srcElement?j.toElement:j.fromElement:j.relatedTarget},movementX:function(j){return"movementX"in j?j.movementX:(j!==qp&&(qp&&j.type==="mousemove"?(zs=j.screenX-qp.screenX,wy=j.screenY-qp.screenY):wy=zs=0,qp=j),zs)},movementY:function(j){return"movementY"in j?j.movementY:wy}}),Cm=vu(Ty),Os=yt({},Ty,{dataTransfer:0}),tM=vu(Os),rM=yt({},by,{relatedTarget:0}),rA=vu(rM),nA=yt({},Mm,{animationName:0,elapsedTime:0,pseudoElement:0}),bL=vu(nA),wL=yt({},Mm,{clipboardData:function(j){return"clipboardData"in j?j.clipboardData:window.clipboardData}}),TL=vu(wL),Bv=yt({},Mm,{data:0}),km=vu(Bv),AL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nM={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},aA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function aM(j){var Q=this.nativeEvent;return Q.getModifierState?Q.getModifierState(j):(j=aA[j])?!!Q[j]:!1}function iA(){return aM}var iM=yt({},by,{key:function(j){if(j.key){var Q=AL[j.key]||j.key;if(Q!=="Unidentified")return Q}return j.type==="keypress"?(j=Rw(j),j===13?"Enter":String.fromCharCode(j)):j.type==="keydown"||j.type==="keyup"?nM[j.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:iA,charCode:function(j){return j.type==="keypress"?Rw(j):0},keyCode:function(j){return j.type==="keydown"||j.type==="keyup"?j.keyCode:0},which:function(j){return j.type==="keypress"?Rw(j):j.type==="keydown"||j.type==="keyup"?j.keyCode:0}}),SL=vu(iM),Ag=yt({},Ty,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oM=vu(Ag),Tx=yt({},by,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:iA}),sM=vu(Tx),lM=yt({},Mm,{propertyName:0,elapsedTime:0,pseudoElement:0}),uM=vu(lM),Iw=yt({},Ty,{deltaX:function(j){return"deltaX"in j?j.deltaX:"wheelDeltaX"in j?-j.wheelDeltaX:0},deltaY:function(j){return"deltaY"in j?j.deltaY:"wheelDeltaY"in j?-j.wheelDeltaY:"wheelDelta"in j?-j.wheelDelta:0},deltaZ:0,deltaMode:0}),EL=vu(Iw),ML=yt({},Mm,{newState:0,oldState:0}),cM=vu(ML),CL=[9,13,27,32],oA=n0&&"CompositionEvent"in window,Ax=null;n0&&"documentMode"in document&&(Ax=document.documentMode);var nh=n0&&"TextEvent"in window&&!Ax,Pm=n0&&(!oA||Ax&&8<Ax&&11>=Ax),Sx=" ",Dw=!1;function Ow(j,Q){switch(j){case"keyup":return CL.indexOf(Q.keyCode)!==-1;case"keydown":return Q.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zw(j){return j=j.detail,typeof j=="object"&&"data"in j?j.data:null}var im=!1;function sA(j,Q){switch(j){case"compositionend":return zw(Q);case"keypress":return Q.which!==32?null:(Dw=!0,Sx);case"textInput":return j=Q.data,j===Sx&&Dw?null:j;default:return null}}function fM(j,Q){if(im)return j==="compositionend"||!oA&&Ow(j,Q)?(j=eM(),Ph=Lw=fp=null,im=!1,j):null;switch(j){case"paste":return null;case"keypress":if(!(Q.ctrlKey||Q.altKey||Q.metaKey)||Q.ctrlKey&&Q.altKey){if(Q.char&&1<Q.char.length)return Q.char;if(Q.which)return String.fromCharCode(Q.which)}return null;case"compositionend":return Pm&&Q.locale!=="ko"?null:Q.data;default:return null}}var Nw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ay(j){var Q=j&&j.nodeName&&j.nodeName.toLowerCase();return Q==="input"?!!Nw[j.type]:Q==="textarea"}function lA(j,Q,xe,Ue){Vu?wg?wg.push(Ue):wg=[Ue]:Vu=Ue,Q=db(Q,"onChange"),0<Q.length&&(xe=new _v("onChange","change",null,xe,Ue),j.push({event:xe,listeners:Q}))}var Sg=null,Eg=null;function hM(j){y_(j,0)}function Ex(j){var Q=Sm(j);if(eA(Q))return j}function uA(j,Q){if(j==="change")return Q}var dM=!1;if(n0){var cA;if(n0){var fA="oninput"in document;if(!fA){var hA=document.createElement("div");hA.setAttribute("oninput","return;"),fA=typeof hA.oninput=="function"}cA=fA}else cA=!1;dM=cA&&(!document.documentMode||9<document.documentMode)}function dA(){Sg&&(Sg.detachEvent("onpropertychange",Mg),Eg=Sg=null)}function Mg(j){if(j.propertyName==="value"&&Ex(Eg)){var Q=[];lA(Q,Eg,j,wx(j)),Tg(hM,Q)}}function Fw(j,Q,xe){j==="focusin"?(dA(),Sg=Q,Eg=xe,Sg.attachEvent("onpropertychange",Mg)):j==="focusout"&&dA()}function vM(j){if(j==="selectionchange"||j==="keyup"||j==="keydown")return Ex(Eg)}function kL(j,Q){if(j==="click")return Ex(Q)}function PL(j,Q){if(j==="input"||j==="change")return Ex(Q)}function LL(j,Q){return j===Q&&(j!==0||1/j===1/Q)||j!==j&&Q!==Q}var Vp=typeof Object.is=="function"?Object.is:LL;function Mx(j,Q){if(Vp(j,Q))return!0;if(typeof j!="object"||j===null||typeof Q!="object"||Q===null)return!1;var xe=Object.keys(j),Ue=Object.keys(Q);if(xe.length!==Ue.length)return!1;for(Ue=0;Ue<xe.length;Ue++){var xt=xe[Ue];if(!Fp.call(Q,xt)||!Vp(j[xt],Q[xt]))return!1}return!0}function pM(j){for(;j&&j.firstChild;)j=j.firstChild;return j}function mM(j,Q){var xe=pM(j);j=0;for(var Ue;xe;){if(xe.nodeType===3){if(Ue=j+xe.textContent.length,j<=Q&&Ue>=Q)return{node:xe,offset:Q-j};j=Ue}e:{for(;xe;){if(xe.nextSibling){xe=xe.nextSibling;break e}xe=xe.parentNode}xe=void 0}xe=pM(xe)}}function yM(j,Q){return j&&Q?j===Q?!0:j&&j.nodeType===3?!1:Q&&Q.nodeType===3?yM(j,Q.parentNode):"contains"in j?j.contains(Q):j.compareDocumentPosition?!!(j.compareDocumentPosition(Q)&16):!1:!1}function gM(j){j=j!=null&&j.ownerDocument!=null&&j.ownerDocument.defaultView!=null?j.ownerDocument.defaultView:window;for(var Q=F0(j.document);Q instanceof j.HTMLIFrameElement;){try{var xe=typeof Q.contentWindow.location.href=="string"}catch{xe=!1}if(xe)j=Q.contentWindow;else break;Q=F0(j.document)}return Q}function j1(j){var Q=j&&j.nodeName&&j.nodeName.toLowerCase();return Q&&(Q==="input"&&(j.type==="text"||j.type==="search"||j.type==="tel"||j.type==="url"||j.type==="password")||Q==="textarea"||j.contentEditable==="true")}var RL=n0&&"documentMode"in document&&11>=document.documentMode,U1=null,Bw=null,Sy=null,Ey=!1;function a0(j,Q,xe){var Ue=xe.window===xe?xe.document:xe.nodeType===9?xe:xe.ownerDocument;Ey||U1==null||U1!==F0(Ue)||(Ue=U1,"selectionStart"in Ue&&j1(Ue)?Ue={start:Ue.selectionStart,end:Ue.selectionEnd}:(Ue=(Ue.ownerDocument&&Ue.ownerDocument.defaultView||window).getSelection(),Ue={anchorNode:Ue.anchorNode,anchorOffset:Ue.anchorOffset,focusNode:Ue.focusNode,focusOffset:Ue.focusOffset}),Sy&&Mx(Sy,Ue)||(Sy=Ue,Ue=db(Bw,"onSelect"),0<Ue.length&&(Q=new _v("onSelect","select",null,Q,xe),j.push({event:Q,listeners:Ue}),Q.target=U1)))}function jv(j,Q){var xe={};return xe[j.toLowerCase()]=Q.toLowerCase(),xe["Webkit"+j]="webkit"+Q,xe["Moz"+j]="moz"+Q,xe}var Jc={animationend:jv("Animation","AnimationEnd"),animationiteration:jv("Animation","AnimationIteration"),animationstart:jv("Animation","AnimationStart"),transitionrun:jv("Transition","TransitionRun"),transitionstart:jv("Transition","TransitionStart"),transitioncancel:jv("Transition","TransitionCancel"),transitionend:jv("Transition","TransitionEnd")},jw={},_M={};n0&&(_M=document.createElement("div").style,"AnimationEvent"in window||(delete Jc.animationend.animation,delete Jc.animationiteration.animation,delete Jc.animationstart.animation),"TransitionEvent"in window||delete Jc.transitionend.transition);function Cg(j){if(jw[j])return jw[j];if(!Jc[j])return j;var Q=Jc[j],xe;for(xe in Q)if(Q.hasOwnProperty(xe)&&xe in _M)return jw[j]=Q[xe];return j}var Cx=Cg("animationend"),fh=Cg("animationiteration"),vA=Cg("animationstart"),xM=Cg("transitionrun"),IL=Cg("transitionstart"),DL=Cg("transitioncancel"),bM=Cg("transitionend"),Uw=new Map,i0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");i0.push("scrollEnd");function Hp(j,Q){Uw.set(j,Q),z0(Q,[j])}var q1=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Gp=[],V1=0,pA=0;function kx(){for(var j=V1,Q=pA=V1=0;Q<j;){var xe=Gp[Q];Gp[Q++]=null;var Ue=Gp[Q];Gp[Q++]=null;var xt=Gp[Q];Gp[Q++]=null;var Bt=Gp[Q];if(Gp[Q++]=null,Ue!==null&&xt!==null){var Gr=Ue.pending;Gr===null?xt.next=xt:(xt.next=Gr.next,Gr.next=xt),Ue.pending=xt}Bt!==0&&Rm(xe,xt,Bt)}}function qw(j,Q,xe,Ue){Gp[V1++]=j,Gp[V1++]=Q,Gp[V1++]=xe,Gp[V1++]=Ue,pA|=Ue,j.lanes|=Ue,j=j.alternate,j!==null&&(j.lanes|=Ue)}function mA(j,Q,xe,Ue){return qw(j,Q,xe,Ue),Vw(j)}function Lm(j,Q){return qw(j,null,null,Q),Vw(j)}function Rm(j,Q,xe){j.lanes|=xe;var Ue=j.alternate;Ue!==null&&(Ue.lanes|=xe);for(var xt=!1,Bt=j.return;Bt!==null;)Bt.childLanes|=xe,Ue=Bt.alternate,Ue!==null&&(Ue.childLanes|=xe),Bt.tag===22&&(j=Bt.stateNode,j===null||j._visibility&1||(xt=!0)),j=Bt,Bt=Bt.return;return j.tag===3?(Bt=j.stateNode,xt&&Q!==null&&(xt=31-xd(xe),j=Bt.hiddenUpdates,Ue=j[xt],Ue===null?j[xt]=[Q]:Ue.push(Q),Q.lane=xe|536870912),Bt):null}function Vw(j){if(50<u_)throw u_=0,ab=null,Error(L(185));for(var Q=j.return;Q!==null;)j=Q,Q=j.return;return j.tag===3?j.stateNode:null}var xv={};function Im(j,Q,xe,Ue){this.tag=j,this.key=xe,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=Q,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=Ue,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bv(j,Q,xe,Ue){return new Im(j,Q,xe,Ue)}function Xp(j){return j=j.prototype,!(!j||!j.isReactComponent)}function ov(j,Q){var xe=j.alternate;return xe===null?(xe=bv(j.tag,Q,j.key,j.mode),xe.elementType=j.elementType,xe.type=j.type,xe.stateNode=j.stateNode,xe.alternate=j,j.alternate=xe):(xe.pendingProps=Q,xe.type=j.type,xe.flags=0,xe.subtreeFlags=0,xe.deletions=null),xe.flags=j.flags&65011712,xe.childLanes=j.childLanes,xe.lanes=j.lanes,xe.child=j.child,xe.memoizedProps=j.memoizedProps,xe.memoizedState=j.memoizedState,xe.updateQueue=j.updateQueue,Q=j.dependencies,xe.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext},xe.sibling=j.sibling,xe.index=j.index,xe.ref=j.ref,xe.refCleanup=j.refCleanup,xe}function wM(j,Q){j.flags&=65011714;var xe=j.alternate;return xe===null?(j.childLanes=0,j.lanes=Q,j.child=null,j.subtreeFlags=0,j.memoizedProps=null,j.memoizedState=null,j.updateQueue=null,j.dependencies=null,j.stateNode=null):(j.childLanes=xe.childLanes,j.lanes=xe.lanes,j.child=xe.child,j.subtreeFlags=0,j.deletions=null,j.memoizedProps=xe.memoizedProps,j.memoizedState=xe.memoizedState,j.updateQueue=xe.updateQueue,j.type=xe.type,Q=xe.dependencies,j.dependencies=Q===null?null:{lanes:Q.lanes,firstContext:Q.firstContext}),j}function j0(j,Q,xe,Ue,xt,Bt){var Gr=0;if(Ue=j,typeof j=="function")Xp(j)&&(Gr=1);else if(typeof j=="string")Gr=iR(j,xe,so.current)?26:j==="html"||j==="head"||j==="body"?27:5;else e:switch(j){case xn:return j=bv(31,xe,Q,xt),j.elementType=xn,j.lanes=Bt,j;case sr:return My(xe.children,xt,Bt,Q);case nr:Gr=8,xt|=24;break;case jr:return j=bv(12,xe,Q,xt|2),j.elementType=jr,j.lanes=Bt,j;case Lr:return j=bv(13,xe,Q,xt),j.elementType=Lr,j.lanes=Bt,j;case $r:return j=bv(19,xe,Q,xt),j.elementType=$r,j.lanes=Bt,j;default:if(typeof j=="object"&&j!==null)switch(j.$$typeof){case an:Gr=10;break e;case Ne:Gr=9;break e;case yn:Gr=11;break e;case dn:Gr=14;break e;case Jn:Gr=16,Ue=null;break e}Gr=29,xe=Error(L(130,j===null?"null":typeof j,"")),Ue=null}return Q=bv(Gr,xe,Q,xt),Q.elementType=j,Q.type=Ue,Q.lanes=Bt,Q}function My(j,Q,xe,Ue){return j=bv(7,j,Ue,Q),j.lanes=xe,j}function yA(j,Q,xe){return j=bv(6,j,null,Q),j.lanes=xe,j}function Dm(j){var Q=bv(18,null,null,0);return Q.stateNode=j,Q}function Wp(j,Q,xe){return Q=bv(4,j.children!==null?j.children:[],j.key,Q),Q.lanes=xe,Q.stateNode={containerInfo:j.containerInfo,pendingChildren:null,implementation:j.implementation},Q}var o0=new WeakMap;function Vh(j,Q){if(typeof j=="object"&&j!==null){var xe=o0.get(j);return xe!==void 0?xe:(Q={value:j,source:Q,stack:gd(Q)},o0.set(j,Q),Q)}return{value:j,source:Q,stack:gd(Q)}}var Uv=[],H1=0,U0=null,Px=0,Yp=[],Zp=0,om=null,ah=1,sm="";function Hh(j,Q){Uv[H1++]=Px,Uv[H1++]=U0,U0=j,Px=Q}function G1(j,Q,xe){Yp[Zp++]=ah,Yp[Zp++]=sm,Yp[Zp++]=om,om=j;var Ue=ah;j=sm;var xt=32-xd(Ue)-1;Ue&=~(1<<xt),xe+=1;var Bt=32-xd(Q)+xt;if(30<Bt){var Gr=xt-xt%5;Bt=(Ue&(1<<Gr)-1).toString(32),Ue>>=Gr,xt-=Gr,ah=1<<32-xd(Q)+xt|xe<<xt|Ue,sm=Bt+j}else ah=1<<Bt|xe<<xt|Ue,sm=j}function kg(j){j.return!==null&&(Hh(j,1),G1(j,1,0))}function Pg(j){for(;j===U0;)U0=Uv[--H1],Uv[H1]=null,Px=Uv[--H1],Uv[H1]=null;for(;j===om;)om=Yp[--Zp],Yp[Zp]=null,sm=Yp[--Zp],Yp[Zp]=null,ah=Yp[--Zp],Yp[Zp]=null}function TM(j,Q){Yp[Zp++]=ah,Yp[Zp++]=sm,Yp[Zp++]=om,ah=Q.id,sm=Q.overflow,om=j}var sv=null,Gf=null,Ku=!1,Om=null,hp=!1,gA=Error(L(519));function Cy(j){var Q=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw W1(Vh(Q,j)),gA}function Lh(j){var Q=j.stateNode,xe=j.type,Ue=j.memoizedProps;switch(Q[Il]=j,Q[Fv]=Ue,xe){case"dialog":Ju("cancel",Q),Ju("close",Q);break;case"iframe":case"object":case"embed":Ju("load",Q);break;case"video":case"audio":for(xe=0;xe<fb.length;xe++)Ju(fb[xe],Q);break;case"source":Ju("error",Q);break;case"img":case"image":case"link":Ju("error",Q),Ju("load",Q);break;case"details":Ju("toggle",Q);break;case"input":Ju("invalid",Q),B1(Q,Ue.value,Ue.defaultValue,Ue.checked,Ue.defaultChecked,Ue.type,Ue.name,!0);break;case"select":Ju("invalid",Q);break;case"textarea":Ju("invalid",Q),_y(Q,Ue.value,Ue.defaultValue,Ue.children)}xe=Ue.children,typeof xe!="string"&&typeof xe!="number"&&typeof xe!="bigint"||Q.textContent===""+xe||Ue.suppressHydrationWarning===!0||H2(Q.textContent,xe)?(Ue.popover!=null&&(Ju("beforetoggle",Q),Ju("toggle",Q)),Ue.onScroll!=null&&Ju("scroll",Q),Ue.onScrollEnd!=null&&Ju("scrollend",Q),Ue.onClick!=null&&(Q.onclick=bc),Q=!0):Q=!1,Q||Cy(j,!0)}function AM(j){for(sv=j.return;sv;)switch(sv.tag){case 5:case 31:case 13:hp=!1;return;case 27:case 3:hp=!0;return;default:sv=sv.return}}function X1(j){if(j!==sv)return!1;if(!Ku)return AM(j),Ku=!0,!1;var Q=j.tag,xe;if((xe=Q!==3&&Q!==27)&&((xe=Q===5)&&(xe=j.type,xe=!(xe!=="form"&&xe!=="button")||X2(j.type,j.memoizedProps)),xe=!xe),xe&&Gf&&Cy(j),AM(j),Q===13){if(j=j.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(317));Gf=zS(j)}else if(Q===31){if(j=j.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(317));Gf=zS(j)}else Q===27?(Q=Gf,p0(j.type)?(j=Um,Um=null,Gf=j):Gf=Q):Gf=sv?bp(j.stateNode.nextSibling):null;return!0}function q0(){Gf=sv=null,Ku=!1}function _A(){var j=Om;return j!==null&&(gp===null?gp=j:gp.push.apply(gp,j),Om=null),j}function W1(j){Om===null?Om=[j]:Om.push(j)}var xA=ma(null),Lg=null,V0=null;function ky(j,Q,xe){Li(xA,Q._currentValue),Q._currentValue=xe}function zm(j){j._currentValue=xA.current,_a(xA)}function bA(j,Q,xe){for(;j!==null;){var Ue=j.alternate;if((j.childLanes&Q)!==Q?(j.childLanes|=Q,Ue!==null&&(Ue.childLanes|=Q)):Ue!==null&&(Ue.childLanes&Q)!==Q&&(Ue.childLanes|=Q),j===xe)break;j=j.return}}function wA(j,Q,xe,Ue){var xt=j.child;for(xt!==null&&(xt.return=j);xt!==null;){var Bt=xt.dependencies;if(Bt!==null){var Gr=xt.child;Bt=Bt.firstContext;e:for(;Bt!==null;){var Nn=Bt;Bt=xt;for(var Wa=0;Wa<Q.length;Wa++)if(Nn.context===Q[Wa]){Bt.lanes|=xe,Nn=Bt.alternate,Nn!==null&&(Nn.lanes|=xe),bA(Bt.return,xe,j),Ue||(Gr=null);break e}Bt=Nn.next}}else if(xt.tag===18){if(Gr=xt.return,Gr===null)throw Error(L(341));Gr.lanes|=xe,Bt=Gr.alternate,Bt!==null&&(Bt.lanes|=xe),bA(Gr,xe,j),Gr=null}else Gr=xt.child;if(Gr!==null)Gr.return=xt;else for(Gr=xt;Gr!==null;){if(Gr===j){Gr=null;break}if(xt=Gr.sibling,xt!==null){xt.return=Gr.return,Gr=xt;break}Gr=Gr.return}xt=Gr}}function Rg(j,Q,xe,Ue){j=null;for(var xt=Q,Bt=!1;xt!==null;){if(!Bt){if((xt.flags&524288)!==0)Bt=!0;else if((xt.flags&262144)!==0)break}if(xt.tag===10){var Gr=xt.alternate;if(Gr===null)throw Error(L(387));if(Gr=Gr.memoizedProps,Gr!==null){var Nn=xt.type;Vp(xt.pendingProps.value,Gr.value)||(j!==null?j.push(Nn):j=[Nn])}}else if(xt===$o.current){if(Gr=xt.alternate,Gr===null)throw Error(L(387));Gr.memoizedState.memoizedState!==xt.memoizedState.memoizedState&&(j!==null?j.push(S_):j=[S_])}xt=xt.return}j!==null&&wA(Q,j,xe,Ue),Q.flags|=262144}function Hw(j){for(j=j.firstContext;j!==null;){if(!Vp(j.context._currentValue,j.memoizedValue))return!0;j=j.next}return!1}function Ig(j){Lg=j,V0=null,j=j.dependencies,j!==null&&(j.firstContext=null)}function lv(j){return SM(Lg,j)}function Gw(j,Q){return Lg===null&&Ig(j),SM(j,Q)}function SM(j,Q){var xe=Q._currentValue;if(Q={context:Q,memoizedValue:xe,next:null},V0===null){if(j===null)throw Error(L(308));V0=Q,j.dependencies={lanes:0,firstContext:Q},j.flags|=524288}else V0=V0.next=Q;return xe}var OL=typeof AbortController<"u"?AbortController:function(){var j=[],Q=this.signal={aborted:!1,addEventListener:function(xe,Ue){j.push(Ue)}};this.abort=function(){Q.aborted=!0,j.forEach(function(xe){return xe()})}},zL=e.unstable_scheduleCallback,EM=e.unstable_NormalPriority,Td={$$typeof:an,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function TA(){return{controller:new OL,data:new Map,refCount:0}}function Lx(j){j.refCount--,j.refCount===0&&zL(EM,function(){j.controller.abort()})}var Rx=null,Ix=0,Dg=0,Y1=null;function NL(j,Q){if(Rx===null){var xe=Rx=[];Ix=0,Dg=m_(),Y1={status:"pending",value:void 0,then:function(Ue){xe.push(Ue)}}}return Ix++,Q.then(MM,MM),Q}function MM(){if(--Ix===0&&Rx!==null){Y1!==null&&(Y1.status="fulfilled");var j=Rx;Rx=null,Dg=0,Y1=null;for(var Q=0;Q<j.length;Q++)(0,j[Q])()}}function FL(j,Q){var xe=[],Ue={status:"pending",value:null,reason:null,then:function(xt){xe.push(xt)}};return j.then(function(){Ue.status="fulfilled",Ue.value=Q;for(var xt=0;xt<xe.length;xt++)(0,xe[xt])(Q)},function(xt){for(Ue.status="rejected",Ue.reason=xt,xt=0;xt<xe.length;xt++)(0,xe[xt])(void 0)}),Ue}var Dx=pa.S;pa.S=function(j,Q){SC=nv(),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&NL(j,Q),Dx!==null&&Dx(j,Q)};var Py=ma(null);function AA(){var j=Py.current;return j!==null?j:Xf.pooledCache}function Xw(j,Q){Q===null?Li(Py,Py.current):Li(Py,Q.pool)}function CM(){var j=AA();return j===null?null:{parent:Td._currentValue,pool:j}}var Ly=Error(L(460)),Ww=Error(L(474)),Z1=Error(L(542)),Yw={then:function(){}};function kM(j){return j=j.status,j==="fulfilled"||j==="rejected"}function PM(j,Q,xe){switch(xe=j[xe],xe===void 0?j.push(Q):xe!==Q&&(Q.then(bc,bc),Q=xe),Q.status){case"fulfilled":return Q.value;case"rejected":throw j=Q.reason,SA(j),j;default:if(typeof Q.status=="string")Q.then(bc,bc);else{if(j=Xf,j!==null&&100<j.shellSuspendCounter)throw Error(L(482));j=Q,j.status="pending",j.then(function(Ue){if(Q.status==="pending"){var xt=Q;xt.status="fulfilled",xt.value=Ue}},function(Ue){if(Q.status==="pending"){var xt=Q;xt.status="rejected",xt.reason=Ue}})}switch(Q.status){case"fulfilled":return Q.value;case"rejected":throw j=Q.reason,SA(j),j}throw zg=Q,Ly}}function Og(j){try{var Q=j._init;return Q(j._payload)}catch(xe){throw xe!==null&&typeof xe=="object"&&typeof xe.then=="function"?(zg=xe,Ly):xe}}var zg=null;function Zw(){if(zg===null)throw Error(L(459));var j=zg;return zg=null,j}function SA(j){if(j===Ly||j===Z1)throw Error(L(483))}var $1=null,Ox=0;function $w(j){var Q=Ox;return Ox+=1,$1===null&&($1=[]),PM($1,j,Q)}function zx(j,Q){Q=Q.props.ref,j.ref=Q!==void 0?Q:null}function Oc(j,Q){throw Q.$$typeof===Gt?Error(L(525)):(j=Object.prototype.toString.call(Q),Error(L(31,j==="[object Object]"?"object with keys {"+Object.keys(Q).join(", ")+"}":j)))}function EA(j){function Q(Ci,hi){if(j){var Ui=Ci.deletions;Ui===null?(Ci.deletions=[hi],Ci.flags|=16):Ui.push(hi)}}function xe(Ci,hi){if(!j)return null;for(;hi!==null;)Q(Ci,hi),hi=hi.sibling;return null}function Ue(Ci){for(var hi=new Map;Ci!==null;)Ci.key!==null?hi.set(Ci.key,Ci):hi.set(Ci.index,Ci),Ci=Ci.sibling;return hi}function xt(Ci,hi){return Ci=ov(Ci,hi),Ci.index=0,Ci.sibling=null,Ci}function Bt(Ci,hi,Ui){return Ci.index=Ui,j?(Ui=Ci.alternate,Ui!==null?(Ui=Ui.index,Ui<hi?(Ci.flags|=67108866,hi):Ui):(Ci.flags|=67108866,hi)):(Ci.flags|=1048576,hi)}function Gr(Ci){return j&&Ci.alternate===null&&(Ci.flags|=67108866),Ci}function Nn(Ci,hi,Ui,bo){return hi===null||hi.tag!==6?(hi=yA(Ui,Ci.mode,bo),hi.return=Ci,hi):(hi=xt(hi,Ui),hi.return=Ci,hi)}function Wa(Ci,hi,Ui,bo){var kl=Ui.type;return kl===sr?xo(Ci,hi,Ui.props.children,bo,Ui.key):hi!==null&&(hi.elementType===kl||typeof kl=="object"&&kl!==null&&kl.$$typeof===Jn&&Og(kl)===hi.type)?(hi=xt(hi,Ui.props),zx(hi,Ui),hi.return=Ci,hi):(hi=j0(Ui.type,Ui.key,Ui.props,null,Ci.mode,bo),zx(hi,Ui),hi.return=Ci,hi)}function Hi(Ci,hi,Ui,bo){return hi===null||hi.tag!==4||hi.stateNode.containerInfo!==Ui.containerInfo||hi.stateNode.implementation!==Ui.implementation?(hi=Wp(Ui,Ci.mode,bo),hi.return=Ci,hi):(hi=xt(hi,Ui.children||[]),hi.return=Ci,hi)}function xo(Ci,hi,Ui,bo,kl){return hi===null||hi.tag!==7?(hi=My(Ui,Ci.mode,bo,kl),hi.return=Ci,hi):(hi=xt(hi,Ui),hi.return=Ci,hi)}function Mo(Ci,hi,Ui){if(typeof hi=="string"&&hi!==""||typeof hi=="number"||typeof hi=="bigint")return hi=yA(""+hi,Ci.mode,Ui),hi.return=Ci,hi;if(typeof hi=="object"&&hi!==null){switch(hi.$$typeof){case $t:return Ui=j0(hi.type,hi.key,hi.props,null,Ci.mode,Ui),zx(Ui,hi),Ui.return=Ci,Ui;case gr:return hi=Wp(hi,Ci.mode,Ui),hi.return=Ci,hi;case Jn:return hi=Og(hi),Mo(Ci,hi,Ui)}if(ja(hi)||ta(hi))return hi=My(hi,Ci.mode,Ui,null),hi.return=Ci,hi;if(typeof hi.then=="function")return Mo(Ci,$w(hi),Ui);if(hi.$$typeof===an)return Mo(Ci,Gw(Ci,hi),Ui);Oc(Ci,hi)}return null}function Zi(Ci,hi,Ui,bo){var kl=hi!==null?hi.key:null;if(typeof Ui=="string"&&Ui!==""||typeof Ui=="number"||typeof Ui=="bigint")return kl!==null?null:Nn(Ci,hi,""+Ui,bo);if(typeof Ui=="object"&&Ui!==null){switch(Ui.$$typeof){case $t:return Ui.key===kl?Wa(Ci,hi,Ui,bo):null;case gr:return Ui.key===kl?Hi(Ci,hi,Ui,bo):null;case Jn:return Ui=Og(Ui),Zi(Ci,hi,Ui,bo)}if(ja(Ui)||ta(Ui))return kl!==null?null:xo(Ci,hi,Ui,bo,null);if(typeof Ui.then=="function")return Zi(Ci,hi,$w(Ui),bo);if(Ui.$$typeof===an)return Zi(Ci,hi,Gw(Ci,Ui),bo);Oc(Ci,Ui)}return null}function ro(Ci,hi,Ui,bo,kl){if(typeof bo=="string"&&bo!==""||typeof bo=="number"||typeof bo=="bigint")return Ci=Ci.get(Ui)||null,Nn(hi,Ci,""+bo,kl);if(typeof bo=="object"&&bo!==null){switch(bo.$$typeof){case $t:return Ci=Ci.get(bo.key===null?Ui:bo.key)||null,Wa(hi,Ci,bo,kl);case gr:return Ci=Ci.get(bo.key===null?Ui:bo.key)||null,Hi(hi,Ci,bo,kl);case Jn:return bo=Og(bo),ro(Ci,hi,Ui,bo,kl)}if(ja(bo)||ta(bo))return Ci=Ci.get(Ui)||null,xo(hi,Ci,bo,kl,null);if(typeof bo.then=="function")return ro(Ci,hi,Ui,$w(bo),kl);if(bo.$$typeof===an)return ro(Ci,hi,Ui,Gw(hi,bo),kl);Oc(hi,bo)}return null}function al(Ci,hi,Ui,bo){for(var kl=null,Mc=null,Zs=hi,Au=hi=0,ec=null;Zs!==null&&Au<Ui.length;Au++){Zs.index>Au?(ec=Zs,Zs=null):ec=Zs.sibling;var Bc=Zi(Ci,Zs,Ui[Au],bo);if(Bc===null){Zs===null&&(Zs=ec);break}j&&Zs&&Bc.alternate===null&&Q(Ci,Zs),hi=Bt(Bc,hi,Au),Mc===null?kl=Bc:Mc.sibling=Bc,Mc=Bc,Zs=ec}if(Au===Ui.length)return xe(Ci,Zs),Ku&&Hh(Ci,Au),kl;if(Zs===null){for(;Au<Ui.length;Au++)Zs=Mo(Ci,Ui[Au],bo),Zs!==null&&(hi=Bt(Zs,hi,Au),Mc===null?kl=Zs:Mc.sibling=Zs,Mc=Zs);return Ku&&Hh(Ci,Au),kl}for(Zs=Ue(Zs);Au<Ui.length;Au++)ec=ro(Zs,Ci,Au,Ui[Au],bo),ec!==null&&(j&&ec.alternate!==null&&Zs.delete(ec.key===null?Au:ec.key),hi=Bt(ec,hi,Au),Mc===null?kl=ec:Mc.sibling=ec,Mc=ec);return j&&Zs.forEach(function(Jy){return Q(Ci,Jy)}),Ku&&Hh(Ci,Au),kl}function Wl(Ci,hi,Ui,bo){if(Ui==null)throw Error(L(151));for(var kl=null,Mc=null,Zs=hi,Au=hi=0,ec=null,Bc=Ui.next();Zs!==null&&!Bc.done;Au++,Bc=Ui.next()){Zs.index>Au?(ec=Zs,Zs=null):ec=Zs.sibling;var Jy=Zi(Ci,Zs,Bc.value,bo);if(Jy===null){Zs===null&&(Zs=ec);break}j&&Zs&&Jy.alternate===null&&Q(Ci,Zs),hi=Bt(Jy,hi,Au),Mc===null?kl=Jy:Mc.sibling=Jy,Mc=Jy,Zs=ec}if(Bc.done)return xe(Ci,Zs),Ku&&Hh(Ci,Au),kl;if(Zs===null){for(;!Bc.done;Au++,Bc=Ui.next())Bc=Mo(Ci,Bc.value,bo),Bc!==null&&(hi=Bt(Bc,hi,Au),Mc===null?kl=Bc:Mc.sibling=Bc,Mc=Bc);return Ku&&Hh(Ci,Au),kl}for(Zs=Ue(Zs);!Bc.done;Au++,Bc=Ui.next())Bc=ro(Zs,Ci,Au,Bc.value,bo),Bc!==null&&(j&&Bc.alternate!==null&&Zs.delete(Bc.key===null?Au:Bc.key),hi=Bt(Bc,hi,Au),Mc===null?kl=Bc:Mc.sibling=Bc,Mc=Bc);return j&&Zs.forEach(function(lR){return Q(Ci,lR)}),Ku&&Hh(Ci,Au),kl}function If(Ci,hi,Ui,bo){if(typeof Ui=="object"&&Ui!==null&&Ui.type===sr&&Ui.key===null&&(Ui=Ui.props.children),typeof Ui=="object"&&Ui!==null){switch(Ui.$$typeof){case $t:e:{for(var kl=Ui.key;hi!==null;){if(hi.key===kl){if(kl=Ui.type,kl===sr){if(hi.tag===7){xe(Ci,hi.sibling),bo=xt(hi,Ui.props.children),bo.return=Ci,Ci=bo;break e}}else if(hi.elementType===kl||typeof kl=="object"&&kl!==null&&kl.$$typeof===Jn&&Og(kl)===hi.type){xe(Ci,hi.sibling),bo=xt(hi,Ui.props),zx(bo,Ui),bo.return=Ci,Ci=bo;break e}xe(Ci,hi);break}else Q(Ci,hi);hi=hi.sibling}Ui.type===sr?(bo=My(Ui.props.children,Ci.mode,bo,Ui.key),bo.return=Ci,Ci=bo):(bo=j0(Ui.type,Ui.key,Ui.props,null,Ci.mode,bo),zx(bo,Ui),bo.return=Ci,Ci=bo)}return Gr(Ci);case gr:e:{for(kl=Ui.key;hi!==null;){if(hi.key===kl)if(hi.tag===4&&hi.stateNode.containerInfo===Ui.containerInfo&&hi.stateNode.implementation===Ui.implementation){xe(Ci,hi.sibling),bo=xt(hi,Ui.children||[]),bo.return=Ci,Ci=bo;break e}else{xe(Ci,hi);break}else Q(Ci,hi);hi=hi.sibling}bo=Wp(Ui,Ci.mode,bo),bo.return=Ci,Ci=bo}return Gr(Ci);case Jn:return Ui=Og(Ui),If(Ci,hi,Ui,bo)}if(ja(Ui))return al(Ci,hi,Ui,bo);if(ta(Ui)){if(kl=ta(Ui),typeof kl!="function")throw Error(L(150));return Ui=kl.call(Ui),Wl(Ci,hi,Ui,bo)}if(typeof Ui.then=="function")return If(Ci,hi,$w(Ui),bo);if(Ui.$$typeof===an)return If(Ci,hi,Gw(Ci,Ui),bo);Oc(Ci,Ui)}return typeof Ui=="string"&&Ui!==""||typeof Ui=="number"||typeof Ui=="bigint"?(Ui=""+Ui,hi!==null&&hi.tag===6?(xe(Ci,hi.sibling),bo=xt(hi,Ui),bo.return=Ci,Ci=bo):(xe(Ci,hi),bo=yA(Ui,Ci.mode,bo),bo.return=Ci,Ci=bo),Gr(Ci)):xe(Ci,hi)}return function(Ci,hi,Ui,bo){try{Ox=0;var kl=If(Ci,hi,Ui,bo);return $1=null,kl}catch(Zs){if(Zs===Ly||Zs===Z1)throw Zs;var Mc=bv(29,Zs,null,Ci.mode);return Mc.lanes=bo,Mc.return=Ci,Mc}finally{}}}var Ry=EA(!0),LM=EA(!1),H0=!1;function MA(j){j.updateQueue={baseState:j.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function CA(j,Q){j=j.updateQueue,Q.updateQueue===j&&(Q.updateQueue={baseState:j.baseState,firstBaseUpdate:j.firstBaseUpdate,lastBaseUpdate:j.lastBaseUpdate,shared:j.shared,callbacks:null})}function Iy(j){return{lane:j,tag:0,payload:null,callback:null,next:null}}function Dy(j,Q,xe){var Ue=j.updateQueue;if(Ue===null)return null;if(Ue=Ue.shared,(Nc&2)!==0){var xt=Ue.pending;return xt===null?Q.next=Q:(Q.next=xt.next,xt.next=Q),Ue.pending=Q,Q=Vw(j),Rm(j,null,xe),Q}return qw(j,Ue,Q,xe),Vw(j)}function Nx(j,Q,xe){if(Q=Q.updateQueue,Q!==null&&(Q=Q.shared,(xe&4194048)!==0)){var Ue=Q.lanes;Ue&=j.pendingLanes,xe|=Ue,Q.lanes=xe,tp(j,xe)}}function kA(j,Q){var xe=j.updateQueue,Ue=j.alternate;if(Ue!==null&&(Ue=Ue.updateQueue,xe===Ue)){var xt=null,Bt=null;if(xe=xe.firstBaseUpdate,xe!==null){do{var Gr={lane:xe.lane,tag:xe.tag,payload:xe.payload,callback:null,next:null};Bt===null?xt=Bt=Gr:Bt=Bt.next=Gr,xe=xe.next}while(xe!==null);Bt===null?xt=Bt=Q:Bt=Bt.next=Q}else xt=Bt=Q;xe={baseState:Ue.baseState,firstBaseUpdate:xt,lastBaseUpdate:Bt,shared:Ue.shared,callbacks:Ue.callbacks},j.updateQueue=xe;return}j=xe.lastBaseUpdate,j===null?xe.firstBaseUpdate=Q:j.next=Q,xe.lastBaseUpdate=Q}var PA=!1;function Fx(){if(PA){var j=Y1;if(j!==null)throw j}}function Bx(j,Q,xe,Ue){PA=!1;var xt=j.updateQueue;H0=!1;var Bt=xt.firstBaseUpdate,Gr=xt.lastBaseUpdate,Nn=xt.shared.pending;if(Nn!==null){xt.shared.pending=null;var Wa=Nn,Hi=Wa.next;Wa.next=null,Gr===null?Bt=Hi:Gr.next=Hi,Gr=Wa;var xo=j.alternate;xo!==null&&(xo=xo.updateQueue,Nn=xo.lastBaseUpdate,Nn!==Gr&&(Nn===null?xo.firstBaseUpdate=Hi:Nn.next=Hi,xo.lastBaseUpdate=Wa))}if(Bt!==null){var Mo=xt.baseState;Gr=0,xo=Hi=Wa=null,Nn=Bt;do{var Zi=Nn.lane&-536870913,ro=Zi!==Nn.lane;if(ro?(fc&Zi)===Zi:(Ue&Zi)===Zi){Zi!==0&&Zi===Dg&&(PA=!0),xo!==null&&(xo=xo.next={lane:0,tag:Nn.tag,payload:Nn.payload,callback:null,next:null});e:{var al=j,Wl=Nn;Zi=Q;var If=xe;switch(Wl.tag){case 1:if(al=Wl.payload,typeof al=="function"){Mo=al.call(If,Mo,Zi);break e}Mo=al;break e;case 3:al.flags=al.flags&-65537|128;case 0:if(al=Wl.payload,Zi=typeof al=="function"?al.call(If,Mo,Zi):al,Zi==null)break e;Mo=yt({},Mo,Zi);break e;case 2:H0=!0}}Zi=Nn.callback,Zi!==null&&(j.flags|=64,ro&&(j.flags|=8192),ro=xt.callbacks,ro===null?xt.callbacks=[Zi]:ro.push(Zi))}else ro={lane:Zi,tag:Nn.tag,payload:Nn.payload,callback:Nn.callback,next:null},xo===null?(Hi=xo=ro,Wa=Mo):xo=xo.next=ro,Gr|=Zi;if(Nn=Nn.next,Nn===null){if(Nn=xt.shared.pending,Nn===null)break;ro=Nn,Nn=ro.next,ro.next=null,xt.lastBaseUpdate=ro,xt.shared.pending=null}}while(!0);xo===null&&(Wa=Mo),xt.baseState=Wa,xt.firstBaseUpdate=Hi,xt.lastBaseUpdate=xo,Bt===null&&(xt.shared.lanes=0),J0|=Gr,j.lanes=Gr,j.memoizedState=Mo}}function RM(j,Q){if(typeof j!="function")throw Error(L(191,j));j.call(Q)}function LA(j,Q){var xe=j.callbacks;if(xe!==null)for(j.callbacks=null,j=0;j<xe.length;j++)RM(xe[j],Q)}var K1=ma(null),Kw=ma(0);function IM(j,Q){j=f0,Li(Kw,j),Li(K1,Q),f0=j|Q.baseLanes}function RA(){Li(Kw,f0),Li(K1,K1.current)}function Oy(){f0=Kw.current,_a(K1),_a(Kw)}var rd=ma(null),dp=null;function s0(j){var Q=j.alternate;Li(mc,mc.current&1),Li(rd,j),dp===null&&(Q===null||K1.current!==null||Q.memoizedState!==null)&&(dp=j)}function vp(j){Li(mc,mc.current),Li(rd,j),dp===null&&(dp=j)}function IA(j){j.tag===22?(Li(mc,mc.current),Li(rd,j),dp===null&&(dp=j)):Nm()}function Nm(){Li(mc,mc.current),Li(rd,rd.current)}function $p(j){_a(rd),dp===j&&(dp=null),_a(mc)}var mc=ma(0);function J1(j){for(var Q=j;Q!==null;){if(Q.tag===13){var xe=Q.memoizedState;if(xe!==null&&(xe=xe.dehydrated,xe===null||pb(xe)||mb(xe)))return Q}else if(Q.tag===19&&(Q.memoizedProps.revealOrder==="forwards"||Q.memoizedProps.revealOrder==="backwards"||Q.memoizedProps.revealOrder==="unstable_legacy-backwards"||Q.memoizedProps.revealOrder==="together")){if((Q.flags&128)!==0)return Q}else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===j)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)return null;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}return null}var Fd=0,hu=null,zc=null,Ad=null,zy=!1,Q1=!1,Ng=!1,Fg=0,Ny=0,G0=null,DA=0;function Rh(){throw Error(L(321))}function jx(j,Q){if(Q===null)return!1;for(var xe=0;xe<Q.length&&xe<j.length;xe++)if(!Vp(j[xe],Q[xe]))return!1;return!0}function Ux(j,Q,xe,Ue,xt,Bt){return Fd=Bt,hu=Q,Q.memoizedState=null,Q.updateQueue=null,Q.lanes=0,pa.H=j===null||j.memoizedState===null?XA:WA,Ng=!1,Bt=xe(Ue,xt),Ng=!1,Q1&&(Bt=OA(Q,xe,Ue,xt)),Jw(j),Bt}function Jw(j){pa.H=Zx;var Q=zc!==null&&zc.next!==null;if(Fd=0,Ad=zc=hu=null,zy=!1,Ny=0,G0=null,Q)throw Error(L(300));j===null||nd||(j=j.dependencies,j!==null&&Hw(j)&&(nd=!0))}function OA(j,Q,xe,Ue){hu=j;var xt=0;do{if(Q1&&(G0=null),Ny=0,Q1=!1,25<=xt)throw Error(L(301));if(xt+=1,Ad=zc=null,j.updateQueue!=null){var Bt=j.updateQueue;Bt.lastEffect=null,Bt.events=null,Bt.stores=null,Bt.memoCache!=null&&(Bt.memoCache.index=0)}pa.H=WM,Bt=Q(xe,Ue)}while(Q1);return Bt}function BL(){var j=pa.H,Q=j.useState()[0];return Q=typeof Q.then=="function"?e_(Q):Q,j=j.useState()[0],(zc!==null?zc.memoizedState:null)!==j&&(hu.flags|=1024),Q}function Qw(){var j=Fg!==0;return Fg=0,j}function zA(j,Q,xe){Q.updateQueue=j.updateQueue,Q.flags&=-2053,j.lanes&=~xe}function NA(j){if(zy){for(j=j.memoizedState;j!==null;){var Q=j.queue;Q!==null&&(Q.pending=null),j=j.next}zy=!1}Fd=0,Ad=zc=hu=null,Q1=!1,Ny=Fg=0,G0=null}function Bd(){var j={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ad===null?hu.memoizedState=Ad=j:Ad=Ad.next=j,Ad}function Ih(){if(zc===null){var j=hu.alternate;j=j!==null?j.memoizedState:null}else j=zc.next;var Q=Ad===null?hu.memoizedState:Ad.next;if(Q!==null)Ad=Q,zc=j;else{if(j===null)throw hu.alternate===null?Error(L(467)):Error(L(310));zc=j,j={memoizedState:zc.memoizedState,baseState:zc.baseState,baseQueue:zc.baseQueue,queue:zc.queue,next:null},Ad===null?hu.memoizedState=Ad=j:Ad=Ad.next=j}return Ad}function Bg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function e_(j){var Q=Ny;return Ny+=1,G0===null&&(G0=[]),j=PM(G0,j,Q),Q=hu,(Ad===null?Q.memoizedState:Ad.next)===null&&(Q=Q.alternate,pa.H=Q===null||Q.memoizedState===null?XA:WA),j}function e2(j){if(j!==null&&typeof j=="object"){if(typeof j.then=="function")return e_(j);if(j.$$typeof===an)return lv(j)}throw Error(L(438,String(j)))}function t2(j){var Q=null,xe=hu.updateQueue;if(xe!==null&&(Q=xe.memoCache),Q==null){var Ue=hu.alternate;Ue!==null&&(Ue=Ue.updateQueue,Ue!==null&&(Ue=Ue.memoCache,Ue!=null&&(Q={data:Ue.data.map(function(xt){return xt.slice()}),index:0})))}if(Q==null&&(Q={data:[],index:0}),xe===null&&(xe=Bg(),hu.updateQueue=xe),xe.memoCache=Q,xe=Q.data[Q.index],xe===void 0)for(xe=Q.data[Q.index]=Array(j),Ue=0;Ue<j;Ue++)xe[Ue]=Na;return Q.index++,xe}function l0(j,Q){return typeof Q=="function"?Q(j):Q}function qx(j){var Q=Ih();return r2(Q,zc,j)}function r2(j,Q,xe){var Ue=j.queue;if(Ue===null)throw Error(L(311));Ue.lastRenderedReducer=xe;var xt=j.baseQueue,Bt=Ue.pending;if(Bt!==null){if(xt!==null){var Gr=xt.next;xt.next=Bt.next,Bt.next=Gr}Q.baseQueue=xt=Bt,Ue.pending=null}if(Bt=j.baseState,xt===null)j.memoizedState=Bt;else{Q=xt.next;var Nn=Gr=null,Wa=null,Hi=Q,xo=!1;do{var Mo=Hi.lane&-536870913;if(Mo!==Hi.lane?(fc&Mo)===Mo:(Fd&Mo)===Mo){var Zi=Hi.revertLane;if(Zi===0)Wa!==null&&(Wa=Wa.next={lane:0,revertLane:0,gesture:null,action:Hi.action,hasEagerState:Hi.hasEagerState,eagerState:Hi.eagerState,next:null}),Mo===Dg&&(xo=!0);else if((Fd&Zi)===Zi){Hi=Hi.next,Zi===Dg&&(xo=!0);continue}else Mo={lane:0,revertLane:Hi.revertLane,gesture:null,action:Hi.action,hasEagerState:Hi.hasEagerState,eagerState:Hi.eagerState,next:null},Wa===null?(Nn=Wa=Mo,Gr=Bt):Wa=Wa.next=Mo,hu.lanes|=Zi,J0|=Zi;Mo=Hi.action,Ng&&xe(Bt,Mo),Bt=Hi.hasEagerState?Hi.eagerState:xe(Bt,Mo)}else Zi={lane:Mo,revertLane:Hi.revertLane,gesture:Hi.gesture,action:Hi.action,hasEagerState:Hi.hasEagerState,eagerState:Hi.eagerState,next:null},Wa===null?(Nn=Wa=Zi,Gr=Bt):Wa=Wa.next=Zi,hu.lanes|=Mo,J0|=Mo;Hi=Hi.next}while(Hi!==null&&Hi!==Q);if(Wa===null?Gr=Bt:Wa.next=Nn,!Vp(Bt,j.memoizedState)&&(nd=!0,xo&&(xe=Y1,xe!==null)))throw xe;j.memoizedState=Bt,j.baseState=Gr,j.baseQueue=Wa,Ue.lastRenderedState=Bt}return xt===null&&(Ue.lanes=0),[j.memoizedState,Ue.dispatch]}function n2(j){var Q=Ih(),xe=Q.queue;if(xe===null)throw Error(L(311));xe.lastRenderedReducer=j;var Ue=xe.dispatch,xt=xe.pending,Bt=Q.memoizedState;if(xt!==null){xe.pending=null;var Gr=xt=xt.next;do Bt=j(Bt,Gr.action),Gr=Gr.next;while(Gr!==xt);Vp(Bt,Q.memoizedState)||(nd=!0),Q.memoizedState=Bt,Q.baseQueue===null&&(Q.baseState=Bt),xe.lastRenderedState=Bt}return[Bt,Ue]}function DM(j,Q,xe){var Ue=hu,xt=Ih(),Bt=Ku;if(Bt){if(xe===void 0)throw Error(L(407));xe=xe()}else xe=Q();var Gr=!Vp((zc||xt).memoizedState,xe);if(Gr&&(xt.memoizedState=xe,nd=!0),xt=xt.queue,m2(o2.bind(null,Ue,xt,j),[j]),xt.getSnapshot!==Q||Gr||Ad!==null&&Ad.memoizedState.tag&1){if(Ue.flags|=2048,t_(9,{destroy:void 0},i2.bind(null,Ue,xt,xe,Q),null),Xf===null)throw Error(L(349));Bt||(Fd&127)!==0||a2(Ue,Q,xe)}return xe}function a2(j,Q,xe){j.flags|=16384,j={getSnapshot:Q,value:xe},Q=hu.updateQueue,Q===null?(Q=Bg(),hu.updateQueue=Q,Q.stores=[j]):(xe=Q.stores,xe===null?Q.stores=[j]:xe.push(j))}function i2(j,Q,xe,Ue){Q.value=xe,Q.getSnapshot=Ue,s2(Q)&&FA(j)}function o2(j,Q,xe){return xe(function(){s2(Q)&&FA(j)})}function s2(j){var Q=j.getSnapshot;j=j.value;try{var xe=Q();return!Vp(j,xe)}catch{return!0}}function FA(j){var Q=Lm(j,2);Q!==null&&_p(Q,j,2)}function Vx(j){var Q=Bd();if(typeof j=="function"){var xe=j;if(j=xe(),Ng){Am(!0);try{xe()}finally{Am(!1)}}}return Q.memoizedState=Q.baseState=j,Q.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l0,lastRenderedState:j},Q}function l2(j,Q,xe,Ue){return j.baseState=xe,r2(j,zc,typeof Ue=="function"?Ue:l0)}function OM(j,Q,xe,Ue,xt){if(n_(j))throw Error(L(485));if(j=Q.action,j!==null){var Bt={payload:xt,action:j,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Gr){Bt.listeners.push(Gr)}};pa.T!==null?xe(!0):Bt.isTransition=!1,Ue(Bt),xe=Q.pending,xe===null?(Bt.next=Q.pending=Bt,u2(Q,Bt)):(Bt.next=xe.next,Q.pending=xe.next=Bt)}}function u2(j,Q){var xe=Q.action,Ue=Q.payload,xt=j.state;if(Q.isTransition){var Bt=pa.T,Gr={};pa.T=Gr;try{var Nn=xe(xt,Ue),Wa=pa.S;Wa!==null&&Wa(Gr,Nn),Fy(j,Q,Nn)}catch(Hi){Hx(j,Q,Hi)}finally{Bt!==null&&Gr.types!==null&&(Bt.types=Gr.types),pa.T=Bt}}else try{Bt=xe(xt,Ue),Fy(j,Q,Bt)}catch(Hi){Hx(j,Q,Hi)}}function Fy(j,Q,xe){xe!==null&&typeof xe=="object"&&typeof xe.then=="function"?xe.then(function(Ue){c2(j,Q,Ue)},function(Ue){return Hx(j,Q,Ue)}):c2(j,Q,xe)}function c2(j,Q,xe){Q.status="fulfilled",Q.value=xe,zM(Q),j.state=xe,Q=j.pending,Q!==null&&(xe=Q.next,xe===Q?j.pending=null:(xe=xe.next,Q.next=xe,u2(j,xe)))}function Hx(j,Q,xe){var Ue=j.pending;if(j.pending=null,Ue!==null){Ue=Ue.next;do Q.status="rejected",Q.reason=xe,zM(Q),Q=Q.next;while(Q!==Ue)}j.action=null}function zM(j){j=j.listeners;for(var Q=0;Q<j.length;Q++)(0,j[Q])()}function NM(j,Q){return Q}function BA(j,Q){if(Ku){var xe=Xf.formState;if(xe!==null){e:{var Ue=hu;if(Ku){if(Gf){t:{for(var xt=Gf,Bt=hp;xt.nodeType!==8;){if(!Bt){xt=null;break t}if(xt=bp(xt.nextSibling),xt===null){xt=null;break t}}Bt=xt.data,xt=Bt==="F!"||Bt==="F"?xt:null}if(xt){Gf=bp(xt.nextSibling),Ue=xt.data==="F!";break e}}Cy(Ue)}Ue=!1}Ue&&(Q=xe[0])}}return xe=Bd(),xe.memoizedState=xe.baseState=Q,Ue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:NM,lastRenderedState:Q},xe.queue=Ue,xe=T2.bind(null,hu,Ue),Ue.dispatch=xe,Ue=Vx(!1),Bt=Yx.bind(null,hu,!1,Ue.queue),Ue=Bd(),xt={state:Q,dispatch:null,action:j,pending:null},Ue.queue=xt,xe=OM.bind(null,hu,xt,Bt,xe),xt.dispatch=xe,Ue.memoizedState=j,[Q,xe,!1]}function FM(j){var Q=Ih();return f2(Q,zc,j)}function f2(j,Q,xe){if(Q=r2(j,Q,NM)[0],j=qx(l0)[0],typeof Q=="object"&&Q!==null&&typeof Q.then=="function")try{var Ue=e_(Q)}catch(Gr){throw Gr===Ly?Z1:Gr}else Ue=Q;Q=Ih();var xt=Q.queue,Bt=xt.dispatch;return xe!==Q.memoizedState&&(hu.flags|=2048,t_(9,{destroy:void 0},jL.bind(null,xt,xe),null)),[Ue,Bt,j]}function jL(j,Q){j.action=Q}function h2(j){var Q=Ih(),xe=zc;if(xe!==null)return f2(Q,xe,j);Ih(),Q=Q.memoizedState,xe=Ih();var Ue=xe.queue.dispatch;return xe.memoizedState=j,[Q,Ue,!1]}function t_(j,Q,xe,Ue){return j={tag:j,create:xe,deps:Ue,inst:Q,next:null},Q=hu.updateQueue,Q===null&&(Q=Bg(),hu.updateQueue=Q),xe=Q.lastEffect,xe===null?Q.lastEffect=j.next=j:(Ue=xe.next,xe.next=j,j.next=Ue,Q.lastEffect=j),j}function jA(){return Ih().memoizedState}function d2(j,Q,xe,Ue){var xt=Bd();hu.flags|=j,xt.memoizedState=t_(1|Q,{destroy:void 0},xe,Ue===void 0?null:Ue)}function v2(j,Q,xe,Ue){var xt=Ih();Ue=Ue===void 0?null:Ue;var Bt=xt.memoizedState.inst;zc!==null&&Ue!==null&&jx(Ue,zc.memoizedState.deps)?xt.memoizedState=t_(Q,Bt,xe,Ue):(hu.flags|=j,xt.memoizedState=t_(1|Q,Bt,xe,Ue))}function p2(j,Q){d2(8390656,8,j,Q)}function m2(j,Q){v2(2048,8,j,Q)}function UL(j){hu.flags|=4;var Q=hu.updateQueue;if(Q===null)Q=Bg(),hu.updateQueue=Q,Q.events=[j];else{var xe=Q.events;xe===null?Q.events=[j]:xe.push(j)}}function BM(j){var Q=Ih().memoizedState;return UL({ref:Q,nextImpl:j}),function(){if((Nc&2)!==0)throw Error(L(440));return Q.impl.apply(void 0,arguments)}}function jM(j,Q){return v2(4,2,j,Q)}function UM(j,Q){return v2(4,4,j,Q)}function y2(j,Q){if(typeof Q=="function"){j=j();var xe=Q(j);return function(){typeof xe=="function"?xe():Q(null)}}if(Q!=null)return j=j(),Q.current=j,function(){Q.current=null}}function Gx(j,Q,xe){xe=xe!=null?xe.concat([j]):null,v2(4,4,y2.bind(null,Q,j),xe)}function g2(){}function _2(j,Q){var xe=Ih();Q=Q===void 0?null:Q;var Ue=xe.memoizedState;return Q!==null&&jx(Q,Ue[1])?Ue[0]:(xe.memoizedState=[j,Q],j)}function UA(j,Q){var xe=Ih();Q=Q===void 0?null:Q;var Ue=xe.memoizedState;if(Q!==null&&jx(Q,Ue[1]))return Ue[0];if(Ue=j(),Ng){Am(!0);try{j()}finally{Am(!1)}}return xe.memoizedState=[Ue,Q],Ue}function Xx(j,Q,xe){return xe===void 0||(Fd&1073741824)!==0&&(fc&261930)===0?j.memoizedState=Q:(j.memoizedState=xe,j=MC(),hu.lanes|=j,J0|=j,xe)}function qM(j,Q,xe,Ue){return Vp(xe,Q)?xe:K1.current!==null?(j=Xx(j,xe,Ue),Vp(j,Q)||(nd=!0),j):(Fd&42)===0||(Fd&1073741824)!==0&&(fc&261930)===0?(nd=!0,j.memoizedState=xe):(j=MC(),hu.lanes|=j,J0|=j,Q)}function qA(j,Q,xe,Ue,xt){var Bt=Ra.p;Ra.p=Bt!==0&&8>Bt?Bt:8;var Gr=pa.T,Nn={};pa.T=Nn,Yx(j,!1,Q,xe);try{var Wa=xt(),Hi=pa.S;if(Hi!==null&&Hi(Nn,Wa),Wa!==null&&typeof Wa=="object"&&typeof Wa.then=="function"){var xo=FL(Wa,Ue);r_(j,Q,xo,qv(j))}else r_(j,Q,Ue,qv(j))}catch(Mo){r_(j,Q,{then:function(){},status:"rejected",reason:Mo},qv())}finally{Ra.p=Bt,Gr!==null&&Nn.types!==null&&(Gr.types=Nn.types),pa.T=Gr}}function x2(){}function b2(j,Q,xe,Ue){if(j.tag!==5)throw Error(L(476));var xt=Wx(j).queue;qA(j,xt,Q,vi,xe===null?x2:function(){return VA(j),xe(Ue)})}function Wx(j){var Q=j.memoizedState;if(Q!==null)return Q;Q={memoizedState:vi,baseState:vi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:l0,lastRenderedState:vi},next:null};var xe={};return Q.next={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:l0,lastRenderedState:xe},next:null},j.memoizedState=Q,j=j.alternate,j!==null&&(j.memoizedState=Q),Q}function VA(j){var Q=Wx(j);Q.next===null&&(Q=j.alternate.memoizedState),r_(j,Q.next.queue,{},qv())}function w2(){return lv(S_)}function VM(){return Ih().memoizedState}function HA(){return Ih().memoizedState}function HM(j){for(var Q=j.return;Q!==null;){switch(Q.tag){case 24:case 3:var xe=qv();j=Iy(xe);var Ue=Dy(Q,j,xe);Ue!==null&&(_p(Ue,Q,xe),Nx(Ue,Q,xe)),Q={cache:TA()},j.payload=Q;return}Q=Q.return}}function GM(j,Q,xe){var Ue=qv();xe={lane:Ue,revertLane:0,gesture:null,action:xe,hasEagerState:!1,eagerState:null,next:null},n_(j)?GA(Q,xe):(xe=mA(j,Q,xe,Ue),xe!==null&&(_p(xe,j,Ue),XM(xe,Q,Ue)))}function T2(j,Q,xe){var Ue=qv();r_(j,Q,xe,Ue)}function r_(j,Q,xe,Ue){var xt={lane:Ue,revertLane:0,gesture:null,action:xe,hasEagerState:!1,eagerState:null,next:null};if(n_(j))GA(Q,xt);else{var Bt=j.alternate;if(j.lanes===0&&(Bt===null||Bt.lanes===0)&&(Bt=Q.lastRenderedReducer,Bt!==null))try{var Gr=Q.lastRenderedState,Nn=Bt(Gr,xe);if(xt.hasEagerState=!0,xt.eagerState=Nn,Vp(Nn,Gr))return qw(j,Q,xt,0),Xf===null&&kx(),!1}catch{}finally{}if(xe=mA(j,Q,xt,Ue),xe!==null)return _p(xe,j,Ue),XM(xe,Q,Ue),!0}return!1}function Yx(j,Q,xe,Ue){if(Ue={lane:2,revertLane:m_(),gesture:null,action:Ue,hasEagerState:!1,eagerState:null,next:null},n_(j)){if(Q)throw Error(L(479))}else Q=mA(j,xe,Ue,2),Q!==null&&_p(Q,j,2)}function n_(j){var Q=j.alternate;return j===hu||Q!==null&&Q===hu}function GA(j,Q){Q1=zy=!0;var xe=j.pending;xe===null?Q.next=Q:(Q.next=xe.next,xe.next=Q),j.pending=Q}function XM(j,Q,xe){if((xe&4194048)!==0){var Ue=Q.lanes;Ue&=j.pendingLanes,xe|=Ue,Q.lanes=xe,tp(j,xe)}}var Zx={readContext:lv,use:e2,useCallback:Rh,useContext:Rh,useEffect:Rh,useImperativeHandle:Rh,useLayoutEffect:Rh,useInsertionEffect:Rh,useMemo:Rh,useReducer:Rh,useRef:Rh,useState:Rh,useDebugValue:Rh,useDeferredValue:Rh,useTransition:Rh,useSyncExternalStore:Rh,useId:Rh,useHostTransitionStatus:Rh,useFormState:Rh,useActionState:Rh,useOptimistic:Rh,useMemoCache:Rh,useCacheRefresh:Rh};Zx.useEffectEvent=Rh;var XA={readContext:lv,use:e2,useCallback:function(j,Q){return Bd().memoizedState=[j,Q===void 0?null:Q],j},useContext:lv,useEffect:p2,useImperativeHandle:function(j,Q,xe){xe=xe!=null?xe.concat([j]):null,d2(4194308,4,y2.bind(null,Q,j),xe)},useLayoutEffect:function(j,Q){return d2(4194308,4,j,Q)},useInsertionEffect:function(j,Q){d2(4,2,j,Q)},useMemo:function(j,Q){var xe=Bd();Q=Q===void 0?null:Q;var Ue=j();if(Ng){Am(!0);try{j()}finally{Am(!1)}}return xe.memoizedState=[Ue,Q],Ue},useReducer:function(j,Q,xe){var Ue=Bd();if(xe!==void 0){var xt=xe(Q);if(Ng){Am(!0);try{xe(Q)}finally{Am(!1)}}}else xt=Q;return Ue.memoizedState=Ue.baseState=xt,j={pending:null,lanes:0,dispatch:null,lastRenderedReducer:j,lastRenderedState:xt},Ue.queue=j,j=j.dispatch=GM.bind(null,hu,j),[Ue.memoizedState,j]},useRef:function(j){var Q=Bd();return j={current:j},Q.memoizedState=j},useState:function(j){j=Vx(j);var Q=j.queue,xe=T2.bind(null,hu,Q);return Q.dispatch=xe,[j.memoizedState,xe]},useDebugValue:g2,useDeferredValue:function(j,Q){var xe=Bd();return Xx(xe,j,Q)},useTransition:function(){var j=Vx(!1);return j=qA.bind(null,hu,j.queue,!0,!1),Bd().memoizedState=j,[!1,j]},useSyncExternalStore:function(j,Q,xe){var Ue=hu,xt=Bd();if(Ku){if(xe===void 0)throw Error(L(407));xe=xe()}else{if(xe=Q(),Xf===null)throw Error(L(349));(fc&127)!==0||a2(Ue,Q,xe)}xt.memoizedState=xe;var Bt={value:xe,getSnapshot:Q};return xt.queue=Bt,p2(o2.bind(null,Ue,Bt,j),[j]),Ue.flags|=2048,t_(9,{destroy:void 0},i2.bind(null,Ue,Bt,xe,Q),null),xe},useId:function(){var j=Bd(),Q=Xf.identifierPrefix;if(Ku){var xe=sm,Ue=ah;xe=(Ue&~(1<<32-xd(Ue)-1)).toString(32)+xe,Q="_"+Q+"R_"+xe,xe=Fg++,0<xe&&(Q+="H"+xe.toString(32)),Q+="_"}else xe=DA++,Q="_"+Q+"r_"+xe.toString(32)+"_";return j.memoizedState=Q},useHostTransitionStatus:w2,useFormState:BA,useActionState:BA,useOptimistic:function(j){var Q=Bd();Q.memoizedState=Q.baseState=j;var xe={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return Q.queue=xe,Q=Yx.bind(null,hu,!0,xe),xe.dispatch=Q,[j,Q]},useMemoCache:t2,useCacheRefresh:function(){return Bd().memoizedState=HM.bind(null,hu)},useEffectEvent:function(j){var Q=Bd(),xe={impl:j};return Q.memoizedState=xe,function(){if((Nc&2)!==0)throw Error(L(440));return xe.impl.apply(void 0,arguments)}}},WA={readContext:lv,use:e2,useCallback:_2,useContext:lv,useEffect:m2,useImperativeHandle:Gx,useInsertionEffect:jM,useLayoutEffect:UM,useMemo:UA,useReducer:qx,useRef:jA,useState:function(){return qx(l0)},useDebugValue:g2,useDeferredValue:function(j,Q){var xe=Ih();return qM(xe,zc.memoizedState,j,Q)},useTransition:function(){var j=qx(l0)[0],Q=Ih().memoizedState;return[typeof j=="boolean"?j:e_(j),Q]},useSyncExternalStore:DM,useId:VM,useHostTransitionStatus:w2,useFormState:FM,useActionState:FM,useOptimistic:function(j,Q){var xe=Ih();return l2(xe,zc,j,Q)},useMemoCache:t2,useCacheRefresh:HA};WA.useEffectEvent=BM;var WM={readContext:lv,use:e2,useCallback:_2,useContext:lv,useEffect:m2,useImperativeHandle:Gx,useInsertionEffect:jM,useLayoutEffect:UM,useMemo:UA,useReducer:n2,useRef:jA,useState:function(){return n2(l0)},useDebugValue:g2,useDeferredValue:function(j,Q){var xe=Ih();return zc===null?Xx(xe,j,Q):qM(xe,zc.memoizedState,j,Q)},useTransition:function(){var j=n2(l0)[0],Q=Ih().memoizedState;return[typeof j=="boolean"?j:e_(j),Q]},useSyncExternalStore:DM,useId:VM,useHostTransitionStatus:w2,useFormState:h2,useActionState:h2,useOptimistic:function(j,Q){var xe=Ih();return zc!==null?l2(xe,zc,j,Q):(xe.baseState=j,[j,xe.queue.dispatch])},useMemoCache:t2,useCacheRefresh:HA};WM.useEffectEvent=BM;function YA(j,Q,xe,Ue){Q=j.memoizedState,xe=xe(Ue,Q),xe=xe==null?Q:yt({},Q,xe),j.memoizedState=xe,j.lanes===0&&(j.updateQueue.baseState=xe)}var A2={enqueueSetState:function(j,Q,xe){j=j._reactInternals;var Ue=qv(),xt=Iy(Ue);xt.payload=Q,xe!=null&&(xt.callback=xe),Q=Dy(j,xt,Ue),Q!==null&&(_p(Q,j,Ue),Nx(Q,j,Ue))},enqueueReplaceState:function(j,Q,xe){j=j._reactInternals;var Ue=qv(),xt=Iy(Ue);xt.tag=1,xt.payload=Q,xe!=null&&(xt.callback=xe),Q=Dy(j,xt,Ue),Q!==null&&(_p(Q,j,Ue),Nx(Q,j,Ue))},enqueueForceUpdate:function(j,Q){j=j._reactInternals;var xe=qv(),Ue=Iy(xe);Ue.tag=2,Q!=null&&(Ue.callback=Q),Q=Dy(j,Ue,xe),Q!==null&&(_p(Q,j,xe),Nx(Q,j,xe))}};function YM(j,Q,xe,Ue,xt,Bt,Gr){return j=j.stateNode,typeof j.shouldComponentUpdate=="function"?j.shouldComponentUpdate(Ue,Bt,Gr):Q.prototype&&Q.prototype.isPureReactComponent?!Mx(xe,Ue)||!Mx(xt,Bt):!0}function ZM(j,Q,xe,Ue){j=Q.state,typeof Q.componentWillReceiveProps=="function"&&Q.componentWillReceiveProps(xe,Ue),typeof Q.UNSAFE_componentWillReceiveProps=="function"&&Q.UNSAFE_componentWillReceiveProps(xe,Ue),Q.state!==j&&A2.enqueueReplaceState(Q,Q.state,null)}function jg(j,Q){var xe=Q;if("ref"in Q){xe={};for(var Ue in Q)Ue!=="ref"&&(xe[Ue]=Q[Ue])}if(j=j.defaultProps){xe===Q&&(xe=yt({},xe));for(var xt in j)xe[xt]===void 0&&(xe[xt]=j[xt])}return xe}function $M(j){q1(j)}function KM(j){console.error(j)}function JM(j){q1(j)}function S2(j,Q){try{var xe=j.onUncaughtError;xe(Q.value,{componentStack:Q.stack})}catch(Ue){setTimeout(function(){throw Ue})}}function ZA(j,Q,xe){try{var Ue=j.onCaughtError;Ue(xe.value,{componentStack:xe.stack,errorBoundary:Q.tag===1?Q.stateNode:null})}catch(xt){setTimeout(function(){throw xt})}}function X0(j,Q,xe){return xe=Iy(xe),xe.tag=3,xe.payload={element:null},xe.callback=function(){S2(j,Q)},xe}function QM(j){return j=Iy(j),j.tag=3,j}function eC(j,Q,xe,Ue){var xt=xe.type.getDerivedStateFromError;if(typeof xt=="function"){var Bt=Ue.value;j.payload=function(){return xt(Bt)},j.callback=function(){ZA(Q,xe,Ue)}}var Gr=xe.stateNode;Gr!==null&&typeof Gr.componentDidCatch=="function"&&(j.callback=function(){ZA(Q,xe,Ue),typeof xt!="function"&&(fm===null?fm=new Set([this]):fm.add(this));var Nn=Ue.stack;this.componentDidCatch(Ue.value,{componentStack:Nn!==null?Nn:""})})}function qL(j,Q,xe,Ue,xt){if(xe.flags|=32768,Ue!==null&&typeof Ue=="object"&&typeof Ue.then=="function"){if(Q=xe.alternate,Q!==null&&Rg(Q,xe,xt,!0),xe=rd.current,xe!==null){switch(xe.tag){case 31:case 13:return dp===null?F2():xe.alternate===null&&Xh===0&&(Xh=3),xe.flags&=-257,xe.flags|=65536,xe.lanes=xt,Ue===Yw?xe.flags|=16384:(Q=xe.updateQueue,Q===null?xe.updateQueue=new Set([Ue]):Q.add(Ue),xS(j,Ue,xt)),!1;case 22:return xe.flags|=65536,Ue===Yw?xe.flags|=16384:(Q=xe.updateQueue,Q===null?(Q={transitions:null,markerInstances:null,retryQueue:new Set([Ue])},xe.updateQueue=Q):(xe=Q.retryQueue,xe===null?Q.retryQueue=new Set([Ue]):xe.add(Ue)),xS(j,Ue,xt)),!1}throw Error(L(435,xe.tag))}return xS(j,Ue,xt),F2(),!1}if(Ku)return Q=rd.current,Q!==null?((Q.flags&65536)===0&&(Q.flags|=256),Q.flags|=65536,Q.lanes=xt,Ue!==gA&&(j=Error(L(422),{cause:Ue}),W1(Vh(j,xe)))):(Ue!==gA&&(Q=Error(L(423),{cause:Ue}),W1(Vh(Q,xe))),j=j.current.alternate,j.flags|=65536,xt&=-xt,j.lanes|=xt,Ue=Vh(Ue,xe),xt=X0(j.stateNode,Ue,xt),kA(j,xt),Xh!==4&&(Xh=2)),!1;var Bt=Error(L(520),{cause:Ue});if(Bt=Vh(Bt,xe),rb===null?rb=[Bt]:rb.push(Bt),Xh!==4&&(Xh=2),Q===null)return!0;Ue=Vh(Ue,xe),xe=Q;do{switch(xe.tag){case 3:return xe.flags|=65536,j=xt&-xt,xe.lanes|=j,j=X0(xe.stateNode,Ue,j),kA(xe,j),!1;case 1:if(Q=xe.type,Bt=xe.stateNode,(xe.flags&128)===0&&(typeof Q.getDerivedStateFromError=="function"||Bt!==null&&typeof Bt.componentDidCatch=="function"&&(fm===null||!fm.has(Bt))))return xe.flags|=65536,xt&=-xt,xe.lanes|=xt,xt=QM(xt),eC(xt,j,xe,Ue),kA(xe,xt),!1}xe=xe.return}while(xe!==null);return!1}var $A=Error(L(461)),nd=!1;function uv(j,Q,xe,Ue){Q.child=j===null?LM(Q,null,xe,Ue):Ry(Q,j.child,xe,Ue)}function tC(j,Q,xe,Ue,xt){xe=xe.render;var Bt=Q.ref;if("ref"in Ue){var Gr={};for(var Nn in Ue)Nn!=="ref"&&(Gr[Nn]=Ue[Nn])}else Gr=Ue;return Ig(Q),Ue=Ux(j,Q,xe,Gr,Bt,xt),Nn=Qw(),j!==null&&!nd?(zA(j,Q,xt),W0(j,Q,xt)):(Ku&&Nn&&kg(Q),Q.flags|=1,uv(j,Q,Ue,xt),Q.child)}function rC(j,Q,xe,Ue,xt){if(j===null){var Bt=xe.type;return typeof Bt=="function"&&!Xp(Bt)&&Bt.defaultProps===void 0&&xe.compare===null?(Q.tag=15,Q.type=Bt,E2(j,Q,Bt,Ue,xt)):(j=j0(xe.type,null,Ue,Q,Q.mode,xt),j.ref=Q.ref,j.return=Q,Q.child=j)}if(Bt=j.child,!P2(j,xt)){var Gr=Bt.memoizedProps;if(xe=xe.compare,xe=xe!==null?xe:Mx,xe(Gr,Ue)&&j.ref===Q.ref)return W0(j,Q,xt)}return Q.flags|=1,j=ov(Bt,Ue),j.ref=Q.ref,j.return=Q,Q.child=j}function E2(j,Q,xe,Ue,xt){if(j!==null){var Bt=j.memoizedProps;if(Mx(Bt,Ue)&&j.ref===Q.ref)if(nd=!1,Q.pendingProps=Ue=Bt,P2(j,xt))(j.flags&131072)!==0&&(nd=!0);else return Q.lanes=j.lanes,W0(j,Q,xt)}return KA(j,Q,xe,Ue,xt)}function nC(j,Q,xe,Ue){var xt=Ue.children,Bt=j!==null?j.memoizedState:null;if(j===null&&Q.stateNode===null&&(Q.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Ue.mode==="hidden"){if((Q.flags&128)!==0){if(Bt=Bt!==null?Bt.baseLanes|xe:xe,j!==null){for(Ue=Q.child=j.child,xt=0;Ue!==null;)xt=xt|Ue.lanes|Ue.childLanes,Ue=Ue.sibling;Ue=xt&~Bt}else Ue=0,Q.child=null;return aC(j,Q,Bt,xe,Ue)}if((xe&536870912)!==0)Q.memoizedState={baseLanes:0,cachePool:null},j!==null&&Xw(Q,Bt!==null?Bt.cachePool:null),Bt!==null?IM(Q,Bt):RA(),IA(Q);else return Ue=Q.lanes=536870912,aC(j,Q,Bt!==null?Bt.baseLanes|xe:xe,xe,Ue)}else Bt!==null?(Xw(Q,Bt.cachePool),IM(Q,Bt),Nm(),Q.memoizedState=null):(j!==null&&Xw(Q,null),RA(),Nm());return uv(j,Q,xt,xe),Q.child}function $x(j,Q){return j!==null&&j.tag===22||Q.stateNode!==null||(Q.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),Q.sibling}function aC(j,Q,xe,Ue,xt){var Bt=AA();return Bt=Bt===null?null:{parent:Td._currentValue,pool:Bt},Q.memoizedState={baseLanes:xe,cachePool:Bt},j!==null&&Xw(Q,null),RA(),IA(Q),j!==null&&Rg(j,Q,Ue,!0),Q.childLanes=xt,null}function M2(j,Q){return Q=k2({mode:Q.mode,children:Q.children},j.mode),Q.ref=j.ref,j.child=Q,Q.return=j,Q}function iC(j,Q,xe){return Ry(Q,j.child,null,xe),j=M2(Q,Q.pendingProps),j.flags|=2,$p(Q),Q.memoizedState=null,j}function VL(j,Q,xe){var Ue=Q.pendingProps,xt=(Q.flags&128)!==0;if(Q.flags&=-129,j===null){if(Ku){if(Ue.mode==="hidden")return j=M2(Q,Ue),Q.lanes=536870912,$x(null,j);if(vp(Q),(j=Gf)?(j=Z2(j,hp),j=j!==null&&j.data==="&"?j:null,j!==null&&(Q.memoizedState={dehydrated:j,treeContext:om!==null?{id:ah,overflow:sm}:null,retryLane:536870912,hydrationErrors:null},xe=Dm(j),xe.return=Q,Q.child=xe,sv=Q,Gf=null)):j=null,j===null)throw Cy(Q);return Q.lanes=536870912,null}return M2(Q,Ue)}var Bt=j.memoizedState;if(Bt!==null){var Gr=Bt.dehydrated;if(vp(Q),xt)if(Q.flags&256)Q.flags&=-257,Q=iC(j,Q,xe);else if(Q.memoizedState!==null)Q.child=j.child,Q.flags|=128,Q=null;else throw Error(L(558));else if(nd||Rg(j,Q,xe,!1),xt=(xe&j.childLanes)!==0,nd||xt){if(Ue=Xf,Ue!==null&&(Gr=Up(Ue,xe),Gr!==0&&Gr!==Bt.retryLane))throw Bt.retryLane=Gr,Lm(j,Gr),_p(Ue,j,Gr),$A;F2(),Q=iC(j,Q,xe)}else j=Bt.treeContext,Gf=bp(Gr.nextSibling),sv=Q,Ku=!0,Om=null,hp=!1,j!==null&&TM(Q,j),Q=M2(Q,Ue),Q.flags|=4096;return Q}return j=ov(j.child,{mode:Ue.mode,children:Ue.children}),j.ref=Q.ref,Q.child=j,j.return=Q,j}function C2(j,Q){var xe=Q.ref;if(xe===null)j!==null&&j.ref!==null&&(Q.flags|=4194816);else{if(typeof xe!="function"&&typeof xe!="object")throw Error(L(284));(j===null||j.ref!==xe)&&(Q.flags|=4194816)}}function KA(j,Q,xe,Ue,xt){return Ig(Q),xe=Ux(j,Q,xe,Ue,void 0,xt),Ue=Qw(),j!==null&&!nd?(zA(j,Q,xt),W0(j,Q,xt)):(Ku&&Ue&&kg(Q),Q.flags|=1,uv(j,Q,xe,xt),Q.child)}function JA(j,Q,xe,Ue,xt,Bt){return Ig(Q),Q.updateQueue=null,xe=OA(Q,Ue,xe,xt),Jw(j),Ue=Qw(),j!==null&&!nd?(zA(j,Q,Bt),W0(j,Q,Bt)):(Ku&&Ue&&kg(Q),Q.flags|=1,uv(j,Q,xe,Bt),Q.child)}function QA(j,Q,xe,Ue,xt){if(Ig(Q),Q.stateNode===null){var Bt=xv,Gr=xe.contextType;typeof Gr=="object"&&Gr!==null&&(Bt=lv(Gr)),Bt=new xe(Ue,Bt),Q.memoizedState=Bt.state!==null&&Bt.state!==void 0?Bt.state:null,Bt.updater=A2,Q.stateNode=Bt,Bt._reactInternals=Q,Bt=Q.stateNode,Bt.props=Ue,Bt.state=Q.memoizedState,Bt.refs={},MA(Q),Gr=xe.contextType,Bt.context=typeof Gr=="object"&&Gr!==null?lv(Gr):xv,Bt.state=Q.memoizedState,Gr=xe.getDerivedStateFromProps,typeof Gr=="function"&&(YA(Q,xe,Gr,Ue),Bt.state=Q.memoizedState),typeof xe.getDerivedStateFromProps=="function"||typeof Bt.getSnapshotBeforeUpdate=="function"||typeof Bt.UNSAFE_componentWillMount!="function"&&typeof Bt.componentWillMount!="function"||(Gr=Bt.state,typeof Bt.componentWillMount=="function"&&Bt.componentWillMount(),typeof Bt.UNSAFE_componentWillMount=="function"&&Bt.UNSAFE_componentWillMount(),Gr!==Bt.state&&A2.enqueueReplaceState(Bt,Bt.state,null),Bx(Q,Ue,Bt,xt),Fx(),Bt.state=Q.memoizedState),typeof Bt.componentDidMount=="function"&&(Q.flags|=4194308),Ue=!0}else if(j===null){Bt=Q.stateNode;var Nn=Q.memoizedProps,Wa=jg(xe,Nn);Bt.props=Wa;var Hi=Bt.context,xo=xe.contextType;Gr=xv,typeof xo=="object"&&xo!==null&&(Gr=lv(xo));var Mo=xe.getDerivedStateFromProps;xo=typeof Mo=="function"||typeof Bt.getSnapshotBeforeUpdate=="function",Nn=Q.pendingProps!==Nn,xo||typeof Bt.UNSAFE_componentWillReceiveProps!="function"&&typeof Bt.componentWillReceiveProps!="function"||(Nn||Hi!==Gr)&&ZM(Q,Bt,Ue,Gr),H0=!1;var Zi=Q.memoizedState;Bt.state=Zi,Bx(Q,Ue,Bt,xt),Fx(),Hi=Q.memoizedState,Nn||Zi!==Hi||H0?(typeof Mo=="function"&&(YA(Q,xe,Mo,Ue),Hi=Q.memoizedState),(Wa=H0||YM(Q,xe,Wa,Ue,Zi,Hi,Gr))?(xo||typeof Bt.UNSAFE_componentWillMount!="function"&&typeof Bt.componentWillMount!="function"||(typeof Bt.componentWillMount=="function"&&Bt.componentWillMount(),typeof Bt.UNSAFE_componentWillMount=="function"&&Bt.UNSAFE_componentWillMount()),typeof Bt.componentDidMount=="function"&&(Q.flags|=4194308)):(typeof Bt.componentDidMount=="function"&&(Q.flags|=4194308),Q.memoizedProps=Ue,Q.memoizedState=Hi),Bt.props=Ue,Bt.state=Hi,Bt.context=Gr,Ue=Wa):(typeof Bt.componentDidMount=="function"&&(Q.flags|=4194308),Ue=!1)}else{Bt=Q.stateNode,CA(j,Q),Gr=Q.memoizedProps,xo=jg(xe,Gr),Bt.props=xo,Mo=Q.pendingProps,Zi=Bt.context,Hi=xe.contextType,Wa=xv,typeof Hi=="object"&&Hi!==null&&(Wa=lv(Hi)),Nn=xe.getDerivedStateFromProps,(Hi=typeof Nn=="function"||typeof Bt.getSnapshotBeforeUpdate=="function")||typeof Bt.UNSAFE_componentWillReceiveProps!="function"&&typeof Bt.componentWillReceiveProps!="function"||(Gr!==Mo||Zi!==Wa)&&ZM(Q,Bt,Ue,Wa),H0=!1,Zi=Q.memoizedState,Bt.state=Zi,Bx(Q,Ue,Bt,xt),Fx();var ro=Q.memoizedState;Gr!==Mo||Zi!==ro||H0||j!==null&&j.dependencies!==null&&Hw(j.dependencies)?(typeof Nn=="function"&&(YA(Q,xe,Nn,Ue),ro=Q.memoizedState),(xo=H0||YM(Q,xe,xo,Ue,Zi,ro,Wa)||j!==null&&j.dependencies!==null&&Hw(j.dependencies))?(Hi||typeof Bt.UNSAFE_componentWillUpdate!="function"&&typeof Bt.componentWillUpdate!="function"||(typeof Bt.componentWillUpdate=="function"&&Bt.componentWillUpdate(Ue,ro,Wa),typeof Bt.UNSAFE_componentWillUpdate=="function"&&Bt.UNSAFE_componentWillUpdate(Ue,ro,Wa)),typeof Bt.componentDidUpdate=="function"&&(Q.flags|=4),typeof Bt.getSnapshotBeforeUpdate=="function"&&(Q.flags|=1024)):(typeof Bt.componentDidUpdate!="function"||Gr===j.memoizedProps&&Zi===j.memoizedState||(Q.flags|=4),typeof Bt.getSnapshotBeforeUpdate!="function"||Gr===j.memoizedProps&&Zi===j.memoizedState||(Q.flags|=1024),Q.memoizedProps=Ue,Q.memoizedState=ro),Bt.props=Ue,Bt.state=ro,Bt.context=Wa,Ue=xo):(typeof Bt.componentDidUpdate!="function"||Gr===j.memoizedProps&&Zi===j.memoizedState||(Q.flags|=4),typeof Bt.getSnapshotBeforeUpdate!="function"||Gr===j.memoizedProps&&Zi===j.memoizedState||(Q.flags|=1024),Ue=!1)}return Bt=Ue,C2(j,Q),Ue=(Q.flags&128)!==0,Bt||Ue?(Bt=Q.stateNode,xe=Ue&&typeof xe.getDerivedStateFromError!="function"?null:Bt.render(),Q.flags|=1,j!==null&&Ue?(Q.child=Ry(Q,j.child,null,xt),Q.child=Ry(Q,null,xe,xt)):uv(j,Q,xe,xt),Q.memoizedState=Bt.state,j=Q.child):j=W0(j,Q,xt),j}function eS(j,Q,xe,Ue){return q0(),Q.flags|=256,uv(j,Q,xe,Ue),Q.child}var tS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rS(j){return{baseLanes:j,cachePool:CM()}}function nS(j,Q,xe){return j=j!==null?j.childLanes&~xe:0,Q&&(j|=yp),j}function oC(j,Q,xe){var Ue=Q.pendingProps,xt=!1,Bt=(Q.flags&128)!==0,Gr;if((Gr=Bt)||(Gr=j!==null&&j.memoizedState===null?!1:(mc.current&2)!==0),Gr&&(xt=!0,Q.flags&=-129),Gr=(Q.flags&32)!==0,Q.flags&=-33,j===null){if(Ku){if(xt?s0(Q):Nm(),(j=Gf)?(j=Z2(j,hp),j=j!==null&&j.data!=="&"?j:null,j!==null&&(Q.memoizedState={dehydrated:j,treeContext:om!==null?{id:ah,overflow:sm}:null,retryLane:536870912,hydrationErrors:null},xe=Dm(j),xe.return=Q,Q.child=xe,sv=Q,Gf=null)):j=null,j===null)throw Cy(Q);return mb(j)?Q.lanes=32:Q.lanes=536870912,null}var Nn=Ue.children;return Ue=Ue.fallback,xt?(Nm(),xt=Q.mode,Nn=k2({mode:"hidden",children:Nn},xt),Ue=My(Ue,xt,xe,null),Nn.return=Q,Ue.return=Q,Nn.sibling=Ue,Q.child=Nn,Ue=Q.child,Ue.memoizedState=rS(xe),Ue.childLanes=nS(j,Gr,xe),Q.memoizedState=tS,$x(null,Ue)):(s0(Q),aS(Q,Nn))}var Wa=j.memoizedState;if(Wa!==null&&(Nn=Wa.dehydrated,Nn!==null)){if(Bt)Q.flags&256?(s0(Q),Q.flags&=-257,Q=iS(j,Q,xe)):Q.memoizedState!==null?(Nm(),Q.child=j.child,Q.flags|=128,Q=null):(Nm(),Nn=Ue.fallback,xt=Q.mode,Ue=k2({mode:"visible",children:Ue.children},xt),Nn=My(Nn,xt,xe,null),Nn.flags|=2,Ue.return=Q,Nn.return=Q,Ue.sibling=Nn,Q.child=Ue,Ry(Q,j.child,null,xe),Ue=Q.child,Ue.memoizedState=rS(xe),Ue.childLanes=nS(j,Gr,xe),Q.memoizedState=tS,Q=$x(null,Ue));else if(s0(Q),mb(Nn)){if(Gr=Nn.nextSibling&&Nn.nextSibling.dataset,Gr)var Hi=Gr.dgst;Gr=Hi,Ue=Error(L(419)),Ue.stack="",Ue.digest=Gr,W1({value:Ue,source:null,stack:null}),Q=iS(j,Q,xe)}else if(nd||Rg(j,Q,xe,!1),Gr=(xe&j.childLanes)!==0,nd||Gr){if(Gr=Xf,Gr!==null&&(Ue=Up(Gr,xe),Ue!==0&&Ue!==Wa.retryLane))throw Wa.retryLane=Ue,Lm(j,Ue),_p(Gr,j,Ue),$A;pb(Nn)||F2(),Q=iS(j,Q,xe)}else pb(Nn)?(Q.flags|=192,Q.child=j.child,Q=null):(j=Wa.treeContext,Gf=bp(Nn.nextSibling),sv=Q,Ku=!0,Om=null,hp=!1,j!==null&&TM(Q,j),Q=aS(Q,Ue.children),Q.flags|=4096);return Q}return xt?(Nm(),Nn=Ue.fallback,xt=Q.mode,Wa=j.child,Hi=Wa.sibling,Ue=ov(Wa,{mode:"hidden",children:Ue.children}),Ue.subtreeFlags=Wa.subtreeFlags&65011712,Hi!==null?Nn=ov(Hi,Nn):(Nn=My(Nn,xt,xe,null),Nn.flags|=2),Nn.return=Q,Ue.return=Q,Ue.sibling=Nn,Q.child=Ue,$x(null,Ue),Ue=Q.child,Nn=j.child.memoizedState,Nn===null?Nn=rS(xe):(xt=Nn.cachePool,xt!==null?(Wa=Td._currentValue,xt=xt.parent!==Wa?{parent:Wa,pool:Wa}:xt):xt=CM(),Nn={baseLanes:Nn.baseLanes|xe,cachePool:xt}),Ue.memoizedState=Nn,Ue.childLanes=nS(j,Gr,xe),Q.memoizedState=tS,$x(j.child,Ue)):(s0(Q),xe=j.child,j=xe.sibling,xe=ov(xe,{mode:"visible",children:Ue.children}),xe.return=Q,xe.sibling=null,j!==null&&(Gr=Q.deletions,Gr===null?(Q.deletions=[j],Q.flags|=16):Gr.push(j)),Q.child=xe,Q.memoizedState=null,xe)}function aS(j,Q){return Q=k2({mode:"visible",children:Q},j.mode),Q.return=j,j.child=Q}function k2(j,Q){return j=bv(22,j,null,Q),j.lanes=0,j}function iS(j,Q,xe){return Ry(Q,j.child,null,xe),j=aS(Q,Q.pendingProps.children),j.flags|=2,Q.memoizedState=null,j}function sC(j,Q,xe){j.lanes|=Q;var Ue=j.alternate;Ue!==null&&(Ue.lanes|=Q),bA(j.return,Q,xe)}function oS(j,Q,xe,Ue,xt,Bt){var Gr=j.memoizedState;Gr===null?j.memoizedState={isBackwards:Q,rendering:null,renderingStartTime:0,last:Ue,tail:xe,tailMode:xt,treeForkCount:Bt}:(Gr.isBackwards=Q,Gr.rendering=null,Gr.renderingStartTime=0,Gr.last=Ue,Gr.tail=xe,Gr.tailMode=xt,Gr.treeForkCount=Bt)}function lC(j,Q,xe){var Ue=Q.pendingProps,xt=Ue.revealOrder,Bt=Ue.tail;Ue=Ue.children;var Gr=mc.current,Nn=(Gr&2)!==0;if(Nn?(Gr=Gr&1|2,Q.flags|=128):Gr&=1,Li(mc,Gr),uv(j,Q,Ue,xe),Ue=Ku?Px:0,!Nn&&j!==null&&(j.flags&128)!==0)e:for(j=Q.child;j!==null;){if(j.tag===13)j.memoizedState!==null&&sC(j,xe,Q);else if(j.tag===19)sC(j,xe,Q);else if(j.child!==null){j.child.return=j,j=j.child;continue}if(j===Q)break e;for(;j.sibling===null;){if(j.return===null||j.return===Q)break e;j=j.return}j.sibling.return=j.return,j=j.sibling}switch(xt){case"forwards":for(xe=Q.child,xt=null;xe!==null;)j=xe.alternate,j!==null&&J1(j)===null&&(xt=xe),xe=xe.sibling;xe=xt,xe===null?(xt=Q.child,Q.child=null):(xt=xe.sibling,xe.sibling=null),oS(Q,!1,xt,xe,Bt,Ue);break;case"backwards":case"unstable_legacy-backwards":for(xe=null,xt=Q.child,Q.child=null;xt!==null;){if(j=xt.alternate,j!==null&&J1(j)===null){Q.child=xt;break}j=xt.sibling,xt.sibling=xe,xe=xt,xt=j}oS(Q,!0,xe,null,Bt,Ue);break;case"together":oS(Q,!1,null,null,void 0,Ue);break;default:Q.memoizedState=null}return Q.child}function W0(j,Q,xe){if(j!==null&&(Q.dependencies=j.dependencies),J0|=Q.lanes,(xe&Q.childLanes)===0)if(j!==null){if(Rg(j,Q,xe,!1),(xe&Q.childLanes)===0)return null}else return null;if(j!==null&&Q.child!==j.child)throw Error(L(153));if(Q.child!==null){for(j=Q.child,xe=ov(j,j.pendingProps),Q.child=xe,xe.return=Q;j.sibling!==null;)j=j.sibling,xe=xe.sibling=ov(j,j.pendingProps),xe.return=Q;xe.sibling=null}return Q.child}function P2(j,Q){return(j.lanes&Q)!==0?!0:(j=j.dependencies,!!(j!==null&&Hw(j)))}function uC(j,Q,xe){switch(Q.tag){case 3:$u(Q,Q.stateNode.containerInfo),ky(Q,Td,j.memoizedState.cache),q0();break;case 27:case 5:Ml(Q);break;case 4:$u(Q,Q.stateNode.containerInfo);break;case 10:ky(Q,Q.type,Q.memoizedProps.value);break;case 31:if(Q.memoizedState!==null)return Q.flags|=128,vp(Q),null;break;case 13:var Ue=Q.memoizedState;if(Ue!==null)return Ue.dehydrated!==null?(s0(Q),Q.flags|=128,null):(xe&Q.child.childLanes)!==0?oC(j,Q,xe):(s0(Q),j=W0(j,Q,xe),j!==null?j.sibling:null);s0(Q);break;case 19:var xt=(j.flags&128)!==0;if(Ue=(xe&Q.childLanes)!==0,Ue||(Rg(j,Q,xe,!1),Ue=(xe&Q.childLanes)!==0),xt){if(Ue)return lC(j,Q,xe);Q.flags|=128}if(xt=Q.memoizedState,xt!==null&&(xt.rendering=null,xt.tail=null,xt.lastEffect=null),Li(mc,mc.current),Ue)break;return null;case 22:return Q.lanes=0,nC(j,Q,xe,Q.pendingProps);case 24:ky(Q,Td,j.memoizedState.cache)}return W0(j,Q,xe)}function a_(j,Q,xe){if(j!==null)if(j.memoizedProps!==Q.pendingProps)nd=!0;else{if(!P2(j,xe)&&(Q.flags&128)===0)return nd=!1,uC(j,Q,xe);nd=(j.flags&131072)!==0}else nd=!1,Ku&&(Q.flags&1048576)!==0&&G1(Q,Px,Q.index);switch(Q.lanes=0,Q.tag){case 16:e:{var Ue=Q.pendingProps;if(j=Og(Q.elementType),Q.type=j,typeof j=="function")Xp(j)?(Ue=jg(j,Ue),Q.tag=1,Q=QA(null,Q,j,Ue,xe)):(Q.tag=0,Q=KA(null,Q,j,Ue,xe));else{if(j!=null){var xt=j.$$typeof;if(xt===yn){Q.tag=11,Q=tC(null,Q,j,Ue,xe);break e}else if(xt===dn){Q.tag=14,Q=rC(null,Q,j,Ue,xe);break e}}throw Q=la(j)||j,Error(L(306,Q,""))}}return Q;case 0:return KA(j,Q,Q.type,Q.pendingProps,xe);case 1:return Ue=Q.type,xt=jg(Ue,Q.pendingProps),QA(j,Q,Ue,xt,xe);case 3:e:{if($u(Q,Q.stateNode.containerInfo),j===null)throw Error(L(387));Ue=Q.pendingProps;var Bt=Q.memoizedState;xt=Bt.element,CA(j,Q),Bx(Q,Ue,null,xe);var Gr=Q.memoizedState;if(Ue=Gr.cache,ky(Q,Td,Ue),Ue!==Bt.cache&&wA(Q,[Td],xe,!0),Fx(),Ue=Gr.element,Bt.isDehydrated)if(Bt={element:Ue,isDehydrated:!1,cache:Gr.cache},Q.updateQueue.baseState=Bt,Q.memoizedState=Bt,Q.flags&256){Q=eS(j,Q,Ue,xe);break e}else if(Ue!==xt){xt=Vh(Error(L(424)),Q),W1(xt),Q=eS(j,Q,Ue,xe);break e}else{switch(j=Q.stateNode.containerInfo,j.nodeType){case 9:j=j.body;break;default:j=j.nodeName==="HTML"?j.ownerDocument.body:j}for(Gf=bp(j.firstChild),sv=Q,Ku=!0,Om=null,hp=!0,xe=LM(Q,null,Ue,xe),Q.child=xe;xe;)xe.flags=xe.flags&-3|4096,xe=xe.sibling}else{if(q0(),Ue===xt){Q=W0(j,Q,xe);break e}uv(j,Q,Ue,xe)}Q=Q.child}return Q;case 26:return C2(j,Q),j===null?(xe=t3(Q.type,null,Q.pendingProps,null))?Q.memoizedState=xe:Ku||(xe=Q.type,j=Q.pendingProps,Ue=xp(co.current).createElement(xe),Ue[Il]=Q,Ue[Fv]=j,Md(Ue,xe,j),av(Ue),Q.stateNode=Ue):Q.memoizedState=t3(Q.type,j.memoizedProps,Q.pendingProps,j.memoizedState),null;case 27:return Ml(Q),j===null&&Ku&&(Ue=Q.stateNode=$2(Q.type,Q.pendingProps,co.current),sv=Q,hp=!0,xt=Gf,p0(Q.type)?(Um=xt,Gf=bp(Ue.firstChild)):Gf=xt),uv(j,Q,Q.pendingProps.children,xe),C2(j,Q),j===null&&(Q.flags|=4194304),Q.child;case 5:return j===null&&Ku&&((xt=Ue=Gf)&&(Ue=m0(Ue,Q.type,Q.pendingProps,hp),Ue!==null?(Q.stateNode=Ue,sv=Q,Gf=bp(Ue.firstChild),hp=!1,xt=!0):xt=!1),xt||Cy(Q)),Ml(Q),xt=Q.type,Bt=Q.pendingProps,Gr=j!==null?j.memoizedProps:null,Ue=Bt.children,X2(xt,Bt)?Ue=null:Gr!==null&&X2(xt,Gr)&&(Q.flags|=32),Q.memoizedState!==null&&(xt=Ux(j,Q,BL,null,null,xe),S_._currentValue=xt),C2(j,Q),uv(j,Q,Ue,xe),Q.child;case 6:return j===null&&Ku&&((j=xe=Gf)&&(xe=OS(xe,Q.pendingProps,hp),xe!==null?(Q.stateNode=xe,sv=Q,Gf=null,j=!0):j=!1),j||Cy(Q)),null;case 13:return oC(j,Q,xe);case 4:return $u(Q,Q.stateNode.containerInfo),Ue=Q.pendingProps,j===null?Q.child=Ry(Q,null,Ue,xe):uv(j,Q,Ue,xe),Q.child;case 11:return tC(j,Q,Q.type,Q.pendingProps,xe);case 7:return uv(j,Q,Q.pendingProps,xe),Q.child;case 8:return uv(j,Q,Q.pendingProps.children,xe),Q.child;case 12:return uv(j,Q,Q.pendingProps.children,xe),Q.child;case 10:return Ue=Q.pendingProps,ky(Q,Q.type,Ue.value),uv(j,Q,Ue.children,xe),Q.child;case 9:return xt=Q.type._context,Ue=Q.pendingProps.children,Ig(Q),xt=lv(xt),Ue=Ue(xt),Q.flags|=1,uv(j,Q,Ue,xe),Q.child;case 14:return rC(j,Q,Q.type,Q.pendingProps,xe);case 15:return E2(j,Q,Q.type,Q.pendingProps,xe);case 19:return lC(j,Q,xe);case 31:return VL(j,Q,xe);case 22:return nC(j,Q,xe,Q.pendingProps);case 24:return Ig(Q),Ue=lv(Td),j===null?(xt=AA(),xt===null&&(xt=Xf,Bt=TA(),xt.pooledCache=Bt,Bt.refCount++,Bt!==null&&(xt.pooledCacheLanes|=xe),xt=Bt),Q.memoizedState={parent:Ue,cache:xt},MA(Q),ky(Q,Td,xt)):((j.lanes&xe)!==0&&(CA(j,Q),Bx(Q,null,null,xe),Fx()),xt=j.memoizedState,Bt=Q.memoizedState,xt.parent!==Ue?(xt={parent:Ue,cache:Ue},Q.memoizedState=xt,Q.lanes===0&&(Q.memoizedState=Q.updateQueue.baseState=xt),ky(Q,Td,Ue)):(Ue=Bt.cache,ky(Q,Td,Ue),Ue!==xt.cache&&wA(Q,[Td],xe,!0))),uv(j,Q,Q.pendingProps.children,xe),Q.child;case 29:throw Q.pendingProps}throw Error(L(156,Q.tag))}function u0(j){j.flags|=4}function sS(j,Q,xe,Ue,xt){if((Q=(j.mode&32)!==0)&&(Q=!1),Q){if(j.flags|=16777216,(xt&335544128)===xt)if(j.stateNode.complete)j.flags|=8192;else if(kC())j.flags|=8192;else throw zg=Yw,Ww}else j.flags&=-16777217}function cC(j,Q){if(Q.type!=="stylesheet"||(Q.state.loading&4)!==0)j.flags&=-16777217;else if(j.flags|=16777216,!Ud(Q))if(kC())j.flags|=8192;else throw zg=Yw,Ww}function L2(j,Q){Q!==null&&(j.flags|=4),j.flags&16384&&(Q=j.tag!==22?Vf():536870912,j.lanes|=Q,qy|=Q)}function Kx(j,Q){if(!Ku)switch(j.tailMode){case"hidden":Q=j.tail;for(var xe=null;Q!==null;)Q.alternate!==null&&(xe=Q),Q=Q.sibling;xe===null?j.tail=null:xe.sibling=null;break;case"collapsed":xe=j.tail;for(var Ue=null;xe!==null;)xe.alternate!==null&&(Ue=xe),xe=xe.sibling;Ue===null?Q||j.tail===null?j.tail=null:j.tail.sibling=null:Ue.sibling=null}}function hh(j){var Q=j.alternate!==null&&j.alternate.child===j.child,xe=0,Ue=0;if(Q)for(var xt=j.child;xt!==null;)xe|=xt.lanes|xt.childLanes,Ue|=xt.subtreeFlags&65011712,Ue|=xt.flags&65011712,xt.return=j,xt=xt.sibling;else for(xt=j.child;xt!==null;)xe|=xt.lanes|xt.childLanes,Ue|=xt.subtreeFlags,Ue|=xt.flags,xt.return=j,xt=xt.sibling;return j.subtreeFlags|=Ue,j.childLanes=xe,Q}function HL(j,Q,xe){var Ue=Q.pendingProps;switch(Pg(Q),Q.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hh(Q),null;case 1:return hh(Q),null;case 3:return xe=Q.stateNode,Ue=null,j!==null&&(Ue=j.memoizedState.cache),Q.memoizedState.cache!==Ue&&(Q.flags|=2048),zm(Td),Bo(),xe.pendingContext&&(xe.context=xe.pendingContext,xe.pendingContext=null),(j===null||j.child===null)&&(X1(Q)?u0(Q):j===null||j.memoizedState.isDehydrated&&(Q.flags&256)===0||(Q.flags|=1024,_A())),hh(Q),null;case 26:var xt=Q.type,Bt=Q.memoizedState;return j===null?(u0(Q),Bt!==null?(hh(Q),cC(Q,Bt)):(hh(Q),sS(Q,xt,null,Ue,xe))):Bt?Bt!==j.memoizedState?(u0(Q),hh(Q),cC(Q,Bt)):(hh(Q),Q.flags&=-16777217):(j=j.memoizedProps,j!==Ue&&u0(Q),hh(Q),sS(Q,xt,j,Ue,xe)),null;case 27:if(ns(Q),xe=co.current,xt=Q.type,j!==null&&Q.stateNode!=null)j.memoizedProps!==Ue&&u0(Q);else{if(!Ue){if(Q.stateNode===null)throw Error(L(166));return hh(Q),null}j=so.current,X1(Q)?Lh(Q):(j=$2(xt,Ue,xe),Q.stateNode=j,u0(Q))}return hh(Q),null;case 5:if(ns(Q),xt=Q.type,j!==null&&Q.stateNode!=null)j.memoizedProps!==Ue&&u0(Q);else{if(!Ue){if(Q.stateNode===null)throw Error(L(166));return hh(Q),null}if(Bt=so.current,X1(Q))Lh(Q);else{var Gr=xp(co.current);switch(Bt){case 1:Bt=Gr.createElementNS("http://www.w3.org/2000/svg",xt);break;case 2:Bt=Gr.createElementNS("http://www.w3.org/1998/Math/MathML",xt);break;default:switch(xt){case"svg":Bt=Gr.createElementNS("http://www.w3.org/2000/svg",xt);break;case"math":Bt=Gr.createElementNS("http://www.w3.org/1998/Math/MathML",xt);break;case"script":Bt=Gr.createElement("div"),Bt.innerHTML="<script><\/script>",Bt=Bt.removeChild(Bt.firstChild);break;case"select":Bt=typeof Ue.is=="string"?Gr.createElement("select",{is:Ue.is}):Gr.createElement("select"),Ue.multiple?Bt.multiple=!0:Ue.size&&(Bt.size=Ue.size);break;default:Bt=typeof Ue.is=="string"?Gr.createElement(xt,{is:Ue.is}):Gr.createElement(xt)}}Bt[Il]=Q,Bt[Fv]=Ue;e:for(Gr=Q.child;Gr!==null;){if(Gr.tag===5||Gr.tag===6)Bt.appendChild(Gr.stateNode);else if(Gr.tag!==4&&Gr.tag!==27&&Gr.child!==null){Gr.child.return=Gr,Gr=Gr.child;continue}if(Gr===Q)break e;for(;Gr.sibling===null;){if(Gr.return===null||Gr.return===Q)break e;Gr=Gr.return}Gr.sibling.return=Gr.return,Gr=Gr.sibling}Q.stateNode=Bt;e:switch(Md(Bt,xt,Ue),xt){case"button":case"input":case"select":case"textarea":Ue=!!Ue.autoFocus;break e;case"img":Ue=!0;break e;default:Ue=!1}Ue&&u0(Q)}}return hh(Q),sS(Q,Q.type,j===null?null:j.memoizedProps,Q.pendingProps,xe),null;case 6:if(j&&Q.stateNode!=null)j.memoizedProps!==Ue&&u0(Q);else{if(typeof Ue!="string"&&Q.stateNode===null)throw Error(L(166));if(j=co.current,X1(Q)){if(j=Q.stateNode,xe=Q.memoizedProps,Ue=null,xt=sv,xt!==null)switch(xt.tag){case 27:case 5:Ue=xt.memoizedProps}j[Il]=Q,j=!!(j.nodeValue===xe||Ue!==null&&Ue.suppressHydrationWarning===!0||H2(j.nodeValue,xe)),j||Cy(Q,!0)}else j=xp(j).createTextNode(Ue),j[Il]=Q,Q.stateNode=j}return hh(Q),null;case 31:if(xe=Q.memoizedState,j===null||j.memoizedState!==null){if(Ue=X1(Q),xe!==null){if(j===null){if(!Ue)throw Error(L(318));if(j=Q.memoizedState,j=j!==null?j.dehydrated:null,!j)throw Error(L(557));j[Il]=Q}else q0(),(Q.flags&128)===0&&(Q.memoizedState=null),Q.flags|=4;hh(Q),j=!1}else xe=_A(),j!==null&&j.memoizedState!==null&&(j.memoizedState.hydrationErrors=xe),j=!0;if(!j)return Q.flags&256?($p(Q),Q):($p(Q),null);if((Q.flags&128)!==0)throw Error(L(558))}return hh(Q),null;case 13:if(Ue=Q.memoizedState,j===null||j.memoizedState!==null&&j.memoizedState.dehydrated!==null){if(xt=X1(Q),Ue!==null&&Ue.dehydrated!==null){if(j===null){if(!xt)throw Error(L(318));if(xt=Q.memoizedState,xt=xt!==null?xt.dehydrated:null,!xt)throw Error(L(317));xt[Il]=Q}else q0(),(Q.flags&128)===0&&(Q.memoizedState=null),Q.flags|=4;hh(Q),xt=!1}else xt=_A(),j!==null&&j.memoizedState!==null&&(j.memoizedState.hydrationErrors=xt),xt=!0;if(!xt)return Q.flags&256?($p(Q),Q):($p(Q),null)}return $p(Q),(Q.flags&128)!==0?(Q.lanes=xe,Q):(xe=Ue!==null,j=j!==null&&j.memoizedState!==null,xe&&(Ue=Q.child,xt=null,Ue.alternate!==null&&Ue.alternate.memoizedState!==null&&Ue.alternate.memoizedState.cachePool!==null&&(xt=Ue.alternate.memoizedState.cachePool.pool),Bt=null,Ue.memoizedState!==null&&Ue.memoizedState.cachePool!==null&&(Bt=Ue.memoizedState.cachePool.pool),Bt!==xt&&(Ue.flags|=2048)),xe!==j&&xe&&(Q.child.flags|=8192),L2(Q,Q.updateQueue),hh(Q),null);case 4:return Bo(),j===null&&x_(Q.stateNode.containerInfo),hh(Q),null;case 10:return zm(Q.type),hh(Q),null;case 19:if(_a(mc),Ue=Q.memoizedState,Ue===null)return hh(Q),null;if(xt=(Q.flags&128)!==0,Bt=Ue.rendering,Bt===null)if(xt)Kx(Ue,!1);else{if(Xh!==0||j!==null&&(j.flags&128)!==0)for(j=Q.child;j!==null;){if(Bt=J1(j),Bt!==null){for(Q.flags|=128,Kx(Ue,!1),j=Bt.updateQueue,Q.updateQueue=j,L2(Q,j),Q.subtreeFlags=0,j=xe,xe=Q.child;xe!==null;)wM(xe,j),xe=xe.sibling;return Li(mc,mc.current&1|2),Ku&&Hh(Q,Ue.treeForkCount),Q.child}j=j.sibling}Ue.tail!==null&&nv()>D2&&(Q.flags|=128,xt=!0,Kx(Ue,!1),Q.lanes=4194304)}else{if(!xt)if(j=J1(Bt),j!==null){if(Q.flags|=128,xt=!0,j=j.updateQueue,Q.updateQueue=j,L2(Q,j),Kx(Ue,!0),Ue.tail===null&&Ue.tailMode==="hidden"&&!Bt.alternate&&!Ku)return hh(Q),null}else 2*nv()-Ue.renderingStartTime>D2&&xe!==536870912&&(Q.flags|=128,xt=!0,Kx(Ue,!1),Q.lanes=4194304);Ue.isBackwards?(Bt.sibling=Q.child,Q.child=Bt):(j=Ue.last,j!==null?j.sibling=Bt:Q.child=Bt,Ue.last=Bt)}return Ue.tail!==null?(j=Ue.tail,Ue.rendering=j,Ue.tail=j.sibling,Ue.renderingStartTime=nv(),j.sibling=null,xe=mc.current,Li(mc,xt?xe&1|2:xe&1),Ku&&Hh(Q,Ue.treeForkCount),j):(hh(Q),null);case 22:case 23:return $p(Q),Oy(),Ue=Q.memoizedState!==null,j!==null?j.memoizedState!==null!==Ue&&(Q.flags|=8192):Ue&&(Q.flags|=8192),Ue?(xe&536870912)!==0&&(Q.flags&128)===0&&(hh(Q),Q.subtreeFlags&6&&(Q.flags|=8192)):hh(Q),xe=Q.updateQueue,xe!==null&&L2(Q,xe.retryQueue),xe=null,j!==null&&j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(xe=j.memoizedState.cachePool.pool),Ue=null,Q.memoizedState!==null&&Q.memoizedState.cachePool!==null&&(Ue=Q.memoizedState.cachePool.pool),Ue!==xe&&(Q.flags|=2048),j!==null&&_a(Py),null;case 24:return xe=null,j!==null&&(xe=j.memoizedState.cache),Q.memoizedState.cache!==xe&&(Q.flags|=2048),zm(Td),hh(Q),null;case 25:return null;case 30:return null}throw Error(L(156,Q.tag))}function GL(j,Q){switch(Pg(Q),Q.tag){case 1:return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 3:return zm(Td),Bo(),j=Q.flags,(j&65536)!==0&&(j&128)===0?(Q.flags=j&-65537|128,Q):null;case 26:case 27:case 5:return ns(Q),null;case 31:if(Q.memoizedState!==null){if($p(Q),Q.alternate===null)throw Error(L(340));q0()}return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 13:if($p(Q),j=Q.memoizedState,j!==null&&j.dehydrated!==null){if(Q.alternate===null)throw Error(L(340));q0()}return j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 19:return _a(mc),null;case 4:return Bo(),null;case 10:return zm(Q.type),null;case 22:case 23:return $p(Q),Oy(),j!==null&&_a(Py),j=Q.flags,j&65536?(Q.flags=j&-65537|128,Q):null;case 24:return zm(Td),null;case 25:return null;default:return null}}function fC(j,Q){switch(Pg(Q),Q.tag){case 3:zm(Td),Bo();break;case 26:case 27:case 5:ns(Q);break;case 4:Bo();break;case 31:Q.memoizedState!==null&&$p(Q);break;case 13:$p(Q);break;case 19:_a(mc);break;case 10:zm(Q.type);break;case 22:case 23:$p(Q),Oy(),j!==null&&_a(Py);break;case 24:zm(Td)}}function Jx(j,Q){try{var xe=Q.updateQueue,Ue=xe!==null?xe.lastEffect:null;if(Ue!==null){var xt=Ue.next;xe=xt;do{if((xe.tag&j)===j){Ue=void 0;var Bt=xe.create,Gr=xe.inst;Ue=Bt(),Gr.destroy=Ue}xe=xe.next}while(xe!==xt)}}catch(Nn){xf(Q,Q.return,Nn)}}function lm(j,Q,xe){try{var Ue=Q.updateQueue,xt=Ue!==null?Ue.lastEffect:null;if(xt!==null){var Bt=xt.next;Ue=Bt;do{if((Ue.tag&j)===j){var Gr=Ue.inst,Nn=Gr.destroy;if(Nn!==void 0){Gr.destroy=void 0,xt=Q;var Wa=xe,Hi=Nn;try{Hi()}catch(xo){xf(xt,Wa,xo)}}}Ue=Ue.next}while(Ue!==Bt)}}catch(xo){xf(Q,Q.return,xo)}}function lS(j){var Q=j.updateQueue;if(Q!==null){var xe=j.stateNode;try{LA(Q,xe)}catch(Ue){xf(j,j.return,Ue)}}}function hC(j,Q,xe){xe.props=jg(j.type,j.memoizedProps),xe.state=j.memoizedState;try{xe.componentWillUnmount()}catch(Ue){xf(j,Q,Ue)}}function um(j,Q){try{var xe=j.ref;if(xe!==null){switch(j.tag){case 26:case 27:case 5:var Ue=j.stateNode;break;case 30:Ue=j.stateNode;break;default:Ue=j.stateNode}typeof xe=="function"?j.refCleanup=xe(Ue):xe.current=Ue}}catch(xt){xf(j,Q,xt)}}function Fm(j,Q){var xe=j.ref,Ue=j.refCleanup;if(xe!==null)if(typeof Ue=="function")try{Ue()}catch(xt){xf(j,Q,xt)}finally{j.refCleanup=null,j=j.alternate,j!=null&&(j.refCleanup=null)}else if(typeof xe=="function")try{xe(null)}catch(xt){xf(j,Q,xt)}else xe.current=null}function dC(j){var Q=j.type,xe=j.memoizedProps,Ue=j.stateNode;try{e:switch(Q){case"button":case"input":case"select":case"textarea":xe.autoFocus&&Ue.focus();break e;case"img":xe.src?Ue.src=xe.src:xe.srcSet&&(Ue.srcset=xe.srcSet)}}catch(xt){xf(j,j.return,xt)}}function uS(j,Q,xe){try{var Ue=j.stateNode;MS(Ue,j.type,xe,Q),Ue[Fv]=Q}catch(xt){xf(j,j.return,xt)}}function Ug(j){return j.tag===5||j.tag===3||j.tag===26||j.tag===27&&p0(j.type)||j.tag===4}function Qx(j){e:for(;;){for(;j.sibling===null;){if(j.return===null||Ug(j.return))return null;j=j.return}for(j.sibling.return=j.return,j=j.sibling;j.tag!==5&&j.tag!==6&&j.tag!==18;){if(j.tag===27&&p0(j.type)||j.flags&2||j.child===null||j.tag===4)continue e;j.child.return=j,j=j.child}if(!(j.flags&2))return j.stateNode}}function i_(j,Q,xe){var Ue=j.tag;if(Ue===5||Ue===6)j=j.stateNode,Q?(xe.nodeType===9?xe.body:xe.nodeName==="HTML"?xe.ownerDocument.body:xe).insertBefore(j,Q):(Q=xe.nodeType===9?xe.body:xe.nodeName==="HTML"?xe.ownerDocument.body:xe,Q.appendChild(j),xe=xe._reactRootContainer,xe!=null||Q.onclick!==null||(Q.onclick=bc));else if(Ue!==4&&(Ue===27&&p0(j.type)&&(xe=j.stateNode,Q=null),j=j.child,j!==null))for(i_(j,Q,xe),j=j.sibling;j!==null;)i_(j,Q,xe),j=j.sibling}function eb(j,Q,xe){var Ue=j.tag;if(Ue===5||Ue===6)j=j.stateNode,Q?xe.insertBefore(j,Q):xe.appendChild(j);else if(Ue!==4&&(Ue===27&&p0(j.type)&&(xe=j.stateNode),j=j.child,j!==null))for(eb(j,Q,xe),j=j.sibling;j!==null;)eb(j,Q,xe),j=j.sibling}function vC(j){var Q=j.stateNode,xe=j.memoizedProps;try{for(var Ue=j.type,xt=Q.attributes;xt.length;)Q.removeAttributeNode(xt[0]);Md(Q,Ue,xe),Q[Il]=j,Q[Fv]=xe}catch(Bt){xf(j,j.return,Bt)}}var Y0=!1,Sd=!1,cS=!1,fS=typeof WeakSet=="function"?WeakSet:Set,Gh=null;function XL(j,Q){if(j=j.containerInfo,ty=Eb,j=gM(j),j1(j)){if("selectionStart"in j)var xe={start:j.selectionStart,end:j.selectionEnd};else e:{xe=(xe=j.ownerDocument)&&xe.defaultView||window;var Ue=xe.getSelection&&xe.getSelection();if(Ue&&Ue.rangeCount!==0){xe=Ue.anchorNode;var xt=Ue.anchorOffset,Bt=Ue.focusNode;Ue=Ue.focusOffset;try{xe.nodeType,Bt.nodeType}catch{xe=null;break e}var Gr=0,Nn=-1,Wa=-1,Hi=0,xo=0,Mo=j,Zi=null;t:for(;;){for(var ro;Mo!==xe||xt!==0&&Mo.nodeType!==3||(Nn=Gr+xt),Mo!==Bt||Ue!==0&&Mo.nodeType!==3||(Wa=Gr+Ue),Mo.nodeType===3&&(Gr+=Mo.nodeValue.length),(ro=Mo.firstChild)!==null;)Zi=Mo,Mo=ro;for(;;){if(Mo===j)break t;if(Zi===xe&&++Hi===xt&&(Nn=Gr),Zi===Bt&&++xo===Ue&&(Wa=Gr),(ro=Mo.nextSibling)!==null)break;Mo=Zi,Zi=Mo.parentNode}Mo=ro}xe=Nn===-1||Wa===-1?null:{start:Nn,end:Wa}}else xe=null}xe=xe||{start:0,end:0}}else xe=null;for(Wy={focusedElem:j,selectionRange:xe},Eb=!1,Gh=Q;Gh!==null;)if(Q=Gh,j=Q.child,(Q.subtreeFlags&1028)!==0&&j!==null)j.return=Q,Gh=j;else for(;Gh!==null;){switch(Q=Gh,Bt=Q.alternate,j=Q.flags,Q.tag){case 0:if((j&4)!==0&&(j=Q.updateQueue,j=j!==null?j.events:null,j!==null))for(xe=0;xe<j.length;xe++)xt=j[xe],xt.ref.impl=xt.nextImpl;break;case 11:case 15:break;case 1:if((j&1024)!==0&&Bt!==null){j=void 0,xe=Q,xt=Bt.memoizedProps,Bt=Bt.memoizedState,Ue=xe.stateNode;try{var al=jg(xe.type,xt);j=Ue.getSnapshotBeforeUpdate(al,Bt),Ue.__reactInternalSnapshotBeforeUpdate=j}catch(Wl){xf(xe,xe.return,Wl)}}break;case 3:if((j&1024)!==0){if(j=Q.stateNode.containerInfo,xe=j.nodeType,xe===9)vb(j);else if(xe===1)switch(j.nodeName){case"HEAD":case"HTML":case"BODY":vb(j);break;default:j.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((j&1024)!==0)throw Error(L(163))}if(j=Q.sibling,j!==null){j.return=Q.return,Gh=j;break}Gh=Q.return}}function pC(j,Q,xe){var Ue=xe.flags;switch(xe.tag){case 0:case 11:case 15:Kp(j,xe),Ue&4&&Jx(5,xe);break;case 1:if(Kp(j,xe),Ue&4)if(j=xe.stateNode,Q===null)try{j.componentDidMount()}catch(Gr){xf(xe,xe.return,Gr)}else{var xt=jg(xe.type,Q.memoizedProps);Q=Q.memoizedState;try{j.componentDidUpdate(xt,Q,j.__reactInternalSnapshotBeforeUpdate)}catch(Gr){xf(xe,xe.return,Gr)}}Ue&64&&lS(xe),Ue&512&&um(xe,xe.return);break;case 3:if(Kp(j,xe),Ue&64&&(j=xe.updateQueue,j!==null)){if(Q=null,xe.child!==null)switch(xe.child.tag){case 27:case 5:Q=xe.child.stateNode;break;case 1:Q=xe.child.stateNode}try{LA(j,Q)}catch(Gr){xf(xe,xe.return,Gr)}}break;case 27:Q===null&&Ue&4&&vC(xe);case 26:case 5:Kp(j,xe),Q===null&&Ue&4&&dC(xe),Ue&512&&um(xe,xe.return);break;case 12:Kp(j,xe);break;case 31:Kp(j,xe),Ue&4&&gC(j,xe);break;case 13:Kp(j,xe),Ue&4&&_C(j,xe),Ue&64&&(j=xe.memoizedState,j!==null&&(j=j.dehydrated,j!==null&&(xe=d_.bind(null,xe),nR(j,xe))));break;case 22:if(Ue=xe.memoizedState!==null||Y0,!Ue){Q=Q!==null&&Q.memoizedState!==null||Sd,xt=Y0;var Bt=Sd;Y0=Ue,(Sd=Q)&&!Bt?c0(j,xe,(xe.subtreeFlags&8772)!==0):Kp(j,xe),Y0=xt,Sd=Bt}break;case 30:break;default:Kp(j,xe)}}function mC(j){var Q=j.alternate;Q!==null&&(j.alternate=null,mC(Q)),j.child=null,j.deletions=null,j.sibling=null,j.tag===5&&(Q=j.stateNode,Q!==null&&QT(Q)),j.stateNode=null,j.return=null,j.dependencies=null,j.memoizedProps=null,j.memoizedState=null,j.pendingProps=null,j.stateNode=null,j.updateQueue=null}var bh=null,pp=!1;function Z0(j,Q,xe){for(xe=xe.child;xe!==null;)yC(j,Q,xe),xe=xe.sibling}function yC(j,Q,xe){if(_d&&typeof _d.onCommitFiberUnmount=="function")try{_d.onCommitFiberUnmount(I0,xe)}catch{}switch(xe.tag){case 26:Sd||Fm(xe,Q),Z0(j,Q,xe),xe.memoizedState?xe.memoizedState.count--:xe.stateNode&&(xe=xe.stateNode,xe.parentNode.removeChild(xe));break;case 27:Sd||Fm(xe,Q);var Ue=bh,xt=pp;p0(xe.type)&&(bh=xe.stateNode,pp=!1),Z0(j,Q,xe),Yg(xe.stateNode),bh=Ue,pp=xt;break;case 5:Sd||Fm(xe,Q);case 6:if(Ue=bh,xt=pp,bh=null,Z0(j,Q,xe),bh=Ue,pp=xt,bh!==null)if(pp)try{(bh.nodeType===9?bh.body:bh.nodeName==="HTML"?bh.ownerDocument.body:bh).removeChild(xe.stateNode)}catch(Bt){xf(xe,Q,Bt)}else try{bh.removeChild(xe.stateNode)}catch(Bt){xf(xe,Q,Bt)}break;case 18:bh!==null&&(pp?(j=bh,IS(j.nodeType===9?j.body:j.nodeName==="HTML"?j.ownerDocument.body:j,xe.stateNode),r1(j)):IS(bh,xe.stateNode));break;case 4:Ue=bh,xt=pp,bh=xe.stateNode.containerInfo,pp=!0,Z0(j,Q,xe),bh=Ue,pp=xt;break;case 0:case 11:case 14:case 15:lm(2,xe,Q),Sd||lm(4,xe,Q),Z0(j,Q,xe);break;case 1:Sd||(Fm(xe,Q),Ue=xe.stateNode,typeof Ue.componentWillUnmount=="function"&&hC(xe,Q,Ue)),Z0(j,Q,xe);break;case 21:Z0(j,Q,xe);break;case 22:Sd=(Ue=Sd)||xe.memoizedState!==null,Z0(j,Q,xe),Sd=Ue;break;default:Z0(j,Q,xe)}}function gC(j,Q){if(Q.memoizedState===null&&(j=Q.alternate,j!==null&&(j=j.memoizedState,j!==null))){j=j.dehydrated;try{r1(j)}catch(xe){xf(Q,Q.return,xe)}}}function _C(j,Q){if(Q.memoizedState===null&&(j=Q.alternate,j!==null&&(j=j.memoizedState,j!==null&&(j=j.dehydrated,j!==null))))try{r1(j)}catch(xe){xf(Q,Q.return,xe)}}function WL(j){switch(j.tag){case 31:case 13:case 19:var Q=j.stateNode;return Q===null&&(Q=j.stateNode=new fS),Q;case 22:return j=j.stateNode,Q=j._retryCache,Q===null&&(Q=j._retryCache=new fS),Q;default:throw Error(L(435,j.tag))}}function $0(j,Q){var xe=WL(j);Q.forEach(function(Ue){if(!xe.has(Ue)){xe.add(Ue);var xt=v_.bind(null,j,Ue);Ue.then(xt,xt)}})}function wv(j,Q){var xe=Q.deletions;if(xe!==null)for(var Ue=0;Ue<xe.length;Ue++){var xt=xe[Ue],Bt=j,Gr=Q,Nn=Gr;e:for(;Nn!==null;){switch(Nn.tag){case 27:if(p0(Nn.type)){bh=Nn.stateNode,pp=!1;break e}break;case 5:bh=Nn.stateNode,pp=!1;break e;case 3:case 4:bh=Nn.stateNode.containerInfo,pp=!0;break e}Nn=Nn.return}if(bh===null)throw Error(L(160));yC(Bt,Gr,xt),bh=null,pp=!1,Bt=xt.alternate,Bt!==null&&(Bt.return=null),xt.return=null}if(Q.subtreeFlags&13886)for(Q=Q.child;Q!==null;)hS(Q,j),Q=Q.sibling}var Bm=null;function hS(j,Q){var xe=j.alternate,Ue=j.flags;switch(j.tag){case 0:case 11:case 14:case 15:wv(Q,j),rp(j),Ue&4&&(lm(3,j,j.return),Jx(3,j),lm(5,j,j.return));break;case 1:wv(Q,j),rp(j),Ue&512&&(Sd||xe===null||Fm(xe,xe.return)),Ue&64&&Y0&&(j=j.updateQueue,j!==null&&(Ue=j.callbacks,Ue!==null&&(xe=j.shared.hiddenCallbacks,j.shared.hiddenCallbacks=xe===null?Ue:xe.concat(Ue))));break;case 26:var xt=Bm;if(wv(Q,j),rp(j),Ue&512&&(Sd||xe===null||Fm(xe,xe.return)),Ue&4){var Bt=xe!==null?xe.memoizedState:null;if(Ue=j.memoizedState,xe===null)if(Ue===null)if(j.stateNode===null){e:{Ue=j.type,xe=j.memoizedProps,xt=xt.ownerDocument||xt;t:switch(Ue){case"title":Bt=xt.getElementsByTagName("title")[0],(!Bt||Bt[Xo]||Bt[Il]||Bt.namespaceURI==="http://www.w3.org/2000/svg"||Bt.hasAttribute("itemprop"))&&(Bt=xt.createElement(Ue),xt.head.insertBefore(Bt,xt.querySelector("head > title"))),Md(Bt,Ue,xe),Bt[Il]=j,av(Bt),Ue=Bt;break e;case"link":var Gr=$C("link","href",xt).get(Ue+(xe.href||""));if(Gr){for(var Nn=0;Nn<Gr.length;Nn++)if(Bt=Gr[Nn],Bt.getAttribute("href")===(xe.href==null||xe.href===""?null:xe.href)&&Bt.getAttribute("rel")===(xe.rel==null?null:xe.rel)&&Bt.getAttribute("title")===(xe.title==null?null:xe.title)&&Bt.getAttribute("crossorigin")===(xe.crossOrigin==null?null:xe.crossOrigin)){Gr.splice(Nn,1);break t}}Bt=xt.createElement(Ue),Md(Bt,Ue,xe),xt.head.appendChild(Bt);break;case"meta":if(Gr=$C("meta","content",xt).get(Ue+(xe.content||""))){for(Nn=0;Nn<Gr.length;Nn++)if(Bt=Gr[Nn],Bt.getAttribute("content")===(xe.content==null?null:""+xe.content)&&Bt.getAttribute("name")===(xe.name==null?null:xe.name)&&Bt.getAttribute("property")===(xe.property==null?null:xe.property)&&Bt.getAttribute("http-equiv")===(xe.httpEquiv==null?null:xe.httpEquiv)&&Bt.getAttribute("charset")===(xe.charSet==null?null:xe.charSet)){Gr.splice(Nn,1);break t}}Bt=xt.createElement(Ue),Md(Bt,Ue,xe),xt.head.appendChild(Bt);break;default:throw Error(L(468,Ue))}Bt[Il]=j,av(Bt),Ue=Bt}j.stateNode=Ue}else bb(xt,j.type,j.stateNode);else j.stateNode=BS(xt,Ue,j.memoizedProps);else Bt!==Ue?(Bt===null?xe.stateNode!==null&&(xe=xe.stateNode,xe.parentNode.removeChild(xe)):Bt.count--,Ue===null?bb(xt,j.type,j.stateNode):BS(xt,Ue,j.memoizedProps)):Ue===null&&j.stateNode!==null&&uS(j,j.memoizedProps,xe.memoizedProps)}break;case 27:wv(Q,j),rp(j),Ue&512&&(Sd||xe===null||Fm(xe,xe.return)),xe!==null&&Ue&4&&uS(j,j.memoizedProps,xe.memoizedProps);break;case 5:if(wv(Q,j),rp(j),Ue&512&&(Sd||xe===null||Fm(xe,xe.return)),j.flags&32){xt=j.stateNode;try{xy(xt,"")}catch(al){xf(j,j.return,al)}}Ue&4&&j.stateNode!=null&&(xt=j.memoizedProps,uS(j,xt,xe!==null?xe.memoizedProps:xt)),Ue&1024&&(cS=!0);break;case 6:if(wv(Q,j),rp(j),Ue&4){if(j.stateNode===null)throw Error(L(162));Ue=j.memoizedProps,xe=j.stateNode;try{xe.nodeValue=Ue}catch(al){xf(j,j.return,al)}}break;case 3:if(xb=null,xt=Bm,Bm=y0(Q.containerInfo),wv(Q,j),Bm=xt,rp(j),Ue&4&&xe!==null&&xe.memoizedState.isDehydrated)try{r1(Q.containerInfo)}catch(al){xf(j,j.return,al)}cS&&(cS=!1,xC(j));break;case 4:Ue=Bm,Bm=y0(j.stateNode.containerInfo),wv(Q,j),rp(j),Bm=Ue;break;case 12:wv(Q,j),rp(j);break;case 31:wv(Q,j),rp(j),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,$0(j,Ue)));break;case 13:wv(Q,j),rp(j),j.child.flags&8192&&j.memoizedState!==null!=(xe!==null&&xe.memoizedState!==null)&&(nb=nv()),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,$0(j,Ue)));break;case 22:xt=j.memoizedState!==null;var Wa=xe!==null&&xe.memoizedState!==null,Hi=Y0,xo=Sd;if(Y0=Hi||xt,Sd=xo||Wa,wv(Q,j),Sd=xo,Y0=Hi,rp(j),Ue&8192)e:for(Q=j.stateNode,Q._visibility=xt?Q._visibility&-2:Q._visibility|1,xt&&(xe===null||Wa||Y0||Sd||K0(j)),xe=null,Q=j;;){if(Q.tag===5||Q.tag===26){if(xe===null){Wa=xe=Q;try{if(Bt=Wa.stateNode,xt)Gr=Bt.style,typeof Gr.setProperty=="function"?Gr.setProperty("display","none","important"):Gr.display="none";else{Nn=Wa.stateNode;var Mo=Wa.memoizedProps.style,Zi=Mo!=null&&Mo.hasOwnProperty("display")?Mo.display:null;Nn.style.display=Zi==null||typeof Zi=="boolean"?"":(""+Zi).trim()}}catch(al){xf(Wa,Wa.return,al)}}}else if(Q.tag===6){if(xe===null){Wa=Q;try{Wa.stateNode.nodeValue=xt?"":Wa.memoizedProps}catch(al){xf(Wa,Wa.return,al)}}}else if(Q.tag===18){if(xe===null){Wa=Q;try{var ro=Wa.stateNode;xt?DS(ro,!0):DS(Wa.stateNode,!1)}catch(al){xf(Wa,Wa.return,al)}}}else if((Q.tag!==22&&Q.tag!==23||Q.memoizedState===null||Q===j)&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===j)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)break e;xe===Q&&(xe=null),Q=Q.return}xe===Q&&(xe=null),Q.sibling.return=Q.return,Q=Q.sibling}Ue&4&&(Ue=j.updateQueue,Ue!==null&&(xe=Ue.retryQueue,xe!==null&&(Ue.retryQueue=null,$0(j,xe))));break;case 19:wv(Q,j),rp(j),Ue&4&&(Ue=j.updateQueue,Ue!==null&&(j.updateQueue=null,$0(j,Ue)));break;case 30:break;case 21:break;default:wv(Q,j),rp(j)}}function rp(j){var Q=j.flags;if(Q&2){try{for(var xe,Ue=j.return;Ue!==null;){if(Ug(Ue)){xe=Ue;break}Ue=Ue.return}if(xe==null)throw Error(L(160));switch(xe.tag){case 27:var xt=xe.stateNode,Bt=Qx(j);eb(j,Bt,xt);break;case 5:var Gr=xe.stateNode;xe.flags&32&&(xy(Gr,""),xe.flags&=-33);var Nn=Qx(j);eb(j,Nn,Gr);break;case 3:case 4:var Wa=xe.stateNode.containerInfo,Hi=Qx(j);i_(j,Hi,Wa);break;default:throw Error(L(161))}}catch(xo){xf(j,j.return,xo)}j.flags&=-3}Q&4096&&(j.flags&=-4097)}function xC(j){if(j.subtreeFlags&1024)for(j=j.child;j!==null;){var Q=j;xC(Q),Q.tag===5&&Q.flags&1024&&Q.stateNode.reset(),j=j.sibling}}function Kp(j,Q){if(Q.subtreeFlags&8772)for(Q=Q.child;Q!==null;)pC(j,Q.alternate,Q),Q=Q.sibling}function K0(j){for(j=j.child;j!==null;){var Q=j;switch(Q.tag){case 0:case 11:case 14:case 15:lm(4,Q,Q.return),K0(Q);break;case 1:Fm(Q,Q.return);var xe=Q.stateNode;typeof xe.componentWillUnmount=="function"&&hC(Q,Q.return,xe),K0(Q);break;case 27:Yg(Q.stateNode);case 26:case 5:Fm(Q,Q.return),K0(Q);break;case 22:Q.memoizedState===null&&K0(Q);break;case 30:K0(Q);break;default:K0(Q)}j=j.sibling}}function c0(j,Q,xe){for(xe=xe&&(Q.subtreeFlags&8772)!==0,Q=Q.child;Q!==null;){var Ue=Q.alternate,xt=j,Bt=Q,Gr=Bt.flags;switch(Bt.tag){case 0:case 11:case 15:c0(xt,Bt,xe),Jx(4,Bt);break;case 1:if(c0(xt,Bt,xe),Ue=Bt,xt=Ue.stateNode,typeof xt.componentDidMount=="function")try{xt.componentDidMount()}catch(Hi){xf(Ue,Ue.return,Hi)}if(Ue=Bt,xt=Ue.updateQueue,xt!==null){var Nn=Ue.stateNode;try{var Wa=xt.shared.hiddenCallbacks;if(Wa!==null)for(xt.shared.hiddenCallbacks=null,xt=0;xt<Wa.length;xt++)RM(Wa[xt],Nn)}catch(Hi){xf(Ue,Ue.return,Hi)}}xe&&Gr&64&&lS(Bt),um(Bt,Bt.return);break;case 27:vC(Bt);case 26:case 5:c0(xt,Bt,xe),xe&&Ue===null&&Gr&4&&dC(Bt),um(Bt,Bt.return);break;case 12:c0(xt,Bt,xe);break;case 31:c0(xt,Bt,xe),xe&&Gr&4&&gC(xt,Bt);break;case 13:c0(xt,Bt,xe),xe&&Gr&4&&_C(xt,Bt);break;case 22:Bt.memoizedState===null&&c0(xt,Bt,xe),um(Bt,Bt.return);break;case 30:break;default:c0(xt,Bt,xe)}Q=Q.sibling}}function dS(j,Q){var xe=null;j!==null&&j.memoizedState!==null&&j.memoizedState.cachePool!==null&&(xe=j.memoizedState.cachePool.pool),j=null,Q.memoizedState!==null&&Q.memoizedState.cachePool!==null&&(j=Q.memoizedState.cachePool.pool),j!==xe&&(j!=null&&j.refCount++,xe!=null&&Lx(xe))}function vS(j,Q){j=null,Q.alternate!==null&&(j=Q.alternate.memoizedState.cache),Q=Q.memoizedState.cache,Q!==j&&(Q.refCount++,j!=null&&Lx(j))}function jm(j,Q,xe,Ue){if(Q.subtreeFlags&10256)for(Q=Q.child;Q!==null;)bC(j,Q,xe,Ue),Q=Q.sibling}function bC(j,Q,xe,Ue){var xt=Q.flags;switch(Q.tag){case 0:case 11:case 15:jm(j,Q,xe,Ue),xt&2048&&Jx(9,Q);break;case 1:jm(j,Q,xe,Ue);break;case 3:jm(j,Q,xe,Ue),xt&2048&&(j=null,Q.alternate!==null&&(j=Q.alternate.memoizedState.cache),Q=Q.memoizedState.cache,Q!==j&&(Q.refCount++,j!=null&&Lx(j)));break;case 12:if(xt&2048){jm(j,Q,xe,Ue),j=Q.stateNode;try{var Bt=Q.memoizedProps,Gr=Bt.id,Nn=Bt.onPostCommit;typeof Nn=="function"&&Nn(Gr,Q.alternate===null?"mount":"update",j.passiveEffectDuration,-0)}catch(Wa){xf(Q,Q.return,Wa)}}else jm(j,Q,xe,Ue);break;case 31:jm(j,Q,xe,Ue);break;case 13:jm(j,Q,xe,Ue);break;case 23:break;case 22:Bt=Q.stateNode,Gr=Q.alternate,Q.memoizedState!==null?Bt._visibility&2?jm(j,Q,xe,Ue):tb(j,Q):Bt._visibility&2?jm(j,Q,xe,Ue):(Bt._visibility|=2,o_(j,Q,xe,Ue,(Q.subtreeFlags&10256)!==0||!1)),xt&2048&&dS(Gr,Q);break;case 24:jm(j,Q,xe,Ue),xt&2048&&vS(Q.alternate,Q);break;default:jm(j,Q,xe,Ue)}}function o_(j,Q,xe,Ue,xt){for(xt=xt&&((Q.subtreeFlags&10256)!==0||!1),Q=Q.child;Q!==null;){var Bt=j,Gr=Q,Nn=xe,Wa=Ue,Hi=Gr.flags;switch(Gr.tag){case 0:case 11:case 15:o_(Bt,Gr,Nn,Wa,xt),Jx(8,Gr);break;case 23:break;case 22:var xo=Gr.stateNode;Gr.memoizedState!==null?xo._visibility&2?o_(Bt,Gr,Nn,Wa,xt):tb(Bt,Gr):(xo._visibility|=2,o_(Bt,Gr,Nn,Wa,xt)),xt&&Hi&2048&&dS(Gr.alternate,Gr);break;case 24:o_(Bt,Gr,Nn,Wa,xt),xt&&Hi&2048&&vS(Gr.alternate,Gr);break;default:o_(Bt,Gr,Nn,Wa,xt)}Q=Q.sibling}}function tb(j,Q){if(Q.subtreeFlags&10256)for(Q=Q.child;Q!==null;){var xe=j,Ue=Q,xt=Ue.flags;switch(Ue.tag){case 22:tb(xe,Ue),xt&2048&&dS(Ue.alternate,Ue);break;case 24:tb(xe,Ue),xt&2048&&vS(Ue.alternate,Ue);break;default:tb(xe,Ue)}Q=Q.sibling}}var qg=8192;function s_(j,Q,xe){if(j.subtreeFlags&qg)for(j=j.child;j!==null;)pS(j,Q,xe),j=j.sibling}function pS(j,Q,xe){switch(j.tag){case 26:s_(j,Q,xe),j.flags&qg&&j.memoizedState!==null&&A_(xe,Bm,j.memoizedState,j.memoizedProps);break;case 5:s_(j,Q,xe);break;case 3:case 4:var Ue=Bm;Bm=y0(j.stateNode.containerInfo),s_(j,Q,xe),Bm=Ue;break;case 22:j.memoizedState===null&&(Ue=j.alternate,Ue!==null&&Ue.memoizedState!==null?(Ue=qg,qg=16777216,s_(j,Q,xe),qg=Ue):s_(j,Q,xe));break;default:s_(j,Q,xe)}}function wC(j){var Q=j.alternate;if(Q!==null&&(j=Q.child,j!==null)){Q.child=null;do Q=j.sibling,j.sibling=null,j=Q;while(j!==null)}}function By(j){var Q=j.deletions;if((j.flags&16)!==0){if(Q!==null)for(var xe=0;xe<Q.length;xe++){var Ue=Q[xe];Gh=Ue,TC(Ue,j)}wC(j)}if(j.subtreeFlags&10256)for(j=j.child;j!==null;)l_(j),j=j.sibling}function l_(j){switch(j.tag){case 0:case 11:case 15:By(j),j.flags&2048&&lm(9,j,j.return);break;case 3:By(j);break;case 12:By(j);break;case 22:var Q=j.stateNode;j.memoizedState!==null&&Q._visibility&2&&(j.return===null||j.return.tag!==13)?(Q._visibility&=-3,R2(j)):By(j);break;default:By(j)}}function R2(j){var Q=j.deletions;if((j.flags&16)!==0){if(Q!==null)for(var xe=0;xe<Q.length;xe++){var Ue=Q[xe];Gh=Ue,TC(Ue,j)}wC(j)}for(j=j.child;j!==null;){switch(Q=j,Q.tag){case 0:case 11:case 15:lm(8,Q,Q.return),R2(Q);break;case 22:xe=Q.stateNode,xe._visibility&2&&(xe._visibility&=-3,R2(Q));break;default:R2(Q)}j=j.sibling}}function TC(j,Q){for(;Gh!==null;){var xe=Gh;switch(xe.tag){case 0:case 11:case 15:lm(8,xe,Q);break;case 23:case 22:if(xe.memoizedState!==null&&xe.memoizedState.cachePool!==null){var Ue=xe.memoizedState.cachePool.pool;Ue!=null&&Ue.refCount++}break;case 24:Lx(xe.memoizedState.cache)}if(Ue=xe.child,Ue!==null)Ue.return=xe,Gh=Ue;else e:for(xe=j;Gh!==null;){Ue=Gh;var xt=Ue.sibling,Bt=Ue.return;if(mC(Ue),Ue===xe){Gh=null;break e}if(xt!==null){xt.return=Bt,Gh=xt;break e}Gh=Bt}}}var YL={getCacheForType:function(j){var Q=lv(Td),xe=Q.data.get(j);return xe===void 0&&(xe=j(),Q.data.set(j,xe)),xe},cacheSignal:function(){return lv(Td).controller.signal}},AC=typeof WeakMap=="function"?WeakMap:Map,Nc=0,Xf=null,cc=null,fc=0,cf=0,mp=null,jy=!1,Vg=!1,Uy=!1,f0=0,Xh=0,J0=0,cm=0,mS=0,yp=0,qy=0,rb=null,gp=null,I2=!1,nb=0,SC=0,D2=1/0,O2=null,fm=null,Ed=0,Vy=null,Hg=null,Q0=0,z2=0,yS=null,EC=null,u_=0,ab=null;function qv(){return(Nc&2)!==0&&fc!==0?fc&-fc:pa.T!==null?m_():Kc()}function MC(){if(yp===0)if((fc&536870912)===0||Ku){var j=R1;R1<<=1,(R1&3932160)===0&&(R1=262144),yp=j}else yp=536870912;return j=rd.current,j!==null&&(j.flags|=32),yp}function _p(j,Q,xe){(j===Xf&&(cf===2||cf===9)||j.cancelPendingCommit!==null)&&(f_(j,0),Hy(j,fc,yp,!1)),gv(j,xe),((Nc&2)===0||j!==Xf)&&(j===Xf&&((Nc&2)===0&&(cm|=xe),Xh===4&&Hy(j,fc,yp,!1)),d0(j))}function gS(j,Q,xe){if((Nc&6)!==0)throw Error(L(327));var Ue=!xe&&(Q&127)===0&&(Q&j.expiredLanes)===0||nu(j,Q),xt=Ue?KL(j,Q):ib(j,Q,!0),Bt=Ue;do{if(xt===0){Vg&&!Ue&&Hy(j,Q,0,!1);break}else{if(xe=j.current.alternate,Bt&&!ZL(xe)){xt=ib(j,Q,!1),Bt=!1;continue}if(xt===2){if(Bt=Q,j.errorRecoveryDisabledLanes&Bt)var Gr=0;else Gr=j.pendingLanes&-536870913,Gr=Gr!==0?Gr:Gr&536870912?536870912:0;if(Gr!==0){Q=Gr;e:{var Nn=j;xt=rb;var Wa=Nn.current.memoizedState.isDehydrated;if(Wa&&(f_(Nn,Gr).flags|=256),Gr=ib(Nn,Gr,!1),Gr!==2){if(Uy&&!Wa){Nn.errorRecoveryDisabledLanes|=Bt,cm|=Bt,xt=4;break e}Bt=gp,gp=xt,Bt!==null&&(gp===null?gp=Bt:gp.push.apply(gp,Bt))}xt=Gr}if(Bt=!1,xt!==2)continue}}if(xt===1){f_(j,0),Hy(j,Q,0,!0);break}e:{switch(Ue=j,Bt=xt,Bt){case 0:case 1:throw Error(L(345));case 4:if((Q&4194048)!==Q)break;case 6:Hy(Ue,Q,yp,!jy);break e;case 2:gp=null;break;case 3:case 5:break;default:throw Error(L(329))}if((Q&62914560)===Q&&(xt=nb+300-nv(),10<xt)){if(Hy(Ue,Q,yp,!jy),I1(Ue,0,!0)!==0)break e;Q0=Q,Ue.timeoutHandle=PS(_S.bind(null,Ue,xe,gp,O2,I2,Q,yp,cm,qy,jy,Bt,"Throttled",-0,0),xt);break e}_S(Ue,xe,gp,O2,I2,Q,yp,cm,qy,jy,Bt,null,-0,0)}}break}while(!0);d0(j)}function _S(j,Q,xe,Ue,xt,Bt,Gr,Nn,Wa,Hi,xo,Mo,Zi,ro){if(j.timeoutHandle=-1,Mo=Q.subtreeFlags,Mo&8192||(Mo&16785408)===16785408){Mo={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bc},pS(Q,Bt,Mo);var al=(Bt&62914560)===Bt?nb-nv():(Bt&4194048)===Bt?SC-nv():0;if(al=a3(Mo,al),al!==null){Q0=Bt,j.cancelPendingCommit=al(DC.bind(null,j,Q,Bt,xe,Ue,xt,Gr,Nn,Wa,xo,Mo,null,Zi,ro)),Hy(j,Bt,Gr,!Hi);return}}DC(j,Q,Bt,xe,Ue,xt,Gr,Nn,Wa)}function ZL(j){for(var Q=j;;){var xe=Q.tag;if((xe===0||xe===11||xe===15)&&Q.flags&16384&&(xe=Q.updateQueue,xe!==null&&(xe=xe.stores,xe!==null)))for(var Ue=0;Ue<xe.length;Ue++){var xt=xe[Ue],Bt=xt.getSnapshot;xt=xt.value;try{if(!Vp(Bt(),xt))return!1}catch{return!1}}if(xe=Q.child,Q.subtreeFlags&16384&&xe!==null)xe.return=Q,Q=xe;else{if(Q===j)break;for(;Q.sibling===null;){if(Q.return===null||Q.return===j)return!0;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}return!0}function Hy(j,Q,xe,Ue){Q&=~mS,Q&=~cm,j.suspendedLanes|=Q,j.pingedLanes&=~Q,Ue&&(j.warmLanes|=Q),Ue=j.expirationTimes;for(var xt=Q;0<xt;){var Bt=31-xd(xt),Gr=1<<Bt;Ue[Bt]=-1,xt&=~Gr}xe!==0&&r0(j,xe,Q)}function N2(){return(Nc&6)===0?(ob(0),!1):!0}function c_(){if(cc!==null){if(cf===0)var j=cc.return;else j=cc,V0=Lg=null,NA(j),$1=null,Ox=0,j=cc;for(;j!==null;)fC(j.alternate,j),j=j.return;cc=null}}function f_(j,Q){var xe=j.timeoutHandle;xe!==-1&&(j.timeoutHandle=-1,WC(xe)),xe=j.cancelPendingCommit,xe!==null&&(j.cancelPendingCommit=null,xe()),Q0=0,c_(),Xf=j,cc=xe=ov(j.current,null),fc=Q,cf=0,mp=null,jy=!1,Vg=nu(j,Q),Uy=!1,qy=yp=mS=cm=J0=Xh=0,gp=rb=null,I2=!1,(Q&8)!==0&&(Q|=Q&32);var Ue=j.entangledLanes;if(Ue!==0)for(j=j.entanglements,Ue&=Q;0<Ue;){var xt=31-xd(Ue),Bt=1<<xt;Q|=j[xt],Ue&=~Bt}return f0=Q,kx(),xe}function CC(j,Q){hu=null,pa.H=Zx,Q===Ly||Q===Z1?(Q=Zw(),cf=3):Q===Ww?(Q=Zw(),cf=4):cf=Q===$A?8:Q!==null&&typeof Q=="object"&&typeof Q.then=="function"?6:1,mp=Q,cc===null&&(Xh=1,S2(j,Vh(Q,j.current)))}function kC(){var j=rd.current;return j===null?!0:(fc&4194048)===fc?dp===null:(fc&62914560)===fc||(fc&536870912)!==0?j===dp:!1}function PC(){var j=pa.H;return pa.H=Zx,j===null?Zx:j}function Fc(){var j=pa.A;return pa.A=YL,j}function F2(){Xh=4,jy||(fc&4194048)!==fc&&rd.current!==null||(Vg=!0),(J0&134217727)===0&&(cm&134217727)===0||Xf===null||Hy(Xf,fc,yp,!1)}function ib(j,Q,xe){var Ue=Nc;Nc|=2;var xt=PC(),Bt=Fc();(Xf!==j||fc!==Q)&&(O2=null,f_(j,Q)),Q=!1;var Gr=Xh;e:do try{if(cf!==0&&cc!==null){var Nn=cc,Wa=mp;switch(cf){case 8:c_(),Gr=6;break e;case 3:case 2:case 9:case 6:rd.current===null&&(Q=!0);var Hi=cf;if(cf=0,mp=null,h_(j,Nn,Wa,Hi),xe&&Vg){Gr=0;break e}break;default:Hi=cf,cf=0,mp=null,h_(j,Nn,Wa,Hi)}}$L(),Gr=Xh;break}catch(xo){CC(j,xo)}while(!0);return Q&&j.shellSuspendCounter++,V0=Lg=null,Nc=Ue,pa.H=xt,pa.A=Bt,cc===null&&(Xf=null,fc=0,kx()),Gr}function $L(){for(;cc!==null;)LC(cc)}function KL(j,Q){var xe=Nc;Nc|=2;var Ue=PC(),xt=Fc();Xf!==j||fc!==Q?(O2=null,D2=nv()+500,f_(j,Q)):Vg=nu(j,Q);e:do try{if(cf!==0&&cc!==null){Q=cc;var Bt=mp;t:switch(cf){case 1:cf=0,mp=null,h_(j,Q,Bt,1);break;case 2:case 9:if(kM(Bt)){cf=0,mp=null,RC(Q);break}Q=function(){cf!==2&&cf!==9||Xf!==j||(cf=7),d0(j)},Bt.then(Q,Q);break e;case 3:cf=7;break e;case 4:cf=5;break e;case 7:kM(Bt)?(cf=0,mp=null,RC(Q)):(cf=0,mp=null,h_(j,Q,Bt,7));break;case 5:var Gr=null;switch(cc.tag){case 26:Gr=cc.memoizedState;case 5:case 27:var Nn=cc;if(Gr?Ud(Gr):Nn.stateNode.complete){cf=0,mp=null;var Wa=Nn.sibling;if(Wa!==null)cc=Wa;else{var Hi=Nn.return;Hi!==null?(cc=Hi,B2(Hi)):cc=null}break t}}cf=0,mp=null,h_(j,Q,Bt,5);break;case 6:cf=0,mp=null,h_(j,Q,Bt,6);break;case 8:c_(),Xh=6;break e;default:throw Error(L(462))}}JL();break}catch(xo){CC(j,xo)}while(!0);return V0=Lg=null,pa.H=Ue,pa.A=xt,Nc=xe,cc!==null?0:(Xf=null,fc=0,kx(),Xh)}function JL(){for(;cc!==null&&!Bp();)LC(cc)}function LC(j){var Q=a_(j.alternate,j,f0);j.memoizedProps=j.pendingProps,Q===null?B2(j):cc=Q}function RC(j){var Q=j,xe=Q.alternate;switch(Q.tag){case 15:case 0:Q=JA(xe,Q,Q.pendingProps,Q.type,void 0,fc);break;case 11:Q=JA(xe,Q,Q.pendingProps,Q.type.render,Q.ref,fc);break;case 5:NA(Q);default:fC(xe,Q),Q=cc=wM(Q,f0),Q=a_(xe,Q,f0)}j.memoizedProps=j.pendingProps,Q===null?B2(j):cc=Q}function h_(j,Q,xe,Ue){V0=Lg=null,NA(Q),$1=null,Ox=0;var xt=Q.return;try{if(qL(j,xt,Q,xe,fc)){Xh=1,S2(j,Vh(xe,j.current)),cc=null;return}}catch(Bt){if(xt!==null)throw cc=xt,Bt;Xh=1,S2(j,Vh(xe,j.current)),cc=null;return}Q.flags&32768?(Ku||Ue===1?j=!0:Vg||(fc&536870912)!==0?j=!1:(jy=j=!0,(Ue===2||Ue===9||Ue===3||Ue===6)&&(Ue=rd.current,Ue!==null&&Ue.tag===13&&(Ue.flags|=16384))),IC(Q,j)):B2(Q)}function B2(j){var Q=j;do{if((Q.flags&32768)!==0){IC(Q,jy);return}j=Q.return;var xe=HL(Q.alternate,Q,f0);if(xe!==null){cc=xe;return}if(Q=Q.sibling,Q!==null){cc=Q;return}cc=Q=j}while(Q!==null);Xh===0&&(Xh=5)}function IC(j,Q){do{var xe=GL(j.alternate,j);if(xe!==null){xe.flags&=32767,cc=xe;return}if(xe=j.return,xe!==null&&(xe.flags|=32768,xe.subtreeFlags=0,xe.deletions=null),!Q&&(j=j.sibling,j!==null)){cc=j;return}cc=j=xe}while(j!==null);Xh=6,cc=null}function DC(j,Q,xe,Ue,xt,Bt,Gr,Nn,Wa){j.cancelPendingCommit=null;do j2();while(Ed!==0);if((Nc&6)!==0)throw Error(L(327));if(Q!==null){if(Q===j.current)throw Error(L(177));if(Bt=Q.lanes|Q.childLanes,Bt|=pA,t0(j,xe,Bt,Gr,Nn,Wa),j===Xf&&(cc=Xf=null,fc=0),Hg=Q,Vy=j,Q0=xe,z2=Bt,yS=xt,EC=Ue,(Q.subtreeFlags&10256)!==0||(Q.flags&10256)!==0?(j.callbackNode=null,j.callbackPriority=0,bS(L1,function(){return BC(),null})):(j.callbackNode=null,j.callbackPriority=0),Ue=(Q.flags&13878)!==0,(Q.subtreeFlags&13878)!==0||Ue){Ue=pa.T,pa.T=null,xt=Ra.p,Ra.p=2,Gr=Nc,Nc|=4;try{XL(j,Q,xe)}finally{Nc=Gr,Ra.p=xt,pa.T=Ue}}Ed=1,OC(),zC(),NC()}}function OC(){if(Ed===1){Ed=0;var j=Vy,Q=Hg,xe=(Q.flags&13878)!==0;if((Q.subtreeFlags&13878)!==0||xe){xe=pa.T,pa.T=null;var Ue=Ra.p;Ra.p=2;var xt=Nc;Nc|=4;try{hS(Q,j);var Bt=Wy,Gr=gM(j.containerInfo),Nn=Bt.focusedElem,Wa=Bt.selectionRange;if(Gr!==Nn&&Nn&&Nn.ownerDocument&&yM(Nn.ownerDocument.documentElement,Nn)){if(Wa!==null&&j1(Nn)){var Hi=Wa.start,xo=Wa.end;if(xo===void 0&&(xo=Hi),"selectionStart"in Nn)Nn.selectionStart=Hi,Nn.selectionEnd=Math.min(xo,Nn.value.length);else{var Mo=Nn.ownerDocument||document,Zi=Mo&&Mo.defaultView||window;if(Zi.getSelection){var ro=Zi.getSelection(),al=Nn.textContent.length,Wl=Math.min(Wa.start,al),If=Wa.end===void 0?Wl:Math.min(Wa.end,al);!ro.extend&&Wl>If&&(Gr=If,If=Wl,Wl=Gr);var Ci=mM(Nn,Wl),hi=mM(Nn,If);if(Ci&&hi&&(ro.rangeCount!==1||ro.anchorNode!==Ci.node||ro.anchorOffset!==Ci.offset||ro.focusNode!==hi.node||ro.focusOffset!==hi.offset)){var Ui=Mo.createRange();Ui.setStart(Ci.node,Ci.offset),ro.removeAllRanges(),Wl>If?(ro.addRange(Ui),ro.extend(hi.node,hi.offset)):(Ui.setEnd(hi.node,hi.offset),ro.addRange(Ui))}}}}for(Mo=[],ro=Nn;ro=ro.parentNode;)ro.nodeType===1&&Mo.push({element:ro,left:ro.scrollLeft,top:ro.scrollTop});for(typeof Nn.focus=="function"&&Nn.focus(),Nn=0;Nn<Mo.length;Nn++){var bo=Mo[Nn];bo.element.scrollLeft=bo.left,bo.element.scrollTop=bo.top}}Eb=!!ty,Wy=ty=null}finally{Nc=xt,Ra.p=Ue,pa.T=xe}}j.current=Q,Ed=2}}function zC(){if(Ed===2){Ed=0;var j=Vy,Q=Hg,xe=(Q.flags&8772)!==0;if((Q.subtreeFlags&8772)!==0||xe){xe=pa.T,pa.T=null;var Ue=Ra.p;Ra.p=2;var xt=Nc;Nc|=4;try{pC(j,Q.alternate,Q)}finally{Nc=xt,Ra.p=Ue,pa.T=xe}}Ed=3}}function NC(){if(Ed===4||Ed===3){Ed=0,jp();var j=Vy,Q=Hg,xe=Q0,Ue=EC;(Q.subtreeFlags&10256)!==0||(Q.flags&10256)!==0?Ed=5:(Ed=0,Hg=Vy=null,FC(j,j.pendingLanes));var xt=j.pendingLanes;if(xt===0&&(fm=null),O1(xe),Q=Q.stateNode,_d&&typeof _d.onCommitFiberRoot=="function")try{_d.onCommitFiberRoot(I0,Q,void 0,(Q.current.flags&128)===128)}catch{}if(Ue!==null){Q=pa.T,xt=Ra.p,Ra.p=2,pa.T=null;try{for(var Bt=j.onRecoverableError,Gr=0;Gr<Ue.length;Gr++){var Nn=Ue[Gr];Bt(Nn.value,{componentStack:Nn.stack})}}finally{pa.T=Q,Ra.p=xt}}(Q0&3)!==0&&j2(),d0(j),xt=j.pendingLanes,(xe&261930)!==0&&(xt&42)!==0?j===ab?u_++:(u_=0,ab=j):u_=0,ob(0)}}function FC(j,Q){(j.pooledCacheLanes&=Q)===0&&(Q=j.pooledCache,Q!=null&&(j.pooledCache=null,Lx(Q)))}function j2(){return OC(),zC(),NC(),BC()}function BC(){if(Ed!==5)return!1;var j=Vy,Q=z2;z2=0;var xe=O1(Q0),Ue=pa.T,xt=Ra.p;try{Ra.p=32>xe?32:xe,pa.T=null,xe=yS,yS=null;var Bt=Vy,Gr=Q0;if(Ed=0,Hg=Vy=null,Q0=0,(Nc&6)!==0)throw Error(L(331));var Nn=Nc;if(Nc|=4,l_(Bt.current),bC(Bt,Bt.current,Gr,xe),Nc=Nn,ob(0,!1),_d&&typeof _d.onPostCommitFiberRoot=="function")try{_d.onPostCommitFiberRoot(I0,Bt)}catch{}return!0}finally{Ra.p=xt,pa.T=Ue,FC(j,Q)}}function jC(j,Q,xe){Q=Vh(xe,Q),Q=X0(j.stateNode,Q,2),j=Dy(j,Q,2),j!==null&&(gv(j,2),d0(j))}function xf(j,Q,xe){if(j.tag===3)jC(j,j,xe);else for(;Q!==null;){if(Q.tag===3){jC(Q,j,xe);break}else if(Q.tag===1){var Ue=Q.stateNode;if(typeof Q.type.getDerivedStateFromError=="function"||typeof Ue.componentDidCatch=="function"&&(fm===null||!fm.has(Ue))){j=Vh(xe,j),xe=QM(2),Ue=Dy(Q,xe,2),Ue!==null&&(eC(xe,Ue,Q,j),gv(Ue,2),d0(Ue));break}}Q=Q.return}}function xS(j,Q,xe){var Ue=j.pingCache;if(Ue===null){Ue=j.pingCache=new AC;var xt=new Set;Ue.set(Q,xt)}else xt=Ue.get(Q),xt===void 0&&(xt=new Set,Ue.set(Q,xt));xt.has(xe)||(Uy=!0,xt.add(xe),j=QL.bind(null,j,Q,xe),Q.then(j,j))}function QL(j,Q,xe){var Ue=j.pingCache;Ue!==null&&Ue.delete(Q),j.pingedLanes|=j.suspendedLanes&xe,j.warmLanes&=~xe,Xf===j&&(fc&xe)===xe&&(Xh===4||Xh===3&&(fc&62914560)===fc&&300>nv()-nb?(Nc&2)===0&&f_(j,0):mS|=xe,qy===fc&&(qy=0)),d0(j)}function UC(j,Q){Q===0&&(Q=Vf()),j=Lm(j,Q),j!==null&&(gv(j,Q),d0(j))}function d_(j){var Q=j.memoizedState,xe=0;Q!==null&&(xe=Q.retryLane),UC(j,xe)}function v_(j,Q){var xe=0;switch(j.tag){case 31:case 13:var Ue=j.stateNode,xt=j.memoizedState;xt!==null&&(xe=xt.retryLane);break;case 19:Ue=j.stateNode;break;case 22:Ue=j.stateNode._retryCache;break;default:throw Error(L(314))}Ue!==null&&Ue.delete(Q),UC(j,xe)}function bS(j,Q){return yv(j,Q)}var U2=null,h0=null,wS=!1,p_=!1,TS=!1,Gy=0;function d0(j){j!==h0&&j.next===null&&(h0===null?U2=h0=j:h0=h0.next=j),p_=!0,wS||(wS=!0,tR())}function ob(j,Q){if(!TS&&p_){TS=!0;do for(var xe=!1,Ue=U2;Ue!==null;){if(j!==0){var xt=Ue.pendingLanes;if(xt===0)var Bt=0;else{var Gr=Ue.suspendedLanes,Nn=Ue.pingedLanes;Bt=(1<<31-xd(42|j)+1)-1,Bt&=xt&~(Gr&~Nn),Bt=Bt&201326741?Bt&201326741|1:Bt?Bt|2:0}Bt!==0&&(xe=!0,qC(Ue,Bt))}else Bt=fc,Bt=I1(Ue,Ue===Xf?Bt:0,Ue.cancelPendingCommit!==null||Ue.timeoutHandle!==-1),(Bt&3)===0||nu(Ue,Bt)||(xe=!0,qC(Ue,Bt));Ue=Ue.next}while(xe);TS=!1}}function eR(){AS()}function AS(){p_=wS=!1;var j=0;Gy!==0&&XC()&&(j=Gy);for(var Q=nv(),xe=null,Ue=U2;Ue!==null;){var xt=Ue.next,Bt=sb(Ue,Q);Bt===0?(Ue.next=null,xe===null?U2=xt:xe.next=xt,xt===null&&(h0=xe)):(xe=Ue,(j!==0||(Bt&3)!==0)&&(p_=!0)),Ue=xt}Ed!==0&&Ed!==5||ob(j),Gy!==0&&(Gy=0)}function sb(j,Q){for(var xe=j.suspendedLanes,Ue=j.pingedLanes,xt=j.expirationTimes,Bt=j.pendingLanes&-62914561;0<Bt;){var Gr=31-xd(Bt),Nn=1<<Gr,Wa=xt[Gr];Wa===-1?((Nn&xe)===0||(Nn&Ue)!==0)&&(xt[Gr]=lf(Nn,Q)):Wa<=Q&&(j.expiredLanes|=Nn),Bt&=~Nn}if(Q=Xf,xe=fc,xe=I1(j,j===Q?xe:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),Ue=j.callbackNode,xe===0||j===Q&&(cf===2||cf===9)||j.cancelPendingCommit!==null)return Ue!==null&&Ue!==null&&Id(Ue),j.callbackNode=null,j.callbackPriority=0;if((xe&3)===0||nu(j,xe)){if(Q=xe&-xe,Q===j.callbackPriority)return Q;switch(Ue!==null&&Id(Ue),O1(xe)){case 2:case 8:xe=R0;break;case 32:xe=L1;break;case 268435456:xe=xg;break;default:xe=L1}return Ue=SS.bind(null,j),xe=yv(xe,Ue),j.callbackPriority=Q,j.callbackNode=xe,Q}return Ue!==null&&Ue!==null&&Id(Ue),j.callbackPriority=2,j.callbackNode=null,2}function SS(j,Q){if(Ed!==0&&Ed!==5)return j.callbackNode=null,j.callbackPriority=0,null;var xe=j.callbackNode;if(j2()&&j.callbackNode!==xe)return null;var Ue=fc;return Ue=I1(j,j===Xf?Ue:0,j.cancelPendingCommit!==null||j.timeoutHandle!==-1),Ue===0?null:(gS(j,Ue,Q),sb(j,nv()),j.callbackNode!=null&&j.callbackNode===xe?SS.bind(null,j):null)}function qC(j,Q){if(j2())return null;gS(j,Q,!0)}function tR(){LS(function(){(Nc&6)!==0?yv(zv,eR):AS()})}function m_(){if(Gy===0){var j=Dg;j===0&&(j=bg,bg<<=1,(bg&261888)===0&&(bg=256)),Gy=j}return Gy}function lb(j){return j==null||typeof j=="symbol"||typeof j=="boolean"?null:typeof j=="function"?j:Od(""+j)}function Gg(j,Q){var xe=Q.ownerDocument.createElement("input");return xe.name=Q.name,xe.value=Q.value,j.id&&xe.setAttribute("form",j.id),Q.parentNode.insertBefore(xe,Q),j=new FormData(j),xe.parentNode.removeChild(xe),j}function ub(j,Q,xe,Ue,xt){if(Q==="submit"&&xe&&xe.stateNode===xt){var Bt=lb((xt[Fv]||null).action),Gr=Ue.submitter;Gr&&(Q=(Q=Gr[Fv]||null)?lb(Q.formAction):Gr.getAttribute("formAction"),Q!==null&&(Bt=Q,Gr=null));var Nn=new _v("action","action",null,Ue,xt);j.push({event:Nn,listeners:[{instance:null,listener:function(){if(Ue.defaultPrevented){if(Gy!==0){var Wa=Gr?Gg(xt,Gr):new FormData(xt);b2(xe,{pending:!0,data:Wa,method:xt.method,action:Bt},null,Wa)}}else typeof Bt=="function"&&(Nn.preventDefault(),Wa=Gr?Gg(xt,Gr):new FormData(xt),b2(xe,{pending:!0,data:Wa,method:xt.method,action:Bt},Bt,Wa))},currentTarget:xt}]})}}for(var cb=0;cb<i0.length;cb++){var v0=i0[cb],VC=v0.toLowerCase(),rR=v0[0].toUpperCase()+v0.slice(1);Hp(VC,"on"+rR)}Hp(Cx,"onAnimationEnd"),Hp(fh,"onAnimationIteration"),Hp(vA,"onAnimationStart"),Hp("dblclick","onDoubleClick"),Hp("focusin","onFocus"),Hp("focusout","onBlur"),Hp(xM,"onTransitionRun"),Hp(IL,"onTransitionStart"),Hp(DL,"onTransitionCancel"),Hp(bM,"onTransitionEnd"),F1("onMouseEnter",["mouseout","mouseover"]),F1("onMouseLeave",["mouseout","mouseover"]),F1("onPointerEnter",["pointerout","pointerover"]),F1("onPointerLeave",["pointerout","pointerover"]),z0("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),z0("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),z0("onBeforeInput",["compositionend","keypress","textInput","paste"]),z0("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),z0("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),z0("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fb="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),HC=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fb));function y_(j,Q){Q=(Q&4)!==0;for(var xe=0;xe<j.length;xe++){var Ue=j[xe],xt=Ue.event;Ue=Ue.listeners;e:{var Bt=void 0;if(Q)for(var Gr=Ue.length-1;0<=Gr;Gr--){var Nn=Ue[Gr],Wa=Nn.instance,Hi=Nn.currentTarget;if(Nn=Nn.listener,Wa!==Bt&&xt.isPropagationStopped())break e;Bt=Nn,xt.currentTarget=Hi;try{Bt(xt)}catch(xo){q1(xo)}xt.currentTarget=null,Bt=Wa}else for(Gr=0;Gr<Ue.length;Gr++){if(Nn=Ue[Gr],Wa=Nn.instance,Hi=Nn.currentTarget,Nn=Nn.listener,Wa!==Bt&&xt.isPropagationStopped())break e;Bt=Nn,xt.currentTarget=Hi;try{Bt(xt)}catch(xo){q1(xo)}xt.currentTarget=null,Bt=Wa}}}}function Ju(j,Q){var xe=Q[KT];xe===void 0&&(xe=Q[KT]=new Set);var Ue=j+"__bubble";xe.has(Ue)||(jd(Q,j,2,!1),xe.add(Ue))}function g_(j,Q,xe){var Ue=0;Q&&(Ue|=4),jd(xe,j,Ue,Q)}var __="_reactListening"+Math.random().toString(36).slice(2);function x_(j){if(!j[__]){j[__]=!0,ZE.forEach(function(xe){xe!=="selectionchange"&&(HC.has(xe)||g_(xe,!1,j),g_(xe,!0,j))});var Q=j.nodeType===9?j:j.ownerDocument;Q===null||Q[__]||(Q[__]=!0,g_("selectionchange",!1,Q))}}function jd(j,Q,xe,Ue){switch(XS(Q)){case 2:var xt=JC;break;case 8:xt=oR;break;default:xt=GS}xe=xt.bind(null,Q,xe,j),xt=void 0,!zd||Q!=="touchstart"&&Q!=="touchmove"&&Q!=="wheel"||(xt=!0),Ue?xt!==void 0?j.addEventListener(Q,xe,{capture:!0,passive:xt}):j.addEventListener(Q,xe,!0):xt!==void 0?j.addEventListener(Q,xe,{passive:xt}):j.addEventListener(Q,xe,!1)}function q2(j,Q,xe,Ue,xt){var Bt=Ue;if((Q&1)===0&&(Q&2)===0&&Ue!==null)e:for(;;){if(Ue===null)return;var Gr=Ue.tag;if(Gr===3||Gr===4){var Nn=Ue.stateNode.containerInfo;if(Nn===xt)break;if(Gr===4)for(Gr=Ue.return;Gr!==null;){var Wa=Gr.tag;if((Wa===3||Wa===4)&&Gr.stateNode.containerInfo===xt)return;Gr=Gr.return}for(;Nn!==null;){if(Gr=O0(Nn),Gr===null)return;if(Wa=Gr.tag,Wa===5||Wa===6||Wa===26||Wa===27){Ue=Bt=Gr;continue e}Nn=Nn.parentNode}}Ue=Ue.return}Tg(function(){var Hi=Bt,xo=wx(xe),Mo=[];e:{var Zi=Uw.get(j);if(Zi!==void 0){var ro=_v,al=j;switch(j){case"keypress":if(Rw(xe)===0)break e;case"keydown":case"keyup":ro=SL;break;case"focusin":al="focus",ro=rA;break;case"focusout":al="blur",ro=rA;break;case"beforeblur":case"afterblur":ro=rA;break;case"click":if(xe.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ro=Cm;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ro=tM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ro=sM;break;case Cx:case fh:case vA:ro=bL;break;case bM:ro=uM;break;case"scroll":case"scrollend":ro=xL;break;case"wheel":ro=EL;break;case"copy":case"cut":case"paste":ro=TL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ro=oM;break;case"toggle":case"beforetoggle":ro=cM}var Wl=(Q&4)!==0,If=!Wl&&(j==="scroll"||j==="scrollend"),Ci=Wl?Zi!==null?Zi+"Capture":null:Zi;Wl=[];for(var hi=Hi,Ui;hi!==null;){var bo=hi;if(Ui=bo.stateNode,bo=bo.tag,bo!==5&&bo!==26&&bo!==27||Ui===null||Ci===null||(bo=B0(hi,Ci),bo!=null&&Wl.push(hb(hi,bo,Ui))),If)break;hi=hi.return}0<Wl.length&&(Zi=new ro(Zi,al,null,xe,xo),Mo.push({event:Zi,listeners:Wl}))}}if((Q&7)===0){e:{if(Zi=j==="mouseover"||j==="pointerover",ro=j==="mouseout"||j==="pointerout",Zi&&xe!==wd&&(al=xe.relatedTarget||xe.fromElement)&&(O0(al)||al[z1]))break e;if((ro||Zi)&&(Zi=xo.window===xo?xo:(Zi=xo.ownerDocument)?Zi.defaultView||Zi.parentWindow:window,ro?(al=xe.relatedTarget||xe.toElement,ro=Hi,al=al?O0(al):null,al!==null&&(If=ve(al),Wl=al.tag,al!==If||Wl!==5&&Wl!==27&&Wl!==6)&&(al=null)):(ro=null,al=Hi),ro!==al)){if(Wl=Cm,bo="onMouseLeave",Ci="onMouseEnter",hi="mouse",(j==="pointerout"||j==="pointerover")&&(Wl=oM,bo="onPointerLeave",Ci="onPointerEnter",hi="pointer"),If=ro==null?Zi:Sm(ro),Ui=al==null?Zi:Sm(al),Zi=new Wl(bo,hi+"leave",ro,xe,xo),Zi.target=If,Zi.relatedTarget=Ui,bo=null,O0(xo)===Hi&&(Wl=new Wl(Ci,hi+"enter",al,xe,xo),Wl.target=Ui,Wl.relatedTarget=If,bo=Wl),If=bo,ro&&al)t:{for(Wl=V2,Ci=ro,hi=al,Ui=0,bo=Ci;bo;bo=Wl(bo))Ui++;bo=0;for(var kl=hi;kl;kl=Wl(kl))bo++;for(;0<Ui-bo;)Ci=Wl(Ci),Ui--;for(;0<bo-Ui;)hi=Wl(hi),bo--;for(;Ui--;){if(Ci===hi||hi!==null&&Ci===hi.alternate){Wl=Ci;break t}Ci=Wl(Ci),hi=Wl(hi)}Wl=null}else Wl=null;ro!==null&&Xy(Mo,Zi,ro,Wl,!1),al!==null&&If!==null&&Xy(Mo,If,al,Wl,!0)}}e:{if(Zi=Hi?Sm(Hi):window,ro=Zi.nodeName&&Zi.nodeName.toLowerCase(),ro==="select"||ro==="input"&&Zi.type==="file")var Mc=uA;else if(Ay(Zi))if(dM)Mc=PL;else{Mc=vM;var Zs=Fw}else ro=Zi.nodeName,!ro||ro.toLowerCase()!=="input"||Zi.type!=="checkbox"&&Zi.type!=="radio"?Hi&&cp(Hi.elementType)&&(Mc=uA):Mc=kL;if(Mc&&(Mc=Mc(j,Hi))){lA(Mo,Mc,xe,xo);break e}Zs&&Zs(j,Zi,Hi),j==="focusout"&&Hi&&Zi.type==="number"&&Hi.memoizedProps.value!=null&&Tu(Zi,"number",Zi.value)}switch(Zs=Hi?Sm(Hi):window,j){case"focusin":(Ay(Zs)||Zs.contentEditable==="true")&&(U1=Zs,Bw=Hi,Sy=null);break;case"focusout":Sy=Bw=U1=null;break;case"mousedown":Ey=!0;break;case"contextmenu":case"mouseup":case"dragend":Ey=!1,a0(Mo,xe,xo);break;case"selectionchange":if(RL)break;case"keydown":case"keyup":a0(Mo,xe,xo)}var Au;if(oA)e:{switch(j){case"compositionstart":var ec="onCompositionStart";break e;case"compositionend":ec="onCompositionEnd";break e;case"compositionupdate":ec="onCompositionUpdate";break e}ec=void 0}else im?Ow(j,xe)&&(ec="onCompositionEnd"):j==="keydown"&&xe.keyCode===229&&(ec="onCompositionStart");ec&&(Pm&&xe.locale!=="ko"&&(im||ec!=="onCompositionStart"?ec==="onCompositionEnd"&&im&&(Au=eM()):(fp=xo,Lw="value"in fp?fp.value:fp.textContent,im=!0)),Zs=db(Hi,ec),0<Zs.length&&(ec=new km(ec,j,null,xe,xo),Mo.push({event:ec,listeners:Zs}),Au?ec.data=Au:(Au=zw(xe),Au!==null&&(ec.data=Au)))),(Au=nh?sA(j,xe):fM(j,xe))&&(ec=db(Hi,"onBeforeInput"),0<ec.length&&(Zs=new km("onBeforeInput","beforeinput",null,xe,xo),Mo.push({event:Zs,listeners:ec}),Zs.data=Au)),ub(Mo,j,Hi,xe,xo)}y_(Mo,Q)})}function hb(j,Q,xe){return{instance:j,listener:Q,currentTarget:xe}}function db(j,Q){for(var xe=Q+"Capture",Ue=[];j!==null;){var xt=j,Bt=xt.stateNode;if(xt=xt.tag,xt!==5&&xt!==26&&xt!==27||Bt===null||(xt=B0(j,xe),xt!=null&&Ue.unshift(hb(j,xt,Bt)),xt=B0(j,Q),xt!=null&&Ue.push(hb(j,xt,Bt))),j.tag===3)return Ue;j=j.return}return[]}function V2(j){if(j===null)return null;do j=j.return;while(j&&j.tag!==5&&j.tag!==27);return j||null}function Xy(j,Q,xe,Ue,xt){for(var Bt=Q._reactName,Gr=[];xe!==null&&xe!==Ue;){var Nn=xe,Wa=Nn.alternate,Hi=Nn.stateNode;if(Nn=Nn.tag,Wa!==null&&Wa===Ue)break;Nn!==5&&Nn!==26&&Nn!==27||Hi===null||(Wa=Hi,xt?(Hi=B0(xe,Bt),Hi!=null&&Gr.unshift(hb(xe,Hi,Wa))):xt||(Hi=B0(xe,Bt),Hi!=null&&Gr.push(hb(xe,Hi,Wa)))),xe=xe.return}Gr.length!==0&&j.push({event:Q,listeners:Gr})}var Xg=/\r\n?/g,GC=/\u0000|\uFFFD/g;function ES(j){return(typeof j=="string"?j:""+j).replace(Xg,`
`).replace(GC,"")}function H2(j,Q){return Q=ES(Q),ES(j)===Q}function Qu(j,Q,xe,Ue,xt,Bt){switch(xe){case"children":typeof Ue=="string"?Q==="body"||Q==="textarea"&&Ue===""||xy(j,Ue):(typeof Ue=="number"||typeof Ue=="bigint")&&Q!=="body"&&xy(j,""+Ue);break;case"className":Mw(j,"class",Ue);break;case"tabIndex":Mw(j,"tabindex",Ue);break;case"dir":case"role":case"viewBox":case"width":case"height":Mw(j,xe,Ue);break;case"style":uf(j,Ue,Bt);break;case"data":if(Q!=="object"){Mw(j,"data",Ue);break}case"src":case"href":if(Ue===""&&(Q!=="a"||xe!=="href")){j.removeAttribute(xe);break}if(Ue==null||typeof Ue=="function"||typeof Ue=="symbol"||typeof Ue=="boolean"){j.removeAttribute(xe);break}Ue=Od(""+Ue),j.setAttribute(xe,Ue);break;case"action":case"formAction":if(typeof Ue=="function"){j.setAttribute(xe,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof Bt=="function"&&(xe==="formAction"?(Q!=="input"&&Qu(j,Q,"name",xt.name,xt,null),Qu(j,Q,"formEncType",xt.formEncType,xt,null),Qu(j,Q,"formMethod",xt.formMethod,xt,null),Qu(j,Q,"formTarget",xt.formTarget,xt,null)):(Qu(j,Q,"encType",xt.encType,xt,null),Qu(j,Q,"method",xt.method,xt,null),Qu(j,Q,"target",xt.target,xt,null)));if(Ue==null||typeof Ue=="symbol"||typeof Ue=="boolean"){j.removeAttribute(xe);break}Ue=Od(""+Ue),j.setAttribute(xe,Ue);break;case"onClick":Ue!=null&&(j.onclick=bc);break;case"onScroll":Ue!=null&&Ju("scroll",j);break;case"onScrollEnd":Ue!=null&&Ju("scrollend",j);break;case"dangerouslySetInnerHTML":if(Ue!=null){if(typeof Ue!="object"||!("__html"in Ue))throw Error(L(61));if(xe=Ue.__html,xe!=null){if(xt.children!=null)throw Error(L(60));j.innerHTML=xe}}break;case"multiple":j.multiple=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;case"muted":j.muted=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(Ue==null||typeof Ue=="function"||typeof Ue=="boolean"||typeof Ue=="symbol"){j.removeAttribute("xlink:href");break}xe=Od(""+Ue),j.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",xe);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,""+Ue):j.removeAttribute(xe);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":Ue&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,""):j.removeAttribute(xe);break;case"capture":case"download":Ue===!0?j.setAttribute(xe,""):Ue!==!1&&Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"?j.setAttribute(xe,Ue):j.removeAttribute(xe);break;case"cols":case"rows":case"size":case"span":Ue!=null&&typeof Ue!="function"&&typeof Ue!="symbol"&&!isNaN(Ue)&&1<=Ue?j.setAttribute(xe,Ue):j.removeAttribute(xe);break;case"rowSpan":case"start":Ue==null||typeof Ue=="function"||typeof Ue=="symbol"||isNaN(Ue)?j.removeAttribute(xe):j.setAttribute(xe,Ue);break;case"popover":Ju("beforetoggle",j),Ju("toggle",j),xx(j,"popover",Ue);break;case"xlinkActuate":N0(j,"http://www.w3.org/1999/xlink","xlink:actuate",Ue);break;case"xlinkArcrole":N0(j,"http://www.w3.org/1999/xlink","xlink:arcrole",Ue);break;case"xlinkRole":N0(j,"http://www.w3.org/1999/xlink","xlink:role",Ue);break;case"xlinkShow":N0(j,"http://www.w3.org/1999/xlink","xlink:show",Ue);break;case"xlinkTitle":N0(j,"http://www.w3.org/1999/xlink","xlink:title",Ue);break;case"xlinkType":N0(j,"http://www.w3.org/1999/xlink","xlink:type",Ue);break;case"xmlBase":N0(j,"http://www.w3.org/XML/1998/namespace","xml:base",Ue);break;case"xmlLang":N0(j,"http://www.w3.org/XML/1998/namespace","xml:lang",Ue);break;case"xmlSpace":N0(j,"http://www.w3.org/XML/1998/namespace","xml:space",Ue);break;case"is":xx(j,"is",Ue);break;case"innerText":case"textContent":break;default:(!(2<xe.length)||xe[0]!=="o"&&xe[0]!=="O"||xe[1]!=="n"&&xe[1]!=="N")&&(xe=bd.get(xe)||xe,xx(j,xe,Ue))}}function G2(j,Q,xe,Ue,xt,Bt){switch(xe){case"style":uf(j,Ue,Bt);break;case"dangerouslySetInnerHTML":if(Ue!=null){if(typeof Ue!="object"||!("__html"in Ue))throw Error(L(61));if(xe=Ue.__html,xe!=null){if(xt.children!=null)throw Error(L(60));j.innerHTML=xe}}break;case"children":typeof Ue=="string"?xy(j,Ue):(typeof Ue=="number"||typeof Ue=="bigint")&&xy(j,""+Ue);break;case"onScroll":Ue!=null&&Ju("scroll",j);break;case"onScrollEnd":Ue!=null&&Ju("scrollend",j);break;case"onClick":Ue!=null&&(j.onclick=bc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$E.hasOwnProperty(xe))e:{if(xe[0]==="o"&&xe[1]==="n"&&(xt=xe.endsWith("Capture"),Q=xe.slice(2,xt?xe.length-7:void 0),Bt=j[Fv]||null,Bt=Bt!=null?Bt[xe]:null,typeof Bt=="function"&&j.removeEventListener(Q,Bt,xt),typeof Ue=="function")){typeof Bt!="function"&&Bt!==null&&(xe in j?j[xe]=null:j.hasAttribute(xe)&&j.removeAttribute(xe)),j.addEventListener(Q,Ue,xt);break e}xe in j?j[xe]=Ue:Ue===!0?j.setAttribute(xe,""):xx(j,xe,Ue)}}}function Md(j,Q,xe){switch(Q){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ju("error",j),Ju("load",j);var Ue=!1,xt=!1,Bt;for(Bt in xe)if(xe.hasOwnProperty(Bt)){var Gr=xe[Bt];if(Gr!=null)switch(Bt){case"src":Ue=!0;break;case"srcSet":xt=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,Q));default:Qu(j,Q,Bt,Gr,xe,null)}}xt&&Qu(j,Q,"srcSet",xe.srcSet,xe,null),Ue&&Qu(j,Q,"src",xe.src,xe,null);return;case"input":Ju("invalid",j);var Nn=Bt=Gr=xt=null,Wa=null,Hi=null;for(Ue in xe)if(xe.hasOwnProperty(Ue)){var xo=xe[Ue];if(xo!=null)switch(Ue){case"name":xt=xo;break;case"type":Gr=xo;break;case"checked":Wa=xo;break;case"defaultChecked":Hi=xo;break;case"value":Bt=xo;break;case"defaultValue":Nn=xo;break;case"children":case"dangerouslySetInnerHTML":if(xo!=null)throw Error(L(137,Q));break;default:Qu(j,Q,Ue,xo,xe,null)}}B1(j,Bt,Nn,Wa,Hi,Gr,xt,!1);return;case"select":Ju("invalid",j),Ue=Gr=Bt=null;for(xt in xe)if(xe.hasOwnProperty(xt)&&(Nn=xe[xt],Nn!=null))switch(xt){case"value":Bt=Nn;break;case"defaultValue":Gr=Nn;break;case"multiple":Ue=Nn;default:Qu(j,Q,xt,Nn,xe,null)}Q=Bt,xe=Gr,j.multiple=!!Ue,Q!=null?xh(j,!!Ue,Q,!1):xe!=null&&xh(j,!!Ue,xe,!0);return;case"textarea":Ju("invalid",j),Bt=xt=Ue=null;for(Gr in xe)if(xe.hasOwnProperty(Gr)&&(Nn=xe[Gr],Nn!=null))switch(Gr){case"value":Ue=Nn;break;case"defaultValue":xt=Nn;break;case"children":Bt=Nn;break;case"dangerouslySetInnerHTML":if(Nn!=null)throw Error(L(91));break;default:Qu(j,Q,Gr,Nn,xe,null)}_y(j,Ue,xt,Bt);return;case"option":for(Wa in xe)if(xe.hasOwnProperty(Wa)&&(Ue=xe[Wa],Ue!=null))switch(Wa){case"selected":j.selected=Ue&&typeof Ue!="function"&&typeof Ue!="symbol";break;default:Qu(j,Q,Wa,Ue,xe,null)}return;case"dialog":Ju("beforetoggle",j),Ju("toggle",j),Ju("cancel",j),Ju("close",j);break;case"iframe":case"object":Ju("load",j);break;case"video":case"audio":for(Ue=0;Ue<fb.length;Ue++)Ju(fb[Ue],j);break;case"image":Ju("error",j),Ju("load",j);break;case"details":Ju("toggle",j);break;case"embed":case"source":case"link":Ju("error",j),Ju("load",j);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Hi in xe)if(xe.hasOwnProperty(Hi)&&(Ue=xe[Hi],Ue!=null))switch(Hi){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,Q));default:Qu(j,Q,Hi,Ue,xe,null)}return;default:if(cp(Q)){for(xo in xe)xe.hasOwnProperty(xo)&&(Ue=xe[xo],Ue!==void 0&&G2(j,Q,xo,Ue,xe,void 0));return}}for(Nn in xe)xe.hasOwnProperty(Nn)&&(Ue=xe[Nn],Ue!=null&&Qu(j,Q,Nn,Ue,xe,null))}function MS(j,Q,xe,Ue){switch(Q){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var xt=null,Bt=null,Gr=null,Nn=null,Wa=null,Hi=null,xo=null;for(ro in xe){var Mo=xe[ro];if(xe.hasOwnProperty(ro)&&Mo!=null)switch(ro){case"checked":break;case"value":break;case"defaultValue":Wa=Mo;default:Ue.hasOwnProperty(ro)||Qu(j,Q,ro,null,Ue,Mo)}}for(var Zi in Ue){var ro=Ue[Zi];if(Mo=xe[Zi],Ue.hasOwnProperty(Zi)&&(ro!=null||Mo!=null))switch(Zi){case"type":Bt=ro;break;case"name":xt=ro;break;case"checked":Hi=ro;break;case"defaultChecked":xo=ro;break;case"value":Gr=ro;break;case"defaultValue":Nn=ro;break;case"children":case"dangerouslySetInnerHTML":if(ro!=null)throw Error(L(137,Q));break;default:ro!==Mo&&Qu(j,Q,Zi,ro,Ue,Mo)}}kw(j,Gr,Nn,Wa,Hi,xo,Bt,xt);return;case"select":ro=Gr=Nn=Zi=null;for(Bt in xe)if(Wa=xe[Bt],xe.hasOwnProperty(Bt)&&Wa!=null)switch(Bt){case"value":break;case"multiple":ro=Wa;default:Ue.hasOwnProperty(Bt)||Qu(j,Q,Bt,null,Ue,Wa)}for(xt in Ue)if(Bt=Ue[xt],Wa=xe[xt],Ue.hasOwnProperty(xt)&&(Bt!=null||Wa!=null))switch(xt){case"value":Zi=Bt;break;case"defaultValue":Nn=Bt;break;case"multiple":Gr=Bt;default:Bt!==Wa&&Qu(j,Q,xt,Bt,Ue,Wa)}Q=Nn,xe=Gr,Ue=ro,Zi!=null?xh(j,!!xe,Zi,!1):!!Ue!=!!xe&&(Q!=null?xh(j,!!xe,Q,!0):xh(j,!!xe,xe?[]:"",!1));return;case"textarea":ro=Zi=null;for(Nn in xe)if(xt=xe[Nn],xe.hasOwnProperty(Nn)&&xt!=null&&!Ue.hasOwnProperty(Nn))switch(Nn){case"value":break;case"children":break;default:Qu(j,Q,Nn,null,Ue,xt)}for(Gr in Ue)if(xt=Ue[Gr],Bt=xe[Gr],Ue.hasOwnProperty(Gr)&&(xt!=null||Bt!=null))switch(Gr){case"value":Zi=xt;break;case"defaultValue":ro=xt;break;case"children":break;case"dangerouslySetInnerHTML":if(xt!=null)throw Error(L(91));break;default:xt!==Bt&&Qu(j,Q,Gr,xt,Ue,Bt)}Hf(j,Zi,ro);return;case"option":for(var al in xe)if(Zi=xe[al],xe.hasOwnProperty(al)&&Zi!=null&&!Ue.hasOwnProperty(al))switch(al){case"selected":j.selected=!1;break;default:Qu(j,Q,al,null,Ue,Zi)}for(Wa in Ue)if(Zi=Ue[Wa],ro=xe[Wa],Ue.hasOwnProperty(Wa)&&Zi!==ro&&(Zi!=null||ro!=null))switch(Wa){case"selected":j.selected=Zi&&typeof Zi!="function"&&typeof Zi!="symbol";break;default:Qu(j,Q,Wa,Zi,Ue,ro)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Wl in xe)Zi=xe[Wl],xe.hasOwnProperty(Wl)&&Zi!=null&&!Ue.hasOwnProperty(Wl)&&Qu(j,Q,Wl,null,Ue,Zi);for(Hi in Ue)if(Zi=Ue[Hi],ro=xe[Hi],Ue.hasOwnProperty(Hi)&&Zi!==ro&&(Zi!=null||ro!=null))switch(Hi){case"children":case"dangerouslySetInnerHTML":if(Zi!=null)throw Error(L(137,Q));break;default:Qu(j,Q,Hi,Zi,Ue,ro)}return;default:if(cp(Q)){for(var If in xe)Zi=xe[If],xe.hasOwnProperty(If)&&Zi!==void 0&&!Ue.hasOwnProperty(If)&&G2(j,Q,If,void 0,Ue,Zi);for(xo in Ue)Zi=Ue[xo],ro=xe[xo],!Ue.hasOwnProperty(xo)||Zi===ro||Zi===void 0&&ro===void 0||G2(j,Q,xo,Zi,Ue,ro);return}}for(var Ci in xe)Zi=xe[Ci],xe.hasOwnProperty(Ci)&&Zi!=null&&!Ue.hasOwnProperty(Ci)&&Qu(j,Q,Ci,null,Ue,Zi);for(Mo in Ue)Zi=Ue[Mo],ro=xe[Mo],!Ue.hasOwnProperty(Mo)||Zi===ro||Zi==null&&ro==null||Qu(j,Q,Mo,Zi,Ue,ro)}function ey(j){switch(j){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wg(){if(typeof performance.getEntriesByType=="function"){for(var j=0,Q=0,xe=performance.getEntriesByType("resource"),Ue=0;Ue<xe.length;Ue++){var xt=xe[Ue],Bt=xt.transferSize,Gr=xt.initiatorType,Nn=xt.duration;if(Bt&&Nn&&ey(Gr)){for(Gr=0,Nn=xt.responseEnd,Ue+=1;Ue<xe.length;Ue++){var Wa=xe[Ue],Hi=Wa.startTime;if(Hi>Nn)break;var xo=Wa.transferSize,Mo=Wa.initiatorType;xo&&ey(Mo)&&(Wa=Wa.responseEnd,Gr+=xo*(Wa<Nn?1:(Nn-Hi)/(Wa-Hi)))}if(--Ue,Q+=8*(Bt+Gr)/(xt.duration/1e3),j++,10<j)break}}if(0<j)return Q/j/1e6}return navigator.connection&&(j=navigator.connection.downlink,typeof j=="number")?j:5}var ty=null,Wy=null;function xp(j){return j.nodeType===9?j:j.ownerDocument}function CS(j){switch(j){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function kS(j,Q){if(j===0)switch(Q){case"svg":return 1;case"math":return 2;default:return 0}return j===1&&Q==="foreignObject"?0:j}function X2(j,Q){return j==="textarea"||j==="noscript"||typeof Q.children=="string"||typeof Q.children=="number"||typeof Q.children=="bigint"||typeof Q.dangerouslySetInnerHTML=="object"&&Q.dangerouslySetInnerHTML!==null&&Q.dangerouslySetInnerHTML.__html!=null}var W2=null;function XC(){var j=window.event;return j&&j.type==="popstate"?j===W2?!1:(W2=j,!0):(W2=null,!1)}var PS=typeof setTimeout=="function"?setTimeout:void 0,WC=typeof clearTimeout=="function"?clearTimeout:void 0,Y2=typeof Promise=="function"?Promise:void 0,LS=typeof queueMicrotask=="function"?queueMicrotask:typeof Y2<"u"?function(j){return Y2.resolve(null).then(j).catch(RS)}:PS;function RS(j){setTimeout(function(){throw j})}function p0(j){return j==="head"}function IS(j,Q){var xe=Q,Ue=0;do{var xt=xe.nextSibling;if(j.removeChild(xe),xt&&xt.nodeType===8)if(xe=xt.data,xe==="/$"||xe==="/&"){if(Ue===0){j.removeChild(xt),r1(Q);return}Ue--}else if(xe==="$"||xe==="$?"||xe==="$~"||xe==="$!"||xe==="&")Ue++;else if(xe==="html")Yg(j.ownerDocument.documentElement);else if(xe==="head"){xe=j.ownerDocument.head,Yg(xe);for(var Bt=xe.firstChild;Bt;){var Gr=Bt.nextSibling,Nn=Bt.nodeName;Bt[Xo]||Nn==="SCRIPT"||Nn==="STYLE"||Nn==="LINK"&&Bt.rel.toLowerCase()==="stylesheet"||xe.removeChild(Bt),Bt=Gr}}else xe==="body"&&Yg(j.ownerDocument.body);xe=xt}while(xe);r1(Q)}function DS(j,Q){var xe=j;j=0;do{var Ue=xe.nextSibling;if(xe.nodeType===1?Q?(xe._stashedDisplay=xe.style.display,xe.style.display="none"):(xe.style.display=xe._stashedDisplay||"",xe.getAttribute("style")===""&&xe.removeAttribute("style")):xe.nodeType===3&&(Q?(xe._stashedText=xe.nodeValue,xe.nodeValue=""):xe.nodeValue=xe._stashedText||""),Ue&&Ue.nodeType===8)if(xe=Ue.data,xe==="/$"){if(j===0)break;j--}else xe!=="$"&&xe!=="$?"&&xe!=="$~"&&xe!=="$!"||j++;xe=Ue}while(xe)}function vb(j){var Q=j.firstChild;for(Q&&Q.nodeType===10&&(Q=Q.nextSibling);Q;){var xe=Q;switch(Q=Q.nextSibling,xe.nodeName){case"HTML":case"HEAD":case"BODY":vb(xe),QT(xe);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(xe.rel.toLowerCase()==="stylesheet")continue}j.removeChild(xe)}}function m0(j,Q,xe,Ue){for(;j.nodeType===1;){var xt=xe;if(j.nodeName.toLowerCase()!==Q.toLowerCase()){if(!Ue&&(j.nodeName!=="INPUT"||j.type!=="hidden"))break}else if(Ue){if(!j[Xo])switch(Q){case"meta":if(!j.hasAttribute("itemprop"))break;return j;case"link":if(Bt=j.getAttribute("rel"),Bt==="stylesheet"&&j.hasAttribute("data-precedence"))break;if(Bt!==xt.rel||j.getAttribute("href")!==(xt.href==null||xt.href===""?null:xt.href)||j.getAttribute("crossorigin")!==(xt.crossOrigin==null?null:xt.crossOrigin)||j.getAttribute("title")!==(xt.title==null?null:xt.title))break;return j;case"style":if(j.hasAttribute("data-precedence"))break;return j;case"script":if(Bt=j.getAttribute("src"),(Bt!==(xt.src==null?null:xt.src)||j.getAttribute("type")!==(xt.type==null?null:xt.type)||j.getAttribute("crossorigin")!==(xt.crossOrigin==null?null:xt.crossOrigin))&&Bt&&j.hasAttribute("async")&&!j.hasAttribute("itemprop"))break;return j;default:return j}}else if(Q==="input"&&j.type==="hidden"){var Bt=xt.name==null?null:""+xt.name;if(xt.type==="hidden"&&j.getAttribute("name")===Bt)return j}else return j;if(j=bp(j.nextSibling),j===null)break}return null}function OS(j,Q,xe){if(Q==="")return null;for(;j.nodeType!==3;)if((j.nodeType!==1||j.nodeName!=="INPUT"||j.type!=="hidden")&&!xe||(j=bp(j.nextSibling),j===null))return null;return j}function Z2(j,Q){for(;j.nodeType!==8;)if((j.nodeType!==1||j.nodeName!=="INPUT"||j.type!=="hidden")&&!Q||(j=bp(j.nextSibling),j===null))return null;return j}function pb(j){return j.data==="$?"||j.data==="$~"}function mb(j){return j.data==="$!"||j.data==="$?"&&j.ownerDocument.readyState!=="loading"}function nR(j,Q){var xe=j.ownerDocument;if(j.data==="$~")j._reactRetry=Q;else if(j.data!=="$?"||xe.readyState!=="loading")Q();else{var Ue=function(){Q(),xe.removeEventListener("DOMContentLoaded",Ue)};xe.addEventListener("DOMContentLoaded",Ue),j._reactRetry=Ue}}function bp(j){for(;j!=null;j=j.nextSibling){var Q=j.nodeType;if(Q===1||Q===3)break;if(Q===8){if(Q=j.data,Q==="$"||Q==="$!"||Q==="$?"||Q==="$~"||Q==="&"||Q==="F!"||Q==="F")break;if(Q==="/$"||Q==="/&")return null}}return j}var Um=null;function zS(j){j=j.nextSibling;for(var Q=0;j;){if(j.nodeType===8){var xe=j.data;if(xe==="/$"||xe==="/&"){if(Q===0)return bp(j.nextSibling);Q--}else xe!=="$"&&xe!=="$!"&&xe!=="$?"&&xe!=="$~"&&xe!=="&"||Q++}j=j.nextSibling}return null}function b_(j){j=j.previousSibling;for(var Q=0;j;){if(j.nodeType===8){var xe=j.data;if(xe==="$"||xe==="$!"||xe==="$?"||xe==="$~"||xe==="&"){if(Q===0)return j;Q--}else xe!=="/$"&&xe!=="/&"||Q++}j=j.previousSibling}return null}function $2(j,Q,xe){switch(Q=xp(xe),j){case"html":if(j=Q.documentElement,!j)throw Error(L(452));return j;case"head":if(j=Q.head,!j)throw Error(L(453));return j;case"body":if(j=Q.body,!j)throw Error(L(454));return j;default:throw Error(L(451))}}function Yg(j){for(var Q=j.attributes;Q.length;)j.removeAttributeNode(Q[0]);QT(j)}var wp=new Map,K2=new Set;function y0(j){return typeof j.getRootNode=="function"?j.getRootNode():j.nodeType===9?j:j.ownerDocument}var qm=Ra.d;Ra.d={f:YC,r:aR,D:Zg,C:NS,L:Q2,m:e3,X:T_,S:yb,M:FS};function YC(){var j=qm.f(),Q=N2();return j||Q}function aR(j){var Q=gy(j);Q!==null&&Q.tag===5&&Q.type==="form"?VA(Q):qm.r(j)}var w_=typeof document>"u"?null:document;function J2(j,Q,xe){var Ue=w_;if(Ue&&typeof Q=="string"&&Q){var xt=am(Q);xt='link[rel="'+j+'"][href="'+xt+'"]',typeof xe=="string"&&(xt+='[crossorigin="'+xe+'"]'),K2.has(xt)||(K2.add(xt),j={rel:j,crossOrigin:xe,href:Q},Ue.querySelector(xt)===null&&(Q=Ue.createElement("link"),Md(Q,"link",j),av(Q),Ue.head.appendChild(Q)))}}function Zg(j){qm.D(j),J2("dns-prefetch",j,null)}function NS(j,Q){qm.C(j,Q),J2("preconnect",j,Q)}function Q2(j,Q,xe){qm.L(j,Q,xe);var Ue=w_;if(Ue&&j&&Q){var xt='link[rel="preload"][as="'+am(Q)+'"]';Q==="image"&&xe&&xe.imageSrcSet?(xt+='[imagesrcset="'+am(xe.imageSrcSet)+'"]',typeof xe.imageSizes=="string"&&(xt+='[imagesizes="'+am(xe.imageSizes)+'"]')):xt+='[href="'+am(j)+'"]';var Bt=xt;switch(Q){case"style":Bt=Yy(j);break;case"script":Bt=Kg(j)}wp.has(Bt)||(j=yt({rel:"preload",href:Q==="image"&&xe&&xe.imageSrcSet?void 0:j,as:Q},xe),wp.set(Bt,j),Ue.querySelector(xt)!==null||Q==="style"&&Ue.querySelector(gb(Bt))||Q==="script"&&Ue.querySelector(Jg(Bt))||(Q=Ue.createElement("link"),Md(Q,"link",j),av(Q),Ue.head.appendChild(Q)))}}function e3(j,Q){qm.m(j,Q);var xe=w_;if(xe&&j){var Ue=Q&&typeof Q.as=="string"?Q.as:"script",xt='link[rel="modulepreload"][as="'+am(Ue)+'"][href="'+am(j)+'"]',Bt=xt;switch(Ue){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":Bt=Kg(j)}if(!wp.has(Bt)&&(j=yt({rel:"modulepreload",href:j},Q),wp.set(Bt,j),xe.querySelector(xt)===null)){switch(Ue){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(xe.querySelector(Jg(Bt)))return}Ue=xe.createElement("link"),Md(Ue,"link",j),av(Ue),xe.head.appendChild(Ue)}}}function yb(j,Q,xe){qm.S(j,Q,xe);var Ue=w_;if(Ue&&j){var xt=N1(Ue).hoistableStyles,Bt=Yy(j);Q=Q||"default";var Gr=xt.get(Bt);if(!Gr){var Nn={loading:0,preload:null};if(Gr=Ue.querySelector(gb(Bt)))Nn.loading=5;else{j=yt({rel:"stylesheet",href:j,"data-precedence":Q},xe),(xe=wp.get(Bt))&&Qg(j,xe);var Wa=Gr=Ue.createElement("link");av(Wa),Md(Wa,"link",j),Wa._p=new Promise(function(Hi,xo){Wa.onload=Hi,Wa.onerror=xo}),Wa.addEventListener("load",function(){Nn.loading|=1}),Wa.addEventListener("error",function(){Nn.loading|=2}),Nn.loading|=4,_b(Gr,Q,Ue)}Gr={type:"stylesheet",instance:Gr,count:1,state:Nn},xt.set(Bt,Gr)}}}function T_(j,Q){qm.X(j,Q);var xe=w_;if(xe&&j){var Ue=N1(xe).hoistableScripts,xt=Kg(j),Bt=Ue.get(xt);Bt||(Bt=xe.querySelector(Jg(xt)),Bt||(j=yt({src:j,async:!0},Q),(Q=wp.get(xt))&&r3(j,Q),Bt=xe.createElement("script"),av(Bt),Md(Bt,"link",j),xe.head.appendChild(Bt)),Bt={type:"script",instance:Bt,count:1,state:null},Ue.set(xt,Bt))}}function FS(j,Q){qm.M(j,Q);var xe=w_;if(xe&&j){var Ue=N1(xe).hoistableScripts,xt=Kg(j),Bt=Ue.get(xt);Bt||(Bt=xe.querySelector(Jg(xt)),Bt||(j=yt({src:j,async:!0,type:"module"},Q),(Q=wp.get(xt))&&r3(j,Q),Bt=xe.createElement("script"),av(Bt),Md(Bt,"link",j),xe.head.appendChild(Bt)),Bt={type:"script",instance:Bt,count:1,state:null},Ue.set(xt,Bt))}}function t3(j,Q,xe,Ue){var xt=(xt=co.current)?y0(xt):null;if(!xt)throw Error(L(446));switch(j){case"meta":case"title":return null;case"style":return typeof xe.precedence=="string"&&typeof xe.href=="string"?(Q=Yy(xe.href),xe=N1(xt).hoistableStyles,Ue=xe.get(Q),Ue||(Ue={type:"style",instance:null,count:0,state:null},xe.set(Q,Ue)),Ue):{type:"void",instance:null,count:0,state:null};case"link":if(xe.rel==="stylesheet"&&typeof xe.href=="string"&&typeof xe.precedence=="string"){j=Yy(xe.href);var Bt=N1(xt).hoistableStyles,Gr=Bt.get(j);if(Gr||(xt=xt.ownerDocument||xt,Gr={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},Bt.set(j,Gr),(Bt=xt.querySelector(gb(j)))&&!Bt._p&&(Gr.instance=Bt,Gr.state.loading=5),wp.has(j)||(xe={rel:"preload",as:"style",href:xe.href,crossOrigin:xe.crossOrigin,integrity:xe.integrity,media:xe.media,hrefLang:xe.hrefLang,referrerPolicy:xe.referrerPolicy},wp.set(j,xe),Bt||ZC(xt,j,xe,Gr.state))),Q&&Ue===null)throw Error(L(528,""));return Gr}if(Q&&Ue!==null)throw Error(L(529,""));return null;case"script":return Q=xe.async,xe=xe.src,typeof xe=="string"&&Q&&typeof Q!="function"&&typeof Q!="symbol"?(Q=Kg(xe),xe=N1(xt).hoistableScripts,Ue=xe.get(Q),Ue||(Ue={type:"script",instance:null,count:0,state:null},xe.set(Q,Ue)),Ue):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,j))}}function Yy(j){return'href="'+am(j)+'"'}function gb(j){return'link[rel="stylesheet"]['+j+"]"}function $g(j){return yt({},j,{"data-precedence":j.precedence,precedence:null})}function ZC(j,Q,xe,Ue){j.querySelector('link[rel="preload"][as="style"]['+Q+"]")?Ue.loading=1:(Q=j.createElement("link"),Ue.preload=Q,Q.addEventListener("load",function(){return Ue.loading|=1}),Q.addEventListener("error",function(){return Ue.loading|=2}),Md(Q,"link",xe),av(Q),j.head.appendChild(Q))}function Kg(j){return'[src="'+am(j)+'"]'}function Jg(j){return"script[async]"+j}function BS(j,Q,xe){if(Q.count++,Q.instance===null)switch(Q.type){case"style":var Ue=j.querySelector('style[data-href~="'+am(xe.href)+'"]');if(Ue)return Q.instance=Ue,av(Ue),Ue;var xt=yt({},xe,{"data-href":xe.href,"data-precedence":xe.precedence,href:null,precedence:null});return Ue=(j.ownerDocument||j).createElement("style"),av(Ue),Md(Ue,"style",xt),_b(Ue,xe.precedence,j),Q.instance=Ue;case"stylesheet":xt=Yy(xe.href);var Bt=j.querySelector(gb(xt));if(Bt)return Q.state.loading|=4,Q.instance=Bt,av(Bt),Bt;Ue=$g(xe),(xt=wp.get(xt))&&Qg(Ue,xt),Bt=(j.ownerDocument||j).createElement("link"),av(Bt);var Gr=Bt;return Gr._p=new Promise(function(Nn,Wa){Gr.onload=Nn,Gr.onerror=Wa}),Md(Bt,"link",Ue),Q.state.loading|=4,_b(Bt,xe.precedence,j),Q.instance=Bt;case"script":return Bt=Kg(xe.src),(xt=j.querySelector(Jg(Bt)))?(Q.instance=xt,av(xt),xt):(Ue=xe,(xt=wp.get(Bt))&&(Ue=yt({},xe),r3(Ue,xt)),j=j.ownerDocument||j,xt=j.createElement("script"),av(xt),Md(xt,"link",Ue),j.head.appendChild(xt),Q.instance=xt);case"void":return null;default:throw Error(L(443,Q.type))}else Q.type==="stylesheet"&&(Q.state.loading&4)===0&&(Ue=Q.instance,Q.state.loading|=4,_b(Ue,xe.precedence,j));return Q.instance}function _b(j,Q,xe){for(var Ue=xe.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),xt=Ue.length?Ue[Ue.length-1]:null,Bt=xt,Gr=0;Gr<Ue.length;Gr++){var Nn=Ue[Gr];if(Nn.dataset.precedence===Q)Bt=Nn;else if(Bt!==xt)break}Bt?Bt.parentNode.insertBefore(j,Bt.nextSibling):(Q=xe.nodeType===9?xe.head:xe,Q.insertBefore(j,Q.firstChild))}function Qg(j,Q){j.crossOrigin==null&&(j.crossOrigin=Q.crossOrigin),j.referrerPolicy==null&&(j.referrerPolicy=Q.referrerPolicy),j.title==null&&(j.title=Q.title)}function r3(j,Q){j.crossOrigin==null&&(j.crossOrigin=Q.crossOrigin),j.referrerPolicy==null&&(j.referrerPolicy=Q.referrerPolicy),j.integrity==null&&(j.integrity=Q.integrity)}var xb=null;function $C(j,Q,xe){if(xb===null){var Ue=new Map,xt=xb=new Map;xt.set(xe,Ue)}else xt=xb,Ue=xt.get(xe),Ue||(Ue=new Map,xt.set(xe,Ue));if(Ue.has(j))return Ue;for(Ue.set(j,null),xe=xe.getElementsByTagName(j),xt=0;xt<xe.length;xt++){var Bt=xe[xt];if(!(Bt[Xo]||Bt[Il]||j==="link"&&Bt.getAttribute("rel")==="stylesheet")&&Bt.namespaceURI!=="http://www.w3.org/2000/svg"){var Gr=Bt.getAttribute(Q)||"";Gr=j+Gr;var Nn=Ue.get(Gr);Nn?Nn.push(Bt):Ue.set(Gr,[Bt])}}return Ue}function bb(j,Q,xe){j=j.ownerDocument||j,j.head.insertBefore(xe,Q==="title"?j.querySelector("head > title"):null)}function iR(j,Q,xe){if(xe===1||Q.itemProp!=null)return!1;switch(j){case"meta":case"title":return!0;case"style":if(typeof Q.precedence!="string"||typeof Q.href!="string"||Q.href==="")break;return!0;case"link":if(typeof Q.rel!="string"||typeof Q.href!="string"||Q.href===""||Q.onLoad||Q.onError)break;switch(Q.rel){case"stylesheet":return j=Q.disabled,typeof Q.precedence=="string"&&j==null;default:return!0}case"script":if(Q.async&&typeof Q.async!="function"&&typeof Q.async!="symbol"&&!Q.onLoad&&!Q.onError&&Q.src&&typeof Q.src=="string")return!0}return!1}function Ud(j){return!(j.type==="stylesheet"&&(j.state.loading&3)===0)}function A_(j,Q,xe,Ue){if(xe.type==="stylesheet"&&(typeof Ue.media!="string"||matchMedia(Ue.media).matches!==!1)&&(xe.state.loading&4)===0){if(xe.instance===null){var xt=Yy(Ue.href),Bt=Q.querySelector(gb(xt));if(Bt){Q=Bt._p,Q!==null&&typeof Q=="object"&&typeof Q.then=="function"&&(j.count++,j=wb.bind(j),Q.then(j,j)),xe.state.loading|=4,xe.instance=Bt,av(Bt);return}Bt=Q.ownerDocument||Q,Ue=$g(Ue),(xt=wp.get(xt))&&Qg(Ue,xt),Bt=Bt.createElement("link"),av(Bt);var Gr=Bt;Gr._p=new Promise(function(Nn,Wa){Gr.onload=Nn,Gr.onerror=Wa}),Md(Bt,"link",Ue),xe.instance=Bt}j.stylesheets===null&&(j.stylesheets=new Map),j.stylesheets.set(xe,Q),(Q=xe.state.preload)&&(xe.state.loading&3)===0&&(j.count++,xe=wb.bind(j),Q.addEventListener("load",xe),Q.addEventListener("error",xe))}}var n3=0;function a3(j,Q){return j.stylesheets&&j.count===0&&Ab(j,j.stylesheets),0<j.count||0<j.imgCount?function(xe){var Ue=setTimeout(function(){if(j.stylesheets&&Ab(j,j.stylesheets),j.unsuspend){var Bt=j.unsuspend;j.unsuspend=null,Bt()}},6e4+Q);0<j.imgBytes&&n3===0&&(n3=62500*Wg());var xt=setTimeout(function(){if(j.waitingForImages=!1,j.count===0&&(j.stylesheets&&Ab(j,j.stylesheets),j.unsuspend)){var Bt=j.unsuspend;j.unsuspend=null,Bt()}},(j.imgBytes>n3?50:800)+Q);return j.unsuspend=xe,function(){j.unsuspend=null,clearTimeout(Ue),clearTimeout(xt)}}:null}function wb(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ab(this,this.stylesheets);else if(this.unsuspend){var j=this.unsuspend;this.unsuspend=null,j()}}}var Tb=null;function Ab(j,Q){j.stylesheets=null,j.unsuspend!==null&&(j.count++,Tb=new Map,Q.forEach(jS,j),Tb=null,wb.call(j))}function jS(j,Q){if(!(Q.state.loading&4)){var xe=Tb.get(j);if(xe)var Ue=xe.get(null);else{xe=new Map,Tb.set(j,xe);for(var xt=j.querySelectorAll("link[data-precedence],style[data-precedence]"),Bt=0;Bt<xt.length;Bt++){var Gr=xt[Bt];(Gr.nodeName==="LINK"||Gr.getAttribute("media")!=="not all")&&(xe.set(Gr.dataset.precedence,Gr),Ue=Gr)}Ue&&xe.set(null,Ue)}xt=Q.instance,Gr=xt.getAttribute("data-precedence"),Bt=xe.get(Gr)||Ue,Bt===Ue&&xe.set(null,xt),xe.set(Gr,xt),this.count++,Ue=wb.bind(this),xt.addEventListener("load",Ue),xt.addEventListener("error",Ue),Bt?Bt.parentNode.insertBefore(xt,Bt.nextSibling):(j=j.nodeType===9?j.head:j,j.insertBefore(xt,j.firstChild)),Q.state.loading|=4}}var S_={$$typeof:an,Provider:null,Consumer:null,_currentValue:vi,_currentValue2:vi,_threadCount:0};function US(j,Q,xe,Ue,xt,Bt,Gr,Nn,Wa){this.tag=1,this.containerInfo=j,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ep(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ep(0),this.hiddenUpdates=ep(null),this.identifierPrefix=Ue,this.onUncaughtError=xt,this.onCaughtError=Bt,this.onRecoverableError=Gr,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Wa,this.incompleteTransitions=new Map}function KC(j,Q,xe,Ue,xt,Bt,Gr,Nn,Wa,Hi,xo,Mo){return j=new US(j,Q,xe,Gr,Wa,Hi,xo,Mo,Nn),Q=1,Bt===!0&&(Q|=24),Bt=bv(3,null,null,Q),j.current=Bt,Bt.stateNode=j,Q=TA(),Q.refCount++,j.pooledCache=Q,Q.refCount++,Bt.memoizedState={element:Ue,isDehydrated:xe,cache:Q},MA(Bt),j}function qS(j){return j?(j=xv,j):xv}function VS(j,Q,xe,Ue,xt,Bt){xt=qS(xt),Ue.context===null?Ue.context=xt:Ue.pendingContext=xt,Ue=Iy(Q),Ue.payload={element:xe},Bt=Bt===void 0?null:Bt,Bt!==null&&(Ue.callback=Bt),xe=Dy(j,Ue,Q),xe!==null&&(_p(xe,j,Q),Nx(xe,j,Q))}function HS(j,Q){if(j=j.memoizedState,j!==null&&j.dehydrated!==null){var xe=j.retryLane;j.retryLane=xe!==0&&xe<Q?xe:Q}}function i3(j,Q){HS(j,Q),(j=j.alternate)&&HS(j,Q)}function Vm(j){if(j.tag===13||j.tag===31){var Q=Lm(j,67108864);Q!==null&&_p(Q,j,67108864),i3(j,67108864)}}function Sb(j){if(j.tag===13||j.tag===31){var Q=qv();Q=D1(Q);var xe=Lm(j,Q);xe!==null&&_p(xe,j,Q),i3(j,Q)}}var Eb=!0;function JC(j,Q,xe,Ue){var xt=pa.T;pa.T=null;var Bt=Ra.p;try{Ra.p=2,GS(j,Q,xe,Ue)}finally{Ra.p=Bt,pa.T=xt}}function oR(j,Q,xe,Ue){var xt=pa.T;pa.T=null;var Bt=Ra.p;try{Ra.p=8,GS(j,Q,xe,Ue)}finally{Ra.p=Bt,pa.T=xt}}function GS(j,Q,xe,Ue){if(Eb){var xt=o3(Ue);if(xt===null)q2(j,Q,Ue,e1,xe),WS(j,Ue);else if(s3(xt,j,Q,xe,Ue))Ue.stopPropagation();else if(WS(j,Ue),Q&4&&-1<sR.indexOf(j)){for(;xt!==null;){var Bt=gy(xt);if(Bt!==null)switch(Bt.tag){case 3:if(Bt=Bt.stateNode,Bt.current.memoizedState.isDehydrated){var Gr=Nv(Bt.pendingLanes);if(Gr!==0){var Nn=Bt;for(Nn.pendingLanes|=2,Nn.entangledLanes|=2;Gr;){var Wa=1<<31-xd(Gr);Nn.entanglements[1]|=Wa,Gr&=~Wa}d0(Bt),(Nc&6)===0&&(D2=nv()+500,ob(0))}}break;case 31:case 13:Nn=Lm(Bt,2),Nn!==null&&_p(Nn,Bt,2),N2(),i3(Bt,2)}if(Bt=o3(Ue),Bt===null&&q2(j,Q,Ue,e1,xe),Bt===xt)break;xt=Bt}xt!==null&&Ue.stopPropagation()}else q2(j,Q,Ue,null,xe)}}function o3(j){return j=wx(j),E_(j)}var e1=null;function E_(j){if(e1=null,j=O0(j),j!==null){var Q=ve(j);if(Q===null)j=null;else{var xe=Q.tag;if(xe===13){if(j=Ce(Q),j!==null)return j;j=null}else if(xe===31){if(j=Be(Q),j!==null)return j;j=null}else if(xe===3){if(Q.stateNode.current.memoizedState.isDehydrated)return Q.tag===3?Q.stateNode.containerInfo:null;j=null}else Q!==j&&(j=null)}}return e1=j,null}function XS(j){switch(j){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(P1()){case zv:return 2;case R0:return 8;case L1:case WT:return 32;case xg:return 268435456;default:return 32}default:return 32}}var M_=!1,Hm=null,Zy=null,$y=null,Mb=new Map,Cb=new Map,Ky=[],sR="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function WS(j,Q){switch(j){case"focusin":case"focusout":Hm=null;break;case"dragenter":case"dragleave":Zy=null;break;case"mouseover":case"mouseout":$y=null;break;case"pointerover":case"pointerout":Mb.delete(Q.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cb.delete(Q.pointerId)}}function t1(j,Q,xe,Ue,xt,Bt){return j===null||j.nativeEvent!==Bt?(j={blockedOn:Q,domEventName:xe,eventSystemFlags:Ue,nativeEvent:Bt,targetContainers:[xt]},Q!==null&&(Q=gy(Q),Q!==null&&Vm(Q)),j):(j.eventSystemFlags|=Ue,Q=j.targetContainers,xt!==null&&Q.indexOf(xt)===-1&&Q.push(xt),j)}function s3(j,Q,xe,Ue,xt){switch(Q){case"focusin":return Hm=t1(Hm,j,Q,xe,Ue,xt),!0;case"dragenter":return Zy=t1(Zy,j,Q,xe,Ue,xt),!0;case"mouseover":return $y=t1($y,j,Q,xe,Ue,xt),!0;case"pointerover":var Bt=xt.pointerId;return Mb.set(Bt,t1(Mb.get(Bt)||null,j,Q,xe,Ue,xt)),!0;case"gotpointercapture":return Bt=xt.pointerId,Cb.set(Bt,t1(Cb.get(Bt)||null,j,Q,xe,Ue,xt)),!0}return!1}function QC(j){var Q=O0(j.target);if(Q!==null){var xe=ve(Q);if(xe!==null){if(Q=xe.tag,Q===13){if(Q=Ce(xe),Q!==null){j.blockedOn=Q,Dd(j.priority,function(){Sb(xe)});return}}else if(Q===31){if(Q=Be(xe),Q!==null){j.blockedOn=Q,Dd(j.priority,function(){Sb(xe)});return}}else if(Q===3&&xe.stateNode.current.memoizedState.isDehydrated){j.blockedOn=xe.tag===3?xe.stateNode.containerInfo:null;return}}}j.blockedOn=null}function l3(j){if(j.blockedOn!==null)return!1;for(var Q=j.targetContainers;0<Q.length;){var xe=o3(j.nativeEvent);if(xe===null){xe=j.nativeEvent;var Ue=new xe.constructor(xe.type,xe);wd=Ue,xe.target.dispatchEvent(Ue),wd=null}else return Q=gy(xe),Q!==null&&Vm(Q),j.blockedOn=xe,!1;Q.shift()}return!0}function e6(j,Q,xe){l3(j)&&xe.delete(Q)}function u3(){M_=!1,Hm!==null&&l3(Hm)&&(Hm=null),Zy!==null&&l3(Zy)&&(Zy=null),$y!==null&&l3($y)&&($y=null),Mb.forEach(e6),Cb.forEach(e6)}function c3(j,Q){j.blockedOn===Q&&(j.blockedOn=null,M_||(M_=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,u3)))}var kb=null;function YS(j){kb!==j&&(kb=j,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){kb===j&&(kb=null);for(var Q=0;Q<j.length;Q+=3){var xe=j[Q],Ue=j[Q+1],xt=j[Q+2];if(typeof Ue!="function"){if(E_(Ue||xe)===null)continue;break}var Bt=gy(xe);Bt!==null&&(j.splice(Q,3),Q-=3,b2(Bt,{pending:!0,data:xt,method:xe.method,action:Ue},Ue,xt))}}))}function r1(j){function Q(Wa){return c3(Wa,j)}Hm!==null&&c3(Hm,j),Zy!==null&&c3(Zy,j),$y!==null&&c3($y,j),Mb.forEach(Q),Cb.forEach(Q);for(var xe=0;xe<Ky.length;xe++){var Ue=Ky[xe];Ue.blockedOn===j&&(Ue.blockedOn=null)}for(;0<Ky.length&&(xe=Ky[0],xe.blockedOn===null);)QC(xe),xe.blockedOn===null&&Ky.shift();if(xe=(j.ownerDocument||j).$$reactFormReplay,xe!=null)for(Ue=0;Ue<xe.length;Ue+=3){var xt=xe[Ue],Bt=xe[Ue+1],Gr=xt[Fv]||null;if(typeof Bt=="function")Gr||YS(xe);else if(Gr){var Nn=null;if(Bt&&Bt.hasAttribute("formAction")){if(xt=Bt,Gr=Bt[Fv]||null)Nn=Gr.formAction;else if(E_(xt)!==null)continue}else Nn=Gr.action;typeof Nn=="function"?xe[Ue+1]=Nn:(xe.splice(Ue,3),Ue-=3),YS(xe)}}}function t6(){function j(Bt){Bt.canIntercept&&Bt.info==="react-transition"&&Bt.intercept({handler:function(){return new Promise(function(Gr){return xt=Gr})},focusReset:"manual",scroll:"manual"})}function Q(){xt!==null&&(xt(),xt=null),Ue||setTimeout(xe,20)}function xe(){if(!Ue&&!navigation.transition){var Bt=navigation.currentEntry;Bt&&Bt.url!=null&&navigation.navigate(Bt.url,{state:Bt.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var Ue=!1,xt=null;return navigation.addEventListener("navigate",j),navigation.addEventListener("navigatesuccess",Q),navigation.addEventListener("navigateerror",Q),setTimeout(xe,100),function(){Ue=!0,navigation.removeEventListener("navigate",j),navigation.removeEventListener("navigatesuccess",Q),navigation.removeEventListener("navigateerror",Q),xt!==null&&(xt(),xt=null)}}}function f3(j){this._internalRoot=j}h3.prototype.render=f3.prototype.render=function(j){var Q=this._internalRoot;if(Q===null)throw Error(L(409));var xe=Q.current,Ue=qv();VS(xe,Ue,j,Q,null,null)},h3.prototype.unmount=f3.prototype.unmount=function(){var j=this._internalRoot;if(j!==null){this._internalRoot=null;var Q=j.containerInfo;VS(j.current,2,null,j,null,null),N2(),Q[z1]=null}};function h3(j){this._internalRoot=j}h3.prototype.unstable_scheduleHydration=function(j){if(j){var Q=Kc();j={blockedOn:null,target:j,priority:Q};for(var xe=0;xe<Ky.length&&Q!==0&&Q<Ky[xe].priority;xe++);Ky.splice(xe,0,j),xe===0&&QC(j)}};var r6=n.version;if(r6!=="19.2.0")throw Error(L(527,r6,"19.2.0"));Ra.findDOMNode=function(j){var Q=j._reactInternals;if(Q===void 0)throw typeof j.render=="function"?Error(L(188)):(j=Object.keys(j).join(","),Error(L(268,j)));return j=Ke(Q),j=j!==null?vt(j):null,j=j===null?null:j.stateNode,j};var n6={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:pa,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pb=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pb.isDisabled&&Pb.supportsFiber)try{I0=Pb.inject(n6),_d=Pb}catch{}}return I5.createRoot=function(j,Q){if(!re(j))throw Error(L(299));var xe=!1,Ue="",xt=$M,Bt=KM,Gr=JM;return Q!=null&&(Q.unstable_strictMode===!0&&(xe=!0),Q.identifierPrefix!==void 0&&(Ue=Q.identifierPrefix),Q.onUncaughtError!==void 0&&(xt=Q.onUncaughtError),Q.onCaughtError!==void 0&&(Bt=Q.onCaughtError),Q.onRecoverableError!==void 0&&(Gr=Q.onRecoverableError)),Q=KC(j,1,!1,null,null,xe,Ue,null,xt,Bt,Gr,t6),j[z1]=Q.current,x_(j),new f3(Q)},I5.hydrateRoot=function(j,Q,xe){if(!re(j))throw Error(L(299));var Ue=!1,xt="",Bt=$M,Gr=KM,Nn=JM,Wa=null;return xe!=null&&(xe.unstable_strictMode===!0&&(Ue=!0),xe.identifierPrefix!==void 0&&(xt=xe.identifierPrefix),xe.onUncaughtError!==void 0&&(Bt=xe.onUncaughtError),xe.onCaughtError!==void 0&&(Gr=xe.onCaughtError),xe.onRecoverableError!==void 0&&(Nn=xe.onRecoverableError),xe.formState!==void 0&&(Wa=xe.formState)),Q=KC(j,1,!0,Q,xe??null,Ue,xt,Wa,Bt,Gr,Nn,t6),Q.context=qS(null),xe=Q.current,Ue=qv(),Ue=D1(Ue),xt=Iy(Ue),xt.callback=null,Dy(xe,xt,Ue),xe=Ue,Q.current.lanes=xe,gv(Q,xe),d0(Q),j[z1]=Q.current,x_(j),new h3(Q)},I5.version="19.2.0",I5}var TB;function Wae(){if(TB)return O8.exports;TB=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(n){console.error(n)}}return e(),O8.exports=Xae(),O8.exports}var Yae=Wae(),Zae=WX();const $ae=rh(Zae);var Kae=e=>{switch(e){case"success":return eie;case"info":return rie;case"warning":return tie;case"error":return nie;default:return null}},Jae=Array(12).fill(0),Qae=({visible:e,className:n})=>aa.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},aa.createElement("div",{className:"sonner-spinner"},Jae.map((S,L)=>aa.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${L}`})))),eie=aa.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},aa.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),tie=aa.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},aa.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),rie=aa.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},aa.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),nie=aa.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},aa.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),aie=aa.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},aa.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),aa.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),iie=()=>{let[e,n]=aa.useState(document.hidden);return aa.useEffect(()=>{let S=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",S),()=>window.removeEventListener("visibilitychange",S)},[]),e},HO=1,oie=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;let{message:S,...L}=e,re=typeof e?.id=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:HO++,ve=this.toasts.find(Be=>Be.id===re),Ce=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(re)&&this.dismissedToasts.delete(re),ve?this.toasts=this.toasts.map(Be=>Be.id===re?(this.publish({...Be,...e,id:re,title:S}),{...Be,...e,id:re,dismissible:Ce,title:S}):Be):this.addToast({title:S,...L,dismissible:Ce,id:re}),re},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(n=>{this.subscribers.forEach(S=>S({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:e,dismiss:!0})),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let S;n.loading!==void 0&&(S=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let L=e instanceof Promise?e:e(),re=S!==void 0,ve,Ce=L.then(async Xe=>{if(ve=["resolve",Xe],aa.isValidElement(Xe))re=!1,this.create({id:S,type:"default",message:Xe});else if(lie(Xe)&&!Xe.ok){re=!1;let Ke=typeof n.error=="function"?await n.error(`HTTP error! status: ${Xe.status}`):n.error,vt=typeof n.description=="function"?await n.description(`HTTP error! status: ${Xe.status}`):n.description;this.create({id:S,type:"error",message:Ke,description:vt})}else if(n.success!==void 0){re=!1;let Ke=typeof n.success=="function"?await n.success(Xe):n.success,vt=typeof n.description=="function"?await n.description(Xe):n.description;this.create({id:S,type:"success",message:Ke,description:vt})}}).catch(async Xe=>{if(ve=["reject",Xe],n.error!==void 0){re=!1;let Ke=typeof n.error=="function"?await n.error(Xe):n.error,vt=typeof n.description=="function"?await n.description(Xe):n.description;this.create({id:S,type:"error",message:Ke,description:vt})}}).finally(()=>{var Xe;re&&(this.dismiss(S),S=void 0),(Xe=n.finally)==null||Xe.call(n)}),Be=()=>new Promise((Xe,Ke)=>Ce.then(()=>ve[0]==="reject"?Ke(ve[1]):Xe(ve[1])).catch(Ke));return typeof S!="string"&&typeof S!="number"?{unwrap:Be}:Object.assign(S,{unwrap:Be})},this.custom=(e,n)=>{let S=n?.id||HO++;return this.create({jsx:e(S),id:S,...n}),S},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},ym=new oie,sie=(e,n)=>{let S=n?.id||HO++;return ym.addToast({title:e,...n,id:S}),S},lie=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",uie=sie,cie=()=>ym.toasts,fie=()=>ym.getActiveToasts(),Nu=Object.assign(uie,{success:ym.success,info:ym.info,warning:ym.warning,error:ym.error,custom:ym.custom,message:ym.message,promise:ym.promise,dismiss:ym.dismiss,loading:ym.loading},{getHistory:cie,getToasts:fie});function hie(e,{insertAt:n}={}){if(typeof document>"u")return;let S=document.head||document.getElementsByTagName("head")[0],L=document.createElement("style");L.type="text/css",n==="top"&&S.firstChild?S.insertBefore(L,S.firstChild):S.appendChild(L),L.styleSheet?L.styleSheet.cssText=e:L.appendChild(document.createTextNode(e))}hie(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
`);function fk(e){return e.label!==void 0}var die=3,vie="32px",pie="16px",AB=4e3,mie=356,yie=14,gie=20,_ie=200;function sy(...e){return e.filter(Boolean).join(" ")}function xie(e){let[n,S]=e.split("-"),L=[];return n&&L.push(n),S&&L.push(S),L}var bie=e=>{var n,S,L,re,ve,Ce,Be,Xe,Ke,vt,yt;let{invert:Gt,toast:$t,unstyled:gr,interacting:sr,setHeights:nr,visibleToasts:jr,heights:Ne,index:an,toasts:yn,expanded:Lr,removeToast:$r,defaultRichColors:dn,closeButton:Jn,style:xn,cancelButtonStyle:Na,actionButtonStyle:zn,className:ta="",descriptionClassName:qa="",duration:la,position:ja,gap:pa,loadingIcon:Ra,expandByDefault:vi,classNames:Pi,icons:Eo,closeButtonAriaLabel:ma="Close toast",pauseWhenPageIsHidden:_a}=e,[Li,so]=aa.useState(null),[Ro,co]=aa.useState(null),[$o,$u]=aa.useState(!1),[Bo,Ml]=aa.useState(!1),[ns,Do]=aa.useState(!1),[lu,io]=aa.useState(!1),[$c,sf]=aa.useState(!1),[rv,gd]=aa.useState(0),[Fp,yv]=aa.useState(0),Id=aa.useRef($t.duration||la||AB),Bp=aa.useRef(null),jp=aa.useRef(null),nv=an===0,P1=an+1<=jr,zv=$t.type,R0=$t.dismissible!==!1,L1=$t.className||"",WT=$t.descriptionClassName||"",xg=aa.useMemo(()=>Ne.findIndex(nu=>nu.toastId===$t.id)||0,[Ne,$t.id]),YT=aa.useMemo(()=>{var nu;return(nu=$t.closeButton)!=null?nu:Jn},[$t.closeButton,Jn]),Sw=aa.useMemo(()=>$t.duration||la||AB,[$t.duration,la]),I0=aa.useRef(0),_d=aa.useRef(0),Am=aa.useRef(0),xd=aa.useRef(null),[ZT,$T]=ja.split("-"),Ew=aa.useMemo(()=>Ne.reduce((nu,lf,Vf)=>Vf>=xg?nu:nu+lf.height,0),[Ne,xg]),bg=iie(),R1=$t.invert||Gt,yy=zv==="loading";_d.current=aa.useMemo(()=>xg*pa+Ew,[xg,Ew]),aa.useEffect(()=>{Id.current=Sw},[Sw]),aa.useEffect(()=>{$u(!0)},[]),aa.useEffect(()=>{let nu=jp.current;if(nu){let lf=nu.getBoundingClientRect().height;return yv(lf),nr(Vf=>[{toastId:$t.id,height:lf,position:$t.position},...Vf]),()=>nr(Vf=>Vf.filter(ep=>ep.toastId!==$t.id))}},[nr,$t.id]),aa.useLayoutEffect(()=>{if(!$o)return;let nu=jp.current,lf=nu.style.height;nu.style.height="auto";let Vf=nu.getBoundingClientRect().height;nu.style.height=lf,yv(Vf),nr(ep=>ep.find(gv=>gv.toastId===$t.id)?ep.map(gv=>gv.toastId===$t.id?{...gv,height:Vf}:gv):[{toastId:$t.id,height:Vf,position:$t.position},...ep])},[$o,$t.title,$t.description,nr,$t.id]);let Nv=aa.useCallback(()=>{Ml(!0),gd(_d.current),nr(nu=>nu.filter(lf=>lf.toastId!==$t.id)),setTimeout(()=>{$r($t)},_ie)},[$t,$r,nr,_d]);aa.useEffect(()=>{if($t.promise&&zv==="loading"||$t.duration===1/0||$t.type==="loading")return;let nu;return Lr||sr||_a&&bg?(()=>{if(Am.current<I0.current){let lf=new Date().getTime()-I0.current;Id.current=Id.current-lf}Am.current=new Date().getTime()})():Id.current!==1/0&&(I0.current=new Date().getTime(),nu=setTimeout(()=>{var lf;(lf=$t.onAutoClose)==null||lf.call($t,$t),Nv()},Id.current)),()=>clearTimeout(nu)},[Lr,sr,$t,zv,_a,bg,Nv]),aa.useEffect(()=>{$t.delete&&Nv()},[Nv,$t.delete]);function I1(){var nu,lf,Vf;return Eo!=null&&Eo.loading?aa.createElement("div",{className:sy(Pi?.loader,(nu=$t?.classNames)==null?void 0:nu.loader,"sonner-loader"),"data-visible":zv==="loading"},Eo.loading):Ra?aa.createElement("div",{className:sy(Pi?.loader,(lf=$t?.classNames)==null?void 0:lf.loader,"sonner-loader"),"data-visible":zv==="loading"},Ra):aa.createElement(Qae,{className:sy(Pi?.loader,(Vf=$t?.classNames)==null?void 0:Vf.loader),visible:zv==="loading"})}return aa.createElement("li",{tabIndex:0,ref:jp,className:sy(ta,L1,Pi?.toast,(n=$t?.classNames)==null?void 0:n.toast,Pi?.default,Pi?.[zv],(S=$t?.classNames)==null?void 0:S[zv]),"data-sonner-toast":"","data-rich-colors":(L=$t.richColors)!=null?L:dn,"data-styled":!($t.jsx||$t.unstyled||gr),"data-mounted":$o,"data-promise":!!$t.promise,"data-swiped":$c,"data-removed":Bo,"data-visible":P1,"data-y-position":ZT,"data-x-position":$T,"data-index":an,"data-front":nv,"data-swiping":ns,"data-dismissible":R0,"data-type":zv,"data-invert":R1,"data-swipe-out":lu,"data-swipe-direction":Ro,"data-expanded":!!(Lr||vi&&$o),style:{"--index":an,"--toasts-before":an,"--z-index":yn.length-an,"--offset":`${Bo?rv:_d.current}px`,"--initial-height":vi?"auto":`${Fp}px`,...xn,...$t.style},onDragEnd:()=>{Do(!1),so(null),xd.current=null},onPointerDown:nu=>{yy||!R0||(Bp.current=new Date,gd(_d.current),nu.target.setPointerCapture(nu.pointerId),nu.target.tagName!=="BUTTON"&&(Do(!0),xd.current={x:nu.clientX,y:nu.clientY}))},onPointerUp:()=>{var nu,lf,Vf,ep;if(lu||!R0)return;xd.current=null;let gv=Number(((nu=jp.current)==null?void 0:nu.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),t0=Number(((lf=jp.current)==null?void 0:lf.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),r0=new Date().getTime()-((Vf=Bp.current)==null?void 0:Vf.getTime()),tp=Li==="x"?gv:t0,Up=Math.abs(tp)/r0;if(Math.abs(tp)>=gie||Up>.11){gd(_d.current),(ep=$t.onDismiss)==null||ep.call($t,$t),co(Li==="x"?gv>0?"right":"left":t0>0?"down":"up"),Nv(),io(!0),sf(!1);return}Do(!1),so(null)},onPointerMove:nu=>{var lf,Vf,ep,gv;if(!xd.current||!R0||((lf=window.getSelection())==null?void 0:lf.toString().length)>0)return;let t0=nu.clientY-xd.current.y,r0=nu.clientX-xd.current.x,tp=(Vf=e.swipeDirections)!=null?Vf:xie(ja);!Li&&(Math.abs(r0)>1||Math.abs(t0)>1)&&so(Math.abs(r0)>Math.abs(t0)?"x":"y");let Up={x:0,y:0};Li==="y"?(tp.includes("top")||tp.includes("bottom"))&&(tp.includes("top")&&t0<0||tp.includes("bottom")&&t0>0)&&(Up.y=t0):Li==="x"&&(tp.includes("left")||tp.includes("right"))&&(tp.includes("left")&&r0<0||tp.includes("right")&&r0>0)&&(Up.x=r0),(Math.abs(Up.x)>0||Math.abs(Up.y)>0)&&sf(!0),(ep=jp.current)==null||ep.style.setProperty("--swipe-amount-x",`${Up.x}px`),(gv=jp.current)==null||gv.style.setProperty("--swipe-amount-y",`${Up.y}px`)}},YT&&!$t.jsx?aa.createElement("button",{"aria-label":ma,"data-disabled":yy,"data-close-button":!0,onClick:yy||!R0?()=>{}:()=>{var nu;Nv(),(nu=$t.onDismiss)==null||nu.call($t,$t)},className:sy(Pi?.closeButton,(re=$t?.classNames)==null?void 0:re.closeButton)},(ve=Eo?.close)!=null?ve:aie):null,$t.jsx||Ua.isValidElement($t.title)?$t.jsx?$t.jsx:typeof $t.title=="function"?$t.title():$t.title:aa.createElement(aa.Fragment,null,zv||$t.icon||$t.promise?aa.createElement("div",{"data-icon":"",className:sy(Pi?.icon,(Ce=$t?.classNames)==null?void 0:Ce.icon)},$t.promise||$t.type==="loading"&&!$t.icon?$t.icon||I1():null,$t.type!=="loading"?$t.icon||Eo?.[zv]||Kae(zv):null):null,aa.createElement("div",{"data-content":"",className:sy(Pi?.content,(Be=$t?.classNames)==null?void 0:Be.content)},aa.createElement("div",{"data-title":"",className:sy(Pi?.title,(Xe=$t?.classNames)==null?void 0:Xe.title)},typeof $t.title=="function"?$t.title():$t.title),$t.description?aa.createElement("div",{"data-description":"",className:sy(qa,WT,Pi?.description,(Ke=$t?.classNames)==null?void 0:Ke.description)},typeof $t.description=="function"?$t.description():$t.description):null),Ua.isValidElement($t.cancel)?$t.cancel:$t.cancel&&fk($t.cancel)?aa.createElement("button",{"data-button":!0,"data-cancel":!0,style:$t.cancelButtonStyle||Na,onClick:nu=>{var lf,Vf;fk($t.cancel)&&R0&&((Vf=(lf=$t.cancel).onClick)==null||Vf.call(lf,nu),Nv())},className:sy(Pi?.cancelButton,(vt=$t?.classNames)==null?void 0:vt.cancelButton)},$t.cancel.label):null,Ua.isValidElement($t.action)?$t.action:$t.action&&fk($t.action)?aa.createElement("button",{"data-button":!0,"data-action":!0,style:$t.actionButtonStyle||zn,onClick:nu=>{var lf,Vf;fk($t.action)&&((Vf=(lf=$t.action).onClick)==null||Vf.call(lf,nu),!nu.defaultPrevented&&Nv())},className:sy(Pi?.actionButton,(yt=$t?.classNames)==null?void 0:yt.actionButton)},$t.action.label):null))};function SB(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function wie(e,n){let S={};return[e,n].forEach((L,re)=>{let ve=re===1,Ce=ve?"--mobile-offset":"--offset",Be=ve?pie:vie;function Xe(Ke){["top","right","bottom","left"].forEach(vt=>{S[`${Ce}-${vt}`]=typeof Ke=="number"?`${Ke}px`:Ke})}typeof L=="number"||typeof L=="string"?Xe(L):typeof L=="object"?["top","right","bottom","left"].forEach(Ke=>{L[Ke]===void 0?S[`${Ce}-${Ke}`]=Be:S[`${Ce}-${Ke}`]=typeof L[Ke]=="number"?`${L[Ke]}px`:L[Ke]}):Xe(Be)}),S}var YX=Ua.forwardRef(function(e,n){let{invert:S,position:L="bottom-right",hotkey:re=["altKey","KeyT"],expand:ve,closeButton:Ce,className:Be,offset:Xe,mobileOffset:Ke,theme:vt="light",richColors:yt,duration:Gt,style:$t,visibleToasts:gr=die,toastOptions:sr,dir:nr=SB(),gap:jr=yie,loadingIcon:Ne,icons:an,containerAriaLabel:yn="Notifications",pauseWhenPageIsHidden:Lr}=e,[$r,dn]=aa.useState([]),Jn=aa.useMemo(()=>Array.from(new Set([L].concat($r.filter(_a=>_a.position).map(_a=>_a.position)))),[$r,L]),[xn,Na]=aa.useState([]),[zn,ta]=aa.useState(!1),[qa,la]=aa.useState(!1),[ja,pa]=aa.useState(vt!=="system"?vt:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),Ra=aa.useRef(null),vi=re.join("+").replace(/Key/g,"").replace(/Digit/g,""),Pi=aa.useRef(null),Eo=aa.useRef(!1),ma=aa.useCallback(_a=>{dn(Li=>{var so;return(so=Li.find(Ro=>Ro.id===_a.id))!=null&&so.delete||ym.dismiss(_a.id),Li.filter(({id:Ro})=>Ro!==_a.id)})},[]);return aa.useEffect(()=>ym.subscribe(_a=>{if(_a.dismiss){dn(Li=>Li.map(so=>so.id===_a.id?{...so,delete:!0}:so));return}setTimeout(()=>{$ae.flushSync(()=>{dn(Li=>{let so=Li.findIndex(Ro=>Ro.id===_a.id);return so!==-1?[...Li.slice(0,so),{...Li[so],..._a},...Li.slice(so+1)]:[_a,...Li]})})})}),[]),aa.useEffect(()=>{if(vt!=="system"){pa(vt);return}if(vt==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?pa("dark"):pa("light")),typeof window>"u")return;let _a=window.matchMedia("(prefers-color-scheme: dark)");try{_a.addEventListener("change",({matches:Li})=>{pa(Li?"dark":"light")})}catch{_a.addListener(({matches:so})=>{try{pa(so?"dark":"light")}catch(Ro){console.error(Ro)}})}},[vt]),aa.useEffect(()=>{$r.length<=1&&ta(!1)},[$r]),aa.useEffect(()=>{let _a=Li=>{var so,Ro;re.every(co=>Li[co]||Li.code===co)&&(ta(!0),(so=Ra.current)==null||so.focus()),Li.code==="Escape"&&(document.activeElement===Ra.current||(Ro=Ra.current)!=null&&Ro.contains(document.activeElement))&&ta(!1)};return document.addEventListener("keydown",_a),()=>document.removeEventListener("keydown",_a)},[re]),aa.useEffect(()=>{if(Ra.current)return()=>{Pi.current&&(Pi.current.focus({preventScroll:!0}),Pi.current=null,Eo.current=!1)}},[Ra.current]),aa.createElement("section",{ref:n,"aria-label":`${yn} ${vi}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},Jn.map((_a,Li)=>{var so;let[Ro,co]=_a.split("-");return $r.length?aa.createElement("ol",{key:_a,dir:nr==="auto"?SB():nr,tabIndex:-1,ref:Ra,className:Be,"data-sonner-toaster":!0,"data-theme":ja,"data-y-position":Ro,"data-lifted":zn&&$r.length>1&&!ve,"data-x-position":co,style:{"--front-toast-height":`${((so=xn[0])==null?void 0:so.height)||0}px`,"--width":`${mie}px`,"--gap":`${jr}px`,...$t,...wie(Xe,Ke)},onBlur:$o=>{Eo.current&&!$o.currentTarget.contains($o.relatedTarget)&&(Eo.current=!1,Pi.current&&(Pi.current.focus({preventScroll:!0}),Pi.current=null))},onFocus:$o=>{$o.target instanceof HTMLElement&&$o.target.dataset.dismissible==="false"||Eo.current||(Eo.current=!0,Pi.current=$o.relatedTarget)},onMouseEnter:()=>ta(!0),onMouseMove:()=>ta(!0),onMouseLeave:()=>{qa||ta(!1)},onDragEnd:()=>ta(!1),onPointerDown:$o=>{$o.target instanceof HTMLElement&&$o.target.dataset.dismissible==="false"||la(!0)},onPointerUp:()=>la(!1)},$r.filter($o=>!$o.position&&Li===0||$o.position===_a).map(($o,$u)=>{var Bo,Ml;return aa.createElement(bie,{key:$o.id,icons:an,index:$u,toast:$o,defaultRichColors:yt,duration:(Bo=sr?.duration)!=null?Bo:Gt,className:sr?.className,descriptionClassName:sr?.descriptionClassName,invert:S,visibleToasts:gr,closeButton:(Ml=sr?.closeButton)!=null?Ml:Ce,interacting:qa,position:_a,style:sr?.style,unstyled:sr?.unstyled,classNames:sr?.classNames,cancelButtonStyle:sr?.cancelButtonStyle,actionButtonStyle:sr?.actionButtonStyle,removeToast:ma,toasts:$r.filter(ns=>ns.position==$o.position),heights:xn.filter(ns=>ns.position==$o.position),setHeights:Na,expandByDefault:ve,gap:jr,loadingIcon:Ne,expanded:zn,pauseWhenPageIsHidden:Lr,swipeDirections:e.swipeDirections})})):null}))});const Tie=Object.freeze(Object.defineProperty({__proto__:null,Toaster:YX,toast:Nu},Symbol.toStringTag,{value:"Module"}));var IT=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Aie={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)},Sie=class{#e=Aie;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,n){return this.#e.setTimeout(e,n)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,n){return this.#e.setInterval(e,n)}clearInterval(e){this.#e.clearInterval(e)}},ew=new Sie;function Eie(e){setTimeout(e,0)}var fw=typeof window>"u"||"Deno"in globalThis;function tm(){}function Mie(e,n){return typeof e=="function"?e(n):e}function GO(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZX(e,n){return Math.max(e+(n||0)-Date.now(),0)}function sx(e,n){return typeof e=="function"?e(n):e}function E0(e,n){return typeof e=="function"?e(n):e}function EB(e,n){const{type:S="all",exact:L,fetchStatus:re,predicate:ve,queryKey:Ce,stale:Be}=e;if(Ce){if(L){if(n.queryHash!==w7(Ce,n.options))return!1}else if(!eE(n.queryKey,Ce))return!1}if(S!=="all"){const Xe=n.isActive();if(S==="active"&&!Xe||S==="inactive"&&Xe)return!1}return!(typeof Be=="boolean"&&n.isStale()!==Be||re&&re!==n.state.fetchStatus||ve&&!ve(n))}function MB(e,n){const{exact:S,status:L,predicate:re,mutationKey:ve}=e;if(ve){if(!n.options.mutationKey)return!1;if(S){if(hw(n.options.mutationKey)!==hw(ve))return!1}else if(!eE(n.options.mutationKey,ve))return!1}return!(L&&n.state.status!==L||re&&!re(n))}function w7(e,n){return(n?.queryKeyHashFn||hw)(e)}function hw(e){return JSON.stringify(e,(n,S)=>XO(S)?Object.keys(S).sort().reduce((L,re)=>(L[re]=S[re],L),{}):S)}function eE(e,n){return e===n?!0:typeof e!=typeof n?!1:e&&n&&typeof e=="object"&&typeof n=="object"?Object.keys(n).every(S=>eE(e[S],n[S])):!1}var Cie=Object.prototype.hasOwnProperty;function $X(e,n){if(e===n)return e;const S=CB(e)&&CB(n);if(!S&&!(XO(e)&&XO(n)))return n;const re=(S?e:Object.keys(e)).length,ve=S?n:Object.keys(n),Ce=ve.length,Be=S?new Array(Ce):{};let Xe=0;for(let Ke=0;Ke<Ce;Ke++){const vt=S?Ke:ve[Ke],yt=e[vt],Gt=n[vt];if(yt===Gt){Be[vt]=yt,(S?Ke<re:Cie.call(e,vt))&&Xe++;continue}if(yt===null||Gt===null||typeof yt!="object"||typeof Gt!="object"){Be[vt]=Gt;continue}const $t=$X(yt,Gt);Be[vt]=$t,$t===yt&&Xe++}return re===Ce&&Xe===re?e:Be}function Lk(e,n){if(!n||Object.keys(e).length!==Object.keys(n).length)return!1;for(const S in e)if(e[S]!==n[S])return!1;return!0}function CB(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function XO(e){if(!kB(e))return!1;const n=e.constructor;if(n===void 0)return!0;const S=n.prototype;return!(!kB(S)||!S.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kB(e){return Object.prototype.toString.call(e)==="[object Object]"}function kie(e){return new Promise(n=>{ew.setTimeout(n,e)})}function WO(e,n,S){return typeof S.structuralSharing=="function"?S.structuralSharing(e,n):S.structuralSharing!==!1?$X(e,n):n}function Pie(e,n,S=0){const L=[...e,n];return S&&L.length>S?L.slice(1):L}function Lie(e,n,S=0){const L=[n,...e];return S&&L.length>S?L.slice(0,-1):L}var T7=Symbol();function KX(e,n){return!e.queryFn&&n?.initialPromise?()=>n.initialPromise:!e.queryFn||e.queryFn===T7?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function JX(e,n){return typeof e=="function"?e(...n):!!e}var Rie=class extends IT{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!fw&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},A7=new Rie;function YO(){let e,n;const S=new Promise((re,ve)=>{e=re,n=ve});S.status="pending",S.catch(()=>{});function L(re){Object.assign(S,re),delete S.resolve,delete S.reject}return S.resolve=re=>{L({status:"fulfilled",value:re}),e(re)},S.reject=re=>{L({status:"rejected",reason:re}),n(re)},S}var Iie=Eie;function Die(){let e=[],n=0,S=Be=>{Be()},L=Be=>{Be()},re=Iie;const ve=Be=>{n?e.push(Be):re(()=>{S(Be)})},Ce=()=>{const Be=e;e=[],Be.length&&re(()=>{L(()=>{Be.forEach(Xe=>{S(Xe)})})})};return{batch:Be=>{let Xe;n++;try{Xe=Be()}finally{n--,n||Ce()}return Xe},batchCalls:Be=>(...Xe)=>{ve(()=>{Be(...Xe)})},schedule:ve,setNotifyFunction:Be=>{S=Be},setBatchNotifyFunction:Be=>{L=Be},setScheduler:Be=>{re=Be}}}var Rv=Die(),Oie=class extends IT{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!fw&&window.addEventListener){const n=()=>e(!0),S=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",S,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",S)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(S=>{S(e)}))}isOnline(){return this.#e}},Rk=new Oie;function zie(e){return Math.min(1e3*2**e,3e4)}function QX(e){return(e??"online")==="online"?Rk.isOnline():!0}var ZO=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function eW(e){let n=!1,S=0,L;const re=YO(),ve=()=>re.status!=="pending",Ce=sr=>{if(!ve()){const nr=new ZO(sr);Gt(nr),e.onCancel?.(nr)}},Be=()=>{n=!0},Xe=()=>{n=!1},Ke=()=>A7.isFocused()&&(e.networkMode==="always"||Rk.isOnline())&&e.canRun(),vt=()=>QX(e.networkMode)&&e.canRun(),yt=sr=>{ve()||(L?.(),re.resolve(sr))},Gt=sr=>{ve()||(L?.(),re.reject(sr))},$t=()=>new Promise(sr=>{L=nr=>{(ve()||Ke())&&sr(nr)},e.onPause?.()}).then(()=>{L=void 0,ve()||e.onContinue?.()}),gr=()=>{if(ve())return;let sr;const nr=S===0?e.initialPromise:void 0;try{sr=nr??e.fn()}catch(jr){sr=Promise.reject(jr)}Promise.resolve(sr).then(yt).catch(jr=>{if(ve())return;const Ne=e.retry??(fw?0:3),an=e.retryDelay??zie,yn=typeof an=="function"?an(S,jr):an,Lr=Ne===!0||typeof Ne=="number"&&S<Ne||typeof Ne=="function"&&Ne(S,jr);if(n||!Lr){Gt(jr);return}S++,e.onFail?.(S,jr),kie(yn).then(()=>Ke()?void 0:$t()).then(()=>{n?Gt(jr):gr()})})};return{promise:re,status:()=>re.status,cancel:Ce,continue:()=>(L?.(),re),cancelRetry:Be,continueRetry:Xe,canStart:vt,start:()=>(vt()?gr():$t().then(gr),re)}}var tW=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),GO(this.gcTime)&&(this.#e=ew.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fw?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ew.clearTimeout(this.#e),this.#e=void 0)}},Nie=class extends tW{#e;#t;#r;#a;#n;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#r=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=LB(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#o,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=LB(this.options);n.data!==void 0&&(this.setState(PB(n.data,n.dataUpdatedAt)),this.#e=n)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,n){const S=WO(this.state.data,e,this.options);return this.#i({data:S,type:"success",dataUpdatedAt:n?.updatedAt,manual:n?.manual}),S}setState(e,n){this.#i({type:"setState",state:e,setStateOptions:n})}cancel(e){const n=this.#n?.promise;return this.#n?.cancel(e),n?n.then(tm).catch(tm):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>E0(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===T7||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>sx(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!ZX(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(n=>n.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(n=>n.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(this.#n&&(this.#s?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,n){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&n?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const Be=this.observers.find(Xe=>Xe.options.queryFn);Be&&this.setOptions(Be.options)}const S=new AbortController,L=Be=>{Object.defineProperty(Be,"signal",{enumerable:!0,get:()=>(this.#s=!0,S.signal)})},re=()=>{const Be=KX(this.options,n),Ke=(()=>{const vt={client:this.#a,queryKey:this.queryKey,meta:this.meta};return L(vt),vt})();return this.#s=!1,this.options.persister?this.options.persister(Be,Ke,this):Be(Ke)},Ce=(()=>{const Be={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:re};return L(Be),Be})();this.options.behavior?.onFetch(Ce,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==Ce.fetchOptions?.meta)&&this.#i({type:"fetch",meta:Ce.fetchOptions?.meta}),this.#n=eW({initialPromise:n?.initialPromise,fn:Ce.fetchFn,onCancel:Be=>{Be instanceof ZO&&Be.revert&&this.setState({...this.#t,fetchStatus:"idle"}),S.abort()},onFail:(Be,Xe)=>{this.#i({type:"failed",failureCount:Be,error:Xe})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:Ce.options.retry,retryDelay:Ce.options.retryDelay,networkMode:Ce.options.networkMode,canRun:()=>!0});try{const Be=await this.#n.start();if(Be===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(Be),this.#r.config.onSuccess?.(Be,this),this.#r.config.onSettled?.(Be,this.state.error,this),Be}catch(Be){if(Be instanceof ZO){if(Be.silent)return this.#n.promise;if(Be.revert){if(this.state.data===void 0)throw Be;return this.state.data}}throw this.#i({type:"error",error:Be}),this.#r.config.onError?.(Be,this),this.#r.config.onSettled?.(this.state.data,Be,this),Be}finally{this.scheduleGc()}}#i(e){const n=S=>{switch(e.type){case"failed":return{...S,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...S,fetchStatus:"paused"};case"continue":return{...S,fetchStatus:"fetching"};case"fetch":return{...S,...rW(S.data,this.options),fetchMeta:e.meta??null};case"success":const L={...S,...PB(e.data,e.dataUpdatedAt),dataUpdateCount:S.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?L:void 0,L;case"error":const re=e.error;return{...S,error:re,errorUpdateCount:S.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:S.fetchFailureCount+1,fetchFailureReason:re,fetchStatus:"idle",status:"error"};case"invalidate":return{...S,isInvalidated:!0};case"setState":return{...S,...e.state}}};this.state=n(this.state),Rv.batch(()=>{this.observers.forEach(S=>{S.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function rW(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:QX(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function PB(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function LB(e){const n=typeof e.initialData=="function"?e.initialData():e.initialData,S=n!==void 0,L=S?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:S?L??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:S?"success":"pending",fetchStatus:"idle"}}var Fie=class extends IT{constructor(e,n){super(),this.options=n,this.#e=e,this.#i=null,this.#s=YO(),this.bindMethods(),this.setOptions(n)}#e;#t=void 0;#r=void 0;#a=void 0;#n;#o;#s;#i;#p;#h;#d;#u;#c;#l;#v=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),RB(this.#t,this.options)?this.#f():this.updateResult(),this.#_())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $O(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $O(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#b(),this.#t.removeObserver(this)}setOptions(e){const n=this.options,S=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof E0(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#t.setOptions(this.options),n._defaulted&&!Lk(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const L=this.hasListeners();L&&IB(this.#t,S,this.options,n)&&this.#f(),this.updateResult(),L&&(this.#t!==S||E0(this.options.enabled,this.#t)!==E0(n.enabled,this.#t)||sx(this.options.staleTime,this.#t)!==sx(n.staleTime,this.#t))&&this.#m();const re=this.#y();L&&(this.#t!==S||E0(this.options.enabled,this.#t)!==E0(n.enabled,this.#t)||re!==this.#l)&&this.#g(re)}getOptimisticResult(e){const n=this.#e.getQueryCache().build(this.#e,e),S=this.createResult(n,e);return jie(this,S)&&(this.#a=S,this.#o=this.options,this.#n=this.#t.state),S}getCurrentResult(){return this.#a}trackResult(e,n){return new Proxy(e,{get:(S,L)=>(this.trackProp(L),n?.(L),L==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#s.status==="pending"&&this.#s.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(S,L))})}trackProp(e){this.#v.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=this.#e.defaultQueryOptions(e),S=this.#e.getQueryCache().build(this.#e,n);return S.fetch().then(()=>this.createResult(S,n))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#f(e){this.#w();let n=this.#t.fetch(this.options,e);return e?.throwOnError||(n=n.catch(tm)),n}#m(){this.#x();const e=sx(this.options.staleTime,this.#t);if(fw||this.#a.isStale||!GO(e))return;const S=ZX(this.#a.dataUpdatedAt,e)+1;this.#u=ew.setTimeout(()=>{this.#a.isStale||this.updateResult()},S)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(e){this.#b(),this.#l=e,!(fw||E0(this.options.enabled,this.#t)===!1||!GO(this.#l)||this.#l===0)&&(this.#c=ew.setInterval(()=>{(this.options.refetchIntervalInBackground||A7.isFocused())&&this.#f()},this.#l))}#_(){this.#m(),this.#g(this.#y())}#x(){this.#u&&(ew.clearTimeout(this.#u),this.#u=void 0)}#b(){this.#c&&(ew.clearInterval(this.#c),this.#c=void 0)}createResult(e,n){const S=this.#t,L=this.options,re=this.#a,ve=this.#n,Ce=this.#o,Xe=e!==S?e.state:this.#r,{state:Ke}=e;let vt={...Ke},yt=!1,Gt;if(n._optimisticResults){const Jn=this.hasListeners(),xn=!Jn&&RB(e,n),Na=Jn&&IB(e,S,n,L);(xn||Na)&&(vt={...vt,...rW(Ke.data,e.options)}),n._optimisticResults==="isRestoring"&&(vt.fetchStatus="idle")}let{error:$t,errorUpdatedAt:gr,status:sr}=vt;Gt=vt.data;let nr=!1;if(n.placeholderData!==void 0&&Gt===void 0&&sr==="pending"){let Jn;re?.isPlaceholderData&&n.placeholderData===Ce?.placeholderData?(Jn=re.data,nr=!0):Jn=typeof n.placeholderData=="function"?n.placeholderData(this.#d?.state.data,this.#d):n.placeholderData,Jn!==void 0&&(sr="success",Gt=WO(re?.data,Jn,n),yt=!0)}if(n.select&&Gt!==void 0&&!nr)if(re&&Gt===ve?.data&&n.select===this.#p)Gt=this.#h;else try{this.#p=n.select,Gt=n.select(Gt),Gt=WO(re?.data,Gt,n),this.#h=Gt,this.#i=null}catch(Jn){this.#i=Jn}this.#i&&($t=this.#i,Gt=this.#h,gr=Date.now(),sr="error");const jr=vt.fetchStatus==="fetching",Ne=sr==="pending",an=sr==="error",yn=Ne&&jr,Lr=Gt!==void 0,dn={status:sr,fetchStatus:vt.fetchStatus,isPending:Ne,isSuccess:sr==="success",isError:an,isInitialLoading:yn,isLoading:yn,data:Gt,dataUpdatedAt:vt.dataUpdatedAt,error:$t,errorUpdatedAt:gr,failureCount:vt.fetchFailureCount,failureReason:vt.fetchFailureReason,errorUpdateCount:vt.errorUpdateCount,isFetched:vt.dataUpdateCount>0||vt.errorUpdateCount>0,isFetchedAfterMount:vt.dataUpdateCount>Xe.dataUpdateCount||vt.errorUpdateCount>Xe.errorUpdateCount,isFetching:jr,isRefetching:jr&&!Ne,isLoadingError:an&&!Lr,isPaused:vt.fetchStatus==="paused",isPlaceholderData:yt,isRefetchError:an&&Lr,isStale:S7(e,n),refetch:this.refetch,promise:this.#s,isEnabled:E0(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const Jn=zn=>{dn.status==="error"?zn.reject(dn.error):dn.data!==void 0&&zn.resolve(dn.data)},xn=()=>{const zn=this.#s=dn.promise=YO();Jn(zn)},Na=this.#s;switch(Na.status){case"pending":e.queryHash===S.queryHash&&Jn(Na);break;case"fulfilled":(dn.status==="error"||dn.data!==Na.value)&&xn();break;case"rejected":(dn.status!=="error"||dn.error!==Na.reason)&&xn();break}}return dn}updateResult(){const e=this.#a,n=this.createResult(this.#t,this.options);if(this.#n=this.#t.state,this.#o=this.options,this.#n.data!==void 0&&(this.#d=this.#t),Lk(n,e))return;this.#a=n;const S=()=>{if(!e)return!0;const{notifyOnChangeProps:L}=this.options,re=typeof L=="function"?L():L;if(re==="all"||!re&&!this.#v.size)return!0;const ve=new Set(re??this.#v);return this.options.throwOnError&&ve.add("error"),Object.keys(this.#a).some(Ce=>{const Be=Ce;return this.#a[Be]!==e[Be]&&ve.has(Be)})};this.#T({listeners:S()})}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const n=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(n?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#_()}#T(e){Rv.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Bie(e,n){return E0(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&n.retryOnMount===!1)}function RB(e,n){return Bie(e,n)||e.state.data!==void 0&&$O(e,n,n.refetchOnMount)}function $O(e,n,S){if(E0(n.enabled,e)!==!1&&sx(n.staleTime,e)!=="static"){const L=typeof S=="function"?S(e):S;return L==="always"||L!==!1&&S7(e,n)}return!1}function IB(e,n,S,L){return(e!==n||E0(L.enabled,e)===!1)&&(!S.suspense||e.state.status!=="error")&&S7(e,S)}function S7(e,n){return E0(n.enabled,e)!==!1&&e.isStaleByTime(sx(n.staleTime,e))}function jie(e,n){return!Lk(e.getCurrentResult(),n)}function DB(e){return{onFetch:(n,S)=>{const L=n.options,re=n.fetchOptions?.meta?.fetchMore?.direction,ve=n.state.data?.pages||[],Ce=n.state.data?.pageParams||[];let Be={pages:[],pageParams:[]},Xe=0;const Ke=async()=>{let vt=!1;const yt=gr=>{Object.defineProperty(gr,"signal",{enumerable:!0,get:()=>(n.signal.aborted?vt=!0:n.signal.addEventListener("abort",()=>{vt=!0}),n.signal)})},Gt=KX(n.options,n.fetchOptions),$t=async(gr,sr,nr)=>{if(vt)return Promise.reject();if(sr==null&&gr.pages.length)return Promise.resolve(gr);const Ne=(()=>{const $r={client:n.client,queryKey:n.queryKey,pageParam:sr,direction:nr?"backward":"forward",meta:n.options.meta};return yt($r),$r})(),an=await Gt(Ne),{maxPages:yn}=n.options,Lr=nr?Lie:Pie;return{pages:Lr(gr.pages,an,yn),pageParams:Lr(gr.pageParams,sr,yn)}};if(re&&ve.length){const gr=re==="backward",sr=gr?Uie:OB,nr={pages:ve,pageParams:Ce},jr=sr(L,nr);Be=await $t(nr,jr,gr)}else{const gr=e??ve.length;do{const sr=Xe===0?Ce[0]??L.initialPageParam:OB(L,Be);if(Xe>0&&sr==null)break;Be=await $t(Be,sr),Xe++}while(Xe<gr)}return Be};n.options.persister?n.fetchFn=()=>n.options.persister?.(Ke,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},S):n.fetchFn=Ke}}}function OB(e,{pages:n,pageParams:S}){const L=n.length-1;return n.length>0?e.getNextPageParam(n[L],n,S[L],S):void 0}function Uie(e,{pages:n,pageParams:S}){return n.length>0?e.getPreviousPageParam?.(n[0],n,S[0],S):void 0}var qie=class extends tW{#e;#t;#r;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#r=e.mutationCache,this.#t=[],this.state=e.state||nW(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(n=>n!==e),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#r.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const n=()=>{this.#n({type:"continue"})},S={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=eW({fn:()=>this.options.mutationFn?this.options.mutationFn(e,S):Promise.reject(new Error("No mutationFn found")),onFail:(ve,Ce)=>{this.#n({type:"failed",failureCount:ve,error:Ce})},onPause:()=>{this.#n({type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});const L=this.state.status==="pending",re=!this.#a.canStart();try{if(L)n();else{this.#n({type:"pending",variables:e,isPaused:re}),await this.#r.config.onMutate?.(e,this,S);const Ce=await this.options.onMutate?.(e,S);Ce!==this.state.context&&this.#n({type:"pending",context:Ce,variables:e,isPaused:re})}const ve=await this.#a.start();return await this.#r.config.onSuccess?.(ve,e,this.state.context,this,S),await this.options.onSuccess?.(ve,e,this.state.context,S),await this.#r.config.onSettled?.(ve,null,this.state.variables,this.state.context,this,S),await this.options.onSettled?.(ve,null,e,this.state.context,S),this.#n({type:"success",data:ve}),ve}catch(ve){try{throw await this.#r.config.onError?.(ve,e,this.state.context,this,S),await this.options.onError?.(ve,e,this.state.context,S),await this.#r.config.onSettled?.(void 0,ve,this.state.variables,this.state.context,this,S),await this.options.onSettled?.(void 0,ve,e,this.state.context,S),ve}finally{this.#n({type:"error",error:ve})}}finally{this.#r.runNext(this)}}#n(e){const n=S=>{switch(e.type){case"failed":return{...S,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...S,isPaused:!0};case"continue":return{...S,isPaused:!1};case"pending":return{...S,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...S,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...S,data:void 0,error:e.error,failureCount:S.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Rv.batch(()=>{this.#t.forEach(S=>{S.onMutationUpdate(e)}),this.#r.notify({mutation:this,type:"updated",action:e})})}};function nW(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Vie=class extends IT{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(e,n,S){const L=new qie({client:e,mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(n),state:S});return this.add(L),L}add(e){this.#e.add(e);const n=hk(e);if(typeof n=="string"){const S=this.#t.get(n);S?S.push(e):this.#t.set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const n=hk(e);if(typeof n=="string"){const S=this.#t.get(n);if(S)if(S.length>1){const L=S.indexOf(e);L!==-1&&S.splice(L,1)}else S[0]===e&&this.#t.delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=hk(e);if(typeof n=="string"){const L=this.#t.get(n)?.find(re=>re.state.status==="pending");return!L||L===e}else return!0}runNext(e){const n=hk(e);return typeof n=="string"?this.#t.get(n)?.find(L=>L!==e&&L.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Rv.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const n={exact:!0,...e};return this.getAll().find(S=>MB(n,S))}findAll(e={}){return this.getAll().filter(n=>MB(e,n))}notify(e){Rv.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Rv.batch(()=>Promise.all(e.map(n=>n.continue().catch(tm))))}};function hk(e){return e.options.scope?.id}var Hie=class extends IT{#e;#t=void 0;#r;#a;constructor(n,S){super(),this.#e=n,this.setOptions(S),this.bindMethods(),this.#n()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){const S=this.options;this.options=this.#e.defaultMutationOptions(n),Lk(this.options,S)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),S?.mutationKey&&this.options.mutationKey&&hw(S.mutationKey)!==hw(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(n){this.#n(),this.#o(n)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#n(),this.#o()}mutate(n,S){return this.#a=S,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(n)}#n(){const n=this.#r?.state??nW();this.#t={...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset}}#o(n){Rv.batch(()=>{if(this.#a&&this.hasListeners()){const S=this.#t.variables,L=this.#t.context,re={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};n?.type==="success"?(this.#a.onSuccess?.(n.data,S,L,re),this.#a.onSettled?.(n.data,null,S,L,re)):n?.type==="error"&&(this.#a.onError?.(n.error,S,L,re),this.#a.onSettled?.(void 0,n.error,S,L,re))}this.listeners.forEach(S=>{S(this.#t)})})}},Gie=class extends IT{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,n,S){const L=n.queryKey,re=n.queryHash??w7(L,n);let ve=this.get(re);return ve||(ve=new Nie({client:e,queryKey:L,queryHash:re,options:e.defaultQueryOptions(n),state:S,defaultOptions:e.getQueryDefaults(L)}),this.add(ve)),ve}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=this.#e.get(e.queryHash);n&&(e.destroy(),n===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Rv.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const n={exact:!0,...e};return this.getAll().find(S=>EB(n,S))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(S=>EB(e,S)):n}notify(e){Rv.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Rv.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Rv.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Xie=class{#e;#t;#r;#a;#n;#o;#s;#i;constructor(e={}){this.#e=e.queryCache||new Gie,this.#t=e.mutationCache||new Vie,this.#r=e.defaultOptions||{},this.#a=new Map,this.#n=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#s=A7.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=Rk.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#s?.(),this.#s=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),S=this.#e.build(this,n),L=S.state.data;return L===void 0?this.fetchQuery(e):(e.revalidateIfStale&&S.isStaleByTime(sx(n.staleTime,S))&&this.prefetchQuery(n),Promise.resolve(L))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:n,state:S})=>{const L=S.data;return[n,L]})}setQueryData(e,n,S){const L=this.defaultQueryOptions({queryKey:e}),ve=this.#e.get(L.queryHash)?.state.data,Ce=Mie(n,ve);if(Ce!==void 0)return this.#e.build(this,L).setData(Ce,{...S,manual:!0})}setQueriesData(e,n,S){return Rv.batch(()=>this.#e.findAll(e).map(({queryKey:L})=>[L,this.setQueryData(L,n,S)]))}getQueryState(e){const n=this.defaultQueryOptions({queryKey:e});return this.#e.get(n.queryHash)?.state}removeQueries(e){const n=this.#e;Rv.batch(()=>{n.findAll(e).forEach(S=>{n.remove(S)})})}resetQueries(e,n){const S=this.#e;return Rv.batch(()=>(S.findAll(e).forEach(L=>{L.reset()}),this.refetchQueries({type:"active",...e},n)))}cancelQueries(e,n={}){const S={revert:!0,...n},L=Rv.batch(()=>this.#e.findAll(e).map(re=>re.cancel(S)));return Promise.all(L).then(tm).catch(tm)}invalidateQueries(e,n={}){return Rv.batch(()=>(this.#e.findAll(e).forEach(S=>{S.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},n)))}refetchQueries(e,n={}){const S={...n,cancelRefetch:n.cancelRefetch??!0},L=Rv.batch(()=>this.#e.findAll(e).filter(re=>!re.isDisabled()&&!re.isStatic()).map(re=>{let ve=re.fetch(void 0,S);return S.throwOnError||(ve=ve.catch(tm)),re.state.fetchStatus==="paused"?Promise.resolve():ve}));return Promise.all(L).then(tm)}fetchQuery(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const S=this.#e.build(this,n);return S.isStaleByTime(sx(n.staleTime,S))?S.fetch(n):Promise.resolve(S.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(tm).catch(tm)}fetchInfiniteQuery(e){return e.behavior=DB(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(tm).catch(tm)}ensureInfiniteQueryData(e){return e.behavior=DB(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Rk.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,n){this.#a.set(hw(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...this.#a.values()],S={};return n.forEach(L=>{eE(e,L.queryKey)&&Object.assign(S,L.defaultOptions)}),S}setMutationDefaults(e,n){this.#n.set(hw(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...this.#n.values()],S={};return n.forEach(L=>{eE(e,L.mutationKey)&&Object.assign(S,L.defaultOptions)}),S}defaultQueryOptions(e){if(e._defaulted)return e;const n={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=w7(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===T7&&(n.enabled=!1),n}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},aW=Ua.createContext(void 0),P0=e=>{const n=Ua.useContext(aW);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},Wie=({client:e,children:n})=>(Ua.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Vt.jsx(aW.Provider,{value:e,children:n})),iW=Ua.createContext(!1),Yie=()=>Ua.useContext(iW);iW.Provider;function Zie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var $ie=Ua.createContext(Zie()),Kie=()=>Ua.useContext($ie),Jie=(e,n)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(n.isReset()||(e.retryOnMount=!1))},Qie=e=>{Ua.useEffect(()=>{e.clearReset()},[e])},eoe=({result:e,errorResetBoundary:n,throwOnError:S,query:L,suspense:re})=>e.isError&&!n.isReset()&&!e.isFetching&&L&&(re&&e.data===void 0||JX(S,[e.error,L])),toe=e=>{if(e.suspense){const S=re=>re==="static"?re:Math.max(re??1e3,1e3),L=e.staleTime;e.staleTime=typeof L=="function"?(...re)=>S(L(...re)):S(L),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},roe=(e,n)=>e.isLoading&&e.isFetching&&!n,noe=(e,n)=>e?.suspense&&n.isPending,zB=(e,n,S)=>n.fetchOptimistic(e).catch(()=>{S.clearReset()});function aoe(e,n,S){const L=Yie(),re=Kie(),ve=P0(),Ce=ve.defaultQueryOptions(e);ve.getDefaultOptions().queries?._experimental_beforeQuery?.(Ce),Ce._optimisticResults=L?"isRestoring":"optimistic",toe(Ce),Jie(Ce,re),Qie(re);const Be=!ve.getQueryCache().get(Ce.queryHash),[Xe]=Ua.useState(()=>new n(ve,Ce)),Ke=Xe.getOptimisticResult(Ce),vt=!L&&e.subscribed!==!1;if(Ua.useSyncExternalStore(Ua.useCallback(yt=>{const Gt=vt?Xe.subscribe(Rv.batchCalls(yt)):tm;return Xe.updateResult(),Gt},[Xe,vt]),()=>Xe.getCurrentResult(),()=>Xe.getCurrentResult()),Ua.useEffect(()=>{Xe.setOptions(Ce)},[Ce,Xe]),noe(Ce,Ke))throw zB(Ce,Xe,re);if(eoe({result:Ke,errorResetBoundary:re,throwOnError:Ce.throwOnError,query:ve.getQueryCache().get(Ce.queryHash),suspense:Ce.suspense}))throw Ke.error;return ve.getDefaultOptions().queries?._experimental_afterQuery?.(Ce,Ke),Ce.experimental_prefetchInRender&&!fw&&roe(Ke,L)&&(Be?zB(Ce,Xe,re):ve.getQueryCache().get(Ce.queryHash)?.promise)?.catch(tm).finally(()=>{Xe.updateResult()}),Ce.notifyOnChangeProps?Ke:Xe.trackResult(Ke)}function vy(e,n){return aoe(e,Fie)}function wm(e,n){const S=P0(),[L]=Ua.useState(()=>new Hie(S,e));Ua.useEffect(()=>{L.setOptions(e)},[L,e]);const re=Ua.useSyncExternalStore(Ua.useCallback(Ce=>L.subscribe(Rv.batchCalls(Ce)),[L]),()=>L.getCurrentResult(),()=>L.getCurrentResult()),ve=Ua.useCallback((Ce,Be)=>{L.mutate(Ce,Be).catch(tm)},[L]);if(re.error&&JX(L.options.throwOnError,[re.error]))throw re.error;return{...re,mutate:ve,mutateAsync:re.mutate}}const ioe=new Xie({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3,retry:1,refetchOnWindowFocus:!1},mutations:{retry:1}}});function ooe({children:e}){return Vt.jsx(Wie,{client:ioe,children:e})}const oW=Ua.createContext(void 0);function soe({children:e}){const[n,S]=Ua.useState(!1),[L,re]=Ua.useState(null),[ve,Ce]=Ua.useState(null),Be=(Ke,vt)=>{re(Ke),Ce(vt),S(!0)},Xe=()=>{S(!1)};return Vt.jsx(oW.Provider,{value:{isVisualizationOpen:n,sessionId:L,modelBackend:ve,openVisualization:Be,closeVisualization:Xe},children:e})}function sW(){const e=Ua.useContext(oW);if(!e)throw new Error("useVisualization must be used within VisualizationProvider");return e}function lW(e,n){return function(){return e.apply(n,arguments)}}const{toString:loe}=Object.prototype,{getPrototypeOf:E7}=Object,{iterator:IP,toStringTag:uW}=Symbol,DP=(e=>n=>{const S=loe.call(n);return e[S]||(e[S]=S.slice(8,-1).toLowerCase())})(Object.create(null)),py=e=>(e=e.toLowerCase(),n=>DP(n)===e),OP=e=>n=>typeof n===e,{isArray:DT}=Array,oT=OP("undefined");function NE(e){return e!==null&&!oT(e)&&e.constructor!==null&&!oT(e.constructor)&&_m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const cW=py("ArrayBuffer");function uoe(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&cW(e.buffer),n}const coe=OP("string"),_m=OP("function"),fW=OP("number"),FE=e=>e!==null&&typeof e=="object",foe=e=>e===!0||e===!1,Mk=e=>{if(DP(e)!=="object")return!1;const n=E7(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(uW in e)&&!(IP in e)},hoe=e=>{if(!FE(e)||NE(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},doe=py("Date"),voe=py("File"),poe=py("Blob"),moe=py("FileList"),yoe=e=>FE(e)&&_m(e.pipe),goe=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||_m(e.append)&&((n=DP(e))==="formdata"||n==="object"&&_m(e.toString)&&e.toString()==="[object FormData]"))},_oe=py("URLSearchParams"),[xoe,boe,woe,Toe]=["ReadableStream","Request","Response","Headers"].map(py),Aoe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function BE(e,n,{allOwnKeys:S=!1}={}){if(e===null||typeof e>"u")return;let L,re;if(typeof e!="object"&&(e=[e]),DT(e))for(L=0,re=e.length;L<re;L++)n.call(null,e[L],L,e);else{if(NE(e))return;const ve=S?Object.getOwnPropertyNames(e):Object.keys(e),Ce=ve.length;let Be;for(L=0;L<Ce;L++)Be=ve[L],n.call(null,e[Be],Be,e)}}function hW(e,n){if(NE(e))return null;n=n.toLowerCase();const S=Object.keys(e);let L=S.length,re;for(;L-- >0;)if(re=S[L],n===re.toLowerCase())return re;return null}const tw=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,dW=e=>!oT(e)&&e!==tw;function KO(){const{caseless:e,skipUndefined:n}=dW(this)&&this||{},S={},L=(re,ve)=>{const Ce=e&&hW(S,ve)||ve;Mk(S[Ce])&&Mk(re)?S[Ce]=KO(S[Ce],re):Mk(re)?S[Ce]=KO({},re):DT(re)?S[Ce]=re.slice():(!n||!oT(re))&&(S[Ce]=re)};for(let re=0,ve=arguments.length;re<ve;re++)arguments[re]&&BE(arguments[re],L);return S}const Soe=(e,n,S,{allOwnKeys:L}={})=>(BE(n,(re,ve)=>{S&&_m(re)?e[ve]=lW(re,S):e[ve]=re},{allOwnKeys:L}),e),Eoe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Moe=(e,n,S,L)=>{e.prototype=Object.create(n.prototype,L),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),S&&Object.assign(e.prototype,S)},Coe=(e,n,S,L)=>{let re,ve,Ce;const Be={};if(n=n||{},e==null)return n;do{for(re=Object.getOwnPropertyNames(e),ve=re.length;ve-- >0;)Ce=re[ve],(!L||L(Ce,e,n))&&!Be[Ce]&&(n[Ce]=e[Ce],Be[Ce]=!0);e=S!==!1&&E7(e)}while(e&&(!S||S(e,n))&&e!==Object.prototype);return n},koe=(e,n,S)=>{e=String(e),(S===void 0||S>e.length)&&(S=e.length),S-=n.length;const L=e.indexOf(n,S);return L!==-1&&L===S},Poe=e=>{if(!e)return null;if(DT(e))return e;let n=e.length;if(!fW(n))return null;const S=new Array(n);for(;n-- >0;)S[n]=e[n];return S},Loe=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&E7(Uint8Array)),Roe=(e,n)=>{const L=(e&&e[IP]).call(e);let re;for(;(re=L.next())&&!re.done;){const ve=re.value;n.call(e,ve[0],ve[1])}},Ioe=(e,n)=>{let S;const L=[];for(;(S=e.exec(n))!==null;)L.push(S);return L},Doe=py("HTMLFormElement"),Ooe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(S,L,re){return L.toUpperCase()+re}),NB=(({hasOwnProperty:e})=>(n,S)=>e.call(n,S))(Object.prototype),zoe=py("RegExp"),vW=(e,n)=>{const S=Object.getOwnPropertyDescriptors(e),L={};BE(S,(re,ve)=>{let Ce;(Ce=n(re,ve,e))!==!1&&(L[ve]=Ce||re)}),Object.defineProperties(e,L)},Noe=e=>{vW(e,(n,S)=>{if(_m(e)&&["arguments","caller","callee"].indexOf(S)!==-1)return!1;const L=e[S];if(_m(L)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+S+"'")})}})},Foe=(e,n)=>{const S={},L=re=>{re.forEach(ve=>{S[ve]=!0})};return DT(e)?L(e):L(String(e).split(n)),S},Boe=()=>{},joe=(e,n)=>e!=null&&Number.isFinite(e=+e)?e:n;function Uoe(e){return!!(e&&_m(e.append)&&e[uW]==="FormData"&&e[IP])}const qoe=e=>{const n=new Array(10),S=(L,re)=>{if(FE(L)){if(n.indexOf(L)>=0)return;if(NE(L))return L;if(!("toJSON"in L)){n[re]=L;const ve=DT(L)?[]:{};return BE(L,(Ce,Be)=>{const Xe=S(Ce,re+1);!oT(Xe)&&(ve[Be]=Xe)}),n[re]=void 0,ve}}return L};return S(e,0)},Voe=py("AsyncFunction"),Hoe=e=>e&&(FE(e)||_m(e))&&_m(e.then)&&_m(e.catch),pW=((e,n)=>e?setImmediate:n?((S,L)=>(tw.addEventListener("message",({source:re,data:ve})=>{re===tw&&ve===S&&L.length&&L.shift()()},!1),re=>{L.push(re),tw.postMessage(S,"*")}))(`axios@${Math.random()}`,[]):S=>setTimeout(S))(typeof setImmediate=="function",_m(tw.postMessage)),Goe=typeof queueMicrotask<"u"?queueMicrotask.bind(tw):typeof process<"u"&&process.nextTick||pW,Xoe=e=>e!=null&&_m(e[IP]),ao={isArray:DT,isArrayBuffer:cW,isBuffer:NE,isFormData:goe,isArrayBufferView:uoe,isString:coe,isNumber:fW,isBoolean:foe,isObject:FE,isPlainObject:Mk,isEmptyObject:hoe,isReadableStream:xoe,isRequest:boe,isResponse:woe,isHeaders:Toe,isUndefined:oT,isDate:doe,isFile:voe,isBlob:poe,isRegExp:zoe,isFunction:_m,isStream:yoe,isURLSearchParams:_oe,isTypedArray:Loe,isFileList:moe,forEach:BE,merge:KO,extend:Soe,trim:Aoe,stripBOM:Eoe,inherits:Moe,toFlatObject:Coe,kindOf:DP,kindOfTest:py,endsWith:koe,toArray:Poe,forEachEntry:Roe,matchAll:Ioe,isHTMLForm:Doe,hasOwnProperty:NB,hasOwnProp:NB,reduceDescriptors:vW,freezeMethods:Noe,toObjectSet:Foe,toCamelCase:Ooe,noop:Boe,toFiniteNumber:joe,findKey:hW,global:tw,isContextDefined:dW,isSpecCompliantForm:Uoe,toJSONObject:qoe,isAsyncFn:Voe,isThenable:Hoe,setImmediate:pW,asap:Goe,isIterable:Xoe};function qu(e,n,S,L,re){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),S&&(this.config=S),L&&(this.request=L),re&&(this.response=re,this.status=re.status?re.status:null)}ao.inherits(qu,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ao.toJSONObject(this.config),code:this.code,status:this.status}}});const mW=qu.prototype,yW={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{yW[e]={value:e}});Object.defineProperties(qu,yW);Object.defineProperty(mW,"isAxiosError",{value:!0});qu.from=(e,n,S,L,re,ve)=>{const Ce=Object.create(mW);ao.toFlatObject(e,Ce,function(vt){return vt!==Error.prototype},Ke=>Ke!=="isAxiosError");const Be=e&&e.message?e.message:"Error",Xe=n==null&&e?e.code:n;return qu.call(Ce,Be,Xe,S,L,re),e&&Ce.cause==null&&Object.defineProperty(Ce,"cause",{value:e,configurable:!0}),Ce.name=e&&e.name||"Error",ve&&Object.assign(Ce,ve),Ce};const Woe=null;function JO(e){return ao.isPlainObject(e)||ao.isArray(e)}function gW(e){return ao.endsWith(e,"[]")?e.slice(0,-2):e}function FB(e,n,S){return e?e.concat(n).map(function(re,ve){return re=gW(re),!S&&ve?"["+re+"]":re}).join(S?".":""):n}function Yoe(e){return ao.isArray(e)&&!e.some(JO)}const Zoe=ao.toFlatObject(ao,{},null,function(n){return/^is[A-Z]/.test(n)});function zP(e,n,S){if(!ao.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,S=ao.toFlatObject(S,{metaTokens:!0,dots:!1,indexes:!1},!1,function(sr,nr){return!ao.isUndefined(nr[sr])});const L=S.metaTokens,re=S.visitor||vt,ve=S.dots,Ce=S.indexes,Xe=(S.Blob||typeof Blob<"u"&&Blob)&&ao.isSpecCompliantForm(n);if(!ao.isFunction(re))throw new TypeError("visitor must be a function");function Ke(gr){if(gr===null)return"";if(ao.isDate(gr))return gr.toISOString();if(ao.isBoolean(gr))return gr.toString();if(!Xe&&ao.isBlob(gr))throw new qu("Blob is not supported. Use a Buffer instead.");return ao.isArrayBuffer(gr)||ao.isTypedArray(gr)?Xe&&typeof Blob=="function"?new Blob([gr]):Buffer.from(gr):gr}function vt(gr,sr,nr){let jr=gr;if(gr&&!nr&&typeof gr=="object"){if(ao.endsWith(sr,"{}"))sr=L?sr:sr.slice(0,-2),gr=JSON.stringify(gr);else if(ao.isArray(gr)&&Yoe(gr)||(ao.isFileList(gr)||ao.endsWith(sr,"[]"))&&(jr=ao.toArray(gr)))return sr=gW(sr),jr.forEach(function(an,yn){!(ao.isUndefined(an)||an===null)&&n.append(Ce===!0?FB([sr],yn,ve):Ce===null?sr:sr+"[]",Ke(an))}),!1}return JO(gr)?!0:(n.append(FB(nr,sr,ve),Ke(gr)),!1)}const yt=[],Gt=Object.assign(Zoe,{defaultVisitor:vt,convertValue:Ke,isVisitable:JO});function $t(gr,sr){if(!ao.isUndefined(gr)){if(yt.indexOf(gr)!==-1)throw Error("Circular reference detected in "+sr.join("."));yt.push(gr),ao.forEach(gr,function(jr,Ne){(!(ao.isUndefined(jr)||jr===null)&&re.call(n,jr,ao.isString(Ne)?Ne.trim():Ne,sr,Gt))===!0&&$t(jr,sr?sr.concat(Ne):[Ne])}),yt.pop()}}if(!ao.isObject(e))throw new TypeError("data must be an object");return $t(e),n}function BB(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(L){return n[L]})}function M7(e,n){this._pairs=[],e&&zP(e,this,n)}const _W=M7.prototype;_W.append=function(n,S){this._pairs.push([n,S])};_W.toString=function(n){const S=n?function(L){return n.call(this,L,BB)}:BB;return this._pairs.map(function(re){return S(re[0])+"="+S(re[1])},"").join("&")};function $oe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function xW(e,n,S){if(!n)return e;const L=S&&S.encode||$oe;ao.isFunction(S)&&(S={serialize:S});const re=S&&S.serialize;let ve;if(re?ve=re(n,S):ve=ao.isURLSearchParams(n)?n.toString():new M7(n,S).toString(L),ve){const Ce=e.indexOf("#");Ce!==-1&&(e=e.slice(0,Ce)),e+=(e.indexOf("?")===-1?"?":"&")+ve}return e}class jB{constructor(){this.handlers=[]}use(n,S,L){return this.handlers.push({fulfilled:n,rejected:S,synchronous:L?L.synchronous:!1,runWhen:L?L.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){ao.forEach(this.handlers,function(L){L!==null&&n(L)})}}const bW={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Koe=typeof URLSearchParams<"u"?URLSearchParams:M7,Joe=typeof FormData<"u"?FormData:null,Qoe=typeof Blob<"u"?Blob:null,ese={isBrowser:!0,classes:{URLSearchParams:Koe,FormData:Joe,Blob:Qoe},protocols:["http","https","file","blob","url","data"]},C7=typeof window<"u"&&typeof document<"u",QO=typeof navigator=="object"&&navigator||void 0,tse=C7&&(!QO||["ReactNative","NativeScript","NS"].indexOf(QO.product)<0),rse=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nse=C7&&window.location.href||"http://localhost",ase=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:C7,hasStandardBrowserEnv:tse,hasStandardBrowserWebWorkerEnv:rse,navigator:QO,origin:nse},Symbol.toStringTag,{value:"Module"})),Np={...ase,...ese};function ise(e,n){return zP(e,new Np.classes.URLSearchParams,{visitor:function(S,L,re,ve){return Np.isNode&&ao.isBuffer(S)?(this.append(L,S.toString("base64")),!1):ve.defaultVisitor.apply(this,arguments)},...n})}function ose(e){return ao.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function sse(e){const n={},S=Object.keys(e);let L;const re=S.length;let ve;for(L=0;L<re;L++)ve=S[L],n[ve]=e[ve];return n}function wW(e){function n(S,L,re,ve){let Ce=S[ve++];if(Ce==="__proto__")return!0;const Be=Number.isFinite(+Ce),Xe=ve>=S.length;return Ce=!Ce&&ao.isArray(re)?re.length:Ce,Xe?(ao.hasOwnProp(re,Ce)?re[Ce]=[re[Ce],L]:re[Ce]=L,!Be):((!re[Ce]||!ao.isObject(re[Ce]))&&(re[Ce]=[]),n(S,L,re[Ce],ve)&&ao.isArray(re[Ce])&&(re[Ce]=sse(re[Ce])),!Be)}if(ao.isFormData(e)&&ao.isFunction(e.entries)){const S={};return ao.forEachEntry(e,(L,re)=>{n(ose(L),re,S,0)}),S}return null}function lse(e,n,S){if(ao.isString(e))try{return(n||JSON.parse)(e),ao.trim(e)}catch(L){if(L.name!=="SyntaxError")throw L}return(S||JSON.stringify)(e)}const jE={transitional:bW,adapter:["xhr","http","fetch"],transformRequest:[function(n,S){const L=S.getContentType()||"",re=L.indexOf("application/json")>-1,ve=ao.isObject(n);if(ve&&ao.isHTMLForm(n)&&(n=new FormData(n)),ao.isFormData(n))return re?JSON.stringify(wW(n)):n;if(ao.isArrayBuffer(n)||ao.isBuffer(n)||ao.isStream(n)||ao.isFile(n)||ao.isBlob(n)||ao.isReadableStream(n))return n;if(ao.isArrayBufferView(n))return n.buffer;if(ao.isURLSearchParams(n))return S.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let Be;if(ve){if(L.indexOf("application/x-www-form-urlencoded")>-1)return ise(n,this.formSerializer).toString();if((Be=ao.isFileList(n))||L.indexOf("multipart/form-data")>-1){const Xe=this.env&&this.env.FormData;return zP(Be?{"files[]":n}:n,Xe&&new Xe,this.formSerializer)}}return ve||re?(S.setContentType("application/json",!1),lse(n)):n}],transformResponse:[function(n){const S=this.transitional||jE.transitional,L=S&&S.forcedJSONParsing,re=this.responseType==="json";if(ao.isResponse(n)||ao.isReadableStream(n))return n;if(n&&ao.isString(n)&&(L&&!this.responseType||re)){const Ce=!(S&&S.silentJSONParsing)&&re;try{return JSON.parse(n,this.parseReviver)}catch(Be){if(Ce)throw Be.name==="SyntaxError"?qu.from(Be,qu.ERR_BAD_RESPONSE,this,null,this.response):Be}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Np.classes.FormData,Blob:Np.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ao.forEach(["delete","get","head","post","put","patch"],e=>{jE.headers[e]={}});const use=ao.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),cse=e=>{const n={};let S,L,re;return e&&e.split(`
`).forEach(function(Ce){re=Ce.indexOf(":"),S=Ce.substring(0,re).trim().toLowerCase(),L=Ce.substring(re+1).trim(),!(!S||n[S]&&use[S])&&(S==="set-cookie"?n[S]?n[S].push(L):n[S]=[L]:n[S]=n[S]?n[S]+", "+L:L)}),n},UB=Symbol("internals");function D5(e){return e&&String(e).trim().toLowerCase()}function Ck(e){return e===!1||e==null?e:ao.isArray(e)?e.map(Ck):String(e)}function fse(e){const n=Object.create(null),S=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let L;for(;L=S.exec(e);)n[L[1]]=L[2];return n}const hse=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function B8(e,n,S,L,re){if(ao.isFunction(L))return L.call(this,n,S);if(re&&(n=S),!!ao.isString(n)){if(ao.isString(L))return n.indexOf(L)!==-1;if(ao.isRegExp(L))return L.test(n)}}function dse(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,S,L)=>S.toUpperCase()+L)}function vse(e,n){const S=ao.toCamelCase(" "+n);["get","set","has"].forEach(L=>{Object.defineProperty(e,L+S,{value:function(re,ve,Ce){return this[L].call(this,n,re,ve,Ce)},configurable:!0})})}let xm=class{constructor(n){n&&this.set(n)}set(n,S,L){const re=this;function ve(Be,Xe,Ke){const vt=D5(Xe);if(!vt)throw new Error("header name must be a non-empty string");const yt=ao.findKey(re,vt);(!yt||re[yt]===void 0||Ke===!0||Ke===void 0&&re[yt]!==!1)&&(re[yt||Xe]=Ck(Be))}const Ce=(Be,Xe)=>ao.forEach(Be,(Ke,vt)=>ve(Ke,vt,Xe));if(ao.isPlainObject(n)||n instanceof this.constructor)Ce(n,S);else if(ao.isString(n)&&(n=n.trim())&&!hse(n))Ce(cse(n),S);else if(ao.isObject(n)&&ao.isIterable(n)){let Be={},Xe,Ke;for(const vt of n){if(!ao.isArray(vt))throw TypeError("Object iterator must return a key-value pair");Be[Ke=vt[0]]=(Xe=Be[Ke])?ao.isArray(Xe)?[...Xe,vt[1]]:[Xe,vt[1]]:vt[1]}Ce(Be,S)}else n!=null&&ve(S,n,L);return this}get(n,S){if(n=D5(n),n){const L=ao.findKey(this,n);if(L){const re=this[L];if(!S)return re;if(S===!0)return fse(re);if(ao.isFunction(S))return S.call(this,re,L);if(ao.isRegExp(S))return S.exec(re);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,S){if(n=D5(n),n){const L=ao.findKey(this,n);return!!(L&&this[L]!==void 0&&(!S||B8(this,this[L],L,S)))}return!1}delete(n,S){const L=this;let re=!1;function ve(Ce){if(Ce=D5(Ce),Ce){const Be=ao.findKey(L,Ce);Be&&(!S||B8(L,L[Be],Be,S))&&(delete L[Be],re=!0)}}return ao.isArray(n)?n.forEach(ve):ve(n),re}clear(n){const S=Object.keys(this);let L=S.length,re=!1;for(;L--;){const ve=S[L];(!n||B8(this,this[ve],ve,n,!0))&&(delete this[ve],re=!0)}return re}normalize(n){const S=this,L={};return ao.forEach(this,(re,ve)=>{const Ce=ao.findKey(L,ve);if(Ce){S[Ce]=Ck(re),delete S[ve];return}const Be=n?dse(ve):String(ve).trim();Be!==ve&&delete S[ve],S[Be]=Ck(re),L[Be]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const S=Object.create(null);return ao.forEach(this,(L,re)=>{L!=null&&L!==!1&&(S[re]=n&&ao.isArray(L)?L.join(", "):L)}),S}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,S])=>n+": "+S).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...S){const L=new this(n);return S.forEach(re=>L.set(re)),L}static accessor(n){const L=(this[UB]=this[UB]={accessors:{}}).accessors,re=this.prototype;function ve(Ce){const Be=D5(Ce);L[Be]||(vse(re,Ce),L[Be]=!0)}return ao.isArray(n)?n.forEach(ve):ve(n),this}};xm.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);ao.reduceDescriptors(xm.prototype,({value:e},n)=>{let S=n[0].toUpperCase()+n.slice(1);return{get:()=>e,set(L){this[S]=L}}});ao.freezeMethods(xm);function j8(e,n){const S=this||jE,L=n||S,re=xm.from(L.headers);let ve=L.data;return ao.forEach(e,function(Be){ve=Be.call(S,ve,re.normalize(),n?n.status:void 0)}),re.normalize(),ve}function TW(e){return!!(e&&e.__CANCEL__)}function OT(e,n,S){qu.call(this,e??"canceled",qu.ERR_CANCELED,n,S),this.name="CanceledError"}ao.inherits(OT,qu,{__CANCEL__:!0});function AW(e,n,S){const L=S.config.validateStatus;!S.status||!L||L(S.status)?e(S):n(new qu("Request failed with status code "+S.status,[qu.ERR_BAD_REQUEST,qu.ERR_BAD_RESPONSE][Math.floor(S.status/100)-4],S.config,S.request,S))}function pse(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function mse(e,n){e=e||10;const S=new Array(e),L=new Array(e);let re=0,ve=0,Ce;return n=n!==void 0?n:1e3,function(Xe){const Ke=Date.now(),vt=L[ve];Ce||(Ce=Ke),S[re]=Xe,L[re]=Ke;let yt=ve,Gt=0;for(;yt!==re;)Gt+=S[yt++],yt=yt%e;if(re=(re+1)%e,re===ve&&(ve=(ve+1)%e),Ke-Ce<n)return;const $t=vt&&Ke-vt;return $t?Math.round(Gt*1e3/$t):void 0}}function yse(e,n){let S=0,L=1e3/n,re,ve;const Ce=(Ke,vt=Date.now())=>{S=vt,re=null,ve&&(clearTimeout(ve),ve=null),e(...Ke)};return[(...Ke)=>{const vt=Date.now(),yt=vt-S;yt>=L?Ce(Ke,vt):(re=Ke,ve||(ve=setTimeout(()=>{ve=null,Ce(re)},L-yt)))},()=>re&&Ce(re)]}const Ik=(e,n,S=3)=>{let L=0;const re=mse(50,250);return yse(ve=>{const Ce=ve.loaded,Be=ve.lengthComputable?ve.total:void 0,Xe=Ce-L,Ke=re(Xe),vt=Ce<=Be;L=Ce;const yt={loaded:Ce,total:Be,progress:Be?Ce/Be:void 0,bytes:Xe,rate:Ke||void 0,estimated:Ke&&Be&&vt?(Be-Ce)/Ke:void 0,event:ve,lengthComputable:Be!=null,[n?"download":"upload"]:!0};e(yt)},S)},qB=(e,n)=>{const S=e!=null;return[L=>n[0]({lengthComputable:S,total:e,loaded:L}),n[1]]},VB=e=>(...n)=>ao.asap(()=>e(...n)),gse=Np.hasStandardBrowserEnv?((e,n)=>S=>(S=new URL(S,Np.origin),e.protocol===S.protocol&&e.host===S.host&&(n||e.port===S.port)))(new URL(Np.origin),Np.navigator&&/(msie|trident)/i.test(Np.navigator.userAgent)):()=>!0,_se=Np.hasStandardBrowserEnv?{write(e,n,S,L,re,ve,Ce){if(typeof document>"u")return;const Be=[`${e}=${encodeURIComponent(n)}`];ao.isNumber(S)&&Be.push(`expires=${new Date(S).toUTCString()}`),ao.isString(L)&&Be.push(`path=${L}`),ao.isString(re)&&Be.push(`domain=${re}`),ve===!0&&Be.push("secure"),ao.isString(Ce)&&Be.push(`SameSite=${Ce}`),document.cookie=Be.join("; ")},read(e){if(typeof document>"u")return null;const n=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return n?decodeURIComponent(n[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function xse(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function bse(e,n){return n?e.replace(/\/?\/$/,"")+"/"+n.replace(/^\/+/,""):e}function SW(e,n,S){let L=!xse(n);return e&&(L||S==!1)?bse(e,n):n}const HB=e=>e instanceof xm?{...e}:e;function dw(e,n){n=n||{};const S={};function L(Ke,vt,yt,Gt){return ao.isPlainObject(Ke)&&ao.isPlainObject(vt)?ao.merge.call({caseless:Gt},Ke,vt):ao.isPlainObject(vt)?ao.merge({},vt):ao.isArray(vt)?vt.slice():vt}function re(Ke,vt,yt,Gt){if(ao.isUndefined(vt)){if(!ao.isUndefined(Ke))return L(void 0,Ke,yt,Gt)}else return L(Ke,vt,yt,Gt)}function ve(Ke,vt){if(!ao.isUndefined(vt))return L(void 0,vt)}function Ce(Ke,vt){if(ao.isUndefined(vt)){if(!ao.isUndefined(Ke))return L(void 0,Ke)}else return L(void 0,vt)}function Be(Ke,vt,yt){if(yt in n)return L(Ke,vt);if(yt in e)return L(void 0,Ke)}const Xe={url:ve,method:ve,data:ve,baseURL:Ce,transformRequest:Ce,transformResponse:Ce,paramsSerializer:Ce,timeout:Ce,timeoutMessage:Ce,withCredentials:Ce,withXSRFToken:Ce,adapter:Ce,responseType:Ce,xsrfCookieName:Ce,xsrfHeaderName:Ce,onUploadProgress:Ce,onDownloadProgress:Ce,decompress:Ce,maxContentLength:Ce,maxBodyLength:Ce,beforeRedirect:Ce,transport:Ce,httpAgent:Ce,httpsAgent:Ce,cancelToken:Ce,socketPath:Ce,responseEncoding:Ce,validateStatus:Be,headers:(Ke,vt,yt)=>re(HB(Ke),HB(vt),yt,!0)};return ao.forEach(Object.keys({...e,...n}),function(vt){const yt=Xe[vt]||re,Gt=yt(e[vt],n[vt],vt);ao.isUndefined(Gt)&&yt!==Be||(S[vt]=Gt)}),S}const EW=e=>{const n=dw({},e);let{data:S,withXSRFToken:L,xsrfHeaderName:re,xsrfCookieName:ve,headers:Ce,auth:Be}=n;if(n.headers=Ce=xm.from(Ce),n.url=xW(SW(n.baseURL,n.url,n.allowAbsoluteUrls),e.params,e.paramsSerializer),Be&&Ce.set("Authorization","Basic "+btoa((Be.username||"")+":"+(Be.password?unescape(encodeURIComponent(Be.password)):""))),ao.isFormData(S)){if(Np.hasStandardBrowserEnv||Np.hasStandardBrowserWebWorkerEnv)Ce.setContentType(void 0);else if(ao.isFunction(S.getHeaders)){const Xe=S.getHeaders(),Ke=["content-type","content-length"];Object.entries(Xe).forEach(([vt,yt])=>{Ke.includes(vt.toLowerCase())&&Ce.set(vt,yt)})}}if(Np.hasStandardBrowserEnv&&(L&&ao.isFunction(L)&&(L=L(n)),L||L!==!1&&gse(n.url))){const Xe=re&&ve&&_se.read(ve);Xe&&Ce.set(re,Xe)}return n},wse=typeof XMLHttpRequest<"u",Tse=wse&&function(e){return new Promise(function(S,L){const re=EW(e);let ve=re.data;const Ce=xm.from(re.headers).normalize();let{responseType:Be,onUploadProgress:Xe,onDownloadProgress:Ke}=re,vt,yt,Gt,$t,gr;function sr(){$t&&$t(),gr&&gr(),re.cancelToken&&re.cancelToken.unsubscribe(vt),re.signal&&re.signal.removeEventListener("abort",vt)}let nr=new XMLHttpRequest;nr.open(re.method.toUpperCase(),re.url,!0),nr.timeout=re.timeout;function jr(){if(!nr)return;const an=xm.from("getAllResponseHeaders"in nr&&nr.getAllResponseHeaders()),Lr={data:!Be||Be==="text"||Be==="json"?nr.responseText:nr.response,status:nr.status,statusText:nr.statusText,headers:an,config:e,request:nr};AW(function(dn){S(dn),sr()},function(dn){L(dn),sr()},Lr),nr=null}"onloadend"in nr?nr.onloadend=jr:nr.onreadystatechange=function(){!nr||nr.readyState!==4||nr.status===0&&!(nr.responseURL&&nr.responseURL.indexOf("file:")===0)||setTimeout(jr)},nr.onabort=function(){nr&&(L(new qu("Request aborted",qu.ECONNABORTED,e,nr)),nr=null)},nr.onerror=function(yn){const Lr=yn&&yn.message?yn.message:"Network Error",$r=new qu(Lr,qu.ERR_NETWORK,e,nr);$r.event=yn||null,L($r),nr=null},nr.ontimeout=function(){let yn=re.timeout?"timeout of "+re.timeout+"ms exceeded":"timeout exceeded";const Lr=re.transitional||bW;re.timeoutErrorMessage&&(yn=re.timeoutErrorMessage),L(new qu(yn,Lr.clarifyTimeoutError?qu.ETIMEDOUT:qu.ECONNABORTED,e,nr)),nr=null},ve===void 0&&Ce.setContentType(null),"setRequestHeader"in nr&&ao.forEach(Ce.toJSON(),function(yn,Lr){nr.setRequestHeader(Lr,yn)}),ao.isUndefined(re.withCredentials)||(nr.withCredentials=!!re.withCredentials),Be&&Be!=="json"&&(nr.responseType=re.responseType),Ke&&([Gt,gr]=Ik(Ke,!0),nr.addEventListener("progress",Gt)),Xe&&nr.upload&&([yt,$t]=Ik(Xe),nr.upload.addEventListener("progress",yt),nr.upload.addEventListener("loadend",$t)),(re.cancelToken||re.signal)&&(vt=an=>{nr&&(L(!an||an.type?new OT(null,e,nr):an),nr.abort(),nr=null)},re.cancelToken&&re.cancelToken.subscribe(vt),re.signal&&(re.signal.aborted?vt():re.signal.addEventListener("abort",vt)));const Ne=pse(re.url);if(Ne&&Np.protocols.indexOf(Ne)===-1){L(new qu("Unsupported protocol "+Ne+":",qu.ERR_BAD_REQUEST,e));return}nr.send(ve||null)})},Ase=(e,n)=>{const{length:S}=e=e?e.filter(Boolean):[];if(n||S){let L=new AbortController,re;const ve=function(Ke){if(!re){re=!0,Be();const vt=Ke instanceof Error?Ke:this.reason;L.abort(vt instanceof qu?vt:new OT(vt instanceof Error?vt.message:vt))}};let Ce=n&&setTimeout(()=>{Ce=null,ve(new qu(`timeout ${n} of ms exceeded`,qu.ETIMEDOUT))},n);const Be=()=>{e&&(Ce&&clearTimeout(Ce),Ce=null,e.forEach(Ke=>{Ke.unsubscribe?Ke.unsubscribe(ve):Ke.removeEventListener("abort",ve)}),e=null)};e.forEach(Ke=>Ke.addEventListener("abort",ve));const{signal:Xe}=L;return Xe.unsubscribe=()=>ao.asap(Be),Xe}},Sse=function*(e,n){let S=e.byteLength;if(S<n){yield e;return}let L=0,re;for(;L<S;)re=L+n,yield e.slice(L,re),L=re},Ese=async function*(e,n){for await(const S of Mse(e))yield*Sse(S,n)},Mse=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const n=e.getReader();try{for(;;){const{done:S,value:L}=await n.read();if(S)break;yield L}}finally{await n.cancel()}},GB=(e,n,S,L)=>{const re=Ese(e,n);let ve=0,Ce,Be=Xe=>{Ce||(Ce=!0,L&&L(Xe))};return new ReadableStream({async pull(Xe){try{const{done:Ke,value:vt}=await re.next();if(Ke){Be(),Xe.close();return}let yt=vt.byteLength;if(S){let Gt=ve+=yt;S(Gt)}Xe.enqueue(new Uint8Array(vt))}catch(Ke){throw Be(Ke),Ke}},cancel(Xe){return Be(Xe),re.return()}},{highWaterMark:2})},XB=64*1024,{isFunction:dk}=ao,Cse=(({Request:e,Response:n})=>({Request:e,Response:n}))(ao.global),{ReadableStream:WB,TextEncoder:YB}=ao.global,ZB=(e,...n)=>{try{return!!e(...n)}catch{return!1}},kse=e=>{e=ao.merge.call({skipUndefined:!0},Cse,e);const{fetch:n,Request:S,Response:L}=e,re=n?dk(n):typeof fetch=="function",ve=dk(S),Ce=dk(L);if(!re)return!1;const Be=re&&dk(WB),Xe=re&&(typeof YB=="function"?(gr=>sr=>gr.encode(sr))(new YB):async gr=>new Uint8Array(await new S(gr).arrayBuffer())),Ke=ve&&Be&&ZB(()=>{let gr=!1;const sr=new S(Np.origin,{body:new WB,method:"POST",get duplex(){return gr=!0,"half"}}).headers.has("Content-Type");return gr&&!sr}),vt=Ce&&Be&&ZB(()=>ao.isReadableStream(new L("").body)),yt={stream:vt&&(gr=>gr.body)};re&&["text","arrayBuffer","blob","formData","stream"].forEach(gr=>{!yt[gr]&&(yt[gr]=(sr,nr)=>{let jr=sr&&sr[gr];if(jr)return jr.call(sr);throw new qu(`Response type '${gr}' is not supported`,qu.ERR_NOT_SUPPORT,nr)})});const Gt=async gr=>{if(gr==null)return 0;if(ao.isBlob(gr))return gr.size;if(ao.isSpecCompliantForm(gr))return(await new S(Np.origin,{method:"POST",body:gr}).arrayBuffer()).byteLength;if(ao.isArrayBufferView(gr)||ao.isArrayBuffer(gr))return gr.byteLength;if(ao.isURLSearchParams(gr)&&(gr=gr+""),ao.isString(gr))return(await Xe(gr)).byteLength},$t=async(gr,sr)=>{const nr=ao.toFiniteNumber(gr.getContentLength());return nr??Gt(sr)};return async gr=>{let{url:sr,method:nr,data:jr,signal:Ne,cancelToken:an,timeout:yn,onDownloadProgress:Lr,onUploadProgress:$r,responseType:dn,headers:Jn,withCredentials:xn="same-origin",fetchOptions:Na}=EW(gr),zn=n||fetch;dn=dn?(dn+"").toLowerCase():"text";let ta=Ase([Ne,an&&an.toAbortSignal()],yn),qa=null;const la=ta&&ta.unsubscribe&&(()=>{ta.unsubscribe()});let ja;try{if($r&&Ke&&nr!=="get"&&nr!=="head"&&(ja=await $t(Jn,jr))!==0){let ma=new S(sr,{method:"POST",body:jr,duplex:"half"}),_a;if(ao.isFormData(jr)&&(_a=ma.headers.get("content-type"))&&Jn.setContentType(_a),ma.body){const[Li,so]=qB(ja,Ik(VB($r)));jr=GB(ma.body,XB,Li,so)}}ao.isString(xn)||(xn=xn?"include":"omit");const pa=ve&&"credentials"in S.prototype,Ra={...Na,signal:ta,method:nr.toUpperCase(),headers:Jn.normalize().toJSON(),body:jr,duplex:"half",credentials:pa?xn:void 0};qa=ve&&new S(sr,Ra);let vi=await(ve?zn(qa,Na):zn(sr,Ra));const Pi=vt&&(dn==="stream"||dn==="response");if(vt&&(Lr||Pi&&la)){const ma={};["status","statusText","headers"].forEach(Ro=>{ma[Ro]=vi[Ro]});const _a=ao.toFiniteNumber(vi.headers.get("content-length")),[Li,so]=Lr&&qB(_a,Ik(VB(Lr),!0))||[];vi=new L(GB(vi.body,XB,Li,()=>{so&&so(),la&&la()}),ma)}dn=dn||"text";let Eo=await yt[ao.findKey(yt,dn)||"text"](vi,gr);return!Pi&&la&&la(),await new Promise((ma,_a)=>{AW(ma,_a,{data:Eo,headers:xm.from(vi.headers),status:vi.status,statusText:vi.statusText,config:gr,request:qa})})}catch(pa){throw la&&la(),pa&&pa.name==="TypeError"&&/Load failed|fetch/i.test(pa.message)?Object.assign(new qu("Network Error",qu.ERR_NETWORK,gr,qa),{cause:pa.cause||pa}):qu.from(pa,pa&&pa.code,gr,qa)}}},Pse=new Map,MW=e=>{let n=e&&e.env||{};const{fetch:S,Request:L,Response:re}=n,ve=[L,re,S];let Ce=ve.length,Be=Ce,Xe,Ke,vt=Pse;for(;Be--;)Xe=ve[Be],Ke=vt.get(Xe),Ke===void 0&&vt.set(Xe,Ke=Be?new Map:kse(n)),vt=Ke;return Ke};MW();const k7={http:Woe,xhr:Tse,fetch:{get:MW}};ao.forEach(k7,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const $B=e=>`- ${e}`,Lse=e=>ao.isFunction(e)||e===null||e===!1;function Rse(e,n){e=ao.isArray(e)?e:[e];const{length:S}=e;let L,re;const ve={};for(let Ce=0;Ce<S;Ce++){L=e[Ce];let Be;if(re=L,!Lse(L)&&(re=k7[(Be=String(L)).toLowerCase()],re===void 0))throw new qu(`Unknown adapter '${Be}'`);if(re&&(ao.isFunction(re)||(re=re.get(n))))break;ve[Be||"#"+Ce]=re}if(!re){const Ce=Object.entries(ve).map(([Xe,Ke])=>`adapter ${Xe} `+(Ke===!1?"is not supported by the environment":"is not available in the build"));let Be=S?Ce.length>1?`since :
`+Ce.map($B).join(`
`):" "+$B(Ce[0]):"as no adapter specified";throw new qu("There is no suitable adapter to dispatch the request "+Be,"ERR_NOT_SUPPORT")}return re}const CW={getAdapter:Rse,adapters:k7};function U8(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new OT(null,e)}function KB(e){return U8(e),e.headers=xm.from(e.headers),e.data=j8.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),CW.getAdapter(e.adapter||jE.adapter,e)(e).then(function(L){return U8(e),L.data=j8.call(e,e.transformResponse,L),L.headers=xm.from(L.headers),L},function(L){return TW(L)||(U8(e),L&&L.response&&(L.response.data=j8.call(e,e.transformResponse,L.response),L.response.headers=xm.from(L.response.headers))),Promise.reject(L)})}const kW="1.13.1",NP={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{NP[e]=function(L){return typeof L===e||"a"+(n<1?"n ":" ")+e}});const JB={};NP.transitional=function(n,S,L){function re(ve,Ce){return"[Axios v"+kW+"] Transitional option '"+ve+"'"+Ce+(L?". "+L:"")}return(ve,Ce,Be)=>{if(n===!1)throw new qu(re(Ce," has been removed"+(S?" in "+S:"")),qu.ERR_DEPRECATED);return S&&!JB[Ce]&&(JB[Ce]=!0,console.warn(re(Ce," has been deprecated since v"+S+" and will be removed in the near future"))),n?n(ve,Ce,Be):!0}};NP.spelling=function(n){return(S,L)=>(console.warn(`${L} is likely a misspelling of ${n}`),!0)};function Ise(e,n,S){if(typeof e!="object")throw new qu("options must be an object",qu.ERR_BAD_OPTION_VALUE);const L=Object.keys(e);let re=L.length;for(;re-- >0;){const ve=L[re],Ce=n[ve];if(Ce){const Be=e[ve],Xe=Be===void 0||Ce(Be,ve,e);if(Xe!==!0)throw new qu("option "+ve+" must be "+Xe,qu.ERR_BAD_OPTION_VALUE);continue}if(S!==!0)throw new qu("Unknown option "+ve,qu.ERR_BAD_OPTION)}}const kk={assertOptions:Ise,validators:NP},cg=kk.validators;let sw=class{constructor(n){this.defaults=n||{},this.interceptors={request:new jB,response:new jB}}async request(n,S){try{return await this._request(n,S)}catch(L){if(L instanceof Error){let re={};Error.captureStackTrace?Error.captureStackTrace(re):re=new Error;const ve=re.stack?re.stack.replace(/^.+\n/,""):"";try{L.stack?ve&&!String(L.stack).endsWith(ve.replace(/^.+\n.+\n/,""))&&(L.stack+=`
`+ve):L.stack=ve}catch{}}throw L}}_request(n,S){typeof n=="string"?(S=S||{},S.url=n):S=n||{},S=dw(this.defaults,S);const{transitional:L,paramsSerializer:re,headers:ve}=S;L!==void 0&&kk.assertOptions(L,{silentJSONParsing:cg.transitional(cg.boolean),forcedJSONParsing:cg.transitional(cg.boolean),clarifyTimeoutError:cg.transitional(cg.boolean)},!1),re!=null&&(ao.isFunction(re)?S.paramsSerializer={serialize:re}:kk.assertOptions(re,{encode:cg.function,serialize:cg.function},!0)),S.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?S.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:S.allowAbsoluteUrls=!0),kk.assertOptions(S,{baseUrl:cg.spelling("baseURL"),withXsrfToken:cg.spelling("withXSRFToken")},!0),S.method=(S.method||this.defaults.method||"get").toLowerCase();let Ce=ve&&ao.merge(ve.common,ve[S.method]);ve&&ao.forEach(["delete","get","head","post","put","patch","common"],gr=>{delete ve[gr]}),S.headers=xm.concat(Ce,ve);const Be=[];let Xe=!0;this.interceptors.request.forEach(function(sr){typeof sr.runWhen=="function"&&sr.runWhen(S)===!1||(Xe=Xe&&sr.synchronous,Be.unshift(sr.fulfilled,sr.rejected))});const Ke=[];this.interceptors.response.forEach(function(sr){Ke.push(sr.fulfilled,sr.rejected)});let vt,yt=0,Gt;if(!Xe){const gr=[KB.bind(this),void 0];for(gr.unshift(...Be),gr.push(...Ke),Gt=gr.length,vt=Promise.resolve(S);yt<Gt;)vt=vt.then(gr[yt++],gr[yt++]);return vt}Gt=Be.length;let $t=S;for(;yt<Gt;){const gr=Be[yt++],sr=Be[yt++];try{$t=gr($t)}catch(nr){sr.call(this,nr);break}}try{vt=KB.call(this,$t)}catch(gr){return Promise.reject(gr)}for(yt=0,Gt=Ke.length;yt<Gt;)vt=vt.then(Ke[yt++],Ke[yt++]);return vt}getUri(n){n=dw(this.defaults,n);const S=SW(n.baseURL,n.url,n.allowAbsoluteUrls);return xW(S,n.params,n.paramsSerializer)}};ao.forEach(["delete","get","head","options"],function(n){sw.prototype[n]=function(S,L){return this.request(dw(L||{},{method:n,url:S,data:(L||{}).data}))}});ao.forEach(["post","put","patch"],function(n){function S(L){return function(ve,Ce,Be){return this.request(dw(Be||{},{method:n,headers:L?{"Content-Type":"multipart/form-data"}:{},url:ve,data:Ce}))}}sw.prototype[n]=S(),sw.prototype[n+"Form"]=S(!0)});let Dse=class PW{constructor(n){if(typeof n!="function")throw new TypeError("executor must be a function.");let S;this.promise=new Promise(function(ve){S=ve});const L=this;this.promise.then(re=>{if(!L._listeners)return;let ve=L._listeners.length;for(;ve-- >0;)L._listeners[ve](re);L._listeners=null}),this.promise.then=re=>{let ve;const Ce=new Promise(Be=>{L.subscribe(Be),ve=Be}).then(re);return Ce.cancel=function(){L.unsubscribe(ve)},Ce},n(function(ve,Ce,Be){L.reason||(L.reason=new OT(ve,Ce,Be),S(L.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const S=this._listeners.indexOf(n);S!==-1&&this._listeners.splice(S,1)}toAbortSignal(){const n=new AbortController,S=L=>{n.abort(L)};return this.subscribe(S),n.signal.unsubscribe=()=>this.unsubscribe(S),n.signal}static source(){let n;return{token:new PW(function(re){n=re}),cancel:n}}};function Ose(e){return function(S){return e.apply(null,S)}}function zse(e){return ao.isObject(e)&&e.isAxiosError===!0}const ez={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ez).forEach(([e,n])=>{ez[n]=e});function LW(e){const n=new sw(e),S=lW(sw.prototype.request,n);return ao.extend(S,sw.prototype,n,{allOwnKeys:!0}),ao.extend(S,n,null,{allOwnKeys:!0}),S.create=function(re){return LW(dw(e,re))},S}const tv=LW(jE);tv.Axios=sw;tv.CanceledError=OT;tv.CancelToken=Dse;tv.isCancel=TW;tv.VERSION=kW;tv.toFormData=zP;tv.AxiosError=qu;tv.Cancel=tv.CanceledError;tv.all=function(n){return Promise.all(n)};tv.spread=Ose;tv.isAxiosError=zse;tv.mergeConfig=dw;tv.AxiosHeaders=xm;tv.formToJSON=e=>wW(ao.isHTMLForm(e)?new FormData(e):e);tv.getAdapter=CW.getAdapter;tv.HttpStatusCode=ez;tv.default=tv;const{Axios:U3e,AxiosError:q3e,CanceledError:V3e,isCancel:H3e,CancelToken:G3e,VERSION:X3e,all:W3e,Cancel:Y3e,isAxiosError:Z3e,spread:$3e,toFormData:K3e,AxiosHeaders:J3e,HttpStatusCode:Q3e,formToJSON:eTe,getAdapter:tTe,mergeConfig:rTe}=tv,Nse="http://localhost:8000/api/v1",Fse=parseInt("30000"),ch=tv.create({baseURL:Nse,timeout:Fse,headers:{"Content-Type":"application/json"}});ch.interceptors.request.use(e=>e,e=>Promise.reject(e));ch.interceptors.response.use(e=>e,e=>(e.response?console.error(`API Error: ${e.response.status}`,e.response.data):e.request?console.error("API Error: No response received",e.request):console.error("API Error:",e.message),Promise.reject(e)));const Bse=async e=>(await ch.post("/sessions",e||{})).data,jse=async e=>(await ch.get(`/sessions/${e}`)).data,Use=async e=>(await ch.get(`/sessions/${e}/state`)).data,qse=async e=>(await ch.get(`/sessions/${e}/export`,{responseType:"blob"})).data,Vse=async e=>{await ch.post(`/sessions/${e}/save`)},Hse=async e=>{const n=new FormData;return n.append("file",e),(await ch.post("/sessions/import",n,{headers:{"Content-Type":"multipart/form-data"}})).data};function Gse(e){return vy({queryKey:["session",e],queryFn:()=>jse(e),enabled:!!e})}function Xse(e,n){return vy({queryKey:["session-state",e],queryFn:()=>Use(e),enabled:!!e,refetchInterval:n})}function Wse(){const e=P0();return wm({mutationFn:n=>Bse(n),onSuccess:n=>{RW(n.session_id),e.invalidateQueries({queryKey:["session"]})}})}function Yse(e){const n=P0();return wm({mutationFn:async S=>{if(!e)throw new Error("No session ID provided");const L=await fetch(`/api/v1/sessions/${e}/metadata`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});if(!L.ok)throw new Error("Failed to update metadata");return L.json()},onSuccess:()=>{n.invalidateQueries({queryKey:["session",e]})}})}const P7="alchemist_session_id";function Zse(){return localStorage.getItem(P7)}function RW(e){localStorage.setItem(P7,e)}function $se(){localStorage.removeItem(P7)}function Kse(){return wm({mutationFn:async e=>{const{sessionId:n,serverSide:S}=e;if(S)return await Vse(n),{success:!0,serverSide:!0};const L=await qse(n),re=window.URL.createObjectURL(L),ve=document.createElement("a");return ve.href=re,ve.download=`alchemist_session_${n.slice(0,8)}.json`,document.body.appendChild(ve),ve.click(),document.body.removeChild(ve),window.URL.revokeObjectURL(re),{success:!0,serverSide:!1}}})}function Jse(){const e=P0();return wm({mutationFn:n=>Hse(n),onSuccess:n=>{RW(n.session_id),e.clear(),e.invalidateQueries({queryKey:["session"]})}})}function Qse(e,n,S){const[L,re]=Ua.useState(null),[ve,Ce]=Ua.useState(!1),[Be,Xe]=Ua.useState(null),Ke=Ua.useRef(null),vt=Ua.useRef(null),yt=Ua.useRef(null),Gt=Ua.useCallback(()=>{if(e){Ke.current&&Ke.current.close();try{const $t=window.location.protocol==="https:"?"wss:":"ws:",gr=window.location.hostname,sr="8000",nr=new WebSocket(`${$t}//${gr}:${sr}/api/v1/ws/sessions/${e}`);nr.onopen=()=>{console.log("✓ WebSocket connected for session lock status"),Ce(!0),Xe(null)},nr.onmessage=jr=>{try{const Ne=JSON.parse(jr.data);if(Ne.event==="connected")console.log("✓ WebSocket connection confirmed");else if(Ne.event==="lock_status_changed"){const an={locked:Ne.locked,locked_by:Ne.locked_by,locked_at:Ne.locked_at};re(an);const yn=yt.current;yn!==null&&yn!==Ne.locked&&(Ne.locked?Nu.info(`External controller connected: ${Ne.locked_by}`,{duration:5e3}):Nu.info("External controller disconnected - resuming interactive mode",{duration:3e3})),yt.current=Ne.locked,S&&S(Ne.locked,Ne.locked_by)}}catch(Ne){console.error("Failed to parse WebSocket message:",Ne)}},nr.onerror=jr=>{console.error("WebSocket error:",jr),Xe(new Error("WebSocket connection error"))},nr.onclose=()=>{console.log("WebSocket disconnected"),Ce(!1),Ke.current=null,e&&(vt.current=setTimeout(()=>{console.log("Attempting to reconnect WebSocket..."),Gt()},5e3))},Ke.current=nr}catch($t){const gr=$t instanceof Error?$t:new Error("Failed to create WebSocket");Xe(gr),console.error("Error creating WebSocket:",gr)}}},[e,S]);return Ua.useEffect(()=>{if(!e){Ke.current&&(Ke.current.close(),Ke.current=null),vt.current&&clearTimeout(vt.current),Ce(!1),re(null),yt.current=null;return}return Gt(),()=>{Ke.current&&(Ke.current.close(),Ke.current=null),vt.current&&clearTimeout(vt.current)}},[e,Gt]),{lockStatus:L,isConnected:ve,error:Be}}const ele=e=>e==="continuous"?"real":e==="discrete"?"integer":"categorical",IW=e=>{const n={name:e.name,type:ele(e.type)};return e.unit&&(n.unit=e.unit),e.description&&(n.description=e.description),e.type==="continuous"||e.type==="discrete"?e.bounds&&(n.min=e.bounds[0],n.max=e.bounds[1]):e.type==="categorical"&&(n.categories=e.categories),n},DW=async(e,n)=>{const S=IW(n);return(await ch.post(`/sessions/${e}/variables`,S)).data},OW=async(e,n,S)=>{const L=IW(S);return(await ch.put(`/sessions/${e}/variables/${n}`,L)).data},zW=async e=>(await ch.get(`/sessions/${e}/variables`)).data,tle=async(e,n)=>{await ch.delete(`/sessions/${e}/variables/${n}`)},NW=async(e,n)=>{const S=new FormData;return S.append("file",n),(await ch.post(`/sessions/${e}/variables/load`,S,{headers:{"Content-Type":"multipart/form-data"}})).data},FW=async e=>{const n=await ch.get(`/sessions/${e}/variables/export`,{responseType:"blob"}),S=new Blob([n.data],{type:"application/json"}),L=window.URL.createObjectURL(S),re=document.createElement("a");re.href=L,re.download=`variables_${e.slice(0,8)}.json`,document.body.appendChild(re),re.click(),document.body.removeChild(re),window.URL.revokeObjectURL(L)},rle=Object.freeze(Object.defineProperty({__proto__:null,createVariable:DW,deleteVariable:tle,exportVariablesToFile:FW,getVariables:zW,loadVariablesFromFile:NW,updateVariable:OW},Symbol.toStringTag,{value:"Module"}));function L7(e){return vy({queryKey:["variables",e],queryFn:()=>zW(e),enabled:!!e})}function nle(e){const n=P0();return wm({mutationFn:S=>DW(e,S),onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success("Variable added successfully!")},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to add variable")}})}function ale(e){const n=P0();return wm({mutationFn:({variableName:S,variable:L})=>OW(e,S,L),onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success("Variable updated successfully!")},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to update variable")}})}function ile(e){const n=P0();return wm({mutationFn:async S=>{await ch.delete(`/sessions/${e}/variables/${S}`)},onSuccess:()=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success("Variable deleted successfully!")},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to delete variable")}})}function ole({variables:e,sessionId:n,onEdit:S}){const L=ile(n),re=async Be=>{if(window.confirm(`Delete variable "${Be}"?`))try{await L.mutateAsync(Be)}catch(Xe){console.error("Delete failed:",Xe)}},ve=Be=>Be.type==="categorical"&&Be.categories?Be.categories.join(", "):Be.bounds&&Array.isArray(Be.bounds)&&Be.bounds.length===2?`${Be.bounds[0]} to ${Be.bounds[1]}`:"-",Ce=Be=>Be==="real"?"Real":Be==="integer"?"Integer":Be==="categorical"?"Categorical":Be;return Vt.jsxs("div",{className:"border rounded-lg overflow-hidden",children:[Vt.jsxs("div",{className:"bg-muted/50 border-b px-4 py-2 grid grid-cols-12 gap-3 font-medium text-xs",children:[Vt.jsx("div",{className:"col-span-2",children:"Name"}),Vt.jsx("div",{className:"col-span-2",children:"Type"}),Vt.jsx("div",{className:"col-span-3",children:"Range/Values"}),Vt.jsx("div",{className:"col-span-1",children:"Unit"}),Vt.jsx("div",{className:"col-span-2",children:"Description"}),Vt.jsx("div",{className:"col-span-2 text-right",children:"Actions"})]}),Vt.jsx("div",{className:"divide-y",children:e.map((Be,Xe)=>Vt.jsxs("div",{className:"px-4 py-2.5 grid grid-cols-12 gap-3 items-center hover:bg-accent/50 transition-colors",children:[Vt.jsx("div",{className:"col-span-2 font-medium text-xs",children:Be.name}),Vt.jsx("div",{className:"col-span-2 text-xs",children:Ce(Be.type)}),Vt.jsx("div",{className:"col-span-3 text-xs text-muted-foreground",children:ve(Be)}),Vt.jsx("div",{className:"col-span-1 text-xs text-muted-foreground",children:Be.unit||"-"}),Vt.jsx("div",{className:"col-span-2 text-xs text-muted-foreground truncate",title:Be.description||"",children:Be.description||"-"}),Vt.jsxs("div",{className:"col-span-2 flex justify-end gap-2",children:[Vt.jsx("button",{onClick:()=>S(Be),className:"text-xs text-primary hover:text-primary/80",title:"Edit variable",children:"Edit"}),Vt.jsx("button",{onClick:()=>re(Be.name),className:"text-xs text-destructive hover:text-destructive/80",title:"Delete variable",disabled:L.isPending,children:"Delete"})]})]},`${Be.name}-${Xe}`))}),Vt.jsxs("div",{className:"bg-muted/30 border-t px-4 py-2 text-sm text-muted-foreground",children:[e.length," variable",e.length!==1?"s":""," defined"]})]})}const sle="modulepreload",lle=function(e){return"/"+e},QB={},R7=function(n,S,L){let re=Promise.resolve();if(S&&S.length>0){let Ke=function(vt){return Promise.all(vt.map(yt=>Promise.resolve(yt).then(Gt=>({status:"fulfilled",value:Gt}),Gt=>({status:"rejected",reason:Gt}))))};var Ce=Ke;document.getElementsByTagName("link");const Be=document.querySelector("meta[property=csp-nonce]"),Xe=Be?.nonce||Be?.getAttribute("nonce");re=Ke(S.map(vt=>{if(vt=lle(vt),vt in QB)return;QB[vt]=!0;const yt=vt.endsWith(".css"),Gt=yt?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${vt}"]${Gt}`))return;const $t=document.createElement("link");if($t.rel=yt?"stylesheet":sle,yt||($t.as="script"),$t.crossOrigin="",$t.href=vt,Xe&&$t.setAttribute("nonce",Xe),document.head.appendChild($t),yt)return new Promise((gr,sr)=>{$t.addEventListener("load",gr),$t.addEventListener("error",()=>sr(new Error(`Unable to preload CSS for ${vt}`)))})}))}function ve(Be){const Xe=new Event("vite:preloadError",{cancelable:!0});if(Xe.payload=Be,window.dispatchEvent(Xe),!Xe.defaultPrevented)throw Be}return re.then(Be=>{for(const Xe of Be||[])Xe.status==="rejected"&&ve(Xe.reason);return n().catch(ve)})};function ule({sessionId:e,onClose:n,editingVariable:S}){const L=!!S,re=Na=>Na==="real"?"continuous":Na==="integer"?"discrete":"categorical",[ve,Ce]=Ua.useState(""),[Be,Xe]=Ua.useState("continuous"),[Ke,vt]=Ua.useState(""),[yt,Gt]=Ua.useState(""),[$t,gr]=Ua.useState([]),[sr,nr]=Ua.useState(""),[jr,Ne]=Ua.useState(""),[an,yn]=Ua.useState("");Ua.useEffect(()=>{S&&(Ce(S.name),Xe(re(S.type)),S.bounds&&(vt(S.bounds[0].toString()),Gt(S.bounds[1].toString())),S.categories&&gr(S.categories),Ne(S.unit||""),yn(S.description||""))},[S]);const Lr=nle(e),$r=ale(e),dn=async Na=>{if(Na.preventDefault(),!ve.trim()){Nu.error("Variable name is required");return}const zn={name:ve.trim(),type:Be,unit:jr.trim()||void 0,description:an.trim()||void 0};if(Be==="continuous"||Be==="discrete"){const ta=parseFloat(Ke),qa=parseFloat(yt);if(isNaN(ta)||isNaN(qa)){Nu.error("Min and Max values must be numbers");return}if(ta>=qa){Nu.error("Min must be less than Max");return}zn.bounds=[ta,qa]}else if(Be==="categorical"){if($t.length===0){Nu.error("At least one category is required");return}zn.categories=$t}try{if(L&&S)if(zn.name!==S.name){const{deleteVariable:ta}=await R7(async()=>{const{deleteVariable:qa}=await Promise.resolve().then(()=>rle);return{deleteVariable:qa}},void 0);await ta(e,S.name),await Lr.mutateAsync(zn)}else await $r.mutateAsync({variableName:S.name,variable:zn});else await Lr.mutateAsync(zn);n()}catch(ta){console.error("Error saving variable:",ta)}},Jn=()=>{const Na=sr.trim();Na&&!$t.includes(Na)&&(gr([...$t,Na]),nr(""))},xn=Na=>{gr($t.filter((zn,ta)=>ta!==Na))};return Vt.jsxs("div",{className:"space-y-4",children:[Vt.jsxs("div",{className:"flex items-center justify-between",children:[Vt.jsx("h3",{className:"text-lg font-semibold",children:L?"Edit Variable":"Add Variable"}),Vt.jsx("button",{onClick:n,className:"text-muted-foreground hover:text-foreground",children:"✕"})]}),Vt.jsxs("form",{onSubmit:dn,className:"space-y-4",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Variable Name *"}),Vt.jsx("input",{type:"text",value:ve,onChange:Na=>Ce(Na.target.value),placeholder:"e.g., temperature",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Type *"}),Vt.jsxs("select",{value:Be,onChange:Na=>Xe(Na.target.value),className:"w-full px-3 py-2 border border-input rounded-md bg-background",children:[Vt.jsx("option",{value:"continuous",children:"Continuous (Real)"}),Vt.jsx("option",{value:"discrete",children:"Discrete (Integer)"}),Vt.jsx("option",{value:"categorical",children:"Categorical"})]})]}),(Be==="continuous"||Be==="discrete")&&Vt.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Min *"}),Vt.jsx("input",{type:"number",step:Be==="continuous"?"any":"1",value:Ke,onChange:Na=>vt(Na.target.value),placeholder:"Min value",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Max *"}),Vt.jsx("input",{type:"number",step:Be==="continuous"?"any":"1",value:yt,onChange:Na=>Gt(Na.target.value),placeholder:"Max value",className:"w-full px-3 py-2 border border-input rounded-md bg-background",required:!0})]})]}),Be==="categorical"&&Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Categories *"}),Vt.jsxs("div",{className:"flex gap-2 mb-2",children:[Vt.jsx("input",{type:"text",value:sr,onChange:Na=>nr(Na.target.value),onKeyPress:Na=>Na.key==="Enter"&&(Na.preventDefault(),Jn()),placeholder:"Enter category value",className:"flex-1 px-3 py-2 border border-input rounded-md bg-background"}),Vt.jsx("button",{type:"button",onClick:Jn,className:"px-4 py-2 bg-secondary text-secondary-foreground rounded-md hover:bg-secondary/80",children:"Add"})]}),Vt.jsx("div",{className:"flex flex-wrap gap-2",children:$t.map((Na,zn)=>Vt.jsxs("div",{className:"flex items-center gap-1 px-3 py-1 bg-primary/10 rounded-md",children:[Vt.jsx("span",{className:"text-sm",children:Na}),Vt.jsx("button",{type:"button",onClick:()=>xn(zn),className:"text-destructive hover:text-destructive/80 ml-1",children:"✕"})]},zn))}),$t.length===0&&Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Add at least one category value"})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Unit (optional)"}),Vt.jsx("input",{type:"text",value:jr,onChange:Na=>Ne(Na.target.value),placeholder:"e.g., °C, bar, mol/L",className:"w-full px-3 py-2 border border-input rounded-md bg-background"})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description (optional)"}),Vt.jsx("textarea",{value:an,onChange:Na=>yn(Na.target.value),placeholder:"Brief description of this variable",rows:2,className:"w-full px-3 py-2 border border-input rounded-md bg-background resize-none"})]}),Vt.jsxs("div",{className:"flex gap-2 pt-4",children:[Vt.jsx("button",{type:"submit",disabled:Lr.isPending||$r.isPending,className:"flex-1 bg-primary text-primary-foreground px-4 py-2 rounded-md hover:bg-primary/90 disabled:opacity-50",children:Lr.isPending||$r.isPending?"Saving...":L?"Update Variable":"Add Variable"}),Vt.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 border border-input rounded-md hover:bg-accent",children:"Cancel"})]})]})]})}function cle(e){const n=P0();return wm({mutationFn:S=>NW(e,S),onSuccess:S=>{n.invalidateQueries({queryKey:["variables",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success(S.message||`Loaded ${S.n_variables} variables`)},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to load variables from file"),console.error("Load variables error:",S)}})}function fle(e){return wm({mutationFn:()=>FW(e),onSuccess:()=>{Nu.success("Variables exported successfully")},onError:n=>{Nu.error(n.response?.data?.detail||"Failed to export variables"),console.error("Export variables error:",n)}})}function hle({sessionId:e}){const[n,S]=Ua.useState(!1),[L,re]=Ua.useState(null),ve=Ua.useRef(null),{data:Ce,isLoading:Be}=L7(e),Xe=cle(e),Ke=fle(e),vt=()=>{re(null),S(!0)},yt=sr=>{re(sr),S(!0)},Gt=()=>{ve.current?.click()},$t=async sr=>{const nr=sr.target.files?.[0];nr&&(await Xe.mutateAsync(nr),ve.current&&(ve.current.value=""))},gr=async()=>{await Ke.mutateAsync()};return Vt.jsxs("div",{className:"space-y-3",children:[Vt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Variable Management"}),Be?Vt.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading..."}):Ce&&Ce.n_variables>0?Vt.jsx(ole,{variables:Ce.variables,sessionId:e,onEdit:yt}):Vt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-6 text-center",children:Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"No variables defined"})}),Vt.jsxs("div",{className:"flex flex-col gap-1.5",children:[Vt.jsx("button",{onClick:vt,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 transition-colors",children:"Add Variable"}),Vt.jsxs("div",{className:"flex gap-1.5",children:[Vt.jsx("button",{onClick:Gt,disabled:Xe.isPending,className:"flex-1 border border-input px-3 py-1.5 rounded text-xs hover:bg-accent disabled:opacity-50",children:"Load File"}),Vt.jsx("button",{onClick:gr,disabled:Ke.isPending||!Ce||Ce.n_variables===0,className:"flex-1 border border-input px-3 py-1.5 rounded text-xs hover:bg-accent disabled:opacity-50",children:"Save File"})]})]}),Vt.jsx("input",{ref:ve,type:"file",accept:".json",onChange:$t,className:"hidden"}),n&&Vt.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:Vt.jsx("div",{className:"bg-background rounded-lg p-6 max-w-lg w-full mx-4 max-h-[90vh] overflow-y-auto shadow-xl border",children:Vt.jsx(ule,{sessionId:e,onClose:()=>S(!1),editingVariable:L})})})]})}const dle=async(e,n)=>{const S=new FormData;return S.append("file",n),(await ch.post(`/sessions/${e}/experiments/upload`,S,{headers:{"Content-Type":"multipart/form-data"}})).data},vle=async e=>(await ch.get(`/sessions/${e}/experiments`)).data,ple=async e=>(await ch.get(`/sessions/${e}/experiments/summary`)).data,mle=async(e,n)=>(await ch.post(`/sessions/${e}/initial-design`,n)).data;function yle(e){return vy({queryKey:["experiments",e],queryFn:()=>vle(e),enabled:!!e})}function I7(e){return vy({queryKey:["experiments-summary",e],queryFn:()=>ple(e),enabled:!!e})}function gle(e){const n=P0();return wm({mutationFn:S=>dle(e,S),onSuccess:S=>{n.invalidateQueries({queryKey:["experiments",e]}),n.invalidateQueries({queryKey:["experiments-summary",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success(`Loaded ${S.n_experiments||0} experiments successfully!`)},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to upload experiments")}})}function _le(e){return wm({mutationFn:n=>mle(e,n),onSuccess:n=>{Nu.success(`Generated ${n.n_points} initial design points using ${n.method}`)},onError:n=>{Nu.error(n.response?.data?.detail||"Failed to generate initial design")}})}/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xle=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BW=(...e)=>e.filter((n,S,L)=>!!n&&n.trim()!==""&&L.indexOf(n)===S).join(" ").trim();/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var ble={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wle=Ua.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:S=2,absoluteStrokeWidth:L,className:re="",children:ve,iconNode:Ce,...Be},Xe)=>Ua.createElement("svg",{ref:Xe,...ble,width:n,height:n,stroke:e,strokeWidth:L?Number(S)*24/Number(n):S,className:BW("lucide",re),...Be},[...Ce.map(([Ke,vt])=>Ua.createElement(Ke,vt)),...Array.isArray(ve)?ve:[ve]]));/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const up=(e,n)=>{const S=Ua.forwardRef(({className:L,...re},ve)=>Ua.createElement(wle,{ref:ve,iconNode:n,className:BW(`lucide-${xle(e)}`,L),...re}));return S.displayName=`${e}`,S};/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ej=up("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const q8=up("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Tle=up("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ale=up("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Sle=up("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ele=up("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Mle=up("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cle=up("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kle=up("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ple=up("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zT=up("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lle=up("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rle=up("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ile=up("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dle=up("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const D7=up("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
 * @license lucide-react v0.454.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ole=up("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function zle({suggestion:e,index:n=0,total:S=1,iteration:L,onCancel:re,onConfirm:ve,onPrev:Ce,onNext:Be}){const Xe={};Object.keys(e||{}).forEach(xn=>{!xn.startsWith("_")&&xn!=="Output"&&xn!=="Noise"&&xn!=="Iteration"&&xn!=="Reason"&&(Xe[xn]=e[xn])});const[Ke,vt]=Ua.useState(Xe),[yt,Gt]=Ua.useState(e?.Output?.toString()??""),[$t,gr]=Ua.useState(e?.Noise?.toString()??""),sr=e?._reason||e?.Reason||"Acquisition",[nr,jr]=Ua.useState(sr),[Ne,an]=Ua.useState(!0),[yn,Lr]=Ua.useState(!0),$r=e?.Iteration??L??"N/A";function dn(xn,Na){vt(zn=>({...zn,[xn]:Na}))}function Jn(){const xn={inputs:{...Ke}};yt!==""&&(xn.output=Number(yt)),$t!==""&&(xn.noise=Number($t)),nr&&(xn.reason=nr),ve(xn,{saveToFile:Ne,retrain:yn})}return Vt.jsxs("div",{className:"bg-card border border-border rounded-lg shadow-lg w-full max-w-2xl max-h-[85vh] overflow-auto",children:[Vt.jsxs("div",{className:"border-b border-border p-4 flex items-center justify-between",children:[Vt.jsxs("div",{className:"flex-1",children:[Vt.jsx("h3",{className:"text-lg font-semibold",children:S>1?`Pending Suggestion ${n+1} of ${S}`:"Add Experimental Result"}),S>1&&Vt.jsx("p",{className:"text-sm text-green-600 dark:text-green-500 mt-1",children:sr})]}),S>1&&Vt.jsxs("div",{className:"flex gap-2 ml-4",children:[Vt.jsx("button",{onClick:Ce,disabled:!Ce,className:"px-3 py-1.5 text-sm rounded border border-border hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:"← Previous"}),Vt.jsx("button",{onClick:Be,disabled:!Be,className:"px-3 py-1.5 text-sm rounded border border-border hover:bg-accent disabled:opacity-50 disabled:cursor-not-allowed",children:"Next →"})]}),Vt.jsx("button",{onClick:re,className:"ml-2 p-1.5 rounded hover:bg-accent",title:"Close",children:Vt.jsx(D7,{className:"w-4 h-4"})})]}),Vt.jsxs("div",{className:"p-6 space-y-4",children:[Vt.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[Object.entries(Ke).map(([xn,Na])=>Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:xn}),Vt.jsx("input",{type:"text",value:String(Na??""),onChange:zn=>dn(xn,zn.target.value),className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]},xn)),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Output"}),Vt.jsx("input",{type:"number",step:"any",value:yt,onChange:xn=>Gt(xn.target.value),autoFocus:!0,className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Noise (optional)"}),Vt.jsx("input",{type:"number",step:"any",value:$t,onChange:xn=>gr(xn.target.value),placeholder:"1e-6",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),Vt.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2 border-t border-border",children:[Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Iteration"}),Vt.jsx("div",{className:"px-3 py-2 text-sm rounded-md border border-border bg-muted text-foreground",children:$r})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Reason"}),Vt.jsx("input",{type:"text",value:nr,onChange:xn=>jr(xn.target.value),className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]})]}),Vt.jsxs("div",{className:"flex items-center gap-6 pt-4 border-t border-border",children:[Vt.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[Vt.jsx("input",{type:"checkbox",checked:Ne,onChange:xn=>an(xn.target.checked),className:"w-4 h-4 rounded border-border text-primary focus:ring-2 focus:ring-primary/50"}),Vt.jsx("span",{children:"Save to file"})]}),Vt.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[Vt.jsx("input",{type:"checkbox",checked:yn,onChange:xn=>Lr(xn.target.checked),className:"w-4 h-4 rounded border-border text-primary focus:ring-2 focus:ring-primary/50"}),Vt.jsx("span",{children:"Retrain model"})]})]})]}),Vt.jsxs("div",{className:"border-t border-border p-4 flex justify-end gap-3",children:[Vt.jsx("button",{onClick:re,className:"px-4 py-2 text-sm rounded-md border border-border hover:bg-accent",children:"Cancel"}),Vt.jsx("button",{onClick:Jn,className:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90",children:"Save & Close"})]})]})}function Nle({sessionId:e,pendingSuggestions:n=[],onStageSuggestions:S}){const[L,re]=Ua.useState(!1),[ve,Ce]=Ua.useState(0),Be=Ua.useRef(null),Xe=P0(),{data:Ke,isLoading:vt}=yle(e),{data:yt}=I7(e),Gt=gle(e),$t=()=>{Be.current?.click()},gr=async Ne=>{const an=Ne.target.files?.[0];an&&(await Gt.mutateAsync(an),Be.current&&(Be.current.value=""))},sr=Ke?.experiments||[],nr=sr.length>0,jr=nr?Object.keys(sr[0]):[];return Vt.jsxs("div",{className:"space-y-3",children:[Vt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Experiment Data"}),Vt.jsx("button",{onClick:$t,disabled:Gt.isPending,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 disabled:opacity-50",children:Gt.isPending?"Loading...":"Load CSV"}),Vt.jsx("input",{ref:Be,type:"file",accept:".csv",onChange:gr,className:"hidden"}),yt&&yt.has_data&&Vt.jsxs("div",{className:"p-3 bg-muted/30 rounded text-xs space-y-1",children:[Vt.jsxs("div",{className:"flex justify-between",children:[Vt.jsx("span",{className:"text-muted-foreground",children:"Experiments:"}),Vt.jsx("span",{className:"font-medium tabular-nums",children:yt.n_experiments})]}),yt.target_stats&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{className:"flex justify-between",children:[Vt.jsx("span",{className:"text-muted-foreground",children:"Range:"}),Vt.jsxs("span",{className:"font-medium tabular-nums",children:[yt.target_stats.min?.toFixed(2)," - ",yt.target_stats.max?.toFixed(2)]})]}),Vt.jsxs("div",{className:"flex justify-between",children:[Vt.jsx("span",{className:"text-muted-foreground",children:"Mean ± Std:"}),Vt.jsxs("span",{className:"font-medium tabular-nums",children:[yt.target_stats.mean?.toFixed(2)," ± ",yt.target_stats.std?.toFixed(2)]})]})]})]}),vt?Vt.jsx("div",{className:"text-xs text-muted-foreground",children:"Loading..."}):nr?Vt.jsxs("div",{className:"border rounded overflow-hidden",children:[Vt.jsx("div",{className:"overflow-x-auto max-h-64",children:Vt.jsxs("table",{className:"w-full text-xs",children:[Vt.jsx("thead",{className:"bg-muted/50 border-b sticky top-0",children:Vt.jsx("tr",{children:jr.map(Ne=>Vt.jsx("th",{className:"px-2 py-1.5 text-left font-medium text-xs",children:Ne},Ne))})}),Vt.jsx("tbody",{className:"divide-y",children:sr.map((Ne,an)=>Vt.jsx("tr",{className:"hover:bg-accent/50",children:jr.map(yn=>Vt.jsx("td",{className:"px-2 py-1.5 tabular-nums",children:typeof Ne[yn]=="number"?Ne[yn].toFixed(3):Ne[yn]??"-"},yn))},an))})]})}),Vt.jsxs("div",{className:"bg-muted/30 border-t px-2 py-1 text-xs text-muted-foreground",children:[sr.length," row",sr.length!==1?"s":""]})]}):Vt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-6 text-center",children:Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"No data loaded"})}),Vt.jsxs("button",{onClick:()=>{re(!0),Ce(0)},disabled:!n||n.length===0,className:"w-full border border-muted px-3 py-2 rounded text-sm font-medium hover:bg-muted/5 disabled:opacity-50 disabled:cursor-not-allowed",children:["Add Point... ",n&&n.length>0?`(${n.length})`:""]}),L&&n&&n.length>0&&Vt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>re(!1),children:Vt.jsx("div",{onClick:Ne=>Ne.stopPropagation(),children:Vt.jsx(zle,{suggestion:n[ve],index:ve,total:n.length,onCancel:()=>re(!1),onConfirm:async(Ne,an)=>{const{addExperiment:yn}=await R7(async()=>{const{addExperiment:Lr}=await import("./api-vcoXEqyq.js");return{addExperiment:Lr}},[]);try{await yn(e,Ne,an.retrain),Xe.invalidateQueries({queryKey:["experiments",e]}),Xe.invalidateQueries({queryKey:["experiments-summary",e]}),Xe.invalidateQueries({queryKey:["session",e]});const Lr=n.filter(($r,dn)=>dn!==ve);S&&S(Lr),Nu.success("Experiment added successfully!"),Lr.length===0?re(!1):ve>=Lr.length&&Ce(Lr.length-1)}catch(Lr){Nu.error("Failed to add point: "+(Lr?.message||String(Lr)))}},onPrev:ve>0?()=>Ce(Ne=>Ne-1):void 0,onNext:ve<n.length-1?()=>Ce(Ne=>Ne+1):void 0})})})]})}function Fle({sessionId:e}){const[n,S]=Ua.useState("lhs"),[L,re]=Ua.useState(10),[ve,Ce]=Ua.useState(""),[Be,Xe]=Ua.useState("maximin"),[Ke,vt]=Ua.useState(null),{data:yt}=L7(e),Gt=_le(e),$t=yt&&yt.variables.length>0,gr=async()=>{const nr={method:n,n_points:L,random_seed:ve?parseInt(ve):null,lhs_criterion:n==="lhs"?Be:void 0},jr=await Gt.mutateAsync(nr);vt(jr.points)},sr=()=>{if(!Ke||Ke.length===0)return;const nr=Object.keys(Ke[0]),Ne=[nr.join(","),...Ke.map($r=>nr.map(dn=>$r[dn]).join(","))].join(`
`),an=new Blob([Ne],{type:"text/csv"}),yn=window.URL.createObjectURL(an),Lr=document.createElement("a");Lr.href=yn,Lr.download=`initial_design_${n}_${L}pts.csv`,document.body.appendChild(Lr),Lr.click(),document.body.removeChild(Lr),window.URL.revokeObjectURL(yn)};return Vt.jsxs("div",{className:"space-y-3",children:[Vt.jsx("h3",{className:"text-sm font-semibold uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Initial Design (DoE)"}),$t?Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Method"}),Vt.jsxs("select",{value:n,onChange:nr=>S(nr.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[Vt.jsx("option",{value:"lhs",children:"LHS"}),Vt.jsx("option",{value:"sobol",children:"Sobol"}),Vt.jsx("option",{value:"halton",children:"Halton"}),Vt.jsx("option",{value:"hammersly",children:"Hammersly"}),Vt.jsx("option",{value:"random",children:"Random"})]})]}),Vt.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Points"}),Vt.jsx("input",{type:"number",value:L,onChange:nr=>re(parseInt(nr.target.value)||10),min:5,max:100,className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"Seed (opt)"}),Vt.jsx("input",{type:"number",value:ve,onChange:nr=>Ce(nr.target.value),placeholder:"Auto",className:"w-full px-2 py-1.5 text-sm border rounded bg-background"})]})]}),n==="lhs"&&Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs text-muted-foreground mb-1 block",children:"LHS Criterion"}),Vt.jsxs("select",{value:Be,onChange:nr=>Xe(nr.target.value),className:"w-full px-2 py-1.5 text-sm border rounded bg-background",children:[Vt.jsx("option",{value:"maximin",children:"Maximin"}),Vt.jsx("option",{value:"correlation",children:"Correlation"}),Vt.jsx("option",{value:"ratio",children:"Ratio"})]})]})]}),Vt.jsx("button",{onClick:gr,disabled:Gt.isPending||!$t,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded text-sm font-medium hover:bg-primary/90 disabled:opacity-50",children:Gt.isPending?"Generating...":"Generate Design"}),Ke&&Ke.length>0&&Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsxs("div",{className:"flex justify-between items-center",children:[Vt.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ke.length," points generated"]}),Vt.jsxs("button",{onClick:sr,className:"flex items-center gap-1 text-xs border px-2 py-1 rounded hover:bg-accent",children:[Vt.jsx(kle,{className:"h-3 w-3"}),"CSV"]})]}),Vt.jsx("div",{className:"border rounded overflow-hidden",children:Vt.jsx("div",{className:"overflow-x-auto max-h-48",children:Vt.jsxs("table",{className:"w-full text-xs",children:[Vt.jsx("thead",{className:"bg-muted/50 border-b sticky top-0",children:Vt.jsx("tr",{children:Object.keys(Ke[0]).map(nr=>Vt.jsx("th",{className:"px-2 py-1 text-left font-medium",children:nr},nr))})}),Vt.jsx("tbody",{className:"divide-y",children:Ke.map((nr,jr)=>Vt.jsx("tr",{className:"hover:bg-accent/50",children:Object.values(nr).map((Ne,an)=>Vt.jsx("td",{className:"px-2 py-1 tabular-nums",children:typeof Ne=="number"?Ne.toFixed(3):Ne},an))},jr))})]})})})]})]}):Vt.jsx("div",{className:"border border-dashed border-muted-foreground/20 rounded p-4 text-center",children:Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"Define variables first"})})]})}function jW(e){return vy({queryKey:["model-info",e],queryFn:async()=>(await ch.get(`/sessions/${e}/model`)).data,enabled:!!e})}function Ble(e){const n=P0();return wm({mutationFn:async S=>(await ch.post(`/sessions/${e}/model/train`,S)).data,onSuccess:S=>{n.invalidateQueries({queryKey:["model-info",e]}),n.invalidateQueries({queryKey:["session",e]}),Nu.success(`Model trained successfully! R² = ${S.metrics.r2.toFixed(4)}`)},onError:S=>{Nu.error(S.response?.data?.detail||"Failed to train model")}})}function jle({sessionId:e}){const[n,S]=Ua.useState("sklearn"),[L,re]=Ua.useState(!1),[ve,Ce]=Ua.useState("RBF"),[Be,Xe]=Ua.useState("1.5"),[Ke,vt]=Ua.useState("L-BFGS-B"),[yt,Gt]=Ua.useState("none"),[$t,gr]=Ua.useState("none"),[sr,nr]=Ua.useState(!1),[jr,Ne]=Ua.useState("Matern"),[an,yn]=Ua.useState("2.5"),[Lr,$r]=Ua.useState("none"),[dn,Jn]=Ua.useState("none"),[xn,Na]=Ua.useState(!1),{data:zn}=jW(e),{data:ta}=I7(e),qa=Ble(e),{openVisualization:la}=sW(),ja=ta?.has_data&&ta.n_experiments>=5,pa=async()=>{if(!ja){alert("Need at least 5 experiments to train a model");return}const Ra={backend:n,kernel:n==="sklearn"?ve:jr};n==="sklearn"&&ve==="Matern"?Ra.kernel_params={nu:parseFloat(Be)}:n==="botorch"&&jr==="Matern"&&(Ra.kernel_params={nu:parseFloat(an)}),n==="sklearn"?(yt!=="none"&&(Ra.input_transform=yt),$t!=="none"&&(Ra.output_transform=$t),Ra.calibration_enabled=sr):(Lr!=="none"&&(Ra.input_transform=Lr),dn!=="none"&&(Ra.output_transform=dn),Ra.calibration_enabled=xn);try{await qa.mutateAsync(Ra)}catch(vi){console.error("Training failed:",vi)}};return Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsx("h2",{className:"text-sm font-semibold mb-4 uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Gaussian Process Model"}),Vt.jsxs("div",{className:"mb-3",children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Backend"}),Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:()=>S("sklearn"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors ${n==="sklearn"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"scikit-learn"}),Vt.jsx("button",{onClick:()=>S("botorch"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors ${n==="botorch"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"BoTorch"})]})]}),Vt.jsxs("div",{className:"mb-4 p-3 border rounded-lg",children:[Vt.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[Vt.jsx("input",{type:"checkbox",checked:L,onChange:Ra=>re(Ra.target.checked),className:"w-4 h-4 rounded border-gray-300"}),Vt.jsx("span",{className:"text-sm font-medium",children:"Enable Advanced Options"})]}),n==="sklearn"&&Vt.jsxs("div",{className:"mt-3 space-y-2.5",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Kernel Selection"}),Vt.jsxs("select",{value:ve,onChange:Ra=>Ce(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"RBF",children:"RBF"}),Vt.jsx("option",{value:"Matern",children:"Matern"}),Vt.jsx("option",{value:"RationalQuadratic",children:"RationalQuadratic"})]})]}),ve==="Matern"&&Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Matern nu"}),Vt.jsxs("select",{value:Be,onChange:Ra=>Xe(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"0.5",children:"0.5"}),Vt.jsx("option",{value:"1.5",children:"1.5"}),Vt.jsx("option",{value:"2.5",children:"2.5"}),Vt.jsx("option",{value:"inf",children:"inf"})]})]}),Vt.jsx("div",{className:"text-xs text-muted-foreground italic",children:"Note: Kernel hyperparameters will be automatically optimized."}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Optimizer"}),Vt.jsxs("select",{value:Ke,onChange:Ra=>vt(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"CG",children:"CG"}),Vt.jsx("option",{value:"BFGS",children:"BFGS"}),Vt.jsx("option",{value:"L-BFGS-B",children:"L-BFGS-B"}),Vt.jsx("option",{value:"TNC",children:"TNC"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Input Scaling"}),Vt.jsxs("select",{value:yt,onChange:Ra=>Gt(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"none",children:"none"}),Vt.jsx("option",{value:"minmax",children:"minmax"}),Vt.jsx("option",{value:"standard",children:"standard"}),Vt.jsx("option",{value:"robust",children:"robust"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Output Scaling"}),Vt.jsxs("select",{value:$t,onChange:Ra=>gr(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"none",children:"none"}),Vt.jsx("option",{value:"minmax",children:"minmax"}),Vt.jsx("option",{value:"standard",children:"standard"}),Vt.jsx("option",{value:"robust",children:"robust"})]})]}),Vt.jsxs("label",{className:"flex items-center gap-2",children:[Vt.jsx("input",{type:"checkbox",checked:sr,onChange:Ra=>nr(Ra.target.checked),disabled:!L,className:"w-3.5 h-3.5 rounded border-gray-300 disabled:opacity-50 disabled:cursor-not-allowed"}),Vt.jsx("span",{className:`text-xs ${L?"":"text-muted-foreground"}`,children:"Calibrate Uncertainty"})]})]}),n==="botorch"&&Vt.jsxs("div",{className:"mt-3 space-y-2.5",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Continuous Kernel"}),Vt.jsxs("select",{value:jr,onChange:Ra=>Ne(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"RBF",children:"RBF"}),Vt.jsx("option",{value:"Matern",children:"Matern"})]})]}),jr==="Matern"&&Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Matern nu"}),Vt.jsxs("select",{value:an,onChange:Ra=>yn(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"0.5",children:"0.5"}),Vt.jsx("option",{value:"1.5",children:"1.5"}),Vt.jsx("option",{value:"2.5",children:"2.5"})]})]}),Vt.jsx("div",{className:"text-xs text-muted-foreground italic",children:"BoTorch uses sensible defaults for training parameters."}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Input Scaling"}),Vt.jsxs("select",{value:Lr,onChange:Ra=>$r(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"none",children:"none"}),Vt.jsx("option",{value:"normalize",children:"normalize"}),Vt.jsx("option",{value:"standardize",children:"standardize"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:`block text-xs mb-1 ${L?"":"text-muted-foreground"}`,children:"Output Scaling"}),Vt.jsxs("select",{value:dn,onChange:Ra=>Jn(Ra.target.value),disabled:!L,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"none",children:"none"}),Vt.jsx("option",{value:"standardize",children:"standardize"})]})]}),Vt.jsxs("label",{className:"flex items-center gap-2",children:[Vt.jsx("input",{type:"checkbox",checked:xn,onChange:Ra=>Na(Ra.target.checked),disabled:!L,className:"w-3.5 h-3.5 rounded border-gray-300 disabled:opacity-50 disabled:cursor-not-allowed"}),Vt.jsx("span",{className:`text-xs ${L?"":"text-muted-foreground"}`,children:"Calibrate Uncertainty"})]})]})]}),Vt.jsxs("button",{onClick:pa,disabled:!ja||qa.isPending,className:"w-full bg-primary text-primary-foreground px-3 py-2 rounded-md text-xs hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[qa.isPending&&Vt.jsx(zT,{className:"w-3.5 h-3.5 animate-spin"}),qa.isPending?"Training Model...":"Train Model"]}),!ja&&Vt.jsxs("div",{className:"mt-2 p-2.5 bg-amber-500/10 border border-amber-500/20 rounded-md flex items-start gap-2",children:[Vt.jsx(Sle,{className:"w-3.5 h-3.5 text-amber-600 mt-0.5 flex-shrink-0"}),Vt.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-500",children:ta?.n_experiments?`Need at least 5 experiments (currently ${ta.n_experiments})`:"No experimental data loaded. Please load experiments first."})]}),qa.isSuccess&&qa.data&&Vt.jsxs("div",{className:"mt-3 p-2.5 bg-green-500/10 border border-green-500/20 rounded-md flex items-start gap-2",children:[Vt.jsx(Ele,{className:"w-3.5 h-3.5 text-green-600 mt-0.5 flex-shrink-0"}),Vt.jsx("div",{className:"text-xs",children:Vt.jsx("p",{className:"font-medium text-green-700 dark:text-green-500",children:qa.data.message})})]}),zn?.is_trained&&Vt.jsxs("div",{className:"mt-4 p-3 bg-muted/50 rounded-lg space-y-2.5",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground",children:"Trained Model Info"}),Vt.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-1.5 text-xs",children:Vt.jsxs("div",{children:[Vt.jsx("span",{className:"text-muted-foreground",children:"Backend:"})," ",Vt.jsx("span",{className:"font-medium",children:zn.backend})]})}),zn.metrics&&Vt.jsxs("div",{children:[Vt.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-1.5",children:"Cross-Validation Metrics"}),Vt.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[Vt.jsxs("div",{children:[Vt.jsx("span",{className:"text-muted-foreground",children:"RMSE:"})," ",Vt.jsx("span",{className:"font-medium",children:zn.metrics.rmse.toFixed(4)})]}),Vt.jsxs("div",{children:[Vt.jsx("span",{className:"text-muted-foreground",children:"MAE:"})," ",Vt.jsx("span",{className:"font-medium",children:zn.metrics.mae.toFixed(4)})]}),Vt.jsxs("div",{children:[Vt.jsx("span",{className:"text-muted-foreground",children:"R²:"})," ",Vt.jsx("span",{className:"font-medium",children:zn.metrics.r2.toFixed(4)})]}),zn.metrics.mape!==void 0&&Vt.jsxs("div",{children:[Vt.jsx("span",{className:"text-muted-foreground",children:"MAPE:"})," ",Vt.jsxs("span",{className:"font-medium",children:[zn.metrics.mape.toFixed(2),"%"]})]})]})]}),Vt.jsxs("details",{className:"text-xs",children:[Vt.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground font-medium",children:"View Hyperparameters"}),Vt.jsx("pre",{className:"mt-2 p-2 bg-background rounded text-xs overflow-x-auto",children:JSON.stringify(zn.hyperparameters,null,2)})]})]}),zn?.is_trained&&zn.backend&&Vt.jsxs("button",{onClick:()=>la(e,zn.backend),className:"w-full flex items-center justify-center gap-2 px-3 py-2 rounded-md text-xs bg-secondary text-secondary-foreground hover:bg-secondary/80 transition-colors",children:[Vt.jsx(Tle,{className:"h-3.5 w-3.5"}),"Show Visualizations"]})]})}function Ule(e){return wm({mutationFn:async n=>(await ch.post(`/sessions/${e}/acquisition/suggest`,n)).data,onSuccess:n=>{Nu.success(`Generated ${n.n_suggestions} suggestion${n.n_suggestions>1?"s":""}!`)},onError:n=>{Nu.error(n.response?.data?.detail||"Failed to generate suggestions")}})}function qle(e){return wm({mutationFn:async n=>(await ch.post(`/sessions/${e}/acquisition/find-optimum`,n)).data,onSuccess:n=>{Nu.success(`Found model optimum: ${n.predicted_value.toFixed(4)}`)},onError:n=>{Nu.error(n.response?.data?.detail||"Failed to find model optimum")}})}function Vle({sessionId:e,modelBackend:n,pendingSuggestions:S,onStageSuggestions:L}){const[re,ve]=Ua.useState("EI"),[Ce,Be]=Ua.useState("maximize"),[Xe,Ke]=Ua.useState(.01),[vt,yt]=Ua.useState(1.96),[Gt,$t]=Ua.useState("regular"),[gr,sr]=Ua.useState("EI"),[nr,jr]=Ua.useState("qEI"),[Ne,an]=Ua.useState(2),[yn,Lr]=Ua.useState(.5),[$r,dn]=Ua.useState("maximize"),[Jn,xn]=Ua.useState("maximize"),{data:Na}=jW(e),zn=Ule(e),ta=qle(e),[qa,la]=Ua.useState([]),ja=S??qa,pa=n||Na?.backend||"sklearn",Ra=Na?.is_trained||!1,vi={EI:"Expected Improvement (EI) balances exploration and exploitation by calculating the expected improvement over the current best observed value.",PI:"Probability of Improvement (PI) selects points based on the probability that they will improve over the current best observed value.",UCB:"Upper Confidence Bound (UCB) balances exploration and exploitation by selecting points where the upper confidence bound is highest.",gp_hedge:"GP Hedge automatically balances between EI, PI, and UCB strategies based on their past performance.",logEI:"Log Expected Improvement is a numerically stable version of EI that calculates the log of the expected improvement.",logPI:"Log Probability of Improvement is a numerically stable version of PI that calculates the log of the probability of improvement.",qEI:"q-Expected Improvement is a batch version of EI that selects multiple points simultaneously while accounting for interactions between selections.",qUCB:"q-Upper Confidence Bound is a batch version of UCB that selects multiple points simultaneously while balancing exploration and exploitation.",qNIPV:"q-Negative Integrated Posterior Variance selects points to reduce overall model uncertainty. This is purely exploratory for active learning, not optimization."},Pi=async()=>{if(!Ra)return;let _a,Li;pa==="sklearn"?(Li=re,_a={strategy:re,goal:Ce,n_suggestions:1},re==="EI"||re==="PI"?_a.xi=Xe:re==="UCB"?_a.kappa=vt:re==="gp_hedge"&&(_a.xi=Xe,_a.kappa=vt)):Gt==="regular"?(Li=gr,_a={strategy:gr,goal:$r,n_suggestions:1}):Gt==="batch"?(Li=nr,_a={strategy:nr,goal:$r,n_suggestions:Ne},nr==="qUCB"&&(_a.kappa=yn)):(Li="qNIPV",_a={strategy:"qNIPV",goal:$r,n_suggestions:1});try{const so=await zn.mutateAsync(_a);if(console.log("Suggestions:",so.suggestions),so?.suggestions&&so.suggestions.length>0){const Ro=so.suggestions.map(co=>({...co,_reason:Li,_strategyParams:_a}));L?L(Ro):la(Ro)}}catch(so){console.error("Failed to get suggestions:",so)}},Eo=async()=>{if(Ra)try{const _a=await ta.mutateAsync({goal:Jn});console.log("Found optimum:",_a.optimum)}catch(_a){console.error("Failed to find optimum:",_a)}},ma=()=>pa==="sklearn"?re:Gt==="regular"?gr:Gt==="batch"?nr:"qNIPV";return Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsx("h2",{className:"text-sm font-semibold mb-4 uppercase tracking-wide text-muted-foreground border-b pb-2",children:"Acquisition Functions"}),pa==="sklearn"&&Vt.jsxs("div",{className:"space-y-2.5",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Strategy"}),Vt.jsxs("select",{value:re,onChange:_a=>ve(_a.target.value),disabled:!Ra,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"EI",children:"Expected Improvement (EI)"}),Vt.jsx("option",{value:"UCB",children:"Upper Confidence Bound (UCB)"}),Vt.jsx("option",{value:"PI",children:"Probability of Improvement (PI)"}),Vt.jsx("option",{value:"gp_hedge",children:"GP Hedge (Auto-balance)"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),Vt.jsxs("div",{className:"flex gap-1.5",children:[Vt.jsx("button",{onClick:()=>Be("maximize"),disabled:!Ra,className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Ce==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),Vt.jsx("button",{onClick:()=>Be("minimize"),disabled:!Ra,className:`flex-1 px-3 py-1.5 rounded-md text-xs font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Ce==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]}),Vt.jsxs("div",{className:"border-t pt-3",children:[Vt.jsx("label",{className:"block text-xs font-medium mb-2",children:"Acquisition Parameters"}),(re==="EI"||re==="PI"||re==="gp_hedge")&&Vt.jsxs("div",{className:"mb-3",children:[Vt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[Vt.jsx("span",{className:"text-xs",children:"ξ (xi):"}),Vt.jsx("span",{className:"text-xs font-medium",children:Xe.toFixed(4)})]}),Vt.jsx("input",{type:"range",min:"0.0001",max:"0.1",step:"0.0001",value:Xe,onChange:_a=>Ke(parseFloat(_a.target.value)),disabled:!Ra,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Higher values favor exploration over exploitation"})]}),(re==="UCB"||re==="gp_hedge")&&Vt.jsxs("div",{className:"mb-3",children:[Vt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[Vt.jsx("span",{className:"text-xs",children:"κ (kappa):"}),Vt.jsx("span",{className:"text-xs font-medium",children:vt.toFixed(2)})]}),Vt.jsx("input",{type:"range",min:"0.1",max:"5.0",step:"0.1",value:vt,onChange:_a=>yt(parseFloat(_a.target.value)),disabled:!Ra,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Higher values increase exploration"})]})]})]}),pa==="botorch"&&Vt.jsxs("div",{className:"space-y-2.5",children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Type"}),Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:()=>$t("regular"),disabled:!Ra,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Gt==="regular"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Regular"}),Vt.jsx("button",{onClick:()=>$t("batch"),disabled:!Ra,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Gt==="batch"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Batch"}),Vt.jsx("button",{onClick:()=>$t("exploratory"),disabled:!Ra,className:`flex-1 px-3 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Gt==="exploratory"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Exploratory"})]})]}),Gt==="regular"&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Acquisition Function"}),Vt.jsxs("select",{value:gr,onChange:_a=>sr(_a.target.value),disabled:!Ra,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"EI",children:"Expected Improvement"}),Vt.jsx("option",{value:"logEI",children:"Log Expected Improvement"}),Vt.jsx("option",{value:"PI",children:"Probability of Improvement"}),Vt.jsx("option",{value:"logPI",children:"Log Probability of Improvement"}),Vt.jsx("option",{value:"UCB",children:"Upper Confidence Bound"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:()=>dn("maximize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$r==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),Vt.jsx("button",{onClick:()=>dn("minimize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$r==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]})]}),Gt==="batch"&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Batch Acquisition Function"}),Vt.jsxs("select",{value:nr,onChange:_a=>jr(_a.target.value),disabled:!Ra,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[Vt.jsx("option",{value:"qEI",children:"q-Expected Improvement"}),Vt.jsx("option",{value:"qUCB",children:"q-Upper Confidence Bound"})]})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Batch Size (q)"}),Vt.jsx("select",{value:Ne,onChange:_a=>an(parseInt(_a.target.value)),disabled:!Ra,className:"w-full px-2.5 py-1.5 text-xs border rounded-md disabled:opacity-50 disabled:cursor-not-allowed bg-background",children:[2,3,4,5,6,7,8,9,10].map(_a=>Vt.jsx("option",{value:_a,children:_a},_a))})]}),nr==="qUCB"&&Vt.jsxs("div",{children:[Vt.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[Vt.jsx("span",{className:"text-xs",children:"β (beta):"}),Vt.jsx("span",{className:"text-xs font-medium",children:yn.toFixed(2)})]}),Vt.jsx("input",{type:"range",min:"0.1",max:"2.0",step:"0.1",value:yn,onChange:_a=>Lr(parseFloat(_a.target.value)),disabled:!Ra,className:"w-full disabled:opacity-50 disabled:cursor-not-allowed"})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:()=>dn("maximize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$r==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),Vt.jsx("button",{onClick:()=>dn("minimize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${$r==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]})]}),Gt==="exploratory"&&Vt.jsxs("div",{className:"p-3 bg-muted/30 rounded-lg",children:[Vt.jsx("h3",{className:"font-semibold text-xs mb-1.5",children:"Integrated Posterior Variance"}),Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"This purely exploratory acquisition function selects points to reduce model uncertainty, without considering optimization goals."})]}),Vt.jsx("div",{className:"p-2.5 bg-muted/20 rounded-lg border border-muted",children:Vt.jsxs("div",{className:"flex items-start gap-2",children:[Vt.jsx(Ple,{className:"w-4 h-4 text-muted-foreground mt-0.5 flex-shrink-0"}),Vt.jsx("p",{className:"text-xs text-muted-foreground",children:vi[ma()]})]})})]}),Vt.jsxs("button",{onClick:Pi,disabled:!Ra||zn.isPending,className:"w-full mt-4 bg-primary text-primary-foreground px-3 py-2 rounded-md text-xs hover:bg-primary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[Vt.jsx(Rle,{className:"w-3.5 h-3.5"}),zn.isPending?"Generating Suggestions...":"Run Acquisition Strategy"]}),!Ra&&Vt.jsx("p",{className:"mt-3 text-sm text-muted-foreground text-center",children:"Train a model first to enable acquisition functions"}),zn.isSuccess&&zn.data&&Vt.jsxs("div",{className:"mt-6 p-4 bg-muted/50 rounded-lg",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Suggested Experiments"}),Vt.jsx("div",{className:"space-y-2",children:zn.data.suggestions.map((_a,Li)=>Vt.jsxs("div",{className:"p-2.5 bg-background rounded border text-xs",children:[Vt.jsxs("div",{className:"font-medium mb-1",children:["Suggestion ",Li+1,":"]}),Vt.jsx("div",{className:"grid grid-cols-2 gap-2 text-xs",children:Object.entries(_a).map(([so,Ro])=>Vt.jsxs("div",{children:[Vt.jsxs("span",{className:"text-muted-foreground",children:[so,":"]})," ",Vt.jsx("span",{className:"font-medium",children:typeof Ro=="number"?Ro.toFixed(3):Ro})]},so))})]},Li))}),Vt.jsxs("div",{className:"mt-3 flex flex-col gap-2",children:[Vt.jsx("button",{onClick:async()=>{const{toast:_a}=await R7(async()=>{const{toast:Li}=await Promise.resolve().then(()=>Tie);return{toast:Li}},void 0);try{const Li=ja[0]?._strategyParams,so=ja[0]?._reason||"Unknown",Ro=ja.map($o=>{const{_reason:$u,_strategyParams:Bo,...Ml}=$o;return Ml});if(!(await fetch(`/api/v1/sessions/${e}/audit/lock`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lock_type:"acquisition",strategy:so,parameters:Li||{},suggestions:Ro,notes:""})})).ok)throw new Error("Failed to stage suggestions");_a.success(`✓ ${Ro.length} suggestion(s) staged to audit log`,{description:'Use "Add Point" button in Experiments panel to add results'}),console.log(`✓ Suggestions staged to audit log (${so})`)}catch(Li){_a.error("Failed to stage suggestions: "+(Li?.message||String(Li))),console.error("Failed to stage suggestions:",Li)}},className:"px-3 py-2 text-xs bg-green-600 text-white rounded hover:bg-green-700 font-medium flex items-center justify-center gap-2",children:"📝 Stage to Audit Log"}),Vt.jsx("p",{className:"text-xs text-muted-foreground text-center",children:'Staging persists suggestions across page reloads. Use "Add Point" to enter experimental results.'})]})]}),Vt.jsx("div",{className:"my-8 border-t border-border"}),Vt.jsxs("div",{className:"space-y-2.5",children:[Vt.jsx("h3",{className:"text-lg font-semibold",children:"Model Prediction Optimum"}),Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"Find the point where the model predicts the optimal value."}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"block text-xs font-medium mb-1.5",children:"Optimization Goal"}),Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:()=>xn("maximize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Jn==="maximize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Maximize"}),Vt.jsx("button",{onClick:()=>xn("minimize"),disabled:!Ra,className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${Jn==="minimize"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-muted/80"}`,children:"Minimize"})]})]}),Vt.jsxs("button",{onClick:Eo,disabled:!Ra||ta.isPending,className:"w-full bg-secondary text-secondary-foreground px-3 py-2 rounded-md text-xs hover:bg-secondary/90 disabled:opacity-50 disabled:cursor-not-allowed font-medium flex items-center justify-center gap-2",children:[Vt.jsx(Dle,{className:"w-3.5 h-3.5"}),ta.isPending?"Finding Optimum...":"Find Model Optimum"]}),Vt.jsx("div",{className:"p-3 bg-amber-500/10 border border-amber-500/20 rounded-md",children:Vt.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-500",children:[Vt.jsx("strong",{children:"Note:"})," This relies entirely on the model's prediction, not on acquisition functions that balance exploration and exploitation. Use when confident in model accuracy."]})}),ta.isSuccess&&ta.data&&Vt.jsxs("div",{className:"p-4 bg-green-500/10 border border-green-500/20 rounded-lg",children:[Vt.jsx("h4",{className:"font-semibold text-sm mb-3 text-green-700 dark:text-green-500",children:"Model Optimum Found"}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsxs("div",{className:"p-2.5 bg-background rounded border text-xs",children:[Vt.jsx("div",{className:"font-medium mb-1",children:"Optimal Point:"}),Vt.jsx("div",{className:"grid grid-cols-2 gap-2 text-xs",children:Object.entries(ta.data.optimum).map(([_a,Li])=>Vt.jsxs("div",{children:[Vt.jsxs("span",{className:"text-muted-foreground",children:[_a,":"]})," ",Vt.jsx("span",{className:"font-medium",children:typeof Li=="number"?Li.toFixed(3):Li})]},_a))})]}),Vt.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[Vt.jsxs("div",{className:"p-2 bg-background rounded border",children:[Vt.jsx("div",{className:"text-xs text-muted-foreground",children:"Predicted Value"}),Vt.jsx("div",{className:"font-semibold",children:ta.data.predicted_value.toFixed(4)})]}),ta.data.predicted_std!==null&&Vt.jsxs("div",{className:"p-2 bg-background rounded border",children:[Vt.jsx("div",{className:"text-xs text-muted-foreground",children:"Uncertainty (±)"}),Vt.jsx("div",{className:"font-semibold",children:ta.data.predicted_std.toFixed(4)})]})]})]})]})]})]})}function Hle({sessionId:e,pollingInterval:n=6e4}){const{data:S,isLoading:L,dataUpdatedAt:re}=Xse(e,n),{data:ve}=I7(e);Ua.useEffect(()=>{window.scrollTo(0,0)},[]);const Ce=new Date(re).toLocaleTimeString();return Vt.jsx("div",{className:"min-h-screen bg-background",children:Vt.jsxs("div",{className:"container mx-auto p-8",children:[Vt.jsxs("div",{className:"mb-8 rounded-lg border-2 border-primary bg-primary/5 p-6",children:[Vt.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[Vt.jsx(q8,{className:"h-8 w-8 text-primary animate-pulse"}),Vt.jsxs("div",{children:[Vt.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Autonomous Optimization Monitor"}),Vt.jsxs("p",{className:"text-muted-foreground mt-1",children:["Read-only monitoring mode • Refreshes every ",n/1e3,"s"]})]})]}),Vt.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm",children:[Vt.jsx(ej,{className:"h-4 w-4 text-primary"}),Vt.jsxs("span",{className:"text-muted-foreground",children:["Last updated: ",Ce]})]})]}),L?Vt.jsxs("div",{className:"text-center py-12",children:[Vt.jsx("div",{className:"inline-block animate-spin rounded-full h-12 w-12 border-b-2 border-primary"}),Vt.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading session state..."})]}):S?Vt.jsxs("div",{className:"space-y-6",children:[Vt.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Vt.jsx(Cle,{className:"h-5 w-5 text-blue-500"}),Vt.jsx("h3",{className:"font-semibold",children:"Session"})]}),Vt.jsx("p",{className:"text-2xl font-bold",children:S.session_id.slice(0,8)}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"ID (truncated)"})]}),Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Vt.jsx(Ole,{className:"h-5 w-5 text-yellow-500"}),Vt.jsx("h3",{className:"font-semibold",children:"Variables"})]}),Vt.jsx("p",{className:"text-2xl font-bold",children:S.n_variables}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Search dimensions"})]}),Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Vt.jsx(ej,{className:"h-5 w-5 text-green-500"}),Vt.jsx("h3",{className:"font-semibold",children:"Experiments"})]}),Vt.jsx("p",{className:"text-2xl font-bold",children:S.n_experiments}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Data points collected"})]}),Vt.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[Vt.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[Vt.jsx(q8,{className:"h-5 w-5 text-purple-500"}),Vt.jsx("h3",{className:"font-semibold",children:"Model Status"})]}),Vt.jsx("p",{className:"text-2xl font-bold",children:S.model_trained?"✓ Trained":"○ Not Trained"}),Vt.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:S.model_trained?"Ready for suggestions":"Awaiting data"})]})]}),ve&&ve.has_data&&Vt.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[Vt.jsx("h2",{className:"text-xl font-bold mb-4",children:"Experiment Summary"}),Vt.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[Vt.jsxs("div",{children:[Vt.jsx("p",{className:"text-sm text-muted-foreground",children:"Total Experiments"}),Vt.jsx("p",{className:"text-2xl font-bold",children:ve.n_experiments})]}),ve.target_stats&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{children:[Vt.jsx("p",{className:"text-sm text-muted-foreground",children:"Mean Output"}),Vt.jsx("p",{className:"text-2xl font-bold",children:ve.target_stats.mean?.toFixed(3)})]}),Vt.jsxs("div",{children:[Vt.jsx("p",{className:"text-sm text-muted-foreground",children:"Std Dev"}),Vt.jsx("p",{className:"text-2xl font-bold",children:ve.target_stats.std?.toFixed(3)})]}),Vt.jsxs("div",{children:[Vt.jsx("p",{className:"text-sm text-muted-foreground",children:"Range"}),Vt.jsxs("p",{className:"text-lg font-bold",children:[ve.target_stats.min?.toFixed(2)," - ",ve.target_stats.max?.toFixed(2)]})]})]})]})]}),S.last_suggestion&&Vt.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[Vt.jsx("h2",{className:"text-xl font-bold mb-4",children:"Last Suggested Experiment"}),Vt.jsx("div",{className:"bg-muted/50 rounded-lg p-4",children:Vt.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4",children:Object.entries(S.last_suggestion).map(([Be,Xe])=>Vt.jsxs("div",{children:[Vt.jsx("p",{className:"text-sm text-muted-foreground",children:Be}),Vt.jsx("p",{className:"font-semibold",children:typeof Xe=="number"?Xe.toFixed(3):Xe})]},Be))})})]}),Vt.jsxs("div",{className:"rounded-lg border-2 border-blue-500/30 bg-blue-500/5 p-6",children:[Vt.jsxs("h3",{className:"font-semibold mb-2 flex items-center gap-2",children:[Vt.jsx(q8,{className:"h-5 w-5 text-blue-500"}),"Monitoring Mode Active"]}),Vt.jsxs("p",{className:"text-sm text-muted-foreground",children:["This dashboard is in read-only mode. An autonomous controller is managing the optimization workflow. The view refreshes automatically every"," ",n/1e3," seconds to display the latest progress."]}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"To stop autonomous optimization, use the hardware control interface (HMI) or autonomous controller directly."})]})]}):Vt.jsx("div",{className:"text-center py-12",children:Vt.jsx("p",{className:"text-muted-foreground",children:"Failed to load session state"})})]})})}function UW(e){var n,S,L="";if(typeof e=="string"||typeof e=="number")L+=e;else if(typeof e=="object")if(Array.isArray(e)){var re=e.length;for(n=0;n<re;n++)e[n]&&(S=UW(e[n]))&&(L&&(L+=" "),L+=S)}else for(S in e)e[S]&&(L&&(L+=" "),L+=S);return L}function Ec(){for(var e,n,S=0,L="",re=arguments.length;S<re;S++)(e=arguments[S])&&(n=UW(e))&&(L&&(L+=" "),L+=n);return L}var V8,tj;function Tm(){if(tj)return V8;tj=1;var e=Array.isArray;return V8=e,V8}var H8,rj;function qW(){if(rj)return H8;rj=1;var e=typeof ck=="object"&&ck&&ck.Object===Object&&ck;return H8=e,H8}var G8,nj;function _g(){if(nj)return G8;nj=1;var e=qW(),n=typeof self=="object"&&self&&self.Object===Object&&self,S=e||n||Function("return this")();return G8=S,G8}var X8,aj;function UE(){if(aj)return X8;aj=1;var e=_g(),n=e.Symbol;return X8=n,X8}var W8,ij;function Gle(){if(ij)return W8;ij=1;var e=UE(),n=Object.prototype,S=n.hasOwnProperty,L=n.toString,re=e?e.toStringTag:void 0;function ve(Ce){var Be=S.call(Ce,re),Xe=Ce[re];try{Ce[re]=void 0;var Ke=!0}catch{}var vt=L.call(Ce);return Ke&&(Be?Ce[re]=Xe:delete Ce[re]),vt}return W8=ve,W8}var Y8,oj;function Xle(){if(oj)return Y8;oj=1;var e=Object.prototype,n=e.toString;function S(L){return n.call(L)}return Y8=S,Y8}var Z8,sj;function M1(){if(sj)return Z8;sj=1;var e=UE(),n=Gle(),S=Xle(),L="[object Null]",re="[object Undefined]",ve=e?e.toStringTag:void 0;function Ce(Be){return Be==null?Be===void 0?re:L:ve&&ve in Object(Be)?n(Be):S(Be)}return Z8=Ce,Z8}var $8,lj;function C1(){if(lj)return $8;lj=1;function e(n){return n!=null&&typeof n=="object"}return $8=e,$8}var K8,uj;function NT(){if(uj)return K8;uj=1;var e=M1(),n=C1(),S="[object Symbol]";function L(re){return typeof re=="symbol"||n(re)&&e(re)==S}return K8=L,K8}var J8,cj;function O7(){if(cj)return J8;cj=1;var e=Tm(),n=NT(),S=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function re(ve,Ce){if(e(ve))return!1;var Be=typeof ve;return Be=="number"||Be=="symbol"||Be=="boolean"||ve==null||n(ve)?!0:L.test(ve)||!S.test(ve)||Ce!=null&&ve in Object(Ce)}return J8=re,J8}var Q8,fj;function cx(){if(fj)return Q8;fj=1;function e(n){var S=typeof n;return n!=null&&(S=="object"||S=="function")}return Q8=e,Q8}var eI,hj;function z7(){if(hj)return eI;hj=1;var e=M1(),n=cx(),S="[object AsyncFunction]",L="[object Function]",re="[object GeneratorFunction]",ve="[object Proxy]";function Ce(Be){if(!n(Be))return!1;var Xe=e(Be);return Xe==L||Xe==re||Xe==S||Xe==ve}return eI=Ce,eI}var tI,dj;function Wle(){if(dj)return tI;dj=1;var e=_g(),n=e["__core-js_shared__"];return tI=n,tI}var rI,vj;function Yle(){if(vj)return rI;vj=1;var e=Wle(),n=(function(){var L=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""})();function S(L){return!!n&&n in L}return rI=S,rI}var nI,pj;function VW(){if(pj)return nI;pj=1;var e=Function.prototype,n=e.toString;function S(L){if(L!=null){try{return n.call(L)}catch{}try{return L+""}catch{}}return""}return nI=S,nI}var aI,mj;function Zle(){if(mj)return aI;mj=1;var e=z7(),n=Yle(),S=cx(),L=VW(),re=/[\\^$.*+?()[\]{}|]/g,ve=/^\[object .+?Constructor\]$/,Ce=Function.prototype,Be=Object.prototype,Xe=Ce.toString,Ke=Be.hasOwnProperty,vt=RegExp("^"+Xe.call(Ke).replace(re,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yt(Gt){if(!S(Gt)||n(Gt))return!1;var $t=e(Gt)?vt:ve;return $t.test(L(Gt))}return aI=yt,aI}var iI,yj;function $le(){if(yj)return iI;yj=1;function e(n,S){return n?.[S]}return iI=e,iI}var oI,gj;function xw(){if(gj)return oI;gj=1;var e=Zle(),n=$le();function S(L,re){var ve=n(L,re);return e(ve)?ve:void 0}return oI=S,oI}var sI,_j;function FP(){if(_j)return sI;_j=1;var e=xw(),n=e(Object,"create");return sI=n,sI}var lI,xj;function Kle(){if(xj)return lI;xj=1;var e=FP();function n(){this.__data__=e?e(null):{},this.size=0}return lI=n,lI}var uI,bj;function Jle(){if(bj)return uI;bj=1;function e(n){var S=this.has(n)&&delete this.__data__[n];return this.size-=S?1:0,S}return uI=e,uI}var cI,wj;function Qle(){if(wj)return cI;wj=1;var e=FP(),n="__lodash_hash_undefined__",S=Object.prototype,L=S.hasOwnProperty;function re(ve){var Ce=this.__data__;if(e){var Be=Ce[ve];return Be===n?void 0:Be}return L.call(Ce,ve)?Ce[ve]:void 0}return cI=re,cI}var fI,Tj;function eue(){if(Tj)return fI;Tj=1;var e=FP(),n=Object.prototype,S=n.hasOwnProperty;function L(re){var ve=this.__data__;return e?ve[re]!==void 0:S.call(ve,re)}return fI=L,fI}var hI,Aj;function tue(){if(Aj)return hI;Aj=1;var e=FP(),n="__lodash_hash_undefined__";function S(L,re){var ve=this.__data__;return this.size+=this.has(L)?0:1,ve[L]=e&&re===void 0?n:re,this}return hI=S,hI}var dI,Sj;function rue(){if(Sj)return dI;Sj=1;var e=Kle(),n=Jle(),S=Qle(),L=eue(),re=tue();function ve(Ce){var Be=-1,Xe=Ce==null?0:Ce.length;for(this.clear();++Be<Xe;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,dI=ve,dI}var vI,Ej;function nue(){if(Ej)return vI;Ej=1;function e(){this.__data__=[],this.size=0}return vI=e,vI}var pI,Mj;function N7(){if(Mj)return pI;Mj=1;function e(n,S){return n===S||n!==n&&S!==S}return pI=e,pI}var mI,Cj;function BP(){if(Cj)return mI;Cj=1;var e=N7();function n(S,L){for(var re=S.length;re--;)if(e(S[re][0],L))return re;return-1}return mI=n,mI}var yI,kj;function aue(){if(kj)return yI;kj=1;var e=BP(),n=Array.prototype,S=n.splice;function L(re){var ve=this.__data__,Ce=e(ve,re);if(Ce<0)return!1;var Be=ve.length-1;return Ce==Be?ve.pop():S.call(ve,Ce,1),--this.size,!0}return yI=L,yI}var gI,Pj;function iue(){if(Pj)return gI;Pj=1;var e=BP();function n(S){var L=this.__data__,re=e(L,S);return re<0?void 0:L[re][1]}return gI=n,gI}var _I,Lj;function oue(){if(Lj)return _I;Lj=1;var e=BP();function n(S){return e(this.__data__,S)>-1}return _I=n,_I}var xI,Rj;function sue(){if(Rj)return xI;Rj=1;var e=BP();function n(S,L){var re=this.__data__,ve=e(re,S);return ve<0?(++this.size,re.push([S,L])):re[ve][1]=L,this}return xI=n,xI}var bI,Ij;function jP(){if(Ij)return bI;Ij=1;var e=nue(),n=aue(),S=iue(),L=oue(),re=sue();function ve(Ce){var Be=-1,Xe=Ce==null?0:Ce.length;for(this.clear();++Be<Xe;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,bI=ve,bI}var wI,Dj;function F7(){if(Dj)return wI;Dj=1;var e=xw(),n=_g(),S=e(n,"Map");return wI=S,wI}var TI,Oj;function lue(){if(Oj)return TI;Oj=1;var e=rue(),n=jP(),S=F7();function L(){this.size=0,this.__data__={hash:new e,map:new(S||n),string:new e}}return TI=L,TI}var AI,zj;function uue(){if(zj)return AI;zj=1;function e(n){var S=typeof n;return S=="string"||S=="number"||S=="symbol"||S=="boolean"?n!=="__proto__":n===null}return AI=e,AI}var SI,Nj;function UP(){if(Nj)return SI;Nj=1;var e=uue();function n(S,L){var re=S.__data__;return e(L)?re[typeof L=="string"?"string":"hash"]:re.map}return SI=n,SI}var EI,Fj;function cue(){if(Fj)return EI;Fj=1;var e=UP();function n(S){var L=e(this,S).delete(S);return this.size-=L?1:0,L}return EI=n,EI}var MI,Bj;function fue(){if(Bj)return MI;Bj=1;var e=UP();function n(S){return e(this,S).get(S)}return MI=n,MI}var CI,jj;function hue(){if(jj)return CI;jj=1;var e=UP();function n(S){return e(this,S).has(S)}return CI=n,CI}var kI,Uj;function due(){if(Uj)return kI;Uj=1;var e=UP();function n(S,L){var re=e(this,S),ve=re.size;return re.set(S,L),this.size+=re.size==ve?0:1,this}return kI=n,kI}var PI,qj;function B7(){if(qj)return PI;qj=1;var e=lue(),n=cue(),S=fue(),L=hue(),re=due();function ve(Ce){var Be=-1,Xe=Ce==null?0:Ce.length;for(this.clear();++Be<Xe;){var Ke=Ce[Be];this.set(Ke[0],Ke[1])}}return ve.prototype.clear=e,ve.prototype.delete=n,ve.prototype.get=S,ve.prototype.has=L,ve.prototype.set=re,PI=ve,PI}var LI,Vj;function HW(){if(Vj)return LI;Vj=1;var e=B7(),n="Expected a function";function S(L,re){if(typeof L!="function"||re!=null&&typeof re!="function")throw new TypeError(n);var ve=function(){var Ce=arguments,Be=re?re.apply(this,Ce):Ce[0],Xe=ve.cache;if(Xe.has(Be))return Xe.get(Be);var Ke=L.apply(this,Ce);return ve.cache=Xe.set(Be,Ke)||Xe,Ke};return ve.cache=new(S.Cache||e),ve}return S.Cache=e,LI=S,LI}var RI,Hj;function vue(){if(Hj)return RI;Hj=1;var e=HW(),n=500;function S(L){var re=e(L,function(Ce){return ve.size===n&&ve.clear(),Ce}),ve=re.cache;return re}return RI=S,RI}var II,Gj;function pue(){if(Gj)return II;Gj=1;var e=vue(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,S=/\\(\\)?/g,L=e(function(re){var ve=[];return re.charCodeAt(0)===46&&ve.push(""),re.replace(n,function(Ce,Be,Xe,Ke){ve.push(Xe?Ke.replace(S,"$1"):Be||Ce)}),ve});return II=L,II}var DI,Xj;function j7(){if(Xj)return DI;Xj=1;function e(n,S){for(var L=-1,re=n==null?0:n.length,ve=Array(re);++L<re;)ve[L]=S(n[L],L,n);return ve}return DI=e,DI}var OI,Wj;function mue(){if(Wj)return OI;Wj=1;var e=UE(),n=j7(),S=Tm(),L=NT(),re=e?e.prototype:void 0,ve=re?re.toString:void 0;function Ce(Be){if(typeof Be=="string")return Be;if(S(Be))return n(Be,Ce)+"";if(L(Be))return ve?ve.call(Be):"";var Xe=Be+"";return Xe=="0"&&1/Be==-1/0?"-0":Xe}return OI=Ce,OI}var zI,Yj;function GW(){if(Yj)return zI;Yj=1;var e=mue();function n(S){return S==null?"":e(S)}return zI=n,zI}var NI,Zj;function XW(){if(Zj)return NI;Zj=1;var e=Tm(),n=O7(),S=pue(),L=GW();function re(ve,Ce){return e(ve)?ve:n(ve,Ce)?[ve]:S(L(ve))}return NI=re,NI}var FI,$j;function qP(){if($j)return FI;$j=1;var e=NT();function n(S){if(typeof S=="string"||e(S))return S;var L=S+"";return L=="0"&&1/S==-1/0?"-0":L}return FI=n,FI}var BI,Kj;function U7(){if(Kj)return BI;Kj=1;var e=XW(),n=qP();function S(L,re){re=e(re,L);for(var ve=0,Ce=re.length;L!=null&&ve<Ce;)L=L[n(re[ve++])];return ve&&ve==Ce?L:void 0}return BI=S,BI}var jI,Jj;function WW(){if(Jj)return jI;Jj=1;var e=U7();function n(S,L,re){var ve=S==null?void 0:e(S,L);return ve===void 0?re:ve}return jI=n,jI}var yue=WW();const C0=rh(yue);var UI,Qj;function gue(){if(Qj)return UI;Qj=1;function e(n){return n==null}return UI=e,UI}var _ue=gue();const Mu=rh(_ue);var qI,eU;function xue(){if(eU)return qI;eU=1;var e=M1(),n=Tm(),S=C1(),L="[object String]";function re(ve){return typeof ve=="string"||!n(ve)&&S(ve)&&e(ve)==L}return qI=re,qI}var bue=xue();const vw=rh(bue);var wue=z7();const Fu=rh(wue);var Tue=cx();const FT=rh(Tue);var VI={exports:{}},Uf={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var tU;function Aue(){if(tU)return Uf;tU=1;var e=Symbol.for("react.element"),n=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ve=Symbol.for("react.provider"),Ce=Symbol.for("react.context"),Be=Symbol.for("react.server_context"),Xe=Symbol.for("react.forward_ref"),Ke=Symbol.for("react.suspense"),vt=Symbol.for("react.suspense_list"),yt=Symbol.for("react.memo"),Gt=Symbol.for("react.lazy"),$t=Symbol.for("react.offscreen"),gr;gr=Symbol.for("react.module.reference");function sr(nr){if(typeof nr=="object"&&nr!==null){var jr=nr.$$typeof;switch(jr){case e:switch(nr=nr.type,nr){case S:case re:case L:case Ke:case vt:return nr;default:switch(nr=nr&&nr.$$typeof,nr){case Be:case Ce:case Xe:case Gt:case yt:case ve:return nr;default:return jr}}case n:return jr}}}return Uf.ContextConsumer=Ce,Uf.ContextProvider=ve,Uf.Element=e,Uf.ForwardRef=Xe,Uf.Fragment=S,Uf.Lazy=Gt,Uf.Memo=yt,Uf.Portal=n,Uf.Profiler=re,Uf.StrictMode=L,Uf.Suspense=Ke,Uf.SuspenseList=vt,Uf.isAsyncMode=function(){return!1},Uf.isConcurrentMode=function(){return!1},Uf.isContextConsumer=function(nr){return sr(nr)===Ce},Uf.isContextProvider=function(nr){return sr(nr)===ve},Uf.isElement=function(nr){return typeof nr=="object"&&nr!==null&&nr.$$typeof===e},Uf.isForwardRef=function(nr){return sr(nr)===Xe},Uf.isFragment=function(nr){return sr(nr)===S},Uf.isLazy=function(nr){return sr(nr)===Gt},Uf.isMemo=function(nr){return sr(nr)===yt},Uf.isPortal=function(nr){return sr(nr)===n},Uf.isProfiler=function(nr){return sr(nr)===re},Uf.isStrictMode=function(nr){return sr(nr)===L},Uf.isSuspense=function(nr){return sr(nr)===Ke},Uf.isSuspenseList=function(nr){return sr(nr)===vt},Uf.isValidElementType=function(nr){return typeof nr=="string"||typeof nr=="function"||nr===S||nr===re||nr===L||nr===Ke||nr===vt||nr===$t||typeof nr=="object"&&nr!==null&&(nr.$$typeof===Gt||nr.$$typeof===yt||nr.$$typeof===ve||nr.$$typeof===Ce||nr.$$typeof===Xe||nr.$$typeof===gr||nr.getModuleId!==void 0)},Uf.typeOf=sr,Uf}var rU;function Sue(){return rU||(rU=1,VI.exports=Aue()),VI.exports}var Eue=Sue(),HI,nU;function YW(){if(nU)return HI;nU=1;var e=M1(),n=C1(),S="[object Number]";function L(re){return typeof re=="number"||n(re)&&e(re)==S}return HI=L,HI}var GI,aU;function Mue(){if(aU)return GI;aU=1;var e=YW();function n(S){return e(S)&&S!=+S}return GI=n,GI}var Cue=Mue();const BT=rh(Cue);var kue=YW();const Pue=rh(kue);var hy=function(n){return n===0?0:n>0?1:-1},rw=function(n){return vw(n)&&n.indexOf("%")===n.length-1},gs=function(n){return Pue(n)&&!BT(n)},Lue=function(n){return Mu(n)},Iv=function(n){return gs(n)||vw(n)},Rue=0,bw=function(n){var S=++Rue;return"".concat(n||"").concat(S)},pw=function(n,S){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,re=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!gs(n)&&!vw(n))return L;var ve;if(rw(n)){var Ce=n.indexOf("%");ve=S*parseFloat(n.slice(0,Ce))/100}else ve=+n;return BT(ve)&&(ve=L),re&&ve>S&&(ve=S),ve},nx=function(n){if(!n)return null;var S=Object.keys(n);return S&&S.length?n[S[0]]:null},Iue=function(n){if(!Array.isArray(n))return!1;for(var S=n.length,L={},re=0;re<S;re++)if(!L[n[re]])L[n[re]]=!0;else return!0;return!1},ev=function(n,S){return gs(n)&&gs(S)?function(L){return n+L*(S-n)}:function(){return S}};function Dk(e,n,S){return!e||!e.length?null:e.find(function(L){return L&&(typeof n=="function"?n(L):C0(L,n))===S})}var Due=function(n){if(!n||!n.length)return null;for(var S=n.length,L=0,re=0,ve=0,Ce=0,Be=1/0,Xe=-1/0,Ke=0,vt=0,yt=0;yt<S;yt++)Ke=n[yt].cx||0,vt=n[yt].cy||0,L+=Ke,re+=vt,ve+=Ke*vt,Ce+=Ke*Ke,Be=Math.min(Be,Ke),Xe=Math.max(Xe,Ke);var Gt=S*Ce!==L*L?(S*ve-L*re)/(S*Ce-L*L):0;return{xmin:Be,xmax:Xe,a:Gt,b:(re-Gt*L)/S}},Oue=function(n,S){return gs(n)&&gs(S)?n-S:vw(n)&&vw(S)?n.localeCompare(S):n instanceof Date&&S instanceof Date?n.getTime()-S.getTime():String(n).localeCompare(String(S))};function nT(e,n){for(var S in e)if({}.hasOwnProperty.call(e,S)&&(!{}.hasOwnProperty.call(n,S)||e[S]!==n[S]))return!1;for(var L in n)if({}.hasOwnProperty.call(n,L)&&!{}.hasOwnProperty.call(e,L))return!1;return!0}function tz(e){"@babel/helpers - typeof";return tz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},tz(e)}var zue=["viewBox","children"],Nue=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],iU=["points","pathLength"],XI={svg:zue,polygon:iU,polyline:iU},q7=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Ok=function(n,S){if(!n||typeof n=="function"||typeof n=="boolean")return null;var L=n;if(Ua.isValidElement(n)&&(L=n.props),!FT(L))return null;var re={};return Object.keys(L).forEach(function(ve){q7.includes(ve)&&(re[ve]=S||function(Ce){return L[ve](L,Ce)})}),re},Fue=function(n,S,L){return function(re){return n(S,L,re),null}},tE=function(n,S,L){if(!FT(n)||tz(n)!=="object")return null;var re=null;return Object.keys(n).forEach(function(ve){var Ce=n[ve];q7.includes(ve)&&typeof Ce=="function"&&(re||(re={}),re[ve]=Fue(Ce,S,L))}),re},Bue=["children"],jue=["children"];function oU(e,n){if(e==null)return{};var S=Uue(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Uue(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function rz(e){"@babel/helpers - typeof";return rz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rz(e)}var sU={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},b1=function(n){return typeof n=="string"?n:n?n.displayName||n.name||"Component":""},lU=null,WI=null,V7=function e(n){if(n===lU&&Array.isArray(WI))return WI;var S=[];return Ua.Children.forEach(n,function(L){Mu(L)||(Eue.isFragment(L)?S=S.concat(e(L.props.children)):S.push(L))}),WI=S,lU=n,S};function bm(e,n){var S=[],L=[];return Array.isArray(n)?L=n.map(function(re){return b1(re)}):L=[b1(n)],V7(e).forEach(function(re){var ve=C0(re,"type.displayName")||C0(re,"type.name");L.indexOf(ve)!==-1&&S.push(re)}),S}function Jm(e,n){var S=bm(e,n);return S&&S[0]}var uU=function(n){if(!n||!n.props)return!1;var S=n.props,L=S.width,re=S.height;return!(!gs(L)||L<=0||!gs(re)||re<=0)},que=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Vue=function(n){return n&&n.type&&vw(n.type)&&que.indexOf(n.type)>=0},ZW=function(n){return n&&rz(n)==="object"&&"clipDot"in n},Hue=function(n,S,L,re){var ve,Ce=(ve=XI?.[re])!==null&&ve!==void 0?ve:[];return S.startsWith("data-")||!Fu(n)&&(re&&Ce.includes(S)||Nue.includes(S))||L&&q7.includes(S)},Iu=function(n,S,L){if(!n||typeof n=="function"||typeof n=="boolean")return null;var re=n;if(Ua.isValidElement(n)&&(re=n.props),!FT(re))return null;var ve={};return Object.keys(re).forEach(function(Ce){var Be;Hue((Be=re)===null||Be===void 0?void 0:Be[Ce],Ce,S,L)&&(ve[Ce]=re[Ce])}),ve},nz=function e(n,S){if(n===S)return!0;var L=Ua.Children.count(n);if(L!==Ua.Children.count(S))return!1;if(L===0)return!0;if(L===1)return cU(Array.isArray(n)?n[0]:n,Array.isArray(S)?S[0]:S);for(var re=0;re<L;re++){var ve=n[re],Ce=S[re];if(Array.isArray(ve)||Array.isArray(Ce)){if(!e(ve,Ce))return!1}else if(!cU(ve,Ce))return!1}return!0},cU=function(n,S){if(Mu(n)&&Mu(S))return!0;if(!Mu(n)&&!Mu(S)){var L=n.props||{},re=L.children,ve=oU(L,Bue),Ce=S.props||{},Be=Ce.children,Xe=oU(Ce,jue);return re&&Be?nT(ve,Xe)&&nz(re,Be):!re&&!Be?nT(ve,Xe):!1}return!1},fU=function(n,S){var L=[],re={};return V7(n).forEach(function(ve,Ce){if(Vue(ve))L.push(ve);else if(ve){var Be=b1(ve.type),Xe=S[Be]||{},Ke=Xe.handler,vt=Xe.once;if(Ke&&(!vt||!re[Be])){var yt=Ke(ve,Be,Ce);L.push(yt),re[Be]=!0}}}),L},Gue=function(n){var S=n&&n.type;return S&&sU[S]?sU[S]:null},Xue=function(n,S){return V7(S).indexOf(n)},Wue=["children","width","height","viewBox","className","style","title","desc"];function az(){return az=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},az.apply(this,arguments)}function Yue(e,n){if(e==null)return{};var S=Zue(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Zue(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function iz(e){var n=e.children,S=e.width,L=e.height,re=e.viewBox,ve=e.className,Ce=e.style,Be=e.title,Xe=e.desc,Ke=Yue(e,Wue),vt=re||{width:S,height:L,x:0,y:0},yt=Ec("recharts-surface",ve);return aa.createElement("svg",az({},Iu(Ke,!0,"svg"),{className:yt,width:S,height:L,style:Ce,viewBox:"".concat(vt.x," ").concat(vt.y," ").concat(vt.width," ").concat(vt.height)}),aa.createElement("title",null,Be),aa.createElement("desc",null,Xe),n)}var $ue=["children","className"];function oz(){return oz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},oz.apply(this,arguments)}function Kue(e,n){if(e==null)return{};var S=Jue(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Jue(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var Rf=aa.forwardRef(function(e,n){var S=e.children,L=e.className,re=Kue(e,$ue),ve=Ec("recharts-layer",L);return aa.createElement("g",oz({className:ve},Iu(re,!0),{ref:n}),S)}),w1=function(n,S){for(var L=arguments.length,re=new Array(L>2?L-2:0),ve=2;ve<L;ve++)re[ve-2]=arguments[ve]},YI,hU;function Que(){if(hU)return YI;hU=1;function e(n,S,L){var re=-1,ve=n.length;S<0&&(S=-S>ve?0:ve+S),L=L>ve?ve:L,L<0&&(L+=ve),ve=S>L?0:L-S>>>0,S>>>=0;for(var Ce=Array(ve);++re<ve;)Ce[re]=n[re+S];return Ce}return YI=e,YI}var ZI,dU;function ece(){if(dU)return ZI;dU=1;var e=Que();function n(S,L,re){var ve=S.length;return re=re===void 0?ve:re,!L&&re>=ve?S:e(S,L,re)}return ZI=n,ZI}var $I,vU;function $W(){if(vU)return $I;vU=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",S="\\ufe20-\\ufe2f",L="\\u20d0-\\u20ff",re=n+S+L,ve="\\ufe0e\\ufe0f",Ce="\\u200d",Be=RegExp("["+Ce+e+re+ve+"]");function Xe(Ke){return Be.test(Ke)}return $I=Xe,$I}var KI,pU;function tce(){if(pU)return KI;pU=1;function e(n){return n.split("")}return KI=e,KI}var JI,mU;function rce(){if(mU)return JI;mU=1;var e="\\ud800-\\udfff",n="\\u0300-\\u036f",S="\\ufe20-\\ufe2f",L="\\u20d0-\\u20ff",re=n+S+L,ve="\\ufe0e\\ufe0f",Ce="["+e+"]",Be="["+re+"]",Xe="\\ud83c[\\udffb-\\udfff]",Ke="(?:"+Be+"|"+Xe+")",vt="[^"+e+"]",yt="(?:\\ud83c[\\udde6-\\uddff]){2}",Gt="[\\ud800-\\udbff][\\udc00-\\udfff]",$t="\\u200d",gr=Ke+"?",sr="["+ve+"]?",nr="(?:"+$t+"(?:"+[vt,yt,Gt].join("|")+")"+sr+gr+")*",jr=sr+gr+nr,Ne="(?:"+[vt+Be+"?",Be,yt,Gt,Ce].join("|")+")",an=RegExp(Xe+"(?="+Xe+")|"+Ne+jr,"g");function yn(Lr){return Lr.match(an)||[]}return JI=yn,JI}var QI,yU;function nce(){if(yU)return QI;yU=1;var e=tce(),n=$W(),S=rce();function L(re){return n(re)?S(re):e(re)}return QI=L,QI}var eD,gU;function ace(){if(gU)return eD;gU=1;var e=ece(),n=$W(),S=nce(),L=GW();function re(ve){return function(Ce){Ce=L(Ce);var Be=n(Ce)?S(Ce):void 0,Xe=Be?Be[0]:Ce.charAt(0),Ke=Be?e(Be,1).join(""):Ce.slice(1);return Xe[ve]()+Ke}}return eD=re,eD}var tD,_U;function ice(){if(_U)return tD;_U=1;var e=ace(),n=e("toUpperCase");return tD=n,tD}var oce=ice();const VP=rh(oce);function kh(e){return function(){return e}}const KW=Math.cos,zk=Math.sin,my=Math.sqrt,Nk=Math.PI,HP=2*Nk,sz=Math.PI,lz=2*sz,Jb=1e-6,sce=lz-Jb;function JW(e){this._+=e[0];for(let n=1,S=e.length;n<S;++n)this._+=arguments[n]+e[n]}function lce(e){let n=Math.floor(e);if(!(n>=0))throw new Error(`invalid digits: ${e}`);if(n>15)return JW;const S=10**n;return function(L){this._+=L[0];for(let re=1,ve=L.length;re<ve;++re)this._+=Math.round(arguments[re]*S)/S+L[re]}}class uce{constructor(n){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=n==null?JW:lce(n)}moveTo(n,S){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+S}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(n,S){this._append`L${this._x1=+n},${this._y1=+S}`}quadraticCurveTo(n,S,L,re){this._append`Q${+n},${+S},${this._x1=+L},${this._y1=+re}`}bezierCurveTo(n,S,L,re,ve,Ce){this._append`C${+n},${+S},${+L},${+re},${this._x1=+ve},${this._y1=+Ce}`}arcTo(n,S,L,re,ve){if(n=+n,S=+S,L=+L,re=+re,ve=+ve,ve<0)throw new Error(`negative radius: ${ve}`);let Ce=this._x1,Be=this._y1,Xe=L-n,Ke=re-S,vt=Ce-n,yt=Be-S,Gt=vt*vt+yt*yt;if(this._x1===null)this._append`M${this._x1=n},${this._y1=S}`;else if(Gt>Jb)if(!(Math.abs(yt*Xe-Ke*vt)>Jb)||!ve)this._append`L${this._x1=n},${this._y1=S}`;else{let $t=L-Ce,gr=re-Be,sr=Xe*Xe+Ke*Ke,nr=$t*$t+gr*gr,jr=Math.sqrt(sr),Ne=Math.sqrt(Gt),an=ve*Math.tan((sz-Math.acos((sr+Gt-nr)/(2*jr*Ne)))/2),yn=an/Ne,Lr=an/jr;Math.abs(yn-1)>Jb&&this._append`L${n+yn*vt},${S+yn*yt}`,this._append`A${ve},${ve},0,0,${+(yt*$t>vt*gr)},${this._x1=n+Lr*Xe},${this._y1=S+Lr*Ke}`}}arc(n,S,L,re,ve,Ce){if(n=+n,S=+S,L=+L,Ce=!!Ce,L<0)throw new Error(`negative radius: ${L}`);let Be=L*Math.cos(re),Xe=L*Math.sin(re),Ke=n+Be,vt=S+Xe,yt=1^Ce,Gt=Ce?re-ve:ve-re;this._x1===null?this._append`M${Ke},${vt}`:(Math.abs(this._x1-Ke)>Jb||Math.abs(this._y1-vt)>Jb)&&this._append`L${Ke},${vt}`,L&&(Gt<0&&(Gt=Gt%lz+lz),Gt>sce?this._append`A${L},${L},0,1,${yt},${n-Be},${S-Xe}A${L},${L},0,1,${yt},${this._x1=Ke},${this._y1=vt}`:Gt>Jb&&this._append`A${L},${L},0,${+(Gt>=sz)},${yt},${this._x1=n+L*Math.cos(ve)},${this._y1=S+L*Math.sin(ve)}`)}rect(n,S,L,re){this._append`M${this._x0=this._x1=+n},${this._y0=this._y1=+S}h${L=+L}v${+re}h${-L}Z`}toString(){return this._}}function H7(e){let n=3;return e.digits=function(S){if(!arguments.length)return n;if(S==null)n=null;else{const L=Math.floor(S);if(!(L>=0))throw new RangeError(`invalid digits: ${S}`);n=L}return e},()=>new uce(n)}function G7(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function QW(e){this._context=e}QW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:this._context.lineTo(e,n);break}}};function GP(e){return new QW(e)}function eY(e){return e[0]}function tY(e){return e[1]}function rY(e,n){var S=kh(!0),L=null,re=GP,ve=null,Ce=H7(Be);e=typeof e=="function"?e:e===void 0?eY:kh(e),n=typeof n=="function"?n:n===void 0?tY:kh(n);function Be(Xe){var Ke,vt=(Xe=G7(Xe)).length,yt,Gt=!1,$t;for(L==null&&(ve=re($t=Ce())),Ke=0;Ke<=vt;++Ke)!(Ke<vt&&S(yt=Xe[Ke],Ke,Xe))===Gt&&((Gt=!Gt)?ve.lineStart():ve.lineEnd()),Gt&&ve.point(+e(yt,Ke,Xe),+n(yt,Ke,Xe));if($t)return ve=null,$t+""||null}return Be.x=function(Xe){return arguments.length?(e=typeof Xe=="function"?Xe:kh(+Xe),Be):e},Be.y=function(Xe){return arguments.length?(n=typeof Xe=="function"?Xe:kh(+Xe),Be):n},Be.defined=function(Xe){return arguments.length?(S=typeof Xe=="function"?Xe:kh(!!Xe),Be):S},Be.curve=function(Xe){return arguments.length?(re=Xe,L!=null&&(ve=re(L)),Be):re},Be.context=function(Xe){return arguments.length?(Xe==null?L=ve=null:ve=re(L=Xe),Be):L},Be}function vk(e,n,S){var L=null,re=kh(!0),ve=null,Ce=GP,Be=null,Xe=H7(Ke);e=typeof e=="function"?e:e===void 0?eY:kh(+e),n=typeof n=="function"?n:kh(n===void 0?0:+n),S=typeof S=="function"?S:S===void 0?tY:kh(+S);function Ke(yt){var Gt,$t,gr,sr=(yt=G7(yt)).length,nr,jr=!1,Ne,an=new Array(sr),yn=new Array(sr);for(ve==null&&(Be=Ce(Ne=Xe())),Gt=0;Gt<=sr;++Gt){if(!(Gt<sr&&re(nr=yt[Gt],Gt,yt))===jr)if(jr=!jr)$t=Gt,Be.areaStart(),Be.lineStart();else{for(Be.lineEnd(),Be.lineStart(),gr=Gt-1;gr>=$t;--gr)Be.point(an[gr],yn[gr]);Be.lineEnd(),Be.areaEnd()}jr&&(an[Gt]=+e(nr,Gt,yt),yn[Gt]=+n(nr,Gt,yt),Be.point(L?+L(nr,Gt,yt):an[Gt],S?+S(nr,Gt,yt):yn[Gt]))}if(Ne)return Be=null,Ne+""||null}function vt(){return rY().defined(re).curve(Ce).context(ve)}return Ke.x=function(yt){return arguments.length?(e=typeof yt=="function"?yt:kh(+yt),L=null,Ke):e},Ke.x0=function(yt){return arguments.length?(e=typeof yt=="function"?yt:kh(+yt),Ke):e},Ke.x1=function(yt){return arguments.length?(L=yt==null?null:typeof yt=="function"?yt:kh(+yt),Ke):L},Ke.y=function(yt){return arguments.length?(n=typeof yt=="function"?yt:kh(+yt),S=null,Ke):n},Ke.y0=function(yt){return arguments.length?(n=typeof yt=="function"?yt:kh(+yt),Ke):n},Ke.y1=function(yt){return arguments.length?(S=yt==null?null:typeof yt=="function"?yt:kh(+yt),Ke):S},Ke.lineX0=Ke.lineY0=function(){return vt().x(e).y(n)},Ke.lineY1=function(){return vt().x(e).y(S)},Ke.lineX1=function(){return vt().x(L).y(n)},Ke.defined=function(yt){return arguments.length?(re=typeof yt=="function"?yt:kh(!!yt),Ke):re},Ke.curve=function(yt){return arguments.length?(Ce=yt,ve!=null&&(Be=Ce(ve)),Ke):Ce},Ke.context=function(yt){return arguments.length?(yt==null?ve=Be=null:Be=Ce(ve=yt),Ke):ve},Ke}class nY{constructor(n,S){this._context=n,this._x=S}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(n,S){switch(n=+n,S=+S,this._point){case 0:{this._point=1,this._line?this._context.lineTo(n,S):this._context.moveTo(n,S);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+n)/2,this._y0,this._x0,S,n,S):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+S)/2,n,this._y0,n,S);break}}this._x0=n,this._y0=S}}function cce(e){return new nY(e,!0)}function fce(e){return new nY(e,!1)}const X7={draw(e,n){const S=my(n/Nk);e.moveTo(S,0),e.arc(0,0,S,0,HP)}},hce={draw(e,n){const S=my(n/5)/2;e.moveTo(-3*S,-S),e.lineTo(-S,-S),e.lineTo(-S,-3*S),e.lineTo(S,-3*S),e.lineTo(S,-S),e.lineTo(3*S,-S),e.lineTo(3*S,S),e.lineTo(S,S),e.lineTo(S,3*S),e.lineTo(-S,3*S),e.lineTo(-S,S),e.lineTo(-3*S,S),e.closePath()}},aY=my(1/3),dce=aY*2,vce={draw(e,n){const S=my(n/dce),L=S*aY;e.moveTo(0,-S),e.lineTo(L,0),e.lineTo(0,S),e.lineTo(-L,0),e.closePath()}},pce={draw(e,n){const S=my(n),L=-S/2;e.rect(L,L,S,S)}},mce=.8908130915292852,iY=zk(Nk/10)/zk(7*Nk/10),yce=zk(HP/10)*iY,gce=-KW(HP/10)*iY,_ce={draw(e,n){const S=my(n*mce),L=yce*S,re=gce*S;e.moveTo(0,-S),e.lineTo(L,re);for(let ve=1;ve<5;++ve){const Ce=HP*ve/5,Be=KW(Ce),Xe=zk(Ce);e.lineTo(Xe*S,-Be*S),e.lineTo(Be*L-Xe*re,Xe*L+Be*re)}e.closePath()}},rD=my(3),xce={draw(e,n){const S=-my(n/(rD*3));e.moveTo(0,S*2),e.lineTo(-rD*S,-S),e.lineTo(rD*S,-S),e.closePath()}},w0=-.5,T0=my(3)/2,uz=1/my(12),bce=(uz/2+1)*3,wce={draw(e,n){const S=my(n/bce),L=S/2,re=S*uz,ve=L,Ce=S*uz+S,Be=-ve,Xe=Ce;e.moveTo(L,re),e.lineTo(ve,Ce),e.lineTo(Be,Xe),e.lineTo(w0*L-T0*re,T0*L+w0*re),e.lineTo(w0*ve-T0*Ce,T0*ve+w0*Ce),e.lineTo(w0*Be-T0*Xe,T0*Be+w0*Xe),e.lineTo(w0*L+T0*re,w0*re-T0*L),e.lineTo(w0*ve+T0*Ce,w0*Ce-T0*ve),e.lineTo(w0*Be+T0*Xe,w0*Xe-T0*Be),e.closePath()}};function Tce(e,n){let S=null,L=H7(re);e=typeof e=="function"?e:kh(e||X7),n=typeof n=="function"?n:kh(n===void 0?64:+n);function re(){let ve;if(S||(S=ve=L()),e.apply(this,arguments).draw(S,+n.apply(this,arguments)),ve)return S=null,ve+""||null}return re.type=function(ve){return arguments.length?(e=typeof ve=="function"?ve:kh(ve),re):e},re.size=function(ve){return arguments.length?(n=typeof ve=="function"?ve:kh(+ve),re):n},re.context=function(ve){return arguments.length?(S=ve??null,re):S},re}function Fk(){}function Bk(e,n,S){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+n)/6,(e._y0+4*e._y1+S)/6)}function oY(e){this._context=e}oY.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:Bk(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(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);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:Bk(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ace(e){return new oY(e)}function sY(e){this._context=e}sY.prototype={areaStart:Fk,areaEnd:Fk,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(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._x2=e,this._y2=n;break;case 1:this._point=2,this._x3=e,this._y3=n;break;case 2:this._point=3,this._x4=e,this._y4=n,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+n)/6);break;default:Bk(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Sce(e){return new sY(e)}function lY(e){this._context=e}lY.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(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var S=(this._x0+4*this._x1+e)/6,L=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(S,L):this._context.moveTo(S,L);break;case 3:this._point=4;default:Bk(this,e,n);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n}};function Ece(e){return new lY(e)}function uY(e){this._context=e}uY.prototype={areaStart:Fk,areaEnd:Fk,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,n){e=+e,n=+n,this._point?this._context.lineTo(e,n):(this._point=1,this._context.moveTo(e,n))}};function Mce(e){return new uY(e)}function xU(e){return e<0?-1:1}function bU(e,n,S){var L=e._x1-e._x0,re=n-e._x1,ve=(e._y1-e._y0)/(L||re<0&&-0),Ce=(S-e._y1)/(re||L<0&&-0),Be=(ve*re+Ce*L)/(L+re);return(xU(ve)+xU(Ce))*Math.min(Math.abs(ve),Math.abs(Ce),.5*Math.abs(Be))||0}function wU(e,n){var S=e._x1-e._x0;return S?(3*(e._y1-e._y0)/S-n)/2:n}function nD(e,n,S){var L=e._x0,re=e._y0,ve=e._x1,Ce=e._y1,Be=(ve-L)/3;e._context.bezierCurveTo(L+Be,re+Be*n,ve-Be,Ce-Be*S,ve,Ce)}function jk(e){this._context=e}jk.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:nD(this,this._t0,wU(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,n){var S=NaN;if(e=+e,n=+n,!(e===this._x1&&n===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;break;case 2:this._point=3,nD(this,wU(this,S=bU(this,e,n)),S);break;default:nD(this,this._t0,S=bU(this,e,n));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=n,this._t0=S}}};function cY(e){this._context=new fY(e)}(cY.prototype=Object.create(jk.prototype)).point=function(e,n){jk.prototype.point.call(this,n,e)};function fY(e){this._context=e}fY.prototype={moveTo:function(e,n){this._context.moveTo(n,e)},closePath:function(){this._context.closePath()},lineTo:function(e,n){this._context.lineTo(n,e)},bezierCurveTo:function(e,n,S,L,re,ve){this._context.bezierCurveTo(n,e,L,S,ve,re)}};function Cce(e){return new jk(e)}function kce(e){return new cY(e)}function hY(e){this._context=e}hY.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,n=this._y,S=e.length;if(S)if(this._line?this._context.lineTo(e[0],n[0]):this._context.moveTo(e[0],n[0]),S===2)this._context.lineTo(e[1],n[1]);else for(var L=TU(e),re=TU(n),ve=0,Ce=1;Ce<S;++ve,++Ce)this._context.bezierCurveTo(L[0][ve],re[0][ve],L[1][ve],re[1][ve],e[Ce],n[Ce]);(this._line||this._line!==0&&S===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,n){this._x.push(+e),this._y.push(+n)}};function TU(e){var n,S=e.length-1,L,re=new Array(S),ve=new Array(S),Ce=new Array(S);for(re[0]=0,ve[0]=2,Ce[0]=e[0]+2*e[1],n=1;n<S-1;++n)re[n]=1,ve[n]=4,Ce[n]=4*e[n]+2*e[n+1];for(re[S-1]=2,ve[S-1]=7,Ce[S-1]=8*e[S-1]+e[S],n=1;n<S;++n)L=re[n]/ve[n-1],ve[n]-=L,Ce[n]-=L*Ce[n-1];for(re[S-1]=Ce[S-1]/ve[S-1],n=S-2;n>=0;--n)re[n]=(Ce[n]-re[n+1])/ve[n];for(ve[S-1]=(e[S]+re[S-1])/2,n=0;n<S-1;++n)ve[n]=2*e[n+1]-re[n+1];return[re,ve]}function Pce(e){return new hY(e)}function XP(e,n){this._context=e,this._t=n}XP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,n){switch(e=+e,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,n):this._context.moveTo(e,n);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(e,n);else{var S=this._x*(1-this._t)+e*this._t;this._context.lineTo(S,this._y),this._context.lineTo(S,n)}break}}this._x=e,this._y=n}};function Lce(e){return new XP(e,.5)}function Rce(e){return new XP(e,0)}function Ice(e){return new XP(e,1)}function sT(e,n){if((Ce=e.length)>1)for(var S=1,L,re,ve=e[n[0]],Ce,Be=ve.length;S<Ce;++S)for(re=ve,ve=e[n[S]],L=0;L<Be;++L)ve[L][1]+=ve[L][0]=isNaN(re[L][1])?re[L][0]:re[L][1]}function cz(e){for(var n=e.length,S=new Array(n);--n>=0;)S[n]=n;return S}function Dce(e,n){return e[n]}function Oce(e){const n=[];return n.key=e,n}function zce(){var e=kh([]),n=cz,S=sT,L=Dce;function re(ve){var Ce=Array.from(e.apply(this,arguments),Oce),Be,Xe=Ce.length,Ke=-1,vt;for(const yt of ve)for(Be=0,++Ke;Be<Xe;++Be)(Ce[Be][Ke]=[0,+L(yt,Ce[Be].key,Ke,ve)]).data=yt;for(Be=0,vt=G7(n(Ce));Be<Xe;++Be)Ce[vt[Be]].index=Be;return S(Ce,vt),Ce}return re.keys=function(ve){return arguments.length?(e=typeof ve=="function"?ve:kh(Array.from(ve)),re):e},re.value=function(ve){return arguments.length?(L=typeof ve=="function"?ve:kh(+ve),re):L},re.order=function(ve){return arguments.length?(n=ve==null?cz:typeof ve=="function"?ve:kh(Array.from(ve)),re):n},re.offset=function(ve){return arguments.length?(S=ve??sT,re):S},re}function Nce(e,n){if((L=e.length)>0){for(var S,L,re=0,ve=e[0].length,Ce;re<ve;++re){for(Ce=S=0;S<L;++S)Ce+=e[S][re][1]||0;if(Ce)for(S=0;S<L;++S)e[S][re][1]/=Ce}sT(e,n)}}function Fce(e,n){if((re=e.length)>0){for(var S=0,L=e[n[0]],re,ve=L.length;S<ve;++S){for(var Ce=0,Be=0;Ce<re;++Ce)Be+=e[Ce][S][1]||0;L[S][1]+=L[S][0]=-Be/2}sT(e,n)}}function Bce(e,n){if(!(!((Ce=e.length)>0)||!((ve=(re=e[n[0]]).length)>0))){for(var S=0,L=1,re,ve,Ce;L<ve;++L){for(var Be=0,Xe=0,Ke=0;Be<Ce;++Be){for(var vt=e[n[Be]],yt=vt[L][1]||0,Gt=vt[L-1][1]||0,$t=(yt-Gt)/2,gr=0;gr<Be;++gr){var sr=e[n[gr]],nr=sr[L][1]||0,jr=sr[L-1][1]||0;$t+=nr-jr}Xe+=yt,Ke+=$t*yt}re[L-1][1]+=re[L-1][0]=S,Xe&&(S-=Ke/Xe)}re[L-1][1]+=re[L-1][0]=S,sT(e,n)}}function rE(e){"@babel/helpers - typeof";return rE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},rE(e)}var jce=["type","size","sizeType"];function fz(){return fz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},fz.apply(this,arguments)}function AU(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function SU(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?AU(Object(S),!0).forEach(function(L){Uce(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):AU(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Uce(e,n,S){return n=qce(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function qce(e){var n=Vce(e,"string");return rE(n)=="symbol"?n:n+""}function Vce(e,n){if(rE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(rE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Hce(e,n){if(e==null)return{};var S=Gce(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Gce(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var dY={symbolCircle:X7,symbolCross:hce,symbolDiamond:vce,symbolSquare:pce,symbolStar:_ce,symbolTriangle:xce,symbolWye:wce},Xce=Math.PI/180,Wce=function(n){var S="symbol".concat(VP(n));return dY[S]||X7},Yce=function(n,S,L){if(S==="area")return n;switch(L){case"cross":return 5*n*n/9;case"diamond":return .5*n*n/Math.sqrt(3);case"square":return n*n;case"star":{var re=18*Xce;return 1.25*n*n*(Math.tan(re)-Math.tan(re*2)*Math.pow(Math.tan(re),2))}case"triangle":return Math.sqrt(3)*n*n/4;case"wye":return(21-10*Math.sqrt(3))*n*n/8;default:return Math.PI*n*n/4}},Zce=function(n,S){dY["symbol".concat(VP(n))]=S},WP=function(n){var S=n.type,L=S===void 0?"circle":S,re=n.size,ve=re===void 0?64:re,Ce=n.sizeType,Be=Ce===void 0?"area":Ce,Xe=Hce(n,jce),Ke=SU(SU({},Xe),{},{type:L,size:ve,sizeType:Be}),vt=function(){var nr=Wce(L),jr=Tce().type(nr).size(Yce(ve,Be,L));return jr()},yt=Ke.className,Gt=Ke.cx,$t=Ke.cy,gr=Iu(Ke,!0);return Gt===+Gt&&$t===+$t&&ve===+ve?aa.createElement("path",fz({},gr,{className:Ec("recharts-symbols",yt),transform:"translate(".concat(Gt,", ").concat($t,")"),d:vt()})):null};WP.registerSymbol=Zce;function lT(e){"@babel/helpers - typeof";return lT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lT(e)}function hz(){return hz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},hz.apply(this,arguments)}function EU(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function $ce(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?EU(Object(S),!0).forEach(function(L){nE(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):EU(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Kce(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Jce(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,pY(L.key),L)}}function Qce(e,n,S){return n&&Jce(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function efe(e,n,S){return n=Uk(n),tfe(e,vY()?Reflect.construct(n,S||[],Uk(e).constructor):n.apply(e,S))}function tfe(e,n){if(n&&(lT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rfe(e)}function rfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vY=function(){return!!e})()}function Uk(e){return Uk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},Uk(e)}function nfe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&dz(e,n)}function dz(e,n){return dz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},dz(e,n)}function nE(e,n,S){return n=pY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function pY(e){var n=afe(e,"string");return lT(n)=="symbol"?n:n+""}function afe(e,n){if(lT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(lT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var A0=32,W7=(function(e){function n(){return Kce(this,n),efe(this,n,arguments)}return nfe(n,e),Qce(n,[{key:"renderIcon",value:function(L){var re=this.props.inactiveColor,ve=A0/2,Ce=A0/6,Be=A0/3,Xe=L.inactive?re:L.color;if(L.type==="plainline")return aa.createElement("line",{strokeWidth:4,fill:"none",stroke:Xe,strokeDasharray:L.payload.strokeDasharray,x1:0,y1:ve,x2:A0,y2:ve,className:"recharts-legend-icon"});if(L.type==="line")return aa.createElement("path",{strokeWidth:4,fill:"none",stroke:Xe,d:"M0,".concat(ve,"h").concat(Be,`
            A`).concat(Ce,",").concat(Ce,",0,1,1,").concat(2*Be,",").concat(ve,`
            H`).concat(A0,"M").concat(2*Be,",").concat(ve,`
            A`).concat(Ce,",").concat(Ce,",0,1,1,").concat(Be,",").concat(ve),className:"recharts-legend-icon"});if(L.type==="rect")return aa.createElement("path",{stroke:"none",fill:Xe,d:"M0,".concat(A0/8,"h").concat(A0,"v").concat(A0*3/4,"h").concat(-A0,"z"),className:"recharts-legend-icon"});if(aa.isValidElement(L.legendIcon)){var Ke=$ce({},L);return delete Ke.legendIcon,aa.cloneElement(L.legendIcon,Ke)}return aa.createElement(WP,{fill:Xe,cx:ve,cy:ve,size:A0,sizeType:"diameter",type:L.type})}},{key:"renderItems",value:function(){var L=this,re=this.props,ve=re.payload,Ce=re.iconSize,Be=re.layout,Xe=re.formatter,Ke=re.inactiveColor,vt={x:0,y:0,width:A0,height:A0},yt={display:Be==="horizontal"?"inline-block":"block",marginRight:10},Gt={display:"inline-block",verticalAlign:"middle",marginRight:4};return ve.map(function($t,gr){var sr=$t.formatter||Xe,nr=Ec(nE(nE({"recharts-legend-item":!0},"legend-item-".concat(gr),!0),"inactive",$t.inactive));if($t.type==="none")return null;var jr=Fu($t.value)?null:$t.value;w1(!Fu($t.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var Ne=$t.inactive?Ke:$t.color;return aa.createElement("li",hz({className:nr,style:yt,key:"legend-item-".concat(gr)},tE(L.props,$t,gr)),aa.createElement(iz,{width:Ce,height:Ce,viewBox:vt,style:Gt},L.renderIcon($t)),aa.createElement("span",{className:"recharts-legend-item-text",style:{color:Ne}},sr?sr(jr,$t,gr):jr))})}},{key:"render",value:function(){var L=this.props,re=L.payload,ve=L.layout,Ce=L.align;if(!re||!re.length)return null;var Be={padding:0,margin:0,textAlign:ve==="horizontal"?Ce:"left"};return aa.createElement("ul",{className:"recharts-default-legend",style:Be},this.renderItems())}}])})(Ua.PureComponent);nE(W7,"displayName","Legend");nE(W7,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var aD,MU;function ife(){if(MU)return aD;MU=1;var e=jP();function n(){this.__data__=new e,this.size=0}return aD=n,aD}var iD,CU;function ofe(){if(CU)return iD;CU=1;function e(n){var S=this.__data__,L=S.delete(n);return this.size=S.size,L}return iD=e,iD}var oD,kU;function sfe(){if(kU)return oD;kU=1;function e(n){return this.__data__.get(n)}return oD=e,oD}var sD,PU;function lfe(){if(PU)return sD;PU=1;function e(n){return this.__data__.has(n)}return sD=e,sD}var lD,LU;function ufe(){if(LU)return lD;LU=1;var e=jP(),n=F7(),S=B7(),L=200;function re(ve,Ce){var Be=this.__data__;if(Be instanceof e){var Xe=Be.__data__;if(!n||Xe.length<L-1)return Xe.push([ve,Ce]),this.size=++Be.size,this;Be=this.__data__=new S(Xe)}return Be.set(ve,Ce),this.size=Be.size,this}return lD=re,lD}var uD,RU;function mY(){if(RU)return uD;RU=1;var e=jP(),n=ife(),S=ofe(),L=sfe(),re=lfe(),ve=ufe();function Ce(Be){var Xe=this.__data__=new e(Be);this.size=Xe.size}return Ce.prototype.clear=n,Ce.prototype.delete=S,Ce.prototype.get=L,Ce.prototype.has=re,Ce.prototype.set=ve,uD=Ce,uD}var cD,IU;function cfe(){if(IU)return cD;IU=1;var e="__lodash_hash_undefined__";function n(S){return this.__data__.set(S,e),this}return cD=n,cD}var fD,DU;function ffe(){if(DU)return fD;DU=1;function e(n){return this.__data__.has(n)}return fD=e,fD}var hD,OU;function yY(){if(OU)return hD;OU=1;var e=B7(),n=cfe(),S=ffe();function L(re){var ve=-1,Ce=re==null?0:re.length;for(this.__data__=new e;++ve<Ce;)this.add(re[ve])}return L.prototype.add=L.prototype.push=n,L.prototype.has=S,hD=L,hD}var dD,zU;function gY(){if(zU)return dD;zU=1;function e(n,S){for(var L=-1,re=n==null?0:n.length;++L<re;)if(S(n[L],L,n))return!0;return!1}return dD=e,dD}var vD,NU;function _Y(){if(NU)return vD;NU=1;function e(n,S){return n.has(S)}return vD=e,vD}var pD,FU;function xY(){if(FU)return pD;FU=1;var e=yY(),n=gY(),S=_Y(),L=1,re=2;function ve(Ce,Be,Xe,Ke,vt,yt){var Gt=Xe&L,$t=Ce.length,gr=Be.length;if($t!=gr&&!(Gt&&gr>$t))return!1;var sr=yt.get(Ce),nr=yt.get(Be);if(sr&&nr)return sr==Be&&nr==Ce;var jr=-1,Ne=!0,an=Xe&re?new e:void 0;for(yt.set(Ce,Be),yt.set(Be,Ce);++jr<$t;){var yn=Ce[jr],Lr=Be[jr];if(Ke)var $r=Gt?Ke(Lr,yn,jr,Be,Ce,yt):Ke(yn,Lr,jr,Ce,Be,yt);if($r!==void 0){if($r)continue;Ne=!1;break}if(an){if(!n(Be,function(dn,Jn){if(!S(an,Jn)&&(yn===dn||vt(yn,dn,Xe,Ke,yt)))return an.push(Jn)})){Ne=!1;break}}else if(!(yn===Lr||vt(yn,Lr,Xe,Ke,yt))){Ne=!1;break}}return yt.delete(Ce),yt.delete(Be),Ne}return pD=ve,pD}var mD,BU;function hfe(){if(BU)return mD;BU=1;var e=_g(),n=e.Uint8Array;return mD=n,mD}var yD,jU;function dfe(){if(jU)return yD;jU=1;function e(n){var S=-1,L=Array(n.size);return n.forEach(function(re,ve){L[++S]=[ve,re]}),L}return yD=e,yD}var gD,UU;function Y7(){if(UU)return gD;UU=1;function e(n){var S=-1,L=Array(n.size);return n.forEach(function(re){L[++S]=re}),L}return gD=e,gD}var _D,qU;function vfe(){if(qU)return _D;qU=1;var e=UE(),n=hfe(),S=N7(),L=xY(),re=dfe(),ve=Y7(),Ce=1,Be=2,Xe="[object Boolean]",Ke="[object Date]",vt="[object Error]",yt="[object Map]",Gt="[object Number]",$t="[object RegExp]",gr="[object Set]",sr="[object String]",nr="[object Symbol]",jr="[object ArrayBuffer]",Ne="[object DataView]",an=e?e.prototype:void 0,yn=an?an.valueOf:void 0;function Lr($r,dn,Jn,xn,Na,zn,ta){switch(Jn){case Ne:if($r.byteLength!=dn.byteLength||$r.byteOffset!=dn.byteOffset)return!1;$r=$r.buffer,dn=dn.buffer;case jr:return!($r.byteLength!=dn.byteLength||!zn(new n($r),new n(dn)));case Xe:case Ke:case Gt:return S(+$r,+dn);case vt:return $r.name==dn.name&&$r.message==dn.message;case $t:case sr:return $r==dn+"";case yt:var qa=re;case gr:var la=xn&Ce;if(qa||(qa=ve),$r.size!=dn.size&&!la)return!1;var ja=ta.get($r);if(ja)return ja==dn;xn|=Be,ta.set($r,dn);var pa=L(qa($r),qa(dn),xn,Na,zn,ta);return ta.delete($r),pa;case nr:if(yn)return yn.call($r)==yn.call(dn)}return!1}return _D=Lr,_D}var xD,VU;function bY(){if(VU)return xD;VU=1;function e(n,S){for(var L=-1,re=S.length,ve=n.length;++L<re;)n[ve+L]=S[L];return n}return xD=e,xD}var bD,HU;function pfe(){if(HU)return bD;HU=1;var e=bY(),n=Tm();function S(L,re,ve){var Ce=re(L);return n(L)?Ce:e(Ce,ve(L))}return bD=S,bD}var wD,GU;function mfe(){if(GU)return wD;GU=1;function e(n,S){for(var L=-1,re=n==null?0:n.length,ve=0,Ce=[];++L<re;){var Be=n[L];S(Be,L,n)&&(Ce[ve++]=Be)}return Ce}return wD=e,wD}var TD,XU;function yfe(){if(XU)return TD;XU=1;function e(){return[]}return TD=e,TD}var AD,WU;function gfe(){if(WU)return AD;WU=1;var e=mfe(),n=yfe(),S=Object.prototype,L=S.propertyIsEnumerable,re=Object.getOwnPropertySymbols,ve=re?function(Ce){return Ce==null?[]:(Ce=Object(Ce),e(re(Ce),function(Be){return L.call(Ce,Be)}))}:n;return AD=ve,AD}var SD,YU;function _fe(){if(YU)return SD;YU=1;function e(n,S){for(var L=-1,re=Array(n);++L<n;)re[L]=S(L);return re}return SD=e,SD}var ED,ZU;function xfe(){if(ZU)return ED;ZU=1;var e=M1(),n=C1(),S="[object Arguments]";function L(re){return n(re)&&e(re)==S}return ED=L,ED}var MD,$U;function Z7(){if($U)return MD;$U=1;var e=xfe(),n=C1(),S=Object.prototype,L=S.hasOwnProperty,re=S.propertyIsEnumerable,ve=e((function(){return arguments})())?e:function(Ce){return n(Ce)&&L.call(Ce,"callee")&&!re.call(Ce,"callee")};return MD=ve,MD}var H5={exports:{}},CD,KU;function bfe(){if(KU)return CD;KU=1;function e(){return!1}return CD=e,CD}H5.exports;var JU;function wY(){return JU||(JU=1,(function(e,n){var S=_g(),L=bfe(),re=n&&!n.nodeType&&n,ve=re&&!0&&e&&!e.nodeType&&e,Ce=ve&&ve.exports===re,Be=Ce?S.Buffer:void 0,Xe=Be?Be.isBuffer:void 0,Ke=Xe||L;e.exports=Ke})(H5,H5.exports)),H5.exports}var kD,QU;function $7(){if(QU)return kD;QU=1;var e=9007199254740991,n=/^(?:0|[1-9]\d*)$/;function S(L,re){var ve=typeof L;return re=re??e,!!re&&(ve=="number"||ve!="symbol"&&n.test(L))&&L>-1&&L%1==0&&L<re}return kD=S,kD}var PD,eq;function K7(){if(eq)return PD;eq=1;var e=9007199254740991;function n(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=e}return PD=n,PD}var LD,tq;function wfe(){if(tq)return LD;tq=1;var e=M1(),n=K7(),S=C1(),L="[object Arguments]",re="[object Array]",ve="[object Boolean]",Ce="[object Date]",Be="[object Error]",Xe="[object Function]",Ke="[object Map]",vt="[object Number]",yt="[object Object]",Gt="[object RegExp]",$t="[object Set]",gr="[object String]",sr="[object WeakMap]",nr="[object ArrayBuffer]",jr="[object DataView]",Ne="[object Float32Array]",an="[object Float64Array]",yn="[object Int8Array]",Lr="[object Int16Array]",$r="[object Int32Array]",dn="[object Uint8Array]",Jn="[object Uint8ClampedArray]",xn="[object Uint16Array]",Na="[object Uint32Array]",zn={};zn[Ne]=zn[an]=zn[yn]=zn[Lr]=zn[$r]=zn[dn]=zn[Jn]=zn[xn]=zn[Na]=!0,zn[L]=zn[re]=zn[nr]=zn[ve]=zn[jr]=zn[Ce]=zn[Be]=zn[Xe]=zn[Ke]=zn[vt]=zn[yt]=zn[Gt]=zn[$t]=zn[gr]=zn[sr]=!1;function ta(qa){return S(qa)&&n(qa.length)&&!!zn[e(qa)]}return LD=ta,LD}var RD,rq;function TY(){if(rq)return RD;rq=1;function e(n){return function(S){return n(S)}}return RD=e,RD}var G5={exports:{}};G5.exports;var nq;function Tfe(){return nq||(nq=1,(function(e,n){var S=qW(),L=n&&!n.nodeType&&n,re=L&&!0&&e&&!e.nodeType&&e,ve=re&&re.exports===L,Ce=ve&&S.process,Be=(function(){try{var Xe=re&&re.require&&re.require("util").types;return Xe||Ce&&Ce.binding&&Ce.binding("util")}catch{}})();e.exports=Be})(G5,G5.exports)),G5.exports}var ID,aq;function AY(){if(aq)return ID;aq=1;var e=wfe(),n=TY(),S=Tfe(),L=S&&S.isTypedArray,re=L?n(L):e;return ID=re,ID}var DD,iq;function Afe(){if(iq)return DD;iq=1;var e=_fe(),n=Z7(),S=Tm(),L=wY(),re=$7(),ve=AY(),Ce=Object.prototype,Be=Ce.hasOwnProperty;function Xe(Ke,vt){var yt=S(Ke),Gt=!yt&&n(Ke),$t=!yt&&!Gt&&L(Ke),gr=!yt&&!Gt&&!$t&&ve(Ke),sr=yt||Gt||$t||gr,nr=sr?e(Ke.length,String):[],jr=nr.length;for(var Ne in Ke)(vt||Be.call(Ke,Ne))&&!(sr&&(Ne=="length"||$t&&(Ne=="offset"||Ne=="parent")||gr&&(Ne=="buffer"||Ne=="byteLength"||Ne=="byteOffset")||re(Ne,jr)))&&nr.push(Ne);return nr}return DD=Xe,DD}var OD,oq;function Sfe(){if(oq)return OD;oq=1;var e=Object.prototype;function n(S){var L=S&&S.constructor,re=typeof L=="function"&&L.prototype||e;return S===re}return OD=n,OD}var zD,sq;function SY(){if(sq)return zD;sq=1;function e(n,S){return function(L){return n(S(L))}}return zD=e,zD}var ND,lq;function Efe(){if(lq)return ND;lq=1;var e=SY(),n=e(Object.keys,Object);return ND=n,ND}var FD,uq;function Mfe(){if(uq)return FD;uq=1;var e=Sfe(),n=Efe(),S=Object.prototype,L=S.hasOwnProperty;function re(ve){if(!e(ve))return n(ve);var Ce=[];for(var Be in Object(ve))L.call(ve,Be)&&Be!="constructor"&&Ce.push(Be);return Ce}return FD=re,FD}var BD,cq;function qE(){if(cq)return BD;cq=1;var e=z7(),n=K7();function S(L){return L!=null&&n(L.length)&&!e(L)}return BD=S,BD}var jD,fq;function YP(){if(fq)return jD;fq=1;var e=Afe(),n=Mfe(),S=qE();function L(re){return S(re)?e(re):n(re)}return jD=L,jD}var UD,hq;function Cfe(){if(hq)return UD;hq=1;var e=pfe(),n=gfe(),S=YP();function L(re){return e(re,S,n)}return UD=L,UD}var qD,dq;function kfe(){if(dq)return qD;dq=1;var e=Cfe(),n=1,S=Object.prototype,L=S.hasOwnProperty;function re(ve,Ce,Be,Xe,Ke,vt){var yt=Be&n,Gt=e(ve),$t=Gt.length,gr=e(Ce),sr=gr.length;if($t!=sr&&!yt)return!1;for(var nr=$t;nr--;){var jr=Gt[nr];if(!(yt?jr in Ce:L.call(Ce,jr)))return!1}var Ne=vt.get(ve),an=vt.get(Ce);if(Ne&&an)return Ne==Ce&&an==ve;var yn=!0;vt.set(ve,Ce),vt.set(Ce,ve);for(var Lr=yt;++nr<$t;){jr=Gt[nr];var $r=ve[jr],dn=Ce[jr];if(Xe)var Jn=yt?Xe(dn,$r,jr,Ce,ve,vt):Xe($r,dn,jr,ve,Ce,vt);if(!(Jn===void 0?$r===dn||Ke($r,dn,Be,Xe,vt):Jn)){yn=!1;break}Lr||(Lr=jr=="constructor")}if(yn&&!Lr){var xn=ve.constructor,Na=Ce.constructor;xn!=Na&&"constructor"in ve&&"constructor"in Ce&&!(typeof xn=="function"&&xn instanceof xn&&typeof Na=="function"&&Na instanceof Na)&&(yn=!1)}return vt.delete(ve),vt.delete(Ce),yn}return qD=re,qD}var VD,vq;function Pfe(){if(vq)return VD;vq=1;var e=xw(),n=_g(),S=e(n,"DataView");return VD=S,VD}var HD,pq;function Lfe(){if(pq)return HD;pq=1;var e=xw(),n=_g(),S=e(n,"Promise");return HD=S,HD}var GD,mq;function EY(){if(mq)return GD;mq=1;var e=xw(),n=_g(),S=e(n,"Set");return GD=S,GD}var XD,yq;function Rfe(){if(yq)return XD;yq=1;var e=xw(),n=_g(),S=e(n,"WeakMap");return XD=S,XD}var WD,gq;function Ife(){if(gq)return WD;gq=1;var e=Pfe(),n=F7(),S=Lfe(),L=EY(),re=Rfe(),ve=M1(),Ce=VW(),Be="[object Map]",Xe="[object Object]",Ke="[object Promise]",vt="[object Set]",yt="[object WeakMap]",Gt="[object DataView]",$t=Ce(e),gr=Ce(n),sr=Ce(S),nr=Ce(L),jr=Ce(re),Ne=ve;return(e&&Ne(new e(new ArrayBuffer(1)))!=Gt||n&&Ne(new n)!=Be||S&&Ne(S.resolve())!=Ke||L&&Ne(new L)!=vt||re&&Ne(new re)!=yt)&&(Ne=function(an){var yn=ve(an),Lr=yn==Xe?an.constructor:void 0,$r=Lr?Ce(Lr):"";if($r)switch($r){case $t:return Gt;case gr:return Be;case sr:return Ke;case nr:return vt;case jr:return yt}return yn}),WD=Ne,WD}var YD,_q;function Dfe(){if(_q)return YD;_q=1;var e=mY(),n=xY(),S=vfe(),L=kfe(),re=Ife(),ve=Tm(),Ce=wY(),Be=AY(),Xe=1,Ke="[object Arguments]",vt="[object Array]",yt="[object Object]",Gt=Object.prototype,$t=Gt.hasOwnProperty;function gr(sr,nr,jr,Ne,an,yn){var Lr=ve(sr),$r=ve(nr),dn=Lr?vt:re(sr),Jn=$r?vt:re(nr);dn=dn==Ke?yt:dn,Jn=Jn==Ke?yt:Jn;var xn=dn==yt,Na=Jn==yt,zn=dn==Jn;if(zn&&Ce(sr)){if(!Ce(nr))return!1;Lr=!0,xn=!1}if(zn&&!xn)return yn||(yn=new e),Lr||Be(sr)?n(sr,nr,jr,Ne,an,yn):S(sr,nr,dn,jr,Ne,an,yn);if(!(jr&Xe)){var ta=xn&&$t.call(sr,"__wrapped__"),qa=Na&&$t.call(nr,"__wrapped__");if(ta||qa){var la=ta?sr.value():sr,ja=qa?nr.value():nr;return yn||(yn=new e),an(la,ja,jr,Ne,yn)}}return zn?(yn||(yn=new e),L(sr,nr,jr,Ne,an,yn)):!1}return YD=gr,YD}var ZD,xq;function J7(){if(xq)return ZD;xq=1;var e=Dfe(),n=C1();function S(L,re,ve,Ce,Be){return L===re?!0:L==null||re==null||!n(L)&&!n(re)?L!==L&&re!==re:e(L,re,ve,Ce,S,Be)}return ZD=S,ZD}var $D,bq;function Ofe(){if(bq)return $D;bq=1;var e=mY(),n=J7(),S=1,L=2;function re(ve,Ce,Be,Xe){var Ke=Be.length,vt=Ke,yt=!Xe;if(ve==null)return!vt;for(ve=Object(ve);Ke--;){var Gt=Be[Ke];if(yt&&Gt[2]?Gt[1]!==ve[Gt[0]]:!(Gt[0]in ve))return!1}for(;++Ke<vt;){Gt=Be[Ke];var $t=Gt[0],gr=ve[$t],sr=Gt[1];if(yt&&Gt[2]){if(gr===void 0&&!($t in ve))return!1}else{var nr=new e;if(Xe)var jr=Xe(gr,sr,$t,ve,Ce,nr);if(!(jr===void 0?n(sr,gr,S|L,Xe,nr):jr))return!1}}return!0}return $D=re,$D}var KD,wq;function MY(){if(wq)return KD;wq=1;var e=cx();function n(S){return S===S&&!e(S)}return KD=n,KD}var JD,Tq;function zfe(){if(Tq)return JD;Tq=1;var e=MY(),n=YP();function S(L){for(var re=n(L),ve=re.length;ve--;){var Ce=re[ve],Be=L[Ce];re[ve]=[Ce,Be,e(Be)]}return re}return JD=S,JD}var QD,Aq;function CY(){if(Aq)return QD;Aq=1;function e(n,S){return function(L){return L==null?!1:L[n]===S&&(S!==void 0||n in Object(L))}}return QD=e,QD}var e4,Sq;function Nfe(){if(Sq)return e4;Sq=1;var e=Ofe(),n=zfe(),S=CY();function L(re){var ve=n(re);return ve.length==1&&ve[0][2]?S(ve[0][0],ve[0][1]):function(Ce){return Ce===re||e(Ce,re,ve)}}return e4=L,e4}var t4,Eq;function Ffe(){if(Eq)return t4;Eq=1;function e(n,S){return n!=null&&S in Object(n)}return t4=e,t4}var r4,Mq;function Bfe(){if(Mq)return r4;Mq=1;var e=XW(),n=Z7(),S=Tm(),L=$7(),re=K7(),ve=qP();function Ce(Be,Xe,Ke){Xe=e(Xe,Be);for(var vt=-1,yt=Xe.length,Gt=!1;++vt<yt;){var $t=ve(Xe[vt]);if(!(Gt=Be!=null&&Ke(Be,$t)))break;Be=Be[$t]}return Gt||++vt!=yt?Gt:(yt=Be==null?0:Be.length,!!yt&&re(yt)&&L($t,yt)&&(S(Be)||n(Be)))}return r4=Ce,r4}var n4,Cq;function jfe(){if(Cq)return n4;Cq=1;var e=Ffe(),n=Bfe();function S(L,re){return L!=null&&n(L,re,e)}return n4=S,n4}var a4,kq;function Ufe(){if(kq)return a4;kq=1;var e=J7(),n=WW(),S=jfe(),L=O7(),re=MY(),ve=CY(),Ce=qP(),Be=1,Xe=2;function Ke(vt,yt){return L(vt)&&re(yt)?ve(Ce(vt),yt):function(Gt){var $t=n(Gt,vt);return $t===void 0&&$t===yt?S(Gt,vt):e(yt,$t,Be|Xe)}}return a4=Ke,a4}var i4,Pq;function jT(){if(Pq)return i4;Pq=1;function e(n){return n}return i4=e,i4}var o4,Lq;function qfe(){if(Lq)return o4;Lq=1;function e(n){return function(S){return S?.[n]}}return o4=e,o4}var s4,Rq;function Vfe(){if(Rq)return s4;Rq=1;var e=U7();function n(S){return function(L){return e(L,S)}}return s4=n,s4}var l4,Iq;function Hfe(){if(Iq)return l4;Iq=1;var e=qfe(),n=Vfe(),S=O7(),L=qP();function re(ve){return S(ve)?e(L(ve)):n(ve)}return l4=re,l4}var u4,Dq;function fx(){if(Dq)return u4;Dq=1;var e=Nfe(),n=Ufe(),S=jT(),L=Tm(),re=Hfe();function ve(Ce){return typeof Ce=="function"?Ce:Ce==null?S:typeof Ce=="object"?L(Ce)?n(Ce[0],Ce[1]):e(Ce):re(Ce)}return u4=ve,u4}var c4,Oq;function kY(){if(Oq)return c4;Oq=1;function e(n,S,L,re){for(var ve=n.length,Ce=L+(re?1:-1);re?Ce--:++Ce<ve;)if(S(n[Ce],Ce,n))return Ce;return-1}return c4=e,c4}var f4,zq;function Gfe(){if(zq)return f4;zq=1;function e(n){return n!==n}return f4=e,f4}var h4,Nq;function Xfe(){if(Nq)return h4;Nq=1;function e(n,S,L){for(var re=L-1,ve=n.length;++re<ve;)if(n[re]===S)return re;return-1}return h4=e,h4}var d4,Fq;function Wfe(){if(Fq)return d4;Fq=1;var e=kY(),n=Gfe(),S=Xfe();function L(re,ve,Ce){return ve===ve?S(re,ve,Ce):e(re,n,Ce)}return d4=L,d4}var v4,Bq;function Yfe(){if(Bq)return v4;Bq=1;var e=Wfe();function n(S,L){var re=S==null?0:S.length;return!!re&&e(S,L,0)>-1}return v4=n,v4}var p4,jq;function Zfe(){if(jq)return p4;jq=1;function e(n,S,L){for(var re=-1,ve=n==null?0:n.length;++re<ve;)if(L(S,n[re]))return!0;return!1}return p4=e,p4}var m4,Uq;function $fe(){if(Uq)return m4;Uq=1;function e(){}return m4=e,m4}var y4,qq;function Kfe(){if(qq)return y4;qq=1;var e=EY(),n=$fe(),S=Y7(),L=1/0,re=e&&1/S(new e([,-0]))[1]==L?function(ve){return new e(ve)}:n;return y4=re,y4}var g4,Vq;function Jfe(){if(Vq)return g4;Vq=1;var e=yY(),n=Yfe(),S=Zfe(),L=_Y(),re=Kfe(),ve=Y7(),Ce=200;function Be(Xe,Ke,vt){var yt=-1,Gt=n,$t=Xe.length,gr=!0,sr=[],nr=sr;if(vt)gr=!1,Gt=S;else if($t>=Ce){var jr=Ke?null:re(Xe);if(jr)return ve(jr);gr=!1,Gt=L,nr=new e}else nr=Ke?[]:sr;e:for(;++yt<$t;){var Ne=Xe[yt],an=Ke?Ke(Ne):Ne;if(Ne=vt||Ne!==0?Ne:0,gr&&an===an){for(var yn=nr.length;yn--;)if(nr[yn]===an)continue e;Ke&&nr.push(an),sr.push(Ne)}else Gt(nr,an,vt)||(nr!==sr&&nr.push(an),sr.push(Ne))}return sr}return g4=Be,g4}var _4,Hq;function Qfe(){if(Hq)return _4;Hq=1;var e=fx(),n=Jfe();function S(L,re){return L&&L.length?n(L,e(re,2)):[]}return _4=S,_4}var ehe=Qfe();const Gq=rh(ehe);function PY(e,n,S){return n===!0?Gq(e,S):Fu(n)?Gq(e,n):e}function uT(e){"@babel/helpers - typeof";return uT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},uT(e)}var the=["ref"];function Xq(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function y1(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?Xq(Object(S),!0).forEach(function(L){ZP(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):Xq(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function rhe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Wq(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,RY(L.key),L)}}function nhe(e,n,S){return n&&Wq(e.prototype,n),S&&Wq(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function ahe(e,n,S){return n=qk(n),ihe(e,LY()?Reflect.construct(n,S||[],qk(e).constructor):n.apply(e,S))}function ihe(e,n){if(n&&(uT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ohe(e)}function ohe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(LY=function(){return!!e})()}function qk(e){return qk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},qk(e)}function she(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&vz(e,n)}function vz(e,n){return vz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},vz(e,n)}function ZP(e,n,S){return n=RY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function RY(e){var n=lhe(e,"string");return uT(n)=="symbol"?n:n+""}function lhe(e,n){if(uT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(uT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function uhe(e,n){if(e==null)return{};var S=che(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function che(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function fhe(e){return e.value}function hhe(e,n){if(aa.isValidElement(e))return aa.cloneElement(e,n);if(typeof e=="function")return aa.createElement(e,n);n.ref;var S=uhe(n,the);return aa.createElement(W7,S)}var Yq=1,dg=(function(e){function n(){var S;rhe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=ahe(this,n,[].concat(re)),ZP(S,"lastBoundingBox",{width:-1,height:-1}),S}return she(n,e),nhe(n,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var L=this.wrapperNode.getBoundingClientRect();return L.height=this.wrapperNode.offsetHeight,L.width=this.wrapperNode.offsetWidth,L}return null}},{key:"updateBBox",value:function(){var L=this.props.onBBoxUpdate,re=this.getBBox();re?(Math.abs(re.width-this.lastBoundingBox.width)>Yq||Math.abs(re.height-this.lastBoundingBox.height)>Yq)&&(this.lastBoundingBox.width=re.width,this.lastBoundingBox.height=re.height,L&&L(re)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,L&&L(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?y1({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(L){var re=this.props,ve=re.layout,Ce=re.align,Be=re.verticalAlign,Xe=re.margin,Ke=re.chartWidth,vt=re.chartHeight,yt,Gt;if(!L||(L.left===void 0||L.left===null)&&(L.right===void 0||L.right===null))if(Ce==="center"&&ve==="vertical"){var $t=this.getBBoxSnapshot();yt={left:((Ke||0)-$t.width)/2}}else yt=Ce==="right"?{right:Xe&&Xe.right||0}:{left:Xe&&Xe.left||0};if(!L||(L.top===void 0||L.top===null)&&(L.bottom===void 0||L.bottom===null))if(Be==="middle"){var gr=this.getBBoxSnapshot();Gt={top:((vt||0)-gr.height)/2}}else Gt=Be==="bottom"?{bottom:Xe&&Xe.bottom||0}:{top:Xe&&Xe.top||0};return y1(y1({},yt),Gt)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.content,Ce=re.width,Be=re.height,Xe=re.wrapperStyle,Ke=re.payloadUniqBy,vt=re.payload,yt=y1(y1({position:"absolute",width:Ce||"auto",height:Be||"auto"},this.getDefaultPosition(Xe)),Xe);return aa.createElement("div",{className:"recharts-legend-wrapper",style:yt,ref:function($t){L.wrapperNode=$t}},hhe(ve,y1(y1({},this.props),{},{payload:PY(vt,Ke,fhe)})))}}],[{key:"getWithHeight",value:function(L,re){var ve=y1(y1({},this.defaultProps),L.props),Ce=ve.layout;return Ce==="vertical"&&gs(L.props.height)?{height:L.props.height}:Ce==="horizontal"?{width:L.props.width||re}:null}}])})(Ua.PureComponent);ZP(dg,"displayName","Legend");ZP(dg,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var x4,Zq;function dhe(){if(Zq)return x4;Zq=1;var e=UE(),n=Z7(),S=Tm(),L=e?e.isConcatSpreadable:void 0;function re(ve){return S(ve)||n(ve)||!!(L&&ve&&ve[L])}return x4=re,x4}var b4,$q;function IY(){if($q)return b4;$q=1;var e=bY(),n=dhe();function S(L,re,ve,Ce,Be){var Xe=-1,Ke=L.length;for(ve||(ve=n),Be||(Be=[]);++Xe<Ke;){var vt=L[Xe];re>0&&ve(vt)?re>1?S(vt,re-1,ve,Ce,Be):e(Be,vt):Ce||(Be[Be.length]=vt)}return Be}return b4=S,b4}var w4,Kq;function vhe(){if(Kq)return w4;Kq=1;function e(n){return function(S,L,re){for(var ve=-1,Ce=Object(S),Be=re(S),Xe=Be.length;Xe--;){var Ke=Be[n?Xe:++ve];if(L(Ce[Ke],Ke,Ce)===!1)break}return S}}return w4=e,w4}var T4,Jq;function phe(){if(Jq)return T4;Jq=1;var e=vhe(),n=e();return T4=n,T4}var A4,Qq;function DY(){if(Qq)return A4;Qq=1;var e=phe(),n=YP();function S(L,re){return L&&e(L,re,n)}return A4=S,A4}var S4,eV;function mhe(){if(eV)return S4;eV=1;var e=qE();function n(S,L){return function(re,ve){if(re==null)return re;if(!e(re))return S(re,ve);for(var Ce=re.length,Be=L?Ce:-1,Xe=Object(re);(L?Be--:++Be<Ce)&&ve(Xe[Be],Be,Xe)!==!1;);return re}}return S4=n,S4}var E4,tV;function Q7(){if(tV)return E4;tV=1;var e=DY(),n=mhe(),S=n(e);return E4=S,E4}var M4,rV;function OY(){if(rV)return M4;rV=1;var e=Q7(),n=qE();function S(L,re){var ve=-1,Ce=n(L)?Array(L.length):[];return e(L,function(Be,Xe,Ke){Ce[++ve]=re(Be,Xe,Ke)}),Ce}return M4=S,M4}var C4,nV;function yhe(){if(nV)return C4;nV=1;function e(n,S){var L=n.length;for(n.sort(S);L--;)n[L]=n[L].value;return n}return C4=e,C4}var k4,aV;function ghe(){if(aV)return k4;aV=1;var e=NT();function n(S,L){if(S!==L){var re=S!==void 0,ve=S===null,Ce=S===S,Be=e(S),Xe=L!==void 0,Ke=L===null,vt=L===L,yt=e(L);if(!Ke&&!yt&&!Be&&S>L||Be&&Xe&&vt&&!Ke&&!yt||ve&&Xe&&vt||!re&&vt||!Ce)return 1;if(!ve&&!Be&&!yt&&S<L||yt&&re&&Ce&&!ve&&!Be||Ke&&re&&Ce||!Xe&&Ce||!vt)return-1}return 0}return k4=n,k4}var P4,iV;function _he(){if(iV)return P4;iV=1;var e=ghe();function n(S,L,re){for(var ve=-1,Ce=S.criteria,Be=L.criteria,Xe=Ce.length,Ke=re.length;++ve<Xe;){var vt=e(Ce[ve],Be[ve]);if(vt){if(ve>=Ke)return vt;var yt=re[ve];return vt*(yt=="desc"?-1:1)}}return S.index-L.index}return P4=n,P4}var L4,oV;function xhe(){if(oV)return L4;oV=1;var e=j7(),n=U7(),S=fx(),L=OY(),re=yhe(),ve=TY(),Ce=_he(),Be=jT(),Xe=Tm();function Ke(vt,yt,Gt){yt.length?yt=e(yt,function(sr){return Xe(sr)?function(nr){return n(nr,sr.length===1?sr[0]:sr)}:sr}):yt=[Be];var $t=-1;yt=e(yt,ve(S));var gr=L(vt,function(sr,nr,jr){var Ne=e(yt,function(an){return an(sr)});return{criteria:Ne,index:++$t,value:sr}});return re(gr,function(sr,nr){return Ce(sr,nr,Gt)})}return L4=Ke,L4}var R4,sV;function bhe(){if(sV)return R4;sV=1;function e(n,S,L){switch(L.length){case 0:return n.call(S);case 1:return n.call(S,L[0]);case 2:return n.call(S,L[0],L[1]);case 3:return n.call(S,L[0],L[1],L[2])}return n.apply(S,L)}return R4=e,R4}var I4,lV;function whe(){if(lV)return I4;lV=1;var e=bhe(),n=Math.max;function S(L,re,ve){return re=n(re===void 0?L.length-1:re,0),function(){for(var Ce=arguments,Be=-1,Xe=n(Ce.length-re,0),Ke=Array(Xe);++Be<Xe;)Ke[Be]=Ce[re+Be];Be=-1;for(var vt=Array(re+1);++Be<re;)vt[Be]=Ce[Be];return vt[re]=ve(Ke),e(L,this,vt)}}return I4=S,I4}var D4,uV;function The(){if(uV)return D4;uV=1;function e(n){return function(){return n}}return D4=e,D4}var O4,cV;function zY(){if(cV)return O4;cV=1;var e=xw(),n=(function(){try{var S=e(Object,"defineProperty");return S({},"",{}),S}catch{}})();return O4=n,O4}var z4,fV;function Ahe(){if(fV)return z4;fV=1;var e=The(),n=zY(),S=jT(),L=n?function(re,ve){return n(re,"toString",{configurable:!0,enumerable:!1,value:e(ve),writable:!0})}:S;return z4=L,z4}var N4,hV;function She(){if(hV)return N4;hV=1;var e=800,n=16,S=Date.now;function L(re){var ve=0,Ce=0;return function(){var Be=S(),Xe=n-(Be-Ce);if(Ce=Be,Xe>0){if(++ve>=e)return arguments[0]}else ve=0;return re.apply(void 0,arguments)}}return N4=L,N4}var F4,dV;function Ehe(){if(dV)return F4;dV=1;var e=Ahe(),n=She(),S=n(e);return F4=S,F4}var B4,vV;function Mhe(){if(vV)return B4;vV=1;var e=jT(),n=whe(),S=Ehe();function L(re,ve){return S(n(re,ve,e),re+"")}return B4=L,B4}var j4,pV;function $P(){if(pV)return j4;pV=1;var e=N7(),n=qE(),S=$7(),L=cx();function re(ve,Ce,Be){if(!L(Be))return!1;var Xe=typeof Ce;return(Xe=="number"?n(Be)&&S(Ce,Be.length):Xe=="string"&&Ce in Be)?e(Be[Ce],ve):!1}return j4=re,j4}var U4,mV;function Che(){if(mV)return U4;mV=1;var e=IY(),n=xhe(),S=Mhe(),L=$P(),re=S(function(ve,Ce){if(ve==null)return[];var Be=Ce.length;return Be>1&&L(ve,Ce[0],Ce[1])?Ce=[]:Be>2&&L(Ce[0],Ce[1],Ce[2])&&(Ce=[Ce[0]]),n(ve,e(Ce,1),[])});return U4=re,U4}var khe=Che();const e9=rh(khe);function aE(e){"@babel/helpers - typeof";return aE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},aE(e)}function pz(){return pz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},pz.apply(this,arguments)}function Phe(e,n){return Dhe(e)||Ihe(e,n)||Rhe(e,n)||Lhe()}function Lhe(){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 Rhe(e,n){if(e){if(typeof e=="string")return yV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return yV(e,n)}}function yV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Ihe(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function Dhe(e){if(Array.isArray(e))return e}function gV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function q4(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?gV(Object(S),!0).forEach(function(L){Ohe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):gV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Ohe(e,n,S){return n=zhe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function zhe(e){var n=Nhe(e,"string");return aE(n)=="symbol"?n:n+""}function Nhe(e,n){if(aE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(aE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Fhe(e){return Array.isArray(e)&&Iv(e[0])&&Iv(e[1])?e.join(" ~ "):e}var Bhe=function(n){var S=n.separator,L=S===void 0?" : ":S,re=n.contentStyle,ve=re===void 0?{}:re,Ce=n.itemStyle,Be=Ce===void 0?{}:Ce,Xe=n.labelStyle,Ke=Xe===void 0?{}:Xe,vt=n.payload,yt=n.formatter,Gt=n.itemSorter,$t=n.wrapperClassName,gr=n.labelClassName,sr=n.label,nr=n.labelFormatter,jr=n.accessibilityLayer,Ne=jr===void 0?!1:jr,an=function(){if(vt&&vt.length){var ta={padding:0,margin:0},qa=(Gt?e9(vt,Gt):vt).map(function(la,ja){if(la.type==="none")return null;var pa=q4({display:"block",paddingTop:4,paddingBottom:4,color:la.color||"#000"},Be),Ra=la.formatter||yt||Fhe,vi=la.value,Pi=la.name,Eo=vi,ma=Pi;if(Ra&&Eo!=null&&ma!=null){var _a=Ra(vi,Pi,la,ja,vt);if(Array.isArray(_a)){var Li=Phe(_a,2);Eo=Li[0],ma=Li[1]}else Eo=_a}return aa.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(ja),style:pa},Iv(ma)?aa.createElement("span",{className:"recharts-tooltip-item-name"},ma):null,Iv(ma)?aa.createElement("span",{className:"recharts-tooltip-item-separator"},L):null,aa.createElement("span",{className:"recharts-tooltip-item-value"},Eo),aa.createElement("span",{className:"recharts-tooltip-item-unit"},la.unit||""))});return aa.createElement("ul",{className:"recharts-tooltip-item-list",style:ta},qa)}return null},yn=q4({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},ve),Lr=q4({margin:0},Ke),$r=!Mu(sr),dn=$r?sr:"",Jn=Ec("recharts-default-tooltip",$t),xn=Ec("recharts-tooltip-label",gr);$r&&nr&&vt!==void 0&&vt!==null&&(dn=nr(sr,vt));var Na=Ne?{role:"status","aria-live":"assertive"}:{};return aa.createElement("div",pz({className:Jn,style:yn},Na),aa.createElement("p",{className:xn,style:Lr},aa.isValidElement(dn)?dn:"".concat(dn)),an())};function iE(e){"@babel/helpers - typeof";return iE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},iE(e)}function pk(e,n,S){return n=jhe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function jhe(e){var n=Uhe(e,"string");return iE(n)=="symbol"?n:n+""}function Uhe(e,n){if(iE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(iE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var O5="recharts-tooltip-wrapper",qhe={visibility:"hidden"};function Vhe(e){var n=e.coordinate,S=e.translateX,L=e.translateY;return Ec(O5,pk(pk(pk(pk({},"".concat(O5,"-right"),gs(S)&&n&&gs(n.x)&&S>=n.x),"".concat(O5,"-left"),gs(S)&&n&&gs(n.x)&&S<n.x),"".concat(O5,"-bottom"),gs(L)&&n&&gs(n.y)&&L>=n.y),"".concat(O5,"-top"),gs(L)&&n&&gs(n.y)&&L<n.y))}function _V(e){var n=e.allowEscapeViewBox,S=e.coordinate,L=e.key,re=e.offsetTopLeft,ve=e.position,Ce=e.reverseDirection,Be=e.tooltipDimension,Xe=e.viewBox,Ke=e.viewBoxDimension;if(ve&&gs(ve[L]))return ve[L];var vt=S[L]-Be-re,yt=S[L]+re;if(n[L])return Ce[L]?vt:yt;if(Ce[L]){var Gt=vt,$t=Xe[L];return Gt<$t?Math.max(yt,Xe[L]):Math.max(vt,Xe[L])}var gr=yt+Be,sr=Xe[L]+Ke;return gr>sr?Math.max(vt,Xe[L]):Math.max(yt,Xe[L])}function Hhe(e){var n=e.translateX,S=e.translateY,L=e.useTranslate3d;return{transform:L?"translate3d(".concat(n,"px, ").concat(S,"px, 0)"):"translate(".concat(n,"px, ").concat(S,"px)")}}function Ghe(e){var n=e.allowEscapeViewBox,S=e.coordinate,L=e.offsetTopLeft,re=e.position,ve=e.reverseDirection,Ce=e.tooltipBox,Be=e.useTranslate3d,Xe=e.viewBox,Ke,vt,yt;return Ce.height>0&&Ce.width>0&&S?(vt=_V({allowEscapeViewBox:n,coordinate:S,key:"x",offsetTopLeft:L,position:re,reverseDirection:ve,tooltipDimension:Ce.width,viewBox:Xe,viewBoxDimension:Xe.width}),yt=_V({allowEscapeViewBox:n,coordinate:S,key:"y",offsetTopLeft:L,position:re,reverseDirection:ve,tooltipDimension:Ce.height,viewBox:Xe,viewBoxDimension:Xe.height}),Ke=Hhe({translateX:vt,translateY:yt,useTranslate3d:Be})):Ke=qhe,{cssProperties:Ke,cssClasses:Vhe({translateX:vt,translateY:yt,coordinate:S})}}function cT(e){"@babel/helpers - typeof";return cT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},cT(e)}function xV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function bV(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?xV(Object(S),!0).forEach(function(L){yz(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):xV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Xhe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Whe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,FY(L.key),L)}}function Yhe(e,n,S){return n&&Whe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zhe(e,n,S){return n=Vk(n),$he(e,NY()?Reflect.construct(n,S||[],Vk(e).constructor):n.apply(e,S))}function $he(e,n){if(n&&(cT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Khe(e)}function Khe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NY=function(){return!!e})()}function Vk(e){return Vk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},Vk(e)}function Jhe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&mz(e,n)}function mz(e,n){return mz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},mz(e,n)}function yz(e,n,S){return n=FY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function FY(e){var n=Qhe(e,"string");return cT(n)=="symbol"?n:n+""}function Qhe(e,n){if(cT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(cT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var wV=1,ede=(function(e){function n(){var S;Xhe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Zhe(this,n,[].concat(re)),yz(S,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),yz(S,"handleKeyDown",function(Ce){if(Ce.key==="Escape"){var Be,Xe,Ke,vt;S.setState({dismissed:!0,dismissedAtCoordinate:{x:(Be=(Xe=S.props.coordinate)===null||Xe===void 0?void 0:Xe.x)!==null&&Be!==void 0?Be:0,y:(Ke=(vt=S.props.coordinate)===null||vt===void 0?void 0:vt.y)!==null&&Ke!==void 0?Ke:0}})}}),S}return Jhe(n,e),Yhe(n,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var L=this.wrapperNode.getBoundingClientRect();(Math.abs(L.width-this.state.lastBoundingBox.width)>wV||Math.abs(L.height-this.state.lastBoundingBox.height)>wV)&&this.setState({lastBoundingBox:{width:L.width,height:L.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var L,re;this.props.active&&this.updateBBox(),this.state.dismissed&&(((L=this.props.coordinate)===null||L===void 0?void 0:L.x)!==this.state.dismissedAtCoordinate.x||((re=this.props.coordinate)===null||re===void 0?void 0:re.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.active,Ce=re.allowEscapeViewBox,Be=re.animationDuration,Xe=re.animationEasing,Ke=re.children,vt=re.coordinate,yt=re.hasPayload,Gt=re.isAnimationActive,$t=re.offset,gr=re.position,sr=re.reverseDirection,nr=re.useTranslate3d,jr=re.viewBox,Ne=re.wrapperStyle,an=Ghe({allowEscapeViewBox:Ce,coordinate:vt,offsetTopLeft:$t,position:gr,reverseDirection:sr,tooltipBox:this.state.lastBoundingBox,useTranslate3d:nr,viewBox:jr}),yn=an.cssClasses,Lr=an.cssProperties,$r=bV(bV({transition:Gt&&ve?"transform ".concat(Be,"ms ").concat(Xe):void 0},Lr),{},{pointerEvents:"none",visibility:!this.state.dismissed&&ve&&yt?"visible":"hidden",position:"absolute",top:0,left:0},Ne);return aa.createElement("div",{tabIndex:-1,className:yn,style:$r,ref:function(Jn){L.wrapperNode=Jn}},Ke)}}])})(Ua.PureComponent),tde=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},hx={isSsr:tde()};function fT(e){"@babel/helpers - typeof";return fT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},fT(e)}function TV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function AV(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?TV(Object(S),!0).forEach(function(L){t9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):TV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function rde(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function nde(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,jY(L.key),L)}}function ade(e,n,S){return n&&nde(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ide(e,n,S){return n=Hk(n),ode(e,BY()?Reflect.construct(n,S||[],Hk(e).constructor):n.apply(e,S))}function ode(e,n){if(n&&(fT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sde(e)}function sde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BY(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BY=function(){return!!e})()}function Hk(e){return Hk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},Hk(e)}function lde(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&gz(e,n)}function gz(e,n){return gz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},gz(e,n)}function t9(e,n,S){return n=jY(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function jY(e){var n=ude(e,"string");return fT(n)=="symbol"?n:n+""}function ude(e,n){if(fT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(fT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function cde(e){return e.dataKey}function fde(e,n){return aa.isValidElement(e)?aa.cloneElement(e,n):typeof e=="function"?aa.createElement(e,n):aa.createElement(Bhe,n)}var Qm=(function(e){function n(){return rde(this,n),ide(this,n,arguments)}return lde(n,e),ade(n,[{key:"render",value:function(){var L=this,re=this.props,ve=re.active,Ce=re.allowEscapeViewBox,Be=re.animationDuration,Xe=re.animationEasing,Ke=re.content,vt=re.coordinate,yt=re.filterNull,Gt=re.isAnimationActive,$t=re.offset,gr=re.payload,sr=re.payloadUniqBy,nr=re.position,jr=re.reverseDirection,Ne=re.useTranslate3d,an=re.viewBox,yn=re.wrapperStyle,Lr=gr??[];yt&&Lr.length&&(Lr=PY(gr.filter(function(dn){return dn.value!=null&&(dn.hide!==!0||L.props.includeHidden)}),sr,cde));var $r=Lr.length>0;return aa.createElement(ede,{allowEscapeViewBox:Ce,animationDuration:Be,animationEasing:Xe,isAnimationActive:Gt,active:ve,coordinate:vt,hasPayload:$r,offset:$t,position:nr,reverseDirection:jr,useTranslate3d:Ne,viewBox:an,wrapperStyle:yn},fde(Ke,AV(AV({},this.props),{},{payload:Lr})))}}])})(Ua.PureComponent);t9(Qm,"displayName","Tooltip");t9(Qm,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!hx.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var V4,SV;function hde(){if(SV)return V4;SV=1;var e=_g(),n=function(){return e.Date.now()};return V4=n,V4}var H4,EV;function dde(){if(EV)return H4;EV=1;var e=/\s/;function n(S){for(var L=S.length;L--&&e.test(S.charAt(L)););return L}return H4=n,H4}var G4,MV;function vde(){if(MV)return G4;MV=1;var e=dde(),n=/^\s+/;function S(L){return L&&L.slice(0,e(L)+1).replace(n,"")}return G4=S,G4}var X4,CV;function UY(){if(CV)return X4;CV=1;var e=vde(),n=cx(),S=NT(),L=NaN,re=/^[-+]0x[0-9a-f]+$/i,ve=/^0b[01]+$/i,Ce=/^0o[0-7]+$/i,Be=parseInt;function Xe(Ke){if(typeof Ke=="number")return Ke;if(S(Ke))return L;if(n(Ke)){var vt=typeof Ke.valueOf=="function"?Ke.valueOf():Ke;Ke=n(vt)?vt+"":vt}if(typeof Ke!="string")return Ke===0?Ke:+Ke;Ke=e(Ke);var yt=ve.test(Ke);return yt||Ce.test(Ke)?Be(Ke.slice(2),yt?2:8):re.test(Ke)?L:+Ke}return X4=Xe,X4}var W4,kV;function pde(){if(kV)return W4;kV=1;var e=cx(),n=hde(),S=UY(),L="Expected a function",re=Math.max,ve=Math.min;function Ce(Be,Xe,Ke){var vt,yt,Gt,$t,gr,sr,nr=0,jr=!1,Ne=!1,an=!0;if(typeof Be!="function")throw new TypeError(L);Xe=S(Xe)||0,e(Ke)&&(jr=!!Ke.leading,Ne="maxWait"in Ke,Gt=Ne?re(S(Ke.maxWait)||0,Xe):Gt,an="trailing"in Ke?!!Ke.trailing:an);function yn(qa){var la=vt,ja=yt;return vt=yt=void 0,nr=qa,$t=Be.apply(ja,la),$t}function Lr(qa){return nr=qa,gr=setTimeout(Jn,Xe),jr?yn(qa):$t}function $r(qa){var la=qa-sr,ja=qa-nr,pa=Xe-la;return Ne?ve(pa,Gt-ja):pa}function dn(qa){var la=qa-sr,ja=qa-nr;return sr===void 0||la>=Xe||la<0||Ne&&ja>=Gt}function Jn(){var qa=n();if(dn(qa))return xn(qa);gr=setTimeout(Jn,$r(qa))}function xn(qa){return gr=void 0,an&&vt?yn(qa):(vt=yt=void 0,$t)}function Na(){gr!==void 0&&clearTimeout(gr),nr=0,vt=sr=yt=gr=void 0}function zn(){return gr===void 0?$t:xn(n())}function ta(){var qa=n(),la=dn(qa);if(vt=arguments,yt=this,sr=qa,la){if(gr===void 0)return Lr(sr);if(Ne)return clearTimeout(gr),gr=setTimeout(Jn,Xe),yn(sr)}return gr===void 0&&(gr=setTimeout(Jn,Xe)),$t}return ta.cancel=Na,ta.flush=zn,ta}return W4=Ce,W4}var Y4,PV;function mde(){if(PV)return Y4;PV=1;var e=pde(),n=cx(),S="Expected a function";function L(re,ve,Ce){var Be=!0,Xe=!0;if(typeof re!="function")throw new TypeError(S);return n(Ce)&&(Be="leading"in Ce?!!Ce.leading:Be,Xe="trailing"in Ce?!!Ce.trailing:Xe),e(re,ve,{leading:Be,maxWait:ve,trailing:Xe})}return Y4=L,Y4}var yde=mde();const qY=rh(yde);function oE(e){"@babel/helpers - typeof";return oE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},oE(e)}function LV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function mk(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?LV(Object(S),!0).forEach(function(L){gde(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):LV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function gde(e,n,S){return n=_de(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function _de(e){var n=xde(e,"string");return oE(n)=="symbol"?n:n+""}function xde(e,n){if(oE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(oE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function bde(e,n){return Sde(e)||Ade(e,n)||Tde(e,n)||wde()}function wde(){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 Tde(e,n){if(e){if(typeof e=="string")return RV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return RV(e,n)}}function RV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Ade(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function Sde(e){if(Array.isArray(e))return e}var KP=Ua.forwardRef(function(e,n){var S=e.aspect,L=e.initialDimension,re=L===void 0?{width:-1,height:-1}:L,ve=e.width,Ce=ve===void 0?"100%":ve,Be=e.height,Xe=Be===void 0?"100%":Be,Ke=e.minWidth,vt=Ke===void 0?0:Ke,yt=e.minHeight,Gt=e.maxHeight,$t=e.children,gr=e.debounce,sr=gr===void 0?0:gr,nr=e.id,jr=e.className,Ne=e.onResize,an=e.style,yn=an===void 0?{}:an,Lr=Ua.useRef(null),$r=Ua.useRef();$r.current=Ne,Ua.useImperativeHandle(n,function(){return Object.defineProperty(Lr.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),Lr.current},configurable:!0})});var dn=Ua.useState({containerWidth:re.width,containerHeight:re.height}),Jn=bde(dn,2),xn=Jn[0],Na=Jn[1],zn=Ua.useCallback(function(qa,la){Na(function(ja){var pa=Math.round(qa),Ra=Math.round(la);return ja.containerWidth===pa&&ja.containerHeight===Ra?ja:{containerWidth:pa,containerHeight:Ra}})},[]);Ua.useEffect(function(){var qa=function(Pi){var Eo,ma=Pi[0].contentRect,_a=ma.width,Li=ma.height;zn(_a,Li),(Eo=$r.current)===null||Eo===void 0||Eo.call($r,_a,Li)};sr>0&&(qa=qY(qa,sr,{trailing:!0,leading:!1}));var la=new ResizeObserver(qa),ja=Lr.current.getBoundingClientRect(),pa=ja.width,Ra=ja.height;return zn(pa,Ra),la.observe(Lr.current),function(){la.disconnect()}},[zn,sr]);var ta=Ua.useMemo(function(){var qa=xn.containerWidth,la=xn.containerHeight;if(qa<0||la<0)return null;w1(rw(Ce)||rw(Xe),`The width(%s) and height(%s) are both fixed numbers,
       maybe you don't need to use a ResponsiveContainer.`,Ce,Xe),w1(!S||S>0,"The aspect(%s) must be greater than zero.",S);var ja=rw(Ce)?qa:Ce,pa=rw(Xe)?la:Xe;S&&S>0&&(ja?pa=ja/S:pa&&(ja=pa*S),Gt&&pa>Gt&&(pa=Gt)),w1(ja>0||pa>0,`The width(%s) and height(%s) of chart should be greater than 0,
       please check the style of container, or the props width(%s) and height(%s),
       or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
       height and width.`,ja,pa,Ce,Xe,vt,yt,S);var Ra=!Array.isArray($t)&&b1($t.type).endsWith("Chart");return aa.Children.map($t,function(vi){return aa.isValidElement(vi)?Ua.cloneElement(vi,mk({width:ja,height:pa},Ra?{style:mk({height:"100%",width:"100%",maxHeight:pa,maxWidth:ja},vi.props.style)}:{})):vi})},[S,$t,Xe,Gt,yt,vt,xn,Ce]);return aa.createElement("div",{id:nr?"".concat(nr):void 0,className:Ec("recharts-responsive-container",jr),style:mk(mk({},yn),{},{width:Ce,height:Xe,minWidth:vt,minHeight:yt,maxHeight:Gt}),ref:Lr},ta)}),r9=function(n){return null};r9.displayName="Cell";function sE(e){"@babel/helpers - typeof";return sE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},sE(e)}function IV(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function _z(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?IV(Object(S),!0).forEach(function(L){Ede(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):IV(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Ede(e,n,S){return n=Mde(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Mde(e){var n=Cde(e,"string");return sE(n)=="symbol"?n:n+""}function Cde(e,n){if(sE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(sE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var $3={widthCache:{},cacheCount:0},kde=2e3,Pde={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},DV="recharts_measurement_span";function Lde(e){var n=_z({},e);return Object.keys(n).forEach(function(S){n[S]||delete n[S]}),n}var W5=function(n){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(n==null||hx.isSsr)return{width:0,height:0};var L=Lde(S),re=JSON.stringify({text:n,copyStyle:L});if($3.widthCache[re])return $3.widthCache[re];try{var ve=document.getElementById(DV);ve||(ve=document.createElement("span"),ve.setAttribute("id",DV),ve.setAttribute("aria-hidden","true"),document.body.appendChild(ve));var Ce=_z(_z({},Pde),L);Object.assign(ve.style,Ce),ve.textContent="".concat(n);var Be=ve.getBoundingClientRect(),Xe={width:Be.width,height:Be.height};return $3.widthCache[re]=Xe,++$3.cacheCount>kde&&($3.cacheCount=0,$3.widthCache={}),Xe}catch{return{width:0,height:0}}},Rde=function(n){return{top:n.top+window.scrollY-document.documentElement.clientTop,left:n.left+window.scrollX-document.documentElement.clientLeft}};function lE(e){"@babel/helpers - typeof";return lE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},lE(e)}function Gk(e,n){return zde(e)||Ode(e,n)||Dde(e,n)||Ide()}function Ide(){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 Dde(e,n){if(e){if(typeof e=="string")return OV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return OV(e,n)}}function OV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Ode(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n===0){if(Object(S)!==S)return;Xe=!1}else for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function zde(e){if(Array.isArray(e))return e}function Nde(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function zV(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,Bde(L.key),L)}}function Fde(e,n,S){return n&&zV(e.prototype,n),S&&zV(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Bde(e){var n=jde(e,"string");return lE(n)=="symbol"?n:n+""}function jde(e,n){if(lE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(lE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var NV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,FV=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Ude=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,qde=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,VY={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Vde=Object.keys(VY),eT="NaN";function Hde(e,n){return e*VY[n]}var yk=(function(){function e(n,S){Nde(this,e),this.num=n,this.unit=S,this.num=n,this.unit=S,Number.isNaN(n)&&(this.unit=""),S!==""&&!Ude.test(S)&&(this.num=NaN,this.unit=""),Vde.includes(S)&&(this.num=Hde(n,S),this.unit="px")}return Fde(e,[{key:"add",value:function(S){return this.unit!==S.unit?new e(NaN,""):new e(this.num+S.num,this.unit)}},{key:"subtract",value:function(S){return this.unit!==S.unit?new e(NaN,""):new e(this.num-S.num,this.unit)}},{key:"multiply",value:function(S){return this.unit!==""&&S.unit!==""&&this.unit!==S.unit?new e(NaN,""):new e(this.num*S.num,this.unit||S.unit)}},{key:"divide",value:function(S){return this.unit!==""&&S.unit!==""&&this.unit!==S.unit?new e(NaN,""):new e(this.num/S.num,this.unit||S.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(S){var L,re=(L=qde.exec(S))!==null&&L!==void 0?L:[],ve=Gk(re,3),Ce=ve[1],Be=ve[2];return new e(parseFloat(Ce),Be??"")}}])})();function HY(e){if(e.includes(eT))return eT;for(var n=e;n.includes("*")||n.includes("/");){var S,L=(S=NV.exec(n))!==null&&S!==void 0?S:[],re=Gk(L,4),ve=re[1],Ce=re[2],Be=re[3],Xe=yk.parse(ve??""),Ke=yk.parse(Be??""),vt=Ce==="*"?Xe.multiply(Ke):Xe.divide(Ke);if(vt.isNaN())return eT;n=n.replace(NV,vt.toString())}for(;n.includes("+")||/.-\d+(?:\.\d+)?/.test(n);){var yt,Gt=(yt=FV.exec(n))!==null&&yt!==void 0?yt:[],$t=Gk(Gt,4),gr=$t[1],sr=$t[2],nr=$t[3],jr=yk.parse(gr??""),Ne=yk.parse(nr??""),an=sr==="+"?jr.add(Ne):jr.subtract(Ne);if(an.isNaN())return eT;n=n.replace(FV,an.toString())}return n}var BV=/\(([^()]*)\)/;function Gde(e){for(var n=e;n.includes("(");){var S=BV.exec(n),L=Gk(S,2),re=L[1];n=n.replace(BV,HY(re))}return n}function Xde(e){var n=e.replace(/\s+/g,"");return n=Gde(n),n=HY(n),n}function Wde(e){try{return Xde(e)}catch{return eT}}function Z4(e){var n=Wde(e.slice(5,-1));return n===eT?"":n}var Yde=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Zde=["dx","dy","angle","className","breakAll"];function xz(){return xz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},xz.apply(this,arguments)}function jV(e,n){if(e==null)return{};var S=$de(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function $de(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function UV(e,n){return eve(e)||Qde(e,n)||Jde(e,n)||Kde()}function Kde(){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 Jde(e,n){if(e){if(typeof e=="string")return qV(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return qV(e,n)}}function qV(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Qde(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n===0){if(Object(S)!==S)return;Xe=!1}else for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function eve(e){if(Array.isArray(e))return e}var GY=/[ \f\n\r\t\v\u2028\u2029]+/,XY=function(n){var S=n.children,L=n.breakAll,re=n.style;try{var ve=[];Mu(S)||(L?ve=S.toString().split(""):ve=S.toString().split(GY));var Ce=ve.map(function(Xe){return{word:Xe,width:W5(Xe,re).width}}),Be=L?0:W5(" ",re).width;return{wordsWithComputedWidth:Ce,spaceWidth:Be}}catch{return null}},tve=function(n,S,L,re,ve){var Ce=n.maxLines,Be=n.children,Xe=n.style,Ke=n.breakAll,vt=gs(Ce),yt=Be,Gt=function(){var ja=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return ja.reduce(function(pa,Ra){var vi=Ra.word,Pi=Ra.width,Eo=pa[pa.length-1];if(Eo&&(re==null||ve||Eo.width+Pi+L<Number(re)))Eo.words.push(vi),Eo.width+=Pi+L;else{var ma={words:[vi],width:Pi};pa.push(ma)}return pa},[])},$t=Gt(S),gr=function(ja){return ja.reduce(function(pa,Ra){return pa.width>Ra.width?pa:Ra})};if(!vt)return $t;for(var sr="…",nr=function(ja){var pa=yt.slice(0,ja),Ra=XY({breakAll:Ke,style:Xe,children:pa+sr}).wordsWithComputedWidth,vi=Gt(Ra),Pi=vi.length>Ce||gr(vi).width>Number(re);return[Pi,vi]},jr=0,Ne=yt.length-1,an=0,yn;jr<=Ne&&an<=yt.length-1;){var Lr=Math.floor((jr+Ne)/2),$r=Lr-1,dn=nr($r),Jn=UV(dn,2),xn=Jn[0],Na=Jn[1],zn=nr(Lr),ta=UV(zn,1),qa=ta[0];if(!xn&&!qa&&(jr=Lr+1),xn&&qa&&(Ne=Lr-1),!xn&&qa){yn=Na;break}an++}return yn||$t},VV=function(n){var S=Mu(n)?[]:n.toString().split(GY);return[{words:S}]},rve=function(n){var S=n.width,L=n.scaleToFit,re=n.children,ve=n.style,Ce=n.breakAll,Be=n.maxLines;if((S||L)&&!hx.isSsr){var Xe,Ke,vt=XY({breakAll:Ce,children:re,style:ve});if(vt){var yt=vt.wordsWithComputedWidth,Gt=vt.spaceWidth;Xe=yt,Ke=Gt}else return VV(re);return tve({breakAll:Ce,children:re,maxLines:Be,style:ve},Xe,Ke,S,L)}return VV(re)},HV="#808080",Xk=function(n){var S=n.x,L=S===void 0?0:S,re=n.y,ve=re===void 0?0:re,Ce=n.lineHeight,Be=Ce===void 0?"1em":Ce,Xe=n.capHeight,Ke=Xe===void 0?"0.71em":Xe,vt=n.scaleToFit,yt=vt===void 0?!1:vt,Gt=n.textAnchor,$t=Gt===void 0?"start":Gt,gr=n.verticalAnchor,sr=gr===void 0?"end":gr,nr=n.fill,jr=nr===void 0?HV:nr,Ne=jV(n,Yde),an=Ua.useMemo(function(){return rve({breakAll:Ne.breakAll,children:Ne.children,maxLines:Ne.maxLines,scaleToFit:yt,style:Ne.style,width:Ne.width})},[Ne.breakAll,Ne.children,Ne.maxLines,yt,Ne.style,Ne.width]),yn=Ne.dx,Lr=Ne.dy,$r=Ne.angle,dn=Ne.className,Jn=Ne.breakAll,xn=jV(Ne,Zde);if(!Iv(L)||!Iv(ve))return null;var Na=L+(gs(yn)?yn:0),zn=ve+(gs(Lr)?Lr:0),ta;switch(sr){case"start":ta=Z4("calc(".concat(Ke,")"));break;case"middle":ta=Z4("calc(".concat((an.length-1)/2," * -").concat(Be," + (").concat(Ke," / 2))"));break;default:ta=Z4("calc(".concat(an.length-1," * -").concat(Be,")"));break}var qa=[];if(yt){var la=an[0].width,ja=Ne.width;qa.push("scale(".concat((gs(ja)?ja/la:1)/la,")"))}return $r&&qa.push("rotate(".concat($r,", ").concat(Na,", ").concat(zn,")")),qa.length&&(xn.transform=qa.join(" ")),aa.createElement("text",xz({},Iu(xn,!0),{x:Na,y:zn,className:Ec("recharts-text",dn),textAnchor:$t,fill:jr.includes("url")?HV:jr}),an.map(function(pa,Ra){var vi=pa.words.join(Jn?"":" ");return aa.createElement("tspan",{x:Na,dy:Ra===0?ta:Be,key:"".concat(vi,"-").concat(Ra)},vi)}))};function lx(e,n){return e==null||n==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function nve(e,n){return e==null||n==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function n9(e){let n,S,L;e.length!==2?(n=lx,S=(Be,Xe)=>lx(e(Be),Xe),L=(Be,Xe)=>e(Be)-Xe):(n=e===lx||e===nve?e:ave,S=e,L=e);function re(Be,Xe,Ke=0,vt=Be.length){if(Ke<vt){if(n(Xe,Xe)!==0)return vt;do{const yt=Ke+vt>>>1;S(Be[yt],Xe)<0?Ke=yt+1:vt=yt}while(Ke<vt)}return Ke}function ve(Be,Xe,Ke=0,vt=Be.length){if(Ke<vt){if(n(Xe,Xe)!==0)return vt;do{const yt=Ke+vt>>>1;S(Be[yt],Xe)<=0?Ke=yt+1:vt=yt}while(Ke<vt)}return Ke}function Ce(Be,Xe,Ke=0,vt=Be.length){const yt=re(Be,Xe,Ke,vt-1);return yt>Ke&&L(Be[yt-1],Xe)>-L(Be[yt],Xe)?yt-1:yt}return{left:re,center:Ce,right:ve}}function ave(){return 0}function WY(e){return e===null?NaN:+e}function*ive(e,n){for(let S of e)S!=null&&(S=+S)>=S&&(yield S)}const ove=n9(lx),VE=ove.right;n9(WY).center;class GV extends Map{constructor(n,S=uve){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:S}}),n!=null)for(const[L,re]of n)this.set(L,re)}get(n){return super.get(XV(this,n))}has(n){return super.has(XV(this,n))}set(n,S){return super.set(sve(this,n),S)}delete(n){return super.delete(lve(this,n))}}function XV({_intern:e,_key:n},S){const L=n(S);return e.has(L)?e.get(L):S}function sve({_intern:e,_key:n},S){const L=n(S);return e.has(L)?e.get(L):(e.set(L,S),S)}function lve({_intern:e,_key:n},S){const L=n(S);return e.has(L)&&(S=e.get(L),e.delete(L)),S}function uve(e){return e!==null&&typeof e=="object"?e.valueOf():e}function cve(e=lx){if(e===lx)return YY;if(typeof e!="function")throw new TypeError("compare is not a function");return(n,S)=>{const L=e(n,S);return L||L===0?L:(e(S,S)===0)-(e(n,n)===0)}}function YY(e,n){return(e==null||!(e>=e))-(n==null||!(n>=n))||(e<n?-1:e>n?1:0)}const fve=Math.sqrt(50),hve=Math.sqrt(10),dve=Math.sqrt(2);function Wk(e,n,S){const L=(n-e)/Math.max(0,S),re=Math.floor(Math.log10(L)),ve=L/Math.pow(10,re),Ce=ve>=fve?10:ve>=hve?5:ve>=dve?2:1;let Be,Xe,Ke;return re<0?(Ke=Math.pow(10,-re)/Ce,Be=Math.round(e*Ke),Xe=Math.round(n*Ke),Be/Ke<e&&++Be,Xe/Ke>n&&--Xe,Ke=-Ke):(Ke=Math.pow(10,re)*Ce,Be=Math.round(e/Ke),Xe=Math.round(n/Ke),Be*Ke<e&&++Be,Xe*Ke>n&&--Xe),Xe<Be&&.5<=S&&S<2?Wk(e,n,S*2):[Be,Xe,Ke]}function bz(e,n,S){if(n=+n,e=+e,S=+S,!(S>0))return[];if(e===n)return[e];const L=n<e,[re,ve,Ce]=L?Wk(n,e,S):Wk(e,n,S);if(!(ve>=re))return[];const Be=ve-re+1,Xe=new Array(Be);if(L)if(Ce<0)for(let Ke=0;Ke<Be;++Ke)Xe[Ke]=(ve-Ke)/-Ce;else for(let Ke=0;Ke<Be;++Ke)Xe[Ke]=(ve-Ke)*Ce;else if(Ce<0)for(let Ke=0;Ke<Be;++Ke)Xe[Ke]=(re+Ke)/-Ce;else for(let Ke=0;Ke<Be;++Ke)Xe[Ke]=(re+Ke)*Ce;return Xe}function wz(e,n,S){return n=+n,e=+e,S=+S,Wk(e,n,S)[2]}function Tz(e,n,S){n=+n,e=+e,S=+S;const L=n<e,re=L?wz(n,e,S):wz(e,n,S);return(L?-1:1)*(re<0?1/-re:re)}function WV(e,n){let S;for(const L of e)L!=null&&(S<L||S===void 0&&L>=L)&&(S=L);return S}function YV(e,n){let S;for(const L of e)L!=null&&(S>L||S===void 0&&L>=L)&&(S=L);return S}function ZY(e,n,S=0,L=1/0,re){if(n=Math.floor(n),S=Math.floor(Math.max(0,S)),L=Math.floor(Math.min(e.length-1,L)),!(S<=n&&n<=L))return e;for(re=re===void 0?YY:cve(re);L>S;){if(L-S>600){const Xe=L-S+1,Ke=n-S+1,vt=Math.log(Xe),yt=.5*Math.exp(2*vt/3),Gt=.5*Math.sqrt(vt*yt*(Xe-yt)/Xe)*(Ke-Xe/2<0?-1:1),$t=Math.max(S,Math.floor(n-Ke*yt/Xe+Gt)),gr=Math.min(L,Math.floor(n+(Xe-Ke)*yt/Xe+Gt));ZY(e,n,$t,gr,re)}const ve=e[n];let Ce=S,Be=L;for(z5(e,S,n),re(e[L],ve)>0&&z5(e,S,L);Ce<Be;){for(z5(e,Ce,Be),++Ce,--Be;re(e[Ce],ve)<0;)++Ce;for(;re(e[Be],ve)>0;)--Be}re(e[S],ve)===0?z5(e,S,Be):(++Be,z5(e,Be,L)),Be<=n&&(S=Be+1),n<=Be&&(L=Be-1)}return e}function z5(e,n,S){const L=e[n];e[n]=e[S],e[S]=L}function vve(e,n,S){if(e=Float64Array.from(ive(e)),!(!(L=e.length)||isNaN(n=+n))){if(n<=0||L<2)return YV(e);if(n>=1)return WV(e);var L,re=(L-1)*n,ve=Math.floor(re),Ce=WV(ZY(e,ve).subarray(0,ve+1)),Be=YV(e.subarray(ve+1));return Ce+(Be-Ce)*(re-ve)}}function pve(e,n,S=WY){if(!(!(L=e.length)||isNaN(n=+n))){if(n<=0||L<2)return+S(e[0],0,e);if(n>=1)return+S(e[L-1],L-1,e);var L,re=(L-1)*n,ve=Math.floor(re),Ce=+S(e[ve],ve,e),Be=+S(e[ve+1],ve+1,e);return Ce+(Be-Ce)*(re-ve)}}function mve(e,n,S){e=+e,n=+n,S=(re=arguments.length)<2?(n=e,e=0,1):re<3?1:+S;for(var L=-1,re=Math.max(0,Math.ceil((n-e)/S))|0,ve=new Array(re);++L<re;)ve[L]=e+L*S;return ve}function L0(e,n){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(n).domain(e);break}return this}function k1(e,n){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof n=="function"?this.interpolator(n):this.range(n);break}}return this}const Az=Symbol("implicit");function a9(){var e=new GV,n=[],S=[],L=Az;function re(ve){let Ce=e.get(ve);if(Ce===void 0){if(L!==Az)return L;e.set(ve,Ce=n.push(ve)-1)}return S[Ce%S.length]}return re.domain=function(ve){if(!arguments.length)return n.slice();n=[],e=new GV;for(const Ce of ve)e.has(Ce)||e.set(Ce,n.push(Ce)-1);return re},re.range=function(ve){return arguments.length?(S=Array.from(ve),re):S.slice()},re.unknown=function(ve){return arguments.length?(L=ve,re):L},re.copy=function(){return a9(n,S).unknown(L)},L0.apply(re,arguments),re}function uE(){var e=a9().unknown(void 0),n=e.domain,S=e.range,L=0,re=1,ve,Ce,Be=!1,Xe=0,Ke=0,vt=.5;delete e.unknown;function yt(){var Gt=n().length,$t=re<L,gr=$t?re:L,sr=$t?L:re;ve=(sr-gr)/Math.max(1,Gt-Xe+Ke*2),Be&&(ve=Math.floor(ve)),gr+=(sr-gr-ve*(Gt-Xe))*vt,Ce=ve*(1-Xe),Be&&(gr=Math.round(gr),Ce=Math.round(Ce));var nr=mve(Gt).map(function(jr){return gr+ve*jr});return S($t?nr.reverse():nr)}return e.domain=function(Gt){return arguments.length?(n(Gt),yt()):n()},e.range=function(Gt){return arguments.length?([L,re]=Gt,L=+L,re=+re,yt()):[L,re]},e.rangeRound=function(Gt){return[L,re]=Gt,L=+L,re=+re,Be=!0,yt()},e.bandwidth=function(){return Ce},e.step=function(){return ve},e.round=function(Gt){return arguments.length?(Be=!!Gt,yt()):Be},e.padding=function(Gt){return arguments.length?(Xe=Math.min(1,Ke=+Gt),yt()):Xe},e.paddingInner=function(Gt){return arguments.length?(Xe=Math.min(1,Gt),yt()):Xe},e.paddingOuter=function(Gt){return arguments.length?(Ke=+Gt,yt()):Ke},e.align=function(Gt){return arguments.length?(vt=Math.max(0,Math.min(1,Gt)),yt()):vt},e.copy=function(){return uE(n(),[L,re]).round(Be).paddingInner(Xe).paddingOuter(Ke).align(vt)},L0.apply(yt(),arguments)}function $Y(e){var n=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return $Y(n())},e}function Y5(){return $Y(uE.apply(null,arguments).paddingInner(1))}function i9(e,n,S){e.prototype=n.prototype=S,S.constructor=e}function KY(e,n){var S=Object.create(e.prototype);for(var L in n)S[L]=n[L];return S}function HE(){}var cE=.7,Yk=1/cE,aT="\\s*([+-]?\\d+)\\s*",fE="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yve=/^#([0-9a-f]{3,8})$/,gve=new RegExp(`^rgb\\(${aT},${aT},${aT}\\)$`),_ve=new RegExp(`^rgb\\(${vg},${vg},${vg}\\)$`),xve=new RegExp(`^rgba\\(${aT},${aT},${aT},${fE}\\)$`),bve=new RegExp(`^rgba\\(${vg},${vg},${vg},${fE}\\)$`),wve=new RegExp(`^hsl\\(${fE},${vg},${vg}\\)$`),Tve=new RegExp(`^hsla\\(${fE},${vg},${vg},${fE}\\)$`),ZV={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};i9(HE,hE,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$V,formatHex:$V,formatHex8:Ave,formatHsl:Sve,formatRgb:KV,toString:KV});function $V(){return this.rgb().formatHex()}function Ave(){return this.rgb().formatHex8()}function Sve(){return JY(this).formatHsl()}function KV(){return this.rgb().formatRgb()}function hE(e){var n,S;return e=(e+"").trim().toLowerCase(),(n=yve.exec(e))?(S=n[1].length,n=parseInt(n[1],16),S===6?JV(n):S===3?new gm(n>>8&15|n>>4&240,n>>4&15|n&240,(n&15)<<4|n&15,1):S===8?gk(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):S===4?gk(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|n&240,((n&15)<<4|n&15)/255):null):(n=gve.exec(e))?new gm(n[1],n[2],n[3],1):(n=_ve.exec(e))?new gm(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=xve.exec(e))?gk(n[1],n[2],n[3],n[4]):(n=bve.exec(e))?gk(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=wve.exec(e))?tH(n[1],n[2]/100,n[3]/100,1):(n=Tve.exec(e))?tH(n[1],n[2]/100,n[3]/100,n[4]):ZV.hasOwnProperty(e)?JV(ZV[e]):e==="transparent"?new gm(NaN,NaN,NaN,0):null}function JV(e){return new gm(e>>16&255,e>>8&255,e&255,1)}function gk(e,n,S,L){return L<=0&&(e=n=S=NaN),new gm(e,n,S,L)}function Eve(e){return e instanceof HE||(e=hE(e)),e?(e=e.rgb(),new gm(e.r,e.g,e.b,e.opacity)):new gm}function Sz(e,n,S,L){return arguments.length===1?Eve(e):new gm(e,n,S,L??1)}function gm(e,n,S,L){this.r=+e,this.g=+n,this.b=+S,this.opacity=+L}i9(gm,Sz,KY(HE,{brighter(e){return e=e==null?Yk:Math.pow(Yk,e),new gm(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?cE:Math.pow(cE,e),new gm(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new gm(lw(this.r),lw(this.g),lw(this.b),Zk(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:QV,formatHex:QV,formatHex8:Mve,formatRgb:eH,toString:eH}));function QV(){return`#${nw(this.r)}${nw(this.g)}${nw(this.b)}`}function Mve(){return`#${nw(this.r)}${nw(this.g)}${nw(this.b)}${nw((isNaN(this.opacity)?1:this.opacity)*255)}`}function eH(){const e=Zk(this.opacity);return`${e===1?"rgb(":"rgba("}${lw(this.r)}, ${lw(this.g)}, ${lw(this.b)}${e===1?")":`, ${e})`}`}function Zk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function lw(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function nw(e){return e=lw(e),(e<16?"0":"")+e.toString(16)}function tH(e,n,S,L){return L<=0?e=n=S=NaN:S<=0||S>=1?e=n=NaN:n<=0&&(e=NaN),new fy(e,n,S,L)}function JY(e){if(e instanceof fy)return new fy(e.h,e.s,e.l,e.opacity);if(e instanceof HE||(e=hE(e)),!e)return new fy;if(e instanceof fy)return e;e=e.rgb();var n=e.r/255,S=e.g/255,L=e.b/255,re=Math.min(n,S,L),ve=Math.max(n,S,L),Ce=NaN,Be=ve-re,Xe=(ve+re)/2;return Be?(n===ve?Ce=(S-L)/Be+(S<L)*6:S===ve?Ce=(L-n)/Be+2:Ce=(n-S)/Be+4,Be/=Xe<.5?ve+re:2-ve-re,Ce*=60):Be=Xe>0&&Xe<1?0:Ce,new fy(Ce,Be,Xe,e.opacity)}function Cve(e,n,S,L){return arguments.length===1?JY(e):new fy(e,n,S,L??1)}function fy(e,n,S,L){this.h=+e,this.s=+n,this.l=+S,this.opacity=+L}i9(fy,Cve,KY(HE,{brighter(e){return e=e==null?Yk:Math.pow(Yk,e),new fy(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?cE:Math.pow(cE,e),new fy(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,n=isNaN(e)||isNaN(this.s)?0:this.s,S=this.l,L=S+(S<.5?S:1-S)*n,re=2*S-L;return new gm($4(e>=240?e-240:e+120,re,L),$4(e,re,L),$4(e<120?e+240:e-120,re,L),this.opacity)},clamp(){return new fy(rH(this.h),_k(this.s),_k(this.l),Zk(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(){const e=Zk(this.opacity);return`${e===1?"hsl(":"hsla("}${rH(this.h)}, ${_k(this.s)*100}%, ${_k(this.l)*100}%${e===1?")":`, ${e})`}`}}));function rH(e){return e=(e||0)%360,e<0?e+360:e}function _k(e){return Math.max(0,Math.min(1,e||0))}function $4(e,n,S){return(e<60?n+(S-n)*e/60:e<180?S:e<240?n+(S-n)*(240-e)/60:n)*255}const o9=e=>()=>e;function kve(e,n){return function(S){return e+S*n}}function Pve(e,n,S){return e=Math.pow(e,S),n=Math.pow(n,S)-e,S=1/S,function(L){return Math.pow(e+L*n,S)}}function Lve(e){return(e=+e)==1?QY:function(n,S){return S-n?Pve(n,S,e):o9(isNaN(n)?S:n)}}function QY(e,n){var S=n-e;return S?kve(e,S):o9(isNaN(e)?n:e)}const nH=(function e(n){var S=Lve(n);function L(re,ve){var Ce=S((re=Sz(re)).r,(ve=Sz(ve)).r),Be=S(re.g,ve.g),Xe=S(re.b,ve.b),Ke=QY(re.opacity,ve.opacity);return function(vt){return re.r=Ce(vt),re.g=Be(vt),re.b=Xe(vt),re.opacity=Ke(vt),re+""}}return L.gamma=e,L})(1);function Rve(e,n){n||(n=[]);var S=e?Math.min(n.length,e.length):0,L=n.slice(),re;return function(ve){for(re=0;re<S;++re)L[re]=e[re]*(1-ve)+n[re]*ve;return L}}function Ive(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dve(e,n){var S=n?n.length:0,L=e?Math.min(S,e.length):0,re=new Array(L),ve=new Array(S),Ce;for(Ce=0;Ce<L;++Ce)re[Ce]=UT(e[Ce],n[Ce]);for(;Ce<S;++Ce)ve[Ce]=n[Ce];return function(Be){for(Ce=0;Ce<L;++Ce)ve[Ce]=re[Ce](Be);return ve}}function Ove(e,n){var S=new Date;return e=+e,n=+n,function(L){return S.setTime(e*(1-L)+n*L),S}}function $k(e,n){return e=+e,n=+n,function(S){return e*(1-S)+n*S}}function zve(e,n){var S={},L={},re;(e===null||typeof e!="object")&&(e={}),(n===null||typeof n!="object")&&(n={});for(re in n)re in e?S[re]=UT(e[re],n[re]):L[re]=n[re];return function(ve){for(re in S)L[re]=S[re](ve);return L}}var Ez=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K4=new RegExp(Ez.source,"g");function Nve(e){return function(){return e}}function Fve(e){return function(n){return e(n)+""}}function Bve(e,n){var S=Ez.lastIndex=K4.lastIndex=0,L,re,ve,Ce=-1,Be=[],Xe=[];for(e=e+"",n=n+"";(L=Ez.exec(e))&&(re=K4.exec(n));)(ve=re.index)>S&&(ve=n.slice(S,ve),Be[Ce]?Be[Ce]+=ve:Be[++Ce]=ve),(L=L[0])===(re=re[0])?Be[Ce]?Be[Ce]+=re:Be[++Ce]=re:(Be[++Ce]=null,Xe.push({i:Ce,x:$k(L,re)})),S=K4.lastIndex;return S<n.length&&(ve=n.slice(S),Be[Ce]?Be[Ce]+=ve:Be[++Ce]=ve),Be.length<2?Xe[0]?Fve(Xe[0].x):Nve(n):(n=Xe.length,function(Ke){for(var vt=0,yt;vt<n;++vt)Be[(yt=Xe[vt]).i]=yt.x(Ke);return Be.join("")})}function UT(e,n){var S=typeof n,L;return n==null||S==="boolean"?o9(n):(S==="number"?$k:S==="string"?(L=hE(n))?(n=L,nH):Bve:n instanceof hE?nH:n instanceof Date?Ove:Ive(n)?Rve:Array.isArray(n)?Dve:typeof n.valueOf!="function"&&typeof n.toString!="function"||isNaN(n)?zve:$k)(e,n)}function s9(e,n){return e=+e,n=+n,function(S){return Math.round(e*(1-S)+n*S)}}function jve(e,n){n===void 0&&(n=e,e=UT);for(var S=0,L=n.length-1,re=n[0],ve=new Array(L<0?0:L);S<L;)ve[S]=e(re,re=n[++S]);return function(Ce){var Be=Math.max(0,Math.min(L-1,Math.floor(Ce*=L)));return ve[Be](Ce-Be)}}function Uve(e){return function(){return e}}function Kk(e){return+e}var aH=[0,1];function rm(e){return e}function Mz(e,n){return(n-=e=+e)?function(S){return(S-e)/n}:Uve(isNaN(n)?NaN:.5)}function qve(e,n){var S;return e>n&&(S=e,e=n,n=S),function(L){return Math.max(e,Math.min(n,L))}}function Vve(e,n,S){var L=e[0],re=e[1],ve=n[0],Ce=n[1];return re<L?(L=Mz(re,L),ve=S(Ce,ve)):(L=Mz(L,re),ve=S(ve,Ce)),function(Be){return ve(L(Be))}}function Hve(e,n,S){var L=Math.min(e.length,n.length)-1,re=new Array(L),ve=new Array(L),Ce=-1;for(e[L]<e[0]&&(e=e.slice().reverse(),n=n.slice().reverse());++Ce<L;)re[Ce]=Mz(e[Ce],e[Ce+1]),ve[Ce]=S(n[Ce],n[Ce+1]);return function(Be){var Xe=VE(e,Be,1,L)-1;return ve[Xe](re[Xe](Be))}}function GE(e,n){return n.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function JP(){var e=aH,n=aH,S=UT,L,re,ve,Ce=rm,Be,Xe,Ke;function vt(){var Gt=Math.min(e.length,n.length);return Ce!==rm&&(Ce=qve(e[0],e[Gt-1])),Be=Gt>2?Hve:Vve,Xe=Ke=null,yt}function yt(Gt){return Gt==null||isNaN(Gt=+Gt)?ve:(Xe||(Xe=Be(e.map(L),n,S)))(L(Ce(Gt)))}return yt.invert=function(Gt){return Ce(re((Ke||(Ke=Be(n,e.map(L),$k)))(Gt)))},yt.domain=function(Gt){return arguments.length?(e=Array.from(Gt,Kk),vt()):e.slice()},yt.range=function(Gt){return arguments.length?(n=Array.from(Gt),vt()):n.slice()},yt.rangeRound=function(Gt){return n=Array.from(Gt),S=s9,vt()},yt.clamp=function(Gt){return arguments.length?(Ce=Gt?!0:rm,vt()):Ce!==rm},yt.interpolate=function(Gt){return arguments.length?(S=Gt,vt()):S},yt.unknown=function(Gt){return arguments.length?(ve=Gt,yt):ve},function(Gt,$t){return L=Gt,re=$t,vt()}}function l9(){return JP()(rm,rm)}function Gve(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Jk(e,n){if((S=(e=n?e.toExponential(n-1):e.toExponential()).indexOf("e"))<0)return null;var S,L=e.slice(0,S);return[L.length>1?L[0]+L.slice(2):L,+e.slice(S+1)]}function hT(e){return e=Jk(Math.abs(e)),e?e[1]:NaN}function Xve(e,n){return function(S,L){for(var re=S.length,ve=[],Ce=0,Be=e[0],Xe=0;re>0&&Be>0&&(Xe+Be+1>L&&(Be=Math.max(1,L-Xe)),ve.push(S.substring(re-=Be,re+Be)),!((Xe+=Be+1)>L));)Be=e[Ce=(Ce+1)%e.length];return ve.reverse().join(n)}}function Wve(e){return function(n){return n.replace(/[0-9]/g,function(S){return e[+S]})}}var Yve=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function dE(e){if(!(n=Yve.exec(e)))throw new Error("invalid format: "+e);var n;return new u9({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}dE.prototype=u9.prototype;function u9(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}u9.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 Zve(e){e:for(var n=e.length,S=1,L=-1,re;S<n;++S)switch(e[S]){case".":L=re=S;break;case"0":L===0&&(L=S),re=S;break;default:if(!+e[S])break e;L>0&&(L=0);break}return L>0?e.slice(0,L)+e.slice(re+1):e}var eZ;function $ve(e,n){var S=Jk(e,n);if(!S)return e+"";var L=S[0],re=S[1],ve=re-(eZ=Math.max(-8,Math.min(8,Math.floor(re/3)))*3)+1,Ce=L.length;return ve===Ce?L:ve>Ce?L+new Array(ve-Ce+1).join("0"):ve>0?L.slice(0,ve)+"."+L.slice(ve):"0."+new Array(1-ve).join("0")+Jk(e,Math.max(0,n+ve-1))[0]}function iH(e,n){var S=Jk(e,n);if(!S)return e+"";var L=S[0],re=S[1];return re<0?"0."+new Array(-re).join("0")+L:L.length>re+1?L.slice(0,re+1)+"."+L.slice(re+1):L+new Array(re-L.length+2).join("0")}const oH={"%":(e,n)=>(e*100).toFixed(n),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Gve,e:(e,n)=>e.toExponential(n),f:(e,n)=>e.toFixed(n),g:(e,n)=>e.toPrecision(n),o:e=>Math.round(e).toString(8),p:(e,n)=>iH(e*100,n),r:iH,s:$ve,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function sH(e){return e}var lH=Array.prototype.map,uH=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Kve(e){var n=e.grouping===void 0||e.thousands===void 0?sH:Xve(lH.call(e.grouping,Number),e.thousands+""),S=e.currency===void 0?"":e.currency[0]+"",L=e.currency===void 0?"":e.currency[1]+"",re=e.decimal===void 0?".":e.decimal+"",ve=e.numerals===void 0?sH:Wve(lH.call(e.numerals,String)),Ce=e.percent===void 0?"%":e.percent+"",Be=e.minus===void 0?"−":e.minus+"",Xe=e.nan===void 0?"NaN":e.nan+"";function Ke(yt){yt=dE(yt);var Gt=yt.fill,$t=yt.align,gr=yt.sign,sr=yt.symbol,nr=yt.zero,jr=yt.width,Ne=yt.comma,an=yt.precision,yn=yt.trim,Lr=yt.type;Lr==="n"?(Ne=!0,Lr="g"):oH[Lr]||(an===void 0&&(an=12),yn=!0,Lr="g"),(nr||Gt==="0"&&$t==="=")&&(nr=!0,Gt="0",$t="=");var $r=sr==="$"?S:sr==="#"&&/[boxX]/.test(Lr)?"0"+Lr.toLowerCase():"",dn=sr==="$"?L:/[%p]/.test(Lr)?Ce:"",Jn=oH[Lr],xn=/[defgprs%]/.test(Lr);an=an===void 0?6:/[gprs]/.test(Lr)?Math.max(1,Math.min(21,an)):Math.max(0,Math.min(20,an));function Na(zn){var ta=$r,qa=dn,la,ja,pa;if(Lr==="c")qa=Jn(zn)+qa,zn="";else{zn=+zn;var Ra=zn<0||1/zn<0;if(zn=isNaN(zn)?Xe:Jn(Math.abs(zn),an),yn&&(zn=Zve(zn)),Ra&&+zn==0&&gr!=="+"&&(Ra=!1),ta=(Ra?gr==="("?gr:Be:gr==="-"||gr==="("?"":gr)+ta,qa=(Lr==="s"?uH[8+eZ/3]:"")+qa+(Ra&&gr==="("?")":""),xn){for(la=-1,ja=zn.length;++la<ja;)if(pa=zn.charCodeAt(la),48>pa||pa>57){qa=(pa===46?re+zn.slice(la+1):zn.slice(la))+qa,zn=zn.slice(0,la);break}}}Ne&&!nr&&(zn=n(zn,1/0));var vi=ta.length+zn.length+qa.length,Pi=vi<jr?new Array(jr-vi+1).join(Gt):"";switch(Ne&&nr&&(zn=n(Pi+zn,Pi.length?jr-qa.length:1/0),Pi=""),$t){case"<":zn=ta+zn+qa+Pi;break;case"=":zn=ta+Pi+zn+qa;break;case"^":zn=Pi.slice(0,vi=Pi.length>>1)+ta+zn+qa+Pi.slice(vi);break;default:zn=Pi+ta+zn+qa;break}return ve(zn)}return Na.toString=function(){return yt+""},Na}function vt(yt,Gt){var $t=Ke((yt=dE(yt),yt.type="f",yt)),gr=Math.max(-8,Math.min(8,Math.floor(hT(Gt)/3)))*3,sr=Math.pow(10,-gr),nr=uH[8+gr/3];return function(jr){return $t(sr*jr)+nr}}return{format:Ke,formatPrefix:vt}}var xk,c9,tZ;Jve({thousands:",",grouping:[3],currency:["$",""]});function Jve(e){return xk=Kve(e),c9=xk.format,tZ=xk.formatPrefix,xk}function Qve(e){return Math.max(0,-hT(Math.abs(e)))}function epe(e,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(hT(n)/3)))*3-hT(Math.abs(e)))}function tpe(e,n){return e=Math.abs(e),n=Math.abs(n)-e,Math.max(0,hT(n)-hT(e))+1}function rZ(e,n,S,L){var re=Tz(e,n,S),ve;switch(L=dE(L??",f"),L.type){case"s":{var Ce=Math.max(Math.abs(e),Math.abs(n));return L.precision==null&&!isNaN(ve=epe(re,Ce))&&(L.precision=ve),tZ(L,Ce)}case"":case"e":case"g":case"p":case"r":{L.precision==null&&!isNaN(ve=tpe(re,Math.max(Math.abs(e),Math.abs(n))))&&(L.precision=ve-(L.type==="e"));break}case"f":case"%":{L.precision==null&&!isNaN(ve=Qve(re))&&(L.precision=ve-(L.type==="%")*2);break}}return c9(L)}function dx(e){var n=e.domain;return e.ticks=function(S){var L=n();return bz(L[0],L[L.length-1],S??10)},e.tickFormat=function(S,L){var re=n();return rZ(re[0],re[re.length-1],S??10,L)},e.nice=function(S){S==null&&(S=10);var L=n(),re=0,ve=L.length-1,Ce=L[re],Be=L[ve],Xe,Ke,vt=10;for(Be<Ce&&(Ke=Ce,Ce=Be,Be=Ke,Ke=re,re=ve,ve=Ke);vt-- >0;){if(Ke=wz(Ce,Be,S),Ke===Xe)return L[re]=Ce,L[ve]=Be,n(L);if(Ke>0)Ce=Math.floor(Ce/Ke)*Ke,Be=Math.ceil(Be/Ke)*Ke;else if(Ke<0)Ce=Math.ceil(Ce*Ke)/Ke,Be=Math.floor(Be*Ke)/Ke;else break;Xe=Ke}return e},e}function Qk(){var e=l9();return e.copy=function(){return GE(e,Qk())},L0.apply(e,arguments),dx(e)}function nZ(e){var n;function S(L){return L==null||isNaN(L=+L)?n:L}return S.invert=S,S.domain=S.range=function(L){return arguments.length?(e=Array.from(L,Kk),S):e.slice()},S.unknown=function(L){return arguments.length?(n=L,S):n},S.copy=function(){return nZ(e).unknown(n)},e=arguments.length?Array.from(e,Kk):[0,1],dx(S)}function aZ(e,n){e=e.slice();var S=0,L=e.length-1,re=e[S],ve=e[L],Ce;return ve<re&&(Ce=S,S=L,L=Ce,Ce=re,re=ve,ve=Ce),e[S]=n.floor(re),e[L]=n.ceil(ve),e}function cH(e){return Math.log(e)}function fH(e){return Math.exp(e)}function rpe(e){return-Math.log(-e)}function npe(e){return-Math.exp(-e)}function ape(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ipe(e){return e===10?ape:e===Math.E?Math.exp:n=>Math.pow(e,n)}function ope(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),n=>Math.log(n)/e)}function hH(e){return(n,S)=>-e(-n,S)}function f9(e){const n=e(cH,fH),S=n.domain;let L=10,re,ve;function Ce(){return re=ope(L),ve=ipe(L),S()[0]<0?(re=hH(re),ve=hH(ve),e(rpe,npe)):e(cH,fH),n}return n.base=function(Be){return arguments.length?(L=+Be,Ce()):L},n.domain=function(Be){return arguments.length?(S(Be),Ce()):S()},n.ticks=Be=>{const Xe=S();let Ke=Xe[0],vt=Xe[Xe.length-1];const yt=vt<Ke;yt&&([Ke,vt]=[vt,Ke]);let Gt=re(Ke),$t=re(vt),gr,sr;const nr=Be==null?10:+Be;let jr=[];if(!(L%1)&&$t-Gt<nr){if(Gt=Math.floor(Gt),$t=Math.ceil($t),Ke>0){for(;Gt<=$t;++Gt)for(gr=1;gr<L;++gr)if(sr=Gt<0?gr/ve(-Gt):gr*ve(Gt),!(sr<Ke)){if(sr>vt)break;jr.push(sr)}}else for(;Gt<=$t;++Gt)for(gr=L-1;gr>=1;--gr)if(sr=Gt>0?gr/ve(-Gt):gr*ve(Gt),!(sr<Ke)){if(sr>vt)break;jr.push(sr)}jr.length*2<nr&&(jr=bz(Ke,vt,nr))}else jr=bz(Gt,$t,Math.min($t-Gt,nr)).map(ve);return yt?jr.reverse():jr},n.tickFormat=(Be,Xe)=>{if(Be==null&&(Be=10),Xe==null&&(Xe=L===10?"s":","),typeof Xe!="function"&&(!(L%1)&&(Xe=dE(Xe)).precision==null&&(Xe.trim=!0),Xe=c9(Xe)),Be===1/0)return Xe;const Ke=Math.max(1,L*Be/n.ticks().length);return vt=>{let yt=vt/ve(Math.round(re(vt)));return yt*L<L-.5&&(yt*=L),yt<=Ke?Xe(vt):""}},n.nice=()=>S(aZ(S(),{floor:Be=>ve(Math.floor(re(Be))),ceil:Be=>ve(Math.ceil(re(Be)))})),n}function iZ(){const e=f9(JP()).domain([1,10]);return e.copy=()=>GE(e,iZ()).base(e.base()),L0.apply(e,arguments),e}function dH(e){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/e))}}function vH(e){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*e}}function h9(e){var n=1,S=e(dH(n),vH(n));return S.constant=function(L){return arguments.length?e(dH(n=+L),vH(n)):n},dx(S)}function oZ(){var e=h9(JP());return e.copy=function(){return GE(e,oZ()).constant(e.constant())},L0.apply(e,arguments)}function pH(e){return function(n){return n<0?-Math.pow(-n,e):Math.pow(n,e)}}function spe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function lpe(e){return e<0?-e*e:e*e}function d9(e){var n=e(rm,rm),S=1;function L(){return S===1?e(rm,rm):S===.5?e(spe,lpe):e(pH(S),pH(1/S))}return n.exponent=function(re){return arguments.length?(S=+re,L()):S},dx(n)}function v9(){var e=d9(JP());return e.copy=function(){return GE(e,v9()).exponent(e.exponent())},L0.apply(e,arguments),e}function upe(){return v9.apply(null,arguments).exponent(.5)}function mH(e){return Math.sign(e)*e*e}function cpe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function sZ(){var e=l9(),n=[0,1],S=!1,L;function re(ve){var Ce=cpe(e(ve));return isNaN(Ce)?L:S?Math.round(Ce):Ce}return re.invert=function(ve){return e.invert(mH(ve))},re.domain=function(ve){return arguments.length?(e.domain(ve),re):e.domain()},re.range=function(ve){return arguments.length?(e.range((n=Array.from(ve,Kk)).map(mH)),re):n.slice()},re.rangeRound=function(ve){return re.range(ve).round(!0)},re.round=function(ve){return arguments.length?(S=!!ve,re):S},re.clamp=function(ve){return arguments.length?(e.clamp(ve),re):e.clamp()},re.unknown=function(ve){return arguments.length?(L=ve,re):L},re.copy=function(){return sZ(e.domain(),n).round(S).clamp(e.clamp()).unknown(L)},L0.apply(re,arguments),dx(re)}function lZ(){var e=[],n=[],S=[],L;function re(){var Ce=0,Be=Math.max(1,n.length);for(S=new Array(Be-1);++Ce<Be;)S[Ce-1]=pve(e,Ce/Be);return ve}function ve(Ce){return Ce==null||isNaN(Ce=+Ce)?L:n[VE(S,Ce)]}return ve.invertExtent=function(Ce){var Be=n.indexOf(Ce);return Be<0?[NaN,NaN]:[Be>0?S[Be-1]:e[0],Be<S.length?S[Be]:e[e.length-1]]},ve.domain=function(Ce){if(!arguments.length)return e.slice();e=[];for(let Be of Ce)Be!=null&&!isNaN(Be=+Be)&&e.push(Be);return e.sort(lx),re()},ve.range=function(Ce){return arguments.length?(n=Array.from(Ce),re()):n.slice()},ve.unknown=function(Ce){return arguments.length?(L=Ce,ve):L},ve.quantiles=function(){return S.slice()},ve.copy=function(){return lZ().domain(e).range(n).unknown(L)},L0.apply(ve,arguments)}function uZ(){var e=0,n=1,S=1,L=[.5],re=[0,1],ve;function Ce(Xe){return Xe!=null&&Xe<=Xe?re[VE(L,Xe,0,S)]:ve}function Be(){var Xe=-1;for(L=new Array(S);++Xe<S;)L[Xe]=((Xe+1)*n-(Xe-S)*e)/(S+1);return Ce}return Ce.domain=function(Xe){return arguments.length?([e,n]=Xe,e=+e,n=+n,Be()):[e,n]},Ce.range=function(Xe){return arguments.length?(S=(re=Array.from(Xe)).length-1,Be()):re.slice()},Ce.invertExtent=function(Xe){var Ke=re.indexOf(Xe);return Ke<0?[NaN,NaN]:Ke<1?[e,L[0]]:Ke>=S?[L[S-1],n]:[L[Ke-1],L[Ke]]},Ce.unknown=function(Xe){return arguments.length&&(ve=Xe),Ce},Ce.thresholds=function(){return L.slice()},Ce.copy=function(){return uZ().domain([e,n]).range(re).unknown(ve)},L0.apply(dx(Ce),arguments)}function cZ(){var e=[.5],n=[0,1],S,L=1;function re(ve){return ve!=null&&ve<=ve?n[VE(e,ve,0,L)]:S}return re.domain=function(ve){return arguments.length?(e=Array.from(ve),L=Math.min(e.length,n.length-1),re):e.slice()},re.range=function(ve){return arguments.length?(n=Array.from(ve),L=Math.min(e.length,n.length-1),re):n.slice()},re.invertExtent=function(ve){var Ce=n.indexOf(ve);return[e[Ce-1],e[Ce]]},re.unknown=function(ve){return arguments.length?(S=ve,re):S},re.copy=function(){return cZ().domain(e).range(n).unknown(S)},L0.apply(re,arguments)}const J4=new Date,Q4=new Date;function Ov(e,n,S,L){function re(ve){return e(ve=arguments.length===0?new Date:new Date(+ve)),ve}return re.floor=ve=>(e(ve=new Date(+ve)),ve),re.ceil=ve=>(e(ve=new Date(ve-1)),n(ve,1),e(ve),ve),re.round=ve=>{const Ce=re(ve),Be=re.ceil(ve);return ve-Ce<Be-ve?Ce:Be},re.offset=(ve,Ce)=>(n(ve=new Date(+ve),Ce==null?1:Math.floor(Ce)),ve),re.range=(ve,Ce,Be)=>{const Xe=[];if(ve=re.ceil(ve),Be=Be==null?1:Math.floor(Be),!(ve<Ce)||!(Be>0))return Xe;let Ke;do Xe.push(Ke=new Date(+ve)),n(ve,Be),e(ve);while(Ke<ve&&ve<Ce);return Xe},re.filter=ve=>Ov(Ce=>{if(Ce>=Ce)for(;e(Ce),!ve(Ce);)Ce.setTime(Ce-1)},(Ce,Be)=>{if(Ce>=Ce)if(Be<0)for(;++Be<=0;)for(;n(Ce,-1),!ve(Ce););else for(;--Be>=0;)for(;n(Ce,1),!ve(Ce););}),S&&(re.count=(ve,Ce)=>(J4.setTime(+ve),Q4.setTime(+Ce),e(J4),e(Q4),Math.floor(S(J4,Q4))),re.every=ve=>(ve=Math.floor(ve),!isFinite(ve)||!(ve>0)?null:ve>1?re.filter(L?Ce=>L(Ce)%ve===0:Ce=>re.count(0,Ce)%ve===0):re)),re}const eP=Ov(()=>{},(e,n)=>{e.setTime(+e+n)},(e,n)=>n-e);eP.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ov(n=>{n.setTime(Math.floor(n/e)*e)},(n,S)=>{n.setTime(+n+S*e)},(n,S)=>(S-n)/e):eP);eP.range;const g1=1e3,M0=g1*60,_1=M0*60,A1=_1*24,p9=A1*7,yH=A1*30,eO=A1*365,aw=Ov(e=>{e.setTime(e-e.getMilliseconds())},(e,n)=>{e.setTime(+e+n*g1)},(e,n)=>(n-e)/g1,e=>e.getUTCSeconds());aw.range;const m9=Ov(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*g1)},(e,n)=>{e.setTime(+e+n*M0)},(e,n)=>(n-e)/M0,e=>e.getMinutes());m9.range;const y9=Ov(e=>{e.setUTCSeconds(0,0)},(e,n)=>{e.setTime(+e+n*M0)},(e,n)=>(n-e)/M0,e=>e.getUTCMinutes());y9.range;const g9=Ov(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*g1-e.getMinutes()*M0)},(e,n)=>{e.setTime(+e+n*_1)},(e,n)=>(n-e)/_1,e=>e.getHours());g9.range;const _9=Ov(e=>{e.setUTCMinutes(0,0,0)},(e,n)=>{e.setTime(+e+n*_1)},(e,n)=>(n-e)/_1,e=>e.getUTCHours());_9.range;const XE=Ov(e=>e.setHours(0,0,0,0),(e,n)=>e.setDate(e.getDate()+n),(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*M0)/A1,e=>e.getDate()-1);XE.range;const QP=Ov(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/A1,e=>e.getUTCDate()-1);QP.range;const fZ=Ov(e=>{e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n)},(e,n)=>(n-e)/A1,e=>Math.floor(e/A1));fZ.range;function ww(e){return Ov(n=>{n.setDate(n.getDate()-(n.getDay()+7-e)%7),n.setHours(0,0,0,0)},(n,S)=>{n.setDate(n.getDate()+S*7)},(n,S)=>(S-n-(S.getTimezoneOffset()-n.getTimezoneOffset())*M0)/p9)}const eL=ww(0),tP=ww(1),fpe=ww(2),hpe=ww(3),dT=ww(4),dpe=ww(5),vpe=ww(6);eL.range;tP.range;fpe.range;hpe.range;dT.range;dpe.range;vpe.range;function Tw(e){return Ov(n=>{n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-e)%7),n.setUTCHours(0,0,0,0)},(n,S)=>{n.setUTCDate(n.getUTCDate()+S*7)},(n,S)=>(S-n)/p9)}const tL=Tw(0),rP=Tw(1),ppe=Tw(2),mpe=Tw(3),vT=Tw(4),ype=Tw(5),gpe=Tw(6);tL.range;rP.range;ppe.range;mpe.range;vT.range;ype.range;gpe.range;const x9=Ov(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,n)=>{e.setMonth(e.getMonth()+n)},(e,n)=>n.getMonth()-e.getMonth()+(n.getFullYear()-e.getFullYear())*12,e=>e.getMonth());x9.range;const b9=Ov(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCMonth(e.getUTCMonth()+n)},(e,n)=>n.getUTCMonth()-e.getUTCMonth()+(n.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());b9.range;const S1=Ov(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n)},(e,n)=>n.getFullYear()-e.getFullYear(),e=>e.getFullYear());S1.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ov(n=>{n.setFullYear(Math.floor(n.getFullYear()/e)*e),n.setMonth(0,1),n.setHours(0,0,0,0)},(n,S)=>{n.setFullYear(n.getFullYear()+S*e)});S1.range;const E1=Ov(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n)},(e,n)=>n.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());E1.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ov(n=>{n.setUTCFullYear(Math.floor(n.getUTCFullYear()/e)*e),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},(n,S)=>{n.setUTCFullYear(n.getUTCFullYear()+S*e)});E1.range;function hZ(e,n,S,L,re,ve){const Ce=[[aw,1,g1],[aw,5,5*g1],[aw,15,15*g1],[aw,30,30*g1],[ve,1,M0],[ve,5,5*M0],[ve,15,15*M0],[ve,30,30*M0],[re,1,_1],[re,3,3*_1],[re,6,6*_1],[re,12,12*_1],[L,1,A1],[L,2,2*A1],[S,1,p9],[n,1,yH],[n,3,3*yH],[e,1,eO]];function Be(Ke,vt,yt){const Gt=vt<Ke;Gt&&([Ke,vt]=[vt,Ke]);const $t=yt&&typeof yt.range=="function"?yt:Xe(Ke,vt,yt),gr=$t?$t.range(Ke,+vt+1):[];return Gt?gr.reverse():gr}function Xe(Ke,vt,yt){const Gt=Math.abs(vt-Ke)/yt,$t=n9(([,,nr])=>nr).right(Ce,Gt);if($t===Ce.length)return e.every(Tz(Ke/eO,vt/eO,yt));if($t===0)return eP.every(Math.max(Tz(Ke,vt,yt),1));const[gr,sr]=Ce[Gt/Ce[$t-1][2]<Ce[$t][2]/Gt?$t-1:$t];return gr.every(sr)}return[Be,Xe]}const[_pe,xpe]=hZ(E1,b9,tL,fZ,_9,y9),[bpe,wpe]=hZ(S1,x9,eL,XE,g9,m9);function tO(e){if(0<=e.y&&e.y<100){var n=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return n.setFullYear(e.y),n}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function rO(e){if(0<=e.y&&e.y<100){var n=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return n.setUTCFullYear(e.y),n}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function N5(e,n,S){return{y:e,m:n,d:S,H:0,M:0,S:0,L:0}}function Tpe(e){var n=e.dateTime,S=e.date,L=e.time,re=e.periods,ve=e.days,Ce=e.shortDays,Be=e.months,Xe=e.shortMonths,Ke=F5(re),vt=B5(re),yt=F5(ve),Gt=B5(ve),$t=F5(Ce),gr=B5(Ce),sr=F5(Be),nr=B5(Be),jr=F5(Xe),Ne=B5(Xe),an={a:Ra,A:vi,b:Pi,B:Eo,c:null,d:TH,e:TH,f:Xpe,g:rme,G:ame,H:Vpe,I:Hpe,j:Gpe,L:dZ,m:Wpe,M:Ype,p:ma,q:_a,Q:EH,s:MH,S:Zpe,u:$pe,U:Kpe,V:Jpe,w:Qpe,W:eme,x:null,X:null,y:tme,Y:nme,Z:ime,"%":SH},yn={a:Li,A:so,b:Ro,B:co,c:null,d:AH,e:AH,f:ume,g:_me,G:bme,H:ome,I:sme,j:lme,L:pZ,m:cme,M:fme,p:$o,q:$u,Q:EH,s:MH,S:hme,u:dme,U:vme,V:pme,w:mme,W:yme,x:null,X:null,y:gme,Y:xme,Z:wme,"%":SH},Lr={a:Na,A:zn,b:ta,B:qa,c:la,d:bH,e:bH,f:Bpe,g:xH,G:_H,H:wH,I:wH,j:Ope,L:Fpe,m:Dpe,M:zpe,p:xn,q:Ipe,Q:Upe,s:qpe,S:Npe,u:Cpe,U:kpe,V:Ppe,w:Mpe,W:Lpe,x:ja,X:pa,y:xH,Y:_H,Z:Rpe,"%":jpe};an.x=$r(S,an),an.X=$r(L,an),an.c=$r(n,an),yn.x=$r(S,yn),yn.X=$r(L,yn),yn.c=$r(n,yn);function $r(Bo,Ml){return function(ns){var Do=[],lu=-1,io=0,$c=Bo.length,sf,rv,gd;for(ns instanceof Date||(ns=new Date(+ns));++lu<$c;)Bo.charCodeAt(lu)===37&&(Do.push(Bo.slice(io,lu)),(rv=gH[sf=Bo.charAt(++lu)])!=null?sf=Bo.charAt(++lu):rv=sf==="e"?" ":"0",(gd=Ml[sf])&&(sf=gd(ns,rv)),Do.push(sf),io=lu+1);return Do.push(Bo.slice(io,lu)),Do.join("")}}function dn(Bo,Ml){return function(ns){var Do=N5(1900,void 0,1),lu=Jn(Do,Bo,ns+="",0),io,$c;if(lu!=ns.length)return null;if("Q"in Do)return new Date(Do.Q);if("s"in Do)return new Date(Do.s*1e3+("L"in Do?Do.L:0));if(Ml&&!("Z"in Do)&&(Do.Z=0),"p"in Do&&(Do.H=Do.H%12+Do.p*12),Do.m===void 0&&(Do.m="q"in Do?Do.q:0),"V"in Do){if(Do.V<1||Do.V>53)return null;"w"in Do||(Do.w=1),"Z"in Do?(io=rO(N5(Do.y,0,1)),$c=io.getUTCDay(),io=$c>4||$c===0?rP.ceil(io):rP(io),io=QP.offset(io,(Do.V-1)*7),Do.y=io.getUTCFullYear(),Do.m=io.getUTCMonth(),Do.d=io.getUTCDate()+(Do.w+6)%7):(io=tO(N5(Do.y,0,1)),$c=io.getDay(),io=$c>4||$c===0?tP.ceil(io):tP(io),io=XE.offset(io,(Do.V-1)*7),Do.y=io.getFullYear(),Do.m=io.getMonth(),Do.d=io.getDate()+(Do.w+6)%7)}else("W"in Do||"U"in Do)&&("w"in Do||(Do.w="u"in Do?Do.u%7:"W"in Do?1:0),$c="Z"in Do?rO(N5(Do.y,0,1)).getUTCDay():tO(N5(Do.y,0,1)).getDay(),Do.m=0,Do.d="W"in Do?(Do.w+6)%7+Do.W*7-($c+5)%7:Do.w+Do.U*7-($c+6)%7);return"Z"in Do?(Do.H+=Do.Z/100|0,Do.M+=Do.Z%100,rO(Do)):tO(Do)}}function Jn(Bo,Ml,ns,Do){for(var lu=0,io=Ml.length,$c=ns.length,sf,rv;lu<io;){if(Do>=$c)return-1;if(sf=Ml.charCodeAt(lu++),sf===37){if(sf=Ml.charAt(lu++),rv=Lr[sf in gH?Ml.charAt(lu++):sf],!rv||(Do=rv(Bo,ns,Do))<0)return-1}else if(sf!=ns.charCodeAt(Do++))return-1}return Do}function xn(Bo,Ml,ns){var Do=Ke.exec(Ml.slice(ns));return Do?(Bo.p=vt.get(Do[0].toLowerCase()),ns+Do[0].length):-1}function Na(Bo,Ml,ns){var Do=$t.exec(Ml.slice(ns));return Do?(Bo.w=gr.get(Do[0].toLowerCase()),ns+Do[0].length):-1}function zn(Bo,Ml,ns){var Do=yt.exec(Ml.slice(ns));return Do?(Bo.w=Gt.get(Do[0].toLowerCase()),ns+Do[0].length):-1}function ta(Bo,Ml,ns){var Do=jr.exec(Ml.slice(ns));return Do?(Bo.m=Ne.get(Do[0].toLowerCase()),ns+Do[0].length):-1}function qa(Bo,Ml,ns){var Do=sr.exec(Ml.slice(ns));return Do?(Bo.m=nr.get(Do[0].toLowerCase()),ns+Do[0].length):-1}function la(Bo,Ml,ns){return Jn(Bo,n,Ml,ns)}function ja(Bo,Ml,ns){return Jn(Bo,S,Ml,ns)}function pa(Bo,Ml,ns){return Jn(Bo,L,Ml,ns)}function Ra(Bo){return Ce[Bo.getDay()]}function vi(Bo){return ve[Bo.getDay()]}function Pi(Bo){return Xe[Bo.getMonth()]}function Eo(Bo){return Be[Bo.getMonth()]}function ma(Bo){return re[+(Bo.getHours()>=12)]}function _a(Bo){return 1+~~(Bo.getMonth()/3)}function Li(Bo){return Ce[Bo.getUTCDay()]}function so(Bo){return ve[Bo.getUTCDay()]}function Ro(Bo){return Xe[Bo.getUTCMonth()]}function co(Bo){return Be[Bo.getUTCMonth()]}function $o(Bo){return re[+(Bo.getUTCHours()>=12)]}function $u(Bo){return 1+~~(Bo.getUTCMonth()/3)}return{format:function(Bo){var Ml=$r(Bo+="",an);return Ml.toString=function(){return Bo},Ml},parse:function(Bo){var Ml=dn(Bo+="",!1);return Ml.toString=function(){return Bo},Ml},utcFormat:function(Bo){var Ml=$r(Bo+="",yn);return Ml.toString=function(){return Bo},Ml},utcParse:function(Bo){var Ml=dn(Bo+="",!0);return Ml.toString=function(){return Bo},Ml}}}var gH={"-":"",_:" ",0:"0"},Qv=/^\s*\d+/,Ape=/^%/,Spe=/[\\^$*+?|[\]().{}]/g;function _f(e,n,S){var L=e<0?"-":"",re=(L?-e:e)+"",ve=re.length;return L+(ve<S?new Array(S-ve+1).join(n)+re:re)}function Epe(e){return e.replace(Spe,"\\$&")}function F5(e){return new RegExp("^(?:"+e.map(Epe).join("|")+")","i")}function B5(e){return new Map(e.map((n,S)=>[n.toLowerCase(),S]))}function Mpe(e,n,S){var L=Qv.exec(n.slice(S,S+1));return L?(e.w=+L[0],S+L[0].length):-1}function Cpe(e,n,S){var L=Qv.exec(n.slice(S,S+1));return L?(e.u=+L[0],S+L[0].length):-1}function kpe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.U=+L[0],S+L[0].length):-1}function Ppe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.V=+L[0],S+L[0].length):-1}function Lpe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.W=+L[0],S+L[0].length):-1}function _H(e,n,S){var L=Qv.exec(n.slice(S,S+4));return L?(e.y=+L[0],S+L[0].length):-1}function xH(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.y=+L[0]+(+L[0]>68?1900:2e3),S+L[0].length):-1}function Rpe(e,n,S){var L=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(S,S+6));return L?(e.Z=L[1]?0:-(L[2]+(L[3]||"00")),S+L[0].length):-1}function Ipe(e,n,S){var L=Qv.exec(n.slice(S,S+1));return L?(e.q=L[0]*3-3,S+L[0].length):-1}function Dpe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.m=L[0]-1,S+L[0].length):-1}function bH(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.d=+L[0],S+L[0].length):-1}function Ope(e,n,S){var L=Qv.exec(n.slice(S,S+3));return L?(e.m=0,e.d=+L[0],S+L[0].length):-1}function wH(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.H=+L[0],S+L[0].length):-1}function zpe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.M=+L[0],S+L[0].length):-1}function Npe(e,n,S){var L=Qv.exec(n.slice(S,S+2));return L?(e.S=+L[0],S+L[0].length):-1}function Fpe(e,n,S){var L=Qv.exec(n.slice(S,S+3));return L?(e.L=+L[0],S+L[0].length):-1}function Bpe(e,n,S){var L=Qv.exec(n.slice(S,S+6));return L?(e.L=Math.floor(L[0]/1e3),S+L[0].length):-1}function jpe(e,n,S){var L=Ape.exec(n.slice(S,S+1));return L?S+L[0].length:-1}function Upe(e,n,S){var L=Qv.exec(n.slice(S));return L?(e.Q=+L[0],S+L[0].length):-1}function qpe(e,n,S){var L=Qv.exec(n.slice(S));return L?(e.s=+L[0],S+L[0].length):-1}function TH(e,n){return _f(e.getDate(),n,2)}function Vpe(e,n){return _f(e.getHours(),n,2)}function Hpe(e,n){return _f(e.getHours()%12||12,n,2)}function Gpe(e,n){return _f(1+XE.count(S1(e),e),n,3)}function dZ(e,n){return _f(e.getMilliseconds(),n,3)}function Xpe(e,n){return dZ(e,n)+"000"}function Wpe(e,n){return _f(e.getMonth()+1,n,2)}function Ype(e,n){return _f(e.getMinutes(),n,2)}function Zpe(e,n){return _f(e.getSeconds(),n,2)}function $pe(e){var n=e.getDay();return n===0?7:n}function Kpe(e,n){return _f(eL.count(S1(e)-1,e),n,2)}function vZ(e){var n=e.getDay();return n>=4||n===0?dT(e):dT.ceil(e)}function Jpe(e,n){return e=vZ(e),_f(dT.count(S1(e),e)+(S1(e).getDay()===4),n,2)}function Qpe(e){return e.getDay()}function eme(e,n){return _f(tP.count(S1(e)-1,e),n,2)}function tme(e,n){return _f(e.getFullYear()%100,n,2)}function rme(e,n){return e=vZ(e),_f(e.getFullYear()%100,n,2)}function nme(e,n){return _f(e.getFullYear()%1e4,n,4)}function ame(e,n){var S=e.getDay();return e=S>=4||S===0?dT(e):dT.ceil(e),_f(e.getFullYear()%1e4,n,4)}function ime(e){var n=e.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+_f(n/60|0,"0",2)+_f(n%60,"0",2)}function AH(e,n){return _f(e.getUTCDate(),n,2)}function ome(e,n){return _f(e.getUTCHours(),n,2)}function sme(e,n){return _f(e.getUTCHours()%12||12,n,2)}function lme(e,n){return _f(1+QP.count(E1(e),e),n,3)}function pZ(e,n){return _f(e.getUTCMilliseconds(),n,3)}function ume(e,n){return pZ(e,n)+"000"}function cme(e,n){return _f(e.getUTCMonth()+1,n,2)}function fme(e,n){return _f(e.getUTCMinutes(),n,2)}function hme(e,n){return _f(e.getUTCSeconds(),n,2)}function dme(e){var n=e.getUTCDay();return n===0?7:n}function vme(e,n){return _f(tL.count(E1(e)-1,e),n,2)}function mZ(e){var n=e.getUTCDay();return n>=4||n===0?vT(e):vT.ceil(e)}function pme(e,n){return e=mZ(e),_f(vT.count(E1(e),e)+(E1(e).getUTCDay()===4),n,2)}function mme(e){return e.getUTCDay()}function yme(e,n){return _f(rP.count(E1(e)-1,e),n,2)}function gme(e,n){return _f(e.getUTCFullYear()%100,n,2)}function _me(e,n){return e=mZ(e),_f(e.getUTCFullYear()%100,n,2)}function xme(e,n){return _f(e.getUTCFullYear()%1e4,n,4)}function bme(e,n){var S=e.getUTCDay();return e=S>=4||S===0?vT(e):vT.ceil(e),_f(e.getUTCFullYear()%1e4,n,4)}function wme(){return"+0000"}function SH(){return"%"}function EH(e){return+e}function MH(e){return Math.floor(+e/1e3)}var K3,yZ,gZ;Tme({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 Tme(e){return K3=Tpe(e),yZ=K3.format,K3.parse,gZ=K3.utcFormat,K3.utcParse,K3}function Ame(e){return new Date(e)}function Sme(e){return e instanceof Date?+e:+new Date(+e)}function w9(e,n,S,L,re,ve,Ce,Be,Xe,Ke){var vt=l9(),yt=vt.invert,Gt=vt.domain,$t=Ke(".%L"),gr=Ke(":%S"),sr=Ke("%I:%M"),nr=Ke("%I %p"),jr=Ke("%a %d"),Ne=Ke("%b %d"),an=Ke("%B"),yn=Ke("%Y");function Lr($r){return(Xe($r)<$r?$t:Be($r)<$r?gr:Ce($r)<$r?sr:ve($r)<$r?nr:L($r)<$r?re($r)<$r?jr:Ne:S($r)<$r?an:yn)($r)}return vt.invert=function($r){return new Date(yt($r))},vt.domain=function($r){return arguments.length?Gt(Array.from($r,Sme)):Gt().map(Ame)},vt.ticks=function($r){var dn=Gt();return e(dn[0],dn[dn.length-1],$r??10)},vt.tickFormat=function($r,dn){return dn==null?Lr:Ke(dn)},vt.nice=function($r){var dn=Gt();return(!$r||typeof $r.range!="function")&&($r=n(dn[0],dn[dn.length-1],$r??10)),$r?Gt(aZ(dn,$r)):vt},vt.copy=function(){return GE(vt,w9(e,n,S,L,re,ve,Ce,Be,Xe,Ke))},vt}function Eme(){return L0.apply(w9(bpe,wpe,S1,x9,eL,XE,g9,m9,aw,yZ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Mme(){return L0.apply(w9(_pe,xpe,E1,b9,tL,QP,_9,y9,aw,gZ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function rL(){var e=0,n=1,S,L,re,ve,Ce=rm,Be=!1,Xe;function Ke(yt){return yt==null||isNaN(yt=+yt)?Xe:Ce(re===0?.5:(yt=(ve(yt)-S)*re,Be?Math.max(0,Math.min(1,yt)):yt))}Ke.domain=function(yt){return arguments.length?([e,n]=yt,S=ve(e=+e),L=ve(n=+n),re=S===L?0:1/(L-S),Ke):[e,n]},Ke.clamp=function(yt){return arguments.length?(Be=!!yt,Ke):Be},Ke.interpolator=function(yt){return arguments.length?(Ce=yt,Ke):Ce};function vt(yt){return function(Gt){var $t,gr;return arguments.length?([$t,gr]=Gt,Ce=yt($t,gr),Ke):[Ce(0),Ce(1)]}}return Ke.range=vt(UT),Ke.rangeRound=vt(s9),Ke.unknown=function(yt){return arguments.length?(Xe=yt,Ke):Xe},function(yt){return ve=yt,S=yt(e),L=yt(n),re=S===L?0:1/(L-S),Ke}}function vx(e,n){return n.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function _Z(){var e=dx(rL()(rm));return e.copy=function(){return vx(e,_Z())},k1.apply(e,arguments)}function xZ(){var e=f9(rL()).domain([1,10]);return e.copy=function(){return vx(e,xZ()).base(e.base())},k1.apply(e,arguments)}function bZ(){var e=h9(rL());return e.copy=function(){return vx(e,bZ()).constant(e.constant())},k1.apply(e,arguments)}function T9(){var e=d9(rL());return e.copy=function(){return vx(e,T9()).exponent(e.exponent())},k1.apply(e,arguments)}function Cme(){return T9.apply(null,arguments).exponent(.5)}function wZ(){var e=[],n=rm;function S(L){if(L!=null&&!isNaN(L=+L))return n((VE(e,L,1)-1)/(e.length-1))}return S.domain=function(L){if(!arguments.length)return e.slice();e=[];for(let re of L)re!=null&&!isNaN(re=+re)&&e.push(re);return e.sort(lx),S},S.interpolator=function(L){return arguments.length?(n=L,S):n},S.range=function(){return e.map((L,re)=>n(re/(e.length-1)))},S.quantiles=function(L){return Array.from({length:L+1},(re,ve)=>vve(e,ve/L))},S.copy=function(){return wZ(n).domain(e)},k1.apply(S,arguments)}function nL(){var e=0,n=.5,S=1,L=1,re,ve,Ce,Be,Xe,Ke=rm,vt,yt=!1,Gt;function $t(sr){return isNaN(sr=+sr)?Gt:(sr=.5+((sr=+vt(sr))-ve)*(L*sr<L*ve?Be:Xe),Ke(yt?Math.max(0,Math.min(1,sr)):sr))}$t.domain=function(sr){return arguments.length?([e,n,S]=sr,re=vt(e=+e),ve=vt(n=+n),Ce=vt(S=+S),Be=re===ve?0:.5/(ve-re),Xe=ve===Ce?0:.5/(Ce-ve),L=ve<re?-1:1,$t):[e,n,S]},$t.clamp=function(sr){return arguments.length?(yt=!!sr,$t):yt},$t.interpolator=function(sr){return arguments.length?(Ke=sr,$t):Ke};function gr(sr){return function(nr){var jr,Ne,an;return arguments.length?([jr,Ne,an]=nr,Ke=jve(sr,[jr,Ne,an]),$t):[Ke(0),Ke(.5),Ke(1)]}}return $t.range=gr(UT),$t.rangeRound=gr(s9),$t.unknown=function(sr){return arguments.length?(Gt=sr,$t):Gt},function(sr){return vt=sr,re=sr(e),ve=sr(n),Ce=sr(S),Be=re===ve?0:.5/(ve-re),Xe=ve===Ce?0:.5/(Ce-ve),L=ve<re?-1:1,$t}}function TZ(){var e=dx(nL()(rm));return e.copy=function(){return vx(e,TZ())},k1.apply(e,arguments)}function AZ(){var e=f9(nL()).domain([.1,1,10]);return e.copy=function(){return vx(e,AZ()).base(e.base())},k1.apply(e,arguments)}function SZ(){var e=h9(nL());return e.copy=function(){return vx(e,SZ()).constant(e.constant())},k1.apply(e,arguments)}function A9(){var e=d9(nL());return e.copy=function(){return vx(e,A9()).exponent(e.exponent())},k1.apply(e,arguments)}function kme(){return A9.apply(null,arguments).exponent(.5)}const CH=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:uE,scaleDiverging:TZ,scaleDivergingLog:AZ,scaleDivergingPow:A9,scaleDivergingSqrt:kme,scaleDivergingSymlog:SZ,scaleIdentity:nZ,scaleImplicit:Az,scaleLinear:Qk,scaleLog:iZ,scaleOrdinal:a9,scalePoint:Y5,scalePow:v9,scaleQuantile:lZ,scaleQuantize:uZ,scaleRadial:sZ,scaleSequential:_Z,scaleSequentialLog:xZ,scaleSequentialPow:T9,scaleSequentialQuantile:wZ,scaleSequentialSqrt:Cme,scaleSequentialSymlog:bZ,scaleSqrt:upe,scaleSymlog:oZ,scaleThreshold:cZ,scaleTime:Eme,scaleUtc:Mme,tickFormat:rZ},Symbol.toStringTag,{value:"Module"}));var nO,kH;function EZ(){if(kH)return nO;kH=1;var e=NT();function n(S,L,re){for(var ve=-1,Ce=S.length;++ve<Ce;){var Be=S[ve],Xe=L(Be);if(Xe!=null&&(Ke===void 0?Xe===Xe&&!e(Xe):re(Xe,Ke)))var Ke=Xe,vt=Be}return vt}return nO=n,nO}var aO,PH;function Pme(){if(PH)return aO;PH=1;function e(n,S){return n>S}return aO=e,aO}var iO,LH;function Lme(){if(LH)return iO;LH=1;var e=EZ(),n=Pme(),S=jT();function L(re){return re&&re.length?e(re,S,n):void 0}return iO=L,iO}var Rme=Lme();const ax=rh(Rme);var oO,RH;function Ime(){if(RH)return oO;RH=1;function e(n,S){return n<S}return oO=e,oO}var sO,IH;function Dme(){if(IH)return sO;IH=1;var e=EZ(),n=Ime(),S=jT();function L(re){return re&&re.length?e(re,S,n):void 0}return sO=L,sO}var Ome=Dme();const aL=rh(Ome);var lO,DH;function zme(){if(DH)return lO;DH=1;var e=j7(),n=fx(),S=OY(),L=Tm();function re(ve,Ce){var Be=L(ve)?e:S;return Be(ve,n(Ce,3))}return lO=re,lO}var uO,OH;function Nme(){if(OH)return uO;OH=1;var e=IY(),n=zme();function S(L,re){return e(n(L,re),1)}return uO=S,uO}var Fme=Nme();const Bme=rh(Fme);var cO,zH;function jme(){if(zH)return cO;zH=1;var e=J7();function n(S,L){return e(S,L)}return cO=n,cO}var Ume=jme();const mw=rh(Ume);var qT=1e9,qme={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},E9,td=!0,k0="[DecimalError] ",uw=k0+"Invalid argument: ",S9=k0+"Exponent out of range: ",VT=Math.floor,Qb=Math.pow,Vme=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,e0,Jv=1e7,qh=7,MZ=9007199254740991,nP=VT(MZ/qh),ul={};ul.absoluteValue=ul.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};ul.comparedTo=ul.cmp=function(e){var n,S,L,re,ve=this;if(e=new ve.constructor(e),ve.s!==e.s)return ve.s||-e.s;if(ve.e!==e.e)return ve.e>e.e^ve.s<0?1:-1;for(L=ve.d.length,re=e.d.length,n=0,S=L<re?L:re;n<S;++n)if(ve.d[n]!==e.d[n])return ve.d[n]>e.d[n]^ve.s<0?1:-1;return L===re?0:L>re^ve.s<0?1:-1};ul.decimalPlaces=ul.dp=function(){var e=this,n=e.d.length-1,S=(n-e.e)*qh;if(n=e.d[n],n)for(;n%10==0;n/=10)S--;return S<0?0:S};ul.dividedBy=ul.div=function(e){return T1(this,new this.constructor(e))};ul.dividedToIntegerBy=ul.idiv=function(e){var n=this,S=n.constructor;return _h(T1(n,new S(e),0,1),S.precision)};ul.equals=ul.eq=function(e){return!this.cmp(e)};ul.exponent=function(){return mv(this)};ul.greaterThan=ul.gt=function(e){return this.cmp(e)>0};ul.greaterThanOrEqualTo=ul.gte=function(e){return this.cmp(e)>=0};ul.isInteger=ul.isint=function(){return this.e>this.d.length-2};ul.isNegative=ul.isneg=function(){return this.s<0};ul.isPositive=ul.ispos=function(){return this.s>0};ul.isZero=function(){return this.s===0};ul.lessThan=ul.lt=function(e){return this.cmp(e)<0};ul.lessThanOrEqualTo=ul.lte=function(e){return this.cmp(e)<1};ul.logarithm=ul.log=function(e){var n,S=this,L=S.constructor,re=L.precision,ve=re+5;if(e===void 0)e=new L(10);else if(e=new L(e),e.s<1||e.eq(e0))throw Error(k0+"NaN");if(S.s<1)throw Error(k0+(S.s?"NaN":"-Infinity"));return S.eq(e0)?new L(0):(td=!1,n=T1(vE(S,ve),vE(e,ve),ve),td=!0,_h(n,re))};ul.minus=ul.sub=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?PZ(n,e):CZ(n,(e.s=-e.s,e))};ul.modulo=ul.mod=function(e){var n,S=this,L=S.constructor,re=L.precision;if(e=new L(e),!e.s)throw Error(k0+"NaN");return S.s?(td=!1,n=T1(S,e,0,1).times(e),td=!0,S.minus(n)):_h(new L(S),re)};ul.naturalExponential=ul.exp=function(){return kZ(this)};ul.naturalLogarithm=ul.ln=function(){return vE(this)};ul.negated=ul.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};ul.plus=ul.add=function(e){var n=this;return e=new n.constructor(e),n.s==e.s?CZ(n,e):PZ(n,(e.s=-e.s,e))};ul.precision=ul.sd=function(e){var n,S,L,re=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(uw+e);if(n=mv(re)+1,L=re.d.length-1,S=L*qh+1,L=re.d[L],L){for(;L%10==0;L/=10)S--;for(L=re.d[0];L>=10;L/=10)S++}return e&&n>S?n:S};ul.squareRoot=ul.sqrt=function(){var e,n,S,L,re,ve,Ce,Be=this,Xe=Be.constructor;if(Be.s<1){if(!Be.s)return new Xe(0);throw Error(k0+"NaN")}for(e=mv(Be),td=!1,re=Math.sqrt(+Be),re==0||re==1/0?(n=fg(Be.d),(n.length+e)%2==0&&(n+="0"),re=Math.sqrt(n),e=VT((e+1)/2)-(e<0||e%2),re==1/0?n="5e"+e:(n=re.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),L=new Xe(n)):L=new Xe(re.toString()),S=Xe.precision,re=Ce=S+3;;)if(ve=L,L=ve.plus(T1(Be,ve,Ce+2)).times(.5),fg(ve.d).slice(0,Ce)===(n=fg(L.d)).slice(0,Ce)){if(n=n.slice(Ce-3,Ce+1),re==Ce&&n=="4999"){if(_h(ve,S+1,0),ve.times(ve).eq(Be)){L=ve;break}}else if(n!="9999")break;Ce+=4}return td=!0,_h(L,S)};ul.times=ul.mul=function(e){var n,S,L,re,ve,Ce,Be,Xe,Ke,vt=this,yt=vt.constructor,Gt=vt.d,$t=(e=new yt(e)).d;if(!vt.s||!e.s)return new yt(0);for(e.s*=vt.s,S=vt.e+e.e,Xe=Gt.length,Ke=$t.length,Xe<Ke&&(ve=Gt,Gt=$t,$t=ve,Ce=Xe,Xe=Ke,Ke=Ce),ve=[],Ce=Xe+Ke,L=Ce;L--;)ve.push(0);for(L=Ke;--L>=0;){for(n=0,re=Xe+L;re>L;)Be=ve[re]+$t[L]*Gt[re-L-1]+n,ve[re--]=Be%Jv|0,n=Be/Jv|0;ve[re]=(ve[re]+n)%Jv|0}for(;!ve[--Ce];)ve.pop();return n?++S:ve.shift(),e.d=ve,e.e=S,td?_h(e,yt.precision):e};ul.toDecimalPlaces=ul.todp=function(e,n){var S=this,L=S.constructor;return S=new L(S),e===void 0?S:(yg(e,0,qT),n===void 0?n=L.rounding:yg(n,0,8),_h(S,e+mv(S)+1,n))};ul.toExponential=function(e,n){var S,L=this,re=L.constructor;return e===void 0?S=yw(L,!0):(yg(e,0,qT),n===void 0?n=re.rounding:yg(n,0,8),L=_h(new re(L),e+1,n),S=yw(L,!0,e+1)),S};ul.toFixed=function(e,n){var S,L,re=this,ve=re.constructor;return e===void 0?yw(re):(yg(e,0,qT),n===void 0?n=ve.rounding:yg(n,0,8),L=_h(new ve(re),e+mv(re)+1,n),S=yw(L.abs(),!1,e+mv(L)+1),re.isneg()&&!re.isZero()?"-"+S:S)};ul.toInteger=ul.toint=function(){var e=this,n=e.constructor;return _h(new n(e),mv(e)+1,n.rounding)};ul.toNumber=function(){return+this};ul.toPower=ul.pow=function(e){var n,S,L,re,ve,Ce,Be=this,Xe=Be.constructor,Ke=12,vt=+(e=new Xe(e));if(!e.s)return new Xe(e0);if(Be=new Xe(Be),!Be.s){if(e.s<1)throw Error(k0+"Infinity");return Be}if(Be.eq(e0))return Be;if(L=Xe.precision,e.eq(e0))return _h(Be,L);if(n=e.e,S=e.d.length-1,Ce=n>=S,ve=Be.s,Ce){if((S=vt<0?-vt:vt)<=MZ){for(re=new Xe(e0),n=Math.ceil(L/qh+4),td=!1;S%2&&(re=re.times(Be),FH(re.d,n)),S=VT(S/2),S!==0;)Be=Be.times(Be),FH(Be.d,n);return td=!0,e.s<0?new Xe(e0).div(re):_h(re,L)}}else if(ve<0)throw Error(k0+"NaN");return ve=ve<0&&e.d[Math.max(n,S)]&1?-1:1,Be.s=1,td=!1,re=e.times(vE(Be,L+Ke)),td=!0,re=kZ(re),re.s=ve,re};ul.toPrecision=function(e,n){var S,L,re=this,ve=re.constructor;return e===void 0?(S=mv(re),L=yw(re,S<=ve.toExpNeg||S>=ve.toExpPos)):(yg(e,1,qT),n===void 0?n=ve.rounding:yg(n,0,8),re=_h(new ve(re),e,n),S=mv(re),L=yw(re,e<=S||S<=ve.toExpNeg,e)),L};ul.toSignificantDigits=ul.tosd=function(e,n){var S=this,L=S.constructor;return e===void 0?(e=L.precision,n=L.rounding):(yg(e,1,qT),n===void 0?n=L.rounding:yg(n,0,8)),_h(new L(S),e,n)};ul.toString=ul.valueOf=ul.val=ul.toJSON=ul[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,n=mv(e),S=e.constructor;return yw(e,n<=S.toExpNeg||n>=S.toExpPos)};function CZ(e,n){var S,L,re,ve,Ce,Be,Xe,Ke,vt=e.constructor,yt=vt.precision;if(!e.s||!n.s)return n.s||(n=new vt(e)),td?_h(n,yt):n;if(Xe=e.d,Ke=n.d,Ce=e.e,re=n.e,Xe=Xe.slice(),ve=Ce-re,ve){for(ve<0?(L=Xe,ve=-ve,Be=Ke.length):(L=Ke,re=Ce,Be=Xe.length),Ce=Math.ceil(yt/qh),Be=Ce>Be?Ce+1:Be+1,ve>Be&&(ve=Be,L.length=1),L.reverse();ve--;)L.push(0);L.reverse()}for(Be=Xe.length,ve=Ke.length,Be-ve<0&&(ve=Be,L=Ke,Ke=Xe,Xe=L),S=0;ve;)S=(Xe[--ve]=Xe[ve]+Ke[ve]+S)/Jv|0,Xe[ve]%=Jv;for(S&&(Xe.unshift(S),++re),Be=Xe.length;Xe[--Be]==0;)Xe.pop();return n.d=Xe,n.e=re,td?_h(n,yt):n}function yg(e,n,S){if(e!==~~e||e<n||e>S)throw Error(uw+e)}function fg(e){var n,S,L,re=e.length-1,ve="",Ce=e[0];if(re>0){for(ve+=Ce,n=1;n<re;n++)L=e[n]+"",S=qh-L.length,S&&(ve+=rx(S)),ve+=L;Ce=e[n],L=Ce+"",S=qh-L.length,S&&(ve+=rx(S))}else if(Ce===0)return"0";for(;Ce%10===0;)Ce/=10;return ve+Ce}var T1=(function(){function e(L,re){var ve,Ce=0,Be=L.length;for(L=L.slice();Be--;)ve=L[Be]*re+Ce,L[Be]=ve%Jv|0,Ce=ve/Jv|0;return Ce&&L.unshift(Ce),L}function n(L,re,ve,Ce){var Be,Xe;if(ve!=Ce)Xe=ve>Ce?1:-1;else for(Be=Xe=0;Be<ve;Be++)if(L[Be]!=re[Be]){Xe=L[Be]>re[Be]?1:-1;break}return Xe}function S(L,re,ve){for(var Ce=0;ve--;)L[ve]-=Ce,Ce=L[ve]<re[ve]?1:0,L[ve]=Ce*Jv+L[ve]-re[ve];for(;!L[0]&&L.length>1;)L.shift()}return function(L,re,ve,Ce){var Be,Xe,Ke,vt,yt,Gt,$t,gr,sr,nr,jr,Ne,an,yn,Lr,$r,dn,Jn,xn=L.constructor,Na=L.s==re.s?1:-1,zn=L.d,ta=re.d;if(!L.s)return new xn(L);if(!re.s)throw Error(k0+"Division by zero");for(Xe=L.e-re.e,dn=ta.length,Lr=zn.length,$t=new xn(Na),gr=$t.d=[],Ke=0;ta[Ke]==(zn[Ke]||0);)++Ke;if(ta[Ke]>(zn[Ke]||0)&&--Xe,ve==null?Ne=ve=xn.precision:Ce?Ne=ve+(mv(L)-mv(re))+1:Ne=ve,Ne<0)return new xn(0);if(Ne=Ne/qh+2|0,Ke=0,dn==1)for(vt=0,ta=ta[0],Ne++;(Ke<Lr||vt)&&Ne--;Ke++)an=vt*Jv+(zn[Ke]||0),gr[Ke]=an/ta|0,vt=an%ta|0;else{for(vt=Jv/(ta[0]+1)|0,vt>1&&(ta=e(ta,vt),zn=e(zn,vt),dn=ta.length,Lr=zn.length),yn=dn,sr=zn.slice(0,dn),nr=sr.length;nr<dn;)sr[nr++]=0;Jn=ta.slice(),Jn.unshift(0),$r=ta[0],ta[1]>=Jv/2&&++$r;do vt=0,Be=n(ta,sr,dn,nr),Be<0?(jr=sr[0],dn!=nr&&(jr=jr*Jv+(sr[1]||0)),vt=jr/$r|0,vt>1?(vt>=Jv&&(vt=Jv-1),yt=e(ta,vt),Gt=yt.length,nr=sr.length,Be=n(yt,sr,Gt,nr),Be==1&&(vt--,S(yt,dn<Gt?Jn:ta,Gt))):(vt==0&&(Be=vt=1),yt=ta.slice()),Gt=yt.length,Gt<nr&&yt.unshift(0),S(sr,yt,nr),Be==-1&&(nr=sr.length,Be=n(ta,sr,dn,nr),Be<1&&(vt++,S(sr,dn<nr?Jn:ta,nr))),nr=sr.length):Be===0&&(vt++,sr=[0]),gr[Ke++]=vt,Be&&sr[0]?sr[nr++]=zn[yn]||0:(sr=[zn[yn]],nr=1);while((yn++<Lr||sr[0]!==void 0)&&Ne--)}return gr[0]||gr.shift(),$t.e=Xe,_h($t,Ce?ve+mv($t)+1:ve)}})();function kZ(e,n){var S,L,re,ve,Ce,Be,Xe=0,Ke=0,vt=e.constructor,yt=vt.precision;if(mv(e)>16)throw Error(S9+mv(e));if(!e.s)return new vt(e0);for(td=!1,Be=yt,Ce=new vt(.03125);e.abs().gte(.1);)e=e.times(Ce),Ke+=5;for(L=Math.log(Qb(2,Ke))/Math.LN10*2+5|0,Be+=L,S=re=ve=new vt(e0),vt.precision=Be;;){if(re=_h(re.times(e),Be),S=S.times(++Xe),Ce=ve.plus(T1(re,S,Be)),fg(Ce.d).slice(0,Be)===fg(ve.d).slice(0,Be)){for(;Ke--;)ve=_h(ve.times(ve),Be);return vt.precision=yt,n==null?(td=!0,_h(ve,yt)):ve}ve=Ce}}function mv(e){for(var n=e.e*qh,S=e.d[0];S>=10;S/=10)n++;return n}function fO(e,n,S){if(n>e.LN10.sd())throw td=!0,S&&(e.precision=S),Error(k0+"LN10 precision limit exceeded");return _h(new e(e.LN10),n)}function rx(e){for(var n="";e--;)n+="0";return n}function vE(e,n){var S,L,re,ve,Ce,Be,Xe,Ke,vt,yt=1,Gt=10,$t=e,gr=$t.d,sr=$t.constructor,nr=sr.precision;if($t.s<1)throw Error(k0+($t.s?"NaN":"-Infinity"));if($t.eq(e0))return new sr(0);if(n==null?(td=!1,Ke=nr):Ke=n,$t.eq(10))return n==null&&(td=!0),fO(sr,Ke);if(Ke+=Gt,sr.precision=Ke,S=fg(gr),L=S.charAt(0),ve=mv($t),Math.abs(ve)<15e14){for(;L<7&&L!=1||L==1&&S.charAt(1)>3;)$t=$t.times(e),S=fg($t.d),L=S.charAt(0),yt++;ve=mv($t),L>1?($t=new sr("0."+S),ve++):$t=new sr(L+"."+S.slice(1))}else return Xe=fO(sr,Ke+2,nr).times(ve+""),$t=vE(new sr(L+"."+S.slice(1)),Ke-Gt).plus(Xe),sr.precision=nr,n==null?(td=!0,_h($t,nr)):$t;for(Be=Ce=$t=T1($t.minus(e0),$t.plus(e0),Ke),vt=_h($t.times($t),Ke),re=3;;){if(Ce=_h(Ce.times(vt),Ke),Xe=Be.plus(T1(Ce,new sr(re),Ke)),fg(Xe.d).slice(0,Ke)===fg(Be.d).slice(0,Ke))return Be=Be.times(2),ve!==0&&(Be=Be.plus(fO(sr,Ke+2,nr).times(ve+""))),Be=T1(Be,new sr(yt),Ke),sr.precision=nr,n==null?(td=!0,_h(Be,nr)):Be;Be=Xe,re+=2}}function NH(e,n){var S,L,re;for((S=n.indexOf("."))>-1&&(n=n.replace(".","")),(L=n.search(/e/i))>0?(S<0&&(S=L),S+=+n.slice(L+1),n=n.substring(0,L)):S<0&&(S=n.length),L=0;n.charCodeAt(L)===48;)++L;for(re=n.length;n.charCodeAt(re-1)===48;)--re;if(n=n.slice(L,re),n){if(re-=L,S=S-L-1,e.e=VT(S/qh),e.d=[],L=(S+1)%qh,S<0&&(L+=qh),L<re){for(L&&e.d.push(+n.slice(0,L)),re-=qh;L<re;)e.d.push(+n.slice(L,L+=qh));n=n.slice(L),L=qh-n.length}else L-=re;for(;L--;)n+="0";if(e.d.push(+n),td&&(e.e>nP||e.e<-nP))throw Error(S9+S)}else e.s=0,e.e=0,e.d=[0];return e}function _h(e,n,S){var L,re,ve,Ce,Be,Xe,Ke,vt,yt=e.d;for(Ce=1,ve=yt[0];ve>=10;ve/=10)Ce++;if(L=n-Ce,L<0)L+=qh,re=n,Ke=yt[vt=0];else{if(vt=Math.ceil((L+1)/qh),ve=yt.length,vt>=ve)return e;for(Ke=ve=yt[vt],Ce=1;ve>=10;ve/=10)Ce++;L%=qh,re=L-qh+Ce}if(S!==void 0&&(ve=Qb(10,Ce-re-1),Be=Ke/ve%10|0,Xe=n<0||yt[vt+1]!==void 0||Ke%ve,Xe=S<4?(Be||Xe)&&(S==0||S==(e.s<0?3:2)):Be>5||Be==5&&(S==4||Xe||S==6&&(L>0?re>0?Ke/Qb(10,Ce-re):0:yt[vt-1])%10&1||S==(e.s<0?8:7))),n<1||!yt[0])return Xe?(ve=mv(e),yt.length=1,n=n-ve-1,yt[0]=Qb(10,(qh-n%qh)%qh),e.e=VT(-n/qh)||0):(yt.length=1,yt[0]=e.e=e.s=0),e;if(L==0?(yt.length=vt,ve=1,vt--):(yt.length=vt+1,ve=Qb(10,qh-L),yt[vt]=re>0?(Ke/Qb(10,Ce-re)%Qb(10,re)|0)*ve:0),Xe)for(;;)if(vt==0){(yt[0]+=ve)==Jv&&(yt[0]=1,++e.e);break}else{if(yt[vt]+=ve,yt[vt]!=Jv)break;yt[vt--]=0,ve=1}for(L=yt.length;yt[--L]===0;)yt.pop();if(td&&(e.e>nP||e.e<-nP))throw Error(S9+mv(e));return e}function PZ(e,n){var S,L,re,ve,Ce,Be,Xe,Ke,vt,yt,Gt=e.constructor,$t=Gt.precision;if(!e.s||!n.s)return n.s?n.s=-n.s:n=new Gt(e),td?_h(n,$t):n;if(Xe=e.d,yt=n.d,L=n.e,Ke=e.e,Xe=Xe.slice(),Ce=Ke-L,Ce){for(vt=Ce<0,vt?(S=Xe,Ce=-Ce,Be=yt.length):(S=yt,L=Ke,Be=Xe.length),re=Math.max(Math.ceil($t/qh),Be)+2,Ce>re&&(Ce=re,S.length=1),S.reverse(),re=Ce;re--;)S.push(0);S.reverse()}else{for(re=Xe.length,Be=yt.length,vt=re<Be,vt&&(Be=re),re=0;re<Be;re++)if(Xe[re]!=yt[re]){vt=Xe[re]<yt[re];break}Ce=0}for(vt&&(S=Xe,Xe=yt,yt=S,n.s=-n.s),Be=Xe.length,re=yt.length-Be;re>0;--re)Xe[Be++]=0;for(re=yt.length;re>Ce;){if(Xe[--re]<yt[re]){for(ve=re;ve&&Xe[--ve]===0;)Xe[ve]=Jv-1;--Xe[ve],Xe[re]+=Jv}Xe[re]-=yt[re]}for(;Xe[--Be]===0;)Xe.pop();for(;Xe[0]===0;Xe.shift())--L;return Xe[0]?(n.d=Xe,n.e=L,td?_h(n,$t):n):new Gt(0)}function yw(e,n,S){var L,re=mv(e),ve=fg(e.d),Ce=ve.length;return n?(S&&(L=S-Ce)>0?ve=ve.charAt(0)+"."+ve.slice(1)+rx(L):Ce>1&&(ve=ve.charAt(0)+"."+ve.slice(1)),ve=ve+(re<0?"e":"e+")+re):re<0?(ve="0."+rx(-re-1)+ve,S&&(L=S-Ce)>0&&(ve+=rx(L))):re>=Ce?(ve+=rx(re+1-Ce),S&&(L=S-re-1)>0&&(ve=ve+"."+rx(L))):((L=re+1)<Ce&&(ve=ve.slice(0,L)+"."+ve.slice(L)),S&&(L=S-Ce)>0&&(re+1===Ce&&(ve+="."),ve+=rx(L))),e.s<0?"-"+ve:ve}function FH(e,n){if(e.length>n)return e.length=n,!0}function LZ(e){var n,S,L;function re(ve){var Ce=this;if(!(Ce instanceof re))return new re(ve);if(Ce.constructor=re,ve instanceof re){Ce.s=ve.s,Ce.e=ve.e,Ce.d=(ve=ve.d)?ve.slice():ve;return}if(typeof ve=="number"){if(ve*0!==0)throw Error(uw+ve);if(ve>0)Ce.s=1;else if(ve<0)ve=-ve,Ce.s=-1;else{Ce.s=0,Ce.e=0,Ce.d=[0];return}if(ve===~~ve&&ve<1e7){Ce.e=0,Ce.d=[ve];return}return NH(Ce,ve.toString())}else if(typeof ve!="string")throw Error(uw+ve);if(ve.charCodeAt(0)===45?(ve=ve.slice(1),Ce.s=-1):Ce.s=1,Vme.test(ve))NH(Ce,ve);else throw Error(uw+ve)}if(re.prototype=ul,re.ROUND_UP=0,re.ROUND_DOWN=1,re.ROUND_CEIL=2,re.ROUND_FLOOR=3,re.ROUND_HALF_UP=4,re.ROUND_HALF_DOWN=5,re.ROUND_HALF_EVEN=6,re.ROUND_HALF_CEIL=7,re.ROUND_HALF_FLOOR=8,re.clone=LZ,re.config=re.set=Hme,e===void 0&&(e={}),e)for(L=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<L.length;)e.hasOwnProperty(S=L[n++])||(e[S]=this[S]);return re.config(e),re}function Hme(e){if(!e||typeof e!="object")throw Error(k0+"Object expected");var n,S,L,re=["precision",1,qT,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(n=0;n<re.length;n+=3)if((L=e[S=re[n]])!==void 0)if(VT(L)===L&&L>=re[n+1]&&L<=re[n+2])this[S]=L;else throw Error(uw+S+": "+L);if((L=e[S="LN10"])!==void 0)if(L==Math.LN10)this[S]=new this(L);else throw Error(uw+S+": "+L);return this}var E9=LZ(qme);e0=new E9(1);const uh=E9;function Gme(e){return Zme(e)||Yme(e)||Wme(e)||Xme()}function Xme(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wme(e,n){if(e){if(typeof e=="string")return Cz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Cz(e,n)}}function Yme(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Zme(e){if(Array.isArray(e))return Cz(e)}function Cz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var $me=function(n){return n},RZ={},IZ=function(n){return n===RZ},BH=function(n){return function S(){return arguments.length===0||arguments.length===1&&IZ(arguments.length<=0?void 0:arguments[0])?S:n.apply(void 0,arguments)}},Kme=function e(n,S){return n===1?S:BH(function(){for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];var Ce=re.filter(function(Be){return Be!==RZ}).length;return Ce>=n?S.apply(void 0,re):e(n-Ce,BH(function(){for(var Be=arguments.length,Xe=new Array(Be),Ke=0;Ke<Be;Ke++)Xe[Ke]=arguments[Ke];var vt=re.map(function(yt){return IZ(yt)?Xe.shift():yt});return S.apply(void 0,Gme(vt).concat(Xe))}))})},iL=function(n){return Kme(n.length,n)},kz=function(n,S){for(var L=[],re=n;re<S;++re)L[re-n]=re;return L},Jme=iL(function(e,n){return Array.isArray(n)?n.map(e):Object.keys(n).map(function(S){return n[S]}).map(e)}),Qme=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];if(!S.length)return $me;var re=S.reverse(),ve=re[0],Ce=re.slice(1);return function(){return Ce.reduce(function(Be,Xe){return Xe(Be)},ve.apply(void 0,arguments))}},Pz=function(n){return Array.isArray(n)?n.reverse():n.split("").reverse.join("")},DZ=function(n){var S=null,L=null;return function(){for(var re=arguments.length,ve=new Array(re),Ce=0;Ce<re;Ce++)ve[Ce]=arguments[Ce];return S&&ve.every(function(Be,Xe){return Be===S[Xe]})||(S=ve,L=n.apply(void 0,ve)),L}};function e0e(e){var n;return e===0?n=1:n=Math.floor(new uh(e).abs().log(10).toNumber())+1,n}function t0e(e,n,S){for(var L=new uh(e),re=0,ve=[];L.lt(n)&&re<1e5;)ve.push(L.toNumber()),L=L.add(S),re++;return ve}var r0e=iL(function(e,n,S){var L=+e,re=+n;return L+S*(re-L)}),n0e=iL(function(e,n,S){var L=n-+e;return L=L||1/0,(S-e)/L}),a0e=iL(function(e,n,S){var L=n-+e;return L=L||1/0,Math.max(0,Math.min(1,(S-e)/L))});const oL={rangeStep:t0e,getDigitCount:e0e,interpolateNumber:r0e,uninterpolateNumber:n0e,uninterpolateTruncation:a0e};function Lz(e){return s0e(e)||o0e(e)||OZ(e)||i0e()}function i0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function o0e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function s0e(e){if(Array.isArray(e))return Rz(e)}function pE(e,n){return c0e(e)||u0e(e,n)||OZ(e,n)||l0e()}function l0e(){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 OZ(e,n){if(e){if(typeof e=="string")return Rz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Rz(e,n)}}function Rz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function u0e(e,n){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var S=[],L=!0,re=!1,ve=void 0;try{for(var Ce=e[Symbol.iterator](),Be;!(L=(Be=Ce.next()).done)&&(S.push(Be.value),!(n&&S.length===n));L=!0);}catch(Xe){re=!0,ve=Xe}finally{try{!L&&Ce.return!=null&&Ce.return()}finally{if(re)throw ve}}return S}}function c0e(e){if(Array.isArray(e))return e}function zZ(e){var n=pE(e,2),S=n[0],L=n[1],re=S,ve=L;return S>L&&(re=L,ve=S),[re,ve]}function NZ(e,n,S){if(e.lte(0))return new uh(0);var L=oL.getDigitCount(e.toNumber()),re=new uh(10).pow(L),ve=e.div(re),Ce=L!==1?.05:.1,Be=new uh(Math.ceil(ve.div(Ce).toNumber())).add(S).mul(Ce),Xe=Be.mul(re);return n?Xe:new uh(Math.ceil(Xe))}function f0e(e,n,S){var L=1,re=new uh(e);if(!re.isint()&&S){var ve=Math.abs(e);ve<1?(L=new uh(10).pow(oL.getDigitCount(e)-1),re=new uh(Math.floor(re.div(L).toNumber())).mul(L)):ve>1&&(re=new uh(Math.floor(e)))}else e===0?re=new uh(Math.floor((n-1)/2)):S||(re=new uh(Math.floor(e)));var Ce=Math.floor((n-1)/2),Be=Qme(Jme(function(Xe){return re.add(new uh(Xe-Ce).mul(L)).toNumber()}),kz);return Be(0,n)}function FZ(e,n,S,L){var re=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-e)/(S-1)))return{step:new uh(0),tickMin:new uh(0),tickMax:new uh(0)};var ve=NZ(new uh(n).sub(e).div(S-1),L,re),Ce;e<=0&&n>=0?Ce=new uh(0):(Ce=new uh(e).add(n).div(2),Ce=Ce.sub(new uh(Ce).mod(ve)));var Be=Math.ceil(Ce.sub(e).div(ve).toNumber()),Xe=Math.ceil(new uh(n).sub(Ce).div(ve).toNumber()),Ke=Be+Xe+1;return Ke>S?FZ(e,n,S,L,re+1):(Ke<S&&(Xe=n>0?Xe+(S-Ke):Xe,Be=n>0?Be:Be+(S-Ke)),{step:ve,tickMin:Ce.sub(new uh(Be).mul(ve)),tickMax:Ce.add(new uh(Xe).mul(ve))})}function h0e(e){var n=pE(e,2),S=n[0],L=n[1],re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Ce=Math.max(re,2),Be=zZ([S,L]),Xe=pE(Be,2),Ke=Xe[0],vt=Xe[1];if(Ke===-1/0||vt===1/0){var yt=vt===1/0?[Ke].concat(Lz(kz(0,re-1).map(function(){return 1/0}))):[].concat(Lz(kz(0,re-1).map(function(){return-1/0})),[vt]);return S>L?Pz(yt):yt}if(Ke===vt)return f0e(Ke,re,ve);var Gt=FZ(Ke,vt,Ce,ve),$t=Gt.step,gr=Gt.tickMin,sr=Gt.tickMax,nr=oL.rangeStep(gr,sr.add(new uh(.1).mul($t)),$t);return S>L?Pz(nr):nr}function d0e(e,n){var S=pE(e,2),L=S[0],re=S[1],ve=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Ce=zZ([L,re]),Be=pE(Ce,2),Xe=Be[0],Ke=Be[1];if(Xe===-1/0||Ke===1/0)return[L,re];if(Xe===Ke)return[Xe];var vt=Math.max(n,2),yt=NZ(new uh(Ke).sub(Xe).div(vt-1),ve,0),Gt=[].concat(Lz(oL.rangeStep(new uh(Xe),new uh(Ke).sub(new uh(.99).mul(yt)),yt)),[Ke]);return L>re?Pz(Gt):Gt}var v0e=DZ(h0e),p0e=DZ(d0e),m0e="Invariant failed";function gw(e,n){throw new Error(m0e)}var y0e=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function pT(e){"@babel/helpers - typeof";return pT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pT(e)}function aP(){return aP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},aP.apply(this,arguments)}function g0e(e,n){return w0e(e)||b0e(e,n)||x0e(e,n)||_0e()}function _0e(){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 x0e(e,n){if(e){if(typeof e=="string")return jH(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return jH(e,n)}}function jH(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function b0e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function w0e(e){if(Array.isArray(e))return e}function T0e(e,n){if(e==null)return{};var S=A0e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function A0e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function S0e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function E0e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,UZ(L.key),L)}}function M0e(e,n,S){return n&&E0e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C0e(e,n,S){return n=iP(n),k0e(e,BZ()?Reflect.construct(n,S||[],iP(e).constructor):n.apply(e,S))}function k0e(e,n){if(n&&(pT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return P0e(e)}function P0e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function BZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(BZ=function(){return!!e})()}function iP(e){return iP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},iP(e)}function L0e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Iz(e,n)}function Iz(e,n){return Iz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Iz(e,n)}function jZ(e,n,S){return n=UZ(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function UZ(e){var n=R0e(e,"string");return pT(n)=="symbol"?n:n+""}function R0e(e,n){if(pT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(pT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ux=(function(e){function n(){return S0e(this,n),C0e(this,n,arguments)}return L0e(n,e),M0e(n,[{key:"render",value:function(){var L=this.props,re=L.offset,ve=L.layout,Ce=L.width,Be=L.dataKey,Xe=L.data,Ke=L.dataPointFormatter,vt=L.xAxis,yt=L.yAxis,Gt=T0e(L,y0e),$t=Iu(Gt,!1);this.props.direction==="x"&&vt.type!=="number"&&gw();var gr=Xe.map(function(sr){var nr=Ke(sr,Be),jr=nr.x,Ne=nr.y,an=nr.value,yn=nr.errorVal;if(!yn)return null;var Lr=[],$r,dn;if(Array.isArray(yn)){var Jn=g0e(yn,2);$r=Jn[0],dn=Jn[1]}else $r=dn=yn;if(ve==="vertical"){var xn=vt.scale,Na=Ne+re,zn=Na+Ce,ta=Na-Ce,qa=xn(an-$r),la=xn(an+dn);Lr.push({x1:la,y1:zn,x2:la,y2:ta}),Lr.push({x1:qa,y1:Na,x2:la,y2:Na}),Lr.push({x1:qa,y1:zn,x2:qa,y2:ta})}else if(ve==="horizontal"){var ja=yt.scale,pa=jr+re,Ra=pa-Ce,vi=pa+Ce,Pi=ja(an-$r),Eo=ja(an+dn);Lr.push({x1:Ra,y1:Eo,x2:vi,y2:Eo}),Lr.push({x1:pa,y1:Pi,x2:pa,y2:Eo}),Lr.push({x1:Ra,y1:Pi,x2:vi,y2:Pi})}return aa.createElement(Rf,aP({className:"recharts-errorBar",key:"bar-".concat(Lr.map(function(ma){return"".concat(ma.x1,"-").concat(ma.x2,"-").concat(ma.y1,"-").concat(ma.y2)}))},$t),Lr.map(function(ma){return aa.createElement("line",aP({},ma,{key:"line-".concat(ma.x1,"-").concat(ma.x2,"-").concat(ma.y1,"-").concat(ma.y2)}))}))});return aa.createElement(Rf,{className:"recharts-errorBars"},gr)}}])})(aa.Component);jZ(ux,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});jZ(ux,"displayName","ErrorBar");function mE(e){"@babel/helpers - typeof";return mE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},mE(e)}function UH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Kb(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?UH(Object(S),!0).forEach(function(L){I0e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):UH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function I0e(e,n,S){return n=D0e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function D0e(e){var n=O0e(e,"string");return mE(n)=="symbol"?n:n+""}function O0e(e,n){if(mE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(mE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var qZ=function(n){var S=n.children,L=n.formattedGraphicalItems,re=n.legendWidth,ve=n.legendContent,Ce=Jm(S,dg);if(!Ce)return null;var Be=dg.defaultProps,Xe=Be!==void 0?Kb(Kb({},Be),Ce.props):{},Ke;return Ce.props&&Ce.props.payload?Ke=Ce.props&&Ce.props.payload:ve==="children"?Ke=(L||[]).reduce(function(vt,yt){var Gt=yt.item,$t=yt.props,gr=$t.sectors||$t.data||[];return vt.concat(gr.map(function(sr){return{type:Ce.props.iconType||Gt.props.legendType,value:sr.name,color:sr.fill,payload:sr}}))},[]):Ke=(L||[]).map(function(vt){var yt=vt.item,Gt=yt.type.defaultProps,$t=Gt!==void 0?Kb(Kb({},Gt),yt.props):{},gr=$t.dataKey,sr=$t.name,nr=$t.legendType,jr=$t.hide;return{inactive:jr,dataKey:gr,type:Xe.iconType||nr||"square",color:M9(yt),value:sr||gr,payload:$t}}),Kb(Kb(Kb({},Xe),dg.getWithHeight(Ce,re)),{},{payload:Ke,item:Ce})};function yE(e){"@babel/helpers - typeof";return yE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yE(e)}function qH(e){return B0e(e)||F0e(e)||N0e(e)||z0e()}function z0e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N0e(e,n){if(e){if(typeof e=="string")return Dz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Dz(e,n)}}function F0e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function B0e(e){if(Array.isArray(e))return Dz(e)}function Dz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function VH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Rd(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?VH(Object(S),!0).forEach(function(L){iT(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):VH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function iT(e,n,S){return n=j0e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function j0e(e){var n=U0e(e,"string");return yE(n)=="symbol"?n:n+""}function U0e(e,n){if(yE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(yE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Dv(e,n,S){return Mu(e)||Mu(n)?S:Iv(n)?C0(e,n,S):Fu(n)?n(e):S}function Z5(e,n,S,L){var re=Bme(e,function(Be){return Dv(Be,n)});if(S==="number"){var ve=re.filter(function(Be){return gs(Be)||parseFloat(Be)});return ve.length?[aL(ve),ax(ve)]:[1/0,-1/0]}var Ce=L?re.filter(function(Be){return!Mu(Be)}):re;return Ce.map(function(Be){return Iv(Be)||Be instanceof Date?Be:""})}var q0e=function(n){var S,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],re=arguments.length>2?arguments[2]:void 0,ve=arguments.length>3?arguments[3]:void 0,Ce=-1,Be=(S=L?.length)!==null&&S!==void 0?S:0;if(Be<=1)return 0;if(ve&&ve.axisType==="angleAxis"&&Math.abs(Math.abs(ve.range[1]-ve.range[0])-360)<=1e-6)for(var Xe=ve.range,Ke=0;Ke<Be;Ke++){var vt=Ke>0?re[Ke-1].coordinate:re[Be-1].coordinate,yt=re[Ke].coordinate,Gt=Ke>=Be-1?re[0].coordinate:re[Ke+1].coordinate,$t=void 0;if(hy(yt-vt)!==hy(Gt-yt)){var gr=[];if(hy(Gt-yt)===hy(Xe[1]-Xe[0])){$t=Gt;var sr=yt+Xe[1]-Xe[0];gr[0]=Math.min(sr,(sr+vt)/2),gr[1]=Math.max(sr,(sr+vt)/2)}else{$t=vt;var nr=Gt+Xe[1]-Xe[0];gr[0]=Math.min(yt,(nr+yt)/2),gr[1]=Math.max(yt,(nr+yt)/2)}var jr=[Math.min(yt,($t+yt)/2),Math.max(yt,($t+yt)/2)];if(n>jr[0]&&n<=jr[1]||n>=gr[0]&&n<=gr[1]){Ce=re[Ke].index;break}}else{var Ne=Math.min(vt,Gt),an=Math.max(vt,Gt);if(n>(Ne+yt)/2&&n<=(an+yt)/2){Ce=re[Ke].index;break}}}else for(var yn=0;yn<Be;yn++)if(yn===0&&n<=(L[yn].coordinate+L[yn+1].coordinate)/2||yn>0&&yn<Be-1&&n>(L[yn].coordinate+L[yn-1].coordinate)/2&&n<=(L[yn].coordinate+L[yn+1].coordinate)/2||yn===Be-1&&n>(L[yn].coordinate+L[yn-1].coordinate)/2){Ce=L[yn].index;break}return Ce},M9=function(n){var S,L=n,re=L.type.displayName,ve=(S=n.type)!==null&&S!==void 0&&S.defaultProps?Rd(Rd({},n.type.defaultProps),n.props):n.props,Ce=ve.stroke,Be=ve.fill,Xe;switch(re){case"Line":Xe=Ce;break;case"Area":case"Radar":Xe=Ce&&Ce!=="none"?Ce:Be;break;default:Xe=Be;break}return Xe},V0e=function(n){var S=n.barSize,L=n.totalSize,re=n.stackGroups,ve=re===void 0?{}:re;if(!ve)return{};for(var Ce={},Be=Object.keys(ve),Xe=0,Ke=Be.length;Xe<Ke;Xe++)for(var vt=ve[Be[Xe]].stackGroups,yt=Object.keys(vt),Gt=0,$t=yt.length;Gt<$t;Gt++){var gr=vt[yt[Gt]],sr=gr.items,nr=gr.cateAxisId,jr=sr.filter(function(dn){return b1(dn.type).indexOf("Bar")>=0});if(jr&&jr.length){var Ne=jr[0].type.defaultProps,an=Ne!==void 0?Rd(Rd({},Ne),jr[0].props):jr[0].props,yn=an.barSize,Lr=an[nr];Ce[Lr]||(Ce[Lr]=[]);var $r=Mu(yn)?S:yn;Ce[Lr].push({item:jr[0],stackList:jr.slice(1),barSize:Mu($r)?void 0:pw($r,L,0)})}}return Ce},H0e=function(n){var S=n.barGap,L=n.barCategoryGap,re=n.bandSize,ve=n.sizeList,Ce=ve===void 0?[]:ve,Be=n.maxBarSize,Xe=Ce.length;if(Xe<1)return null;var Ke=pw(S,re,0,!0),vt,yt=[];if(Ce[0].barSize===+Ce[0].barSize){var Gt=!1,$t=re/Xe,gr=Ce.reduce(function(yn,Lr){return yn+Lr.barSize||0},0);gr+=(Xe-1)*Ke,gr>=re&&(gr-=(Xe-1)*Ke,Ke=0),gr>=re&&$t>0&&(Gt=!0,$t*=.9,gr=Xe*$t);var sr=(re-gr)/2>>0,nr={offset:sr-Ke,size:0};vt=Ce.reduce(function(yn,Lr){var $r={item:Lr.item,position:{offset:nr.offset+nr.size+Ke,size:Gt?$t:Lr.barSize}},dn=[].concat(qH(yn),[$r]);return nr=dn[dn.length-1].position,Lr.stackList&&Lr.stackList.length&&Lr.stackList.forEach(function(Jn){dn.push({item:Jn,position:nr})}),dn},yt)}else{var jr=pw(L,re,0,!0);re-2*jr-(Xe-1)*Ke<=0&&(Ke=0);var Ne=(re-2*jr-(Xe-1)*Ke)/Xe;Ne>1&&(Ne>>=0);var an=Be===+Be?Math.min(Ne,Be):Ne;vt=Ce.reduce(function(yn,Lr,$r){var dn=[].concat(qH(yn),[{item:Lr.item,position:{offset:jr+(Ne+Ke)*$r+(Ne-an)/2,size:an}}]);return Lr.stackList&&Lr.stackList.length&&Lr.stackList.forEach(function(Jn){dn.push({item:Jn,position:dn[dn.length-1].position})}),dn},yt)}return vt},G0e=function(n,S,L,re){var ve=L.children,Ce=L.width,Be=L.margin,Xe=Ce-(Be.left||0)-(Be.right||0),Ke=qZ({children:ve,legendWidth:Xe});if(Ke){var vt=re||{},yt=vt.width,Gt=vt.height,$t=Ke.align,gr=Ke.verticalAlign,sr=Ke.layout;if((sr==="vertical"||sr==="horizontal"&&gr==="middle")&&$t!=="center"&&gs(n[$t]))return Rd(Rd({},n),{},iT({},$t,n[$t]+(yt||0)));if((sr==="horizontal"||sr==="vertical"&&$t==="center")&&gr!=="middle"&&gs(n[gr]))return Rd(Rd({},n),{},iT({},gr,n[gr]+(Gt||0)))}return n},X0e=function(n,S,L){return Mu(S)?!0:n==="horizontal"?S==="yAxis":n==="vertical"||L==="x"?S==="xAxis":L==="y"?S==="yAxis":!0},VZ=function(n,S,L,re,ve){var Ce=S.props.children,Be=bm(Ce,ux).filter(function(Ke){return X0e(re,ve,Ke.props.direction)});if(Be&&Be.length){var Xe=Be.map(function(Ke){return Ke.props.dataKey});return n.reduce(function(Ke,vt){var yt=Dv(vt,L);if(Mu(yt))return Ke;var Gt=Array.isArray(yt)?[aL(yt),ax(yt)]:[yt,yt],$t=Xe.reduce(function(gr,sr){var nr=Dv(vt,sr,0),jr=Gt[0]-Math.abs(Array.isArray(nr)?nr[0]:nr),Ne=Gt[1]+Math.abs(Array.isArray(nr)?nr[1]:nr);return[Math.min(jr,gr[0]),Math.max(Ne,gr[1])]},[1/0,-1/0]);return[Math.min($t[0],Ke[0]),Math.max($t[1],Ke[1])]},[1/0,-1/0])}return null},W0e=function(n,S,L,re,ve){var Ce=S.map(function(Be){return VZ(n,Be,L,ve,re)}).filter(function(Be){return!Mu(Be)});return Ce&&Ce.length?Ce.reduce(function(Be,Xe){return[Math.min(Be[0],Xe[0]),Math.max(Be[1],Xe[1])]},[1/0,-1/0]):null},HZ=function(n,S,L,re,ve){var Ce=S.map(function(Xe){var Ke=Xe.props.dataKey;return L==="number"&&Ke&&VZ(n,Xe,Ke,re)||Z5(n,Ke,L,ve)});if(L==="number")return Ce.reduce(function(Xe,Ke){return[Math.min(Xe[0],Ke[0]),Math.max(Xe[1],Ke[1])]},[1/0,-1/0]);var Be={};return Ce.reduce(function(Xe,Ke){for(var vt=0,yt=Ke.length;vt<yt;vt++)Be[Ke[vt]]||(Be[Ke[vt]]=!0,Xe.push(Ke[vt]));return Xe},[])},GZ=function(n,S){return n==="horizontal"&&S==="xAxis"||n==="vertical"&&S==="yAxis"||n==="centric"&&S==="angleAxis"||n==="radial"&&S==="radiusAxis"},XZ=function(n,S,L,re){if(re)return n.map(function(Xe){return Xe.coordinate});var ve,Ce,Be=n.map(function(Xe){return Xe.coordinate===S&&(ve=!0),Xe.coordinate===L&&(Ce=!0),Xe.coordinate});return ve||Be.push(S),Ce||Be.push(L),Be},x1=function(n,S,L){if(!n)return null;var re=n.scale,ve=n.duplicateDomain,Ce=n.type,Be=n.range,Xe=n.realScaleType==="scaleBand"?re.bandwidth()/2:2,Ke=(S||L)&&Ce==="category"&&re.bandwidth?re.bandwidth()/Xe:0;if(Ke=n.axisType==="angleAxis"&&Be?.length>=2?hy(Be[0]-Be[1])*2*Ke:Ke,S&&(n.ticks||n.niceTicks)){var vt=(n.ticks||n.niceTicks).map(function(yt){var Gt=ve?ve.indexOf(yt):yt;return{coordinate:re(Gt)+Ke,value:yt,offset:Ke}});return vt.filter(function(yt){return!BT(yt.coordinate)})}return n.isCategorical&&n.categoricalDomain?n.categoricalDomain.map(function(yt,Gt){return{coordinate:re(yt)+Ke,value:yt,index:Gt,offset:Ke}}):re.ticks&&!L?re.ticks(n.tickCount).map(function(yt){return{coordinate:re(yt)+Ke,value:yt,offset:Ke}}):re.domain().map(function(yt,Gt){return{coordinate:re(yt)+Ke,value:ve?ve[yt]:yt,index:Gt,offset:Ke}})},hO=new WeakMap,bk=function(n,S){if(typeof S!="function")return n;hO.has(n)||hO.set(n,new WeakMap);var L=hO.get(n);if(L.has(S))return L.get(S);var re=function(){n.apply(void 0,arguments),S.apply(void 0,arguments)};return L.set(S,re),re},Y0e=function(n,S,L){var re=n.scale,ve=n.type,Ce=n.layout,Be=n.axisType;if(re==="auto")return Ce==="radial"&&Be==="radiusAxis"?{scale:uE(),realScaleType:"band"}:Ce==="radial"&&Be==="angleAxis"?{scale:Qk(),realScaleType:"linear"}:ve==="category"&&S&&(S.indexOf("LineChart")>=0||S.indexOf("AreaChart")>=0||S.indexOf("ComposedChart")>=0&&!L)?{scale:Y5(),realScaleType:"point"}:ve==="category"?{scale:uE(),realScaleType:"band"}:{scale:Qk(),realScaleType:"linear"};if(vw(re)){var Xe="scale".concat(VP(re));return{scale:(CH[Xe]||Y5)(),realScaleType:CH[Xe]?Xe:"point"}}return Fu(re)?{scale:re}:{scale:Y5(),realScaleType:"point"}},HH=1e-4,Z0e=function(n){var S=n.domain();if(!(!S||S.length<=2)){var L=S.length,re=n.range(),ve=Math.min(re[0],re[1])-HH,Ce=Math.max(re[0],re[1])+HH,Be=n(S[0]),Xe=n(S[L-1]);(Be<ve||Be>Ce||Xe<ve||Xe>Ce)&&n.domain([S[0],S[L-1]])}},$0e=function(n,S){if(!n)return null;for(var L=0,re=n.length;L<re;L++)if(n[L].item===S)return n[L].position;return null},K0e=function(n,S){if(!S||S.length!==2||!gs(S[0])||!gs(S[1]))return n;var L=Math.min(S[0],S[1]),re=Math.max(S[0],S[1]),ve=[n[0],n[1]];return(!gs(n[0])||n[0]<L)&&(ve[0]=L),(!gs(n[1])||n[1]>re)&&(ve[1]=re),ve[0]>re&&(ve[0]=re),ve[1]<L&&(ve[1]=L),ve},J0e=function(n){var S=n.length;if(!(S<=0))for(var L=0,re=n[0].length;L<re;++L)for(var ve=0,Ce=0,Be=0;Be<S;++Be){var Xe=BT(n[Be][L][1])?n[Be][L][0]:n[Be][L][1];Xe>=0?(n[Be][L][0]=ve,n[Be][L][1]=ve+Xe,ve=n[Be][L][1]):(n[Be][L][0]=Ce,n[Be][L][1]=Ce+Xe,Ce=n[Be][L][1])}},Q0e=function(n){var S=n.length;if(!(S<=0))for(var L=0,re=n[0].length;L<re;++L)for(var ve=0,Ce=0;Ce<S;++Ce){var Be=BT(n[Ce][L][1])?n[Ce][L][0]:n[Ce][L][1];Be>=0?(n[Ce][L][0]=ve,n[Ce][L][1]=ve+Be,ve=n[Ce][L][1]):(n[Ce][L][0]=0,n[Ce][L][1]=0)}},eye={sign:J0e,expand:Nce,none:sT,silhouette:Fce,wiggle:Bce,positive:Q0e},tye=function(n,S,L){var re=S.map(function(Be){return Be.props.dataKey}),ve=eye[L],Ce=zce().keys(re).value(function(Be,Xe){return+Dv(Be,Xe,0)}).order(cz).offset(ve);return Ce(n)},rye=function(n,S,L,re,ve,Ce){if(!n)return null;var Be=Ce?S.reverse():S,Xe={},Ke=Be.reduce(function(yt,Gt){var $t,gr=($t=Gt.type)!==null&&$t!==void 0&&$t.defaultProps?Rd(Rd({},Gt.type.defaultProps),Gt.props):Gt.props,sr=gr.stackId,nr=gr.hide;if(nr)return yt;var jr=gr[L],Ne=yt[jr]||{hasStack:!1,stackGroups:{}};if(Iv(sr)){var an=Ne.stackGroups[sr]||{numericAxisId:L,cateAxisId:re,items:[]};an.items.push(Gt),Ne.hasStack=!0,Ne.stackGroups[sr]=an}else Ne.stackGroups[bw("_stackId_")]={numericAxisId:L,cateAxisId:re,items:[Gt]};return Rd(Rd({},yt),{},iT({},jr,Ne))},Xe),vt={};return Object.keys(Ke).reduce(function(yt,Gt){var $t=Ke[Gt];if($t.hasStack){var gr={};$t.stackGroups=Object.keys($t.stackGroups).reduce(function(sr,nr){var jr=$t.stackGroups[nr];return Rd(Rd({},sr),{},iT({},nr,{numericAxisId:L,cateAxisId:re,items:jr.items,stackedData:tye(n,jr.items,ve)}))},gr)}return Rd(Rd({},yt),{},iT({},Gt,$t))},vt)},nye=function(n,S){var L=S.realScaleType,re=S.type,ve=S.tickCount,Ce=S.originalDomain,Be=S.allowDecimals,Xe=L||S.scale;if(Xe!=="auto"&&Xe!=="linear")return null;if(ve&&re==="number"&&Ce&&(Ce[0]==="auto"||Ce[1]==="auto")){var Ke=n.domain();if(!Ke.length)return null;var vt=v0e(Ke,ve,Be);return n.domain([aL(vt),ax(vt)]),{niceTicks:vt}}if(ve&&re==="number"){var yt=n.domain(),Gt=p0e(yt,ve,Be);return{niceTicks:Gt}}return null};function mT(e){var n=e.axis,S=e.ticks,L=e.bandSize,re=e.entry,ve=e.index,Ce=e.dataKey;if(n.type==="category"){if(!n.allowDuplicatedCategory&&n.dataKey&&!Mu(re[n.dataKey])){var Be=Dk(S,"value",re[n.dataKey]);if(Be)return Be.coordinate+L/2}return S[ve]?S[ve].coordinate+L/2:null}var Xe=Dv(re,Mu(Ce)?n.dataKey:Ce);return Mu(Xe)?null:n.scale(Xe)}var GH=function(n){var S=n.axis,L=n.ticks,re=n.offset,ve=n.bandSize,Ce=n.entry,Be=n.index;if(S.type==="category")return L[Be]?L[Be].coordinate+re:null;var Xe=Dv(Ce,S.dataKey,S.domain[Be]);return Mu(Xe)?null:S.scale(Xe)-ve/2+re},aye=function(n){var S=n.numericAxis,L=S.scale.domain();if(S.type==="number"){var re=Math.min(L[0],L[1]),ve=Math.max(L[0],L[1]);return re<=0&&ve>=0?0:ve<0?ve:re}return L[0]},iye=function(n,S){var L,re=(L=n.type)!==null&&L!==void 0&&L.defaultProps?Rd(Rd({},n.type.defaultProps),n.props):n.props,ve=re.stackId;if(Iv(ve)){var Ce=S[ve];if(Ce){var Be=Ce.items.indexOf(n);return Be>=0?Ce.stackedData[Be]:null}}return null},oye=function(n){return n.reduce(function(S,L){return[aL(L.concat([S[0]]).filter(gs)),ax(L.concat([S[1]]).filter(gs))]},[1/0,-1/0])},WZ=function(n,S,L){return Object.keys(n).reduce(function(re,ve){var Ce=n[ve],Be=Ce.stackedData,Xe=Be.reduce(function(Ke,vt){var yt=oye(vt.slice(S,L+1));return[Math.min(Ke[0],yt[0]),Math.max(Ke[1],yt[1])]},[1/0,-1/0]);return[Math.min(Xe[0],re[0]),Math.max(Xe[1],re[1])]},[1/0,-1/0]).map(function(re){return re===1/0||re===-1/0?0:re})},XH=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,WH=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Oz=function(n,S,L){if(Fu(n))return n(S,L);if(!Array.isArray(n))return S;var re=[];if(gs(n[0]))re[0]=L?n[0]:Math.min(n[0],S[0]);else if(XH.test(n[0])){var ve=+XH.exec(n[0])[1];re[0]=S[0]-ve}else Fu(n[0])?re[0]=n[0](S[0]):re[0]=S[0];if(gs(n[1]))re[1]=L?n[1]:Math.max(n[1],S[1]);else if(WH.test(n[1])){var Ce=+WH.exec(n[1])[1];re[1]=S[1]+Ce}else Fu(n[1])?re[1]=n[1](S[1]):re[1]=S[1];return re},oP=function(n,S,L){if(n&&n.scale&&n.scale.bandwidth){var re=n.scale.bandwidth();if(!L||re>0)return re}if(n&&S&&S.length>=2){for(var ve=e9(S,function(yt){return yt.coordinate}),Ce=1/0,Be=1,Xe=ve.length;Be<Xe;Be++){var Ke=ve[Be],vt=ve[Be-1];Ce=Math.min((Ke.coordinate||0)-(vt.coordinate||0),Ce)}return Ce===1/0?0:Ce}return L?void 0:0},YH=function(n,S,L){return!n||!n.length||mw(n,C0(L,"type.defaultProps.domain"))?S:n},YZ=function(n,S){var L=n.type.defaultProps?Rd(Rd({},n.type.defaultProps),n.props):n.props,re=L.dataKey,ve=L.name,Ce=L.unit,Be=L.formatter,Xe=L.tooltipType,Ke=L.chartType,vt=L.hide;return Rd(Rd({},Iu(n,!1)),{},{dataKey:re,unit:Ce,formatter:Be,name:ve||re,color:M9(n),value:Dv(S,re),type:Xe,payload:S,chartType:Ke,hide:vt})};function gE(e){"@babel/helpers - typeof";return gE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gE(e)}function ZH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function $H(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?ZH(Object(S),!0).forEach(function(L){sye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):ZH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function sye(e,n,S){return n=lye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function lye(e){var n=uye(e,"string");return gE(n)=="symbol"?n:n+""}function uye(e,n){if(gE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(gE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var sP=Math.PI/180,cye=function(n){return n*180/Math.PI},lp=function(n,S,L,re){return{x:n+Math.cos(-sP*re)*L,y:S+Math.sin(-sP*re)*L}},fye=function(n,S){var L=n.x,re=n.y,ve=S.x,Ce=S.y;return Math.sqrt(Math.pow(L-ve,2)+Math.pow(re-Ce,2))},hye=function(n,S){var L=n.x,re=n.y,ve=S.cx,Ce=S.cy,Be=fye({x:L,y:re},{x:ve,y:Ce});if(Be<=0)return{radius:Be};var Xe=(L-ve)/Be,Ke=Math.acos(Xe);return re>Ce&&(Ke=2*Math.PI-Ke),{radius:Be,angle:cye(Ke),angleInRadian:Ke}},dye=function(n){var S=n.startAngle,L=n.endAngle,re=Math.floor(S/360),ve=Math.floor(L/360),Ce=Math.min(re,ve);return{startAngle:S-Ce*360,endAngle:L-Ce*360}},vye=function(n,S){var L=S.startAngle,re=S.endAngle,ve=Math.floor(L/360),Ce=Math.floor(re/360),Be=Math.min(ve,Ce);return n+Be*360},KH=function(n,S){var L=n.x,re=n.y,ve=hye({x:L,y:re},S),Ce=ve.radius,Be=ve.angle,Xe=S.innerRadius,Ke=S.outerRadius;if(Ce<Xe||Ce>Ke)return!1;if(Ce===0)return!0;var vt=dye(S),yt=vt.startAngle,Gt=vt.endAngle,$t=Be,gr;if(yt<=Gt){for(;$t>Gt;)$t-=360;for(;$t<yt;)$t+=360;gr=$t>=yt&&$t<=Gt}else{for(;$t>yt;)$t-=360;for(;$t<Gt;)$t+=360;gr=$t>=Gt&&$t<=yt}return gr?$H($H({},S),{},{radius:Ce,angle:vye($t,S)}):null};function _E(e){"@babel/helpers - typeof";return _E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_E(e)}var pye=["offset"];function mye(e){return xye(e)||_ye(e)||gye(e)||yye()}function yye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gye(e,n){if(e){if(typeof e=="string")return zz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return zz(e,n)}}function _ye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xye(e){if(Array.isArray(e))return zz(e)}function zz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function bye(e,n){if(e==null)return{};var S=wye(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function wye(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function JH(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Lv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?JH(Object(S),!0).forEach(function(L){Tye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):JH(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Tye(e,n,S){return n=Aye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Aye(e){var n=Sye(e,"string");return _E(n)=="symbol"?n:n+""}function Sye(e,n){if(_E(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(_E(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function xE(){return xE=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},xE.apply(this,arguments)}var Eye=function(n){var S=n.value,L=n.formatter,re=Mu(n.children)?S:n.children;return Fu(L)?L(re):re},Mye=function(n,S){var L=hy(S-n),re=Math.min(Math.abs(S-n),360);return L*re},Cye=function(n,S,L){var re=n.position,ve=n.viewBox,Ce=n.offset,Be=n.className,Xe=ve,Ke=Xe.cx,vt=Xe.cy,yt=Xe.innerRadius,Gt=Xe.outerRadius,$t=Xe.startAngle,gr=Xe.endAngle,sr=Xe.clockWise,nr=(yt+Gt)/2,jr=Mye($t,gr),Ne=jr>=0?1:-1,an,yn;re==="insideStart"?(an=$t+Ne*Ce,yn=sr):re==="insideEnd"?(an=gr-Ne*Ce,yn=!sr):re==="end"&&(an=gr+Ne*Ce,yn=sr),yn=jr<=0?yn:!yn;var Lr=lp(Ke,vt,nr,an),$r=lp(Ke,vt,nr,an+(yn?1:-1)*359),dn="M".concat(Lr.x,",").concat(Lr.y,`
    A`).concat(nr,",").concat(nr,",0,1,").concat(yn?0:1,`,
    `).concat($r.x,",").concat($r.y),Jn=Mu(n.id)?bw("recharts-radial-line-"):n.id;return aa.createElement("text",xE({},L,{dominantBaseline:"central",className:Ec("recharts-radial-bar-label",Be)}),aa.createElement("defs",null,aa.createElement("path",{id:Jn,d:dn})),aa.createElement("textPath",{xlinkHref:"#".concat(Jn)},S))},kye=function(n){var S=n.viewBox,L=n.offset,re=n.position,ve=S,Ce=ve.cx,Be=ve.cy,Xe=ve.innerRadius,Ke=ve.outerRadius,vt=ve.startAngle,yt=ve.endAngle,Gt=(vt+yt)/2;if(re==="outside"){var $t=lp(Ce,Be,Ke+L,Gt),gr=$t.x,sr=$t.y;return{x:gr,y:sr,textAnchor:gr>=Ce?"start":"end",verticalAnchor:"middle"}}if(re==="center")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"middle"};if(re==="centerTop")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"start"};if(re==="centerBottom")return{x:Ce,y:Be,textAnchor:"middle",verticalAnchor:"end"};var nr=(Xe+Ke)/2,jr=lp(Ce,Be,nr,Gt),Ne=jr.x,an=jr.y;return{x:Ne,y:an,textAnchor:"middle",verticalAnchor:"middle"}},Pye=function(n){var S=n.viewBox,L=n.parentViewBox,re=n.offset,ve=n.position,Ce=S,Be=Ce.x,Xe=Ce.y,Ke=Ce.width,vt=Ce.height,yt=vt>=0?1:-1,Gt=yt*re,$t=yt>0?"end":"start",gr=yt>0?"start":"end",sr=Ke>=0?1:-1,nr=sr*re,jr=sr>0?"end":"start",Ne=sr>0?"start":"end";if(ve==="top"){var an={x:Be+Ke/2,y:Xe-yt*re,textAnchor:"middle",verticalAnchor:$t};return Lv(Lv({},an),L?{height:Math.max(Xe-L.y,0),width:Ke}:{})}if(ve==="bottom"){var yn={x:Be+Ke/2,y:Xe+vt+Gt,textAnchor:"middle",verticalAnchor:gr};return Lv(Lv({},yn),L?{height:Math.max(L.y+L.height-(Xe+vt),0),width:Ke}:{})}if(ve==="left"){var Lr={x:Be-nr,y:Xe+vt/2,textAnchor:jr,verticalAnchor:"middle"};return Lv(Lv({},Lr),L?{width:Math.max(Lr.x-L.x,0),height:vt}:{})}if(ve==="right"){var $r={x:Be+Ke+nr,y:Xe+vt/2,textAnchor:Ne,verticalAnchor:"middle"};return Lv(Lv({},$r),L?{width:Math.max(L.x+L.width-$r.x,0),height:vt}:{})}var dn=L?{width:Ke,height:vt}:{};return ve==="insideLeft"?Lv({x:Be+nr,y:Xe+vt/2,textAnchor:Ne,verticalAnchor:"middle"},dn):ve==="insideRight"?Lv({x:Be+Ke-nr,y:Xe+vt/2,textAnchor:jr,verticalAnchor:"middle"},dn):ve==="insideTop"?Lv({x:Be+Ke/2,y:Xe+Gt,textAnchor:"middle",verticalAnchor:gr},dn):ve==="insideBottom"?Lv({x:Be+Ke/2,y:Xe+vt-Gt,textAnchor:"middle",verticalAnchor:$t},dn):ve==="insideTopLeft"?Lv({x:Be+nr,y:Xe+Gt,textAnchor:Ne,verticalAnchor:gr},dn):ve==="insideTopRight"?Lv({x:Be+Ke-nr,y:Xe+Gt,textAnchor:jr,verticalAnchor:gr},dn):ve==="insideBottomLeft"?Lv({x:Be+nr,y:Xe+vt-Gt,textAnchor:Ne,verticalAnchor:$t},dn):ve==="insideBottomRight"?Lv({x:Be+Ke-nr,y:Xe+vt-Gt,textAnchor:jr,verticalAnchor:$t},dn):FT(ve)&&(gs(ve.x)||rw(ve.x))&&(gs(ve.y)||rw(ve.y))?Lv({x:Be+pw(ve.x,Ke),y:Xe+pw(ve.y,vt),textAnchor:"end",verticalAnchor:"end"},dn):Lv({x:Be+Ke/2,y:Xe+vt/2,textAnchor:"middle",verticalAnchor:"middle"},dn)},Lye=function(n){return"cx"in n&&gs(n.cx)};function Op(e){var n=e.offset,S=n===void 0?5:n,L=bye(e,pye),re=Lv({offset:S},L),ve=re.viewBox,Ce=re.position,Be=re.value,Xe=re.children,Ke=re.content,vt=re.className,yt=vt===void 0?"":vt,Gt=re.textBreakAll;if(!ve||Mu(Be)&&Mu(Xe)&&!Ua.isValidElement(Ke)&&!Fu(Ke))return null;if(Ua.isValidElement(Ke))return Ua.cloneElement(Ke,re);var $t;if(Fu(Ke)){if($t=Ua.createElement(Ke,re),Ua.isValidElement($t))return $t}else $t=Eye(re);var gr=Lye(ve),sr=Iu(re,!0);if(gr&&(Ce==="insideStart"||Ce==="insideEnd"||Ce==="end"))return Cye(re,$t,sr);var nr=gr?kye(re):Pye(re);return aa.createElement(Xk,xE({className:Ec("recharts-label",yt)},sr,nr,{breakAll:Gt}),$t)}Op.displayName="Label";var ZZ=function(n){var S=n.cx,L=n.cy,re=n.angle,ve=n.startAngle,Ce=n.endAngle,Be=n.r,Xe=n.radius,Ke=n.innerRadius,vt=n.outerRadius,yt=n.x,Gt=n.y,$t=n.top,gr=n.left,sr=n.width,nr=n.height,jr=n.clockWise,Ne=n.labelViewBox;if(Ne)return Ne;if(gs(sr)&&gs(nr)){if(gs(yt)&&gs(Gt))return{x:yt,y:Gt,width:sr,height:nr};if(gs($t)&&gs(gr))return{x:$t,y:gr,width:sr,height:nr}}return gs(yt)&&gs(Gt)?{x:yt,y:Gt,width:0,height:0}:gs(S)&&gs(L)?{cx:S,cy:L,startAngle:ve||re||0,endAngle:Ce||re||0,innerRadius:Ke||0,outerRadius:vt||Xe||Be||0,clockWise:jr}:n.viewBox?n.viewBox:{}},Rye=function(n,S){return n?n===!0?aa.createElement(Op,{key:"label-implicit",viewBox:S}):Iv(n)?aa.createElement(Op,{key:"label-implicit",viewBox:S,value:n}):Ua.isValidElement(n)?n.type===Op?Ua.cloneElement(n,{key:"label-implicit",viewBox:S}):aa.createElement(Op,{key:"label-implicit",content:n,viewBox:S}):Fu(n)?aa.createElement(Op,{key:"label-implicit",content:n,viewBox:S}):FT(n)?aa.createElement(Op,xE({viewBox:S},n,{key:"label-implicit"})):null:null},Iye=function(n,S){var L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!n||!n.children&&L&&!n.label)return null;var re=n.children,ve=ZZ(n),Ce=bm(re,Op).map(function(Xe,Ke){return Ua.cloneElement(Xe,{viewBox:S||ve,key:"label-".concat(Ke)})});if(!L)return Ce;var Be=Rye(n.label,S||ve);return[Be].concat(mye(Ce))};Op.parseViewBox=ZZ;Op.renderCallByParent=Iye;var dO,QH;function Dye(){if(QH)return dO;QH=1;function e(n){var S=n==null?0:n.length;return S?n[S-1]:void 0}return dO=e,dO}var Oye=Dye();const zye=rh(Oye);function bE(e){"@babel/helpers - typeof";return bE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bE(e)}var Nye=["valueAccessor"],Fye=["data","dataKey","clockWise","id","textBreakAll"];function Bye(e){return Vye(e)||qye(e)||Uye(e)||jye()}function jye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uye(e,n){if(e){if(typeof e=="string")return Nz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Nz(e,n)}}function qye(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vye(e){if(Array.isArray(e))return Nz(e)}function Nz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function lP(){return lP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},lP.apply(this,arguments)}function eG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function tG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?eG(Object(S),!0).forEach(function(L){Hye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):eG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Hye(e,n,S){return n=Gye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Gye(e){var n=Xye(e,"string");return bE(n)=="symbol"?n:n+""}function Xye(e,n){if(bE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(bE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function rG(e,n){if(e==null)return{};var S=Wye(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Wye(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var Yye=function(n){return Array.isArray(n.value)?zye(n.value):n.value};function pg(e){var n=e.valueAccessor,S=n===void 0?Yye:n,L=rG(e,Nye),re=L.data,ve=L.dataKey,Ce=L.clockWise,Be=L.id,Xe=L.textBreakAll,Ke=rG(L,Fye);return!re||!re.length?null:aa.createElement(Rf,{className:"recharts-label-list"},re.map(function(vt,yt){var Gt=Mu(ve)?S(vt,yt):Dv(vt&&vt.payload,ve),$t=Mu(Be)?{}:{id:"".concat(Be,"-").concat(yt)};return aa.createElement(Op,lP({},Iu(vt,!0),Ke,$t,{parentViewBox:vt.parentViewBox,value:Gt,textBreakAll:Xe,viewBox:Op.parseViewBox(Mu(Ce)?vt:tG(tG({},vt),{},{clockWise:Ce})),key:"label-".concat(yt),index:yt}))}))}pg.displayName="LabelList";function Zye(e,n){return e?e===!0?aa.createElement(pg,{key:"labelList-implicit",data:n}):aa.isValidElement(e)||Fu(e)?aa.createElement(pg,{key:"labelList-implicit",data:n,content:e}):FT(e)?aa.createElement(pg,lP({data:n},e,{key:"labelList-implicit"})):null:null}function $ye(e,n){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&S&&!e.label)return null;var L=e.children,re=bm(L,pg).map(function(Ce,Be){return Ua.cloneElement(Ce,{data:n,key:"labelList-".concat(Be)})});if(!S)return re;var ve=Zye(e.label,n);return[ve].concat(Bye(re))}pg.renderCallByParent=$ye;function wE(e){"@babel/helpers - typeof";return wE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wE(e)}function Fz(){return Fz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Fz.apply(this,arguments)}function nG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function aG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?nG(Object(S),!0).forEach(function(L){Kye(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):nG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Kye(e,n,S){return n=Jye(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Jye(e){var n=Qye(e,"string");return wE(n)=="symbol"?n:n+""}function Qye(e,n){if(wE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(wE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var ege=function(n,S){var L=hy(S-n),re=Math.min(Math.abs(S-n),359.999);return L*re},wk=function(n){var S=n.cx,L=n.cy,re=n.radius,ve=n.angle,Ce=n.sign,Be=n.isExternal,Xe=n.cornerRadius,Ke=n.cornerIsExternal,vt=Xe*(Be?1:-1)+re,yt=Math.asin(Xe/vt)/sP,Gt=Ke?ve:ve+Ce*yt,$t=lp(S,L,vt,Gt),gr=lp(S,L,re,Gt),sr=Ke?ve-Ce*yt:ve,nr=lp(S,L,vt*Math.cos(yt*sP),sr);return{center:$t,circleTangency:gr,lineTangency:nr,theta:yt}},$Z=function(n){var S=n.cx,L=n.cy,re=n.innerRadius,ve=n.outerRadius,Ce=n.startAngle,Be=n.endAngle,Xe=ege(Ce,Be),Ke=Ce+Xe,vt=lp(S,L,ve,Ce),yt=lp(S,L,ve,Ke),Gt="M ".concat(vt.x,",").concat(vt.y,`
    A `).concat(ve,",").concat(ve,`,0,
    `).concat(+(Math.abs(Xe)>180),",").concat(+(Ce>Ke),`,
    `).concat(yt.x,",").concat(yt.y,`
  `);if(re>0){var $t=lp(S,L,re,Ce),gr=lp(S,L,re,Ke);Gt+="L ".concat(gr.x,",").concat(gr.y,`
            A `).concat(re,",").concat(re,`,0,
            `).concat(+(Math.abs(Xe)>180),",").concat(+(Ce<=Ke),`,
            `).concat($t.x,",").concat($t.y," Z")}else Gt+="L ".concat(S,",").concat(L," Z");return Gt},tge=function(n){var S=n.cx,L=n.cy,re=n.innerRadius,ve=n.outerRadius,Ce=n.cornerRadius,Be=n.forceCornerRadius,Xe=n.cornerIsExternal,Ke=n.startAngle,vt=n.endAngle,yt=hy(vt-Ke),Gt=wk({cx:S,cy:L,radius:ve,angle:Ke,sign:yt,cornerRadius:Ce,cornerIsExternal:Xe}),$t=Gt.circleTangency,gr=Gt.lineTangency,sr=Gt.theta,nr=wk({cx:S,cy:L,radius:ve,angle:vt,sign:-yt,cornerRadius:Ce,cornerIsExternal:Xe}),jr=nr.circleTangency,Ne=nr.lineTangency,an=nr.theta,yn=Xe?Math.abs(Ke-vt):Math.abs(Ke-vt)-sr-an;if(yn<0)return Be?"M ".concat(gr.x,",").concat(gr.y,`
        a`).concat(Ce,",").concat(Ce,",0,0,1,").concat(Ce*2,`,0
        a`).concat(Ce,",").concat(Ce,",0,0,1,").concat(-Ce*2,`,0
      `):$Z({cx:S,cy:L,innerRadius:re,outerRadius:ve,startAngle:Ke,endAngle:vt});var Lr="M ".concat(gr.x,",").concat(gr.y,`
    A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(yt<0),",").concat($t.x,",").concat($t.y,`
    A`).concat(ve,",").concat(ve,",0,").concat(+(yn>180),",").concat(+(yt<0),",").concat(jr.x,",").concat(jr.y,`
    A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(yt<0),",").concat(Ne.x,",").concat(Ne.y,`
  `);if(re>0){var $r=wk({cx:S,cy:L,radius:re,angle:Ke,sign:yt,isExternal:!0,cornerRadius:Ce,cornerIsExternal:Xe}),dn=$r.circleTangency,Jn=$r.lineTangency,xn=$r.theta,Na=wk({cx:S,cy:L,radius:re,angle:vt,sign:-yt,isExternal:!0,cornerRadius:Ce,cornerIsExternal:Xe}),zn=Na.circleTangency,ta=Na.lineTangency,qa=Na.theta,la=Xe?Math.abs(Ke-vt):Math.abs(Ke-vt)-xn-qa;if(la<0&&Ce===0)return"".concat(Lr,"L").concat(S,",").concat(L,"Z");Lr+="L".concat(ta.x,",").concat(ta.y,`
      A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(yt<0),",").concat(zn.x,",").concat(zn.y,`
      A`).concat(re,",").concat(re,",0,").concat(+(la>180),",").concat(+(yt>0),",").concat(dn.x,",").concat(dn.y,`
      A`).concat(Ce,",").concat(Ce,",0,0,").concat(+(yt<0),",").concat(Jn.x,",").concat(Jn.y,"Z")}else Lr+="L".concat(S,",").concat(L,"Z");return Lr},rge={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},KZ=function(n){var S=aG(aG({},rge),n),L=S.cx,re=S.cy,ve=S.innerRadius,Ce=S.outerRadius,Be=S.cornerRadius,Xe=S.forceCornerRadius,Ke=S.cornerIsExternal,vt=S.startAngle,yt=S.endAngle,Gt=S.className;if(Ce<ve||vt===yt)return null;var $t=Ec("recharts-sector",Gt),gr=Ce-ve,sr=pw(Be,gr,0,!0),nr;return sr>0&&Math.abs(vt-yt)<360?nr=tge({cx:L,cy:re,innerRadius:ve,outerRadius:Ce,cornerRadius:Math.min(sr,gr/2),forceCornerRadius:Xe,cornerIsExternal:Ke,startAngle:vt,endAngle:yt}):nr=$Z({cx:L,cy:re,innerRadius:ve,outerRadius:Ce,startAngle:vt,endAngle:yt}),aa.createElement("path",Fz({},Iu(S,!0),{className:$t,d:nr,role:"img"}))};function TE(e){"@babel/helpers - typeof";return TE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},TE(e)}function Bz(){return Bz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Bz.apply(this,arguments)}function iG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function oG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?iG(Object(S),!0).forEach(function(L){nge(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):iG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function nge(e,n,S){return n=age(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function age(e){var n=ige(e,"string");return TE(n)=="symbol"?n:n+""}function ige(e,n){if(TE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(TE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var sG={curveBasisClosed:Sce,curveBasisOpen:Ece,curveBasis:Ace,curveBumpX:cce,curveBumpY:fce,curveLinearClosed:Mce,curveLinear:GP,curveMonotoneX:Cce,curveMonotoneY:kce,curveNatural:Pce,curveStep:Lce,curveStepAfter:Ice,curveStepBefore:Rce},Tk=function(n){return n.x===+n.x&&n.y===+n.y},j5=function(n){return n.x},U5=function(n){return n.y},oge=function(n,S){if(Fu(n))return n;var L="curve".concat(VP(n));return(L==="curveMonotone"||L==="curveBump")&&S?sG["".concat(L).concat(S==="vertical"?"Y":"X")]:sG[L]||GP},sge=function(n){var S=n.type,L=S===void 0?"linear":S,re=n.points,ve=re===void 0?[]:re,Ce=n.baseLine,Be=n.layout,Xe=n.connectNulls,Ke=Xe===void 0?!1:Xe,vt=oge(L,Be),yt=Ke?ve.filter(function(sr){return Tk(sr)}):ve,Gt;if(Array.isArray(Ce)){var $t=Ke?Ce.filter(function(sr){return Tk(sr)}):Ce,gr=yt.map(function(sr,nr){return oG(oG({},sr),{},{base:$t[nr]})});return Be==="vertical"?Gt=vk().y(U5).x1(j5).x0(function(sr){return sr.base.x}):Gt=vk().x(j5).y1(U5).y0(function(sr){return sr.base.y}),Gt.defined(Tk).curve(vt),Gt(gr)}return Be==="vertical"&&gs(Ce)?Gt=vk().y(U5).x1(j5).x0(Ce):gs(Ce)?Gt=vk().x(j5).y1(U5).y0(Ce):Gt=rY().x(j5).y(U5),Gt.defined(Tk).curve(vt),Gt(yt)},cw=function(n){var S=n.className,L=n.points,re=n.path,ve=n.pathRef;if((!L||!L.length)&&!re)return null;var Ce=L&&L.length?sge(n):re;return Ua.createElement("path",Bz({},Iu(n,!1),Ok(n),{className:Ec("recharts-curve",S),d:Ce,ref:ve}))},vO={exports:{}},pO,lG;function lge(){if(lG)return pO;lG=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return pO=e,pO}var mO,uG;function uge(){if(uG)return mO;uG=1;var e=lge();function n(){}function S(){}return S.resetWarningCache=n,mO=function(){function L(Ce,Be,Xe,Ke,vt,yt){if(yt!==e){var Gt=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw Gt.name="Invariant Violation",Gt}}L.isRequired=L;function re(){return L}var ve={array:L,bigint:L,bool:L,func:L,number:L,object:L,string:L,symbol:L,any:L,arrayOf:re,element:L,elementType:L,instanceOf:re,node:L,objectOf:re,oneOf:re,oneOfType:re,shape:re,exact:re,checkPropTypes:S,resetWarningCache:n};return ve.PropTypes=ve,ve},mO}var cG;function JZ(){return cG||(cG=1,vO.exports=uge()()),vO.exports}var cge=JZ();const qf=rh(cge);var fge=Object.getOwnPropertyNames,hge=Object.getOwnPropertySymbols,dge=Object.prototype.hasOwnProperty;function fG(e,n){return function(L,re,ve){return e(L,re,ve)&&n(L,re,ve)}}function Ak(e){return function(S,L,re){if(!S||!L||typeof S!="object"||typeof L!="object")return e(S,L,re);var ve=re.cache,Ce=ve.get(S),Be=ve.get(L);if(Ce&&Be)return Ce===L&&Be===S;ve.set(S,L),ve.set(L,S);var Xe=e(S,L,re);return ve.delete(S),ve.delete(L),Xe}}function vge(e){return e?.[Symbol.toStringTag]}function hG(e){return fge(e).concat(hge(e))}var pge=Object.hasOwn||(function(e,n){return dge.call(e,n)});function Aw(e,n){return e===n||!e&&!n&&e!==e&&n!==n}var mge="__v",yge="__o",gge="_owner",dG=Object.getOwnPropertyDescriptor,vG=Object.keys;function _ge(e,n,S){var L=e.length;if(n.length!==L)return!1;for(;L-- >0;)if(!S.equals(e[L],n[L],L,L,e,n,S))return!1;return!0}function xge(e,n){return Aw(e.getTime(),n.getTime())}function bge(e,n){return e.name===n.name&&e.message===n.message&&e.cause===n.cause&&e.stack===n.stack}function wge(e,n){return e===n}function pG(e,n,S){var L=e.size;if(L!==n.size)return!1;if(!L)return!0;for(var re=new Array(L),ve=e.entries(),Ce,Be,Xe=0;(Ce=ve.next())&&!Ce.done;){for(var Ke=n.entries(),vt=!1,yt=0;(Be=Ke.next())&&!Be.done;){if(re[yt]){yt++;continue}var Gt=Ce.value,$t=Be.value;if(S.equals(Gt[0],$t[0],Xe,yt,e,n,S)&&S.equals(Gt[1],$t[1],Gt[0],$t[0],e,n,S)){vt=re[yt]=!0;break}yt++}if(!vt)return!1;Xe++}return!0}var Tge=Aw;function Age(e,n,S){var L=vG(e),re=L.length;if(vG(n).length!==re)return!1;for(;re-- >0;)if(!QZ(e,n,S,L[re]))return!1;return!0}function q5(e,n,S){var L=hG(e),re=L.length;if(hG(n).length!==re)return!1;for(var ve,Ce,Be;re-- >0;)if(ve=L[re],!QZ(e,n,S,ve)||(Ce=dG(e,ve),Be=dG(n,ve),(Ce||Be)&&(!Ce||!Be||Ce.configurable!==Be.configurable||Ce.enumerable!==Be.enumerable||Ce.writable!==Be.writable)))return!1;return!0}function Sge(e,n){return Aw(e.valueOf(),n.valueOf())}function Ege(e,n){return e.source===n.source&&e.flags===n.flags}function mG(e,n,S){var L=e.size;if(L!==n.size)return!1;if(!L)return!0;for(var re=new Array(L),ve=e.values(),Ce,Be;(Ce=ve.next())&&!Ce.done;){for(var Xe=n.values(),Ke=!1,vt=0;(Be=Xe.next())&&!Be.done;){if(!re[vt]&&S.equals(Ce.value,Be.value,Ce.value,Be.value,e,n,S)){Ke=re[vt]=!0;break}vt++}if(!Ke)return!1}return!0}function Mge(e,n){var S=e.length;if(n.length!==S)return!1;for(;S-- >0;)if(e[S]!==n[S])return!1;return!0}function Cge(e,n){return e.hostname===n.hostname&&e.pathname===n.pathname&&e.protocol===n.protocol&&e.port===n.port&&e.hash===n.hash&&e.username===n.username&&e.password===n.password}function QZ(e,n,S,L){return(L===gge||L===yge||L===mge)&&(e.$$typeof||n.$$typeof)?!0:pge(n,L)&&S.equals(e[L],n[L],L,L,e,n,S)}var kge="[object Arguments]",Pge="[object Boolean]",Lge="[object Date]",Rge="[object Error]",Ige="[object Map]",Dge="[object Number]",Oge="[object Object]",zge="[object RegExp]",Nge="[object Set]",Fge="[object String]",Bge="[object URL]",jge=Array.isArray,yG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,gG=Object.assign,Uge=Object.prototype.toString.call.bind(Object.prototype.toString);function qge(e){var n=e.areArraysEqual,S=e.areDatesEqual,L=e.areErrorsEqual,re=e.areFunctionsEqual,ve=e.areMapsEqual,Ce=e.areNumbersEqual,Be=e.areObjectsEqual,Xe=e.arePrimitiveWrappersEqual,Ke=e.areRegExpsEqual,vt=e.areSetsEqual,yt=e.areTypedArraysEqual,Gt=e.areUrlsEqual,$t=e.unknownTagComparators;return function(sr,nr,jr){if(sr===nr)return!0;if(sr==null||nr==null)return!1;var Ne=typeof sr;if(Ne!==typeof nr)return!1;if(Ne!=="object")return Ne==="number"?Ce(sr,nr,jr):Ne==="function"?re(sr,nr,jr):!1;var an=sr.constructor;if(an!==nr.constructor)return!1;if(an===Object)return Be(sr,nr,jr);if(jge(sr))return n(sr,nr,jr);if(yG!=null&&yG(sr))return yt(sr,nr,jr);if(an===Date)return S(sr,nr,jr);if(an===RegExp)return Ke(sr,nr,jr);if(an===Map)return ve(sr,nr,jr);if(an===Set)return vt(sr,nr,jr);var yn=Uge(sr);if(yn===Lge)return S(sr,nr,jr);if(yn===zge)return Ke(sr,nr,jr);if(yn===Ige)return ve(sr,nr,jr);if(yn===Nge)return vt(sr,nr,jr);if(yn===Oge)return typeof sr.then!="function"&&typeof nr.then!="function"&&Be(sr,nr,jr);if(yn===Bge)return Gt(sr,nr,jr);if(yn===Rge)return L(sr,nr,jr);if(yn===kge)return Be(sr,nr,jr);if(yn===Pge||yn===Dge||yn===Fge)return Xe(sr,nr,jr);if($t){var Lr=$t[yn];if(!Lr){var $r=vge(sr);$r&&(Lr=$t[$r])}if(Lr)return Lr(sr,nr,jr)}return!1}}function Vge(e){var n=e.circular,S=e.createCustomConfig,L=e.strict,re={areArraysEqual:L?q5:_ge,areDatesEqual:xge,areErrorsEqual:bge,areFunctionsEqual:wge,areMapsEqual:L?fG(pG,q5):pG,areNumbersEqual:Tge,areObjectsEqual:L?q5:Age,arePrimitiveWrappersEqual:Sge,areRegExpsEqual:Ege,areSetsEqual:L?fG(mG,q5):mG,areTypedArraysEqual:L?q5:Mge,areUrlsEqual:Cge,unknownTagComparators:void 0};if(S&&(re=gG({},re,S(re))),n){var ve=Ak(re.areArraysEqual),Ce=Ak(re.areMapsEqual),Be=Ak(re.areObjectsEqual),Xe=Ak(re.areSetsEqual);re=gG({},re,{areArraysEqual:ve,areMapsEqual:Ce,areObjectsEqual:Be,areSetsEqual:Xe})}return re}function Hge(e){return function(n,S,L,re,ve,Ce,Be){return e(n,S,Be)}}function Gge(e){var n=e.circular,S=e.comparator,L=e.createState,re=e.equals,ve=e.strict;if(L)return function(Xe,Ke){var vt=L(),yt=vt.cache,Gt=yt===void 0?n?new WeakMap:void 0:yt,$t=vt.meta;return S(Xe,Ke,{cache:Gt,equals:re,meta:$t,strict:ve})};if(n)return function(Xe,Ke){return S(Xe,Ke,{cache:new WeakMap,equals:re,meta:void 0,strict:ve})};var Ce={cache:void 0,equals:re,meta:void 0,strict:ve};return function(Xe,Ke){return S(Xe,Ke,Ce)}}var Xge=px();px({strict:!0});px({circular:!0});px({circular:!0,strict:!0});px({createInternalComparator:function(){return Aw}});px({strict:!0,createInternalComparator:function(){return Aw}});px({circular:!0,createInternalComparator:function(){return Aw}});px({circular:!0,createInternalComparator:function(){return Aw},strict:!0});function px(e){e===void 0&&(e={});var n=e.circular,S=n===void 0?!1:n,L=e.createInternalComparator,re=e.createState,ve=e.strict,Ce=ve===void 0?!1:ve,Be=Vge(e),Xe=qge(Be),Ke=L?L(Xe):Hge(Xe);return Gge({circular:S,comparator:Xe,createState:re,equals:Ke,strict:Ce})}function Wge(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function _G(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,S=-1,L=function re(ve){S<0&&(S=ve),ve-S>n?(e(ve),S=-1):Wge(re)};requestAnimationFrame(L)}function jz(e){"@babel/helpers - typeof";return jz=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},jz(e)}function Yge(e){return Jge(e)||Kge(e)||$ge(e)||Zge()}function Zge(){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 $ge(e,n){if(e){if(typeof e=="string")return xG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return xG(e,n)}}function xG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function Kge(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Jge(e){if(Array.isArray(e))return e}function Qge(){var e={},n=function(){return null},S=!1,L=function re(ve){if(!S){if(Array.isArray(ve)){if(!ve.length)return;var Ce=ve,Be=Yge(Ce),Xe=Be[0],Ke=Be.slice(1);if(typeof Xe=="number"){_G(re.bind(null,Ke),Xe);return}re(Xe),_G(re.bind(null,Ke));return}jz(ve)==="object"&&(e=ve,n(e)),typeof ve=="function"&&ve()}};return{stop:function(){S=!0},start:function(ve){S=!1,L(ve)},subscribe:function(ve){return n=ve,function(){n=function(){return null}}}}}function AE(e){"@babel/helpers - typeof";return AE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},AE(e)}function bG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function wG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?bG(Object(S),!0).forEach(function(L){e$(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):bG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function e$(e,n,S){return n=e1e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function e1e(e){var n=t1e(e,"string");return AE(n)==="symbol"?n:String(n)}function t1e(e,n){if(AE(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(AE(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var r1e=function(n,S){return[Object.keys(n),Object.keys(S)].reduce(function(L,re){return L.filter(function(ve){return re.includes(ve)})})},n1e=function(n){return n},a1e=function(n){return n.replace(/([A-Z])/g,function(S){return"-".concat(S.toLowerCase())})},$5=function(n,S){return Object.keys(S).reduce(function(L,re){return wG(wG({},L),{},e$({},re,n(re,S[re])))},{})},TG=function(n,S,L){return n.map(function(re){return"".concat(a1e(re)," ").concat(S,"ms ").concat(L)}).join(",")};function i1e(e,n){return l1e(e)||s1e(e,n)||t$(e,n)||o1e()}function o1e(){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 s1e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function l1e(e){if(Array.isArray(e))return e}function u1e(e){return h1e(e)||f1e(e)||t$(e)||c1e()}function c1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function t$(e,n){if(e){if(typeof e=="string")return Uz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Uz(e,n)}}function f1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function h1e(e){if(Array.isArray(e))return Uz(e)}function Uz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var uP=1e-4,r$=function(n,S){return[0,3*n,3*S-6*n,3*n-3*S+1]},n$=function(n,S){return n.map(function(L,re){return L*Math.pow(S,re)}).reduce(function(L,re){return L+re})},AG=function(n,S){return function(L){var re=r$(n,S);return n$(re,L)}},d1e=function(n,S){return function(L){var re=r$(n,S),ve=[].concat(u1e(re.map(function(Ce,Be){return Ce*Be}).slice(1)),[0]);return n$(ve,L)}},SG=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];var re=S[0],ve=S[1],Ce=S[2],Be=S[3];if(S.length===1)switch(S[0]){case"linear":re=0,ve=0,Ce=1,Be=1;break;case"ease":re=.25,ve=.1,Ce=.25,Be=1;break;case"ease-in":re=.42,ve=0,Ce=1,Be=1;break;case"ease-out":re=.42,ve=0,Ce=.58,Be=1;break;case"ease-in-out":re=0,ve=0,Ce=.58,Be=1;break;default:{var Xe=S[0].split("(");if(Xe[0]==="cubic-bezier"&&Xe[1].split(")")[0].split(",").length===4){var Ke=Xe[1].split(")")[0].split(",").map(function(nr){return parseFloat(nr)}),vt=i1e(Ke,4);re=vt[0],ve=vt[1],Ce=vt[2],Be=vt[3]}}}var yt=AG(re,Ce),Gt=AG(ve,Be),$t=d1e(re,Ce),gr=function(jr){return jr>1?1:jr<0?0:jr},sr=function(jr){for(var Ne=jr>1?1:jr,an=Ne,yn=0;yn<8;++yn){var Lr=yt(an)-Ne,$r=$t(an);if(Math.abs(Lr-Ne)<uP||$r<uP)return Gt(an);an=gr(an-Lr/$r)}return Gt(an)};return sr.isStepper=!1,sr},v1e=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},S=n.stiff,L=S===void 0?100:S,re=n.damping,ve=re===void 0?8:re,Ce=n.dt,Be=Ce===void 0?17:Ce,Xe=function(vt,yt,Gt){var $t=-(vt-yt)*L,gr=Gt*ve,sr=Gt+($t-gr)*Be/1e3,nr=Gt*Be/1e3+vt;return Math.abs(nr-yt)<uP&&Math.abs(sr)<uP?[yt,0]:[nr,sr]};return Xe.isStepper=!0,Xe.dt=Be,Xe},p1e=function(){for(var n=arguments.length,S=new Array(n),L=0;L<n;L++)S[L]=arguments[L];var re=S[0];if(typeof re=="string")switch(re){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return SG(re);case"spring":return v1e();default:if(re.split("(")[0]==="cubic-bezier")return SG(re)}return typeof re=="function"?re:null};function SE(e){"@babel/helpers - typeof";return SE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},SE(e)}function EG(e){return g1e(e)||y1e(e)||a$(e)||m1e()}function m1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function g1e(e){if(Array.isArray(e))return Vz(e)}function MG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function sp(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?MG(Object(S),!0).forEach(function(L){qz(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):MG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function qz(e,n,S){return n=_1e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function _1e(e){var n=x1e(e,"string");return SE(n)==="symbol"?n:String(n)}function x1e(e,n){if(SE(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(SE(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function b1e(e,n){return A1e(e)||T1e(e,n)||a$(e,n)||w1e()}function w1e(){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 a$(e,n){if(e){if(typeof e=="string")return Vz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Vz(e,n)}}function Vz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function T1e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function A1e(e){if(Array.isArray(e))return e}var cP=function(n,S,L){return n+(S-n)*L},Hz=function(n){var S=n.from,L=n.to;return S!==L},S1e=function e(n,S,L){var re=$5(function(ve,Ce){if(Hz(Ce)){var Be=n(Ce.from,Ce.to,Ce.velocity),Xe=b1e(Be,2),Ke=Xe[0],vt=Xe[1];return sp(sp({},Ce),{},{from:Ke,velocity:vt})}return Ce},S);return L<1?$5(function(ve,Ce){return Hz(Ce)?sp(sp({},Ce),{},{velocity:cP(Ce.velocity,re[ve].velocity,L),from:cP(Ce.from,re[ve].from,L)}):Ce},S):e(n,re,L-1)};const E1e=(function(e,n,S,L,re){var ve=r1e(e,n),Ce=ve.reduce(function(nr,jr){return sp(sp({},nr),{},qz({},jr,[e[jr],n[jr]]))},{}),Be=ve.reduce(function(nr,jr){return sp(sp({},nr),{},qz({},jr,{from:e[jr],velocity:0,to:n[jr]}))},{}),Xe=-1,Ke,vt,yt=function(){return null},Gt=function(){return $5(function(jr,Ne){return Ne.from},Be)},$t=function(){return!Object.values(Be).filter(Hz).length},gr=function(jr){Ke||(Ke=jr);var Ne=jr-Ke,an=Ne/S.dt;Be=S1e(S,Be,an),re(sp(sp(sp({},e),n),Gt())),Ke=jr,$t()||(Xe=requestAnimationFrame(yt))},sr=function(jr){vt||(vt=jr);var Ne=(jr-vt)/L,an=$5(function(Lr,$r){return cP.apply(void 0,EG($r).concat([S(Ne)]))},Ce);if(re(sp(sp(sp({},e),n),an)),Ne<1)Xe=requestAnimationFrame(yt);else{var yn=$5(function(Lr,$r){return cP.apply(void 0,EG($r).concat([S(1)]))},Ce);re(sp(sp(sp({},e),n),yn))}};return yt=S.isStepper?gr:sr,function(){return requestAnimationFrame(yt),function(){cancelAnimationFrame(Xe)}}});function yT(e){"@babel/helpers - typeof";return yT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yT(e)}var M1e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function C1e(e,n){if(e==null)return{};var S=k1e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function k1e(e,n){if(e==null)return{};var S={},L=Object.keys(e),re,ve;for(ve=0;ve<L.length;ve++)re=L[ve],!(n.indexOf(re)>=0)&&(S[re]=e[re]);return S}function yO(e){return I1e(e)||R1e(e)||L1e(e)||P1e()}function P1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L1e(e,n){if(e){if(typeof e=="string")return Gz(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return Gz(e,n)}}function R1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I1e(e){if(Array.isArray(e))return Gz(e)}function Gz(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function CG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function ly(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?CG(Object(S),!0).forEach(function(L){X5(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):CG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function X5(e,n,S){return n=i$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function D1e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function O1e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,i$(L.key),L)}}function z1e(e,n,S){return n&&O1e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function i$(e){var n=N1e(e,"string");return yT(n)==="symbol"?n:String(n)}function N1e(e,n){if(yT(e)!=="object"||e===null)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(yT(L)!=="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function F1e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Xz(e,n)}function Xz(e,n){return Xz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Xz(e,n)}function B1e(e){var n=j1e();return function(){var L=fP(e),re;if(n){var ve=fP(this).constructor;re=Reflect.construct(L,arguments,ve)}else re=L.apply(this,arguments);return Wz(this,re)}}function Wz(e,n){if(n&&(yT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Yz(e)}function Yz(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j1e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fP(e){return fP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},fP(e)}var dy=(function(e){F1e(S,e);var n=B1e(S);function S(L,re){var ve;D1e(this,S),ve=n.call(this,L,re);var Ce=ve.props,Be=Ce.isActive,Xe=Ce.attributeName,Ke=Ce.from,vt=Ce.to,yt=Ce.steps,Gt=Ce.children,$t=Ce.duration;if(ve.handleStyleChange=ve.handleStyleChange.bind(Yz(ve)),ve.changeStyle=ve.changeStyle.bind(Yz(ve)),!Be||$t<=0)return ve.state={style:{}},typeof Gt=="function"&&(ve.state={style:vt}),Wz(ve);if(yt&&yt.length)ve.state={style:yt[0].style};else if(Ke){if(typeof Gt=="function")return ve.state={style:Ke},Wz(ve);ve.state={style:Xe?X5({},Xe,Ke):Ke}}else ve.state={style:{}};return ve}return z1e(S,[{key:"componentDidMount",value:function(){var re=this.props,ve=re.isActive,Ce=re.canBegin;this.mounted=!0,!(!ve||!Ce)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(re){var ve=this.props,Ce=ve.isActive,Be=ve.canBegin,Xe=ve.attributeName,Ke=ve.shouldReAnimate,vt=ve.to,yt=ve.from,Gt=this.state.style;if(Be){if(!Ce){var $t={style:Xe?X5({},Xe,vt):vt};this.state&&Gt&&(Xe&&Gt[Xe]!==vt||!Xe&&Gt!==vt)&&this.setState($t);return}if(!(Xge(re.to,vt)&&re.canBegin&&re.isActive)){var gr=!re.canBegin||!re.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var sr=gr||Ke?yt:re.to;if(this.state&&Gt){var nr={style:Xe?X5({},Xe,sr):sr};(Xe&&Gt[Xe]!==sr||!Xe&&Gt!==sr)&&this.setState(nr)}this.runAnimation(ly(ly({},this.props),{},{from:sr,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var re=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),re&&re()}},{key:"handleStyleChange",value:function(re){this.changeStyle(re)}},{key:"changeStyle",value:function(re){this.mounted&&this.setState({style:re})}},{key:"runJSAnimation",value:function(re){var ve=this,Ce=re.from,Be=re.to,Xe=re.duration,Ke=re.easing,vt=re.begin,yt=re.onAnimationEnd,Gt=re.onAnimationStart,$t=E1e(Ce,Be,p1e(Ke),Xe,this.changeStyle),gr=function(){ve.stopJSAnimation=$t()};this.manager.start([Gt,vt,gr,Xe,yt])}},{key:"runStepAnimation",value:function(re){var ve=this,Ce=re.steps,Be=re.begin,Xe=re.onAnimationStart,Ke=Ce[0],vt=Ke.style,yt=Ke.duration,Gt=yt===void 0?0:yt,$t=function(sr,nr,jr){if(jr===0)return sr;var Ne=nr.duration,an=nr.easing,yn=an===void 0?"ease":an,Lr=nr.style,$r=nr.properties,dn=nr.onAnimationEnd,Jn=jr>0?Ce[jr-1]:nr,xn=$r||Object.keys(Lr);if(typeof yn=="function"||yn==="spring")return[].concat(yO(sr),[ve.runJSAnimation.bind(ve,{from:Jn.style,to:Lr,duration:Ne,easing:yn}),Ne]);var Na=TG(xn,Ne,yn),zn=ly(ly(ly({},Jn.style),Lr),{},{transition:Na});return[].concat(yO(sr),[zn,Ne,dn]).filter(n1e)};return this.manager.start([Xe].concat(yO(Ce.reduce($t,[vt,Math.max(Gt,Be)])),[re.onAnimationEnd]))}},{key:"runAnimation",value:function(re){this.manager||(this.manager=Qge());var ve=re.begin,Ce=re.duration,Be=re.attributeName,Xe=re.to,Ke=re.easing,vt=re.onAnimationStart,yt=re.onAnimationEnd,Gt=re.steps,$t=re.children,gr=this.manager;if(this.unSubscribe=gr.subscribe(this.handleStyleChange),typeof Ke=="function"||typeof $t=="function"||Ke==="spring"){this.runJSAnimation(re);return}if(Gt.length>1){this.runStepAnimation(re);return}var sr=Be?X5({},Be,Xe):Xe,nr=TG(Object.keys(sr),Ce,Ke);gr.start([vt,ve,ly(ly({},sr),{},{transition:nr}),Ce,yt])}},{key:"render",value:function(){var re=this.props,ve=re.children;re.begin;var Ce=re.duration;re.attributeName,re.easing;var Be=re.isActive;re.steps,re.from,re.to,re.canBegin,re.onAnimationEnd,re.shouldReAnimate,re.onAnimationReStart;var Xe=C1e(re,M1e),Ke=Ua.Children.count(ve),vt=this.state.style;if(typeof ve=="function")return ve(vt);if(!Be||Ke===0||Ce<=0)return ve;var yt=function($t){var gr=$t.props,sr=gr.style,nr=sr===void 0?{}:sr,jr=gr.className,Ne=Ua.cloneElement($t,ly(ly({},Xe),{},{style:ly(ly({},nr),vt),className:jr}));return Ne};return Ke===1?yt(Ua.Children.only(ve)):aa.createElement("div",null,Ua.Children.map(ve,function(Gt){return yt(Gt)}))}}]),S})(Ua.PureComponent);dy.displayName="Animate";dy.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};dy.propTypes={from:qf.oneOfType([qf.object,qf.string]),to:qf.oneOfType([qf.object,qf.string]),attributeName:qf.string,duration:qf.number,begin:qf.number,easing:qf.oneOfType([qf.string,qf.func]),steps:qf.arrayOf(qf.shape({duration:qf.number.isRequired,style:qf.object.isRequired,easing:qf.oneOfType([qf.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),qf.func]),properties:qf.arrayOf("string"),onAnimationEnd:qf.func})),children:qf.oneOfType([qf.node,qf.func]),isActive:qf.bool,canBegin:qf.bool,onAnimationEnd:qf.func,shouldReAnimate:qf.bool,onAnimationStart:qf.func,onAnimationReStart:qf.func};function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},EE(e)}function hP(){return hP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},hP.apply(this,arguments)}function U1e(e,n){return G1e(e)||H1e(e,n)||V1e(e,n)||q1e()}function q1e(){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 V1e(e,n){if(e){if(typeof e=="string")return kG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return kG(e,n)}}function kG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function H1e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function G1e(e){if(Array.isArray(e))return e}function PG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function LG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?PG(Object(S),!0).forEach(function(L){X1e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):PG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function X1e(e,n,S){return n=W1e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function W1e(e){var n=Y1e(e,"string");return EE(n)=="symbol"?n:n+""}function Y1e(e,n){if(EE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(EE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var RG=function(n,S,L,re,ve){var Ce=Math.min(Math.abs(L)/2,Math.abs(re)/2),Be=re>=0?1:-1,Xe=L>=0?1:-1,Ke=re>=0&&L>=0||re<0&&L<0?1:0,vt;if(Ce>0&&ve instanceof Array){for(var yt=[0,0,0,0],Gt=0,$t=4;Gt<$t;Gt++)yt[Gt]=ve[Gt]>Ce?Ce:ve[Gt];vt="M".concat(n,",").concat(S+Be*yt[0]),yt[0]>0&&(vt+="A ".concat(yt[0],",").concat(yt[0],",0,0,").concat(Ke,",").concat(n+Xe*yt[0],",").concat(S)),vt+="L ".concat(n+L-Xe*yt[1],",").concat(S),yt[1]>0&&(vt+="A ".concat(yt[1],",").concat(yt[1],",0,0,").concat(Ke,`,
        `).concat(n+L,",").concat(S+Be*yt[1])),vt+="L ".concat(n+L,",").concat(S+re-Be*yt[2]),yt[2]>0&&(vt+="A ".concat(yt[2],",").concat(yt[2],",0,0,").concat(Ke,`,
        `).concat(n+L-Xe*yt[2],",").concat(S+re)),vt+="L ".concat(n+Xe*yt[3],",").concat(S+re),yt[3]>0&&(vt+="A ".concat(yt[3],",").concat(yt[3],",0,0,").concat(Ke,`,
        `).concat(n,",").concat(S+re-Be*yt[3])),vt+="Z"}else if(Ce>0&&ve===+ve&&ve>0){var gr=Math.min(Ce,ve);vt="M ".concat(n,",").concat(S+Be*gr,`
            A `).concat(gr,",").concat(gr,",0,0,").concat(Ke,",").concat(n+Xe*gr,",").concat(S,`
            L `).concat(n+L-Xe*gr,",").concat(S,`
            A `).concat(gr,",").concat(gr,",0,0,").concat(Ke,",").concat(n+L,",").concat(S+Be*gr,`
            L `).concat(n+L,",").concat(S+re-Be*gr,`
            A `).concat(gr,",").concat(gr,",0,0,").concat(Ke,",").concat(n+L-Xe*gr,",").concat(S+re,`
            L `).concat(n+Xe*gr,",").concat(S+re,`
            A `).concat(gr,",").concat(gr,",0,0,").concat(Ke,",").concat(n,",").concat(S+re-Be*gr," Z")}else vt="M ".concat(n,",").concat(S," h ").concat(L," v ").concat(re," h ").concat(-L," Z");return vt},Z1e=function(n,S){if(!n||!S)return!1;var L=n.x,re=n.y,ve=S.x,Ce=S.y,Be=S.width,Xe=S.height;if(Math.abs(Be)>0&&Math.abs(Xe)>0){var Ke=Math.min(ve,ve+Be),vt=Math.max(ve,ve+Be),yt=Math.min(Ce,Ce+Xe),Gt=Math.max(Ce,Ce+Xe);return L>=Ke&&L<=vt&&re>=yt&&re<=Gt}return!1},$1e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},C9=function(n){var S=LG(LG({},$1e),n),L=Ua.useRef(),re=Ua.useState(-1),ve=U1e(re,2),Ce=ve[0],Be=ve[1];Ua.useEffect(function(){if(L.current&&L.current.getTotalLength)try{var yn=L.current.getTotalLength();yn&&Be(yn)}catch{}},[]);var Xe=S.x,Ke=S.y,vt=S.width,yt=S.height,Gt=S.radius,$t=S.className,gr=S.animationEasing,sr=S.animationDuration,nr=S.animationBegin,jr=S.isAnimationActive,Ne=S.isUpdateAnimationActive;if(Xe!==+Xe||Ke!==+Ke||vt!==+vt||yt!==+yt||vt===0||yt===0)return null;var an=Ec("recharts-rectangle",$t);return Ne?aa.createElement(dy,{canBegin:Ce>0,from:{width:vt,height:yt,x:Xe,y:Ke},to:{width:vt,height:yt,x:Xe,y:Ke},duration:sr,animationEasing:gr,isActive:Ne},function(yn){var Lr=yn.width,$r=yn.height,dn=yn.x,Jn=yn.y;return aa.createElement(dy,{canBegin:Ce>0,from:"0px ".concat(Ce===-1?1:Ce,"px"),to:"".concat(Ce,"px 0px"),attributeName:"strokeDasharray",begin:nr,duration:sr,isActive:jr,easing:gr},aa.createElement("path",hP({},Iu(S,!0),{className:an,d:RG(dn,Jn,Lr,$r,Gt),ref:L})))}):aa.createElement("path",hP({},Iu(S,!0),{className:an,d:RG(Xe,Ke,vt,yt,Gt)}))};function Zz(){return Zz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Zz.apply(this,arguments)}var sL=function(n){var S=n.cx,L=n.cy,re=n.r,ve=n.className,Ce=Ec("recharts-dot",ve);return S===+S&&L===+L&&re===+re?Ua.createElement("circle",Zz({},Iu(n,!1),Ok(n),{className:Ce,cx:S,cy:L,r:re})):null};function ME(e){"@babel/helpers - typeof";return ME=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ME(e)}var K1e=["x","y","top","left","width","height","className"];function $z(){return $z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},$z.apply(this,arguments)}function IG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function J1e(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?IG(Object(S),!0).forEach(function(L){Q1e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):IG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Q1e(e,n,S){return n=e_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function e_e(e){var n=t_e(e,"string");return ME(n)=="symbol"?n:n+""}function t_e(e,n){if(ME(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ME(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function r_e(e,n){if(e==null)return{};var S=n_e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function n_e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var a_e=function(n,S,L,re,ve,Ce){return"M".concat(n,",").concat(ve,"v").concat(re,"M").concat(Ce,",").concat(S,"h").concat(L)},i_e=function(n){var S=n.x,L=S===void 0?0:S,re=n.y,ve=re===void 0?0:re,Ce=n.top,Be=Ce===void 0?0:Ce,Xe=n.left,Ke=Xe===void 0?0:Xe,vt=n.width,yt=vt===void 0?0:vt,Gt=n.height,$t=Gt===void 0?0:Gt,gr=n.className,sr=r_e(n,K1e),nr=J1e({x:L,y:ve,top:Be,left:Ke,width:yt,height:$t},sr);return!gs(L)||!gs(ve)||!gs(yt)||!gs($t)||!gs(Be)||!gs(Ke)?null:aa.createElement("path",$z({},Iu(nr,!0),{className:Ec("recharts-cross",gr),d:a_e(L,ve,yt,$t,Be,Ke)}))},gO,DG;function o_e(){if(DG)return gO;DG=1;var e=SY(),n=e(Object.getPrototypeOf,Object);return gO=n,gO}var _O,OG;function s_e(){if(OG)return _O;OG=1;var e=M1(),n=o_e(),S=C1(),L="[object Object]",re=Function.prototype,ve=Object.prototype,Ce=re.toString,Be=ve.hasOwnProperty,Xe=Ce.call(Object);function Ke(vt){if(!S(vt)||e(vt)!=L)return!1;var yt=n(vt);if(yt===null)return!0;var Gt=Be.call(yt,"constructor")&&yt.constructor;return typeof Gt=="function"&&Gt instanceof Gt&&Ce.call(Gt)==Xe}return _O=Ke,_O}var l_e=s_e();const u_e=rh(l_e);var xO,zG;function c_e(){if(zG)return xO;zG=1;var e=M1(),n=C1(),S="[object Boolean]";function L(re){return re===!0||re===!1||n(re)&&e(re)==S}return xO=L,xO}var f_e=c_e();const h_e=rh(f_e);function CE(e){"@babel/helpers - typeof";return CE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},CE(e)}function dP(){return dP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},dP.apply(this,arguments)}function d_e(e,n){return y_e(e)||m_e(e,n)||p_e(e,n)||v_e()}function v_e(){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 p_e(e,n){if(e){if(typeof e=="string")return NG(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return NG(e,n)}}function NG(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function m_e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function y_e(e){if(Array.isArray(e))return e}function FG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function BG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?FG(Object(S),!0).forEach(function(L){g_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):FG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function g_e(e,n,S){return n=__e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function __e(e){var n=x_e(e,"string");return CE(n)=="symbol"?n:n+""}function x_e(e,n){if(CE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(CE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var jG=function(n,S,L,re,ve){var Ce=L-re,Be;return Be="M ".concat(n,",").concat(S),Be+="L ".concat(n+L,",").concat(S),Be+="L ".concat(n+L-Ce/2,",").concat(S+ve),Be+="L ".concat(n+L-Ce/2-re,",").concat(S+ve),Be+="L ".concat(n,",").concat(S," Z"),Be},b_e={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},w_e=function(n){var S=BG(BG({},b_e),n),L=Ua.useRef(),re=Ua.useState(-1),ve=d_e(re,2),Ce=ve[0],Be=ve[1];Ua.useEffect(function(){if(L.current&&L.current.getTotalLength)try{var an=L.current.getTotalLength();an&&Be(an)}catch{}},[]);var Xe=S.x,Ke=S.y,vt=S.upperWidth,yt=S.lowerWidth,Gt=S.height,$t=S.className,gr=S.animationEasing,sr=S.animationDuration,nr=S.animationBegin,jr=S.isUpdateAnimationActive;if(Xe!==+Xe||Ke!==+Ke||vt!==+vt||yt!==+yt||Gt!==+Gt||vt===0&&yt===0||Gt===0)return null;var Ne=Ec("recharts-trapezoid",$t);return jr?aa.createElement(dy,{canBegin:Ce>0,from:{upperWidth:0,lowerWidth:0,height:Gt,x:Xe,y:Ke},to:{upperWidth:vt,lowerWidth:yt,height:Gt,x:Xe,y:Ke},duration:sr,animationEasing:gr,isActive:jr},function(an){var yn=an.upperWidth,Lr=an.lowerWidth,$r=an.height,dn=an.x,Jn=an.y;return aa.createElement(dy,{canBegin:Ce>0,from:"0px ".concat(Ce===-1?1:Ce,"px"),to:"".concat(Ce,"px 0px"),attributeName:"strokeDasharray",begin:nr,duration:sr,easing:gr},aa.createElement("path",dP({},Iu(S,!0),{className:Ne,d:jG(dn,Jn,yn,Lr,$r),ref:L})))}):aa.createElement("g",null,aa.createElement("path",dP({},Iu(S,!0),{className:Ne,d:jG(Xe,Ke,vt,yt,Gt)})))},T_e=["option","shapeType","propTransformer","activeClassName","isActive"];function kE(e){"@babel/helpers - typeof";return kE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kE(e)}function A_e(e,n){if(e==null)return{};var S=S_e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function S_e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function UG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function vP(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?UG(Object(S),!0).forEach(function(L){E_e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):UG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function E_e(e,n,S){return n=M_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function M_e(e){var n=C_e(e,"string");return kE(n)=="symbol"?n:n+""}function C_e(e,n){if(kE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(kE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function k_e(e,n){return vP(vP({},n),e)}function P_e(e,n){return e==="symbols"}function qG(e){var n=e.shapeType,S=e.elementProps;switch(n){case"rectangle":return aa.createElement(C9,S);case"trapezoid":return aa.createElement(w_e,S);case"sector":return aa.createElement(KZ,S);case"symbols":if(P_e(n))return aa.createElement(WP,S);break;default:return null}}function L_e(e){return Ua.isValidElement(e)?e.props:e}function Kz(e){var n=e.option,S=e.shapeType,L=e.propTransformer,re=L===void 0?k_e:L,ve=e.activeClassName,Ce=ve===void 0?"recharts-active-shape":ve,Be=e.isActive,Xe=A_e(e,T_e),Ke;if(Ua.isValidElement(n))Ke=Ua.cloneElement(n,vP(vP({},Xe),L_e(n)));else if(Fu(n))Ke=n(Xe);else if(u_e(n)&&!h_e(n)){var vt=re(n,Xe);Ke=aa.createElement(qG,{shapeType:S,elementProps:vt})}else{var yt=Xe;Ke=aa.createElement(qG,{shapeType:S,elementProps:yt})}return Be?aa.createElement(Rf,{className:Ce},Ke):Ke}function lL(e,n){return n!=null&&"trapezoids"in e.props}function uL(e,n){return n!=null&&"sectors"in e.props}function PE(e,n){return n!=null&&"points"in e.props}function R_e(e,n){var S,L,re=e.x===(n==null||(S=n.labelViewBox)===null||S===void 0?void 0:S.x)||e.x===n.x,ve=e.y===(n==null||(L=n.labelViewBox)===null||L===void 0?void 0:L.y)||e.y===n.y;return re&&ve}function I_e(e,n){var S=e.endAngle===n.endAngle,L=e.startAngle===n.startAngle;return S&&L}function D_e(e,n){var S=e.x===n.x,L=e.y===n.y,re=e.z===n.z;return S&&L&&re}function O_e(e,n){var S;return lL(e,n)?S=R_e:uL(e,n)?S=I_e:PE(e,n)&&(S=D_e),S}function z_e(e,n){var S;return lL(e,n)?S="trapezoids":uL(e,n)?S="sectors":PE(e,n)&&(S="points"),S}function N_e(e,n){if(lL(e,n)){var S;return(S=n.tooltipPayload)===null||S===void 0||(S=S[0])===null||S===void 0||(S=S.payload)===null||S===void 0?void 0:S.payload}if(uL(e,n)){var L;return(L=n.tooltipPayload)===null||L===void 0||(L=L[0])===null||L===void 0||(L=L.payload)===null||L===void 0?void 0:L.payload}return PE(e,n)?n.payload:{}}function F_e(e){var n=e.activeTooltipItem,S=e.graphicalItem,L=e.itemData,re=z_e(S,n),ve=N_e(S,n),Ce=L.filter(function(Xe,Ke){var vt=mw(ve,Xe),yt=S.props[re].filter(function(gr){var sr=O_e(S,n);return sr(gr,n)}),Gt=S.props[re].indexOf(yt[yt.length-1]),$t=Ke===Gt;return vt&&$t}),Be=L.indexOf(Ce[Ce.length-1]);return Be}var bO,VG;function B_e(){if(VG)return bO;VG=1;var e=Math.ceil,n=Math.max;function S(L,re,ve,Ce){for(var Be=-1,Xe=n(e((re-L)/(ve||1)),0),Ke=Array(Xe);Xe--;)Ke[Ce?Xe:++Be]=L,L+=ve;return Ke}return bO=S,bO}var wO,HG;function o$(){if(HG)return wO;HG=1;var e=UY(),n=1/0,S=17976931348623157e292;function L(re){if(!re)return re===0?re:0;if(re=e(re),re===n||re===-n){var ve=re<0?-1:1;return ve*S}return re===re?re:0}return wO=L,wO}var TO,GG;function j_e(){if(GG)return TO;GG=1;var e=B_e(),n=$P(),S=o$();function L(re){return function(ve,Ce,Be){return Be&&typeof Be!="number"&&n(ve,Ce,Be)&&(Ce=Be=void 0),ve=S(ve),Ce===void 0?(Ce=ve,ve=0):Ce=S(Ce),Be=Be===void 0?ve<Ce?1:-1:S(Be),e(ve,Ce,Be,re)}}return TO=L,TO}var AO,XG;function U_e(){if(XG)return AO;XG=1;var e=j_e(),n=e();return AO=n,AO}var q_e=U_e();const pP=rh(q_e);function LE(e){"@babel/helpers - typeof";return LE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},LE(e)}function WG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function YG(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?WG(Object(S),!0).forEach(function(L){s$(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):WG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function s$(e,n,S){return n=V_e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function V_e(e){var n=H_e(e,"string");return LE(n)=="symbol"?n:n+""}function H_e(e,n){if(LE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(LE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var G_e=["Webkit","Moz","O","ms"],X_e=function(n,S){var L=n.replace(/(\w)/,function(ve){return ve.toUpperCase()}),re=G_e.reduce(function(ve,Ce){return YG(YG({},ve),{},s$({},Ce+L,S))},{});return re[n]=S,re};function gT(e){"@babel/helpers - typeof";return gT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},gT(e)}function mP(){return mP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},mP.apply(this,arguments)}function ZG(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function SO(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?ZG(Object(S),!0).forEach(function(L){Km(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):ZG(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function W_e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function $G(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,u$(L.key),L)}}function Y_e(e,n,S){return n&&$G(e.prototype,n),S&&$G(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Z_e(e,n,S){return n=yP(n),$_e(e,l$()?Reflect.construct(n,S||[],yP(e).constructor):n.apply(e,S))}function $_e(e,n){if(n&&(gT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K_e(e)}function K_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l$=function(){return!!e})()}function yP(e){return yP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},yP(e)}function J_e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&Jz(e,n)}function Jz(e,n){return Jz=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},Jz(e,n)}function Km(e,n,S){return n=u$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function u$(e){var n=Q_e(e,"string");return gT(n)=="symbol"?n:n+""}function Q_e(e,n){if(gT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(gT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var exe=function(n){var S=n.data,L=n.startIndex,re=n.endIndex,ve=n.x,Ce=n.width,Be=n.travellerWidth;if(!S||!S.length)return{};var Xe=S.length,Ke=Y5().domain(pP(0,Xe)).range([ve,ve+Ce-Be]),vt=Ke.domain().map(function(yt){return Ke(yt)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:Ke(L),endX:Ke(re),scale:Ke,scaleValues:vt}},KG=function(n){return n.changedTouches&&!!n.changedTouches.length},_T=(function(e){function n(S){var L;return W_e(this,n),L=Z_e(this,n,[S]),Km(L,"handleDrag",function(re){L.leaveTimer&&(clearTimeout(L.leaveTimer),L.leaveTimer=null),L.state.isTravellerMoving?L.handleTravellerMove(re):L.state.isSlideMoving&&L.handleSlideDrag(re)}),Km(L,"handleTouchMove",function(re){re.changedTouches!=null&&re.changedTouches.length>0&&L.handleDrag(re.changedTouches[0])}),Km(L,"handleDragEnd",function(){L.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var re=L.props,ve=re.endIndex,Ce=re.onDragEnd,Be=re.startIndex;Ce?.({endIndex:ve,startIndex:Be})}),L.detachDragEndListener()}),Km(L,"handleLeaveWrapper",function(){(L.state.isTravellerMoving||L.state.isSlideMoving)&&(L.leaveTimer=window.setTimeout(L.handleDragEnd,L.props.leaveTimeOut))}),Km(L,"handleEnterSlideOrTraveller",function(){L.setState({isTextActive:!0})}),Km(L,"handleLeaveSlideOrTraveller",function(){L.setState({isTextActive:!1})}),Km(L,"handleSlideDragStart",function(re){var ve=KG(re)?re.changedTouches[0]:re;L.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:ve.pageX}),L.attachDragEndListener()}),L.travellerDragStartHandlers={startX:L.handleTravellerDragStart.bind(L,"startX"),endX:L.handleTravellerDragStart.bind(L,"endX")},L.state={},L}return J_e(n,e),Y_e(n,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(L){var re=L.startX,ve=L.endX,Ce=this.state.scaleValues,Be=this.props,Xe=Be.gap,Ke=Be.data,vt=Ke.length-1,yt=Math.min(re,ve),Gt=Math.max(re,ve),$t=n.getIndexInRange(Ce,yt),gr=n.getIndexInRange(Ce,Gt);return{startIndex:$t-$t%Xe,endIndex:gr===vt?vt:gr-gr%Xe}}},{key:"getTextOfTick",value:function(L){var re=this.props,ve=re.data,Ce=re.tickFormatter,Be=re.dataKey,Xe=Dv(ve[L],Be,L);return Fu(Ce)?Ce(Xe,L):Xe}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(L){var re=this.state,ve=re.slideMoveStartX,Ce=re.startX,Be=re.endX,Xe=this.props,Ke=Xe.x,vt=Xe.width,yt=Xe.travellerWidth,Gt=Xe.startIndex,$t=Xe.endIndex,gr=Xe.onChange,sr=L.pageX-ve;sr>0?sr=Math.min(sr,Ke+vt-yt-Be,Ke+vt-yt-Ce):sr<0&&(sr=Math.max(sr,Ke-Ce,Ke-Be));var nr=this.getIndex({startX:Ce+sr,endX:Be+sr});(nr.startIndex!==Gt||nr.endIndex!==$t)&&gr&&gr(nr),this.setState({startX:Ce+sr,endX:Be+sr,slideMoveStartX:L.pageX})}},{key:"handleTravellerDragStart",value:function(L,re){var ve=KG(re)?re.changedTouches[0]:re;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:L,brushMoveStartX:ve.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(L){var re=this.state,ve=re.brushMoveStartX,Ce=re.movingTravellerId,Be=re.endX,Xe=re.startX,Ke=this.state[Ce],vt=this.props,yt=vt.x,Gt=vt.width,$t=vt.travellerWidth,gr=vt.onChange,sr=vt.gap,nr=vt.data,jr={startX:this.state.startX,endX:this.state.endX},Ne=L.pageX-ve;Ne>0?Ne=Math.min(Ne,yt+Gt-$t-Ke):Ne<0&&(Ne=Math.max(Ne,yt-Ke)),jr[Ce]=Ke+Ne;var an=this.getIndex(jr),yn=an.startIndex,Lr=an.endIndex,$r=function(){var Jn=nr.length-1;return Ce==="startX"&&(Be>Xe?yn%sr===0:Lr%sr===0)||Be<Xe&&Lr===Jn||Ce==="endX"&&(Be>Xe?Lr%sr===0:yn%sr===0)||Be>Xe&&Lr===Jn};this.setState(Km(Km({},Ce,Ke+Ne),"brushMoveStartX",L.pageX),function(){gr&&$r()&&gr(an)})}},{key:"handleTravellerMoveKeyboard",value:function(L,re){var ve=this,Ce=this.state,Be=Ce.scaleValues,Xe=Ce.startX,Ke=Ce.endX,vt=this.state[re],yt=Be.indexOf(vt);if(yt!==-1){var Gt=yt+L;if(!(Gt===-1||Gt>=Be.length)){var $t=Be[Gt];re==="startX"&&$t>=Ke||re==="endX"&&$t<=Xe||this.setState(Km({},re,$t),function(){ve.props.onChange(ve.getIndex({startX:ve.state.startX,endX:ve.state.endX}))})}}}},{key:"renderBackground",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Xe=L.fill,Ke=L.stroke;return aa.createElement("rect",{stroke:Ke,fill:Xe,x:re,y:ve,width:Ce,height:Be})}},{key:"renderPanorama",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Xe=L.data,Ke=L.children,vt=L.padding,yt=Ua.Children.only(Ke);return yt?aa.cloneElement(yt,{x:re,y:ve,width:Ce,height:Be,margin:vt,compact:!0,data:Xe}):null}},{key:"renderTravellerLayer",value:function(L,re){var ve,Ce,Be=this,Xe=this.props,Ke=Xe.y,vt=Xe.travellerWidth,yt=Xe.height,Gt=Xe.traveller,$t=Xe.ariaLabel,gr=Xe.data,sr=Xe.startIndex,nr=Xe.endIndex,jr=Math.max(L,this.props.x),Ne=SO(SO({},Iu(this.props,!1)),{},{x:jr,y:Ke,width:vt,height:yt}),an=$t||"Min value: ".concat((ve=gr[sr])===null||ve===void 0?void 0:ve.name,", Max value: ").concat((Ce=gr[nr])===null||Ce===void 0?void 0:Ce.name);return aa.createElement(Rf,{tabIndex:0,role:"slider","aria-label":an,"aria-valuenow":L,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[re],onTouchStart:this.travellerDragStartHandlers[re],onKeyDown:function(Lr){["ArrowLeft","ArrowRight"].includes(Lr.key)&&(Lr.preventDefault(),Lr.stopPropagation(),Be.handleTravellerMoveKeyboard(Lr.key==="ArrowRight"?1:-1,re))},onFocus:function(){Be.setState({isTravellerFocused:!0})},onBlur:function(){Be.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},n.renderTraveller(Gt,Ne))}},{key:"renderSlide",value:function(L,re){var ve=this.props,Ce=ve.y,Be=ve.height,Xe=ve.stroke,Ke=ve.travellerWidth,vt=Math.min(L,re)+Ke,yt=Math.max(Math.abs(re-L)-Ke,0);return aa.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:Xe,fillOpacity:.2,x:vt,y:Ce,width:yt,height:Be})}},{key:"renderText",value:function(){var L=this.props,re=L.startIndex,ve=L.endIndex,Ce=L.y,Be=L.height,Xe=L.travellerWidth,Ke=L.stroke,vt=this.state,yt=vt.startX,Gt=vt.endX,$t=5,gr={pointerEvents:"none",fill:Ke};return aa.createElement(Rf,{className:"recharts-brush-texts"},aa.createElement(Xk,mP({textAnchor:"end",verticalAnchor:"middle",x:Math.min(yt,Gt)-$t,y:Ce+Be/2},gr),this.getTextOfTick(re)),aa.createElement(Xk,mP({textAnchor:"start",verticalAnchor:"middle",x:Math.max(yt,Gt)+Xe+$t,y:Ce+Be/2},gr),this.getTextOfTick(ve)))}},{key:"render",value:function(){var L=this.props,re=L.data,ve=L.className,Ce=L.children,Be=L.x,Xe=L.y,Ke=L.width,vt=L.height,yt=L.alwaysShowText,Gt=this.state,$t=Gt.startX,gr=Gt.endX,sr=Gt.isTextActive,nr=Gt.isSlideMoving,jr=Gt.isTravellerMoving,Ne=Gt.isTravellerFocused;if(!re||!re.length||!gs(Be)||!gs(Xe)||!gs(Ke)||!gs(vt)||Ke<=0||vt<=0)return null;var an=Ec("recharts-brush",ve),yn=aa.Children.count(Ce)===1,Lr=X_e("userSelect","none");return aa.createElement(Rf,{className:an,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:Lr},this.renderBackground(),yn&&this.renderPanorama(),this.renderSlide($t,gr),this.renderTravellerLayer($t,"startX"),this.renderTravellerLayer(gr,"endX"),(sr||nr||jr||Ne||yt)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(L){var re=L.x,ve=L.y,Ce=L.width,Be=L.height,Xe=L.stroke,Ke=Math.floor(ve+Be/2)-1;return aa.createElement(aa.Fragment,null,aa.createElement("rect",{x:re,y:ve,width:Ce,height:Be,fill:Xe,stroke:"none"}),aa.createElement("line",{x1:re+1,y1:Ke,x2:re+Ce-1,y2:Ke,fill:"none",stroke:"#fff"}),aa.createElement("line",{x1:re+1,y1:Ke+2,x2:re+Ce-1,y2:Ke+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(L,re){var ve;return aa.isValidElement(L)?ve=aa.cloneElement(L,re):Fu(L)?ve=L(re):ve=n.renderDefaultTraveller(re),ve}},{key:"getDerivedStateFromProps",value:function(L,re){var ve=L.data,Ce=L.width,Be=L.x,Xe=L.travellerWidth,Ke=L.updateId,vt=L.startIndex,yt=L.endIndex;if(ve!==re.prevData||Ke!==re.prevUpdateId)return SO({prevData:ve,prevTravellerWidth:Xe,prevUpdateId:Ke,prevX:Be,prevWidth:Ce},ve&&ve.length?exe({data:ve,width:Ce,x:Be,travellerWidth:Xe,startIndex:vt,endIndex:yt}):{scale:null,scaleValues:null});if(re.scale&&(Ce!==re.prevWidth||Be!==re.prevX||Xe!==re.prevTravellerWidth)){re.scale.range([Be,Be+Ce-Xe]);var Gt=re.scale.domain().map(function($t){return re.scale($t)});return{prevData:ve,prevTravellerWidth:Xe,prevUpdateId:Ke,prevX:Be,prevWidth:Ce,startX:re.scale(L.startIndex),endX:re.scale(L.endIndex),scaleValues:Gt}}return null}},{key:"getIndexInRange",value:function(L,re){for(var ve=L.length,Ce=0,Be=ve-1;Be-Ce>1;){var Xe=Math.floor((Ce+Be)/2);L[Xe]>re?Be=Xe:Ce=Xe}return re>=L[Be]?Be:Ce}}])})(Ua.PureComponent);Km(_T,"displayName","Brush");Km(_T,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var EO,JG;function txe(){if(JG)return EO;JG=1;var e=Q7();function n(S,L){var re;return e(S,function(ve,Ce,Be){return re=L(ve,Ce,Be),!re}),!!re}return EO=n,EO}var MO,QG;function rxe(){if(QG)return MO;QG=1;var e=gY(),n=fx(),S=txe(),L=Tm(),re=$P();function ve(Ce,Be,Xe){var Ke=L(Ce)?e:S;return Xe&&re(Ce,Be,Xe)&&(Be=void 0),Ke(Ce,n(Be,3))}return MO=ve,MO}var nxe=rxe();const axe=rh(nxe);var mg=function(n,S){var L=n.alwaysShow,re=n.ifOverflow;return L&&(re="extendDomain"),re===S},CO,eX;function ixe(){if(eX)return CO;eX=1;var e=zY();function n(S,L,re){L=="__proto__"&&e?e(S,L,{configurable:!0,enumerable:!0,value:re,writable:!0}):S[L]=re}return CO=n,CO}var kO,tX;function oxe(){if(tX)return kO;tX=1;var e=ixe(),n=DY(),S=fx();function L(re,ve){var Ce={};return ve=S(ve,3),n(re,function(Be,Xe,Ke){e(Ce,Xe,ve(Be,Xe,Ke))}),Ce}return kO=L,kO}var sxe=oxe();const lxe=rh(sxe);var PO,rX;function uxe(){if(rX)return PO;rX=1;function e(n,S){for(var L=-1,re=n==null?0:n.length;++L<re;)if(!S(n[L],L,n))return!1;return!0}return PO=e,PO}var LO,nX;function cxe(){if(nX)return LO;nX=1;var e=Q7();function n(S,L){var re=!0;return e(S,function(ve,Ce,Be){return re=!!L(ve,Ce,Be),re}),re}return LO=n,LO}var RO,aX;function fxe(){if(aX)return RO;aX=1;var e=uxe(),n=cxe(),S=fx(),L=Tm(),re=$P();function ve(Ce,Be,Xe){var Ke=L(Ce)?e:n;return Xe&&re(Ce,Be,Xe)&&(Be=void 0),Ke(Ce,S(Be,3))}return RO=ve,RO}var hxe=fxe();const c$=rh(hxe);var dxe=["x","y"];function RE(e){"@babel/helpers - typeof";return RE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},RE(e)}function Qz(){return Qz=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Qz.apply(this,arguments)}function iX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function V5(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?iX(Object(S),!0).forEach(function(L){vxe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):iX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function vxe(e,n,S){return n=pxe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function pxe(e){var n=mxe(e,"string");return RE(n)=="symbol"?n:n+""}function mxe(e,n){if(RE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(RE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function yxe(e,n){if(e==null)return{};var S=gxe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function gxe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function _xe(e,n){var S=e.x,L=e.y,re=yxe(e,dxe),ve="".concat(S),Ce=parseInt(ve,10),Be="".concat(L),Xe=parseInt(Be,10),Ke="".concat(n.height||re.height),vt=parseInt(Ke,10),yt="".concat(n.width||re.width),Gt=parseInt(yt,10);return V5(V5(V5(V5(V5({},n),re),Ce?{x:Ce}:{}),Xe?{y:Xe}:{}),{},{height:vt,width:Gt,name:n.name,radius:n.radius})}function oX(e){return aa.createElement(Kz,Qz({shapeType:"rectangle",propTransformer:_xe,activeClassName:"recharts-active-bar"},e))}var xxe=function(n){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(L,re){if(typeof n=="number")return n;var ve=gs(L)||Lue(L);return ve?n(L,re):(ve||gw(),S)}},bxe=["value","background"],f$;function xT(e){"@babel/helpers - typeof";return xT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},xT(e)}function wxe(e,n){if(e==null)return{};var S=Txe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Txe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function gP(){return gP=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},gP.apply(this,arguments)}function sX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function pv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?sX(Object(S),!0).forEach(function(L){ix(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):sX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Axe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function lX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,d$(L.key),L)}}function Sxe(e,n,S){return n&&lX(e.prototype,n),S&&lX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Exe(e,n,S){return n=_P(n),Mxe(e,h$()?Reflect.construct(n,S||[],_P(e).constructor):n.apply(e,S))}function Mxe(e,n){if(n&&(xT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cxe(e)}function Cxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h$=function(){return!!e})()}function _P(e){return _P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},_P(e)}function kxe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&e7(e,n)}function e7(e,n){return e7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},e7(e,n)}function ix(e,n,S){return n=d$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function d$(e){var n=Pxe(e,"string");return xT(n)=="symbol"?n:n+""}function Pxe(e,n){if(xT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(xT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var HT=(function(e){function n(){var S;Axe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Exe(this,n,[].concat(re)),ix(S,"state",{isAnimationFinished:!1}),ix(S,"id",bw("recharts-bar-")),ix(S,"handleAnimationEnd",function(){var Ce=S.props.onAnimationEnd;S.setState({isAnimationFinished:!0}),Ce&&Ce()}),ix(S,"handleAnimationStart",function(){var Ce=S.props.onAnimationStart;S.setState({isAnimationFinished:!1}),Ce&&Ce()}),S}return kxe(n,e),Sxe(n,[{key:"renderRectanglesStatically",value:function(L){var re=this,ve=this.props,Ce=ve.shape,Be=ve.dataKey,Xe=ve.activeIndex,Ke=ve.activeBar,vt=Iu(this.props,!1);return L&&L.map(function(yt,Gt){var $t=Gt===Xe,gr=$t?Ke:Ce,sr=pv(pv(pv({},vt),yt),{},{isActive:$t,option:gr,index:Gt,dataKey:Be,onAnimationStart:re.handleAnimationStart,onAnimationEnd:re.handleAnimationEnd});return aa.createElement(Rf,gP({className:"recharts-bar-rectangle"},tE(re.props,yt,Gt),{key:"rectangle-".concat(yt?.x,"-").concat(yt?.y,"-").concat(yt?.value,"-").concat(Gt)}),aa.createElement(oX,sr))})}},{key:"renderRectanglesWithAnimation",value:function(){var L=this,re=this.props,ve=re.data,Ce=re.layout,Be=re.isAnimationActive,Xe=re.animationBegin,Ke=re.animationDuration,vt=re.animationEasing,yt=re.animationId,Gt=this.state.prevData;return aa.createElement(dy,{begin:Xe,duration:Ke,isActive:Be,easing:vt,from:{t:0},to:{t:1},key:"bar-".concat(yt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function($t){var gr=$t.t,sr=ve.map(function(nr,jr){var Ne=Gt&&Gt[jr];if(Ne){var an=ev(Ne.x,nr.x),yn=ev(Ne.y,nr.y),Lr=ev(Ne.width,nr.width),$r=ev(Ne.height,nr.height);return pv(pv({},nr),{},{x:an(gr),y:yn(gr),width:Lr(gr),height:$r(gr)})}if(Ce==="horizontal"){var dn=ev(0,nr.height),Jn=dn(gr);return pv(pv({},nr),{},{y:nr.y+nr.height-Jn,height:Jn})}var xn=ev(0,nr.width),Na=xn(gr);return pv(pv({},nr),{},{width:Na})});return aa.createElement(Rf,null,L.renderRectanglesStatically(sr))})}},{key:"renderRectangles",value:function(){var L=this.props,re=L.data,ve=L.isAnimationActive,Ce=this.state.prevData;return ve&&re&&re.length&&(!Ce||!mw(Ce,re))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(re)}},{key:"renderBackground",value:function(){var L=this,re=this.props,ve=re.data,Ce=re.dataKey,Be=re.activeIndex,Xe=Iu(this.props.background,!1);return ve.map(function(Ke,vt){Ke.value;var yt=Ke.background,Gt=wxe(Ke,bxe);if(!yt)return null;var $t=pv(pv(pv(pv(pv({},Gt),{},{fill:"#eee"},yt),Xe),tE(L.props,Ke,vt)),{},{onAnimationStart:L.handleAnimationStart,onAnimationEnd:L.handleAnimationEnd,dataKey:Ce,index:vt,className:"recharts-bar-background-rectangle"});return aa.createElement(oX,gP({key:"background-bar-".concat(vt),option:L.props.background,isActive:vt===Be},$t))})}},{key:"renderErrorBar",value:function(L,re){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var ve=this.props,Ce=ve.data,Be=ve.xAxis,Xe=ve.yAxis,Ke=ve.layout,vt=ve.children,yt=bm(vt,ux);if(!yt)return null;var Gt=Ke==="vertical"?Ce[0].height/2:Ce[0].width/2,$t=function(nr,jr){var Ne=Array.isArray(nr.value)?nr.value[1]:nr.value;return{x:nr.x,y:nr.y,value:Ne,errorVal:Dv(nr,jr)}},gr={clipPath:L?"url(#clipPath-".concat(re,")"):null};return aa.createElement(Rf,gr,yt.map(function(sr){return aa.cloneElement(sr,{key:"error-bar-".concat(re,"-").concat(sr.props.dataKey),data:Ce,xAxis:Be,yAxis:Xe,layout:Ke,offset:Gt,dataPointFormatter:$t})}))}},{key:"render",value:function(){var L=this.props,re=L.hide,ve=L.data,Ce=L.className,Be=L.xAxis,Xe=L.yAxis,Ke=L.left,vt=L.top,yt=L.width,Gt=L.height,$t=L.isAnimationActive,gr=L.background,sr=L.id;if(re||!ve||!ve.length)return null;var nr=this.state.isAnimationFinished,jr=Ec("recharts-bar",Ce),Ne=Be&&Be.allowDataOverflow,an=Xe&&Xe.allowDataOverflow,yn=Ne||an,Lr=Mu(sr)?this.id:sr;return aa.createElement(Rf,{className:jr},Ne||an?aa.createElement("defs",null,aa.createElement("clipPath",{id:"clipPath-".concat(Lr)},aa.createElement("rect",{x:Ne?Ke:Ke-yt/2,y:an?vt:vt-Gt/2,width:Ne?yt:yt*2,height:an?Gt:Gt*2}))):null,aa.createElement(Rf,{className:"recharts-bar-rectangles",clipPath:yn?"url(#clipPath-".concat(Lr,")"):null},gr?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(yn,Lr),(!$t||nr)&&pg.renderCallByParent(this.props,ve))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curData:L.data,prevData:re.curData}:L.data!==re.curData?{curData:L.data}:null}}])})(Ua.PureComponent);f$=HT;ix(HT,"displayName","Bar");ix(HT,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!hx.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});ix(HT,"getComposedData",function(e){var n=e.props,S=e.item,L=e.barPosition,re=e.bandSize,ve=e.xAxis,Ce=e.yAxis,Be=e.xAxisTicks,Xe=e.yAxisTicks,Ke=e.stackedData,vt=e.dataStartIndex,yt=e.displayedData,Gt=e.offset,$t=$0e(L,S);if(!$t)return null;var gr=n.layout,sr=S.type.defaultProps,nr=sr!==void 0?pv(pv({},sr),S.props):S.props,jr=nr.dataKey,Ne=nr.children,an=nr.minPointSize,yn=gr==="horizontal"?Ce:ve,Lr=Ke?yn.scale.domain():null,$r=aye({numericAxis:yn}),dn=bm(Ne,r9),Jn=yt.map(function(xn,Na){var zn,ta,qa,la,ja,pa;Ke?zn=K0e(Ke[vt+Na],Lr):(zn=Dv(xn,jr),Array.isArray(zn)||(zn=[$r,zn]));var Ra=xxe(an,f$.defaultProps.minPointSize)(zn[1],Na);if(gr==="horizontal"){var vi,Pi=[Ce.scale(zn[0]),Ce.scale(zn[1])],Eo=Pi[0],ma=Pi[1];ta=GH({axis:ve,ticks:Be,bandSize:re,offset:$t.offset,entry:xn,index:Na}),qa=(vi=ma??Eo)!==null&&vi!==void 0?vi:void 0,la=$t.size;var _a=Eo-ma;if(ja=Number.isNaN(_a)?0:_a,pa={x:ta,y:Ce.y,width:la,height:Ce.height},Math.abs(Ra)>0&&Math.abs(ja)<Math.abs(Ra)){var Li=hy(ja||Ra)*(Math.abs(Ra)-Math.abs(ja));qa-=Li,ja+=Li}}else{var so=[ve.scale(zn[0]),ve.scale(zn[1])],Ro=so[0],co=so[1];if(ta=Ro,qa=GH({axis:Ce,ticks:Xe,bandSize:re,offset:$t.offset,entry:xn,index:Na}),la=co-Ro,ja=$t.size,pa={x:ve.x,y:qa,width:ve.width,height:ja},Math.abs(Ra)>0&&Math.abs(la)<Math.abs(Ra)){var $o=hy(la||Ra)*(Math.abs(Ra)-Math.abs(la));la+=$o}}return pv(pv(pv({},xn),{},{x:ta,y:qa,width:la,height:ja,value:Ke?zn:zn[1],payload:xn,background:pa},dn&&dn[Na]&&dn[Na].props),{},{tooltipPayload:[YZ(S,xn)],tooltipPosition:{x:ta+la/2,y:qa+ja/2}})});return pv({data:Jn,layout:gr},Gt)});function IE(e){"@babel/helpers - typeof";return IE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},IE(e)}function Lxe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function uX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,v$(L.key),L)}}function Rxe(e,n,S){return n&&uX(e.prototype,n),S&&uX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function cX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function uy(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?cX(Object(S),!0).forEach(function(L){cL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):cX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function cL(e,n,S){return n=v$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function v$(e){var n=Ixe(e,"string");return IE(n)=="symbol"?n:n+""}function Ixe(e,n){if(IE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(IE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var p$=function(n,S,L,re,ve){var Ce=n.width,Be=n.height,Xe=n.layout,Ke=n.children,vt=Object.keys(S),yt={left:L.left,leftMirror:L.left,right:Ce-L.right,rightMirror:Ce-L.right,top:L.top,topMirror:L.top,bottom:Be-L.bottom,bottomMirror:Be-L.bottom},Gt=!!Jm(Ke,HT);return vt.reduce(function($t,gr){var sr=S[gr],nr=sr.orientation,jr=sr.domain,Ne=sr.padding,an=Ne===void 0?{}:Ne,yn=sr.mirror,Lr=sr.reversed,$r="".concat(nr).concat(yn?"Mirror":""),dn,Jn,xn,Na,zn;if(sr.type==="number"&&(sr.padding==="gap"||sr.padding==="no-gap")){var ta=jr[1]-jr[0],qa=1/0,la=sr.categoricalDomain.sort(Oue);if(la.forEach(function(so,Ro){Ro>0&&(qa=Math.min((so||0)-(la[Ro-1]||0),qa))}),Number.isFinite(qa)){var ja=qa/ta,pa=sr.layout==="vertical"?L.height:L.width;if(sr.padding==="gap"&&(dn=ja*pa/2),sr.padding==="no-gap"){var Ra=pw(n.barCategoryGap,ja*pa),vi=ja*pa/2;dn=vi-Ra-(vi-Ra)/pa*Ra}}}re==="xAxis"?Jn=[L.left+(an.left||0)+(dn||0),L.left+L.width-(an.right||0)-(dn||0)]:re==="yAxis"?Jn=Xe==="horizontal"?[L.top+L.height-(an.bottom||0),L.top+(an.top||0)]:[L.top+(an.top||0)+(dn||0),L.top+L.height-(an.bottom||0)-(dn||0)]:Jn=sr.range,Lr&&(Jn=[Jn[1],Jn[0]]);var Pi=Y0e(sr,ve,Gt),Eo=Pi.scale,ma=Pi.realScaleType;Eo.domain(jr).range(Jn),Z0e(Eo);var _a=nye(Eo,uy(uy({},sr),{},{realScaleType:ma}));re==="xAxis"?(zn=nr==="top"&&!yn||nr==="bottom"&&yn,xn=L.left,Na=yt[$r]-zn*sr.height):re==="yAxis"&&(zn=nr==="left"&&!yn||nr==="right"&&yn,xn=yt[$r]-zn*sr.width,Na=L.top);var Li=uy(uy(uy({},sr),_a),{},{realScaleType:ma,x:xn,y:Na,scale:Eo,width:re==="xAxis"?L.width:sr.width,height:re==="yAxis"?L.height:sr.height});return Li.bandSize=oP(Li,_a),!sr.hide&&re==="xAxis"?yt[$r]+=(zn?-1:1)*Li.height:sr.hide||(yt[$r]+=(zn?-1:1)*Li.width),uy(uy({},$t),{},cL({},gr,Li))},{})},m$=function(n,S){var L=n.x,re=n.y,ve=S.x,Ce=S.y;return{x:Math.min(L,ve),y:Math.min(re,Ce),width:Math.abs(ve-L),height:Math.abs(Ce-re)}},Dxe=function(n){var S=n.x1,L=n.y1,re=n.x2,ve=n.y2;return m$({x:S,y:L},{x:re,y:ve})},y$=(function(){function e(n){Lxe(this,e),this.scale=n}return Rxe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(S){var L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},re=L.bandAware,ve=L.position;if(S!==void 0){if(ve)switch(ve){case"start":return this.scale(S);case"middle":{var Ce=this.bandwidth?this.bandwidth()/2:0;return this.scale(S)+Ce}case"end":{var Be=this.bandwidth?this.bandwidth():0;return this.scale(S)+Be}default:return this.scale(S)}if(re){var Xe=this.bandwidth?this.bandwidth()/2:0;return this.scale(S)+Xe}return this.scale(S)}}},{key:"isInRange",value:function(S){var L=this.range(),re=L[0],ve=L[L.length-1];return re<=ve?S>=re&&S<=ve:S>=ve&&S<=re}}],[{key:"create",value:function(S){return new e(S)}}])})();cL(y$,"EPS",1e-4);var k9=function(n){var S=Object.keys(n).reduce(function(L,re){return uy(uy({},L),{},cL({},re,y$.create(n[re])))},{});return uy(uy({},S),{},{apply:function(re){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=ve.bandAware,Be=ve.position;return lxe(re,function(Xe,Ke){return S[Ke].apply(Xe,{bandAware:Ce,position:Be})})},isInRange:function(re){return c$(re,function(ve,Ce){return S[Ce].isInRange(ve)})}})};function Oxe(e){return(e%180+180)%180}var zxe=function(n){var S=n.width,L=n.height,re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ve=Oxe(re),Ce=ve*Math.PI/180,Be=Math.atan(L/S),Xe=Ce>Be&&Ce<Math.PI-Be?L/Math.sin(Ce):S/Math.cos(Ce);return Math.abs(Xe)},IO,fX;function Nxe(){if(fX)return IO;fX=1;var e=fx(),n=qE(),S=YP();function L(re){return function(ve,Ce,Be){var Xe=Object(ve);if(!n(ve)){var Ke=e(Ce,3);ve=S(ve),Ce=function(yt){return Ke(Xe[yt],yt,Xe)}}var vt=re(ve,Ce,Be);return vt>-1?Xe[Ke?ve[vt]:vt]:void 0}}return IO=L,IO}var DO,hX;function Fxe(){if(hX)return DO;hX=1;var e=o$();function n(S){var L=e(S),re=L%1;return L===L?re?L-re:L:0}return DO=n,DO}var OO,dX;function Bxe(){if(dX)return OO;dX=1;var e=kY(),n=fx(),S=Fxe(),L=Math.max;function re(ve,Ce,Be){var Xe=ve==null?0:ve.length;if(!Xe)return-1;var Ke=Be==null?0:S(Be);return Ke<0&&(Ke=L(Xe+Ke,0)),e(ve,n(Ce,3),Ke)}return OO=re,OO}var zO,vX;function jxe(){if(vX)return zO;vX=1;var e=Nxe(),n=Bxe(),S=e(n);return zO=S,zO}var Uxe=jxe();const qxe=rh(Uxe);var Vxe=HW();const Hxe=rh(Vxe);var Gxe=Hxe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),P9=Ua.createContext(void 0),L9=Ua.createContext(void 0),g$=Ua.createContext(void 0),_$=Ua.createContext({}),x$=Ua.createContext(void 0),b$=Ua.createContext(0),w$=Ua.createContext(0),pX=function(n){var S=n.state,L=S.xAxisMap,re=S.yAxisMap,ve=S.offset,Ce=n.clipPathId,Be=n.children,Xe=n.width,Ke=n.height,vt=Gxe(ve);return aa.createElement(P9.Provider,{value:L},aa.createElement(L9.Provider,{value:re},aa.createElement(_$.Provider,{value:ve},aa.createElement(g$.Provider,{value:vt},aa.createElement(x$.Provider,{value:Ce},aa.createElement(b$.Provider,{value:Ke},aa.createElement(w$.Provider,{value:Xe},Be)))))))},Xxe=function(){return Ua.useContext(x$)},T$=function(n){var S=Ua.useContext(P9);S==null&&gw();var L=S[n];return L==null&&gw(),L},Wxe=function(){var n=Ua.useContext(P9);return nx(n)},Yxe=function(){var n=Ua.useContext(L9),S=qxe(n,function(L){return c$(L.domain,Number.isFinite)});return S||nx(n)},A$=function(n){var S=Ua.useContext(L9);S==null&&gw();var L=S[n];return L==null&&gw(),L},Zxe=function(){var n=Ua.useContext(g$);return n},$xe=function(){return Ua.useContext(_$)},R9=function(){return Ua.useContext(w$)},I9=function(){return Ua.useContext(b$)};function bT(e){"@babel/helpers - typeof";return bT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bT(e)}function Kxe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Jxe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,E$(L.key),L)}}function Qxe(e,n,S){return n&&Jxe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ebe(e,n,S){return n=xP(n),tbe(e,S$()?Reflect.construct(n,S||[],xP(e).constructor):n.apply(e,S))}function tbe(e,n){if(n&&(bT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rbe(e)}function rbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function S$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(S$=function(){return!!e})()}function xP(e){return xP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},xP(e)}function nbe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&t7(e,n)}function t7(e,n){return t7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},t7(e,n)}function mX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function yX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?mX(Object(S),!0).forEach(function(L){D9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):mX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function D9(e,n,S){return n=E$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function E$(e){var n=abe(e,"string");return bT(n)=="symbol"?n:n+""}function abe(e,n){if(bT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(bT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function ibe(e,n){return ube(e)||lbe(e,n)||sbe(e,n)||obe()}function obe(){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 sbe(e,n){if(e){if(typeof e=="string")return gX(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return gX(e,n)}}function gX(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function lbe(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function ube(e){if(Array.isArray(e))return e}function r7(){return r7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},r7.apply(this,arguments)}var cbe=function(n,S){var L;return aa.isValidElement(n)?L=aa.cloneElement(n,S):Fu(n)?L=n(S):L=aa.createElement("line",r7({},S,{className:"recharts-reference-line-line"})),L},fbe=function(n,S,L,re,ve,Ce,Be,Xe,Ke){var vt=ve.x,yt=ve.y,Gt=ve.width,$t=ve.height;if(L){var gr=Ke.y,sr=n.y.apply(gr,{position:Ce});if(mg(Ke,"discard")&&!n.y.isInRange(sr))return null;var nr=[{x:vt+Gt,y:sr},{x:vt,y:sr}];return Xe==="left"?nr.reverse():nr}if(S){var jr=Ke.x,Ne=n.x.apply(jr,{position:Ce});if(mg(Ke,"discard")&&!n.x.isInRange(Ne))return null;var an=[{x:Ne,y:yt+$t},{x:Ne,y:yt}];return Be==="top"?an.reverse():an}if(re){var yn=Ke.segment,Lr=yn.map(function($r){return n.apply($r,{position:Ce})});return mg(Ke,"discard")&&axe(Lr,function($r){return!n.isInRange($r)})?null:Lr}return null};function hbe(e){var n=e.x,S=e.y,L=e.segment,re=e.xAxisId,ve=e.yAxisId,Ce=e.shape,Be=e.className,Xe=e.alwaysShow,Ke=Xxe(),vt=T$(re),yt=A$(ve),Gt=Zxe();if(!Ke||!Gt)return null;w1(Xe===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var $t=k9({x:vt.scale,y:yt.scale}),gr=Iv(n),sr=Iv(S),nr=L&&L.length===2,jr=fbe($t,gr,sr,nr,Gt,e.position,vt.orientation,yt.orientation,e);if(!jr)return null;var Ne=ibe(jr,2),an=Ne[0],yn=an.x,Lr=an.y,$r=Ne[1],dn=$r.x,Jn=$r.y,xn=mg(e,"hidden")?"url(#".concat(Ke,")"):void 0,Na=yX(yX({clipPath:xn},Iu(e,!0)),{},{x1:yn,y1:Lr,x2:dn,y2:Jn});return aa.createElement(Rf,{className:Ec("recharts-reference-line",Be)},cbe(Ce,Na),Op.renderCallByParent(e,Dxe({x1:yn,y1:Lr,x2:dn,y2:Jn})))}var O9=(function(e){function n(){return Kxe(this,n),ebe(this,n,arguments)}return nbe(n,e),Qxe(n,[{key:"render",value:function(){return aa.createElement(hbe,this.props)}}])})(aa.Component);D9(O9,"displayName","ReferenceLine");D9(O9,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function n7(){return n7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},n7.apply(this,arguments)}function wT(e){"@babel/helpers - typeof";return wT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},wT(e)}function _X(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function xX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?_X(Object(S),!0).forEach(function(L){fL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):_X(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function dbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function vbe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,C$(L.key),L)}}function pbe(e,n,S){return n&&vbe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function mbe(e,n,S){return n=bP(n),ybe(e,M$()?Reflect.construct(n,S||[],bP(e).constructor):n.apply(e,S))}function ybe(e,n){if(n&&(wT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gbe(e)}function gbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(M$=function(){return!!e})()}function bP(e){return bP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},bP(e)}function _be(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&a7(e,n)}function a7(e,n){return a7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},a7(e,n)}function fL(e,n,S){return n=C$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function C$(e){var n=xbe(e,"string");return wT(n)=="symbol"?n:n+""}function xbe(e,n){if(wT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(wT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bbe=function(n){var S=n.x,L=n.y,re=n.xAxis,ve=n.yAxis,Ce=k9({x:re.scale,y:ve.scale}),Be=Ce.apply({x:S,y:L},{bandAware:!0});return mg(n,"discard")&&!Ce.isInRange(Be)?null:Be},hL=(function(e){function n(){return dbe(this,n),mbe(this,n,arguments)}return _be(n,e),pbe(n,[{key:"render",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.r,Be=L.alwaysShow,Xe=L.clipPathId,Ke=Iv(re),vt=Iv(ve);if(w1(Be===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!Ke||!vt)return null;var yt=bbe(this.props);if(!yt)return null;var Gt=yt.x,$t=yt.y,gr=this.props,sr=gr.shape,nr=gr.className,jr=mg(this.props,"hidden")?"url(#".concat(Xe,")"):void 0,Ne=xX(xX({clipPath:jr},Iu(this.props,!0)),{},{cx:Gt,cy:$t});return aa.createElement(Rf,{className:Ec("recharts-reference-dot",nr)},n.renderDot(sr,Ne),Op.renderCallByParent(this.props,{x:Gt-Ce,y:$t-Ce,width:2*Ce,height:2*Ce}))}}])})(aa.Component);fL(hL,"displayName","ReferenceDot");fL(hL,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});fL(hL,"renderDot",function(e,n){var S;return aa.isValidElement(e)?S=aa.cloneElement(e,n):Fu(e)?S=e(n):S=aa.createElement(sL,n7({},n,{cx:n.cx,cy:n.cy,className:"recharts-reference-dot-dot"})),S});function i7(){return i7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},i7.apply(this,arguments)}function TT(e){"@babel/helpers - typeof";return TT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},TT(e)}function bX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function wX(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?bX(Object(S),!0).forEach(function(L){dL(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):bX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function wbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Tbe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,P$(L.key),L)}}function Abe(e,n,S){return n&&Tbe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sbe(e,n,S){return n=wP(n),Ebe(e,k$()?Reflect.construct(n,S||[],wP(e).constructor):n.apply(e,S))}function Ebe(e,n){if(n&&(TT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mbe(e)}function Mbe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(k$=function(){return!!e})()}function wP(e){return wP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},wP(e)}function Cbe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&o7(e,n)}function o7(e,n){return o7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},o7(e,n)}function dL(e,n,S){return n=P$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function P$(e){var n=kbe(e,"string");return TT(n)=="symbol"?n:n+""}function kbe(e,n){if(TT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(TT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pbe=function(n,S,L,re,ve){var Ce=ve.x1,Be=ve.x2,Xe=ve.y1,Ke=ve.y2,vt=ve.xAxis,yt=ve.yAxis;if(!vt||!yt)return null;var Gt=k9({x:vt.scale,y:yt.scale}),$t={x:n?Gt.x.apply(Ce,{position:"start"}):Gt.x.rangeMin,y:L?Gt.y.apply(Xe,{position:"start"}):Gt.y.rangeMin},gr={x:S?Gt.x.apply(Be,{position:"end"}):Gt.x.rangeMax,y:re?Gt.y.apply(Ke,{position:"end"}):Gt.y.rangeMax};return mg(ve,"discard")&&(!Gt.isInRange($t)||!Gt.isInRange(gr))?null:m$($t,gr)},vL=(function(e){function n(){return wbe(this,n),Sbe(this,n,arguments)}return Cbe(n,e),Abe(n,[{key:"render",value:function(){var L=this.props,re=L.x1,ve=L.x2,Ce=L.y1,Be=L.y2,Xe=L.className,Ke=L.alwaysShow,vt=L.clipPathId;w1(Ke===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var yt=Iv(re),Gt=Iv(ve),$t=Iv(Ce),gr=Iv(Be),sr=this.props.shape;if(!yt&&!Gt&&!$t&&!gr&&!sr)return null;var nr=Pbe(yt,Gt,$t,gr,this.props);if(!nr&&!sr)return null;var jr=mg(this.props,"hidden")?"url(#".concat(vt,")"):void 0;return aa.createElement(Rf,{className:Ec("recharts-reference-area",Xe)},n.renderRect(sr,wX(wX({clipPath:jr},Iu(this.props,!0)),nr)),Op.renderCallByParent(this.props,nr))}}])})(aa.Component);dL(vL,"displayName","ReferenceArea");dL(vL,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});dL(vL,"renderRect",function(e,n){var S;return aa.isValidElement(e)?S=aa.cloneElement(e,n):Fu(e)?S=e(n):S=aa.createElement(C9,i7({},n,{className:"recharts-reference-area-rect"})),S});function L$(e,n,S){if(n<1)return[];if(n===1&&S===void 0)return e;for(var L=[],re=0;re<e.length;re+=n)L.push(e[re]);return L}function Lbe(e,n,S){var L={width:e.width+n.width,height:e.height+n.height};return zxe(L,S)}function Rbe(e,n,S){var L=S==="width",re=e.x,ve=e.y,Ce=e.width,Be=e.height;return n===1?{start:L?re:ve,end:L?re+Ce:ve+Be}:{start:L?re+Ce:ve+Be,end:L?re:ve}}function TP(e,n,S,L,re){if(e*n<e*L||e*n>e*re)return!1;var ve=S();return e*(n-e*ve/2-L)>=0&&e*(n+e*ve/2-re)<=0}function Ibe(e,n){return L$(e,n+1)}function Dbe(e,n,S,L,re){for(var ve=(L||[]).slice(),Ce=n.start,Be=n.end,Xe=0,Ke=1,vt=Ce,yt=function(){var gr=L?.[Xe];if(gr===void 0)return{v:L$(L,Ke)};var sr=Xe,nr,jr=function(){return nr===void 0&&(nr=S(gr,sr)),nr},Ne=gr.coordinate,an=Xe===0||TP(e,Ne,jr,vt,Be);an||(Xe=0,vt=Ce,Ke+=1),an&&(vt=Ne+e*(jr()/2+re),Xe+=Ke)},Gt;Ke<=ve.length;)if(Gt=yt(),Gt)return Gt.v;return[]}function DE(e){"@babel/helpers - typeof";return DE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},DE(e)}function TX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Dp(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?TX(Object(S),!0).forEach(function(L){Obe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):TX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Obe(e,n,S){return n=zbe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function zbe(e){var n=Nbe(e,"string");return DE(n)=="symbol"?n:n+""}function Nbe(e,n){if(DE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(DE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function Fbe(e,n,S,L,re){for(var ve=(L||[]).slice(),Ce=ve.length,Be=n.start,Xe=n.end,Ke=function(Gt){var $t=ve[Gt],gr,sr=function(){return gr===void 0&&(gr=S($t,Gt)),gr};if(Gt===Ce-1){var nr=e*($t.coordinate+e*sr()/2-Xe);ve[Gt]=$t=Dp(Dp({},$t),{},{tickCoord:nr>0?$t.coordinate-nr*e:$t.coordinate})}else ve[Gt]=$t=Dp(Dp({},$t),{},{tickCoord:$t.coordinate});var jr=TP(e,$t.tickCoord,sr,Be,Xe);jr&&(Xe=$t.tickCoord-e*(sr()/2+re),ve[Gt]=Dp(Dp({},$t),{},{isShow:!0}))},vt=Ce-1;vt>=0;vt--)Ke(vt);return ve}function Bbe(e,n,S,L,re,ve){var Ce=(L||[]).slice(),Be=Ce.length,Xe=n.start,Ke=n.end;if(ve){var vt=L[Be-1],yt=S(vt,Be-1),Gt=e*(vt.coordinate+e*yt/2-Ke);Ce[Be-1]=vt=Dp(Dp({},vt),{},{tickCoord:Gt>0?vt.coordinate-Gt*e:vt.coordinate});var $t=TP(e,vt.tickCoord,function(){return yt},Xe,Ke);$t&&(Ke=vt.tickCoord-e*(yt/2+re),Ce[Be-1]=Dp(Dp({},vt),{},{isShow:!0}))}for(var gr=ve?Be-1:Be,sr=function(Ne){var an=Ce[Ne],yn,Lr=function(){return yn===void 0&&(yn=S(an,Ne)),yn};if(Ne===0){var $r=e*(an.coordinate-e*Lr()/2-Xe);Ce[Ne]=an=Dp(Dp({},an),{},{tickCoord:$r<0?an.coordinate-$r*e:an.coordinate})}else Ce[Ne]=an=Dp(Dp({},an),{},{tickCoord:an.coordinate});var dn=TP(e,an.tickCoord,Lr,Xe,Ke);dn&&(Xe=an.tickCoord+e*(Lr()/2+re),Ce[Ne]=Dp(Dp({},an),{},{isShow:!0}))},nr=0;nr<gr;nr++)sr(nr);return Ce}function z9(e,n,S){var L=e.tick,re=e.ticks,ve=e.viewBox,Ce=e.minTickGap,Be=e.orientation,Xe=e.interval,Ke=e.tickFormatter,vt=e.unit,yt=e.angle;if(!re||!re.length||!L)return[];if(gs(Xe)||hx.isSsr)return Ibe(re,typeof Xe=="number"&&gs(Xe)?Xe:0);var Gt=[],$t=Be==="top"||Be==="bottom"?"width":"height",gr=vt&&$t==="width"?W5(vt,{fontSize:n,letterSpacing:S}):{width:0,height:0},sr=function(an,yn){var Lr=Fu(Ke)?Ke(an.value,yn):an.value;return $t==="width"?Lbe(W5(Lr,{fontSize:n,letterSpacing:S}),gr,yt):W5(Lr,{fontSize:n,letterSpacing:S})[$t]},nr=re.length>=2?hy(re[1].coordinate-re[0].coordinate):1,jr=Rbe(ve,nr,$t);return Xe==="equidistantPreserveStart"?Dbe(nr,jr,sr,re,Ce):(Xe==="preserveStart"||Xe==="preserveStartEnd"?Gt=Bbe(nr,jr,sr,re,Ce,Xe==="preserveStartEnd"):Gt=Fbe(nr,jr,sr,re,Ce),Gt.filter(function(Ne){return Ne.isShow}))}var jbe=["viewBox"],Ube=["viewBox"],qbe=["ticks"];function AT(e){"@babel/helpers - typeof";return AT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},AT(e)}function tT(){return tT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},tT.apply(this,arguments)}function AX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Pv(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?AX(Object(S),!0).forEach(function(L){N9(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):AX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function NO(e,n){if(e==null)return{};var S=Vbe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Vbe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function Hbe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function SX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,I$(L.key),L)}}function Gbe(e,n,S){return n&&SX(e.prototype,n),S&&SX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xbe(e,n,S){return n=AP(n),Wbe(e,R$()?Reflect.construct(n,S||[],AP(e).constructor):n.apply(e,S))}function Wbe(e,n){if(n&&(AT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ybe(e)}function Ybe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function R$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(R$=function(){return!!e})()}function AP(e){return AP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},AP(e)}function Zbe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&s7(e,n)}function s7(e,n){return s7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},s7(e,n)}function N9(e,n,S){return n=I$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function I$(e){var n=$be(e,"string");return AT(n)=="symbol"?n:n+""}function $be(e,n){if(AT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(AT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var GT=(function(e){function n(S){var L;return Hbe(this,n),L=Xbe(this,n,[S]),L.state={fontSize:"",letterSpacing:""},L}return Zbe(n,e),Gbe(n,[{key:"shouldComponentUpdate",value:function(L,re){var ve=L.viewBox,Ce=NO(L,jbe),Be=this.props,Xe=Be.viewBox,Ke=NO(Be,Ube);return!nT(ve,Xe)||!nT(Ce,Ke)||!nT(re,this.state)}},{key:"componentDidMount",value:function(){var L=this.layerReference;if(L){var re=L.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];re&&this.setState({fontSize:window.getComputedStyle(re).fontSize,letterSpacing:window.getComputedStyle(re).letterSpacing})}}},{key:"getTickLineCoord",value:function(L){var re=this.props,ve=re.x,Ce=re.y,Be=re.width,Xe=re.height,Ke=re.orientation,vt=re.tickSize,yt=re.mirror,Gt=re.tickMargin,$t,gr,sr,nr,jr,Ne,an=yt?-1:1,yn=L.tickSize||vt,Lr=gs(L.tickCoord)?L.tickCoord:L.coordinate;switch(Ke){case"top":$t=gr=L.coordinate,nr=Ce+ +!yt*Xe,sr=nr-an*yn,Ne=sr-an*Gt,jr=Lr;break;case"left":sr=nr=L.coordinate,gr=ve+ +!yt*Be,$t=gr-an*yn,jr=$t-an*Gt,Ne=Lr;break;case"right":sr=nr=L.coordinate,gr=ve+ +yt*Be,$t=gr+an*yn,jr=$t+an*Gt,Ne=Lr;break;default:$t=gr=L.coordinate,nr=Ce+ +yt*Xe,sr=nr+an*yn,Ne=sr+an*Gt,jr=Lr;break}return{line:{x1:$t,y1:sr,x2:gr,y2:nr},tick:{x:jr,y:Ne}}}},{key:"getTickTextAnchor",value:function(){var L=this.props,re=L.orientation,ve=L.mirror,Ce;switch(re){case"left":Ce=ve?"start":"end";break;case"right":Ce=ve?"end":"start";break;default:Ce="middle";break}return Ce}},{key:"getTickVerticalAnchor",value:function(){var L=this.props,re=L.orientation,ve=L.mirror,Ce="end";switch(re){case"left":case"right":Ce="middle";break;case"top":Ce=ve?"start":"end";break;default:Ce=ve?"end":"start";break}return Ce}},{key:"renderAxisLine",value:function(){var L=this.props,re=L.x,ve=L.y,Ce=L.width,Be=L.height,Xe=L.orientation,Ke=L.mirror,vt=L.axisLine,yt=Pv(Pv(Pv({},Iu(this.props,!1)),Iu(vt,!1)),{},{fill:"none"});if(Xe==="top"||Xe==="bottom"){var Gt=+(Xe==="top"&&!Ke||Xe==="bottom"&&Ke);yt=Pv(Pv({},yt),{},{x1:re,y1:ve+Gt*Be,x2:re+Ce,y2:ve+Gt*Be})}else{var $t=+(Xe==="left"&&!Ke||Xe==="right"&&Ke);yt=Pv(Pv({},yt),{},{x1:re+$t*Ce,y1:ve,x2:re+$t*Ce,y2:ve+Be})}return aa.createElement("line",tT({},yt,{className:Ec("recharts-cartesian-axis-line",C0(vt,"className"))}))}},{key:"renderTicks",value:function(L,re,ve){var Ce=this,Be=this.props,Xe=Be.tickLine,Ke=Be.stroke,vt=Be.tick,yt=Be.tickFormatter,Gt=Be.unit,$t=z9(Pv(Pv({},this.props),{},{ticks:L}),re,ve),gr=this.getTickTextAnchor(),sr=this.getTickVerticalAnchor(),nr=Iu(this.props,!1),jr=Iu(vt,!1),Ne=Pv(Pv({},nr),{},{fill:"none"},Iu(Xe,!1)),an=$t.map(function(yn,Lr){var $r=Ce.getTickLineCoord(yn),dn=$r.line,Jn=$r.tick,xn=Pv(Pv(Pv(Pv({textAnchor:gr,verticalAnchor:sr},nr),{},{stroke:"none",fill:Ke},jr),Jn),{},{index:Lr,payload:yn,visibleTicksCount:$t.length,tickFormatter:yt});return aa.createElement(Rf,tT({className:"recharts-cartesian-axis-tick",key:"tick-".concat(yn.value,"-").concat(yn.coordinate,"-").concat(yn.tickCoord)},tE(Ce.props,yn,Lr)),Xe&&aa.createElement("line",tT({},Ne,dn,{className:Ec("recharts-cartesian-axis-tick-line",C0(Xe,"className"))})),vt&&n.renderTickItem(vt,xn,"".concat(Fu(yt)?yt(yn.value,Lr):yn.value).concat(Gt||"")))});return aa.createElement("g",{className:"recharts-cartesian-axis-ticks"},an)}},{key:"render",value:function(){var L=this,re=this.props,ve=re.axisLine,Ce=re.width,Be=re.height,Xe=re.ticksGenerator,Ke=re.className,vt=re.hide;if(vt)return null;var yt=this.props,Gt=yt.ticks,$t=NO(yt,qbe),gr=Gt;return Fu(Xe)&&(gr=Gt&&Gt.length>0?Xe(this.props):Xe($t)),Ce<=0||Be<=0||!gr||!gr.length?null:aa.createElement(Rf,{className:Ec("recharts-cartesian-axis",Ke),ref:function(nr){L.layerReference=nr}},ve&&this.renderAxisLine(),this.renderTicks(gr,this.state.fontSize,this.state.letterSpacing),Op.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(L,re,ve){var Ce,Be=Ec(re.className,"recharts-cartesian-axis-tick-value");return aa.isValidElement(L)?Ce=aa.cloneElement(L,Pv(Pv({},re),{},{className:Be})):Fu(L)?Ce=L(Pv(Pv({},re),{},{className:Be})):Ce=aa.createElement(Xk,tT({},re,{className:"recharts-cartesian-axis-tick-value"}),ve),Ce}}])})(Ua.Component);N9(GT,"displayName","CartesianAxis");N9(GT,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Kbe=["x1","y1","x2","y2","key"],Jbe=["offset"];function _w(e){"@babel/helpers - typeof";return _w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_w(e)}function EX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function zp(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?EX(Object(S),!0).forEach(function(L){Qbe(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):EX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Qbe(e,n,S){return n=ewe(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function ewe(e){var n=twe(e,"string");return _w(n)=="symbol"?n:n+""}function twe(e,n){if(_w(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(_w(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function iw(){return iw=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},iw.apply(this,arguments)}function MX(e,n){if(e==null)return{};var S=rwe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function rwe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}var nwe=function(n){var S=n.fill;if(!S||S==="none")return null;var L=n.fillOpacity,re=n.x,ve=n.y,Ce=n.width,Be=n.height,Xe=n.ry;return aa.createElement("rect",{x:re,y:ve,ry:Xe,width:Ce,height:Be,stroke:"none",fill:S,fillOpacity:L,className:"recharts-cartesian-grid-bg"})};function D$(e,n){var S;if(aa.isValidElement(e))S=aa.cloneElement(e,n);else if(Fu(e))S=e(n);else{var L=n.x1,re=n.y1,ve=n.x2,Ce=n.y2,Be=n.key,Xe=MX(n,Kbe),Ke=Iu(Xe,!1);Ke.offset;var vt=MX(Ke,Jbe);S=aa.createElement("line",iw({},vt,{x1:L,y1:re,x2:ve,y2:Ce,fill:"none",key:Be}))}return S}function awe(e){var n=e.x,S=e.width,L=e.horizontal,re=L===void 0?!0:L,ve=e.horizontalPoints;if(!re||!ve||!ve.length)return null;var Ce=ve.map(function(Be,Xe){var Ke=zp(zp({},e),{},{x1:n,y1:Be,x2:n+S,y2:Be,key:"line-".concat(Xe),index:Xe});return D$(re,Ke)});return aa.createElement("g",{className:"recharts-cartesian-grid-horizontal"},Ce)}function iwe(e){var n=e.y,S=e.height,L=e.vertical,re=L===void 0?!0:L,ve=e.verticalPoints;if(!re||!ve||!ve.length)return null;var Ce=ve.map(function(Be,Xe){var Ke=zp(zp({},e),{},{x1:Be,y1:n,x2:Be,y2:n+S,key:"line-".concat(Xe),index:Xe});return D$(re,Ke)});return aa.createElement("g",{className:"recharts-cartesian-grid-vertical"},Ce)}function owe(e){var n=e.horizontalFill,S=e.fillOpacity,L=e.x,re=e.y,ve=e.width,Ce=e.height,Be=e.horizontalPoints,Xe=e.horizontal,Ke=Xe===void 0?!0:Xe;if(!Ke||!n||!n.length)return null;var vt=Be.map(function(Gt){return Math.round(Gt+re-re)}).sort(function(Gt,$t){return Gt-$t});re!==vt[0]&&vt.unshift(0);var yt=vt.map(function(Gt,$t){var gr=!vt[$t+1],sr=gr?re+Ce-Gt:vt[$t+1]-Gt;if(sr<=0)return null;var nr=$t%n.length;return aa.createElement("rect",{key:"react-".concat($t),y:Gt,x:L,height:sr,width:ve,stroke:"none",fill:n[nr],fillOpacity:S,className:"recharts-cartesian-grid-bg"})});return aa.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},yt)}function swe(e){var n=e.vertical,S=n===void 0?!0:n,L=e.verticalFill,re=e.fillOpacity,ve=e.x,Ce=e.y,Be=e.width,Xe=e.height,Ke=e.verticalPoints;if(!S||!L||!L.length)return null;var vt=Ke.map(function(Gt){return Math.round(Gt+ve-ve)}).sort(function(Gt,$t){return Gt-$t});ve!==vt[0]&&vt.unshift(0);var yt=vt.map(function(Gt,$t){var gr=!vt[$t+1],sr=gr?ve+Be-Gt:vt[$t+1]-Gt;if(sr<=0)return null;var nr=$t%L.length;return aa.createElement("rect",{key:"react-".concat($t),x:Gt,y:Ce,width:sr,height:Xe,stroke:"none",fill:L[nr],fillOpacity:re,className:"recharts-cartesian-grid-bg"})});return aa.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},yt)}var lwe=function(n,S){var L=n.xAxis,re=n.width,ve=n.height,Ce=n.offset;return XZ(z9(zp(zp(zp({},GT.defaultProps),L),{},{ticks:x1(L,!0),viewBox:{x:0,y:0,width:re,height:ve}})),Ce.left,Ce.left+Ce.width,S)},uwe=function(n,S){var L=n.yAxis,re=n.width,ve=n.height,Ce=n.offset;return XZ(z9(zp(zp(zp({},GT.defaultProps),L),{},{ticks:x1(L,!0),viewBox:{x:0,y:0,width:re,height:ve}})),Ce.top,Ce.top+Ce.height,S)},J3={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function WE(e){var n,S,L,re,ve,Ce,Be=R9(),Xe=I9(),Ke=$xe(),vt=zp(zp({},e),{},{stroke:(n=e.stroke)!==null&&n!==void 0?n:J3.stroke,fill:(S=e.fill)!==null&&S!==void 0?S:J3.fill,horizontal:(L=e.horizontal)!==null&&L!==void 0?L:J3.horizontal,horizontalFill:(re=e.horizontalFill)!==null&&re!==void 0?re:J3.horizontalFill,vertical:(ve=e.vertical)!==null&&ve!==void 0?ve:J3.vertical,verticalFill:(Ce=e.verticalFill)!==null&&Ce!==void 0?Ce:J3.verticalFill,x:gs(e.x)?e.x:Ke.left,y:gs(e.y)?e.y:Ke.top,width:gs(e.width)?e.width:Ke.width,height:gs(e.height)?e.height:Ke.height}),yt=vt.x,Gt=vt.y,$t=vt.width,gr=vt.height,sr=vt.syncWithTicks,nr=vt.horizontalValues,jr=vt.verticalValues,Ne=Wxe(),an=Yxe();if(!gs($t)||$t<=0||!gs(gr)||gr<=0||!gs(yt)||yt!==+yt||!gs(Gt)||Gt!==+Gt)return null;var yn=vt.verticalCoordinatesGenerator||lwe,Lr=vt.horizontalCoordinatesGenerator||uwe,$r=vt.horizontalPoints,dn=vt.verticalPoints;if((!$r||!$r.length)&&Fu(Lr)){var Jn=nr&&nr.length,xn=Lr({yAxis:an?zp(zp({},an),{},{ticks:Jn?nr:an.ticks}):void 0,width:Be,height:Xe,offset:Ke},Jn?!0:sr);w1(Array.isArray(xn),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_w(xn),"]")),Array.isArray(xn)&&($r=xn)}if((!dn||!dn.length)&&Fu(yn)){var Na=jr&&jr.length,zn=yn({xAxis:Ne?zp(zp({},Ne),{},{ticks:Na?jr:Ne.ticks}):void 0,width:Be,height:Xe,offset:Ke},Na?!0:sr);w1(Array.isArray(zn),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_w(zn),"]")),Array.isArray(zn)&&(dn=zn)}return aa.createElement("g",{className:"recharts-cartesian-grid"},aa.createElement(nwe,{fill:vt.fill,fillOpacity:vt.fillOpacity,x:vt.x,y:vt.y,width:vt.width,height:vt.height,ry:vt.ry}),aa.createElement(awe,iw({},vt,{offset:Ke,horizontalPoints:$r,xAxis:Ne,yAxis:an})),aa.createElement(iwe,iw({},vt,{offset:Ke,verticalPoints:dn,xAxis:Ne,yAxis:an})),aa.createElement(owe,iw({},vt,{horizontalPoints:$r})),aa.createElement(swe,iw({},vt,{verticalPoints:dn})))}WE.displayName="CartesianGrid";var cwe=["type","layout","connectNulls","ref"],fwe=["key"];function ST(e){"@babel/helpers - typeof";return ST=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ST(e)}function CX(e,n){if(e==null)return{};var S=hwe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function hwe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function K5(){return K5=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},K5.apply(this,arguments)}function kX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function $m(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?kX(Object(S),!0).forEach(function(L){cy(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):kX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Q3(e){return mwe(e)||pwe(e)||vwe(e)||dwe()}function dwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vwe(e,n){if(e){if(typeof e=="string")return l7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return l7(e,n)}}function pwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function mwe(e){if(Array.isArray(e))return l7(e)}function l7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function ywe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function PX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,z$(L.key),L)}}function gwe(e,n,S){return n&&PX(e.prototype,n),S&&PX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function _we(e,n,S){return n=SP(n),xwe(e,O$()?Reflect.construct(n,S||[],SP(e).constructor):n.apply(e,S))}function xwe(e,n){if(n&&(ST(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bwe(e)}function bwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function O$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(O$=function(){return!!e})()}function SP(e){return SP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},SP(e)}function wwe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&u7(e,n)}function u7(e,n){return u7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},u7(e,n)}function cy(e,n,S){return n=z$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function z$(e){var n=Twe(e,"string");return ST(n)=="symbol"?n:n+""}function Twe(e,n){if(ST(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ST(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var gg=(function(e){function n(){var S;ywe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=_we(this,n,[].concat(re)),cy(S,"state",{isAnimationFinished:!0,totalLength:0}),cy(S,"generateSimpleStrokeDasharray",function(Ce,Be){return"".concat(Be,"px ").concat(Ce-Be,"px")}),cy(S,"getStrokeDasharray",function(Ce,Be,Xe){var Ke=Xe.reduce(function(jr,Ne){return jr+Ne});if(!Ke)return S.generateSimpleStrokeDasharray(Be,Ce);for(var vt=Math.floor(Ce/Ke),yt=Ce%Ke,Gt=Be-Ce,$t=[],gr=0,sr=0;gr<Xe.length;sr+=Xe[gr],++gr)if(sr+Xe[gr]>yt){$t=[].concat(Q3(Xe.slice(0,gr)),[yt-sr]);break}var nr=$t.length%2===0?[0,Gt]:[Gt];return[].concat(Q3(n.repeat(Xe,vt)),Q3($t),nr).map(function(jr){return"".concat(jr,"px")}).join(", ")}),cy(S,"id",bw("recharts-line-")),cy(S,"pathRef",function(Ce){S.mainCurve=Ce}),cy(S,"handleAnimationEnd",function(){S.setState({isAnimationFinished:!0}),S.props.onAnimationEnd&&S.props.onAnimationEnd()}),cy(S,"handleAnimationStart",function(){S.setState({isAnimationFinished:!1}),S.props.onAnimationStart&&S.props.onAnimationStart()}),S}return wwe(n,e),gwe(n,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var L=this.getTotalLength();this.setState({totalLength:L})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var L=this.getTotalLength();L!==this.state.totalLength&&this.setState({totalLength:L})}}},{key:"getTotalLength",value:function(){var L=this.mainCurve;try{return L&&L.getTotalLength&&L.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(L,re){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var ve=this.props,Ce=ve.points,Be=ve.xAxis,Xe=ve.yAxis,Ke=ve.layout,vt=ve.children,yt=bm(vt,ux);if(!yt)return null;var Gt=function(sr,nr){return{x:sr.x,y:sr.y,value:sr.value,errorVal:Dv(sr.payload,nr)}},$t={clipPath:L?"url(#clipPath-".concat(re,")"):null};return aa.createElement(Rf,$t,yt.map(function(gr){return aa.cloneElement(gr,{key:"bar-".concat(gr.props.dataKey),data:Ce,xAxis:Be,yAxis:Xe,layout:Ke,dataPointFormatter:Gt})}))}},{key:"renderDots",value:function(L,re,ve){var Ce=this.props.isAnimationActive;if(Ce&&!this.state.isAnimationFinished)return null;var Be=this.props,Xe=Be.dot,Ke=Be.points,vt=Be.dataKey,yt=Iu(this.props,!1),Gt=Iu(Xe,!0),$t=Ke.map(function(sr,nr){var jr=$m($m($m({key:"dot-".concat(nr),r:3},yt),Gt),{},{index:nr,cx:sr.x,cy:sr.y,value:sr.value,dataKey:vt,payload:sr.payload,points:Ke});return n.renderDotItem(Xe,jr)}),gr={clipPath:L?"url(#clipPath-".concat(re?"":"dots-").concat(ve,")"):null};return aa.createElement(Rf,K5({className:"recharts-line-dots",key:"dots"},gr),$t)}},{key:"renderCurveStatically",value:function(L,re,ve,Ce){var Be=this.props,Xe=Be.type,Ke=Be.layout,vt=Be.connectNulls;Be.ref;var yt=CX(Be,cwe),Gt=$m($m($m({},Iu(yt,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:re?"url(#clipPath-".concat(ve,")"):null,points:L},Ce),{},{type:Xe,layout:Ke,connectNulls:vt});return aa.createElement(cw,K5({},Gt,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(L,re){var ve=this,Ce=this.props,Be=Ce.points,Xe=Ce.strokeDasharray,Ke=Ce.isAnimationActive,vt=Ce.animationBegin,yt=Ce.animationDuration,Gt=Ce.animationEasing,$t=Ce.animationId,gr=Ce.animateNewValues,sr=Ce.width,nr=Ce.height,jr=this.state,Ne=jr.prevPoints,an=jr.totalLength;return aa.createElement(dy,{begin:vt,duration:yt,isActive:Ke,easing:Gt,from:{t:0},to:{t:1},key:"line-".concat($t),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(yn){var Lr=yn.t;if(Ne){var $r=Ne.length/Be.length,dn=Be.map(function(ta,qa){var la=Math.floor(qa*$r);if(Ne[la]){var ja=Ne[la],pa=ev(ja.x,ta.x),Ra=ev(ja.y,ta.y);return $m($m({},ta),{},{x:pa(Lr),y:Ra(Lr)})}if(gr){var vi=ev(sr*2,ta.x),Pi=ev(nr/2,ta.y);return $m($m({},ta),{},{x:vi(Lr),y:Pi(Lr)})}return $m($m({},ta),{},{x:ta.x,y:ta.y})});return ve.renderCurveStatically(dn,L,re)}var Jn=ev(0,an),xn=Jn(Lr),Na;if(Xe){var zn="".concat(Xe).split(/[,\s]+/gim).map(function(ta){return parseFloat(ta)});Na=ve.getStrokeDasharray(xn,an,zn)}else Na=ve.generateSimpleStrokeDasharray(an,xn);return ve.renderCurveStatically(Be,L,re,{strokeDasharray:Na})})}},{key:"renderCurve",value:function(L,re){var ve=this.props,Ce=ve.points,Be=ve.isAnimationActive,Xe=this.state,Ke=Xe.prevPoints,vt=Xe.totalLength;return Be&&Ce&&Ce.length&&(!Ke&&vt>0||!mw(Ke,Ce))?this.renderCurveWithAnimation(L,re):this.renderCurveStatically(Ce,L,re)}},{key:"render",value:function(){var L,re=this.props,ve=re.hide,Ce=re.dot,Be=re.points,Xe=re.className,Ke=re.xAxis,vt=re.yAxis,yt=re.top,Gt=re.left,$t=re.width,gr=re.height,sr=re.isAnimationActive,nr=re.id;if(ve||!Be||!Be.length)return null;var jr=this.state.isAnimationFinished,Ne=Be.length===1,an=Ec("recharts-line",Xe),yn=Ke&&Ke.allowDataOverflow,Lr=vt&&vt.allowDataOverflow,$r=yn||Lr,dn=Mu(nr)?this.id:nr,Jn=(L=Iu(Ce,!1))!==null&&L!==void 0?L:{r:3,strokeWidth:2},xn=Jn.r,Na=xn===void 0?3:xn,zn=Jn.strokeWidth,ta=zn===void 0?2:zn,qa=ZW(Ce)?Ce:{},la=qa.clipDot,ja=la===void 0?!0:la,pa=Na*2+ta;return aa.createElement(Rf,{className:an},yn||Lr?aa.createElement("defs",null,aa.createElement("clipPath",{id:"clipPath-".concat(dn)},aa.createElement("rect",{x:yn?Gt:Gt-$t/2,y:Lr?yt:yt-gr/2,width:yn?$t:$t*2,height:Lr?gr:gr*2})),!ja&&aa.createElement("clipPath",{id:"clipPath-dots-".concat(dn)},aa.createElement("rect",{x:Gt-pa/2,y:yt-pa/2,width:$t+pa,height:gr+pa}))):null,!Ne&&this.renderCurve($r,dn),this.renderErrorBar($r,dn),(Ne||Ce)&&this.renderDots($r,ja,dn),(!sr||jr)&&pg.renderCallByParent(this.props,Be))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,prevPoints:re.curPoints}:L.points!==re.curPoints?{curPoints:L.points}:null}},{key:"repeat",value:function(L,re){for(var ve=L.length%2!==0?[].concat(Q3(L),[0]):L,Ce=[],Be=0;Be<re;++Be)Ce=[].concat(Q3(Ce),Q3(ve));return Ce}},{key:"renderDotItem",value:function(L,re){var ve;if(aa.isValidElement(L))ve=aa.cloneElement(L,re);else if(Fu(L))ve=L(re);else{var Ce=re.key,Be=CX(re,fwe),Xe=Ec("recharts-line-dot",typeof L!="boolean"?L.className:"");ve=aa.createElement(sL,K5({key:Ce},Be,{className:Xe}))}return ve}}])})(Ua.PureComponent);cy(gg,"displayName","Line");cy(gg,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!hx.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});cy(gg,"getComposedData",function(e){var n=e.props,S=e.xAxis,L=e.yAxis,re=e.xAxisTicks,ve=e.yAxisTicks,Ce=e.dataKey,Be=e.bandSize,Xe=e.displayedData,Ke=e.offset,vt=n.layout,yt=Xe.map(function(Gt,$t){var gr=Dv(Gt,Ce);return vt==="horizontal"?{x:mT({axis:S,ticks:re,bandSize:Be,entry:Gt,index:$t}),y:Mu(gr)?null:L.scale(gr),value:gr,payload:Gt}:{x:Mu(gr)?null:S.scale(gr),y:mT({axis:L,ticks:ve,bandSize:Be,entry:Gt,index:$t}),value:gr,payload:Gt}});return $m({points:yt,layout:vt},Ke)});var Awe=["layout","type","stroke","connectNulls","isRange","ref"],Swe=["key"],N$;function ET(e){"@babel/helpers - typeof";return ET=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ET(e)}function F$(e,n){if(e==null)return{};var S=Ewe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Ewe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function ow(){return ow=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},ow.apply(this,arguments)}function LX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function tx(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?LX(Object(S),!0).forEach(function(L){hg(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):LX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Mwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function RX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,j$(L.key),L)}}function Cwe(e,n,S){return n&&RX(e.prototype,n),S&&RX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function kwe(e,n,S){return n=EP(n),Pwe(e,B$()?Reflect.construct(n,S||[],EP(e).constructor):n.apply(e,S))}function Pwe(e,n){if(n&&(ET(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lwe(e)}function Lwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function B$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(B$=function(){return!!e})()}function EP(e){return EP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},EP(e)}function Rwe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&c7(e,n)}function c7(e,n){return c7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},c7(e,n)}function hg(e,n,S){return n=j$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function j$(e){var n=Iwe(e,"string");return ET(n)=="symbol"?n:n+""}function Iwe(e,n){if(ET(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(ET(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mx=(function(e){function n(){var S;Mwe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=kwe(this,n,[].concat(re)),hg(S,"state",{isAnimationFinished:!0}),hg(S,"id",bw("recharts-area-")),hg(S,"handleAnimationEnd",function(){var Ce=S.props.onAnimationEnd;S.setState({isAnimationFinished:!0}),Fu(Ce)&&Ce()}),hg(S,"handleAnimationStart",function(){var Ce=S.props.onAnimationStart;S.setState({isAnimationFinished:!1}),Fu(Ce)&&Ce()}),S}return Rwe(n,e),Cwe(n,[{key:"renderDots",value:function(L,re,ve){var Ce=this.props.isAnimationActive,Be=this.state.isAnimationFinished;if(Ce&&!Be)return null;var Xe=this.props,Ke=Xe.dot,vt=Xe.points,yt=Xe.dataKey,Gt=Iu(this.props,!1),$t=Iu(Ke,!0),gr=vt.map(function(nr,jr){var Ne=tx(tx(tx({key:"dot-".concat(jr),r:3},Gt),$t),{},{index:jr,cx:nr.x,cy:nr.y,dataKey:yt,value:nr.value,payload:nr.payload,points:vt});return n.renderDotItem(Ke,Ne)}),sr={clipPath:L?"url(#clipPath-".concat(re?"":"dots-").concat(ve,")"):null};return aa.createElement(Rf,ow({className:"recharts-area-dots"},sr),gr)}},{key:"renderHorizontalRect",value:function(L){var re=this.props,ve=re.baseLine,Ce=re.points,Be=re.strokeWidth,Xe=Ce[0].x,Ke=Ce[Ce.length-1].x,vt=L*Math.abs(Xe-Ke),yt=ax(Ce.map(function(Gt){return Gt.y||0}));return gs(ve)&&typeof ve=="number"?yt=Math.max(ve,yt):ve&&Array.isArray(ve)&&ve.length&&(yt=Math.max(ax(ve.map(function(Gt){return Gt.y||0})),yt)),gs(yt)?aa.createElement("rect",{x:Xe<Ke?Xe:Xe-vt,y:0,width:vt,height:Math.floor(yt+(Be?parseInt("".concat(Be),10):1))}):null}},{key:"renderVerticalRect",value:function(L){var re=this.props,ve=re.baseLine,Ce=re.points,Be=re.strokeWidth,Xe=Ce[0].y,Ke=Ce[Ce.length-1].y,vt=L*Math.abs(Xe-Ke),yt=ax(Ce.map(function(Gt){return Gt.x||0}));return gs(ve)&&typeof ve=="number"?yt=Math.max(ve,yt):ve&&Array.isArray(ve)&&ve.length&&(yt=Math.max(ax(ve.map(function(Gt){return Gt.x||0})),yt)),gs(yt)?aa.createElement("rect",{x:0,y:Xe<Ke?Xe:Xe-vt,width:yt+(Be?parseInt("".concat(Be),10):1),height:Math.floor(vt)}):null}},{key:"renderClipRect",value:function(L){var re=this.props.layout;return re==="vertical"?this.renderVerticalRect(L):this.renderHorizontalRect(L)}},{key:"renderAreaStatically",value:function(L,re,ve,Ce){var Be=this.props,Xe=Be.layout,Ke=Be.type,vt=Be.stroke,yt=Be.connectNulls,Gt=Be.isRange;Be.ref;var $t=F$(Be,Awe);return aa.createElement(Rf,{clipPath:ve?"url(#clipPath-".concat(Ce,")"):null},aa.createElement(cw,ow({},Iu($t,!0),{points:L,connectNulls:yt,type:Ke,baseLine:re,layout:Xe,stroke:"none",className:"recharts-area-area"})),vt!=="none"&&aa.createElement(cw,ow({},Iu(this.props,!1),{className:"recharts-area-curve",layout:Xe,type:Ke,connectNulls:yt,fill:"none",points:L})),vt!=="none"&&Gt&&aa.createElement(cw,ow({},Iu(this.props,!1),{className:"recharts-area-curve",layout:Xe,type:Ke,connectNulls:yt,fill:"none",points:re})))}},{key:"renderAreaWithAnimation",value:function(L,re){var ve=this,Ce=this.props,Be=Ce.points,Xe=Ce.baseLine,Ke=Ce.isAnimationActive,vt=Ce.animationBegin,yt=Ce.animationDuration,Gt=Ce.animationEasing,$t=Ce.animationId,gr=this.state,sr=gr.prevPoints,nr=gr.prevBaseLine;return aa.createElement(dy,{begin:vt,duration:yt,isActive:Ke,easing:Gt,from:{t:0},to:{t:1},key:"area-".concat($t),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(jr){var Ne=jr.t;if(sr){var an=sr.length/Be.length,yn=Be.map(function(Jn,xn){var Na=Math.floor(xn*an);if(sr[Na]){var zn=sr[Na],ta=ev(zn.x,Jn.x),qa=ev(zn.y,Jn.y);return tx(tx({},Jn),{},{x:ta(Ne),y:qa(Ne)})}return Jn}),Lr;if(gs(Xe)&&typeof Xe=="number"){var $r=ev(nr,Xe);Lr=$r(Ne)}else if(Mu(Xe)||BT(Xe)){var dn=ev(nr,0);Lr=dn(Ne)}else Lr=Xe.map(function(Jn,xn){var Na=Math.floor(xn*an);if(nr[Na]){var zn=nr[Na],ta=ev(zn.x,Jn.x),qa=ev(zn.y,Jn.y);return tx(tx({},Jn),{},{x:ta(Ne),y:qa(Ne)})}return Jn});return ve.renderAreaStatically(yn,Lr,L,re)}return aa.createElement(Rf,null,aa.createElement("defs",null,aa.createElement("clipPath",{id:"animationClipPath-".concat(re)},ve.renderClipRect(Ne))),aa.createElement(Rf,{clipPath:"url(#animationClipPath-".concat(re,")")},ve.renderAreaStatically(Be,Xe,L,re)))})}},{key:"renderArea",value:function(L,re){var ve=this.props,Ce=ve.points,Be=ve.baseLine,Xe=ve.isAnimationActive,Ke=this.state,vt=Ke.prevPoints,yt=Ke.prevBaseLine,Gt=Ke.totalLength;return Xe&&Ce&&Ce.length&&(!vt&&Gt>0||!mw(vt,Ce)||!mw(yt,Be))?this.renderAreaWithAnimation(L,re):this.renderAreaStatically(Ce,Be,L,re)}},{key:"render",value:function(){var L,re=this.props,ve=re.hide,Ce=re.dot,Be=re.points,Xe=re.className,Ke=re.top,vt=re.left,yt=re.xAxis,Gt=re.yAxis,$t=re.width,gr=re.height,sr=re.isAnimationActive,nr=re.id;if(ve||!Be||!Be.length)return null;var jr=this.state.isAnimationFinished,Ne=Be.length===1,an=Ec("recharts-area",Xe),yn=yt&&yt.allowDataOverflow,Lr=Gt&&Gt.allowDataOverflow,$r=yn||Lr,dn=Mu(nr)?this.id:nr,Jn=(L=Iu(Ce,!1))!==null&&L!==void 0?L:{r:3,strokeWidth:2},xn=Jn.r,Na=xn===void 0?3:xn,zn=Jn.strokeWidth,ta=zn===void 0?2:zn,qa=ZW(Ce)?Ce:{},la=qa.clipDot,ja=la===void 0?!0:la,pa=Na*2+ta;return aa.createElement(Rf,{className:an},yn||Lr?aa.createElement("defs",null,aa.createElement("clipPath",{id:"clipPath-".concat(dn)},aa.createElement("rect",{x:yn?vt:vt-$t/2,y:Lr?Ke:Ke-gr/2,width:yn?$t:$t*2,height:Lr?gr:gr*2})),!ja&&aa.createElement("clipPath",{id:"clipPath-dots-".concat(dn)},aa.createElement("rect",{x:vt-pa/2,y:Ke-pa/2,width:$t+pa,height:gr+pa}))):null,Ne?null:this.renderArea($r,dn),(Ce||Ne)&&this.renderDots($r,ja,dn),(!sr||jr)&&pg.renderCallByParent(this.props,Be))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,curBaseLine:L.baseLine,prevPoints:re.curPoints,prevBaseLine:re.curBaseLine}:L.points!==re.curPoints||L.baseLine!==re.curBaseLine?{curPoints:L.points,curBaseLine:L.baseLine}:null}}])})(Ua.PureComponent);N$=mx;hg(mx,"displayName","Area");hg(mx,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!hx.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});hg(mx,"getBaseValue",function(e,n,S,L){var re=e.layout,ve=e.baseValue,Ce=n.props.baseValue,Be=Ce??ve;if(gs(Be)&&typeof Be=="number")return Be;var Xe=re==="horizontal"?L:S,Ke=Xe.scale.domain();if(Xe.type==="number"){var vt=Math.max(Ke[0],Ke[1]),yt=Math.min(Ke[0],Ke[1]);return Be==="dataMin"?yt:Be==="dataMax"||vt<0?vt:Math.max(Math.min(Ke[0],Ke[1]),0)}return Be==="dataMin"?Ke[0]:Be==="dataMax"?Ke[1]:Ke[0]});hg(mx,"getComposedData",function(e){var n=e.props,S=e.item,L=e.xAxis,re=e.yAxis,ve=e.xAxisTicks,Ce=e.yAxisTicks,Be=e.bandSize,Xe=e.dataKey,Ke=e.stackedData,vt=e.dataStartIndex,yt=e.displayedData,Gt=e.offset,$t=n.layout,gr=Ke&&Ke.length,sr=N$.getBaseValue(n,S,L,re),nr=$t==="horizontal",jr=!1,Ne=yt.map(function(yn,Lr){var $r;gr?$r=Ke[vt+Lr]:($r=Dv(yn,Xe),Array.isArray($r)?jr=!0:$r=[sr,$r]);var dn=$r[1]==null||gr&&Dv(yn,Xe)==null;return nr?{x:mT({axis:L,ticks:ve,bandSize:Be,entry:yn,index:Lr}),y:dn?null:re.scale($r[1]),value:$r,payload:yn}:{x:dn?null:L.scale($r[1]),y:mT({axis:re,ticks:Ce,bandSize:Be,entry:yn,index:Lr}),value:$r,payload:yn}}),an;return gr||jr?an=Ne.map(function(yn){var Lr=Array.isArray(yn.value)?yn.value[0]:null;return nr?{x:yn.x,y:Lr!=null&&yn.y!=null?re.scale(Lr):null}:{x:Lr!=null?L.scale(Lr):null,y:yn.y}}):an=nr?re.scale(sr):L.scale(sr),tx({points:Ne,baseLine:an,layout:$t,isRange:jr},Gt)});hg(mx,"renderDotItem",function(e,n){var S;if(aa.isValidElement(e))S=aa.cloneElement(e,n);else if(Fu(e))S=e(n);else{var L=Ec("recharts-area-dot",typeof e!="boolean"?e.className:""),re=n.key,ve=F$(n,Swe);S=aa.createElement(sL,ow({},ve,{key:re,className:L}))}return S});function MT(e){"@babel/helpers - typeof";return MT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},MT(e)}function Dwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function Owe(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,V$(L.key),L)}}function zwe(e,n,S){return n&&Owe(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nwe(e,n,S){return n=MP(n),Fwe(e,U$()?Reflect.construct(n,S||[],MP(e).constructor):n.apply(e,S))}function Fwe(e,n){if(n&&(MT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bwe(e)}function Bwe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(U$=function(){return!!e})()}function MP(e){return MP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},MP(e)}function jwe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&f7(e,n)}function f7(e,n){return f7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},f7(e,n)}function q$(e,n,S){return n=V$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function V$(e){var n=Uwe(e,"string");return MT(n)=="symbol"?n:n+""}function Uwe(e,n){if(MT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(MT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var pL=(function(e){function n(){return Dwe(this,n),Nwe(this,n,arguments)}return jwe(n,e),zwe(n,[{key:"render",value:function(){return null}}])})(Ua.Component);q$(pL,"displayName","ZAxis");q$(pL,"defaultProps",{zAxisId:0,range:[64,64],scale:"auto",type:"number"});var qwe=["option","isActive"];function J5(){return J5=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},J5.apply(this,arguments)}function Vwe(e,n){if(e==null)return{};var S=Hwe(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function Hwe(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function Gwe(e){var n=e.option,S=e.isActive,L=Vwe(e,qwe);return typeof n=="string"?Ua.createElement(Kz,J5({option:Ua.createElement(WP,J5({type:n},L)),isActive:S,shapeType:"symbols"},L)):Ua.createElement(Kz,J5({option:n,isActive:S,shapeType:"symbols"},L))}function CT(e){"@babel/helpers - typeof";return CT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},CT(e)}function Q5(){return Q5=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},Q5.apply(this,arguments)}function IX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function S0(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?IX(Object(S),!0).forEach(function(L){ox(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):IX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function Xwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function DX(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,G$(L.key),L)}}function Wwe(e,n,S){return n&&DX(e.prototype,n),S&&DX(e,S),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ywe(e,n,S){return n=CP(n),Zwe(e,H$()?Reflect.construct(n,S||[],CP(e).constructor):n.apply(e,S))}function Zwe(e,n){if(n&&(CT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $we(e)}function $we(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H$=function(){return!!e})()}function CP(e){return CP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},CP(e)}function Kwe(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&h7(e,n)}function h7(e,n){return h7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},h7(e,n)}function ox(e,n,S){return n=G$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function G$(e){var n=Jwe(e,"string");return CT(n)=="symbol"?n:n+""}function Jwe(e,n){if(CT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(CT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var XT=(function(e){function n(){var S;Xwe(this,n);for(var L=arguments.length,re=new Array(L),ve=0;ve<L;ve++)re[ve]=arguments[ve];return S=Ywe(this,n,[].concat(re)),ox(S,"state",{isAnimationFinished:!1}),ox(S,"handleAnimationEnd",function(){S.setState({isAnimationFinished:!0})}),ox(S,"handleAnimationStart",function(){S.setState({isAnimationFinished:!1})}),ox(S,"id",bw("recharts-scatter-")),S}return Kwe(n,e),Wwe(n,[{key:"renderSymbolsStatically",value:function(L){var re=this,ve=this.props,Ce=ve.shape,Be=ve.activeShape,Xe=ve.activeIndex,Ke=Iu(this.props,!1);return L.map(function(vt,yt){var Gt=Xe===yt,$t=Gt?Be:Ce,gr=S0(S0({},Ke),vt);return aa.createElement(Rf,Q5({className:"recharts-scatter-symbol",key:"symbol-".concat(vt?.cx,"-").concat(vt?.cy,"-").concat(vt?.size,"-").concat(yt)},tE(re.props,vt,yt),{role:"img"}),aa.createElement(Gwe,Q5({option:$t,isActive:Gt,key:"symbol-".concat(yt)},gr)))})}},{key:"renderSymbolsWithAnimation",value:function(){var L=this,re=this.props,ve=re.points,Ce=re.isAnimationActive,Be=re.animationBegin,Xe=re.animationDuration,Ke=re.animationEasing,vt=re.animationId,yt=this.state.prevPoints;return aa.createElement(dy,{begin:Be,duration:Xe,isActive:Ce,easing:Ke,from:{t:0},to:{t:1},key:"pie-".concat(vt),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(Gt){var $t=Gt.t,gr=ve.map(function(sr,nr){var jr=yt&&yt[nr];if(jr){var Ne=ev(jr.cx,sr.cx),an=ev(jr.cy,sr.cy),yn=ev(jr.size,sr.size);return S0(S0({},sr),{},{cx:Ne($t),cy:an($t),size:yn($t)})}var Lr=ev(0,sr.size);return S0(S0({},sr),{},{size:Lr($t)})});return aa.createElement(Rf,null,L.renderSymbolsStatically(gr))})}},{key:"renderSymbols",value:function(){var L=this.props,re=L.points,ve=L.isAnimationActive,Ce=this.state.prevPoints;return ve&&re&&re.length&&(!Ce||!mw(Ce,re))?this.renderSymbolsWithAnimation():this.renderSymbolsStatically(re)}},{key:"renderErrorBar",value:function(){var L=this.props.isAnimationActive;if(L&&!this.state.isAnimationFinished)return null;var re=this.props,ve=re.points,Ce=re.xAxis,Be=re.yAxis,Xe=re.children,Ke=bm(Xe,ux);return Ke?Ke.map(function(vt,yt){var Gt=vt.props,$t=Gt.direction,gr=Gt.dataKey;return aa.cloneElement(vt,{key:"".concat($t,"-").concat(gr,"-").concat(ve[yt]),data:ve,xAxis:Ce,yAxis:Be,layout:$t==="x"?"vertical":"horizontal",dataPointFormatter:function(nr,jr){return{x:nr.cx,y:nr.cy,value:$t==="x"?+nr.node.x:+nr.node.y,errorVal:Dv(nr,jr)}}})}):null}},{key:"renderLine",value:function(){var L=this.props,re=L.points,ve=L.line,Ce=L.lineType,Be=L.lineJointType,Xe=Iu(this.props,!1),Ke=Iu(ve,!1),vt,yt;if(Ce==="joint")vt=re.map(function(an){return{x:an.cx,y:an.cy}});else if(Ce==="fitting"){var Gt=Due(re),$t=Gt.xmin,gr=Gt.xmax,sr=Gt.a,nr=Gt.b,jr=function(yn){return sr*yn+nr};vt=[{x:$t,y:jr($t)},{x:gr,y:jr(gr)}]}var Ne=S0(S0(S0({},Xe),{},{fill:"none",stroke:Xe&&Xe.fill},Ke),{},{points:vt});return aa.isValidElement(ve)?yt=aa.cloneElement(ve,Ne):Fu(ve)?yt=ve(Ne):yt=aa.createElement(cw,Q5({},Ne,{type:Be})),aa.createElement(Rf,{className:"recharts-scatter-line",key:"recharts-scatter-line"},yt)}},{key:"render",value:function(){var L=this.props,re=L.hide,ve=L.points,Ce=L.line,Be=L.className,Xe=L.xAxis,Ke=L.yAxis,vt=L.left,yt=L.top,Gt=L.width,$t=L.height,gr=L.id,sr=L.isAnimationActive;if(re||!ve||!ve.length)return null;var nr=this.state.isAnimationFinished,jr=Ec("recharts-scatter",Be),Ne=Xe&&Xe.allowDataOverflow,an=Ke&&Ke.allowDataOverflow,yn=Ne||an,Lr=Mu(gr)?this.id:gr;return aa.createElement(Rf,{className:jr,clipPath:yn?"url(#clipPath-".concat(Lr,")"):null},Ne||an?aa.createElement("defs",null,aa.createElement("clipPath",{id:"clipPath-".concat(Lr)},aa.createElement("rect",{x:Ne?vt:vt-Gt/2,y:an?yt:yt-$t/2,width:Ne?Gt:Gt*2,height:an?$t:$t*2}))):null,Ce&&this.renderLine(),this.renderErrorBar(),aa.createElement(Rf,{key:"recharts-scatter-symbols"},this.renderSymbols()),(!sr||nr)&&pg.renderCallByParent(this.props,ve))}}],[{key:"getDerivedStateFromProps",value:function(L,re){return L.animationId!==re.prevAnimationId?{prevAnimationId:L.animationId,curPoints:L.points,prevPoints:re.curPoints}:L.points!==re.curPoints?{curPoints:L.points}:null}}])})(Ua.PureComponent);ox(XT,"displayName","Scatter");ox(XT,"defaultProps",{xAxisId:0,yAxisId:0,zAxisId:0,legendType:"circle",lineType:"joint",lineJointType:"linear",data:[],shape:"circle",hide:!1,isAnimationActive:!hx.isSsr,animationBegin:0,animationDuration:400,animationEasing:"linear"});ox(XT,"getComposedData",function(e){var n=e.xAxis,S=e.yAxis,L=e.zAxis,re=e.item,ve=e.displayedData,Ce=e.xAxisTicks,Be=e.yAxisTicks,Xe=e.offset,Ke=re.props.tooltipType,vt=bm(re.props.children,r9),yt=Mu(n.dataKey)?re.props.dataKey:n.dataKey,Gt=Mu(S.dataKey)?re.props.dataKey:S.dataKey,$t=L&&L.dataKey,gr=L?L.range:pL.defaultProps.range,sr=gr&&gr[0],nr=n.scale.bandwidth?n.scale.bandwidth():0,jr=S.scale.bandwidth?S.scale.bandwidth():0,Ne=ve.map(function(an,yn){var Lr=Dv(an,yt),$r=Dv(an,Gt),dn=!Mu($t)&&Dv(an,$t)||"-",Jn=[{name:Mu(n.dataKey)?re.props.name:n.name||n.dataKey,unit:n.unit||"",value:Lr,payload:an,dataKey:yt,type:Ke},{name:Mu(S.dataKey)?re.props.name:S.name||S.dataKey,unit:S.unit||"",value:$r,payload:an,dataKey:Gt,type:Ke}];dn!=="-"&&Jn.push({name:L.name||L.dataKey,unit:L.unit||"",value:dn,payload:an,dataKey:$t,type:Ke});var xn=mT({axis:n,ticks:Ce,bandSize:nr,entry:an,index:yn,dataKey:yt}),Na=mT({axis:S,ticks:Be,bandSize:jr,entry:an,index:yn,dataKey:Gt}),zn=dn!=="-"?L.scale(dn):sr,ta=Math.sqrt(Math.max(zn,0)/Math.PI);return S0(S0({},an),{},{cx:xn,cy:Na,x:xn-ta,y:Na-ta,xAxis:n,yAxis:S,zAxis:L,width:2*ta,height:2*ta,size:zn,node:{x:Lr,y:$r,z:dn},tooltipPayload:Jn,tooltipPosition:{x:xn,y:Na},payload:an},vt&&vt[yn]&&vt[yn].props)});return S0({points:Ne},Xe)});function kT(e){"@babel/helpers - typeof";return kT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},kT(e)}function Qwe(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function e2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,Y$(L.key),L)}}function t2e(e,n,S){return n&&e2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function r2e(e,n,S){return n=kP(n),n2e(e,X$()?Reflect.construct(n,S||[],kP(e).constructor):n.apply(e,S))}function n2e(e,n){if(n&&(kT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a2e(e)}function a2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X$=function(){return!!e})()}function kP(e){return kP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},kP(e)}function i2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&d7(e,n)}function d7(e,n){return d7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},d7(e,n)}function W$(e,n,S){return n=Y$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function Y$(e){var n=o2e(e,"string");return kT(n)=="symbol"?n:n+""}function o2e(e,n){if(kT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(kT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function v7(){return v7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},v7.apply(this,arguments)}function s2e(e){var n=e.xAxisId,S=R9(),L=I9(),re=T$(n);return re==null?null:Ua.createElement(GT,v7({},re,{className:Ec("recharts-".concat(re.axisType," ").concat(re.axisType),re.className),viewBox:{x:0,y:0,width:S,height:L},ticksGenerator:function(Ce){return x1(Ce,!0)}}))}var yx=(function(e){function n(){return Qwe(this,n),r2e(this,n,arguments)}return i2e(n,e),t2e(n,[{key:"render",value:function(){return Ua.createElement(s2e,this.props)}}])})(Ua.Component);W$(yx,"displayName","XAxis");W$(yx,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function PT(e){"@babel/helpers - typeof";return PT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},PT(e)}function l2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function u2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,K$(L.key),L)}}function c2e(e,n,S){return n&&u2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f2e(e,n,S){return n=PP(n),h2e(e,Z$()?Reflect.construct(n,S||[],PP(e).constructor):n.apply(e,S))}function h2e(e,n){if(n&&(PT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return d2e(e)}function d2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Z$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Z$=function(){return!!e})()}function PP(e){return PP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},PP(e)}function v2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&p7(e,n)}function p7(e,n){return p7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},p7(e,n)}function $$(e,n,S){return n=K$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function K$(e){var n=p2e(e,"string");return PT(n)=="symbol"?n:n+""}function p2e(e,n){if(PT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(PT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function m7(){return m7=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},m7.apply(this,arguments)}var m2e=function(n){var S=n.yAxisId,L=R9(),re=I9(),ve=A$(S);return ve==null?null:Ua.createElement(GT,m7({},ve,{className:Ec("recharts-".concat(ve.axisType," ").concat(ve.axisType),ve.className),viewBox:{x:0,y:0,width:L,height:re},ticksGenerator:function(Be){return x1(Be,!0)}}))},gx=(function(e){function n(){return l2e(this,n),f2e(this,n,arguments)}return v2e(n,e),c2e(n,[{key:"render",value:function(){return Ua.createElement(m2e,this.props)}}])})(Ua.Component);$$(gx,"displayName","YAxis");$$(gx,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function OX(e){return x2e(e)||_2e(e)||g2e(e)||y2e()}function y2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g2e(e,n){if(e){if(typeof e=="string")return y7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return y7(e,n)}}function _2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function x2e(e){if(Array.isArray(e))return y7(e)}function y7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}var g7=function(n,S,L,re,ve){var Ce=bm(n,O9),Be=bm(n,hL),Xe=[].concat(OX(Ce),OX(Be)),Ke=bm(n,vL),vt="".concat(re,"Id"),yt=re[0],Gt=S;if(Xe.length&&(Gt=Xe.reduce(function(sr,nr){if(nr.props[vt]===L&&mg(nr.props,"extendDomain")&&gs(nr.props[yt])){var jr=nr.props[yt];return[Math.min(sr[0],jr),Math.max(sr[1],jr)]}return sr},Gt)),Ke.length){var $t="".concat(yt,"1"),gr="".concat(yt,"2");Gt=Ke.reduce(function(sr,nr){if(nr.props[vt]===L&&mg(nr.props,"extendDomain")&&gs(nr.props[$t])&&gs(nr.props[gr])){var jr=nr.props[$t],Ne=nr.props[gr];return[Math.min(sr[0],jr,Ne),Math.max(sr[1],jr,Ne)]}return sr},Gt)}return ve&&ve.length&&(Gt=ve.reduce(function(sr,nr){return gs(nr)?[Math.min(sr[0],nr),Math.max(sr[1],nr)]:sr},Gt)),Gt},FO={exports:{}},zX;function b2e(){return zX||(zX=1,(function(e){var n=Object.prototype.hasOwnProperty,S="~";function L(){}Object.create&&(L.prototype=Object.create(null),new L().__proto__||(S=!1));function re(Xe,Ke,vt){this.fn=Xe,this.context=Ke,this.once=vt||!1}function ve(Xe,Ke,vt,yt,Gt){if(typeof vt!="function")throw new TypeError("The listener must be a function");var $t=new re(vt,yt||Xe,Gt),gr=S?S+Ke:Ke;return Xe._events[gr]?Xe._events[gr].fn?Xe._events[gr]=[Xe._events[gr],$t]:Xe._events[gr].push($t):(Xe._events[gr]=$t,Xe._eventsCount++),Xe}function Ce(Xe,Ke){--Xe._eventsCount===0?Xe._events=new L:delete Xe._events[Ke]}function Be(){this._events=new L,this._eventsCount=0}Be.prototype.eventNames=function(){var Ke=[],vt,yt;if(this._eventsCount===0)return Ke;for(yt in vt=this._events)n.call(vt,yt)&&Ke.push(S?yt.slice(1):yt);return Object.getOwnPropertySymbols?Ke.concat(Object.getOwnPropertySymbols(vt)):Ke},Be.prototype.listeners=function(Ke){var vt=S?S+Ke:Ke,yt=this._events[vt];if(!yt)return[];if(yt.fn)return[yt.fn];for(var Gt=0,$t=yt.length,gr=new Array($t);Gt<$t;Gt++)gr[Gt]=yt[Gt].fn;return gr},Be.prototype.listenerCount=function(Ke){var vt=S?S+Ke:Ke,yt=this._events[vt];return yt?yt.fn?1:yt.length:0},Be.prototype.emit=function(Ke,vt,yt,Gt,$t,gr){var sr=S?S+Ke:Ke;if(!this._events[sr])return!1;var nr=this._events[sr],jr=arguments.length,Ne,an;if(nr.fn){switch(nr.once&&this.removeListener(Ke,nr.fn,void 0,!0),jr){case 1:return nr.fn.call(nr.context),!0;case 2:return nr.fn.call(nr.context,vt),!0;case 3:return nr.fn.call(nr.context,vt,yt),!0;case 4:return nr.fn.call(nr.context,vt,yt,Gt),!0;case 5:return nr.fn.call(nr.context,vt,yt,Gt,$t),!0;case 6:return nr.fn.call(nr.context,vt,yt,Gt,$t,gr),!0}for(an=1,Ne=new Array(jr-1);an<jr;an++)Ne[an-1]=arguments[an];nr.fn.apply(nr.context,Ne)}else{var yn=nr.length,Lr;for(an=0;an<yn;an++)switch(nr[an].once&&this.removeListener(Ke,nr[an].fn,void 0,!0),jr){case 1:nr[an].fn.call(nr[an].context);break;case 2:nr[an].fn.call(nr[an].context,vt);break;case 3:nr[an].fn.call(nr[an].context,vt,yt);break;case 4:nr[an].fn.call(nr[an].context,vt,yt,Gt);break;default:if(!Ne)for(Lr=1,Ne=new Array(jr-1);Lr<jr;Lr++)Ne[Lr-1]=arguments[Lr];nr[an].fn.apply(nr[an].context,Ne)}}return!0},Be.prototype.on=function(Ke,vt,yt){return ve(this,Ke,vt,yt,!1)},Be.prototype.once=function(Ke,vt,yt){return ve(this,Ke,vt,yt,!0)},Be.prototype.removeListener=function(Ke,vt,yt,Gt){var $t=S?S+Ke:Ke;if(!this._events[$t])return this;if(!vt)return Ce(this,$t),this;var gr=this._events[$t];if(gr.fn)gr.fn===vt&&(!Gt||gr.once)&&(!yt||gr.context===yt)&&Ce(this,$t);else{for(var sr=0,nr=[],jr=gr.length;sr<jr;sr++)(gr[sr].fn!==vt||Gt&&!gr[sr].once||yt&&gr[sr].context!==yt)&&nr.push(gr[sr]);nr.length?this._events[$t]=nr.length===1?nr[0]:nr:Ce(this,$t)}return this},Be.prototype.removeAllListeners=function(Ke){var vt;return Ke?(vt=S?S+Ke:Ke,this._events[vt]&&Ce(this,vt)):(this._events=new L,this._eventsCount=0),this},Be.prototype.off=Be.prototype.removeListener,Be.prototype.addListener=Be.prototype.on,Be.prefixed=S,Be.EventEmitter=Be,e.exports=Be})(FO)),FO.exports}var w2e=b2e();const T2e=rh(w2e);var BO=new T2e,jO="recharts.syncMouseEvents";function OE(e){"@babel/helpers - typeof";return OE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},OE(e)}function A2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function S2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,J$(L.key),L)}}function E2e(e,n,S){return n&&S2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function UO(e,n,S){return n=J$(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function J$(e){var n=M2e(e,"string");return OE(n)=="symbol"?n:n+""}function M2e(e,n){if(OE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(OE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var C2e=(function(){function e(){A2e(this,e),UO(this,"activeIndex",0),UO(this,"coordinateList",[]),UO(this,"layout","horizontal")}return E2e(e,[{key:"setDetails",value:function(S){var L,re=S.coordinateList,ve=re===void 0?null:re,Ce=S.container,Be=Ce===void 0?null:Ce,Xe=S.layout,Ke=Xe===void 0?null:Xe,vt=S.offset,yt=vt===void 0?null:vt,Gt=S.mouseHandlerCallback,$t=Gt===void 0?null:Gt;this.coordinateList=(L=ve??this.coordinateList)!==null&&L!==void 0?L:[],this.container=Be??this.container,this.layout=Ke??this.layout,this.offset=yt??this.offset,this.mouseHandlerCallback=$t??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(S){if(this.coordinateList.length!==0)switch(S.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(S){this.activeIndex=S}},{key:"spoofMouse",value:function(){var S,L;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var re=this.container.getBoundingClientRect(),ve=re.x,Ce=re.y,Be=re.height,Xe=this.coordinateList[this.activeIndex].coordinate,Ke=((S=window)===null||S===void 0?void 0:S.scrollX)||0,vt=((L=window)===null||L===void 0?void 0:L.scrollY)||0,yt=ve+Xe+Ke,Gt=Ce+this.offset.top+Be/2+vt;this.mouseHandlerCallback({pageX:yt,pageY:Gt})}}}])})();function k2e(e,n,S){if(S==="number"&&n===!0&&Array.isArray(e)){var L=e?.[0],re=e?.[1];if(L&&re&&gs(L)&&gs(re))return!0}return!1}function P2e(e,n,S,L){var re=L/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?n.x-re:S.left+.5,y:e==="horizontal"?S.top+.5:n.y-re,width:e==="horizontal"?L:S.width-1,height:e==="horizontal"?S.height-1:L}}function Q$(e){var n=e.cx,S=e.cy,L=e.radius,re=e.startAngle,ve=e.endAngle,Ce=lp(n,S,L,re),Be=lp(n,S,L,ve);return{points:[Ce,Be],cx:n,cy:S,radius:L,startAngle:re,endAngle:ve}}function L2e(e,n,S){var L,re,ve,Ce;if(e==="horizontal")L=n.x,ve=L,re=S.top,Ce=S.top+S.height;else if(e==="vertical")re=n.y,Ce=re,L=S.left,ve=S.left+S.width;else if(n.cx!=null&&n.cy!=null)if(e==="centric"){var Be=n.cx,Xe=n.cy,Ke=n.innerRadius,vt=n.outerRadius,yt=n.angle,Gt=lp(Be,Xe,Ke,yt),$t=lp(Be,Xe,vt,yt);L=Gt.x,re=Gt.y,ve=$t.x,Ce=$t.y}else return Q$(n);return[{x:L,y:re},{x:ve,y:Ce}]}function zE(e){"@babel/helpers - typeof";return zE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},zE(e)}function NX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function Sk(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?NX(Object(S),!0).forEach(function(L){R2e(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):NX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function R2e(e,n,S){return n=I2e(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function I2e(e){var n=D2e(e,"string");return zE(n)=="symbol"?n:n+""}function D2e(e,n){if(zE(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(zE(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}function O2e(e){var n,S,L=e.element,re=e.tooltipEventType,ve=e.isActive,Ce=e.activeCoordinate,Be=e.activePayload,Xe=e.offset,Ke=e.activeTooltipIndex,vt=e.tooltipAxisBandSize,yt=e.layout,Gt=e.chartName,$t=(n=L.props.cursor)!==null&&n!==void 0?n:(S=L.type.defaultProps)===null||S===void 0?void 0:S.cursor;if(!L||!$t||!ve||!Ce||Gt!=="ScatterChart"&&re!=="axis")return null;var gr,sr=cw;if(Gt==="ScatterChart")gr=Ce,sr=i_e;else if(Gt==="BarChart")gr=P2e(yt,Ce,Xe,vt),sr=C9;else if(yt==="radial"){var nr=Q$(Ce),jr=nr.cx,Ne=nr.cy,an=nr.radius,yn=nr.startAngle,Lr=nr.endAngle;gr={cx:jr,cy:Ne,startAngle:yn,endAngle:Lr,innerRadius:an,outerRadius:an},sr=KZ}else gr={points:L2e(yt,Ce,Xe)},sr=cw;var $r=Sk(Sk(Sk(Sk({stroke:"#ccc",pointerEvents:"none"},Xe),gr),Iu($t,!1)),{},{payload:Be,payloadIndex:Ke,className:Ec("recharts-tooltip-cursor",$t.className)});return Ua.isValidElement($t)?Ua.cloneElement($t,$r):Ua.createElement(sr,$r)}var z2e=["item"],N2e=["children","className","width","height","style","compact","title","desc"];function LT(e){"@babel/helpers - typeof";return LT=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},LT(e)}function rT(){return rT=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var S=arguments[n];for(var L in S)Object.prototype.hasOwnProperty.call(S,L)&&(e[L]=S[L])}return e},rT.apply(this,arguments)}function FX(e,n){return j2e(e)||B2e(e,n)||tK(e,n)||F2e()}function F2e(){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 B2e(e,n){var S=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(S!=null){var L,re,ve,Ce,Be=[],Xe=!0,Ke=!1;try{if(ve=(S=S.call(e)).next,n!==0)for(;!(Xe=(L=ve.call(S)).done)&&(Be.push(L.value),Be.length!==n);Xe=!0);}catch(vt){Ke=!0,re=vt}finally{try{if(!Xe&&S.return!=null&&(Ce=S.return(),Object(Ce)!==Ce))return}finally{if(Ke)throw re}}return Be}}function j2e(e){if(Array.isArray(e))return e}function BX(e,n){if(e==null)return{};var S=U2e(e,n),L,re;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(e);for(re=0;re<ve.length;re++)L=ve[re],!(n.indexOf(L)>=0)&&Object.prototype.propertyIsEnumerable.call(e,L)&&(S[L]=e[L])}return S}function U2e(e,n){if(e==null)return{};var S={};for(var L in e)if(Object.prototype.hasOwnProperty.call(e,L)){if(n.indexOf(L)>=0)continue;S[L]=e[L]}return S}function q2e(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function V2e(e,n){for(var S=0;S<n.length;S++){var L=n[S];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(e,rK(L.key),L)}}function H2e(e,n,S){return n&&V2e(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function G2e(e,n,S){return n=LP(n),X2e(e,eK()?Reflect.construct(n,S||[],LP(e).constructor):n.apply(e,S))}function X2e(e,n){if(n&&(LT(n)==="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return W2e(e)}function W2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eK(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eK=function(){return!!e})()}function LP(e){return LP=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},LP(e)}function Y2e(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&_7(e,n)}function _7(e,n){return _7=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,re){return L.__proto__=re,L},_7(e,n)}function RT(e){return K2e(e)||$2e(e)||tK(e)||Z2e()}function Z2e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tK(e,n){if(e){if(typeof e=="string")return x7(e,n);var S=Object.prototype.toString.call(e).slice(8,-1);if(S==="Object"&&e.constructor&&(S=e.constructor.name),S==="Map"||S==="Set")return Array.from(e);if(S==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(S))return x7(e,n)}}function $2e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function K2e(e){if(Array.isArray(e))return x7(e)}function x7(e,n){(n==null||n>e.length)&&(n=e.length);for(var S=0,L=new Array(n);S<n;S++)L[S]=e[S];return L}function jX(e,n){var S=Object.keys(e);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(e);n&&(L=L.filter(function(re){return Object.getOwnPropertyDescriptor(e,re).enumerable})),S.push.apply(S,L)}return S}function To(e){for(var n=1;n<arguments.length;n++){var S=arguments[n]!=null?arguments[n]:{};n%2?jX(Object(S),!0).forEach(function(L){fu(e,L,S[L])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(S)):jX(Object(S)).forEach(function(L){Object.defineProperty(e,L,Object.getOwnPropertyDescriptor(S,L))})}return e}function fu(e,n,S){return n=rK(n),n in e?Object.defineProperty(e,n,{value:S,enumerable:!0,configurable:!0,writable:!0}):e[n]=S,e}function rK(e){var n=J2e(e,"string");return LT(n)=="symbol"?n:n+""}function J2e(e,n){if(LT(e)!="object"||!e)return e;var S=e[Symbol.toPrimitive];if(S!==void 0){var L=S.call(e,n);if(LT(L)!="object")return L;throw new TypeError("@@toPrimitive must return a primitive value.")}return(n==="string"?String:Number)(e)}var Q2e={xAxis:["bottom","top"],yAxis:["left","right"]},e3e={width:"100%",height:"100%"},nK={x:0,y:0};function Ek(e){return e}var t3e=function(n,S){return S==="horizontal"?n.x:S==="vertical"?n.y:S==="centric"?n.angle:n.radius},r3e=function(n,S,L,re){var ve=S.find(function(vt){return vt&&vt.index===L});if(ve){if(n==="horizontal")return{x:ve.coordinate,y:re.y};if(n==="vertical")return{x:re.x,y:ve.coordinate};if(n==="centric"){var Ce=ve.coordinate,Be=re.radius;return To(To(To({},re),lp(re.cx,re.cy,Be,Ce)),{},{angle:Ce,radius:Be})}var Xe=ve.coordinate,Ke=re.angle;return To(To(To({},re),lp(re.cx,re.cy,Xe,Ke)),{},{angle:Ke,radius:Xe})}return nK},mL=function(n,S){var L=S.graphicalItems,re=S.dataStartIndex,ve=S.dataEndIndex,Ce=(L??[]).reduce(function(Be,Xe){var Ke=Xe.props.data;return Ke&&Ke.length?[].concat(RT(Be),RT(Ke)):Be},[]);return Ce.length>0?Ce:n&&n.length&&gs(re)&&gs(ve)?n.slice(re,ve+1):[]};function aK(e){return e==="number"?[0,"auto"]:void 0}var b7=function(n,S,L,re){var ve=n.graphicalItems,Ce=n.tooltipAxis,Be=mL(S,n);return L<0||!ve||!ve.length||L>=Be.length?null:ve.reduce(function(Xe,Ke){var vt,yt=(vt=Ke.props.data)!==null&&vt!==void 0?vt:S;yt&&n.dataStartIndex+n.dataEndIndex!==0&&n.dataEndIndex-n.dataStartIndex>=L&&(yt=yt.slice(n.dataStartIndex,n.dataEndIndex+1));var Gt;if(Ce.dataKey&&!Ce.allowDuplicatedCategory){var $t=yt===void 0?Be:yt;Gt=Dk($t,Ce.dataKey,re)}else Gt=yt&&yt[L]||Be[L];return Gt?[].concat(RT(Xe),[YZ(Ke,Gt)]):Xe},[])},UX=function(n,S,L,re){var ve=re||{x:n.chartX,y:n.chartY},Ce=t3e(ve,L),Be=n.orderedTooltipTicks,Xe=n.tooltipAxis,Ke=n.tooltipTicks,vt=q0e(Ce,Be,Ke,Xe);if(vt>=0&&Ke){var yt=Ke[vt]&&Ke[vt].value,Gt=b7(n,S,vt,yt),$t=r3e(L,Be,vt,ve);return{activeTooltipIndex:vt,activeLabel:yt,activePayload:Gt,activeCoordinate:$t}}return null},n3e=function(n,S){var L=S.axes,re=S.graphicalItems,ve=S.axisType,Ce=S.axisIdKey,Be=S.stackGroups,Xe=S.dataStartIndex,Ke=S.dataEndIndex,vt=n.layout,yt=n.children,Gt=n.stackOffset,$t=GZ(vt,ve);return L.reduce(function(gr,sr){var nr,jr=sr.type.defaultProps!==void 0?To(To({},sr.type.defaultProps),sr.props):sr.props,Ne=jr.type,an=jr.dataKey,yn=jr.allowDataOverflow,Lr=jr.allowDuplicatedCategory,$r=jr.scale,dn=jr.ticks,Jn=jr.includeHidden,xn=jr[Ce];if(gr[xn])return gr;var Na=mL(n.data,{graphicalItems:re.filter(function(_a){var Li,so=Ce in _a.props?_a.props[Ce]:(Li=_a.type.defaultProps)===null||Li===void 0?void 0:Li[Ce];return so===xn}),dataStartIndex:Xe,dataEndIndex:Ke}),zn=Na.length,ta,qa,la;k2e(jr.domain,yn,Ne)&&(ta=Oz(jr.domain,null,yn),$t&&(Ne==="number"||$r!=="auto")&&(la=Z5(Na,an,"category")));var ja=aK(Ne);if(!ta||ta.length===0){var pa,Ra=(pa=jr.domain)!==null&&pa!==void 0?pa:ja;if(an){if(ta=Z5(Na,an,Ne),Ne==="category"&&$t){var vi=Iue(ta);Lr&&vi?(qa=ta,ta=pP(0,zn)):Lr||(ta=YH(Ra,ta,sr).reduce(function(_a,Li){return _a.indexOf(Li)>=0?_a:[].concat(RT(_a),[Li])},[]))}else if(Ne==="category")Lr?ta=ta.filter(function(_a){return _a!==""&&!Mu(_a)}):ta=YH(Ra,ta,sr).reduce(function(_a,Li){return _a.indexOf(Li)>=0||Li===""||Mu(Li)?_a:[].concat(RT(_a),[Li])},[]);else if(Ne==="number"){var Pi=W0e(Na,re.filter(function(_a){var Li,so,Ro=Ce in _a.props?_a.props[Ce]:(Li=_a.type.defaultProps)===null||Li===void 0?void 0:Li[Ce],co="hide"in _a.props?_a.props.hide:(so=_a.type.defaultProps)===null||so===void 0?void 0:so.hide;return Ro===xn&&(Jn||!co)}),an,ve,vt);Pi&&(ta=Pi)}$t&&(Ne==="number"||$r!=="auto")&&(la=Z5(Na,an,"category"))}else $t?ta=pP(0,zn):Be&&Be[xn]&&Be[xn].hasStack&&Ne==="number"?ta=Gt==="expand"?[0,1]:WZ(Be[xn].stackGroups,Xe,Ke):ta=HZ(Na,re.filter(function(_a){var Li=Ce in _a.props?_a.props[Ce]:_a.type.defaultProps[Ce],so="hide"in _a.props?_a.props.hide:_a.type.defaultProps.hide;return Li===xn&&(Jn||!so)}),Ne,vt,!0);if(Ne==="number")ta=g7(yt,ta,xn,ve,dn),Ra&&(ta=Oz(Ra,ta,yn));else if(Ne==="category"&&Ra){var Eo=Ra,ma=ta.every(function(_a){return Eo.indexOf(_a)>=0});ma&&(ta=Eo)}}return To(To({},gr),{},fu({},xn,To(To({},jr),{},{axisType:ve,domain:ta,categoricalDomain:la,duplicateDomain:qa,originalDomain:(nr=jr.domain)!==null&&nr!==void 0?nr:ja,isCategorical:$t,layout:vt})))},{})},a3e=function(n,S){var L=S.graphicalItems,re=S.Axis,ve=S.axisType,Ce=S.axisIdKey,Be=S.stackGroups,Xe=S.dataStartIndex,Ke=S.dataEndIndex,vt=n.layout,yt=n.children,Gt=mL(n.data,{graphicalItems:L,dataStartIndex:Xe,dataEndIndex:Ke}),$t=Gt.length,gr=GZ(vt,ve),sr=-1;return L.reduce(function(nr,jr){var Ne=jr.type.defaultProps!==void 0?To(To({},jr.type.defaultProps),jr.props):jr.props,an=Ne[Ce],yn=aK("number");if(!nr[an]){sr++;var Lr;return gr?Lr=pP(0,$t):Be&&Be[an]&&Be[an].hasStack?(Lr=WZ(Be[an].stackGroups,Xe,Ke),Lr=g7(yt,Lr,an,ve)):(Lr=Oz(yn,HZ(Gt,L.filter(function($r){var dn,Jn,xn=Ce in $r.props?$r.props[Ce]:(dn=$r.type.defaultProps)===null||dn===void 0?void 0:dn[Ce],Na="hide"in $r.props?$r.props.hide:(Jn=$r.type.defaultProps)===null||Jn===void 0?void 0:Jn.hide;return xn===an&&!Na}),"number",vt),re.defaultProps.allowDataOverflow),Lr=g7(yt,Lr,an,ve)),To(To({},nr),{},fu({},an,To(To({axisType:ve},re.defaultProps),{},{hide:!0,orientation:C0(Q2e,"".concat(ve,".").concat(sr%2),null),domain:Lr,originalDomain:yn,isCategorical:gr,layout:vt})))}return nr},{})},i3e=function(n,S){var L=S.axisType,re=L===void 0?"xAxis":L,ve=S.AxisComp,Ce=S.graphicalItems,Be=S.stackGroups,Xe=S.dataStartIndex,Ke=S.dataEndIndex,vt=n.children,yt="".concat(re,"Id"),Gt=bm(vt,ve),$t={};return Gt&&Gt.length?$t=n3e(n,{axes:Gt,graphicalItems:Ce,axisType:re,axisIdKey:yt,stackGroups:Be,dataStartIndex:Xe,dataEndIndex:Ke}):Ce&&Ce.length&&($t=a3e(n,{Axis:ve,graphicalItems:Ce,axisType:re,axisIdKey:yt,stackGroups:Be,dataStartIndex:Xe,dataEndIndex:Ke})),$t},o3e=function(n){var S=nx(n),L=x1(S,!1,!0);return{tooltipTicks:L,orderedTooltipTicks:e9(L,function(re){return re.coordinate}),tooltipAxis:S,tooltipAxisBandSize:oP(S,L)}},qX=function(n){var S=n.children,L=n.defaultShowTooltip,re=Jm(S,_T),ve=0,Ce=0;return n.data&&n.data.length!==0&&(Ce=n.data.length-1),re&&re.props&&(re.props.startIndex>=0&&(ve=re.props.startIndex),re.props.endIndex>=0&&(Ce=re.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:ve,dataEndIndex:Ce,activeTooltipIndex:-1,isTooltipActive:!!L}},s3e=function(n){return!n||!n.length?!1:n.some(function(S){var L=b1(S&&S.type);return L&&L.indexOf("Bar")>=0})},VX=function(n){return n==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:n==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:n==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},l3e=function(n,S){var L=n.props,re=n.graphicalItems,ve=n.xAxisMap,Ce=ve===void 0?{}:ve,Be=n.yAxisMap,Xe=Be===void 0?{}:Be,Ke=L.width,vt=L.height,yt=L.children,Gt=L.margin||{},$t=Jm(yt,_T),gr=Jm(yt,dg),sr=Object.keys(Xe).reduce(function(Lr,$r){var dn=Xe[$r],Jn=dn.orientation;return!dn.mirror&&!dn.hide?To(To({},Lr),{},fu({},Jn,Lr[Jn]+dn.width)):Lr},{left:Gt.left||0,right:Gt.right||0}),nr=Object.keys(Ce).reduce(function(Lr,$r){var dn=Ce[$r],Jn=dn.orientation;return!dn.mirror&&!dn.hide?To(To({},Lr),{},fu({},Jn,C0(Lr,"".concat(Jn))+dn.height)):Lr},{top:Gt.top||0,bottom:Gt.bottom||0}),jr=To(To({},nr),sr),Ne=jr.bottom;$t&&(jr.bottom+=$t.props.height||_T.defaultProps.height),gr&&S&&(jr=G0e(jr,re,L,S));var an=Ke-jr.left-jr.right,yn=vt-jr.top-jr.bottom;return To(To({brushBottom:Ne},jr),{},{width:Math.max(an,0),height:Math.max(yn,0)})},u3e=function(n,S){if(S==="xAxis")return n[S].width;if(S==="yAxis")return n[S].height},iK=function(n){var S=n.chartName,L=n.GraphicalChild,re=n.defaultTooltipEventType,ve=re===void 0?"axis":re,Ce=n.validateTooltipEventTypes,Be=Ce===void 0?["axis"]:Ce,Xe=n.axisComponents,Ke=n.legendContent,vt=n.formatAxisMap,yt=n.defaultProps,Gt=function(jr,Ne){var an=Ne.graphicalItems,yn=Ne.stackGroups,Lr=Ne.offset,$r=Ne.updateId,dn=Ne.dataStartIndex,Jn=Ne.dataEndIndex,xn=jr.barSize,Na=jr.layout,zn=jr.barGap,ta=jr.barCategoryGap,qa=jr.maxBarSize,la=VX(Na),ja=la.numericAxisName,pa=la.cateAxisName,Ra=s3e(an),vi=[];return an.forEach(function(Pi,Eo){var ma=mL(jr.data,{graphicalItems:[Pi],dataStartIndex:dn,dataEndIndex:Jn}),_a=Pi.type.defaultProps!==void 0?To(To({},Pi.type.defaultProps),Pi.props):Pi.props,Li=_a.dataKey,so=_a.maxBarSize,Ro=_a["".concat(ja,"Id")],co=_a["".concat(pa,"Id")],$o={},$u=Xe.reduce(function(Id,Bp){var jp=Ne["".concat(Bp.axisType,"Map")],nv=_a["".concat(Bp.axisType,"Id")];jp&&jp[nv]||Bp.axisType==="zAxis"||gw();var P1=jp[nv];return To(To({},Id),{},fu(fu({},Bp.axisType,P1),"".concat(Bp.axisType,"Ticks"),x1(P1)))},$o),Bo=$u[pa],Ml=$u["".concat(pa,"Ticks")],ns=yn&&yn[Ro]&&yn[Ro].hasStack&&iye(Pi,yn[Ro].stackGroups),Do=b1(Pi.type).indexOf("Bar")>=0,lu=oP(Bo,Ml),io=[],$c=Ra&&V0e({barSize:xn,stackGroups:yn,totalSize:u3e($u,pa)});if(Do){var sf,rv,gd=Mu(so)?qa:so,Fp=(sf=(rv=oP(Bo,Ml,!0))!==null&&rv!==void 0?rv:gd)!==null&&sf!==void 0?sf:0;io=H0e({barGap:zn,barCategoryGap:ta,bandSize:Fp!==lu?Fp:lu,sizeList:$c[co],maxBarSize:gd}),Fp!==lu&&(io=io.map(function(Id){return To(To({},Id),{},{position:To(To({},Id.position),{},{offset:Id.position.offset-Fp/2})})}))}var yv=Pi&&Pi.type&&Pi.type.getComposedData;yv&&vi.push({props:To(To({},yv(To(To({},$u),{},{displayedData:ma,props:jr,dataKey:Li,item:Pi,bandSize:lu,barPosition:io,offset:Lr,stackedData:ns,layout:Na,dataStartIndex:dn,dataEndIndex:Jn}))),{},fu(fu(fu({key:Pi.key||"item-".concat(Eo)},ja,$u[ja]),pa,$u[pa]),"animationId",$r)),childIndex:Xue(Pi,jr.children),item:Pi})}),vi},$t=function(jr,Ne){var an=jr.props,yn=jr.dataStartIndex,Lr=jr.dataEndIndex,$r=jr.updateId;if(!uU({props:an}))return null;var dn=an.children,Jn=an.layout,xn=an.stackOffset,Na=an.data,zn=an.reverseStackOrder,ta=VX(Jn),qa=ta.numericAxisName,la=ta.cateAxisName,ja=bm(dn,L),pa=rye(Na,ja,"".concat(qa,"Id"),"".concat(la,"Id"),xn,zn),Ra=Xe.reduce(function(_a,Li){var so="".concat(Li.axisType,"Map");return To(To({},_a),{},fu({},so,i3e(an,To(To({},Li),{},{graphicalItems:ja,stackGroups:Li.axisType===qa&&pa,dataStartIndex:yn,dataEndIndex:Lr}))))},{}),vi=l3e(To(To({},Ra),{},{props:an,graphicalItems:ja}),Ne?.legendBBox);Object.keys(Ra).forEach(function(_a){Ra[_a]=vt(an,Ra[_a],vi,_a.replace("Map",""),S)});var Pi=Ra["".concat(la,"Map")],Eo=o3e(Pi),ma=Gt(an,To(To({},Ra),{},{dataStartIndex:yn,dataEndIndex:Lr,updateId:$r,graphicalItems:ja,stackGroups:pa,offset:vi}));return To(To({formattedGraphicalItems:ma,graphicalItems:ja,offset:vi,stackGroups:pa},Eo),Ra)},gr=(function(nr){function jr(Ne){var an,yn,Lr;return q2e(this,jr),Lr=G2e(this,jr,[Ne]),fu(Lr,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),fu(Lr,"accessibilityManager",new C2e),fu(Lr,"handleLegendBBoxUpdate",function($r){if($r){var dn=Lr.state,Jn=dn.dataStartIndex,xn=dn.dataEndIndex,Na=dn.updateId;Lr.setState(To({legendBBox:$r},$t({props:Lr.props,dataStartIndex:Jn,dataEndIndex:xn,updateId:Na},To(To({},Lr.state),{},{legendBBox:$r}))))}}),fu(Lr,"handleReceiveSyncEvent",function($r,dn,Jn){if(Lr.props.syncId===$r){if(Jn===Lr.eventEmitterSymbol&&typeof Lr.props.syncMethod!="function")return;Lr.applySyncEvent(dn)}}),fu(Lr,"handleBrushChange",function($r){var dn=$r.startIndex,Jn=$r.endIndex;if(dn!==Lr.state.dataStartIndex||Jn!==Lr.state.dataEndIndex){var xn=Lr.state.updateId;Lr.setState(function(){return To({dataStartIndex:dn,dataEndIndex:Jn},$t({props:Lr.props,dataStartIndex:dn,dataEndIndex:Jn,updateId:xn},Lr.state))}),Lr.triggerSyncEvent({dataStartIndex:dn,dataEndIndex:Jn})}}),fu(Lr,"handleMouseEnter",function($r){var dn=Lr.getMouseInfo($r);if(dn){var Jn=To(To({},dn),{},{isTooltipActive:!0});Lr.setState(Jn),Lr.triggerSyncEvent(Jn);var xn=Lr.props.onMouseEnter;Fu(xn)&&xn(Jn,$r)}}),fu(Lr,"triggeredAfterMouseMove",function($r){var dn=Lr.getMouseInfo($r),Jn=dn?To(To({},dn),{},{isTooltipActive:!0}):{isTooltipActive:!1};Lr.setState(Jn),Lr.triggerSyncEvent(Jn);var xn=Lr.props.onMouseMove;Fu(xn)&&xn(Jn,$r)}),fu(Lr,"handleItemMouseEnter",function($r){Lr.setState(function(){return{isTooltipActive:!0,activeItem:$r,activePayload:$r.tooltipPayload,activeCoordinate:$r.tooltipPosition||{x:$r.cx,y:$r.cy}}})}),fu(Lr,"handleItemMouseLeave",function(){Lr.setState(function(){return{isTooltipActive:!1}})}),fu(Lr,"handleMouseMove",function($r){$r.persist(),Lr.throttleTriggeredAfterMouseMove($r)}),fu(Lr,"handleMouseLeave",function($r){Lr.throttleTriggeredAfterMouseMove.cancel();var dn={isTooltipActive:!1};Lr.setState(dn),Lr.triggerSyncEvent(dn);var Jn=Lr.props.onMouseLeave;Fu(Jn)&&Jn(dn,$r)}),fu(Lr,"handleOuterEvent",function($r){var dn=Gue($r),Jn=C0(Lr.props,"".concat(dn));if(dn&&Fu(Jn)){var xn,Na;/.*touch.*/i.test(dn)?Na=Lr.getMouseInfo($r.changedTouches[0]):Na=Lr.getMouseInfo($r),Jn((xn=Na)!==null&&xn!==void 0?xn:{},$r)}}),fu(Lr,"handleClick",function($r){var dn=Lr.getMouseInfo($r);if(dn){var Jn=To(To({},dn),{},{isTooltipActive:!0});Lr.setState(Jn),Lr.triggerSyncEvent(Jn);var xn=Lr.props.onClick;Fu(xn)&&xn(Jn,$r)}}),fu(Lr,"handleMouseDown",function($r){var dn=Lr.props.onMouseDown;if(Fu(dn)){var Jn=Lr.getMouseInfo($r);dn(Jn,$r)}}),fu(Lr,"handleMouseUp",function($r){var dn=Lr.props.onMouseUp;if(Fu(dn)){var Jn=Lr.getMouseInfo($r);dn(Jn,$r)}}),fu(Lr,"handleTouchMove",function($r){$r.changedTouches!=null&&$r.changedTouches.length>0&&Lr.throttleTriggeredAfterMouseMove($r.changedTouches[0])}),fu(Lr,"handleTouchStart",function($r){$r.changedTouches!=null&&$r.changedTouches.length>0&&Lr.handleMouseDown($r.changedTouches[0])}),fu(Lr,"handleTouchEnd",function($r){$r.changedTouches!=null&&$r.changedTouches.length>0&&Lr.handleMouseUp($r.changedTouches[0])}),fu(Lr,"handleDoubleClick",function($r){var dn=Lr.props.onDoubleClick;if(Fu(dn)){var Jn=Lr.getMouseInfo($r);dn(Jn,$r)}}),fu(Lr,"handleContextMenu",function($r){var dn=Lr.props.onContextMenu;if(Fu(dn)){var Jn=Lr.getMouseInfo($r);dn(Jn,$r)}}),fu(Lr,"triggerSyncEvent",function($r){Lr.props.syncId!==void 0&&BO.emit(jO,Lr.props.syncId,$r,Lr.eventEmitterSymbol)}),fu(Lr,"applySyncEvent",function($r){var dn=Lr.props,Jn=dn.layout,xn=dn.syncMethod,Na=Lr.state.updateId,zn=$r.dataStartIndex,ta=$r.dataEndIndex;if($r.dataStartIndex!==void 0||$r.dataEndIndex!==void 0)Lr.setState(To({dataStartIndex:zn,dataEndIndex:ta},$t({props:Lr.props,dataStartIndex:zn,dataEndIndex:ta,updateId:Na},Lr.state)));else if($r.activeTooltipIndex!==void 0){var qa=$r.chartX,la=$r.chartY,ja=$r.activeTooltipIndex,pa=Lr.state,Ra=pa.offset,vi=pa.tooltipTicks;if(!Ra)return;if(typeof xn=="function")ja=xn(vi,$r);else if(xn==="value"){ja=-1;for(var Pi=0;Pi<vi.length;Pi++)if(vi[Pi].value===$r.activeLabel){ja=Pi;break}}var Eo=To(To({},Ra),{},{x:Ra.left,y:Ra.top}),ma=Math.min(qa,Eo.x+Eo.width),_a=Math.min(la,Eo.y+Eo.height),Li=vi[ja]&&vi[ja].value,so=b7(Lr.state,Lr.props.data,ja),Ro=vi[ja]?{x:Jn==="horizontal"?vi[ja].coordinate:ma,y:Jn==="horizontal"?_a:vi[ja].coordinate}:nK;Lr.setState(To(To({},$r),{},{activeLabel:Li,activeCoordinate:Ro,activePayload:so,activeTooltipIndex:ja}))}else Lr.setState($r)}),fu(Lr,"renderCursor",function($r){var dn,Jn=Lr.state,xn=Jn.isTooltipActive,Na=Jn.activeCoordinate,zn=Jn.activePayload,ta=Jn.offset,qa=Jn.activeTooltipIndex,la=Jn.tooltipAxisBandSize,ja=Lr.getTooltipEventType(),pa=(dn=$r.props.active)!==null&&dn!==void 0?dn:xn,Ra=Lr.props.layout,vi=$r.key||"_recharts-cursor";return aa.createElement(O2e,{key:vi,activeCoordinate:Na,activePayload:zn,activeTooltipIndex:qa,chartName:S,element:$r,isActive:pa,layout:Ra,offset:ta,tooltipAxisBandSize:la,tooltipEventType:ja})}),fu(Lr,"renderPolarAxis",function($r,dn,Jn){var xn=C0($r,"type.axisType"),Na=C0(Lr.state,"".concat(xn,"Map")),zn=$r.type.defaultProps,ta=zn!==void 0?To(To({},zn),$r.props):$r.props,qa=Na&&Na[ta["".concat(xn,"Id")]];return Ua.cloneElement($r,To(To({},qa),{},{className:Ec(xn,qa.className),key:$r.key||"".concat(dn,"-").concat(Jn),ticks:x1(qa,!0)}))}),fu(Lr,"renderPolarGrid",function($r){var dn=$r.props,Jn=dn.radialLines,xn=dn.polarAngles,Na=dn.polarRadius,zn=Lr.state,ta=zn.radiusAxisMap,qa=zn.angleAxisMap,la=nx(ta),ja=nx(qa),pa=ja.cx,Ra=ja.cy,vi=ja.innerRadius,Pi=ja.outerRadius;return Ua.cloneElement($r,{polarAngles:Array.isArray(xn)?xn:x1(ja,!0).map(function(Eo){return Eo.coordinate}),polarRadius:Array.isArray(Na)?Na:x1(la,!0).map(function(Eo){return Eo.coordinate}),cx:pa,cy:Ra,innerRadius:vi,outerRadius:Pi,key:$r.key||"polar-grid",radialLines:Jn})}),fu(Lr,"renderLegend",function(){var $r=Lr.state.formattedGraphicalItems,dn=Lr.props,Jn=dn.children,xn=dn.width,Na=dn.height,zn=Lr.props.margin||{},ta=xn-(zn.left||0)-(zn.right||0),qa=qZ({children:Jn,formattedGraphicalItems:$r,legendWidth:ta,legendContent:Ke});if(!qa)return null;var la=qa.item,ja=BX(qa,z2e);return Ua.cloneElement(la,To(To({},ja),{},{chartWidth:xn,chartHeight:Na,margin:zn,onBBoxUpdate:Lr.handleLegendBBoxUpdate}))}),fu(Lr,"renderTooltip",function(){var $r,dn=Lr.props,Jn=dn.children,xn=dn.accessibilityLayer,Na=Jm(Jn,Qm);if(!Na)return null;var zn=Lr.state,ta=zn.isTooltipActive,qa=zn.activeCoordinate,la=zn.activePayload,ja=zn.activeLabel,pa=zn.offset,Ra=($r=Na.props.active)!==null&&$r!==void 0?$r:ta;return Ua.cloneElement(Na,{viewBox:To(To({},pa),{},{x:pa.left,y:pa.top}),active:Ra,label:ja,payload:Ra?la:[],coordinate:qa,accessibilityLayer:xn})}),fu(Lr,"renderBrush",function($r){var dn=Lr.props,Jn=dn.margin,xn=dn.data,Na=Lr.state,zn=Na.offset,ta=Na.dataStartIndex,qa=Na.dataEndIndex,la=Na.updateId;return Ua.cloneElement($r,{key:$r.key||"_recharts-brush",onChange:bk(Lr.handleBrushChange,$r.props.onChange),data:xn,x:gs($r.props.x)?$r.props.x:zn.left,y:gs($r.props.y)?$r.props.y:zn.top+zn.height+zn.brushBottom-(Jn.bottom||0),width:gs($r.props.width)?$r.props.width:zn.width,startIndex:ta,endIndex:qa,updateId:"brush-".concat(la)})}),fu(Lr,"renderReferenceElement",function($r,dn,Jn){if(!$r)return null;var xn=Lr,Na=xn.clipPathId,zn=Lr.state,ta=zn.xAxisMap,qa=zn.yAxisMap,la=zn.offset,ja=$r.type.defaultProps||{},pa=$r.props,Ra=pa.xAxisId,vi=Ra===void 0?ja.xAxisId:Ra,Pi=pa.yAxisId,Eo=Pi===void 0?ja.yAxisId:Pi;return Ua.cloneElement($r,{key:$r.key||"".concat(dn,"-").concat(Jn),xAxis:ta[vi],yAxis:qa[Eo],viewBox:{x:la.left,y:la.top,width:la.width,height:la.height},clipPathId:Na})}),fu(Lr,"renderActivePoints",function($r){var dn=$r.item,Jn=$r.activePoint,xn=$r.basePoint,Na=$r.childIndex,zn=$r.isRange,ta=[],qa=dn.props.key,la=dn.item.type.defaultProps!==void 0?To(To({},dn.item.type.defaultProps),dn.item.props):dn.item.props,ja=la.activeDot,pa=la.dataKey,Ra=To(To({index:Na,dataKey:pa,cx:Jn.x,cy:Jn.y,r:4,fill:M9(dn.item),strokeWidth:2,stroke:"#fff",payload:Jn.payload,value:Jn.value},Iu(ja,!1)),Ok(ja));return ta.push(jr.renderActiveDot(ja,Ra,"".concat(qa,"-activePoint-").concat(Na))),xn?ta.push(jr.renderActiveDot(ja,To(To({},Ra),{},{cx:xn.x,cy:xn.y}),"".concat(qa,"-basePoint-").concat(Na))):zn&&ta.push(null),ta}),fu(Lr,"renderGraphicChild",function($r,dn,Jn){var xn=Lr.filterFormatItem($r,dn,Jn);if(!xn)return null;var Na=Lr.getTooltipEventType(),zn=Lr.state,ta=zn.isTooltipActive,qa=zn.tooltipAxis,la=zn.activeTooltipIndex,ja=zn.activeLabel,pa=Lr.props.children,Ra=Jm(pa,Qm),vi=xn.props,Pi=vi.points,Eo=vi.isRange,ma=vi.baseLine,_a=xn.item.type.defaultProps!==void 0?To(To({},xn.item.type.defaultProps),xn.item.props):xn.item.props,Li=_a.activeDot,so=_a.hide,Ro=_a.activeBar,co=_a.activeShape,$o=!!(!so&&ta&&Ra&&(Li||Ro||co)),$u={};Na!=="axis"&&Ra&&Ra.props.trigger==="click"?$u={onClick:bk(Lr.handleItemMouseEnter,$r.props.onClick)}:Na!=="axis"&&($u={onMouseLeave:bk(Lr.handleItemMouseLeave,$r.props.onMouseLeave),onMouseEnter:bk(Lr.handleItemMouseEnter,$r.props.onMouseEnter)});var Bo=Ua.cloneElement($r,To(To({},xn.props),$u));function Ml(Bp){return typeof qa.dataKey=="function"?qa.dataKey(Bp.payload):null}if($o)if(la>=0){var ns,Do;if(qa.dataKey&&!qa.allowDuplicatedCategory){var lu=typeof qa.dataKey=="function"?Ml:"payload.".concat(qa.dataKey.toString());ns=Dk(Pi,lu,ja),Do=Eo&&ma&&Dk(ma,lu,ja)}else ns=Pi?.[la],Do=Eo&&ma&&ma[la];if(co||Ro){var io=$r.props.activeIndex!==void 0?$r.props.activeIndex:la;return[Ua.cloneElement($r,To(To(To({},xn.props),$u),{},{activeIndex:io})),null,null]}if(!Mu(ns))return[Bo].concat(RT(Lr.renderActivePoints({item:xn,activePoint:ns,basePoint:Do,childIndex:la,isRange:Eo})))}else{var $c,sf=($c=Lr.getItemByXY(Lr.state.activeCoordinate))!==null&&$c!==void 0?$c:{graphicalItem:Bo},rv=sf.graphicalItem,gd=rv.item,Fp=gd===void 0?$r:gd,yv=rv.childIndex,Id=To(To(To({},xn.props),$u),{},{activeIndex:yv});return[Ua.cloneElement(Fp,Id),null,null]}return Eo?[Bo,null,null]:[Bo,null]}),fu(Lr,"renderCustomized",function($r,dn,Jn){return Ua.cloneElement($r,To(To({key:"recharts-customized-".concat(Jn)},Lr.props),Lr.state))}),fu(Lr,"renderMap",{CartesianGrid:{handler:Ek,once:!0},ReferenceArea:{handler:Lr.renderReferenceElement},ReferenceLine:{handler:Ek},ReferenceDot:{handler:Lr.renderReferenceElement},XAxis:{handler:Ek},YAxis:{handler:Ek},Brush:{handler:Lr.renderBrush,once:!0},Bar:{handler:Lr.renderGraphicChild},Line:{handler:Lr.renderGraphicChild},Area:{handler:Lr.renderGraphicChild},Radar:{handler:Lr.renderGraphicChild},RadialBar:{handler:Lr.renderGraphicChild},Scatter:{handler:Lr.renderGraphicChild},Pie:{handler:Lr.renderGraphicChild},Funnel:{handler:Lr.renderGraphicChild},Tooltip:{handler:Lr.renderCursor,once:!0},PolarGrid:{handler:Lr.renderPolarGrid,once:!0},PolarAngleAxis:{handler:Lr.renderPolarAxis},PolarRadiusAxis:{handler:Lr.renderPolarAxis},Customized:{handler:Lr.renderCustomized}}),Lr.clipPathId="".concat((an=Ne.id)!==null&&an!==void 0?an:bw("recharts"),"-clip"),Lr.throttleTriggeredAfterMouseMove=qY(Lr.triggeredAfterMouseMove,(yn=Ne.throttleDelay)!==null&&yn!==void 0?yn:1e3/60),Lr.state={},Lr}return Y2e(jr,nr),H2e(jr,[{key:"componentDidMount",value:function(){var an,yn;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(an=this.props.margin.left)!==null&&an!==void 0?an:0,top:(yn=this.props.margin.top)!==null&&yn!==void 0?yn:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var an=this.props,yn=an.children,Lr=an.data,$r=an.height,dn=an.layout,Jn=Jm(yn,Qm);if(Jn){var xn=Jn.props.defaultIndex;if(!(typeof xn!="number"||xn<0||xn>this.state.tooltipTicks.length-1)){var Na=this.state.tooltipTicks[xn]&&this.state.tooltipTicks[xn].value,zn=b7(this.state,Lr,xn,Na),ta=this.state.tooltipTicks[xn].coordinate,qa=(this.state.offset.top+$r)/2,la=dn==="horizontal",ja=la?{x:ta,y:qa}:{y:ta,x:qa},pa=this.state.formattedGraphicalItems.find(function(vi){var Pi=vi.item;return Pi.type.name==="Scatter"});pa&&(ja=To(To({},ja),pa.props.points[xn].tooltipPosition),zn=pa.props.points[xn].tooltipPayload);var Ra={activeTooltipIndex:xn,isTooltipActive:!0,activeLabel:Na,activePayload:zn,activeCoordinate:ja};this.setState(Ra),this.renderCursor(Jn),this.accessibilityManager.setIndex(xn)}}}},{key:"getSnapshotBeforeUpdate",value:function(an,yn){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==yn.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==an.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==an.margin){var Lr,$r;this.accessibilityManager.setDetails({offset:{left:(Lr=this.props.margin.left)!==null&&Lr!==void 0?Lr:0,top:($r=this.props.margin.top)!==null&&$r!==void 0?$r:0}})}return null}},{key:"componentDidUpdate",value:function(an){nz([Jm(an.children,Qm)],[Jm(this.props.children,Qm)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var an=Jm(this.props.children,Qm);if(an&&typeof an.props.shared=="boolean"){var yn=an.props.shared?"axis":"item";return Be.indexOf(yn)>=0?yn:ve}return ve}},{key:"getMouseInfo",value:function(an){if(!this.container)return null;var yn=this.container,Lr=yn.getBoundingClientRect(),$r=Rde(Lr),dn={chartX:Math.round(an.pageX-$r.left),chartY:Math.round(an.pageY-$r.top)},Jn=Lr.width/yn.offsetWidth||1,xn=this.inRange(dn.chartX,dn.chartY,Jn);if(!xn)return null;var Na=this.state,zn=Na.xAxisMap,ta=Na.yAxisMap,qa=this.getTooltipEventType(),la=UX(this.state,this.props.data,this.props.layout,xn);if(qa!=="axis"&&zn&&ta){var ja=nx(zn).scale,pa=nx(ta).scale,Ra=ja&&ja.invert?ja.invert(dn.chartX):null,vi=pa&&pa.invert?pa.invert(dn.chartY):null;return To(To({},dn),{},{xValue:Ra,yValue:vi},la)}return la?To(To({},dn),la):null}},{key:"inRange",value:function(an,yn){var Lr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,$r=this.props.layout,dn=an/Lr,Jn=yn/Lr;if($r==="horizontal"||$r==="vertical"){var xn=this.state.offset,Na=dn>=xn.left&&dn<=xn.left+xn.width&&Jn>=xn.top&&Jn<=xn.top+xn.height;return Na?{x:dn,y:Jn}:null}var zn=this.state,ta=zn.angleAxisMap,qa=zn.radiusAxisMap;if(ta&&qa){var la=nx(ta);return KH({x:dn,y:Jn},la)}return null}},{key:"parseEventsOfWrapper",value:function(){var an=this.props.children,yn=this.getTooltipEventType(),Lr=Jm(an,Qm),$r={};Lr&&yn==="axis"&&(Lr.props.trigger==="click"?$r={onClick:this.handleClick}:$r={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var dn=Ok(this.props,this.handleOuterEvent);return To(To({},dn),$r)}},{key:"addListener",value:function(){BO.on(jO,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){BO.removeListener(jO,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(an,yn,Lr){for(var $r=this.state.formattedGraphicalItems,dn=0,Jn=$r.length;dn<Jn;dn++){var xn=$r[dn];if(xn.item===an||xn.props.key===an.key||yn===b1(xn.item.type)&&Lr===xn.childIndex)return xn}return null}},{key:"renderClipPath",value:function(){var an=this.clipPathId,yn=this.state.offset,Lr=yn.left,$r=yn.top,dn=yn.height,Jn=yn.width;return aa.createElement("defs",null,aa.createElement("clipPath",{id:an},aa.createElement("rect",{x:Lr,y:$r,height:dn,width:Jn})))}},{key:"getXScales",value:function(){var an=this.state.xAxisMap;return an?Object.entries(an).reduce(function(yn,Lr){var $r=FX(Lr,2),dn=$r[0],Jn=$r[1];return To(To({},yn),{},fu({},dn,Jn.scale))},{}):null}},{key:"getYScales",value:function(){var an=this.state.yAxisMap;return an?Object.entries(an).reduce(function(yn,Lr){var $r=FX(Lr,2),dn=$r[0],Jn=$r[1];return To(To({},yn),{},fu({},dn,Jn.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(an){var yn;return(yn=this.state.xAxisMap)===null||yn===void 0||(yn=yn[an])===null||yn===void 0?void 0:yn.scale}},{key:"getYScaleByAxisId",value:function(an){var yn;return(yn=this.state.yAxisMap)===null||yn===void 0||(yn=yn[an])===null||yn===void 0?void 0:yn.scale}},{key:"getItemByXY",value:function(an){var yn=this.state,Lr=yn.formattedGraphicalItems,$r=yn.activeItem;if(Lr&&Lr.length)for(var dn=0,Jn=Lr.length;dn<Jn;dn++){var xn=Lr[dn],Na=xn.props,zn=xn.item,ta=zn.type.defaultProps!==void 0?To(To({},zn.type.defaultProps),zn.props):zn.props,qa=b1(zn.type);if(qa==="Bar"){var la=(Na.data||[]).find(function(vi){return Z1e(an,vi)});if(la)return{graphicalItem:xn,payload:la}}else if(qa==="RadialBar"){var ja=(Na.data||[]).find(function(vi){return KH(an,vi)});if(ja)return{graphicalItem:xn,payload:ja}}else if(lL(xn,$r)||uL(xn,$r)||PE(xn,$r)){var pa=F_e({graphicalItem:xn,activeTooltipItem:$r,itemData:ta.data}),Ra=ta.activeIndex===void 0?pa:ta.activeIndex;return{graphicalItem:To(To({},xn),{},{childIndex:Ra}),payload:PE(xn,$r)?ta.data[pa]:xn.props.data[pa]}}}return null}},{key:"render",value:function(){var an=this;if(!uU(this))return null;var yn=this.props,Lr=yn.children,$r=yn.className,dn=yn.width,Jn=yn.height,xn=yn.style,Na=yn.compact,zn=yn.title,ta=yn.desc,qa=BX(yn,N2e),la=Iu(qa,!1);if(Na)return aa.createElement(pX,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},aa.createElement(iz,rT({},la,{width:dn,height:Jn,title:zn,desc:ta}),this.renderClipPath(),fU(Lr,this.renderMap)));if(this.props.accessibilityLayer){var ja,pa;la.tabIndex=(ja=this.props.tabIndex)!==null&&ja!==void 0?ja:0,la.role=(pa=this.props.role)!==null&&pa!==void 0?pa:"application",la.onKeyDown=function(vi){an.accessibilityManager.keyboardEvent(vi)},la.onFocus=function(){an.accessibilityManager.focus()}}var Ra=this.parseEventsOfWrapper();return aa.createElement(pX,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},aa.createElement("div",rT({className:Ec("recharts-wrapper",$r),style:To({position:"relative",cursor:"default",width:dn,height:Jn},xn)},Ra,{ref:function(Pi){an.container=Pi}}),aa.createElement(iz,rT({},la,{width:dn,height:Jn,title:zn,desc:ta,style:e3e}),this.renderClipPath(),fU(Lr,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(Ua.Component);fu(gr,"displayName",S),fu(gr,"defaultProps",To({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},yt)),fu(gr,"getDerivedStateFromProps",function(nr,jr){var Ne=nr.dataKey,an=nr.data,yn=nr.children,Lr=nr.width,$r=nr.height,dn=nr.layout,Jn=nr.stackOffset,xn=nr.margin,Na=jr.dataStartIndex,zn=jr.dataEndIndex;if(jr.updateId===void 0){var ta=qX(nr);return To(To(To({},ta),{},{updateId:0},$t(To(To({props:nr},ta),{},{updateId:0}),jr)),{},{prevDataKey:Ne,prevData:an,prevWidth:Lr,prevHeight:$r,prevLayout:dn,prevStackOffset:Jn,prevMargin:xn,prevChildren:yn})}if(Ne!==jr.prevDataKey||an!==jr.prevData||Lr!==jr.prevWidth||$r!==jr.prevHeight||dn!==jr.prevLayout||Jn!==jr.prevStackOffset||!nT(xn,jr.prevMargin)){var qa=qX(nr),la={chartX:jr.chartX,chartY:jr.chartY,isTooltipActive:jr.isTooltipActive},ja=To(To({},UX(jr,an,dn)),{},{updateId:jr.updateId+1}),pa=To(To(To({},qa),la),ja);return To(To(To({},pa),$t(To({props:nr},pa),jr)),{},{prevDataKey:Ne,prevData:an,prevWidth:Lr,prevHeight:$r,prevLayout:dn,prevStackOffset:Jn,prevMargin:xn,prevChildren:yn})}if(!nz(yn,jr.prevChildren)){var Ra,vi,Pi,Eo,ma=Jm(yn,_T),_a=ma&&(Ra=(vi=ma.props)===null||vi===void 0?void 0:vi.startIndex)!==null&&Ra!==void 0?Ra:Na,Li=ma&&(Pi=(Eo=ma.props)===null||Eo===void 0?void 0:Eo.endIndex)!==null&&Pi!==void 0?Pi:zn,so=_a!==Na||Li!==zn,Ro=!Mu(an),co=Ro&&!so?jr.updateId:jr.updateId+1;return To(To({updateId:co},$t(To(To({props:nr},jr),{},{updateId:co,dataStartIndex:_a,dataEndIndex:Li}),jr)),{},{prevChildren:yn,dataStartIndex:_a,dataEndIndex:Li})}return null}),fu(gr,"renderActiveDot",function(nr,jr,Ne){var an;return Ua.isValidElement(nr)?an=Ua.cloneElement(nr,jr):Fu(nr)?an=nr(jr):an=aa.createElement(sL,jr),aa.createElement(Rf,{className:"recharts-active-dot",key:Ne},an)});var sr=Ua.forwardRef(function(jr,Ne){return aa.createElement(gr,rT({},jr,{ref:Ne}))});return sr.displayName=gr.displayName,sr},c3e=iK({chartName:"LineChart",GraphicalChild:gg,axisComponents:[{axisType:"xAxis",AxisComp:yx},{axisType:"yAxis",AxisComp:gx}],formatAxisMap:p$}),F9=iK({chartName:"ComposedChart",GraphicalChild:[gg,mx,HT,XT],axisComponents:[{axisType:"xAxis",AxisComp:yx},{axisType:"yAxis",AxisComp:gx},{axisType:"zAxis",AxisComp:pL}],formatAxisMap:p$});async function f3e(e,n){return(await ch.post(`/sessions/${e}/visualizations/contour`,n)).data}async function h3e(e,n=!1){return(await ch.get(`/sessions/${e}/visualizations/parity`,{params:{use_calibrated:n}})).data}async function d3e(e,n=5){return(await ch.get(`/sessions/${e}/visualizations/metrics`,{params:{cv_splits:n}})).data}async function v3e(e,n=!1){return(await ch.get(`/sessions/${e}/visualizations/qq-plot`,{params:{use_calibrated:n}})).data}async function p3e(e,n=!1){return(await ch.get(`/sessions/${e}/visualizations/calibration-curve`,{params:{use_calibrated:n}})).data}function m3e(e,n,S=!1){return vy({queryKey:["contour-data",e,n],queryFn:()=>(console.log("useContourData queryFn executing with request:",n),f3e(e,n)),enabled:S&&!!e,staleTime:1/0,gcTime:300*1e3,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})}function y3e(e,n=!1,S=!0){return vy({queryKey:["parity-data",e,n],queryFn:()=>h3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function g3e(e,n=5,S=!0){return vy({queryKey:["metrics-data",e,n],queryFn:()=>d3e(e,n),enabled:S&&!!e,staleTime:6e4,refetchOnWindowFocus:!1})}function _3e(e,n=!1,S=!0){return vy({queryKey:["qq-plot-data",e,n],queryFn:()=>v3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function x3e(e,n=!1,S=!0){return vy({queryKey:["calibration-curve-data",e,n],queryFn:()=>p3e(e,n),enabled:S&&!!e,staleTime:3e4,refetchOnWindowFocus:!1})}function b3e({sessionId:e,useCalibrated:n,sigmaMultiplier:S}){const{data:L,isLoading:re,error:ve}=y3e(e,n),Ce=Ua.useMemo(()=>{if(!L)return[];const $t=S==="None"?0:parseFloat(S);return L.y_true.map((gr,sr)=>({actual:gr,predicted:L.y_pred[sr],errorLow:$t>0&&L.y_std?$t*L.y_std[sr]:0,errorHigh:$t>0&&L.y_std?$t*L.y_std[sr]:0}))},[L,S]),Be=Ua.useMemo(()=>{if(!L||L.y_true.length===0)return[];const $t=[...L.y_true,...L.y_pred],gr=Math.min(...$t),sr=Math.max(...$t);return[{actual:gr,parity:gr},{actual:sr,parity:sr}]},[L]),Ke={"1.0":"68% CI","1.96":"95% CI","2.0":"95.4% CI","2.58":"99% CI","3.0":"99.7% CI"}[S]||`${S}σ`;if(re)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx(zT,{className:"w-8 h-8 animate-spin text-primary"})});if(ve)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx("p",{className:"text-destructive font-medium",children:"Error loading parity plot"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:ve.message})]})});if(!L||L.y_true.length===0)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx("p",{className:"text-muted-foreground",children:"No data available for parity plot"})});const vt=S!=="None"&&L.y_std,yt=L.calibrated?" (Calibrated)":" (Uncalibrated)",Gt=vt?`Cross-Validation Parity Plot${yt}
RMSE: ${L.metrics.rmse.toFixed(4)}, MAE: ${L.metrics.mae.toFixed(4)}, R²: ${L.metrics.r2.toFixed(4)}
Error bars: ±${S}σ (${Ke})`:`Cross-Validation Parity Plot${yt}
RMSE: ${L.metrics.rmse.toFixed(4)}, MAE: ${L.metrics.mae.toFixed(4)}, R²: ${L.metrics.r2.toFixed(4)}`;return Vt.jsxs("div",{className:"w-full h-full flex flex-col",children:[Vt.jsx("div",{className:"text-center mb-3",children:Vt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:Gt})}),Vt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:Vt.jsx(KP,{width:"100%",height:"100%",children:Vt.jsxs(F9,{margin:{top:20,right:30,bottom:50,left:50},children:[Vt.jsx(WE,{strokeDasharray:"3 3"}),Vt.jsx(yx,{dataKey:"actual",type:"number",domain:["auto","auto"],label:{value:"Actual Values",position:"bottom",offset:10}}),Vt.jsx(gx,{type:"number",domain:["auto","auto"],label:{value:"Predicted Values",angle:-90,position:"left",offset:10}}),Vt.jsx(Qm,{formatter:$t=>$t.toFixed(4),labelFormatter:$t=>`Actual: ${$t.toFixed(4)}`}),Vt.jsx(dg,{verticalAlign:"top",height:36}),Vt.jsx(gg,{data:Be,dataKey:"parity",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Parity line",isAnimationActive:!1}),Vt.jsxs(XT,{data:Ce,dataKey:"predicted",fill:"white",stroke:"#3b82f6",strokeWidth:2,fillOpacity:1,name:"Predictions",children:[vt&&Vt.jsx(ux,{dataKey:"errorLow",direction:"y",width:0,strokeWidth:1,stroke:"#3b82f6"}),vt&&Vt.jsx(ux,{dataKey:"errorHigh",direction:"y",width:0,strokeWidth:1,stroke:"#3b82f6"})]})]})})})]})}function w3e({sessionId:e,selectedMetric:n,cvSplits:S}){const{data:L,isLoading:re,error:ve}=g3e(e,S),Ce=Ua.useMemo(()=>{if(!L)return[];const vt={RMSE:L.rmse,MAE:L.mae,MAPE:L.mape,R2:L.r2}[n];return vt?vt.map((yt,Gt)=>({numObservations:Gt+S,value:yt!==null?yt:void 0})).filter(yt=>yt.value!==void 0):[]},[L,n,S]),Be={RMSE:"RMSE",MAE:"MAE",MAPE:"MAPE (%)",R2:"R²"},Xe={RMSE:"RMSE vs Number of Observations",MAE:"MAE vs Number of Observations",MAPE:"MAPE vs Number of Observations",R2:"R² vs Number of Observations"};return re?Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx(zT,{className:"w-8 h-8 animate-spin text-primary mx-auto"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Computing metrics... This may take 5-10 seconds"})]})}):ve?Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx("p",{className:"text-destructive font-medium",children:"Error loading metrics plot"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:ve.message})]})}):!L||Ce.length===0?Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx("p",{className:"text-muted-foreground",children:"No data available for metrics plot"})}):Vt.jsxs("div",{className:"w-full h-full flex flex-col",children:[Vt.jsx("div",{className:"text-center mb-3",children:Vt.jsx("h3",{className:"text-sm font-medium",children:Xe[n]})}),Vt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:Vt.jsx(KP,{width:"100%",height:"100%",children:Vt.jsxs(c3e,{data:Ce,margin:{top:20,right:30,bottom:50,left:50},children:[Vt.jsx(WE,{strokeDasharray:"3 3"}),Vt.jsx(yx,{dataKey:"numObservations",type:"number",domain:["dataMin","dataMax"],label:{value:"Number of Observations",position:"bottom",offset:10}}),Vt.jsx(gx,{label:{value:Be[n],angle:-90,position:"left",offset:10}}),Vt.jsx(Qm,{formatter:Ke=>Ke.toFixed(4),labelFormatter:Ke=>`N = ${Ke}`}),Vt.jsx(dg,{verticalAlign:"top",height:36}),Vt.jsx(gg,{type:"monotone",dataKey:"value",stroke:"#3b82f6",strokeWidth:2,dot:{r:4,fill:"white",stroke:"#3b82f6",strokeWidth:2},name:Be[n]})]})})})]})}function T3e({sessionId:e,useCalibrated:n}){const{data:S,isLoading:L,error:re}=_3e(e,n),ve=Ua.useMemo(()=>S?S.theoretical_quantiles.map((nr,jr)=>({theoretical:nr,sample:S.sample_quantiles[jr]})):[],[S]),Ce=Ua.useMemo(()=>{if(!S||S.theoretical_quantiles.length===0)return[];const nr=[...S.theoretical_quantiles,...S.sample_quantiles],jr=Math.min(...nr),Ne=Math.max(...nr);return[{theoretical:jr,parity:jr},{theoretical:Ne,parity:Ne}]},[S]),Be=Ua.useMemo(()=>{if(!S||S.n_samples>=100)return[];const nr=1.96/Math.sqrt(S.n_samples);return S.theoretical_quantiles.map(jr=>({theoretical:jr,bounds:[jr-nr,jr+nr]}))},[S]),Xe=Ua.useMemo(()=>{if(!S)return{xMin:-3,xMax:3,yMin:-3,yMax:3,ticks:[-3,-2,-1,0,1,2,3]};const nr=1.96/Math.sqrt(S.n_samples),jr=Math.min(...S.theoretical_quantiles),Ne=Math.max(...S.theoretical_quantiles),an=Math.min(...S.sample_quantiles)-nr,yn=Math.max(...S.sample_quantiles)+nr,Lr=Math.ceil(jr),$r=Math.floor(Ne),dn=Array.from({length:$r-Lr+1},(Jn,xn)=>Lr+xn);return{xMin:jr,xMax:Ne,yMin:an,yMax:yn,ticks:dn}},[S]);if(L)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx(zT,{className:"w-8 h-8 animate-spin text-primary"})});if(re)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx("p",{className:"text-destructive font-medium",children:"Error loading Q-Q plot"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:re.message})]})});if(!S||S.theoretical_quantiles.length===0)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx("p",{className:"text-muted-foreground",children:"No data available for Q-Q plot"})});const vt=`Q-Q Plot: Standardized Residuals vs. Normal Distribution${S.results_type==="calibrated"?" (Calibrated)":" (Uncalibrated)"}
Mean(z) = ${S.z_mean.toFixed(3)}, Std(z) = ${S.z_std.toFixed(3)}, N = ${S.n_samples}`,yt=Math.abs(S.z_mean)<.1&&Math.abs(S.z_std-1)<.2,Gt=Math.abs(S.z_mean)>.2,$t=S.z_std<.7,gr=S.z_std>1.3;let sr="";return yt?sr="✓ Model appears well-calibrated (unbiased, good uncertainty)":Gt?sr="⚠ Model may be biased (mean(z) far from 0)":$t?sr="⚠ Model may be under-confident (std(z) < 1)":gr&&(sr="⚠ Model may be over-confident (std(z) > 1)"),Vt.jsxs("div",{className:"w-full h-full flex flex-col",children:[Vt.jsxs("div",{className:"text-center mb-3",children:[Vt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:vt}),sr&&Vt.jsx("p",{className:`text-xs mt-1.5 ${yt?"text-green-600":"text-yellow-600"}`,children:sr})]}),Vt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:Vt.jsx(KP,{width:"100%",height:"100%",children:Vt.jsxs(F9,{margin:{top:20,right:30,bottom:50,left:50},children:[Vt.jsx(WE,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),Vt.jsx(yx,{dataKey:"theoretical",type:"number",domain:[Xe.xMin,Xe.xMax],ticks:Xe.ticks,label:{value:"Theoretical Quantiles (Standard Normal)",position:"bottom",offset:10}}),Vt.jsx(gx,{type:"number",domain:[Xe.yMin,Xe.yMax],ticks:Xe.ticks,label:{value:"Observed Quantiles (Standardized Residuals)",angle:-90,position:"left",offset:10}}),Vt.jsx(Qm,{formatter:nr=>typeof nr=="number"?nr.toFixed(3):nr,labelFormatter:nr=>typeof nr=="number"?`Theoretical: ${nr.toFixed(3)}`:nr}),Vt.jsx(dg,{verticalAlign:"top",height:36}),Be.length>0&&Vt.jsx(mx,{data:Be,dataKey:"bounds",stroke:"none",fill:"#fecaca",fillOpacity:.5,name:"Approximate 95% CI",isAnimationActive:!1}),Vt.jsx(gg,{data:Ce,dataKey:"parity",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Perfect calibration",isAnimationActive:!1}),Vt.jsx(XT,{data:ve,dataKey:"sample",fill:"white",stroke:"#3b82f6",strokeWidth:2,fillOpacity:1,name:"Observations"})]})})})]})}function A3e({sessionId:e,useCalibrated:n}){const{data:S,isLoading:L,error:re}=x3e(e,n),ve=Ua.useMemo(()=>S?S.nominal_coverage.map((vt,yt)=>({nominal:vt,empirical:S.empirical_coverage[yt],overConfident:S.empirical_coverage[yt]<vt?S.empirical_coverage[yt]:vt,underConfident:S.empirical_coverage[yt]>=vt?S.empirical_coverage[yt]:vt})):[],[S]),Ce=Ua.useMemo(()=>[{nominal:0,perfect:0},{nominal:1,perfect:1}],[]),Be=Ua.useMemo(()=>!S||!S.confidence_levels?[]:S.confidence_levels.map((vt,yt)=>{const Gt=S.nominal_probabilities?S.nominal_probabilities[yt]:S.nominal_coverage[yt],$t=S.empirical_probabilities?S.empirical_probabilities[yt]:S.empirical_coverage[yt],gr=$t-Gt;let sr="";return Math.abs(gr)<.05?sr="✓ Good":gr>.1?sr="⚠ Under-conf":gr<-.1?sr="⚠ Over-conf":sr="~ Acceptable",{level:vt,nominal:Gt,empirical:$t,diff:gr,status:sr}}),[S]);if(L)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx(zT,{className:"w-8 h-8 animate-spin text-primary"})});if(re)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx("p",{className:"text-destructive font-medium",children:"Error loading calibration curve"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:re.message})]})});if(!S||S.nominal_coverage.length===0)return Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx("p",{className:"text-muted-foreground",children:"No data available for calibration curve"})});const Ke=`Calibration Curve (Reliability Diagram)${S.results_type==="calibrated"?" (Calibrated)":" (Uncalibrated)"}
N = ${S.n_samples}`;return Vt.jsxs("div",{className:"w-full h-full flex flex-col",children:[Vt.jsxs("div",{className:"text-center mb-3",children:[Vt.jsx("h3",{className:"text-sm font-medium whitespace-pre-line leading-tight",children:Ke}),S.n_samples<30&&Vt.jsx("p",{className:"text-xs text-yellow-600 mt-1.5",children:"⚠ WARNING: Small sample size (N < 30). Coverage estimates may be noisy."})]}),Vt.jsxs("div",{className:"flex-1 flex gap-6",children:[Vt.jsx("div",{className:"flex-1 min-h-0 max-h-[450px]",children:Vt.jsx(KP,{width:"100%",height:"100%",children:Vt.jsxs(F9,{data:ve,margin:{top:20,right:30,bottom:50,left:50},children:[Vt.jsx(WE,{strokeDasharray:"3 3",stroke:"#e5e7eb"}),Vt.jsx(yx,{dataKey:"nominal",type:"number",domain:[0,1],label:{value:"Nominal Coverage Probability",position:"bottom",offset:10},tickFormatter:vt=>vt.toFixed(1)}),Vt.jsx(gx,{type:"number",domain:[0,1],label:{value:"Empirical Coverage Probability",angle:-90,position:"left",offset:10},tickFormatter:vt=>vt.toFixed(1)}),Vt.jsx(Qm,{formatter:vt=>vt.toFixed(3),labelFormatter:vt=>`Nominal: ${vt.toFixed(3)}`}),Vt.jsx(dg,{verticalAlign:"top",height:36}),Vt.jsx(gg,{data:Ce,dataKey:"perfect",stroke:"#ef4444",strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Perfect calibration",isAnimationActive:!1}),Vt.jsx(gg,{dataKey:"empirical",stroke:"#3b82f6",strokeWidth:2,dot:{r:4,fill:"white",stroke:"#3b82f6",strokeWidth:2},name:"Empirical coverage"})]})})}),Vt.jsxs("div",{className:"w-80 bg-muted/30 rounded-lg p-3 overflow-auto",children:[Vt.jsx("h4",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground mb-2",children:"Coverage Metrics"}),Vt.jsx("div",{className:"text-xs",children:Vt.jsxs("table",{className:"w-full",children:[Vt.jsx("thead",{className:"border-b border-border",children:Vt.jsxs("tr",{className:"text-left",children:[Vt.jsx("th",{className:"pb-2",children:"Confidence"}),Vt.jsx("th",{className:"pb-2 text-right",children:"Nominal"}),Vt.jsx("th",{className:"pb-2 text-right",children:"Empirical"}),Vt.jsx("th",{className:"pb-2 text-right",children:"Diff"}),Vt.jsx("th",{className:"pb-2",children:"Status"})]})}),Vt.jsx("tbody",{children:Be.map((vt,yt)=>Vt.jsxs("tr",{className:"border-b border-border/50",children:[Vt.jsx("td",{className:"py-1",children:vt.level}),Vt.jsxs("td",{className:"py-1 text-right",children:[vt.nominal.toFixed(3)," (",(vt.nominal*100).toFixed(1),"%)"]}),Vt.jsxs("td",{className:"py-1 text-right",children:[vt.empirical.toFixed(3)," (",(vt.empirical*100).toFixed(1),"%)"]}),Vt.jsxs("td",{className:`py-1 text-right ${vt.diff>0?"text-blue-600":"text-orange-600"}`,children:[vt.diff>0?"+":"",vt.diff.toFixed(3)," (",vt.diff>0?"+":"",(vt.diff*100).toFixed(1),"%)"]}),Vt.jsx("td",{className:"py-1 text-xs",children:vt.status})]},yt))})]})})]})]})]})}var qO={},VO={},HX;function S3e(){return HX||(HX=1,(function(e){function n(Lr){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($r){return typeof $r}:function($r){return $r&&typeof Symbol=="function"&&$r.constructor===Symbol&&$r!==Symbol.prototype?"symbol":typeof $r},n(Lr)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=yn;var S=Ce(RP()),L=re(JZ());function re(Lr){return Lr&&Lr.__esModule?Lr:{default:Lr}}function ve(Lr){if(typeof WeakMap!="function")return null;var $r=new WeakMap,dn=new WeakMap;return(ve=function(xn){return xn?dn:$r})(Lr)}function Ce(Lr,$r){if(Lr&&Lr.__esModule)return Lr;if(Lr===null||n(Lr)!=="object"&&typeof Lr!="function")return{default:Lr};var dn=ve($r);if(dn&&dn.has(Lr))return dn.get(Lr);var Jn={},xn=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Na in Lr)if(Na!=="default"&&Object.prototype.hasOwnProperty.call(Lr,Na)){var zn=xn?Object.getOwnPropertyDescriptor(Lr,Na):null;zn&&(zn.get||zn.set)?Object.defineProperty(Jn,Na,zn):Jn[Na]=Lr[Na]}return Jn.default=Lr,dn&&dn.set(Lr,Jn),Jn}function Be(Lr,$r){if(!(Lr instanceof $r))throw new TypeError("Cannot call a class as a function")}function Xe(Lr,$r){for(var dn=0;dn<$r.length;dn++){var Jn=$r[dn];Jn.enumerable=Jn.enumerable||!1,Jn.configurable=!0,"value"in Jn&&(Jn.writable=!0),Object.defineProperty(Lr,Jn.key,Jn)}}function Ke(Lr,$r,dn){return $r&&Xe(Lr.prototype,$r),Object.defineProperty(Lr,"prototype",{writable:!1}),Lr}function vt(Lr,$r){if(typeof $r!="function"&&$r!==null)throw new TypeError("Super expression must either be null or a function");Lr.prototype=Object.create($r&&$r.prototype,{constructor:{value:Lr,writable:!0,configurable:!0}}),Object.defineProperty(Lr,"prototype",{writable:!1}),$r&&yt(Lr,$r)}function yt(Lr,$r){return yt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Jn,xn){return Jn.__proto__=xn,Jn},yt(Lr,$r)}function Gt(Lr){var $r=sr();return function(){var Jn=nr(Lr),xn;if($r){var Na=nr(this).constructor;xn=Reflect.construct(Jn,arguments,Na)}else xn=Jn.apply(this,arguments);return $t(this,xn)}}function $t(Lr,$r){if($r&&(n($r)==="object"||typeof $r=="function"))return $r;if($r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gr(Lr)}function gr(Lr){if(Lr===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Lr}function sr(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nr(Lr){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(dn){return dn.__proto__||Object.getPrototypeOf(dn)},nr(Lr)}var jr=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],Ne=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],an=typeof window<"u";function yn(Lr){var $r=(function(dn){vt(xn,dn);var Jn=Gt(xn);function xn(Na){var zn;return Be(this,xn),zn=Jn.call(this,Na),zn.p=Promise.resolve(),zn.resizeHandler=null,zn.handlers={},zn.syncWindowResize=zn.syncWindowResize.bind(gr(zn)),zn.syncEventHandlers=zn.syncEventHandlers.bind(gr(zn)),zn.attachUpdateEvents=zn.attachUpdateEvents.bind(gr(zn)),zn.getRef=zn.getRef.bind(gr(zn)),zn.handleUpdate=zn.handleUpdate.bind(gr(zn)),zn.figureCallback=zn.figureCallback.bind(gr(zn)),zn.updatePlotly=zn.updatePlotly.bind(gr(zn)),zn}return Ke(xn,[{key:"updatePlotly",value:function(zn,ta,qa){var la=this;this.p=this.p.then(function(){if(!la.unmounting){if(!la.el)throw new Error("Missing element reference");return Lr.react(la.el,{data:la.props.data,layout:la.props.layout,config:la.props.config,frames:la.props.frames})}}).then(function(){la.unmounting||(la.syncWindowResize(zn),la.syncEventHandlers(),la.figureCallback(ta),qa&&la.attachUpdateEvents())}).catch(function(ja){la.props.onError&&la.props.onError(ja)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(zn){this.unmounting=!1;var ta=zn.frames&&zn.frames.length?zn.frames.length:0,qa=this.props.frames&&this.props.frames.length?this.props.frames.length:0,la=!(zn.layout===this.props.layout&&zn.data===this.props.data&&zn.config===this.props.config&&qa===ta),ja=zn.revision!==void 0,pa=zn.revision!==this.props.revision;!la&&(!ja||ja&&!pa)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&an&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),Lr.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var zn=this;!this.el||!this.el.removeListener||Ne.forEach(function(ta){zn.el.on(ta,zn.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var zn=this;!this.el||!this.el.removeListener||Ne.forEach(function(ta){zn.el.removeListener(ta,zn.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(zn){if(typeof zn=="function"){var ta=this.el,qa=ta.data,la=ta.layout,ja=this.el._transitionData?this.el._transitionData._frames:null,pa={data:qa,layout:la,frames:ja};zn(pa,this.el)}}},{key:"syncWindowResize",value:function(zn){var ta=this;an&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return Lr.Plots.resize(ta.el)},window.addEventListener("resize",this.resizeHandler),zn&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(zn){this.el=zn,this.props.debug&&an&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var zn=this;jr.forEach(function(ta){var qa=zn.props["on"+ta],la=zn.handlers[ta],ja=!!la;qa&&!ja?zn.addEventHandler(ta,qa):!qa&&ja?zn.removeEventHandler(ta):qa&&ja&&qa!==la&&(zn.removeEventHandler(ta),zn.addEventHandler(ta,qa))})}},{key:"addEventHandler",value:function(zn,ta){this.handlers[zn]=ta,this.el.on(this.getPlotlyEventName(zn),this.handlers[zn])}},{key:"removeEventHandler",value:function(zn){this.el.removeListener(this.getPlotlyEventName(zn),this.handlers[zn]),delete this.handlers[zn]}},{key:"getPlotlyEventName",value:function(zn){return"plotly_"+zn.toLowerCase()}},{key:"render",value:function(){return S.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),xn})(S.Component);return $r.propTypes={data:L.default.arrayOf(L.default.object),config:L.default.object,layout:L.default.object,frames:L.default.arrayOf(L.default.object),revision:L.default.number,onInitialized:L.default.func,onPurge:L.default.func,onError:L.default.func,onUpdate:L.default.func,debug:L.default.bool,style:L.default.object,className:L.default.string,useResizeHandler:L.default.bool,divId:L.default.string},jr.forEach(function(dn){$r.propTypes["on"+dn]=L.default.func}),$r.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},$r}})(VO)),VO}var Pk={exports:{}},E3e=Pk.exports,GX;function M3e(){return GX||(GX=1,(function(e){var n={};(function(S,L){e.exports?e.exports=L():S.moduleName=L()})(typeof self<"u"?self:E3e,()=>{var S=(()=>{var L=Object.create,re=Object.defineProperty,ve=Object.defineProperties,Ce=Object.getOwnPropertyDescriptor,Be=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertyNames,Ke=Object.getOwnPropertySymbols,vt=Object.getPrototypeOf,yt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,$t=(te,Z,v)=>Z in te?re(te,Z,{enumerable:!0,configurable:!0,writable:!0,value:v}):te[Z]=v,gr=(te,Z)=>{for(var v in Z||(Z={}))yt.call(Z,v)&&$t(te,v,Z[v]);if(Ke)for(var v of Ke(Z))Gt.call(Z,v)&&$t(te,v,Z[v]);return te},sr=(te,Z)=>ve(te,Be(Z)),nr=(te,Z)=>{var v={};for(var w in te)yt.call(te,w)&&Z.indexOf(w)<0&&(v[w]=te[w]);if(te!=null&&Ke)for(var w of Ke(te))Z.indexOf(w)<0&&Gt.call(te,w)&&(v[w]=te[w]);return v},jr=(te,Z)=>function(){return te&&(Z=(0,te[Xe(te)[0]])(te=0)),Z},Ne=(te,Z)=>function(){return Z||(0,te[Xe(te)[0]])((Z={exports:{}}).exports,Z),Z.exports},an=(te,Z)=>{for(var v in Z)re(te,v,{get:Z[v],enumerable:!0})},yn=(te,Z,v,w)=>{if(Z&&typeof Z=="object"||typeof Z=="function")for(let C of Xe(Z))!yt.call(te,C)&&C!==v&&re(te,C,{get:()=>Z[C],enumerable:!(w=Ce(Z,C))||w.enumerable});return te},Lr=(te,Z,v)=>(v=te!=null?L(vt(te)):{},yn(re(v,"default",{value:te,enumerable:!0}),te)),$r=te=>yn(re({},"__esModule",{value:!0}),te),dn=Ne({"src/version.js"(te){te.version="3.3.0"}}),Jn=Ne({"node_modules/native-promise-only/lib/npo.src.js"(te,Z){(function(w,C,P){C[w]=C[w]||P(),typeof Z<"u"&&Z.exports&&(Z.exports=C[w])})("Promise",typeof window<"u"?window:te,function(){var w,C,P,t=Object.prototype.toString,r=typeof setImmediate<"u"?function(_){return setImmediate(_)}:setTimeout;try{Object.defineProperty({},"x",{}),w=function(_,T,M,k){return Object.defineProperty(_,T,{value:M,writable:!0,configurable:k!==!1})}}catch{w=function(T,M,k){return T[M]=k,T}}P=(function(){var _,T,M;function k(b,A){this.fn=b,this.self=A,this.next=void 0}return{add:function(A,g){M=new k(A,g),T?T.next=M:_=M,T=M,M=void 0},drain:function(){var A=_;for(_=T=C=void 0;A;)A.fn.call(A.self),A=A.next}}})();function a(c,_){P.add(c,_),C||(C=r(P.drain))}function l(c){var _,T=typeof c;return c!=null&&(T=="object"||T=="function")&&(_=c.then),typeof _=="function"?_:!1}function i(){for(var c=0;c<this.chain.length;c++)s(this,this.state===1?this.chain[c].success:this.chain[c].failure,this.chain[c]);this.chain.length=0}function s(c,_,T){var M,k;try{_===!1?T.reject(c.msg):(_===!0?M=c.msg:M=_.call(void 0,c.msg),M===T.promise?T.reject(TypeError("Promise-chain cycle")):(k=l(M))?k.call(M,T.resolve,T.reject):T.resolve(M))}catch(b){T.reject(b)}}function o(c){var _,T=this;if(!T.triggered){T.triggered=!0,T.def&&(T=T.def);try{(_=l(c))?a(function(){var M=new h(T);try{_.call(c,function(){o.apply(M,arguments)},function(){u.apply(M,arguments)})}catch(k){u.call(M,k)}}):(T.msg=c,T.state=1,T.chain.length>0&&a(i,T))}catch(M){u.call(new h(T),M)}}}function u(c){var _=this;_.triggered||(_.triggered=!0,_.def&&(_=_.def),_.msg=c,_.state=2,_.chain.length>0&&a(i,_))}function d(c,_,T,M){for(var k=0;k<_.length;k++)(function(A){c.resolve(_[A]).then(function(f){T(A,f)},M)})(k)}function h(c){this.def=c,this.triggered=!1}function y(c){this.promise=c,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function m(c){if(typeof c!="function")throw TypeError("Not a function");if(this.__NPO__!==0)throw TypeError("Not a promise");this.__NPO__=1;var _=new y(this);this.then=function(M,k){var b={success:typeof M=="function"?M:!0,failure:typeof k=="function"?k:!1};return b.promise=new this.constructor(function(g,f){if(typeof g!="function"||typeof f!="function")throw TypeError("Not a function");b.resolve=g,b.reject=f}),_.chain.push(b),_.state!==0&&a(i,_),b.promise},this.catch=function(M){return this.then(void 0,M)};try{c.call(void 0,function(M){o.call(_,M)},function(M){u.call(_,M)})}catch(T){u.call(_,T)}}var E=w({},"constructor",m,!1);return m.prototype=E,w(E,"__NPO__",0,!1),w(m,"resolve",function(_){var T=this;return _&&typeof _=="object"&&_.__NPO__===1?_:new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");k(_)})}),w(m,"reject",function(_){return new this(function(M,k){if(typeof M!="function"||typeof k!="function")throw TypeError("Not a function");k(_)})}),w(m,"all",function(_){var T=this;return t.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):_.length===0?T.resolve([]):new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");var A=_.length,g=Array(A),f=0;d(T,_,function(x,N){g[x]=N,++f===A&&k(g)},b)})}),w(m,"race",function(_){var T=this;return t.call(_)!="[object Array]"?T.reject(TypeError("Not an array")):new T(function(k,b){if(typeof k!="function"||typeof b!="function")throw TypeError("Not a function");d(T,_,function(g,f){k(f)},b)})}),m})}}),xn=Ne({"node_modules/@plotly/d3/d3.js"(te,Z){(function(){var v={version:"3.8.2"},w=[].slice,C=function(Te){return w.call(Te)},P=self.document;function t(Te){return Te&&(Te.ownerDocument||Te.document||Te).documentElement}function r(Te){return Te&&(Te.ownerDocument&&Te.ownerDocument.defaultView||Te.document&&Te||Te.defaultView)}if(P)try{C(P.documentElement.childNodes)[0].nodeType}catch{C=function(He){for(var ct=He.length,Pt=new Array(ct);ct--;)Pt[ct]=He[ct];return Pt}}if(Date.now||(Date.now=function(){return+new Date}),P)try{P.createElement("DIV").style.setProperty("opacity",0,"")}catch{var a=this.Element.prototype,l=a.setAttribute,i=a.setAttributeNS,s=this.CSSStyleDeclaration.prototype,o=s.setProperty;a.setAttribute=function(He,ct){l.call(this,He,ct+"")},a.setAttributeNS=function(He,ct,Pt){i.call(this,He,ct,Pt+"")},s.setProperty=function(He,ct,Pt){o.call(this,He,ct+"",Pt)}}v.ascending=u;function u(Te,He){return Te<He?-1:Te>He?1:Te>=He?0:NaN}v.descending=function(Te,He){return He<Te?-1:He>Te?1:He>=Te?0:NaN},v.min=function(Te,He){var ct=-1,Pt=Te.length,It,Ut;if(arguments.length===1){for(;++ct<Pt;)if((Ut=Te[ct])!=null&&Ut>=Ut){It=Ut;break}for(;++ct<Pt;)(Ut=Te[ct])!=null&&It>Ut&&(It=Ut)}else{for(;++ct<Pt;)if((Ut=He.call(Te,Te[ct],ct))!=null&&Ut>=Ut){It=Ut;break}for(;++ct<Pt;)(Ut=He.call(Te,Te[ct],ct))!=null&&It>Ut&&(It=Ut)}return It},v.max=function(Te,He){var ct=-1,Pt=Te.length,It,Ut;if(arguments.length===1){for(;++ct<Pt;)if((Ut=Te[ct])!=null&&Ut>=Ut){It=Ut;break}for(;++ct<Pt;)(Ut=Te[ct])!=null&&Ut>It&&(It=Ut)}else{for(;++ct<Pt;)if((Ut=He.call(Te,Te[ct],ct))!=null&&Ut>=Ut){It=Ut;break}for(;++ct<Pt;)(Ut=He.call(Te,Te[ct],ct))!=null&&Ut>It&&(It=Ut)}return It},v.extent=function(Te,He){var ct=-1,Pt=Te.length,It,Ut,hr;if(arguments.length===1){for(;++ct<Pt;)if((Ut=Te[ct])!=null&&Ut>=Ut){It=hr=Ut;break}for(;++ct<Pt;)(Ut=Te[ct])!=null&&(It>Ut&&(It=Ut),hr<Ut&&(hr=Ut))}else{for(;++ct<Pt;)if((Ut=He.call(Te,Te[ct],ct))!=null&&Ut>=Ut){It=hr=Ut;break}for(;++ct<Pt;)(Ut=He.call(Te,Te[ct],ct))!=null&&(It>Ut&&(It=Ut),hr<Ut&&(hr=Ut))}return[It,hr]};function d(Te){return Te===null?NaN:+Te}function h(Te){return!isNaN(Te)}v.sum=function(Te,He){var ct=0,Pt=Te.length,It,Ut=-1;if(arguments.length===1)for(;++Ut<Pt;)h(It=+Te[Ut])&&(ct+=It);else for(;++Ut<Pt;)h(It=+He.call(Te,Te[Ut],Ut))&&(ct+=It);return ct},v.mean=function(Te,He){var ct=0,Pt=Te.length,It,Ut=-1,hr=Pt;if(arguments.length===1)for(;++Ut<Pt;)h(It=d(Te[Ut]))?ct+=It:--hr;else for(;++Ut<Pt;)h(It=d(He.call(Te,Te[Ut],Ut)))?ct+=It:--hr;if(hr)return ct/hr},v.quantile=function(Te,He){var ct=(Te.length-1)*He+1,Pt=Math.floor(ct),It=+Te[Pt-1],Ut=ct-Pt;return Ut?It+Ut*(Te[Pt]-It):It},v.median=function(Te,He){var ct=[],Pt=Te.length,It,Ut=-1;if(arguments.length===1)for(;++Ut<Pt;)h(It=d(Te[Ut]))&&ct.push(It);else for(;++Ut<Pt;)h(It=d(He.call(Te,Te[Ut],Ut)))&&ct.push(It);if(ct.length)return v.quantile(ct.sort(u),.5)},v.variance=function(Te,He){var ct=Te.length,Pt=0,It,Ut,hr=0,fr=-1,Pr=0;if(arguments.length===1)for(;++fr<ct;)h(It=d(Te[fr]))&&(Ut=It-Pt,Pt+=Ut/++Pr,hr+=Ut*(It-Pt));else for(;++fr<ct;)h(It=d(He.call(Te,Te[fr],fr)))&&(Ut=It-Pt,Pt+=Ut/++Pr,hr+=Ut*(It-Pt));if(Pr>1)return hr/(Pr-1)},v.deviation=function(){var Te=v.variance.apply(this,arguments);return Te&&Math.sqrt(Te)};function y(Te){return{left:function(He,ct,Pt,It){for(arguments.length<3&&(Pt=0),arguments.length<4&&(It=He.length);Pt<It;){var Ut=Pt+It>>>1;Te(He[Ut],ct)<0?Pt=Ut+1:It=Ut}return Pt},right:function(He,ct,Pt,It){for(arguments.length<3&&(Pt=0),arguments.length<4&&(It=He.length);Pt<It;){var Ut=Pt+It>>>1;Te(He[Ut],ct)>0?It=Ut:Pt=Ut+1}return Pt}}}var m=y(u);v.bisectLeft=m.left,v.bisect=v.bisectRight=m.right,v.bisector=function(Te){return y(Te.length===1?function(He,ct){return u(Te(He),ct)}:Te)},v.shuffle=function(Te,He,ct){(Pt=arguments.length)<3&&(ct=Te.length,Pt<2&&(He=0));for(var Pt=ct-He,It,Ut;Pt;)Ut=Math.random()*Pt--|0,It=Te[Pt+He],Te[Pt+He]=Te[Ut+He],Te[Ut+He]=It;return Te},v.permute=function(Te,He){for(var ct=He.length,Pt=new Array(ct);ct--;)Pt[ct]=Te[He[ct]];return Pt},v.pairs=function(Te){for(var He=0,ct=Te.length-1,Pt=Te[0],It=new Array(ct<0?0:ct);He<ct;)It[He]=[Pt,Pt=Te[++He]];return It},v.transpose=function(Te){if(!(Ut=Te.length))return[];for(var He=-1,ct=v.min(Te,E),Pt=new Array(ct);++He<ct;)for(var It=-1,Ut,hr=Pt[He]=new Array(Ut);++It<Ut;)hr[It]=Te[It][He];return Pt};function E(Te){return Te.length}v.zip=function(){return v.transpose(arguments)},v.keys=function(Te){var He=[];for(var ct in Te)He.push(ct);return He},v.values=function(Te){var He=[];for(var ct in Te)He.push(Te[ct]);return He},v.entries=function(Te){var He=[];for(var ct in Te)He.push({key:ct,value:Te[ct]});return He},v.merge=function(Te){for(var He=Te.length,ct,Pt=-1,It=0,Ut,hr;++Pt<He;)It+=Te[Pt].length;for(Ut=new Array(It);--He>=0;)for(hr=Te[He],ct=hr.length;--ct>=0;)Ut[--It]=hr[ct];return Ut};var c=Math.abs;v.range=function(Te,He,ct){if(arguments.length<3&&(ct=1,arguments.length<2&&(He=Te,Te=0)),(He-Te)/ct===1/0)throw new Error("infinite range");var Pt=[],It=_(c(ct)),Ut=-1,hr;if(Te*=It,He*=It,ct*=It,ct<0)for(;(hr=Te+ct*++Ut)>He;)Pt.push(hr/It);else for(;(hr=Te+ct*++Ut)<He;)Pt.push(hr/It);return Pt};function _(Te){for(var He=1;Te*He%1;)He*=10;return He}function T(Te,He){for(var ct in He)Object.defineProperty(Te.prototype,ct,{value:He[ct],enumerable:!1})}v.map=function(Te,He){var ct=new M;if(Te instanceof M)Te.forEach(function(fr,Pr){ct.set(fr,Pr)});else if(Array.isArray(Te)){var Pt=-1,It=Te.length,Ut;if(arguments.length===1)for(;++Pt<It;)ct.set(Pt,Te[Pt]);else for(;++Pt<It;)ct.set(He.call(Te,Ut=Te[Pt],Pt),Ut)}else for(var hr in Te)ct.set(hr,Te[hr]);return ct};function M(){this._=Object.create(null)}var k="__proto__",b="\0";T(M,{has:f,get:function(Te){return this._[A(Te)]},set:function(Te,He){return this._[A(Te)]=He},remove:p,keys:x,values:function(){var Te=[];for(var He in this._)Te.push(this._[He]);return Te},entries:function(){var Te=[];for(var He in this._)Te.push({key:g(He),value:this._[He]});return Te},size:N,empty:D,forEach:function(Te){for(var He in this._)Te.call(this,g(He),this._[He])}});function A(Te){return(Te+="")===k||Te[0]===b?b+Te:Te}function g(Te){return(Te+="")[0]===b?Te.slice(1):Te}function f(Te){return A(Te)in this._}function p(Te){return(Te=A(Te))in this._&&delete this._[Te]}function x(){var Te=[];for(var He in this._)Te.push(g(He));return Te}function N(){var Te=0;for(var He in this._)++Te;return Te}function D(){for(var Te in this._)return!1;return!0}v.nest=function(){var Te={},He=[],ct=[],Pt,It;function Ut(fr,Pr,ln){if(ln>=He.length)return It?It.call(Te,Pr):Pt?Pr.sort(Pt):Pr;for(var on=-1,Mn=Pr.length,jn=He[ln++],Vn,Ka,Zn,ya=new M,Sa;++on<Mn;)(Sa=ya.get(Vn=jn(Ka=Pr[on])))?Sa.push(Ka):ya.set(Vn,[Ka]);return fr?(Ka=fr(),Zn=function(Xa,Qa){Ka.set(Xa,Ut(fr,Qa,ln))}):(Ka={},Zn=function(Xa,Qa){Ka[Xa]=Ut(fr,Qa,ln)}),ya.forEach(Zn),Ka}function hr(fr,Pr){if(Pr>=He.length)return fr;var ln=[],on=ct[Pr++];return fr.forEach(function(Mn,jn){ln.push({key:Mn,values:hr(jn,Pr)})}),on?ln.sort(function(Mn,jn){return on(Mn.key,jn.key)}):ln}return Te.map=function(fr,Pr){return Ut(Pr,fr,0)},Te.entries=function(fr){return hr(Ut(v.map,fr,0),0)},Te.key=function(fr){return He.push(fr),Te},Te.sortKeys=function(fr){return ct[He.length-1]=fr,Te},Te.sortValues=function(fr){return Pt=fr,Te},Te.rollup=function(fr){return It=fr,Te},Te},v.set=function(Te){var He=new B;if(Te)for(var ct=0,Pt=Te.length;ct<Pt;++ct)He.add(Te[ct]);return He};function B(){this._=Object.create(null)}T(B,{has:f,add:function(Te){return this._[A(Te+="")]=!0,Te},remove:p,values:x,size:N,empty:D,forEach:function(Te){for(var He in this._)Te.call(this,g(He))}}),v.behavior={};function U(Te){return Te}v.rebind=function(Te,He){for(var ct=1,Pt=arguments.length,It;++ct<Pt;)Te[It=arguments[ct]]=V(Te,He,He[It]);return Te};function V(Te,He,ct){return function(){var Pt=ct.apply(He,arguments);return Pt===He?Te:Pt}}function q(Te,He){if(He in Te)return He;He=He.charAt(0).toUpperCase()+He.slice(1);for(var ct=0,Pt=z.length;ct<Pt;++ct){var It=z[ct]+He;if(It in Te)return It}}var z=["webkit","ms","moz","Moz","o","O"];function H(){}v.dispatch=function(){for(var Te=new G,He=-1,ct=arguments.length;++He<ct;)Te[arguments[He]]=J(Te);return Te};function G(){}G.prototype.on=function(Te,He){var ct=Te.indexOf("."),Pt="";if(ct>=0&&(Pt=Te.slice(ct+1),Te=Te.slice(0,ct)),Te)return arguments.length<2?this[Te].on(Pt):this[Te].on(Pt,He);if(arguments.length===2){if(He==null)for(Te in this)this.hasOwnProperty(Te)&&this[Te].on(Pt,null);return this}};function J(Te){var He=[],ct=new M;function Pt(){for(var It=He,Ut=-1,hr=It.length,fr;++Ut<hr;)(fr=It[Ut].on)&&fr.apply(this,arguments);return Te}return Pt.on=function(It,Ut){var hr=ct.get(It),fr;return arguments.length<2?hr&&hr.on:(hr&&(hr.on=null,He=He.slice(0,fr=He.indexOf(hr)).concat(He.slice(fr+1)),ct.remove(It)),Ut&&He.push(ct.set(It,{on:Ut})),Te)},Pt}v.event=null;function le(){v.event.preventDefault()}function ye(){for(var Te=v.event,He;He=Te.sourceEvent;)Te=He;return Te}function de(Te){for(var He=new G,ct=0,Pt=arguments.length;++ct<Pt;)He[arguments[ct]]=J(He);return He.of=function(It,Ut){return function(hr){try{var fr=hr.sourceEvent=v.event;hr.target=Te,v.event=hr,He[hr.type].apply(It,Ut)}finally{v.event=fr}}},He}v.requote=function(Te){return Te.replace(me,"\\$&")};var me=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,W={}.__proto__?function(Te,He){Te.__proto__=He}:function(Te,He){for(var ct in He)Te[ct]=He[ct]};function ie(Te){return W(Te,oe),Te}var se=function(Te,He){return He.querySelector(Te)},ee=function(Te,He){return He.querySelectorAll(Te)},pe=function(Te,He){var ct=Te.matches||Te[q(Te,"matchesSelector")];return pe=function(Pt,It){return ct.call(Pt,It)},pe(Te,He)};typeof Sizzle=="function"&&(se=function(Te,He){return Sizzle(Te,He)[0]||null},ee=Sizzle,pe=Sizzle.matchesSelector),v.selection=function(){return v.select(P.documentElement)};var oe=v.selection.prototype=[];oe.select=function(Te){var He=[],ct,Pt,It,Ut;Te=Y(Te);for(var hr=-1,fr=this.length;++hr<fr;){He.push(ct=[]),ct.parentNode=(It=this[hr]).parentNode;for(var Pr=-1,ln=It.length;++Pr<ln;)(Ut=It[Pr])?(ct.push(Pt=Te.call(Ut,Ut.__data__,Pr,hr)),Pt&&"__data__"in Ut&&(Pt.__data__=Ut.__data__)):ct.push(null)}return ie(He)};function Y(Te){return typeof Te=="function"?Te:function(){return se(Te,this)}}oe.selectAll=function(Te){var He=[],ct,Pt;Te=ce(Te);for(var It=-1,Ut=this.length;++It<Ut;)for(var hr=this[It],fr=-1,Pr=hr.length;++fr<Pr;)(Pt=hr[fr])&&(He.push(ct=C(Te.call(Pt,Pt.__data__,fr,It))),ct.parentNode=Pt);return ie(He)};function ce(Te){return typeof Te=="function"?Te:function(){return ee(Te,this)}}var ue="http://www.w3.org/1999/xhtml",_e={svg:"http://www.w3.org/2000/svg",xhtml:ue,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};v.ns={prefix:_e,qualify:function(Te){var He=Te.indexOf(":"),ct=Te;return He>=0&&(ct=Te.slice(0,He))!=="xmlns"&&(Te=Te.slice(He+1)),_e.hasOwnProperty(ct)?{space:_e[ct],local:Te}:Te}},oe.attr=function(Te,He){if(arguments.length<2){if(typeof Te=="string"){var ct=this.node();return Te=v.ns.qualify(Te),Te.local?ct.getAttributeNS(Te.space,Te.local):ct.getAttribute(Te)}for(He in Te)this.each(Le(He,Te[He]));return this}return this.each(Le(Te,He))};function Le(Te,He){Te=v.ns.qualify(Te);function ct(){this.removeAttribute(Te)}function Pt(){this.removeAttributeNS(Te.space,Te.local)}function It(){this.setAttribute(Te,He)}function Ut(){this.setAttributeNS(Te.space,Te.local,He)}function hr(){var Pr=He.apply(this,arguments);Pr==null?this.removeAttribute(Te):this.setAttribute(Te,Pr)}function fr(){var Pr=He.apply(this,arguments);Pr==null?this.removeAttributeNS(Te.space,Te.local):this.setAttributeNS(Te.space,Te.local,Pr)}return He==null?Te.local?Pt:ct:typeof He=="function"?Te.local?fr:hr:Te.local?Ut:It}function ze(Te){return Te.trim().replace(/\s+/g," ")}oe.classed=function(Te,He){if(arguments.length<2){if(typeof Te=="string"){var ct=this.node(),Pt=(Te=Ve(Te)).length,It=-1;if(He=ct.classList){for(;++It<Pt;)if(!He.contains(Te[It]))return!1}else for(He=ct.getAttribute("class");++It<Pt;)if(!Ge(Te[It]).test(He))return!1;return!0}for(He in Te)this.each(rt(He,Te[He]));return this}return this.each(rt(Te,He))};function Ge(Te){return new RegExp("(?:^|\\s+)"+v.requote(Te)+"(?:\\s+|$)","g")}function Ve(Te){return(Te+"").trim().split(/^|\s+/)}function rt(Te,He){Te=Ve(Te).map(pt);var ct=Te.length;function Pt(){for(var Ut=-1;++Ut<ct;)Te[Ut](this,He)}function It(){for(var Ut=-1,hr=He.apply(this,arguments);++Ut<ct;)Te[Ut](this,hr)}return typeof He=="function"?It:Pt}function pt(Te){var He=Ge(Te);return function(ct,Pt){if(It=ct.classList)return Pt?It.add(Te):It.remove(Te);var It=ct.getAttribute("class")||"";Pt?(He.lastIndex=0,He.test(It)||ct.setAttribute("class",ze(It+" "+Te))):ct.setAttribute("class",ze(It.replace(He," ")))}}oe.style=function(Te,He,ct){var Pt=arguments.length;if(Pt<3){if(typeof Te!="string"){Pt<2&&(He="");for(ct in Te)this.each(gt(ct,Te[ct],He));return this}if(Pt<2){var It=this.node();return r(It).getComputedStyle(It,null).getPropertyValue(Te)}ct=""}return this.each(gt(Te,He,ct))};function gt(Te,He,ct){function Pt(){this.style.removeProperty(Te)}function It(){this.style.setProperty(Te,He,ct)}function Ut(){var hr=He.apply(this,arguments);hr==null?this.style.removeProperty(Te):this.style.setProperty(Te,hr,ct)}return He==null?Pt:typeof He=="function"?Ut:It}oe.property=function(Te,He){if(arguments.length<2){if(typeof Te=="string")return this.node()[Te];for(He in Te)this.each(ht(He,Te[He]));return this}return this.each(ht(Te,He))};function ht(Te,He){function ct(){delete this[Te]}function Pt(){this[Te]=He}function It(){var Ut=He.apply(this,arguments);Ut==null?delete this[Te]:this[Te]=Ut}return He==null?ct:typeof He=="function"?It:Pt}oe.text=function(Te){return arguments.length?this.each(typeof Te=="function"?function(){var He=Te.apply(this,arguments);this.textContent=He??""}:Te==null?function(){this.textContent=""}:function(){this.textContent=Te}):this.node().textContent},oe.html=function(Te){return arguments.length?this.each(typeof Te=="function"?function(){var He=Te.apply(this,arguments);this.innerHTML=He??""}:Te==null?function(){this.innerHTML=""}:function(){this.innerHTML=Te}):this.node().innerHTML},oe.append=function(Te){return Te=lt(Te),this.select(function(){return this.appendChild(Te.apply(this,arguments))})};function lt(Te){function He(){var Pt=this.ownerDocument,It=this.namespaceURI;return It===ue&&Pt.documentElement.namespaceURI===ue?Pt.createElement(Te):Pt.createElementNS(It,Te)}function ct(){return this.ownerDocument.createElementNS(Te.space,Te.local)}return typeof Te=="function"?Te:(Te=v.ns.qualify(Te)).local?ct:He}oe.insert=function(Te,He){return Te=lt(Te),He=Y(He),this.select(function(){return this.insertBefore(Te.apply(this,arguments),He.apply(this,arguments)||null)})},oe.remove=function(){return this.each(Fe)};function Fe(){var Te=this.parentNode;Te&&Te.removeChild(this)}oe.data=function(Te,He){var ct=-1,Pt=this.length,It,Ut;if(!arguments.length){for(Te=new Array(Pt=(It=this[0]).length);++ct<Pt;)(Ut=It[ct])&&(Te[ct]=Ut.__data__);return Te}function hr(on,Mn){var jn,Vn=on.length,Ka=Mn.length,Zn=Math.min(Vn,Ka),ya=new Array(Ka),Sa=new Array(Ka),Xa=new Array(Vn),Qa,Aa;if(He){var Si=new M,ho=new Array(Vn),Ki;for(jn=-1;++jn<Vn;)(Qa=on[jn])&&(Si.has(Ki=He.call(Qa,Qa.__data__,jn))?Xa[jn]=Qa:Si.set(Ki,Qa),ho[jn]=Ki);for(jn=-1;++jn<Ka;)(Qa=Si.get(Ki=He.call(Mn,Aa=Mn[jn],jn)))?Qa!==!0&&(ya[jn]=Qa,Qa.__data__=Aa):Sa[jn]=Pe(Aa),Si.set(Ki,!0);for(jn=-1;++jn<Vn;)jn in ho&&Si.get(ho[jn])!==!0&&(Xa[jn]=on[jn])}else{for(jn=-1;++jn<Zn;)Qa=on[jn],Aa=Mn[jn],Qa?(Qa.__data__=Aa,ya[jn]=Qa):Sa[jn]=Pe(Aa);for(;jn<Ka;++jn)Sa[jn]=Pe(Mn[jn]);for(;jn<Vn;++jn)Xa[jn]=on[jn]}Sa.update=ya,Sa.parentNode=ya.parentNode=Xa.parentNode=on.parentNode,fr.push(Sa),Pr.push(ya),ln.push(Xa)}var fr=bt([]),Pr=ie([]),ln=ie([]);if(typeof Te=="function")for(;++ct<Pt;)hr(It=this[ct],Te.call(It,It.parentNode.__data__,ct));else for(;++ct<Pt;)hr(It=this[ct],Te);return Pr.enter=function(){return fr},Pr.exit=function(){return ln},Pr};function Pe(Te){return{__data__:Te}}oe.datum=function(Te){return arguments.length?this.property("__data__",Te):this.property("__data__")},oe.filter=function(Te){var He=[],ct,Pt,It;typeof Te!="function"&&(Te=be(Te));for(var Ut=0,hr=this.length;Ut<hr;Ut++){He.push(ct=[]),ct.parentNode=(Pt=this[Ut]).parentNode;for(var fr=0,Pr=Pt.length;fr<Pr;fr++)(It=Pt[fr])&&Te.call(It,It.__data__,fr,Ut)&&ct.push(It)}return ie(He)};function be(Te){return function(){return pe(this,Te)}}oe.order=function(){for(var Te=-1,He=this.length;++Te<He;)for(var ct=this[Te],Pt=ct.length-1,It=ct[Pt],Ut;--Pt>=0;)(Ut=ct[Pt])&&(It&&It!==Ut.nextSibling&&It.parentNode.insertBefore(Ut,It),It=Ut);return this},oe.sort=function(Te){Te=Ye.apply(this,arguments);for(var He=-1,ct=this.length;++He<ct;)this[He].sort(Te);return this.order()};function Ye(Te){return arguments.length||(Te=u),function(He,ct){return He&&ct?Te(He.__data__,ct.__data__):!He-!ct}}oe.each=function(Te){return mt(this,function(He,ct,Pt){Te.call(He,He.__data__,ct,Pt)})};function mt(Te,He){for(var ct=0,Pt=Te.length;ct<Pt;ct++)for(var It=Te[ct],Ut=0,hr=It.length,fr;Ut<hr;Ut++)(fr=It[Ut])&&He(fr,Ut,ct);return Te}oe.call=function(Te){var He=C(arguments);return Te.apply(He[0]=this,He),this},oe.empty=function(){return!this.node()},oe.node=function(){for(var Te=0,He=this.length;Te<He;Te++)for(var ct=this[Te],Pt=0,It=ct.length;Pt<It;Pt++){var Ut=ct[Pt];if(Ut)return Ut}return null},oe.size=function(){var Te=0;return mt(this,function(){++Te}),Te};function bt(Te){return W(Te,ft),Te}var ft=[];v.selection.enter=bt,v.selection.enter.prototype=ft,ft.append=oe.append,ft.empty=oe.empty,ft.node=oe.node,ft.call=oe.call,ft.size=oe.size,ft.select=function(Te){for(var He=[],ct,Pt,It,Ut,hr,fr=-1,Pr=this.length;++fr<Pr;){It=(Ut=this[fr]).update,He.push(ct=[]),ct.parentNode=Ut.parentNode;for(var ln=-1,on=Ut.length;++ln<on;)(hr=Ut[ln])?(ct.push(It[ln]=Pt=Te.call(Ut.parentNode,hr.__data__,ln,fr)),Pt.__data__=hr.__data__):ct.push(null)}return ie(He)},ft.insert=function(Te,He){return arguments.length<2&&(He=Wt(this)),oe.insert.call(this,Te,He)};function Wt(Te){var He,ct;return function(Pt,It,Ut){var hr=Te[Ut].update,fr=hr.length,Pr;for(Ut!=ct&&(ct=Ut,He=0),It>=He&&(He=It+1);!(Pr=hr[He])&&++He<fr;);return Pr}}v.select=function(Te){var He;return typeof Te=="string"?(He=[se(Te,P)],He.parentNode=P.documentElement):(He=[Te],He.parentNode=t(Te)),ie([He])},v.selectAll=function(Te){var He;return typeof Te=="string"?(He=C(ee(Te,P)),He.parentNode=P.documentElement):(He=C(Te),He.parentNode=null),ie([He])},oe.on=function(Te,He,ct){var Pt=arguments.length;if(Pt<3){if(typeof Te!="string"){Pt<2&&(He=!1);for(ct in Te)this.each(Zt(ct,Te[ct],He));return this}if(Pt<2)return(Pt=this.node()["__on"+Te])&&Pt._;ct=!1}return this.each(Zt(Te,He,ct))};function Zt(Te,He,ct){var Pt="__on"+Te,It=Te.indexOf("."),Ut=pr;It>0&&(Te=Te.slice(0,It));var hr=cr.get(Te);hr&&(Te=hr,Ut=Br);function fr(){var on=this[Pt];on&&(this.removeEventListener(Te,on,on.$),delete this[Pt])}function Pr(){var on=Ut(He,C(arguments));fr.call(this),this.addEventListener(Te,this[Pt]=on,on.$=ct),on._=He}function ln(){var on=new RegExp("^__on([^.]+)"+v.requote(Te)+"$"),Mn;for(var jn in this)if(Mn=jn.match(on)){var Vn=this[jn];this.removeEventListener(Mn[1],Vn,Vn.$),delete this[jn]}}return It?He?Pr:fr:He?H:ln}var cr=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});P&&cr.forEach(function(Te){"on"+Te in P&&cr.remove(Te)});function pr(Te,He){return function(ct){var Pt=v.event;v.event=ct,He[0]=this.__data__;try{Te.apply(this,He)}finally{v.event=Pt}}}function Br(Te,He){var ct=pr(Te,He);return function(Pt){var It=this,Ut=Pt.relatedTarget;(!Ut||Ut!==It&&!(Ut.compareDocumentPosition(It)&8))&&ct.call(It,Pt)}}var Fr,cn=0;function Nr(Te){var He=".dragsuppress-"+ ++cn,ct="click"+He,Pt=v.select(r(Te)).on("touchmove"+He,le).on("dragstart"+He,le).on("selectstart"+He,le);if(Fr==null&&(Fr="onselectstart"in Te?!1:q(Te.style,"userSelect")),Fr){var It=t(Te).style,Ut=It[Fr];It[Fr]="none"}return function(hr){if(Pt.on(He,null),Fr&&(It[Fr]=Ut),hr){var fr=function(){Pt.on(ct,null)};Pt.on(ct,function(){le(),fr()},!0),setTimeout(fr,0)}}}v.mouse=function(Te){return Dt(Te,ye())};var Jr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Dt(Te,He){He.changedTouches&&(He=He.changedTouches[0]);var ct=Te.ownerSVGElement||Te;if(ct.createSVGPoint){var Pt=ct.createSVGPoint();if(Jr<0){var It=r(Te);if(It.scrollX||It.scrollY){ct=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Ut=ct[0][0].getScreenCTM();Jr=!(Ut.f||Ut.e),ct.remove()}}return Jr?(Pt.x=He.pageX,Pt.y=He.pageY):(Pt.x=He.clientX,Pt.y=He.clientY),Pt=Pt.matrixTransform(Te.getScreenCTM().inverse()),[Pt.x,Pt.y]}var hr=Te.getBoundingClientRect();return[He.clientX-hr.left-Te.clientLeft,He.clientY-hr.top-Te.clientTop]}v.touch=function(Te,He,ct){if(arguments.length<3&&(ct=He,He=ye().changedTouches),He){for(var Pt=0,It=He.length,Ut;Pt<It;++Pt)if((Ut=He[Pt]).identifier===ct)return Dt(Te,Ut)}},v.behavior.drag=function(){var Te=de(It,"drag","dragstart","dragend"),He=null,ct=Ut(H,v.mouse,r,"mousemove","mouseup"),Pt=Ut($e,v.touch,U,"touchmove","touchend");function It(){this.on("mousedown.drag",ct).on("touchstart.drag",Pt)}function Ut(hr,fr,Pr,ln,on){return function(){var Mn=this,jn=v.event.target.correspondingElement||v.event.target,Vn=Mn.parentNode,Ka=Te.of(Mn,arguments),Zn=0,ya=hr(),Sa=".drag"+(ya==null?"":"-"+ya),Xa,Qa=v.select(Pr(jn)).on(ln+Sa,ho).on(on+Sa,Ki),Aa=Nr(jn),Si=fr(Vn,ya);He?(Xa=He.apply(Mn,arguments),Xa=[Xa.x-Si[0],Xa.y-Si[1]]):Xa=[0,0],Ka({type:"dragstart"});function ho(){var lo=fr(Vn,ya),zo,qo;lo&&(zo=lo[0]-Si[0],qo=lo[1]-Si[1],Zn|=zo|qo,Si=lo,Ka({type:"drag",x:lo[0]+Xa[0],y:lo[1]+Xa[1],dx:zo,dy:qo}))}function Ki(){fr(Vn,ya)&&(Qa.on(ln+Sa,null).on(on+Sa,null),Aa(Zn),Ka({type:"dragend"}))}}}return It.origin=function(hr){return arguments.length?(He=hr,It):He},v.rebind(It,Te,"on")};function $e(){return v.event.changedTouches[0].identifier}v.touches=function(Te,He){return arguments.length<2&&(He=ye().touches),He?C(He).map(function(ct){var Pt=Dt(Te,ct);return Pt.identifier=ct.identifier,Pt}):[]};var ot=1e-6,De=ot*ot,Ee=Math.PI,Ae=2*Ee,Ie=Ae-ot,tt=Ee/2,st=Ee/180,Ft=180/Ee;function Nt(Te,He,ct){return(He[0]-Te[0])*(ct[1]-Te[1])-(He[1]-Te[1])*(ct[0]-Te[0])}function Xt(Te){return Te>1?tt:Te<-1?-tt:Math.asin(Te)}function lr(Te){return((Te=Math.exp(Te))-1/Te)/2}function Rr(Te){return((Te=Math.exp(Te))+1/Te)/2}function Mr(Te){return((Te=Math.exp(2*Te))-1)/(Te+1)}var Sr=Math.SQRT2,Kr=2,qn=4;v.interpolateZoom=function(Te,He){var ct=Te[0],Pt=Te[1],It=Te[2],Ut=He[0],hr=He[1],fr=He[2],Pr=Ut-ct,ln=hr-Pt,on=Pr*Pr+ln*ln,Mn,jn;if(on<De)jn=Math.log(fr/It)/Sr,Mn=function(Xa){return[ct+Xa*Pr,Pt+Xa*ln,It*Math.exp(Sr*Xa*jn)]};else{var Vn=Math.sqrt(on),Ka=(fr*fr-It*It+qn*on)/(2*It*Kr*Vn),Zn=(fr*fr-It*It-qn*on)/(2*fr*Kr*Vn),ya=Math.log(Math.sqrt(Ka*Ka+1)-Ka),Sa=Math.log(Math.sqrt(Zn*Zn+1)-Zn);jn=(Sa-ya)/Sr,Mn=function(Xa){var Qa=Xa*jn,Aa=Rr(ya),Si=It/(Kr*Vn)*(Aa*Mr(Sr*Qa+ya)-lr(ya));return[ct+Si*Pr,Pt+Si*ln,It*Aa/Rr(Sr*Qa+ya)]}}return Mn.duration=jn*1e3,Mn},v.behavior.zoom=function(){var Te={x:0,y:0,k:1},He,ct,Pt,It=[960,500],Ut=ha,hr=250,fr=0,Pr="mousedown.zoom",ln="mousemove.zoom",on="mouseup.zoom",Mn,jn="touchstart.zoom",Vn,Ka=de(Qa,"zoomstart","zoom","zoomend"),Zn,ya,Sa,Xa;xa||(xa="onwheel"in P?(ia=function(){return-v.event.deltaY*(v.event.deltaMode?120:1)},"wheel"):"onmousewheel"in P?(ia=function(){return v.event.wheelDelta},"mousewheel"):(ia=function(){return-v.event.detail},"MozMousePixelScroll"));function Qa(So){So.on(Pr,bs).on(xa+".zoom",ju).on("dblclick.zoom",ou).on(jn,fl)}Qa.event=function(So){So.each(function(){var qs=Ka.of(this,arguments),sl=Te;Fo?v.select(this).transition().each("start.zoom",function(){Te=this.__chart__||{x:0,y:0,k:1},qo(qs)}).tween("zoom:zoom",function(){var tu=It[0],Vl=It[1],Lc=ct?ct[0]:tu/2,Ol=ct?ct[1]:Vl/2,ru=v.interpolateZoom([(Lc-Te.x)/Te.k,(Ol-Te.y)/Te.k,tu/Te.k],[(Lc-sl.x)/sl.k,(Ol-sl.y)/sl.k,tu/sl.k]);return function(af){var zu=ru(af),At=tu/zu[2];this.__chart__=Te={x:Lc-zu[0]*At,y:Ol-zu[1]*At,k:At},nl(qs)}}).each("interrupt.zoom",function(){Go(qs)}).each("end.zoom",function(){Go(qs)}):(this.__chart__=Te,qo(qs),nl(qs),Go(qs))})},Qa.translate=function(So){return arguments.length?(Te={x:+So[0],y:+So[1],k:Te.k},zo(),Qa):[Te.x,Te.y]},Qa.scale=function(So){return arguments.length?(Te={x:Te.x,y:Te.y,k:null},ho(+So),zo(),Qa):Te.k},Qa.scaleExtent=function(So){return arguments.length?(Ut=So==null?ha:[+So[0],+So[1]],Qa):Ut},Qa.center=function(So){return arguments.length?(Pt=So&&[+So[0],+So[1]],Qa):Pt},Qa.size=function(So){return arguments.length?(It=So&&[+So[0],+So[1]],Qa):It},Qa.duration=function(So){return arguments.length?(hr=+So,Qa):hr},Qa.x=function(So){return arguments.length?(ya=So,Zn=So.copy(),Te={x:0,y:0,k:1},Qa):ya},Qa.y=function(So){return arguments.length?(Xa=So,Sa=So.copy(),Te={x:0,y:0,k:1},Qa):Xa};function Aa(So){return[(So[0]-Te.x)/Te.k,(So[1]-Te.y)/Te.k]}function Si(So){return[So[0]*Te.k+Te.x,So[1]*Te.k+Te.y]}function ho(So){Te.k=Math.max(Ut[0],Math.min(Ut[1],So))}function Ki(So,qs){qs=Si(qs),Te.x+=So[0]-qs[0],Te.y+=So[1]-qs[1]}function lo(So,qs,sl,tu){So.__chart__={x:Te.x,y:Te.y,k:Te.k},ho(Math.pow(2,tu)),Ki(ct=qs,sl),So=v.select(So),hr>0&&(So=So.transition().duration(hr)),So.call(Qa.event)}function zo(){ya&&ya.domain(Zn.range().map(function(So){return(So-Te.x)/Te.k}).map(Zn.invert)),Xa&&Xa.domain(Sa.range().map(function(So){return(So-Te.y)/Te.k}).map(Sa.invert))}function qo(So){fr++||So({type:"zoomstart"})}function nl(So){zo(),So({type:"zoom",scale:Te.k,translate:[Te.x,Te.y]})}function Go(So){--fr||(So({type:"zoomend"}),ct=null)}function bs(){var So=this,qs=Ka.of(So,arguments),sl=0,tu=v.select(r(So)).on(ln,Ol).on(on,ru),Vl=Aa(v.mouse(So)),Lc=Nr(So);Ha.call(So),qo(qs);function Ol(){sl=1,Ki(v.mouse(So),Vl),nl(qs)}function ru(){tu.on(ln,null).on(on,null),Lc(sl),Go(qs)}}function fl(){var So=this,qs=Ka.of(So,arguments),sl={},tu=0,Vl,Lc=".zoom-"+v.event.changedTouches[0].identifier,Ol="touchmove"+Lc,ru="touchend"+Lc,af=[],zu=v.select(So),At=Nr(So);Dr(),qo(qs),zu.on(Pr,null).on(jn,Dr);function kr(){var Rn=v.touches(So);return Vl=Te.k,Rn.forEach(function(Pn){Pn.identifier in sl&&(sl[Pn.identifier]=Aa(Pn))}),Rn}function Dr(){var Rn=v.event.target;v.select(Rn).on(Ol,Hn).on(ru,Ca),af.push(Rn);for(var Pn=v.event.changedTouches,ri=0,ei=Pn.length;ri<ei;++ri)sl[Pn[ri].identifier]=null;var ti=kr(),pi=Date.now();if(ti.length===1){if(pi-Vn<500){var eo=ti[0];lo(So,eo,sl[eo.identifier],Math.floor(Math.log(Te.k)/Math.LN2)+1),le()}Vn=pi}else if(ti.length>1){var eo=ti[0],Bi=ti[1],fi=eo[0]-Bi[0],Oa=eo[1]-Bi[1];tu=fi*fi+Oa*Oa}}function Hn(){var Rn=v.touches(So),Pn,ri,ei,ti;Ha.call(So);for(var pi=0,eo=Rn.length;pi<eo;++pi,ti=null)if(ei=Rn[pi],ti=sl[ei.identifier]){if(ri)break;Pn=ei,ri=ti}if(ti){var Bi=(Bi=ei[0]-Pn[0])*Bi+(Bi=ei[1]-Pn[1])*Bi,fi=tu&&Math.sqrt(Bi/tu);Pn=[(Pn[0]+ei[0])/2,(Pn[1]+ei[1])/2],ri=[(ri[0]+ti[0])/2,(ri[1]+ti[1])/2],ho(fi*Vl)}Vn=null,Ki(Pn,ri),nl(qs)}function Ca(){if(v.event.touches.length){for(var Rn=v.event.changedTouches,Pn=0,ri=Rn.length;Pn<ri;++Pn)delete sl[Rn[Pn].identifier];for(var ei in sl)return void kr()}v.selectAll(af).on(Lc,null),zu.on(Pr,bs).on(jn,fl),At(),Go(qs)}}function ju(){var So=Ka.of(this,arguments);Mn?clearTimeout(Mn):(Ha.call(this),He=Aa(ct=Pt||v.mouse(this)),qo(So)),Mn=setTimeout(function(){Mn=null,Go(So)},50),le(),ho(Math.pow(2,ia()*.002)*Te.k),Ki(ct,He),nl(So)}function ou(){var So=v.mouse(this),qs=Math.log(Te.k)/Math.LN2;lo(this,So,Aa(So),v.event.shiftKey?Math.ceil(qs)-1:Math.floor(qs)+1)}return v.rebind(Qa,Ka,"on")};var ha=[0,1/0],ia,xa;v.color=ba;function ba(){}ba.prototype.toString=function(){return this.rgb()+""},v.hsl=ea;function ea(Te,He,ct){return this instanceof ea?(this.h=+Te,this.s=+He,void(this.l=+ct)):arguments.length<2?Te instanceof ea?new ea(Te.h,Te.s,Te.l):Qr(""+Te,tn,ea):new ea(Te,He,ct)}var Za=ea.prototype=new ba;Za.brighter=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new ea(this.h,this.s,this.l/Te)},Za.darker=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new ea(this.h,this.s,Te*this.l)},Za.rgb=function(){return ui(this.h,this.s,this.l)};function ui(Te,He,ct){var Pt,It;Te=isNaN(Te)?0:(Te%=360)<0?Te+360:Te,He=isNaN(He)||He<0?0:He>1?1:He,ct=ct<0?0:ct>1?1:ct,It=ct<=.5?ct*(1+He):ct+He-ct*He,Pt=2*ct-It;function Ut(fr){return fr>360?fr-=360:fr<0&&(fr+=360),fr<60?Pt+(It-Pt)*fr/60:fr<180?It:fr<240?Pt+(It-Pt)*(240-fr)/60:Pt}function hr(fr){return Math.round(Ut(fr)*255)}return new zi(hr(Te+120),hr(Te),hr(Te-120))}v.hcl=_r;function _r(Te,He,ct){return this instanceof _r?(this.h=+Te,this.c=+He,void(this.l=+ct)):arguments.length<2?Te instanceof _r?new _r(Te.h,Te.c,Te.l):Te instanceof br?Pa(Te.l,Te.a,Te.b):Pa((Te=Xr((Te=v.rgb(Te)).r,Te.g,Te.b)).l,Te.a,Te.b):new _r(Te,He,ct)}var Qt=_r.prototype=new ba;Qt.brighter=function(Te){return new _r(this.h,this.c,Math.min(100,this.l+nn*(arguments.length?Te:1)))},Qt.darker=function(Te){return new _r(this.h,this.c,Math.max(0,this.l-nn*(arguments.length?Te:1)))},Qt.rgb=function(){return yr(this.h,this.c,this.l).rgb()};function yr(Te,He,ct){return isNaN(Te)&&(Te=0),isNaN(He)&&(He=0),new br(ct,Math.cos(Te*=st)*He,Math.sin(Te)*He)}v.lab=br;function br(Te,He,ct){return this instanceof br?(this.l=+Te,this.a=+He,void(this.b=+ct)):arguments.length<2?Te instanceof br?new br(Te.l,Te.a,Te.b):Te instanceof _r?yr(Te.h,Te.c,Te.l):Xr((Te=zi(Te)).r,Te.g,Te.b):new br(Te,He,ct)}var nn=18,wn=.95047,Ln=1,Fn=1.08883,va=br.prototype=new ba;va.brighter=function(Te){return new br(Math.min(100,this.l+nn*(arguments.length?Te:1)),this.a,this.b)},va.darker=function(Te){return new br(Math.max(0,this.l-nn*(arguments.length?Te:1)),this.a,this.b)},va.rgb=function(){return Da(this.l,this.a,this.b)};function Da(Te,He,ct){var Pt=(Te+16)/116,It=Pt+He/500,Ut=Pt-ct/200;return It=Fa(It)*wn,Pt=Fa(Pt)*Ln,Ut=Fa(Ut)*Fn,new zi(oa(3.2404542*It-1.5371385*Pt-.4985314*Ut),oa(-.969266*It+1.8760108*Pt+.041556*Ut),oa(.0556434*It-.2040259*Pt+1.0572252*Ut))}function Pa(Te,He,ct){return Te>0?new _r(Math.atan2(ct,He)*Ft,Math.sqrt(He*He+ct*ct),Te):new _r(NaN,NaN,Te)}function Fa(Te){return Te>.206893034?Te*Te*Te:(Te-4/29)/7.787037}function $a(Te){return Te>.008856?Math.pow(Te,1/3):7.787037*Te+4/29}function oa(Te){return Math.round(255*(Te<=.00304?12.92*Te:1.055*Math.pow(Te,1/2.4)-.055))}v.rgb=zi;function zi(Te,He,ct){return this instanceof zi?(this.r=~~Te,this.g=~~He,void(this.b=~~ct)):arguments.length<2?Te instanceof zi?new zi(Te.r,Te.g,Te.b):Qr(""+Te,zi,ui):new zi(Te,He,ct)}function Gi(Te){return new zi(Te>>16,Te>>8&255,Te&255)}function qt(Te){return Gi(Te)+""}var Ct=zi.prototype=new ba;Ct.brighter=function(Te){Te=Math.pow(.7,arguments.length?Te:1);var He=this.r,ct=this.g,Pt=this.b,It=30;return!He&&!ct&&!Pt?new zi(It,It,It):(He&&He<It&&(He=It),ct&&ct<It&&(ct=It),Pt&&Pt<It&&(Pt=It),new zi(Math.min(255,He/Te),Math.min(255,ct/Te),Math.min(255,Pt/Te)))},Ct.darker=function(Te){return Te=Math.pow(.7,arguments.length?Te:1),new zi(Te*this.r,Te*this.g,Te*this.b)},Ct.hsl=function(){return tn(this.r,this.g,this.b)},Ct.toString=function(){return"#"+Ur(this.r)+Ur(this.g)+Ur(this.b)};function Ur(Te){return Te<16?"0"+Math.max(0,Te).toString(16):Math.min(255,Te).toString(16)}function Qr(Te,He,ct){var Pt=0,It=0,Ut=0,hr,fr,Pr;if(hr=/([a-z]+)\((.*)\)/.exec(Te=Te.toLowerCase()),hr)switch(fr=hr[2].split(","),hr[1]){case"hsl":return ct(parseFloat(fr[0]),parseFloat(fr[1])/100,parseFloat(fr[2])/100);case"rgb":return He(Tn(fr[0]),Tn(fr[1]),Tn(fr[2]))}return(Pr=hn.get(Te))?He(Pr.r,Pr.g,Pr.b):(Te!=null&&Te.charAt(0)==="#"&&!isNaN(Pr=parseInt(Te.slice(1),16))&&(Te.length===4?(Pt=(Pr&3840)>>4,Pt=Pt>>4|Pt,It=Pr&240,It=It>>4|It,Ut=Pr&15,Ut=Ut<<4|Ut):Te.length===7&&(Pt=(Pr&16711680)>>16,It=(Pr&65280)>>8,Ut=Pr&255)),He(Pt,It,Ut))}function tn(Te,He,ct){var Pt=Math.min(Te/=255,He/=255,ct/=255),It=Math.max(Te,He,ct),Ut=It-Pt,hr,fr,Pr=(It+Pt)/2;return Ut?(fr=Pr<.5?Ut/(It+Pt):Ut/(2-It-Pt),Te==It?hr=(He-ct)/Ut+(He<ct?6:0):He==It?hr=(ct-Te)/Ut+2:hr=(Te-He)/Ut+4,hr*=60):(hr=NaN,fr=Pr>0&&Pr<1?0:hr),new ea(hr,fr,Pr)}function Xr(Te,He,ct){Te=en(Te),He=en(He),ct=en(ct);var Pt=$a((.4124564*Te+.3575761*He+.1804375*ct)/wn),It=$a((.2126729*Te+.7151522*He+.072175*ct)/Ln),Ut=$a((.0193339*Te+.119192*He+.9503041*ct)/Fn);return br(116*It-16,500*(Pt-It),200*(It-Ut))}function en(Te){return(Te/=255)<=.04045?Te/12.92:Math.pow((Te+.055)/1.055,2.4)}function Tn(Te){var He=parseFloat(Te);return Te.charAt(Te.length-1)==="%"?Math.round(He*2.55):He}var hn=v.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});hn.forEach(function(Te,He){hn.set(Te,Gi(He))});function Rt(Te){return typeof Te=="function"?Te:function(){return Te}}v.functor=Rt,v.xhr=xr(U);function xr(Te){return function(He,ct,Pt){return arguments.length===2&&typeof ct=="function"&&(Pt=ct,ct=null),Wr(He,ct,Te,Pt)}}function Wr(Te,He,ct,Pt){var It={},Ut=v.dispatch("beforesend","progress","load","error"),hr={},fr=new XMLHttpRequest,Pr=null;self.XDomainRequest&&!("withCredentials"in fr)&&/^(http(s)?:)?\/\//.test(Te)&&(fr=new XDomainRequest),"onload"in fr?fr.onload=fr.onerror=ln:fr.onreadystatechange=function(){fr.readyState>3&&ln()};function ln(){var on=fr.status,Mn;if(!on&&Xn(fr)||on>=200&&on<300||on===304){try{Mn=ct.call(It,fr)}catch(jn){Ut.error.call(It,jn);return}Ut.load.call(It,Mn)}else Ut.error.call(It,fr)}return fr.onprogress=function(on){var Mn=v.event;v.event=on;try{Ut.progress.call(It,fr)}finally{v.event=Mn}},It.header=function(on,Mn){return on=(on+"").toLowerCase(),arguments.length<2?hr[on]:(Mn==null?delete hr[on]:hr[on]=Mn+"",It)},It.mimeType=function(on){return arguments.length?(He=on==null?null:on+"",It):He},It.responseType=function(on){return arguments.length?(Pr=on,It):Pr},It.response=function(on){return ct=on,It},["get","post"].forEach(function(on){It[on]=function(){return It.send.apply(It,[on].concat(C(arguments)))}}),It.send=function(on,Mn,jn){if(arguments.length===2&&typeof Mn=="function"&&(jn=Mn,Mn=null),fr.open(on,Te,!0),He!=null&&!("accept"in hr)&&(hr.accept=He+",*/*"),fr.setRequestHeader)for(var Vn in hr)fr.setRequestHeader(Vn,hr[Vn]);return He!=null&&fr.overrideMimeType&&fr.overrideMimeType(He),Pr!=null&&(fr.responseType=Pr),jn!=null&&It.on("error",jn).on("load",function(Ka){jn(null,Ka)}),Ut.beforesend.call(It,fr),fr.send(Mn??null),It},It.abort=function(){return fr.abort(),It},v.rebind(It,Ut,"on"),Pt==null?It:It.get(An(Pt))}function An(Te){return Te.length===1?function(He,ct){Te(He==null?ct:null)}:Te}function Xn(Te){var He=Te.responseType;return He&&He!=="text"?Te.response:Te.responseText}v.dsv=function(Te,He){var ct=new RegExp('["'+Te+`
]`),Pt=Te.charCodeAt(0);function It(ln,on,Mn){arguments.length<3&&(Mn=on,on=null);var jn=Wr(ln,He,on==null?Ut:hr(on),Mn);return jn.row=function(Vn){return arguments.length?jn.response((on=Vn)==null?Ut:hr(Vn)):on},jn}function Ut(ln){return It.parse(ln.responseText)}function hr(ln){return function(on){return It.parse(on.responseText,ln)}}It.parse=function(ln,on){var Mn;return It.parseRows(ln,function(jn,Vn){if(Mn)return Mn(jn,Vn-1);var Ka=function(Zn){for(var ya={},Sa=jn.length,Xa=0;Xa<Sa;++Xa)ya[jn[Xa]]=Zn[Xa];return ya};Mn=on?function(Zn,ya){return on(Ka(Zn),ya)}:Ka})},It.parseRows=function(ln,on){var Mn={},jn={},Vn=[],Ka=ln.length,Zn=0,ya=0,Sa,Xa;function Qa(){if(Zn>=Ka)return jn;if(Xa)return Xa=!1,Mn;var Si=Zn;if(ln.charCodeAt(Si)===34){for(var ho=Si;ho++<Ka;)if(ln.charCodeAt(ho)===34){if(ln.charCodeAt(ho+1)!==34)break;++ho}Zn=ho+2;var Ki=ln.charCodeAt(ho+1);return Ki===13?(Xa=!0,ln.charCodeAt(ho+2)===10&&++Zn):Ki===10&&(Xa=!0),ln.slice(Si+1,ho).replace(/""/g,'"')}for(;Zn<Ka;){var Ki=ln.charCodeAt(Zn++),lo=1;if(Ki===10)Xa=!0;else if(Ki===13)Xa=!0,ln.charCodeAt(Zn)===10&&(++Zn,++lo);else if(Ki!==Pt)continue;return ln.slice(Si,Zn-lo)}return ln.slice(Si)}for(;(Sa=Qa())!==jn;){for(var Aa=[];Sa!==Mn&&Sa!==jn;)Aa.push(Sa),Sa=Qa();on&&(Aa=on(Aa,ya++))==null||Vn.push(Aa)}return Vn},It.format=function(ln){if(Array.isArray(ln[0]))return It.formatRows(ln);var on=new B,Mn=[];return ln.forEach(function(jn){for(var Vn in jn)on.has(Vn)||Mn.push(on.add(Vn))}),[Mn.map(Pr).join(Te)].concat(ln.map(function(jn){return Mn.map(function(Vn){return Pr(jn[Vn])}).join(Te)})).join(`
`)},It.formatRows=function(ln){return ln.map(fr).join(`
`)};function fr(ln){return ln.map(Pr).join(Te)}function Pr(ln){return ct.test(ln)?'"'+ln.replace(/\"/g,'""')+'"':ln}return It},v.csv=v.dsv(",","text/csv"),v.tsv=v.dsv("	","text/tab-separated-values");var na,ra,Sn,Wn,Fi=this[q(this,"requestAnimationFrame")]||function(Te){setTimeout(Te,17)};v.timer=function(){Ya.apply(this,arguments)};function Ya(Te,He,ct){var Pt=arguments.length;Pt<2&&(He=0),Pt<3&&(ct=Date.now());var It=ct+He,Ut={c:Te,t:It,n:null};return ra?ra.n=Ut:na=Ut,ra=Ut,Sn||(Wn=clearTimeout(Wn),Sn=1,Fi(Wi)),Ut}function Wi(){var Te=uo(),He=Ao()-Te;He>24?(isFinite(He)&&(clearTimeout(Wn),Wn=setTimeout(Wi,He)),Sn=0):(Sn=1,Fi(Wi))}v.timer.flush=function(){uo(),Ao()};function uo(){for(var Te=Date.now(),He=na;He;)Te>=He.t&&He.c(Te-He.t)&&(He.c=null),He=He.n;return Te}function Ao(){for(var Te,He=na,ct=1/0;He;)He.c?(He.t<ct&&(ct=He.t),He=(Te=He).n):He=Te?Te.n=He.n:na=He.n;return ra=Te,ct}v.round=function(Te,He){return He?Math.round(Te*(He=Math.pow(10,He)))/He:Math.round(Te)},v.geom={};function wo(Te){return Te[0]}function Uo(Te){return Te[1]}v.geom.hull=function(Te){var He=wo,ct=Uo;if(arguments.length)return Pt(Te);function Pt(It){if(It.length<3)return[];var Ut=Rt(He),hr=Rt(ct),fr,Pr=It.length,ln=[],on=[];for(fr=0;fr<Pr;fr++)ln.push([+Ut.call(this,It[fr],fr),+hr.call(this,It[fr],fr),fr]);for(ln.sort(ps),fr=0;fr<Pr;fr++)on.push([ln[fr][0],-ln[fr][1]]);var Mn=Ri(ln),jn=Ri(on),Vn=jn[0]===Mn[0],Ka=jn[jn.length-1]===Mn[Mn.length-1],Zn=[];for(fr=Mn.length-1;fr>=0;--fr)Zn.push(It[ln[Mn[fr]][2]]);for(fr=+Vn;fr<jn.length-Ka;++fr)Zn.push(It[ln[jn[fr]][2]]);return Zn}return Pt.x=function(It){return arguments.length?(He=It,Pt):He},Pt.y=function(It){return arguments.length?(ct=It,Pt):ct},Pt};function Ri(Te){for(var He=Te.length,ct=[0,1],Pt=2,It=2;It<He;It++){for(;Pt>1&&Nt(Te[ct[Pt-2]],Te[ct[Pt-1]],Te[It])<=0;)--Pt;ct[Pt++]=It}return ct.slice(0,Pt)}function ps(Te,He){return Te[0]-He[0]||Te[1]-He[1]}v.geom.polygon=function(Te){return W(Te,as),Te};var as=v.geom.polygon.prototype=[];as.area=function(){for(var Te=-1,He=this.length,ct,Pt=this[He-1],It=0;++Te<He;)ct=Pt,Pt=this[Te],It+=ct[1]*Pt[0]-ct[0]*Pt[1];return It*.5},as.centroid=function(Te){var He=-1,ct=this.length,Pt=0,It=0,Ut,hr=this[ct-1],fr;for(arguments.length||(Te=-1/(6*this.area()));++He<ct;)Ut=hr,hr=this[He],fr=Ut[0]*hr[1]-hr[0]*Ut[1],Pt+=(Ut[0]+hr[0])*fr,It+=(Ut[1]+hr[1])*fr;return[Pt*Te,It*Te]},as.clip=function(Te){for(var He,ct=hs(Te),Pt=-1,It=this.length-hs(this),Ut,hr,fr=this[It-1],Pr,ln,on;++Pt<It;){for(He=Te.slice(),Te.length=0,Pr=this[Pt],ln=He[(hr=He.length-ct)-1],Ut=-1;++Ut<hr;)on=He[Ut],el(on,fr,Pr)?(el(ln,fr,Pr)||Te.push(As(ln,on,fr,Pr)),Te.push(on)):el(ln,fr,Pr)&&Te.push(As(ln,on,fr,Pr)),ln=on;ct&&Te.push(Te[0]),fr=Pr}return Te};function el(Te,He,ct){return(ct[0]-He[0])*(Te[1]-He[1])<(ct[1]-He[1])*(Te[0]-He[0])}function As(Te,He,ct,Pt){var It=Te[0],Ut=ct[0],hr=He[0]-It,fr=Pt[0]-Ut,Pr=Te[1],ln=ct[1],on=He[1]-Pr,Mn=Pt[1]-ln,jn=(fr*(Pr-ln)-Mn*(It-Ut))/(Mn*hr-fr*on);return[It+jn*hr,Pr+jn*on]}function hs(Te){var He=Te[0],ct=Te[Te.length-1];return!(He[0]-ct[0]||He[1]-ct[1])}var es,tl,Ks,pl=[],Ss,ls,Lo=[];function Es(){Xs(this),this.edge=this.site=this.circle=null}function ml(Te){var He=pl.pop()||new Es;return He.site=Te,He}function zl(Te){yl(Te),Ks.remove(Te),pl.push(Te),Xs(Te)}function Bl(Te){var He=Te.circle,ct=He.x,Pt=He.cy,It={x:ct,y:Pt},Ut=Te.P,hr=Te.N,fr=[Te];zl(Te);for(var Pr=Ut;Pr.circle&&c(ct-Pr.circle.x)<ot&&c(Pt-Pr.circle.cy)<ot;)Ut=Pr.P,fr.unshift(Pr),zl(Pr),Pr=Ut;fr.unshift(Pr),yl(Pr);for(var ln=hr;ln.circle&&c(ct-ln.circle.x)<ot&&c(Pt-ln.circle.cy)<ot;)hr=ln.N,fr.push(ln),zl(ln),ln=hr;fr.push(ln),yl(ln);var on=fr.length,Mn;for(Mn=1;Mn<on;++Mn)ln=fr[Mn],Pr=fr[Mn-1],Wo(ln.edge,Pr.site,ln.site,It);Pr=fr[0],ln=fr[on-1],ln.edge=Kl(Pr.site,ln.site,null,It),rl(Pr),rl(ln)}function Fs(Te){for(var He=Te.x,ct=Te.y,Pt,It,Ut,hr,fr=Ks._;fr;)if(Ut=Di(fr,ct)-He,Ut>ot)fr=fr.L;else if(hr=He-_o(fr,ct),hr>ot){if(!fr.R){Pt=fr;break}fr=fr.R}else{Ut>-ot?(Pt=fr.P,It=fr):hr>-ot?(Pt=fr,It=fr.N):Pt=It=fr;break}var Pr=ml(Te);if(Ks.insert(Pt,Pr),!(!Pt&&!It)){if(Pt===It){yl(Pt),It=ml(Pt.site),Ks.insert(Pr,It),Pr.edge=It.edge=Kl(Pt.site,Pr.site),rl(Pt),rl(It);return}if(!It){Pr.edge=Kl(Pt.site,Pr.site);return}yl(Pt),yl(It);var ln=Pt.site,on=ln.x,Mn=ln.y,jn=Te.x-on,Vn=Te.y-Mn,Ka=It.site,Zn=Ka.x-on,ya=Ka.y-Mn,Sa=2*(jn*ya-Vn*Zn),Xa=jn*jn+Vn*Vn,Qa=Zn*Zn+ya*ya,Aa={x:(ya*Xa-Vn*Qa)/Sa+on,y:(jn*Qa-Zn*Xa)/Sa+Mn};Wo(It.edge,ln,Ka,Aa),Pr.edge=Kl(ln,Te,null,Aa),It.edge=Kl(Te,Ka,null,Aa),rl(Pt),rl(It)}}function Di(Te,He){var ct=Te.site,Pt=ct.x,It=ct.y,Ut=It-He;if(!Ut)return Pt;var hr=Te.P;if(!hr)return-1/0;ct=hr.site;var fr=ct.x,Pr=ct.y,ln=Pr-He;if(!ln)return fr;var on=fr-Pt,Mn=1/Ut-1/ln,jn=on/ln;return Mn?(-jn+Math.sqrt(jn*jn-2*Mn*(on*on/(-2*ln)-Pr+ln/2+It-Ut/2)))/Mn+Pt:(Pt+fr)/2}function _o(Te,He){var ct=Te.N;if(ct)return Di(ct,He);var Pt=Te.site;return Pt.y===He?Pt.x:1/0}function Nl(Te){this.site=Te,this.edges=[]}Nl.prototype.prepare=function(){for(var Te=this.edges,He=Te.length,ct;He--;)ct=Te[He].edge,(!ct.b||!ct.a)&&Te.splice(He,1);return Te.sort(Ko),Te.length};function Vs(Te){for(var He=Te[0][0],ct=Te[1][0],Pt=Te[0][1],It=Te[1][1],Ut,hr,fr,Pr,ln=tl,on=ln.length,Mn,jn,Vn,Ka,Zn,ya;on--;)if(Mn=ln[on],!(!Mn||!Mn.prepare()))for(Vn=Mn.edges,Ka=Vn.length,jn=0;jn<Ka;)ya=Vn[jn].end(),fr=ya.x,Pr=ya.y,Zn=Vn[++jn%Ka].start(),Ut=Zn.x,hr=Zn.y,(c(fr-Ut)>ot||c(Pr-hr)>ot)&&(Vn.splice(jn,0,new pu(Jl(Mn.site,ya,c(fr-He)<ot&&It-Pr>ot?{x:He,y:c(Ut-He)<ot?hr:It}:c(Pr-It)<ot&&ct-fr>ot?{x:c(hr-It)<ot?Ut:ct,y:It}:c(fr-ct)<ot&&Pr-Pt>ot?{x:ct,y:c(Ut-ct)<ot?hr:Pt}:c(Pr-Pt)<ot&&fr-He>ot?{x:c(hr-Pt)<ot?Ut:He,y:Pt}:null),Mn.site,null)),++Ka)}function Ko(Te,He){return He.angle-Te.angle}function jl(){Xs(this),this.x=this.y=this.arc=this.site=this.cy=null}function rl(Te){var He=Te.P,ct=Te.N;if(!(!He||!ct)){var Pt=He.site,It=Te.site,Ut=ct.site;if(Pt!==Ut){var hr=It.x,fr=It.y,Pr=Pt.x-hr,ln=Pt.y-fr,on=Ut.x-hr,ya=Ut.y-fr,Mn=2*(Pr*ya-ln*on);if(!(Mn>=-De)){var jn=Pr*Pr+ln*ln,Vn=on*on+ya*ya,Ka=(ya*jn-ln*Vn)/Mn,Zn=(Pr*Vn-on*jn)/Mn,ya=Zn+fr,Sa=Lo.pop()||new jl;Sa.arc=Te,Sa.site=It,Sa.x=Ka+hr,Sa.y=ya+Math.sqrt(Ka*Ka+Zn*Zn),Sa.cy=ya,Te.circle=Sa;for(var Xa=null,Qa=ls._;Qa;)if(Sa.y<Qa.y||Sa.y===Qa.y&&Sa.x<=Qa.x)if(Qa.L)Qa=Qa.L;else{Xa=Qa.P;break}else if(Qa.R)Qa=Qa.R;else{Xa=Qa;break}ls.insert(Xa,Sa),Xa||(Ss=Sa)}}}}function yl(Te){var He=Te.circle;He&&(He.P||(Ss=He.N),ls.remove(He),Lo.push(He),Xs(He),Te.circle=null)}function Cu(Te,He,ct,Pt){return function(It){var Ut=It.a,hr=It.b,fr=Ut.x,Pr=Ut.y,ln=hr.x,on=hr.y,Mn=0,jn=1,Vn=ln-fr,Ka=on-Pr,Zn;if(Zn=Te-fr,!(!Vn&&Zn>0)){if(Zn/=Vn,Vn<0){if(Zn<Mn)return;Zn<jn&&(jn=Zn)}else if(Vn>0){if(Zn>jn)return;Zn>Mn&&(Mn=Zn)}if(Zn=ct-fr,!(!Vn&&Zn<0)){if(Zn/=Vn,Vn<0){if(Zn>jn)return;Zn>Mn&&(Mn=Zn)}else if(Vn>0){if(Zn<Mn)return;Zn<jn&&(jn=Zn)}if(Zn=He-Pr,!(!Ka&&Zn>0)){if(Zn/=Ka,Ka<0){if(Zn<Mn)return;Zn<jn&&(jn=Zn)}else if(Ka>0){if(Zn>jn)return;Zn>Mn&&(Mn=Zn)}if(Zn=Pt-Pr,!(!Ka&&Zn<0)){if(Zn/=Ka,Ka<0){if(Zn>jn)return;Zn>Mn&&(Mn=Zn)}else if(Ka>0){if(Zn<Mn)return;Zn<jn&&(jn=Zn)}return Mn>0&&(It.a={x:fr+Mn*Vn,y:Pr+Mn*Ka}),jn<1&&(It.b={x:fr+jn*Vn,y:Pr+jn*Ka}),It}}}}}}function yo(Te){for(var He=es,ct=Cu(Te[0][0],Te[0][1],Te[1][0],Te[1][1]),Pt=He.length,It;Pt--;)It=He[Pt],(!Ps(It,Te)||!ct(It)||c(It.a.x-It.b.x)<ot&&c(It.a.y-It.b.y)<ot)&&(It.a=It.b=null,He.splice(Pt,1))}function Ps(Te,He){var ct=Te.b;if(ct)return!0;var Pt=Te.a,It=He[0][0],Ut=He[1][0],hr=He[0][1],fr=He[1][1],Pr=Te.l,ln=Te.r,on=Pr.x,Mn=Pr.y,jn=ln.x,Vn=ln.y,Ka=(on+jn)/2,Zn=(Mn+Vn)/2,ya,Sa;if(Vn===Mn){if(Ka<It||Ka>=Ut)return;if(on>jn){if(!Pt)Pt={x:Ka,y:hr};else if(Pt.y>=fr)return;ct={x:Ka,y:fr}}else{if(!Pt)Pt={x:Ka,y:fr};else if(Pt.y<hr)return;ct={x:Ka,y:hr}}}else if(ya=(on-jn)/(Vn-Mn),Sa=Zn-ya*Ka,ya<-1||ya>1)if(on>jn){if(!Pt)Pt={x:(hr-Sa)/ya,y:hr};else if(Pt.y>=fr)return;ct={x:(fr-Sa)/ya,y:fr}}else{if(!Pt)Pt={x:(fr-Sa)/ya,y:fr};else if(Pt.y<hr)return;ct={x:(hr-Sa)/ya,y:hr}}else if(Mn<Vn){if(!Pt)Pt={x:It,y:ya*It+Sa};else if(Pt.x>=Ut)return;ct={x:Ut,y:ya*Ut+Sa}}else{if(!Pt)Pt={x:Ut,y:ya*Ut+Sa};else if(Pt.x<It)return;ct={x:It,y:ya*It+Sa}}return Te.a=Pt,Te.b=ct,!0}function ms(Te,He){this.l=Te,this.r=He,this.a=this.b=null}function Kl(Te,He,ct,Pt){var It=new ms(Te,He);return es.push(It),ct&&Wo(It,Te,He,ct),Pt&&Wo(It,He,Te,Pt),tl[Te.i].edges.push(new pu(It,Te,He)),tl[He.i].edges.push(new pu(It,He,Te)),It}function Jl(Te,He,ct){var Pt=new ms(Te,null);return Pt.a=He,Pt.b=ct,es.push(Pt),Pt}function Wo(Te,He,ct,Pt){!Te.a&&!Te.b?(Te.a=Pt,Te.l=He,Te.r=ct):Te.l===ct?Te.b=Pt:Te.a=Pt}function pu(Te,He,ct){var Pt=Te.a,It=Te.b;this.edge=Te,this.site=He,this.angle=ct?Math.atan2(ct.y-He.y,ct.x-He.x):Te.l===He?Math.atan2(It.x-Pt.x,Pt.y-It.y):Math.atan2(Pt.x-It.x,It.y-Pt.y)}pu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function _u(){this._=null}function Xs(Te){Te.U=Te.C=Te.L=Te.R=Te.P=Te.N=null}_u.prototype={insert:function(Te,He){var ct,Pt,It;if(Te){if(He.P=Te,He.N=Te.N,Te.N&&(Te.N.P=He),Te.N=He,Te.R){for(Te=Te.R;Te.L;)Te=Te.L;Te.L=He}else Te.R=He;ct=Te}else this._?(Te=Yl(this._),He.P=null,He.N=Te,Te.P=Te.L=He,ct=Te):(He.P=He.N=null,this._=He,ct=null);for(He.L=He.R=null,He.U=ct,He.C=!0,Te=He;ct&&ct.C;)Pt=ct.U,ct===Pt.L?(It=Pt.R,It&&It.C?(ct.C=It.C=!1,Pt.C=!0,Te=Pt):(Te===ct.R&&(Pl(this,ct),Te=ct,ct=Te.U),ct.C=!1,Pt.C=!0,Gl(this,Pt))):(It=Pt.L,It&&It.C?(ct.C=It.C=!1,Pt.C=!0,Te=Pt):(Te===ct.L&&(Gl(this,ct),Te=ct,ct=Te.U),ct.C=!1,Pt.C=!0,Pl(this,Pt))),ct=Te.U;this._.C=!1},remove:function(Te){Te.N&&(Te.N.P=Te.P),Te.P&&(Te.P.N=Te.N),Te.N=Te.P=null;var He=Te.U,ct,Pt=Te.L,It=Te.R,Ut,hr;if(Pt?It?Ut=Yl(It):Ut=Pt:Ut=It,He?He.L===Te?He.L=Ut:He.R=Ut:this._=Ut,Pt&&It?(hr=Ut.C,Ut.C=Te.C,Ut.L=Pt,Pt.U=Ut,Ut!==It?(He=Ut.U,Ut.U=Te.U,Te=Ut.R,He.L=Te,Ut.R=It,It.U=Ut):(Ut.U=He,He=Ut,Te=Ut.R)):(hr=Te.C,Te=Ut),Te&&(Te.U=He),!hr){if(Te&&Te.C){Te.C=!1;return}do{if(Te===this._)break;if(Te===He.L){if(ct=He.R,ct.C&&(ct.C=!1,He.C=!0,Pl(this,He),ct=He.R),ct.L&&ct.L.C||ct.R&&ct.R.C){(!ct.R||!ct.R.C)&&(ct.L.C=!1,ct.C=!0,Gl(this,ct),ct=He.R),ct.C=He.C,He.C=ct.R.C=!1,Pl(this,He),Te=this._;break}}else if(ct=He.L,ct.C&&(ct.C=!1,He.C=!0,Gl(this,He),ct=He.L),ct.L&&ct.L.C||ct.R&&ct.R.C){(!ct.L||!ct.L.C)&&(ct.R.C=!1,ct.C=!0,Pl(this,ct),ct=He.L),ct.C=He.C,He.C=ct.L.C=!1,Gl(this,He),Te=this._;break}ct.C=!0,Te=He,He=He.U}while(!Te.C);Te&&(Te.C=!1)}}};function Pl(Te,He){var ct=He,Pt=He.R,It=ct.U;It?It.L===ct?It.L=Pt:It.R=Pt:Te._=Pt,Pt.U=It,ct.U=Pt,ct.R=Pt.L,ct.R&&(ct.R.U=ct),Pt.L=ct}function Gl(Te,He){var ct=He,Pt=He.L,It=ct.U;It?It.L===ct?It.L=Pt:It.R=Pt:Te._=Pt,Pt.U=It,ct.U=Pt,ct.L=Pt.R,ct.L&&(ct.L.U=ct),Pt.R=ct}function Yl(Te){for(;Te.L;)Te=Te.L;return Te}function tc(Te,He){var ct=Te.sort(bf).pop(),Pt,It,Ut;for(es=[],tl=new Array(Te.length),Ks=new _u,ls=new _u;;)if(Ut=Ss,ct&&(!Ut||ct.y<Ut.y||ct.y===Ut.y&&ct.x<Ut.x))(ct.x!==Pt||ct.y!==It)&&(tl[ct.i]=new Nl(ct),Fs(ct),Pt=ct.x,It=ct.y),ct=Te.pop();else if(Ut)Bl(Ut.arc);else break;He&&(yo(He),Vs(He));var hr={cells:tl,edges:es};return Ks=ls=es=tl=null,hr}function bf(Te,He){return He.y-Te.y||He.x-Te.x}v.geom.voronoi=function(Te){var He=wo,ct=Uo,Pt=He,It=ct,Ut=Qc;if(Te)return hr(Te);function hr(Pr){var ln=new Array(Pr.length),on=Ut[0][0],Mn=Ut[0][1],jn=Ut[1][0],Vn=Ut[1][1];return tc(fr(Pr),Ut).cells.forEach(function(Ka,Zn){var ya=Ka.edges,Sa=Ka.site,Xa=ln[Zn]=ya.length?ya.map(function(Qa){var Aa=Qa.start();return[Aa.x,Aa.y]}):Sa.x>=on&&Sa.x<=jn&&Sa.y>=Mn&&Sa.y<=Vn?[[on,Vn],[jn,Vn],[jn,Mn],[on,Mn]]:[];Xa.point=Pr[Zn]}),ln}function fr(Pr){return Pr.map(function(ln,on){return{x:Math.round(Pt(ln,on)/ot)*ot,y:Math.round(It(ln,on)/ot)*ot,i:on}})}return hr.links=function(Pr){return tc(fr(Pr)).edges.filter(function(ln){return ln.l&&ln.r}).map(function(ln){return{source:Pr[ln.l.i],target:Pr[ln.r.i]}})},hr.triangles=function(Pr){var ln=[];return tc(fr(Pr)).cells.forEach(function(on,Mn){for(var jn=on.site,Vn=on.edges.sort(Ko),Ka=-1,Zn=Vn.length,ya,Sa=Vn[Zn-1].edge,Xa=Sa.l===jn?Sa.r:Sa.l;++Ka<Zn;)ya=Xa,Sa=Vn[Ka].edge,Xa=Sa.l===jn?Sa.r:Sa.l,Mn<ya.i&&Mn<Xa.i&&ff(jn,ya,Xa)<0&&ln.push([Pr[Mn],Pr[ya.i],Pr[Xa.i]])}),ln},hr.x=function(Pr){return arguments.length?(Pt=Rt(He=Pr),hr):He},hr.y=function(Pr){return arguments.length?(It=Rt(ct=Pr),hr):ct},hr.clipExtent=function(Pr){return arguments.length?(Ut=Pr??Qc,hr):Ut===Qc?null:Ut},hr.size=function(Pr){return arguments.length?hr.clipExtent(Pr&&[[0,0],Pr]):Ut===Qc?null:Ut&&Ut[1]},hr};var Qc=[[-1e6,-1e6],[1e6,1e6]];function ff(Te,He,ct){return(Te.x-ct.x)*(He.y-Te.y)-(Te.x-He.x)*(ct.y-Te.y)}v.geom.delaunay=function(Te){return v.geom.voronoi().triangles(Te)},v.geom.quadtree=function(Te,He,ct,Pt,It){var Ut=wo,hr=Uo,fr;if(fr=arguments.length)return Ut=Wh,hr=Dh,fr===3&&(It=ct,Pt=He,ct=He=0),Pr(Te);function Pr(ln){var on,Mn=Rt(Ut),jn=Rt(hr),Vn,Ka,Zn,ya,Sa,Xa,Qa,Aa;if(He!=null)Sa=He,Xa=ct,Qa=Pt,Aa=It;else if(Qa=Aa=-(Sa=Xa=1/0),Vn=[],Ka=[],ya=ln.length,fr)for(Zn=0;Zn<ya;++Zn)on=ln[Zn],on.x<Sa&&(Sa=on.x),on.y<Xa&&(Xa=on.y),on.x>Qa&&(Qa=on.x),on.y>Aa&&(Aa=on.y),Vn.push(on.x),Ka.push(on.y);else for(Zn=0;Zn<ya;++Zn){var Si=+Mn(on=ln[Zn],Zn),ho=+jn(on,Zn);Si<Sa&&(Sa=Si),ho<Xa&&(Xa=ho),Si>Qa&&(Qa=Si),ho>Aa&&(Aa=ho),Vn.push(Si),Ka.push(ho)}var Ki=Qa-Sa,lo=Aa-Xa;Ki>lo?Aa=Xa+Ki:Qa=Sa+lo;function zo(Go,bs,fl,ju,ou,So,qs,sl){if(!(isNaN(fl)||isNaN(ju)))if(Go.leaf){var tu=Go.x,Vl=Go.y;if(tu!=null)if(c(tu-fl)+c(Vl-ju)<.01)qo(Go,bs,fl,ju,ou,So,qs,sl);else{var Lc=Go.point;Go.x=Go.y=Go.point=null,qo(Go,Lc,tu,Vl,ou,So,qs,sl),qo(Go,bs,fl,ju,ou,So,qs,sl)}else Go.x=fl,Go.y=ju,Go.point=bs}else qo(Go,bs,fl,ju,ou,So,qs,sl)}function qo(Go,bs,fl,ju,ou,So,qs,sl){var tu=(ou+qs)*.5,Vl=(So+sl)*.5,Lc=fl>=tu,Ol=ju>=Vl,ru=Ol<<1|Lc;Go.leaf=!1,Go=Go.nodes[ru]||(Go.nodes[ru]=Ll()),Lc?ou=tu:qs=tu,Ol?So=Vl:sl=Vl,zo(Go,bs,fl,ju,ou,So,qs,sl)}var nl=Ll();if(nl.add=function(Go){zo(nl,Go,+Mn(Go,++Zn),+jn(Go,Zn),Sa,Xa,Qa,Aa)},nl.visit=function(Go){jc(Go,nl,Sa,Xa,Qa,Aa)},nl.find=function(Go){return Yh(nl,Go[0],Go[1],Sa,Xa,Qa,Aa)},Zn=-1,He==null){for(;++Zn<ya;)zo(nl,ln[Zn],Vn[Zn],Ka[Zn],Sa,Xa,Qa,Aa);--Zn}else ln.forEach(nl.add);return Vn=Ka=ln=on=null,nl}return Pr.x=function(ln){return arguments.length?(Ut=ln,Pr):Ut},Pr.y=function(ln){return arguments.length?(hr=ln,Pr):hr},Pr.extent=function(ln){return arguments.length?(ln==null?He=ct=Pt=It=null:(He=+ln[0][0],ct=+ln[0][1],Pt=+ln[1][0],It=+ln[1][1]),Pr):He==null?null:[[He,ct],[Pt,It]]},Pr.size=function(ln){return arguments.length?(ln==null?He=ct=Pt=It=null:(He=ct=0,Pt=+ln[0],It=+ln[1]),Pr):He==null?null:[Pt-He,It-ct]},Pr};function Wh(Te){return Te.x}function Dh(Te){return Te.y}function Ll(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function jc(Te,He,ct,Pt,It,Ut){if(!Te(He,ct,Pt,It,Ut)){var hr=(ct+It)*.5,fr=(Pt+Ut)*.5,Pr=He.nodes;Pr[0]&&jc(Te,Pr[0],ct,Pt,hr,fr),Pr[1]&&jc(Te,Pr[1],hr,Pt,It,fr),Pr[2]&&jc(Te,Pr[2],ct,fr,hr,Ut),Pr[3]&&jc(Te,Pr[3],hr,fr,It,Ut)}}function Yh(Te,He,ct,Pt,It,Ut,hr){var fr=1/0,Pr;return(function ln(on,Mn,jn,Vn,Ka){if(!(Mn>Ut||jn>hr||Vn<Pt||Ka<It)){if(Zn=on.point){var Zn,ya=He-on.x,Sa=ct-on.y,Xa=ya*ya+Sa*Sa;if(Xa<fr){var Qa=Math.sqrt(fr=Xa);Pt=He-Qa,It=ct-Qa,Ut=He+Qa,hr=ct+Qa,Pr=Zn}}for(var Aa=on.nodes,Si=(Mn+Vn)*.5,ho=(jn+Ka)*.5,Ki=He>=Si,lo=ct>=ho,zo=lo<<1|Ki,qo=zo+4;zo<qo;++zo)if(on=Aa[zo&3])switch(zo&3){case 0:ln(on,Mn,jn,Si,ho);break;case 1:ln(on,Si,jn,Vn,ho);break;case 2:ln(on,Mn,ho,Si,Ka);break;case 3:ln(on,Si,ho,Vn,Ka);break}}})(Te,Pt,It,Ut,hr),Pr}v.interpolateRgb=hc;function hc(Te,He){Te=v.rgb(Te),He=v.rgb(He);var ct=Te.r,Pt=Te.g,It=Te.b,Ut=He.r-ct,hr=He.g-Pt,fr=He.b-It;return function(Pr){return"#"+Ur(Math.round(ct+Ut*Pr))+Ur(Math.round(Pt+hr*Pr))+Ur(Math.round(It+fr*Pr))}}v.interpolateObject=rc;function rc(Te,He){var ct={},Pt={},It;for(It in Te)It in He?ct[It]=Js(Te[It],He[It]):Pt[It]=Te[It];for(It in He)It in Te||(Pt[It]=He[It]);return function(Ut){for(It in ct)Pt[It]=ct[It](Ut);return Pt}}v.interpolateNumber=dc;function dc(Te,He){return Te=+Te,He=+He,function(ct){return Te*(1-ct)+He*ct}}v.interpolateString=hf;function hf(Te,He){var ct=au.lastIndex=nc.lastIndex=0,Pt,It,Ut,hr=-1,fr=[],Pr=[];for(Te=Te+"",He=He+"";(Pt=au.exec(Te))&&(It=nc.exec(He));)(Ut=It.index)>ct&&(Ut=He.slice(ct,Ut),fr[hr]?fr[hr]+=Ut:fr[++hr]=Ut),(Pt=Pt[0])===(It=It[0])?fr[hr]?fr[hr]+=It:fr[++hr]=It:(fr[++hr]=null,Pr.push({i:hr,x:dc(Pt,It)})),ct=nc.lastIndex;return ct<He.length&&(Ut=He.slice(ct),fr[hr]?fr[hr]+=Ut:fr[++hr]=Ut),fr.length<2?Pr[0]?(He=Pr[0].x,function(ln){return He(ln)+""}):function(){return He}:(He=Pr.length,function(ln){for(var on=0,Mn;on<He;++on)fr[(Mn=Pr[on]).i]=Mn.x(ln);return fr.join("")})}var au=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nc=new RegExp(au.source,"g");v.interpolate=Js;function Js(Te,He){for(var ct=v.interpolators.length,Pt;--ct>=0&&!(Pt=v.interpolators[ct](Te,He)););return Pt}v.interpolators=[function(Te,He){var ct=typeof He;return(ct==="string"?hn.has(He.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(He)?hc:hf:He instanceof ba?hc:Array.isArray(He)?Ul:ct==="object"&&isNaN(He)?rc:dc)(Te,He)}],v.interpolateArray=Ul;function Ul(Te,He){var ct=[],Pt=[],It=Te.length,Ut=He.length,hr=Math.min(Te.length,He.length),fr;for(fr=0;fr<hr;++fr)ct.push(Js(Te[fr],He[fr]));for(;fr<It;++fr)Pt[fr]=Te[fr];for(;fr<Ut;++fr)Pt[fr]=He[fr];return function(Pr){for(fr=0;fr<hr;++fr)Pt[fr]=ct[fr](Pr);return Pt}}var Df=function(){return U},Cc=v.map({linear:Df,poly:dh,quad:function(){return cv},cubic:function(){return Tl},sin:function(){return df},exp:function(){return Hu},circle:function(){return Zh},elastic:Yf,back:wh,bounce:function(){return ac}}),Wf=v.map({in:U,out:Vd,"in-out":Ws,"out-in":function(Te){return Ws(Vd(Te))}});v.ease=function(Te){var He=Te.indexOf("-"),ct=He>=0?Te.slice(0,He):Te,Pt=He>=0?Te.slice(He+1):"in";return ct=Cc.get(ct)||Df,Pt=Wf.get(Pt)||U,mu(Pt(ct.apply(null,w.call(arguments,1))))};function mu(Te){return function(He){return He<=0?0:He>=1?1:Te(He)}}function Vd(Te){return function(He){return 1-Te(1-He)}}function Ws(Te){return function(He){return .5*(He<.5?Te(2*He):2-Te(2-2*He))}}function cv(Te){return Te*Te}function Tl(Te){return Te*Te*Te}function Zo(Te){if(Te<=0)return 0;if(Te>=1)return 1;var He=Te*Te,ct=He*Te;return 4*(Te<.5?ct:3*(Te-He)+ct-.75)}function dh(Te){return function(He){return Math.pow(He,Te)}}function df(Te){return 1-Math.cos(Te*tt)}function Hu(Te){return Math.pow(2,10*(Te-1))}function Zh(Te){return 1-Math.sqrt(1-Te*Te)}function Yf(Te,He){var ct;return arguments.length<2&&(He=.45),arguments.length?ct=He/Ae*Math.asin(1/Te):(Te=1,ct=He/4),function(Pt){return 1+Te*Math.pow(2,-10*Pt)*Math.sin((Pt-ct)*Ae/He)}}function wh(Te){return Te||(Te=1.70158),function(He){return He*He*((Te+1)*He-Te)}}function ac(Te){return Te<1/2.75?7.5625*Te*Te:Te<2/2.75?7.5625*(Te-=1.5/2.75)*Te+.75:Te<2.5/2.75?7.5625*(Te-=2.25/2.75)*Te+.9375:7.5625*(Te-=2.625/2.75)*Te+.984375}v.interpolateHcl=Cd;function Cd(Te,He){Te=v.hcl(Te),He=v.hcl(He);var ct=Te.h,Pt=Te.c,It=Te.l,Ut=He.h-ct,hr=He.c-Pt,fr=He.l-It;return isNaN(hr)&&(hr=0,Pt=isNaN(Pt)?He.c:Pt),isNaN(Ut)?(Ut=0,ct=isNaN(ct)?He.h:ct):Ut>180?Ut-=360:Ut<-180&&(Ut+=360),function(Pr){return yr(ct+Ut*Pr,Pt+hr*Pr,It+fr*Pr)+""}}v.interpolateHsl=ad;function ad(Te,He){Te=v.hsl(Te),He=v.hsl(He);var ct=Te.h,Pt=Te.s,It=Te.l,Ut=He.h-ct,hr=He.s-Pt,fr=He.l-It;return isNaN(hr)&&(hr=0,Pt=isNaN(Pt)?He.s:Pt),isNaN(Ut)?(Ut=0,ct=isNaN(ct)?He.h:ct):Ut>180?Ut-=360:Ut<-180&&(Ut+=360),function(Pr){return ui(ct+Ut*Pr,Pt+hr*Pr,It+fr*Pr)+""}}v.interpolateLab=Th;function Th(Te,He){Te=v.lab(Te),He=v.lab(He);var ct=Te.l,Pt=Te.a,It=Te.b,Ut=He.l-ct,hr=He.a-Pt,fr=He.b-It;return function(Pr){return Da(ct+Ut*Pr,Pt+hr*Pr,It+fr*Pr)+""}}v.interpolateRound=Zf;function Zf(Te,He){return He-=Te,function(ct){return Math.round(Te+He*ct)}}v.transform=function(Te){var He=P.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(ct){if(ct!=null){He.setAttribute("transform",ct);var Pt=He.transform.baseVal.consolidate()}return new $h(Pt?Pt.matrix:Of)})(Te)};function $h(Te){var He=[Te.a,Te.b],ct=[Te.c,Te.d],Pt=vf(He),It=Kh(He,ct),Ut=vf(id(ct,He,-It))||0;He[0]*ct[1]<ct[0]*He[1]&&(He[0]*=-1,He[1]*=-1,Pt*=-1,It*=-1),this.rotate=(Pt?Math.atan2(He[1],He[0]):Math.atan2(-ct[0],ct[1]))*Ft,this.translate=[Te.e,Te.f],this.scale=[Pt,Ut],this.skew=Ut?Math.atan2(It,Ut)*Ft:0}$h.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Kh(Te,He){return Te[0]*He[0]+Te[1]*He[1]}function vf(Te){var He=Math.sqrt(Kh(Te,Te));return He&&(Te[0]/=He,Te[1]/=He),He}function id(Te,He,ct){return Te[0]+=ct*He[0],Te[1]+=ct*He[1],Te}var Of={a:1,b:0,c:0,d:1,e:0,f:0};v.interpolateTransform=Oh;function wf(Te){return Te.length?Te.pop()+",":""}function ic(Te,He,ct,Pt){if(Te[0]!==He[0]||Te[1]!==He[1]){var It=ct.push("translate(",null,",",null,")");Pt.push({i:It-4,x:dc(Te[0],He[0])},{i:It-2,x:dc(Te[1],He[1])})}else(He[0]||He[1])&&ct.push("translate("+He+")")}function ih(Te,He,ct,Pt){Te!==He?(Te-He>180?He+=360:He-Te>180&&(Te+=360),Pt.push({i:ct.push(wf(ct)+"rotate(",null,")")-2,x:dc(Te,He)})):He&&ct.push(wf(ct)+"rotate("+He+")")}function Jh(Te,He,ct,Pt){Te!==He?Pt.push({i:ct.push(wf(ct)+"skewX(",null,")")-2,x:dc(Te,He)}):He&&ct.push(wf(ct)+"skewX("+He+")")}function Xl(Te,He,ct,Pt){if(Te[0]!==He[0]||Te[1]!==He[1]){var It=ct.push(wf(ct)+"scale(",null,",",null,")");Pt.push({i:It-4,x:dc(Te[0],He[0])},{i:It-2,x:dc(Te[1],He[1])})}else(He[0]!==1||He[1]!==1)&&ct.push(wf(ct)+"scale("+He+")")}function Oh(Te,He){var ct=[],Pt=[];return Te=v.transform(Te),He=v.transform(He),ic(Te.translate,He.translate,ct,Pt),ih(Te.rotate,He.rotate,ct,Pt),Jh(Te.skew,He.skew,ct,Pt),Xl(Te.scale,He.scale,ct,Pt),Te=He=null,function(It){for(var Ut=-1,hr=Pt.length,fr;++Ut<hr;)ct[(fr=Pt[Ut]).i]=fr.x(It);return ct.join("")}}function Hd(Te,He){return He=(He-=Te=+Te)||1/He,function(ct){return(ct-Te)/He}}function od(Te,He){return He=(He-=Te=+Te)||1/He,function(ct){return Math.max(0,Math.min(1,(ct-Te)/He))}}v.layout={},v.layout.bundle=function(){return function(Te){for(var He=[],ct=-1,Pt=Te.length;++ct<Pt;)He.push(Ah(Te[ct]));return He}};function Ah(Te){for(var He=Te.source,ct=Te.target,Pt=Uc(He,ct),It=[He];He!==Pt;)He=He.parent,It.push(He);for(var Ut=It.length;ct!==Pt;)It.splice(Ut,0,ct),ct=ct.parent;return It}function sd(Te){for(var He=[],ct=Te.parent;ct!=null;)He.push(Te),Te=ct,ct=ct.parent;return He.push(Te),He}function Uc(Te,He){if(Te===He)return Te;for(var ct=sd(Te),Pt=sd(He),It=ct.pop(),Ut=Pt.pop(),hr=null;It===Ut;)hr=It,It=ct.pop(),Ut=Pt.pop();return hr}v.layout.chord=function(){var Te={},He,ct,Pt,It,Ut=0,hr,fr,Pr;function ln(){var Mn={},jn=[],Vn=v.range(It),Ka=[],Zn,ya,Sa,Xa,Qa;for(He=[],ct=[],Zn=0,Xa=-1;++Xa<It;){for(ya=0,Qa=-1;++Qa<It;)ya+=Pt[Xa][Qa];jn.push(ya),Ka.push(v.range(It)),Zn+=ya}for(hr&&Vn.sort(function(nl,Go){return hr(jn[nl],jn[Go])}),fr&&Ka.forEach(function(nl,Go){nl.sort(function(bs,fl){return fr(Pt[Go][bs],Pt[Go][fl])})}),Zn=(Ae-Ut*It)/Zn,ya=0,Xa=-1;++Xa<It;){for(Sa=ya,Qa=-1;++Qa<It;){var Aa=Vn[Xa],Si=Ka[Aa][Qa],ho=Pt[Aa][Si],Ki=ya,lo=ya+=ho*Zn;Mn[Aa+"-"+Si]={index:Aa,subindex:Si,startAngle:Ki,endAngle:lo,value:ho}}ct[Aa]={index:Aa,startAngle:Sa,endAngle:ya,value:jn[Aa]},ya+=Ut}for(Xa=-1;++Xa<It;)for(Qa=Xa-1;++Qa<It;){var zo=Mn[Xa+"-"+Qa],qo=Mn[Qa+"-"+Xa];(zo.value||qo.value)&&He.push(zo.value<qo.value?{source:qo,target:zo}:{source:zo,target:qo})}Pr&&on()}function on(){He.sort(function(Mn,jn){return Pr((Mn.source.value+Mn.target.value)/2,(jn.source.value+jn.target.value)/2)})}return Te.matrix=function(Mn){return arguments.length?(It=(Pt=Mn)&&Pt.length,He=ct=null,Te):Pt},Te.padding=function(Mn){return arguments.length?(Ut=Mn,He=ct=null,Te):Ut},Te.sortGroups=function(Mn){return arguments.length?(hr=Mn,He=ct=null,Te):hr},Te.sortSubgroups=function(Mn){return arguments.length?(fr=Mn,He=null,Te):fr},Te.sortChords=function(Mn){return arguments.length?(Pr=Mn,He&&on(),Te):Pr},Te.chords=function(){return He||ln(),He},Te.groups=function(){return ct||ln(),ct},Te},v.layout.force=function(){var Te={},He=v.dispatch("start","tick","end"),ct,Pt=[1,1],It,Ut,hr=.9,fr=zf,Pr=wc,ln=-30,on=Vc,Mn=.1,jn=.64,Vn=[],Ka=[],Zn,ya,Sa;function Xa(Aa){return function(Si,ho,Ki,lo){if(Si.point!==Aa){var zo=Si.cx-Aa.x,qo=Si.cy-Aa.y,nl=lo-ho,Go=zo*zo+qo*qo;if(nl*nl/jn<Go){if(Go<on){var bs=Si.charge/Go;Aa.px-=zo*bs,Aa.py-=qo*bs}return!0}if(Si.point&&Go&&Go<on){var bs=Si.pointCharge/Go;Aa.px-=zo*bs,Aa.py-=qo*bs}}return!Si.charge}}Te.tick=function(){if((Ut*=.99)<.005)return ct=null,He.end({type:"end",alpha:Ut=0}),!0;var Aa=Vn.length,Si=Ka.length,ho,Ki,lo,zo,qo,nl,Go,bs,fl;for(Ki=0;Ki<Si;++Ki)lo=Ka[Ki],zo=lo.source,qo=lo.target,bs=qo.x-zo.x,fl=qo.y-zo.y,(nl=bs*bs+fl*fl)&&(nl=Ut*ya[Ki]*((nl=Math.sqrt(nl))-Zn[Ki])/nl,bs*=nl,fl*=nl,qo.x-=bs*(Go=zo.weight+qo.weight?zo.weight/(zo.weight+qo.weight):.5),qo.y-=fl*Go,zo.x+=bs*(Go=1-Go),zo.y+=fl*Go);if((Go=Ut*Mn)&&(bs=Pt[0]/2,fl=Pt[1]/2,Ki=-1,Go))for(;++Ki<Aa;)lo=Vn[Ki],lo.x+=(bs-lo.x)*Go,lo.y+=(fl-lo.y)*Go;if(ln)for(iu(ho=v.geom.quadtree(Vn),Ut,Sa),Ki=-1;++Ki<Aa;)(lo=Vn[Ki]).fixed||ho.visit(Xa(lo));for(Ki=-1;++Ki<Aa;)lo=Vn[Ki],lo.fixed?(lo.x=lo.px,lo.y=lo.py):(lo.x-=(lo.px-(lo.px=lo.x))*hr,lo.y-=(lo.py-(lo.py=lo.y))*hr);He.tick({type:"tick",alpha:Ut})},Te.nodes=function(Aa){return arguments.length?(Vn=Aa,Te):Vn},Te.links=function(Aa){return arguments.length?(Ka=Aa,Te):Ka},Te.size=function(Aa){return arguments.length?(Pt=Aa,Te):Pt},Te.linkDistance=function(Aa){return arguments.length?(fr=typeof Aa=="function"?Aa:+Aa,Te):fr},Te.distance=Te.linkDistance,Te.linkStrength=function(Aa){return arguments.length?(Pr=typeof Aa=="function"?Aa:+Aa,Te):Pr},Te.friction=function(Aa){return arguments.length?(hr=+Aa,Te):hr},Te.charge=function(Aa){return arguments.length?(ln=typeof Aa=="function"?Aa:+Aa,Te):ln},Te.chargeDistance=function(Aa){return arguments.length?(on=Aa*Aa,Te):Math.sqrt(on)},Te.gravity=function(Aa){return arguments.length?(Mn=+Aa,Te):Mn},Te.theta=function(Aa){return arguments.length?(jn=Aa*Aa,Te):Math.sqrt(jn)},Te.alpha=function(Aa){return arguments.length?(Aa=+Aa,Ut?Aa>0?Ut=Aa:(ct.c=null,ct.t=NaN,ct=null,He.end({type:"end",alpha:Ut=0})):Aa>0&&(He.start({type:"start",alpha:Ut=Aa}),ct=Ya(Te.tick)),Te):Ut},Te.start=function(){var Aa,Si=Vn.length,ho=Ka.length,Ki=Pt[0],lo=Pt[1],zo,qo;for(Aa=0;Aa<Si;++Aa)(qo=Vn[Aa]).index=Aa,qo.weight=0;for(Aa=0;Aa<ho;++Aa)qo=Ka[Aa],typeof qo.source=="number"&&(qo.source=Vn[qo.source]),typeof qo.target=="number"&&(qo.target=Vn[qo.target]),++qo.source.weight,++qo.target.weight;for(Aa=0;Aa<Si;++Aa)qo=Vn[Aa],isNaN(qo.x)&&(qo.x=nl("x",Ki)),isNaN(qo.y)&&(qo.y=nl("y",lo)),isNaN(qo.px)&&(qo.px=qo.x),isNaN(qo.py)&&(qo.py=qo.y);if(Zn=[],typeof fr=="function")for(Aa=0;Aa<ho;++Aa)Zn[Aa]=+fr.call(this,Ka[Aa],Aa);else for(Aa=0;Aa<ho;++Aa)Zn[Aa]=fr;if(ya=[],typeof Pr=="function")for(Aa=0;Aa<ho;++Aa)ya[Aa]=+Pr.call(this,Ka[Aa],Aa);else for(Aa=0;Aa<ho;++Aa)ya[Aa]=Pr;if(Sa=[],typeof ln=="function")for(Aa=0;Aa<Si;++Aa)Sa[Aa]=+ln.call(this,Vn[Aa],Aa);else for(Aa=0;Aa<Si;++Aa)Sa[Aa]=ln;function nl(Go,bs){if(!zo){for(zo=new Array(Si),ou=0;ou<Si;++ou)zo[ou]=[];for(ou=0;ou<ho;++ou){var fl=Ka[ou];zo[fl.source.index].push(fl.target),zo[fl.target.index].push(fl.source)}}for(var ju=zo[Aa],ou=-1,So=ju.length,qs;++ou<So;)if(!isNaN(qs=ju[ou][Go]))return qs;return Math.random()*bs}return Te.resume()},Te.resume=function(){return Te.alpha(.1)},Te.stop=function(){return Te.alpha(0)},Te.drag=function(){if(It||(It=v.behavior.drag().origin(U).on("dragstart.force",ld).on("drag.force",Qa).on("dragend.force",Su)),!arguments.length)return It;this.on("mouseover.force",qc).on("mouseout.force",$f).call(It)};function Qa(Aa){Aa.px=v.event.x,Aa.py=v.event.y,Te.resume()}return v.rebind(Te,He,"on")};function ld(Te){Te.fixed|=2}function Su(Te){Te.fixed&=-7}function qc(Te){Te.fixed|=4,Te.px=Te.x,Te.py=Te.y}function $f(Te){Te.fixed&=-5}function iu(Te,He,ct){var Pt=0,It=0;if(Te.charge=0,!Te.leaf)for(var Ut=Te.nodes,hr=Ut.length,fr=-1,Pr;++fr<hr;)Pr=Ut[fr],Pr!=null&&(iu(Pr,He,ct),Te.charge+=Pr.charge,Pt+=Pr.charge*Pr.cx,It+=Pr.charge*Pr.cy);if(Te.point){Te.leaf||(Te.point.x+=Math.random()-.5,Te.point.y+=Math.random()-.5);var ln=He*ct[Te.point.index];Te.charge+=Te.pointCharge=ln,Pt+=ln*Te.point.x,It+=ln*Te.point.y}Te.cx=Pt/Te.charge,Te.cy=It/Te.charge}var zf=20,wc=1,Vc=1/0;v.layout.hierarchy=function(){var Te=Gd,He=Kf,ct=zh;function Pt(It){var Ut=[It],hr=[],fr;for(It.depth=0;(fr=Ut.pop())!=null;)if(hr.push(fr),(ln=He.call(Pt,fr,fr.depth))&&(Pr=ln.length)){for(var Pr,ln,on;--Pr>=0;)Ut.push(on=ln[Pr]),on.parent=fr,on.depth=fr.depth+1;ct&&(fr.value=0),fr.children=ln}else ct&&(fr.value=+ct.call(Pt,fr,fr.depth)||0),delete fr.children;return Tf(It,function(Mn){var jn,Vn;Te&&(jn=Mn.children)&&jn.sort(Te),ct&&(Vn=Mn.parent)&&(Vn.value+=Mn.value)}),hr}return Pt.sort=function(It){return arguments.length?(Te=It,Pt):Te},Pt.children=function(It){return arguments.length?(He=It,Pt):He},Pt.value=function(It){return arguments.length?(ct=It,Pt):ct},Pt.revalue=function(It){return ct&&(vh(It,function(Ut){Ut.children&&(Ut.value=0)}),Tf(It,function(Ut){var hr;Ut.children||(Ut.value=+ct.call(Pt,Ut,Ut.depth)||0),(hr=Ut.parent)&&(hr.value+=Ut.value)})),It},Pt};function yu(Te,He){return v.rebind(Te,He,"sort","children","value"),Te.nodes=Te,Te.links=Tv,Te}function vh(Te,He){for(var ct=[Te];(Te=ct.pop())!=null;)if(He(Te),(It=Te.children)&&(Pt=It.length))for(var Pt,It;--Pt>=0;)ct.push(It[Pt])}function Tf(Te,He){for(var ct=[Te],Pt=[];(Te=ct.pop())!=null;)if(Pt.push(Te),(hr=Te.children)&&(Ut=hr.length))for(var It=-1,Ut,hr;++It<Ut;)ct.push(hr[It]);for(;(Te=Pt.pop())!=null;)He(Te)}function Kf(Te){return Te.children}function zh(Te){return Te.value}function Gd(Te,He){return He.value-Te.value}function Tv(Te){return v.merge(Te.map(function(He){return(He.children||[]).map(function(ct){return{source:He,target:ct}})}))}v.layout.partition=function(){var Te=v.layout.hierarchy(),He=[1,1];function ct(Ut,hr,fr,Pr){var ln=Ut.children;if(Ut.x=hr,Ut.y=Ut.depth*Pr,Ut.dx=fr,Ut.dy=Pr,ln&&(Mn=ln.length)){var on=-1,Mn,jn,Vn;for(fr=Ut.value?fr/Ut.value:0;++on<Mn;)ct(jn=ln[on],hr,Vn=jn.value*fr,Pr),hr+=Vn}}function Pt(Ut){var hr=Ut.children,fr=0;if(hr&&(ln=hr.length))for(var Pr=-1,ln;++Pr<ln;)fr=Math.max(fr,Pt(hr[Pr]));return 1+fr}function It(Ut,hr){var fr=Te.call(this,Ut,hr);return ct(fr[0],0,He[0],He[1]/Pt(fr[0])),fr}return It.size=function(Ut){return arguments.length?(He=Ut,It):He},yu(It,Te)},v.layout.pie=function(){var Te=Number,He=ph,ct=0,Pt=Ae,It=0;function Ut(hr){var fr=hr.length,Pr=hr.map(function(Xa,Qa){return+Te.call(Ut,Xa,Qa)}),ln=+(typeof ct=="function"?ct.apply(this,arguments):ct),on=(typeof Pt=="function"?Pt.apply(this,arguments):Pt)-ln,Mn=Math.min(Math.abs(on)/fr,+(typeof It=="function"?It.apply(this,arguments):It)),jn=Mn*(on<0?-1:1),Vn=v.sum(Pr),Ka=Vn?(on-fr*jn)/Vn:0,Zn=v.range(fr),ya=[],Sa;return He!=null&&Zn.sort(He===ph?function(Xa,Qa){return Pr[Qa]-Pr[Xa]}:function(Xa,Qa){return He(hr[Xa],hr[Qa])}),Zn.forEach(function(Xa){ya[Xa]={data:hr[Xa],value:Sa=Pr[Xa],startAngle:ln,endAngle:ln+=Sa*Ka+jn,padAngle:Mn}}),ya}return Ut.value=function(hr){return arguments.length?(Te=hr,Ut):Te},Ut.sort=function(hr){return arguments.length?(He=hr,Ut):He},Ut.startAngle=function(hr){return arguments.length?(ct=hr,Ut):ct},Ut.endAngle=function(hr){return arguments.length?(Pt=hr,Ut):Pt},Ut.padAngle=function(hr){return arguments.length?(It=hr,Ut):It},Ut};var ph={};v.layout.stack=function(){var Te=U,He=ud,ct=yh,Pt=Fh,It=Nh,Ut=ef;function hr(fr,Pr){if(!(Ka=fr.length))return fr;var ln=fr.map(function(Xa,Qa){return Te.call(hr,Xa,Qa)}),on=ln.map(function(Xa){return Xa.map(function(Qa,Aa){return[It.call(hr,Qa,Aa),Ut.call(hr,Qa,Aa)]})}),Mn=He.call(hr,on,Pr);ln=v.permute(ln,Mn),on=v.permute(on,Mn);var jn=ct.call(hr,on,Pr),Vn=ln[0].length,Ka,Zn,ya,Sa;for(ya=0;ya<Vn;++ya)for(Pt.call(hr,ln[0][ya],Sa=jn[ya],on[0][ya][1]),Zn=1;Zn<Ka;++Zn)Pt.call(hr,ln[Zn][ya],Sa+=on[Zn-1][ya][1],on[Zn][ya][1]);return fr}return hr.values=function(fr){return arguments.length?(Te=fr,hr):Te},hr.order=function(fr){return arguments.length?(He=typeof fr=="function"?fr:vc.get(fr)||ud,hr):He},hr.offset=function(fr){return arguments.length?(ct=typeof fr=="function"?fr:mh.get(fr)||yh,hr):ct},hr.x=function(fr){return arguments.length?(It=fr,hr):It},hr.y=function(fr){return arguments.length?(Ut=fr,hr):Ut},hr.out=function(fr){return arguments.length?(Pt=fr,hr):Pt},hr};function Nh(Te){return Te.x}function ef(Te){return Te.y}function Fh(Te,He,ct){Te.y0=He,Te.y=ct}var vc=v.map({"inside-out":function(Te){var He=Te.length,ct,Pt,It=Te.map(uu),Ut=Te.map(Hc),hr=v.range(He).sort(function(Mn,jn){return It[Mn]-It[jn]}),fr=0,Pr=0,ln=[],on=[];for(ct=0;ct<He;++ct)Pt=hr[ct],fr<Pr?(fr+=Ut[Pt],ln.push(Pt)):(Pr+=Ut[Pt],on.push(Pt));return on.reverse().concat(ln)},reverse:function(Te){return v.range(Te.length).reverse()},default:ud}),mh=v.map({silhouette:function(Te){var He=Te.length,ct=Te[0].length,Pt=[],It=0,Ut,hr,fr,Pr=[];for(hr=0;hr<ct;++hr){for(Ut=0,fr=0;Ut<He;Ut++)fr+=Te[Ut][hr][1];fr>It&&(It=fr),Pt.push(fr)}for(hr=0;hr<ct;++hr)Pr[hr]=(It-Pt[hr])/2;return Pr},wiggle:function(Te){var He=Te.length,ct=Te[0],Pt=ct.length,It,Ut,hr,fr,Pr,ln,on,Mn,jn,Vn=[];for(Vn[0]=Mn=jn=0,Ut=1;Ut<Pt;++Ut){for(It=0,fr=0;It<He;++It)fr+=Te[It][Ut][1];for(It=0,Pr=0,on=ct[Ut][0]-ct[Ut-1][0];It<He;++It){for(hr=0,ln=(Te[It][Ut][1]-Te[It][Ut-1][1])/(2*on);hr<It;++hr)ln+=(Te[hr][Ut][1]-Te[hr][Ut-1][1])/on;Pr+=ln*Te[It][Ut][1]}Vn[Ut]=Mn-=fr?Pr/fr*on:0,Mn<jn&&(jn=Mn)}for(Ut=0;Ut<Pt;++Ut)Vn[Ut]-=jn;return Vn},expand:function(Te){var He=Te.length,ct=Te[0].length,Pt=1/He,It,Ut,hr,fr=[];for(Ut=0;Ut<ct;++Ut){for(It=0,hr=0;It<He;It++)hr+=Te[It][Ut][1];if(hr)for(It=0;It<He;It++)Te[It][Ut][1]/=hr;else for(It=0;It<He;It++)Te[It][Ut][1]=Pt}for(Ut=0;Ut<ct;++Ut)fr[Ut]=0;return fr},zero:yh});function ud(Te){return v.range(Te.length)}function yh(Te){for(var He=-1,ct=Te[0].length,Pt=[];++He<ct;)Pt[He]=0;return Pt}function uu(Te){for(var He=1,ct=0,Pt=Te[0][1],It,Ut=Te.length;He<Ut;++He)(It=Te[He][1])>Pt&&(ct=He,Pt=It);return ct}function Hc(Te){return Te.reduce(pf,0)}function pf(Te,He){return Te+He[1]}v.layout.histogram=function(){var Te=!0,He=Number,ct=Sh,Pt=Qh;function It(Ut,jn){for(var fr=[],Pr=Ut.map(He,this),ln=ct.call(this,Pr,jn),on=Pt.call(this,ln,Pr,jn),Mn,jn=-1,Vn=Pr.length,Ka=on.length-1,Zn=Te?1:1/Vn,ya;++jn<Ka;)Mn=fr[jn]=[],Mn.dx=on[jn+1]-(Mn.x=on[jn]),Mn.y=0;if(Ka>0)for(jn=-1;++jn<Vn;)ya=Pr[jn],ya>=ln[0]&&ya<=ln[1]&&(Mn=fr[v.bisect(on,ya,1,Ka)-1],Mn.y+=Zn,Mn.push(Ut[jn]));return fr}return It.value=function(Ut){return arguments.length?(He=Ut,It):He},It.range=function(Ut){return arguments.length?(ct=Rt(Ut),It):ct},It.bins=function(Ut){return arguments.length?(Pt=typeof Ut=="number"?function(hr){return du(hr,Ut)}:Rt(Ut),It):Pt},It.frequency=function(Ut){return arguments.length?(Te=!!Ut,It):Te},It};function Qh(Te,He){return du(Te,Math.ceil(Math.log(He.length)/Math.LN2+1))}function du(Te,He){for(var ct=-1,Pt=+Te[0],It=(Te[1]-Pt)/He,Ut=[];++ct<=He;)Ut[ct]=It*ct+Pt;return Ut}function Sh(Te){return[v.min(Te),v.max(Te)]}v.layout.pack=function(){var Te=v.layout.hierarchy().sort(Jf),He=0,ct=[1,1],Pt;function It(Ut,hr){var fr=Te.call(this,Ut,hr),Pr=fr[0],ln=ct[0],on=ct[1],Mn=Pt==null?Math.sqrt:typeof Pt=="function"?Pt:function(){return Pt};if(Pr.x=Pr.y=0,Tf(Pr,function(Vn){Vn.r=+Mn(Vn.value)}),Tf(Pr,Mh),He){var jn=He*(Pt?1:Math.max(2*Pr.r/ln,2*Pr.r/on))/2;Tf(Pr,function(Vn){Vn.r+=jn}),Tf(Pr,Mh),Tf(Pr,function(Vn){Vn.r-=jn})}return cd(Pr,ln/2,on/2,Pt?1:1/Math.max(2*Pr.r/ln,2*Pr.r/on)),fr}return It.size=function(Ut){return arguments.length?(ct=Ut,It):ct},It.radius=function(Ut){return arguments.length?(Pt=Ut==null||typeof Ut=="function"?Ut:+Ut,It):Pt},It.padding=function(Ut){return arguments.length?(He=+Ut,It):He},yu(It,Te)};function Jf(Te,He){return Te.value-He.value}function tf(Te,He){var ct=Te._pack_next;Te._pack_next=He,He._pack_prev=Te,He._pack_next=ct,ct._pack_prev=He}function Eh(Te,He){Te._pack_next=He,He._pack_prev=Te}function Af(Te,He){var ct=He.x-Te.x,Pt=He.y-Te.y,It=Te.r+He.r;return .999*It*It>ct*ct+Pt*Pt}function Mh(Te){if(!(He=Te.children)||!(jn=He.length))return;var He,ct=1/0,Pt=-1/0,It=1/0,Ut=-1/0,hr,fr,Pr,ln,on,Mn,jn;function Vn(Aa){ct=Math.min(Aa.x-Aa.r,ct),Pt=Math.max(Aa.x+Aa.r,Pt),It=Math.min(Aa.y-Aa.r,It),Ut=Math.max(Aa.y+Aa.r,Ut)}if(He.forEach(Xd),hr=He[0],hr.x=-hr.r,hr.y=0,Vn(hr),jn>1&&(fr=He[1],fr.x=fr.r,fr.y=0,Vn(fr),jn>2))for(Pr=He[2],rf(hr,fr,Pr),Vn(Pr),tf(hr,Pr),hr._pack_prev=Pr,tf(Pr,fr),fr=hr._pack_next,ln=3;ln<jn;ln++){rf(hr,fr,Pr=He[ln]);var Ka=0,Zn=1,ya=1;for(on=fr._pack_next;on!==fr;on=on._pack_next,Zn++)if(Af(on,Pr)){Ka=1;break}if(Ka==1)for(Mn=hr._pack_prev;Mn!==on._pack_prev&&!Af(Mn,Pr);Mn=Mn._pack_prev,ya++);Ka?(Zn<ya||Zn==ya&&fr.r<hr.r?Eh(hr,fr=on):Eh(hr=Mn,fr),ln--):(tf(hr,Pr),fr=Pr,Vn(Pr))}var Sa=(ct+Pt)/2,Xa=(It+Ut)/2,Qa=0;for(ln=0;ln<jn;ln++)Pr=He[ln],Pr.x-=Sa,Pr.y-=Xa,Qa=Math.max(Qa,Pr.r+Math.sqrt(Pr.x*Pr.x+Pr.y*Pr.y));Te.r=Qa,He.forEach(yc)}function Xd(Te){Te._pack_next=Te._pack_prev=Te}function yc(Te){delete Te._pack_next,delete Te._pack_prev}function cd(Te,He,ct,Pt){var It=Te.children;if(Te.x=He+=Pt*Te.x,Te.y=ct+=Pt*Te.y,Te.r*=Pt,It)for(var Ut=-1,hr=It.length;++Ut<hr;)cd(It[Ut],He,ct,Pt)}function rf(Te,He,ct){var Pt=Te.r+ct.r,It=He.x-Te.x,Ut=He.y-Te.y;if(Pt&&(It||Ut)){var hr=He.r+ct.r,fr=It*It+Ut*Ut;hr*=hr,Pt*=Pt;var Pr=.5+(Pt-hr)/(2*fr),ln=Math.sqrt(Math.max(0,2*hr*(Pt+fr)-(Pt-=fr)*Pt-hr*hr))/(2*fr);ct.x=Te.x+Pr*It+ln*Ut,ct.y=Te.y+Pr*Ut-ln*It}else ct.x=Te.x+Pt,ct.y=Te.y}v.layout.tree=function(){var Te=v.layout.hierarchy().sort(null).value(null),He=Nf,ct=[1,1],Pt=null;function It(on,Mn){var jn=Te.call(this,on,Mn),Vn=jn[0],Ka=Ut(Vn);if(Tf(Ka,hr),Ka.parent.m=-Ka.z,vh(Ka,fr),Pt)vh(Vn,ln);else{var Zn=Vn,ya=Vn,Sa=Vn;vh(Vn,function(Si){Si.x<Zn.x&&(Zn=Si),Si.x>ya.x&&(ya=Si),Si.depth>Sa.depth&&(Sa=Si)});var Xa=He(Zn,ya)/2-Zn.x,Qa=ct[0]/(ya.x+He(ya,Zn)/2+Xa),Aa=ct[1]/(Sa.depth||1);vh(Vn,function(Si){Si.x=(Si.x+Xa)*Qa,Si.y=Si.depth*Aa})}return jn}function Ut(on){for(var Mn={A:null,children:[on]},jn=[Mn],Vn;(Vn=jn.pop())!=null;)for(var Ka=Vn.children,Zn,ya=0,Sa=Ka.length;ya<Sa;++ya)jn.push((Ka[ya]=Zn={_:Ka[ya],parent:Vn,children:(Zn=Ka[ya].children)&&Zn.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:ya}).a=Zn);return Mn.children[0]}function hr(on){var Mn=on.children,jn=on.parent.children,Vn=on.i?jn[on.i-1]:null;if(Mn.length){xu(on);var Ka=(Mn[0].z+Mn[Mn.length-1].z)/2;Vn?(on.z=Vn.z+He(on._,Vn._),on.m=on.z-Ka):on.z=Ka}else Vn&&(on.z=Vn.z+He(on._,Vn._));on.parent.A=Pr(on,Vn,on.parent.A||jn[0])}function fr(on){on._.x=on.z+on.parent.m,on.m+=on.parent.m}function Pr(on,Mn,jn){if(Mn){for(var Vn=on,Ka=on,Zn=Mn,ya=Vn.parent.children[0],Sa=Vn.m,Xa=Ka.m,Qa=Zn.m,Aa=ya.m,Si;Zn=ku(Zn),Vn=Sf(Vn),Zn&&Vn;)ya=Sf(ya),Ka=ku(Ka),Ka.a=on,Si=Zn.z+Qa-Vn.z-Sa+He(Zn._,Vn._),Si>0&&(kc(Qf(Zn,on,jn),on,Si),Sa+=Si,Xa+=Si),Qa+=Zn.m,Sa+=Vn.m,Aa+=ya.m,Xa+=Ka.m;Zn&&!ku(Ka)&&(Ka.t=Zn,Ka.m+=Qa-Xa),Vn&&!Sf(ya)&&(ya.t=Vn,ya.m+=Sa-Aa,jn=on)}return jn}function ln(on){on.x*=ct[0],on.y=on.depth*ct[1]}return It.separation=function(on){return arguments.length?(He=on,It):He},It.size=function(on){return arguments.length?(Pt=(ct=on)==null?ln:null,It):Pt?null:ct},It.nodeSize=function(on){return arguments.length?(Pt=(ct=on)==null?null:ln,It):Pt?ct:null},yu(It,Te)};function Nf(Te,He){return Te.parent==He.parent?1:2}function Sf(Te){var He=Te.children;return He.length?He[0]:Te.t}function ku(Te){var He=Te.children,ct;return(ct=He.length)?He[ct-1]:Te.t}function kc(Te,He,ct){var Pt=ct/(He.i-Te.i);He.c-=Pt,He.s+=ct,Te.c+=Pt,He.z+=ct,He.m+=ct}function xu(Te){for(var He=0,ct=0,Pt=Te.children,It=Pt.length,Ut;--It>=0;)Ut=Pt[It],Ut.z+=He,Ut.m+=He,He+=Ut.s+(ct+=Ut.c)}function Qf(Te,He,ct){return Te.a.parent===He.parent?Te.a:ct}v.layout.cluster=function(){var Te=v.layout.hierarchy().sort(null).value(null),He=Nf,ct=[1,1],Pt=!1;function It(Ut,hr){var fr=Te.call(this,Ut,hr),Pr=fr[0],ln,on=0;Tf(Pr,function(Zn){var ya=Zn.children;ya&&ya.length?(Zn.x=ed(ya),Zn.y=Ef(ya)):(Zn.x=ln?on+=He(Zn,ln):0,Zn.y=0,ln=Zn)});var Mn=wr(Pr),jn=Hr(Pr),Vn=Mn.x-He(Mn,jn)/2,Ka=jn.x+He(jn,Mn)/2;return Tf(Pr,Pt?function(Zn){Zn.x=(Zn.x-Pr.x)*ct[0],Zn.y=(Pr.y-Zn.y)*ct[1]}:function(Zn){Zn.x=(Zn.x-Vn)/(Ka-Vn)*ct[0],Zn.y=(1-(Pr.y?Zn.y/Pr.y:1))*ct[1]}),fr}return It.separation=function(Ut){return arguments.length?(He=Ut,It):He},It.size=function(Ut){return arguments.length?(Pt=(ct=Ut)==null,It):Pt?null:ct},It.nodeSize=function(Ut){return arguments.length?(Pt=(ct=Ut)!=null,It):Pt?ct:null},yu(It,Te)};function Ef(Te){return 1+v.max(Te,function(He){return He.y})}function ed(Te){return Te.reduce(function(He,ct){return He+ct.x},0)/Te.length}function wr(Te){var He=Te.children;return He&&He.length?wr(He[0]):Te}function Hr(Te){var He=Te.children,ct;return He&&(ct=He.length)?Hr(He[ct-1]):Te}v.layout.treemap=function(){var Te=v.layout.hierarchy(),He=Math.round,ct=[1,1],Pt=null,It=kn,Ut=!1,hr,fr="squarify",Pr=.5*(1+Math.sqrt(5));function ln(Zn,ya){for(var Sa=-1,Xa=Zn.length,Qa,Aa;++Sa<Xa;)Aa=(Qa=Zn[Sa]).value*(ya<0?0:ya),Qa.area=isNaN(Aa)||Aa<=0?0:Aa}function on(Zn){var ya=Zn.children;if(ya&&ya.length){var Sa=It(Zn),Xa=[],Qa=ya.slice(),Aa,Si=1/0,ho,Ki=fr==="slice"?Sa.dx:fr==="dice"?Sa.dy:fr==="slice-dice"?Zn.depth&1?Sa.dy:Sa.dx:Math.min(Sa.dx,Sa.dy),lo;for(ln(Qa,Sa.dx*Sa.dy/Zn.value),Xa.area=0;(lo=Qa.length)>0;)Xa.push(Aa=Qa[lo-1]),Xa.area+=Aa.area,fr!=="squarify"||(ho=jn(Xa,Ki))<=Si?(Qa.pop(),Si=ho):(Xa.area-=Xa.pop().area,Vn(Xa,Ki,Sa,!1),Ki=Math.min(Sa.dx,Sa.dy),Xa.length=Xa.area=0,Si=1/0);Xa.length&&(Vn(Xa,Ki,Sa,!0),Xa.length=Xa.area=0),ya.forEach(on)}}function Mn(Zn){var ya=Zn.children;if(ya&&ya.length){var Sa=It(Zn),Xa=ya.slice(),Qa,Aa=[];for(ln(Xa,Sa.dx*Sa.dy/Zn.value),Aa.area=0;Qa=Xa.pop();)Aa.push(Qa),Aa.area+=Qa.area,Qa.z!=null&&(Vn(Aa,Qa.z?Sa.dx:Sa.dy,Sa,!Xa.length),Aa.length=Aa.area=0);ya.forEach(Mn)}}function jn(Zn,ya){for(var Sa=Zn.area,Xa,Qa=0,Aa=1/0,Si=-1,ho=Zn.length;++Si<ho;)(Xa=Zn[Si].area)&&(Xa<Aa&&(Aa=Xa),Xa>Qa&&(Qa=Xa));return Sa*=Sa,ya*=ya,Sa?Math.max(ya*Qa*Pr/Sa,Sa/(ya*Aa*Pr)):1/0}function Vn(Zn,ya,Sa,Xa){var Qa=-1,Aa=Zn.length,Si=Sa.x,ho=Sa.y,Ki=ya?He(Zn.area/ya):0,lo;if(ya==Sa.dx){for((Xa||Ki>Sa.dy)&&(Ki=Sa.dy);++Qa<Aa;)lo=Zn[Qa],lo.x=Si,lo.y=ho,lo.dy=Ki,Si+=lo.dx=Math.min(Sa.x+Sa.dx-Si,Ki?He(lo.area/Ki):0);lo.z=!0,lo.dx+=Sa.x+Sa.dx-Si,Sa.y+=Ki,Sa.dy-=Ki}else{for((Xa||Ki>Sa.dx)&&(Ki=Sa.dx);++Qa<Aa;)lo=Zn[Qa],lo.x=Si,lo.y=ho,lo.dx=Ki,ho+=lo.dy=Math.min(Sa.y+Sa.dy-ho,Ki?He(lo.area/Ki):0);lo.z=!1,lo.dy+=Sa.y+Sa.dy-ho,Sa.x+=Ki,Sa.dx-=Ki}}function Ka(Zn){var ya=hr||Te(Zn),Sa=ya[0];return Sa.x=Sa.y=0,Sa.value?(Sa.dx=ct[0],Sa.dy=ct[1]):Sa.dx=Sa.dy=0,hr&&Te.revalue(Sa),ln([Sa],Sa.dx*Sa.dy/Sa.value),(hr?Mn:on)(Sa),Ut&&(hr=ya),ya}return Ka.size=function(Zn){return arguments.length?(ct=Zn,Ka):ct},Ka.padding=function(Zn){if(!arguments.length)return Pt;function ya(Qa){var Aa=Zn.call(Ka,Qa,Qa.depth);return Aa==null?kn(Qa):_n(Qa,typeof Aa=="number"?[Aa,Aa,Aa,Aa]:Aa)}function Sa(Qa){return _n(Qa,Zn)}var Xa;return It=(Pt=Zn)==null?kn:(Xa=typeof Zn)=="function"?ya:(Xa==="number"&&(Zn=[Zn,Zn,Zn,Zn]),Sa),Ka},Ka.round=function(Zn){return arguments.length?(He=Zn?Math.round:Number,Ka):He!=Number},Ka.sticky=function(Zn){return arguments.length?(Ut=Zn,hr=null,Ka):Ut},Ka.ratio=function(Zn){return arguments.length?(Pr=Zn,Ka):Pr},Ka.mode=function(Zn){return arguments.length?(fr=Zn+"",Ka):fr},yu(Ka,Te)};function kn(Te){return{x:Te.x,y:Te.y,dx:Te.dx,dy:Te.dy}}function _n(Te,He){var ct=Te.x+He[3],Pt=Te.y+He[0],It=Te.dx-He[1]-He[3],Ut=Te.dy-He[0]-He[2];return It<0&&(ct+=It/2,It=0),Ut<0&&(Pt+=Ut/2,Ut=0),{x:ct,y:Pt,dx:It,dy:Ut}}v.random={normal:function(Te,He){var ct=arguments.length;return ct<2&&(He=1),ct<1&&(Te=0),function(){var Pt,It,Ut;do Pt=Math.random()*2-1,It=Math.random()*2-1,Ut=Pt*Pt+It*It;while(!Ut||Ut>1);return Te+He*Pt*Math.sqrt(-2*Math.log(Ut)/Ut)}},logNormal:function(){var Te=v.random.normal.apply(v,arguments);return function(){return Math.exp(Te())}},bates:function(Te){var He=v.random.irwinHall(Te);return function(){return He()/Te}},irwinHall:function(Te){return function(){for(var He=0,ct=0;ct<Te;ct++)He+=Math.random();return He}}},v.scale={};function $n(Te){var He=Te[0],ct=Te[Te.length-1];return He<ct?[He,ct]:[ct,He]}function Ga(Te){return Te.rangeExtent?Te.rangeExtent():$n(Te.range())}function Ba(Te,He,ct,Pt){var It=ct(Te[0],Te[1]),Ut=Pt(He[0],He[1]);return function(hr){return Ut(It(hr))}}function wi(Te,He){var ct=0,Pt=Te.length-1,It=Te[ct],Ut=Te[Pt],hr;return Ut<It&&(hr=ct,ct=Pt,Pt=hr,hr=It,It=Ut,Ut=hr),Te[ct]=He.floor(It),Te[Pt]=He.ceil(Ut),Te}function ki(Te){return Te?{floor:function(He){return Math.floor(He/Te)*Te},ceil:function(He){return Math.ceil(He/Te)*Te}}:to}var to={floor:U,ceil:U};function ci(Te,He,ct,Pt){var It=[],Ut=[],hr=0,fr=Math.min(Te.length,He.length)-1;for(Te[fr]<Te[0]&&(Te=Te.slice().reverse(),He=He.slice().reverse());++hr<=fr;)It.push(ct(Te[hr-1],Te[hr])),Ut.push(Pt(He[hr-1],He[hr]));return function(Pr){var ln=v.bisect(Te,Pr,1,fr)-1;return Ut[ln](It[ln](Pr))}}v.scale.linear=function(){return qi([0,1],[0,1],Js,!1)};function qi(Te,He,ct,Pt){var It,Ut;function hr(){var Pr=Math.min(Te.length,He.length)>2?ci:Ba,ln=Pt?od:Hd;return It=Pr(Te,He,ln,ct),Ut=Pr(He,Te,ln,Js),fr}function fr(Pr){return It(Pr)}return fr.invert=function(Pr){return Ut(Pr)},fr.domain=function(Pr){return arguments.length?(Te=Pr.map(Number),hr()):Te},fr.range=function(Pr){return arguments.length?(He=Pr,hr()):He},fr.rangeRound=function(Pr){return fr.range(Pr).interpolate(Zf)},fr.clamp=function(Pr){return arguments.length?(Pt=Pr,hr()):Pt},fr.interpolate=function(Pr){return arguments.length?(ct=Pr,hr()):ct},fr.ticks=function(Pr){return Qo(Te,Pr)},fr.tickFormat=function(Pr,ln){return d3_scale_linearTickFormat(Te,Pr,ln)},fr.nice=function(Pr){return oi(Te,Pr),hr()},fr.copy=function(){return qi(Te,He,ct,Pt)},hr()}function xi(Te,He){return v.rebind(Te,He,"range","rangeRound","interpolate","clamp")}function oi(Te,He){return wi(Te,ki(fo(Te,He)[2])),wi(Te,ki(fo(Te,He)[2])),Te}function fo(Te,He){He==null&&(He=10);var ct=$n(Te),Pt=ct[1]-ct[0],It=Math.pow(10,Math.floor(Math.log(Pt/He)/Math.LN10)),Ut=He/Pt*It;return Ut<=.15?It*=10:Ut<=.35?It*=5:Ut<=.75&&(It*=2),ct[0]=Math.ceil(ct[0]/It)*It,ct[1]=Math.floor(ct[1]/It)*It+It*.5,ct[2]=It,ct}function Qo(Te,He){return v.range.apply(v,fo(Te,He))}v.scale.log=function(){return Yo(v.scale.linear().domain([0,1]),10,!0,[1,10])};function Yo(Te,He,ct,Pt){function It(fr){return(ct?Math.log(fr<0?0:fr):-Math.log(fr>0?0:-fr))/Math.log(He)}function Ut(fr){return ct?Math.pow(He,fr):-Math.pow(He,-fr)}function hr(fr){return Te(It(fr))}return hr.invert=function(fr){return Ut(Te.invert(fr))},hr.domain=function(fr){return arguments.length?(ct=fr[0]>=0,Te.domain((Pt=fr.map(Number)).map(It)),hr):Pt},hr.base=function(fr){return arguments.length?(He=+fr,Te.domain(Pt.map(It)),hr):He},hr.nice=function(){var fr=wi(Pt.map(It),ct?Math:is);return Te.domain(fr),Pt=fr.map(Ut),hr},hr.ticks=function(){var fr=$n(Pt),Pr=[],ln=fr[0],on=fr[1],Mn=Math.floor(It(ln)),jn=Math.ceil(It(on)),Vn=He%1?2:He;if(isFinite(jn-Mn)){if(ct){for(;Mn<jn;Mn++)for(var Ka=1;Ka<Vn;Ka++)Pr.push(Ut(Mn)*Ka);Pr.push(Ut(Mn))}else for(Pr.push(Ut(Mn));Mn++<jn;)for(var Ka=Vn-1;Ka>0;Ka--)Pr.push(Ut(Mn)*Ka);for(Mn=0;Pr[Mn]<ln;Mn++);for(jn=Pr.length;Pr[jn-1]>on;jn--);Pr=Pr.slice(Mn,jn)}return Pr},hr.copy=function(){return Yo(Te.copy(),He,ct,Pt)},xi(hr,Te)}var is={floor:function(Te){return-Math.ceil(-Te)},ceil:function(Te){return-Math.floor(-Te)}};v.scale.pow=function(){return ts(v.scale.linear(),1,[0,1])};function ts(Te,He,ct){var Pt=vo(He),It=vo(1/He);function Ut(hr){return Te(Pt(hr))}return Ut.invert=function(hr){return It(Te.invert(hr))},Ut.domain=function(hr){return arguments.length?(Te.domain((ct=hr.map(Number)).map(Pt)),Ut):ct},Ut.ticks=function(hr){return Qo(ct,hr)},Ut.tickFormat=function(hr,fr){return d3_scale_linearTickFormat(ct,hr,fr)},Ut.nice=function(hr){return Ut.domain(oi(ct,hr))},Ut.exponent=function(hr){return arguments.length?(Pt=vo(He=hr),It=vo(1/He),Te.domain(ct.map(Pt)),Ut):He},Ut.copy=function(){return ts(Te.copy(),He,ct)},xi(Ut,Te)}function vo(Te){return function(He){return He<0?-Math.pow(-He,Te):Math.pow(He,Te)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return Yi([],{t:"range",a:[[]]})};function Yi(Te,He){var ct,Pt,It;function Ut(fr){return Pt[((ct.get(fr)||(He.t==="range"?ct.set(fr,Te.push(fr)):NaN))-1)%Pt.length]}function hr(fr,Pr){return v.range(Te.length).map(function(ln){return fr+Pr*ln})}return Ut.domain=function(fr){if(!arguments.length)return Te;Te=[],ct=new M;for(var Pr=-1,ln=fr.length,on;++Pr<ln;)ct.has(on=fr[Pr])||ct.set(on,Te.push(on));return Ut[He.t].apply(Ut,He.a)},Ut.range=function(fr){return arguments.length?(Pt=fr,It=0,He={t:"range",a:arguments},Ut):Pt},Ut.rangePoints=function(fr,Pr){arguments.length<2&&(Pr=0);var ln=fr[0],on=fr[1],Mn=Te.length<2?(ln=(ln+on)/2,0):(on-ln)/(Te.length-1+Pr);return Pt=hr(ln+Mn*Pr/2,Mn),It=0,He={t:"rangePoints",a:arguments},Ut},Ut.rangeRoundPoints=function(fr,Pr){arguments.length<2&&(Pr=0);var ln=fr[0],on=fr[1],Mn=Te.length<2?(ln=on=Math.round((ln+on)/2),0):(on-ln)/(Te.length-1+Pr)|0;return Pt=hr(ln+Math.round(Mn*Pr/2+(on-ln-(Te.length-1+Pr)*Mn)/2),Mn),It=0,He={t:"rangeRoundPoints",a:arguments},Ut},Ut.rangeBands=function(fr,Pr,ln){arguments.length<2&&(Pr=0),arguments.length<3&&(ln=Pr);var on=fr[1]<fr[0],Mn=fr[on-0],jn=fr[1-on],Vn=(jn-Mn)/(Te.length-Pr+2*ln);return Pt=hr(Mn+Vn*ln,Vn),on&&Pt.reverse(),It=Vn*(1-Pr),He={t:"rangeBands",a:arguments},Ut},Ut.rangeRoundBands=function(fr,Pr,ln){arguments.length<2&&(Pr=0),arguments.length<3&&(ln=Pr);var on=fr[1]<fr[0],Mn=fr[on-0],jn=fr[1-on],Vn=Math.floor((jn-Mn)/(Te.length-Pr+2*ln));return Pt=hr(Mn+Math.round((jn-Mn-(Te.length-Pr)*Vn)/2),Vn),on&&Pt.reverse(),It=Math.round(Vn*(1-Pr)),He={t:"rangeRoundBands",a:arguments},Ut},Ut.rangeBand=function(){return It},Ut.rangeExtent=function(){return $n(He.a[0])},Ut.copy=function(){return Yi(Te,He)},Ut.domain(Te)}v.scale.category10=function(){return v.scale.ordinal().range(ys)},v.scale.category20=function(){return v.scale.ordinal().range(Ys)},v.scale.category20b=function(){return v.scale.ordinal().range(Rl)},v.scale.category20c=function(){return v.scale.ordinal().range(Ql)};var ys=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(qt),Ys=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(qt),Rl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(qt),Ql=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(qt);v.scale.quantile=function(){return Dl([],[])};function Dl(Te,He){var ct;function Pt(){var Ut=0,hr=He.length;for(ct=[];++Ut<hr;)ct[Ut-1]=v.quantile(Te,Ut/hr);return It}function It(Ut){if(!isNaN(Ut=+Ut))return He[v.bisect(ct,Ut)]}return It.domain=function(Ut){return arguments.length?(Te=Ut.map(d).filter(h).sort(u),Pt()):Te},It.range=function(Ut){return arguments.length?(He=Ut,Pt()):He},It.quantiles=function(){return ct},It.invertExtent=function(Ut){return Ut=He.indexOf(Ut),Ut<0?[NaN,NaN]:[Ut>0?ct[Ut-1]:Te[0],Ut<ct.length?ct[Ut]:Te[Te.length-1]]},It.copy=function(){return Dl(Te,He)},Pt()}v.scale.quantize=function(){return eu(0,1,[0,1])};function eu(Te,He,ct){var Pt,It;function Ut(fr){return ct[Math.max(0,Math.min(It,Math.floor(Pt*(fr-Te))))]}function hr(){return Pt=ct.length/(He-Te),It=ct.length-1,Ut}return Ut.domain=function(fr){return arguments.length?(Te=+fr[0],He=+fr[fr.length-1],hr()):[Te,He]},Ut.range=function(fr){return arguments.length?(ct=fr,hr()):ct},Ut.invertExtent=function(fr){return fr=ct.indexOf(fr),fr=fr<0?NaN:fr/Pt+Te,[fr,fr+1/Pt]},Ut.copy=function(){return eu(Te,He,ct)},hr()}v.scale.threshold=function(){return cl([.5],[0,1])};function cl(Te,He){function ct(Pt){if(Pt<=Pt)return He[v.bisect(Te,Pt)]}return ct.domain=function(Pt){return arguments.length?(Te=Pt,ct):Te},ct.range=function(Pt){return arguments.length?(He=Pt,ct):He},ct.invertExtent=function(Pt){return Pt=He.indexOf(Pt),[Te[Pt-1],Te[Pt]]},ct.copy=function(){return cl(Te,He)},ct}v.scale.identity=function(){return Du([0,1])};function Du(Te){function He(ct){return+ct}return He.invert=He,He.domain=He.range=function(ct){return arguments.length?(Te=ct.map(He),He):Te},He.ticks=function(ct){return Qo(Te,ct)},He.tickFormat=function(ct,Pt){return d3_scale_linearTickFormat(Te,ct,Pt)},He.copy=function(){return Du(Te)},He}v.svg={};function Pu(){return 0}v.svg.arc=function(){var Te=Oo,He=Ls,ct=Pu,Pt=Zl,It=ql,Ut=Al,hr=Tc;function fr(){var ln=Math.max(0,+Te.apply(this,arguments)),on=Math.max(0,+He.apply(this,arguments)),Mn=It.apply(this,arguments)-tt,jn=Ut.apply(this,arguments)-tt,Vn=Math.abs(jn-Mn),Ka=Mn>jn?0:1;if(on<ln&&(Zn=on,on=ln,ln=Zn),Vn>=Ie)return Pr(on,Ka)+(ln?Pr(ln,1-Ka):"")+"Z";var Zn,ya,Sa,Xa,Qa=0,Aa=0,Si,ho,Ki,lo,zo,qo,nl,Go,bs=[];if((Xa=(+hr.apply(this,arguments)||0)/2)&&(Sa=Pt===Zl?Math.sqrt(ln*ln+on*on):+Pt.apply(this,arguments),Ka||(Aa*=-1),on&&(Aa=Xt(Sa/on*Math.sin(Xa))),ln&&(Qa=Xt(Sa/ln*Math.sin(Xa)))),on){Si=on*Math.cos(Mn+Aa),ho=on*Math.sin(Mn+Aa),Ki=on*Math.cos(jn-Aa),lo=on*Math.sin(jn-Aa);var fl=Math.abs(jn-Mn-2*Aa)<=Ee?0:1;if(Aa&&Ac(Si,ho,Ki,lo)===Ka^fl){var ju=(Mn+jn)/2;Si=on*Math.cos(ju),ho=on*Math.sin(ju),Ki=lo=null}}else Si=ho=0;if(ln){zo=ln*Math.cos(jn-Qa),qo=ln*Math.sin(jn-Qa),nl=ln*Math.cos(Mn+Qa),Go=ln*Math.sin(Mn+Qa);var ou=Math.abs(Mn-jn+2*Qa)<=Ee?0:1;if(Qa&&Ac(zo,qo,nl,Go)===1-Ka^ou){var So=(Mn+jn)/2;zo=ln*Math.cos(So),qo=ln*Math.sin(So),nl=Go=null}}else zo=qo=0;if(Vn>ot&&(Zn=Math.min(Math.abs(on-ln)/2,+ct.apply(this,arguments)))>.001){ya=ln<on^Ka?0:1;var qs=Zn,sl=Zn;if(Vn<Ee){var tu=nl==null?[zo,qo]:Ki==null?[Si,ho]:As([Si,ho],[nl,Go],[Ki,lo],[zo,qo]),Vl=Si-tu[0],Lc=ho-tu[1],Ol=Ki-tu[0],ru=lo-tu[1],af=1/Math.sin(Math.acos((Vl*Ol+Lc*ru)/(Math.sqrt(Vl*Vl+Lc*Lc)*Math.sqrt(Ol*Ol+ru*ru)))/2),zu=Math.sqrt(tu[0]*tu[0]+tu[1]*tu[1]);sl=Math.min(Zn,(ln-zu)/(af-1)),qs=Math.min(Zn,(on-zu)/(af+1))}if(Ki!=null){var At=Pc(nl==null?[zo,qo]:[nl,Go],[Si,ho],on,qs,Ka),kr=Pc([Ki,lo],[zo,qo],on,qs,Ka);Zn===qs?bs.push("M",At[0],"A",qs,",",qs," 0 0,",ya," ",At[1],"A",on,",",on," 0 ",1-Ka^Ac(At[1][0],At[1][1],kr[1][0],kr[1][1]),",",Ka," ",kr[1],"A",qs,",",qs," 0 0,",ya," ",kr[0]):bs.push("M",At[0],"A",qs,",",qs," 0 1,",ya," ",kr[0])}else bs.push("M",Si,",",ho);if(nl!=null){var Dr=Pc([Si,ho],[nl,Go],ln,-sl,Ka),Hn=Pc([zo,qo],Ki==null?[Si,ho]:[Ki,lo],ln,-sl,Ka);Zn===sl?bs.push("L",Hn[0],"A",sl,",",sl," 0 0,",ya," ",Hn[1],"A",ln,",",ln," 0 ",Ka^Ac(Hn[1][0],Hn[1][1],Dr[1][0],Dr[1][1]),",",1-Ka," ",Dr[1],"A",sl,",",sl," 0 0,",ya," ",Dr[0]):bs.push("L",Hn[0],"A",sl,",",sl," 0 0,",ya," ",Dr[0])}else bs.push("L",zo,",",qo)}else bs.push("M",Si,",",ho),Ki!=null&&bs.push("A",on,",",on," 0 ",fl,",",Ka," ",Ki,",",lo),bs.push("L",zo,",",qo),nl!=null&&bs.push("A",ln,",",ln," 0 ",ou,",",1-Ka," ",nl,",",Go);return bs.push("Z"),bs.join("")}function Pr(ln,on){return"M0,"+ln+"A"+ln+","+ln+" 0 1,"+on+" 0,"+-ln+"A"+ln+","+ln+" 0 1,"+on+" 0,"+ln}return fr.innerRadius=function(ln){return arguments.length?(Te=Rt(ln),fr):Te},fr.outerRadius=function(ln){return arguments.length?(He=Rt(ln),fr):He},fr.cornerRadius=function(ln){return arguments.length?(ct=Rt(ln),fr):ct},fr.padRadius=function(ln){return arguments.length?(Pt=ln==Zl?Zl:Rt(ln),fr):Pt},fr.startAngle=function(ln){return arguments.length?(It=Rt(ln),fr):It},fr.endAngle=function(ln){return arguments.length?(Ut=Rt(ln),fr):Ut},fr.padAngle=function(ln){return arguments.length?(hr=Rt(ln),fr):hr},fr.centroid=function(){var ln=(+Te.apply(this,arguments)+ +He.apply(this,arguments))/2,on=(+It.apply(this,arguments)+ +Ut.apply(this,arguments))/2-tt;return[Math.cos(on)*ln,Math.sin(on)*ln]},fr};var Zl="auto";function Oo(Te){return Te.innerRadius}function Ls(Te){return Te.outerRadius}function ql(Te){return Te.startAngle}function Al(Te){return Te.endAngle}function Tc(Te){return Te&&Te.padAngle}function Ac(Te,He,ct,Pt){return(Te-ct)*He-(He-Pt)*Te>0?0:1}function Pc(Te,He,ct,Pt,It){var Ut=Te[0]-He[0],hr=Te[1]-He[1],fr=(It?Pt:-Pt)/Math.sqrt(Ut*Ut+hr*hr),Pr=fr*hr,ln=-fr*Ut,on=Te[0]+Pr,Mn=Te[1]+ln,jn=He[0]+Pr,Vn=He[1]+ln,Ka=(on+jn)/2,Zn=(Mn+Vn)/2,ya=jn-on,Sa=Vn-Mn,Xa=ya*ya+Sa*Sa,Qa=ct-Pt,Aa=on*Vn-jn*Mn,Si=(Sa<0?-1:1)*Math.sqrt(Math.max(0,Qa*Qa*Xa-Aa*Aa)),ho=(Aa*Sa-ya*Si)/Xa,Ki=(-Aa*ya-Sa*Si)/Xa,lo=(Aa*Sa+ya*Si)/Xa,zo=(-Aa*ya+Sa*Si)/Xa,qo=ho-Ka,nl=Ki-Zn,Go=lo-Ka,bs=zo-Zn;return qo*qo+nl*nl>Go*Go+bs*bs&&(ho=lo,Ki=zo),[[ho-Pr,Ki-ln],[ho*ct/Qa,Ki*ct/Qa]]}function oh(){return!0}function Sc(Te){var He=wo,ct=Uo,Pt=oh,It=Ou,Ut=It.key,hr=.7;function fr(Pr){var ln=[],on=[],Mn=-1,jn=Pr.length,Vn,Ka=Rt(He),Zn=Rt(ct);function ya(){ln.push("M",It(Te(on),hr))}for(;++Mn<jn;)Pt.call(this,Vn=Pr[Mn],Mn)?on.push([+Ka.call(this,Vn,Mn),+Zn.call(this,Vn,Mn)]):on.length&&(ya(),on=[]);return on.length&&ya(),ln.length?ln.join(""):null}return fr.x=function(Pr){return arguments.length?(He=Pr,fr):He},fr.y=function(Pr){return arguments.length?(ct=Pr,fr):ct},fr.defined=function(Pr){return arguments.length?(Pt=Pr,fr):Pt},fr.interpolate=function(Pr){return arguments.length?(typeof Pr=="function"?Ut=It=Pr:Ut=(It=Ff.get(Pr)||Ou).key,fr):Ut},fr.tension=function(Pr){return arguments.length?(hr=Pr,fr):hr},fr}v.svg.line=function(){return Sc(U)};var Ff=v.map({linear:Ou,"linear-closed":Bf,step:os,"step-before":_s,"step-after":jf,basis:Re,"basis-open":Oe,"basis-closed":We,bundle:Mt,cardinal:Ze,"cardinal-open":nf,"cardinal-closed":Gc,monotone:ut});Ff.forEach(function(Te,He){He.key=Te,He.closed=/-closed$/.test(Te)});function Ou(Te){return Te.length>1?Te.join("L"):Te+"Z"}function Bf(Te){return Te.join("L")+"Z"}function os(Te){for(var He=0,ct=Te.length,Pt=Te[0],It=[Pt[0],",",Pt[1]];++He<ct;)It.push("H",(Pt[0]+(Pt=Te[He])[0])/2,"V",Pt[1]);return ct>1&&It.push("H",Pt[0]),It.join("")}function _s(Te){for(var He=0,ct=Te.length,Pt=Te[0],It=[Pt[0],",",Pt[1]];++He<ct;)It.push("V",(Pt=Te[He])[1],"H",Pt[0]);return It.join("")}function jf(Te){for(var He=0,ct=Te.length,Pt=Te[0],It=[Pt[0],",",Pt[1]];++He<ct;)It.push("H",(Pt=Te[He])[0],"V",Pt[1]);return It.join("")}function nf(Te,He){return Te.length<4?Ou(Te):Te[1]+O(Te.slice(1,-1),fe(Te,He))}function Gc(Te,He){return Te.length<3?Bf(Te):Te[0]+O((Te.push(Te[0]),Te),fe([Te[Te.length-2]].concat(Te,[Te[1]]),He))}function Ze(Te,He){return Te.length<3?Ou(Te):Te[0]+O(Te,fe(Te,He))}function O(Te,He){if(He.length<1||Te.length!=He.length&&Te.length!=He.length+2)return Ou(Te);var ct=Te.length!=He.length,Pt="",It=Te[0],Ut=Te[1],hr=He[0],fr=hr,Pr=1;if(ct&&(Pt+="Q"+(Ut[0]-hr[0]*2/3)+","+(Ut[1]-hr[1]*2/3)+","+Ut[0]+","+Ut[1],It=Te[1],Pr=2),He.length>1){fr=He[1],Ut=Te[Pr],Pr++,Pt+="C"+(It[0]+hr[0])+","+(It[1]+hr[1])+","+(Ut[0]-fr[0])+","+(Ut[1]-fr[1])+","+Ut[0]+","+Ut[1];for(var ln=2;ln<He.length;ln++,Pr++)Ut=Te[Pr],fr=He[ln],Pt+="S"+(Ut[0]-fr[0])+","+(Ut[1]-fr[1])+","+Ut[0]+","+Ut[1]}if(ct){var on=Te[Pr];Pt+="Q"+(Ut[0]+fr[0]*2/3)+","+(Ut[1]+fr[1]*2/3)+","+on[0]+","+on[1]}return Pt}function fe(Te,He){for(var ct=[],Pt=(1-He)/2,It,Ut=Te[0],hr=Te[1],fr=1,Pr=Te.length;++fr<Pr;)It=Ut,Ut=hr,hr=Te[fr],ct.push([Pt*(hr[0]-It[0]),Pt*(hr[1]-It[1])]);return ct}function Re(Te){if(Te.length<3)return Ou(Te);var He=1,ct=Te.length,Pt=Te[0],It=Pt[0],Ut=Pt[1],hr=[It,It,It,(Pt=Te[1])[0]],fr=[Ut,Ut,Ut,Pt[1]],Pr=[It,",",Ut,"L",zt(zr,hr),",",zt(zr,fr)];for(Te.push(Te[ct-1]);++He<=ct;)Pt=Te[He],hr.shift(),hr.push(Pt[0]),fr.shift(),fr.push(Pt[1]),qr(Pr,hr,fr);return Te.pop(),Pr.push("L",Pt),Pr.join("")}function Oe(Te){if(Te.length<4)return Ou(Te);for(var He=[],ct=-1,Pt=Te.length,It,Ut=[0],hr=[0];++ct<3;)It=Te[ct],Ut.push(It[0]),hr.push(It[1]);for(He.push(zt(zr,Ut)+","+zt(zr,hr)),--ct;++ct<Pt;)It=Te[ct],Ut.shift(),Ut.push(It[0]),hr.shift(),hr.push(It[1]),qr(He,Ut,hr);return He.join("")}function We(Te){for(var He,ct=-1,Pt=Te.length,It=Pt+4,Ut,hr=[],fr=[];++ct<4;)Ut=Te[ct%Pt],hr.push(Ut[0]),fr.push(Ut[1]);for(He=[zt(zr,hr),",",zt(zr,fr)],--ct;++ct<It;)Ut=Te[ct%Pt],hr.shift(),hr.push(Ut[0]),fr.shift(),fr.push(Ut[1]),qr(He,hr,fr);return He.join("")}function Mt(Te,He){var ct=Te.length-1;if(ct)for(var Pt=Te[0][0],It=Te[0][1],Ut=Te[ct][0]-Pt,hr=Te[ct][1]-It,fr=-1,Pr,ln;++fr<=ct;)Pr=Te[fr],ln=fr/ct,Pr[0]=He*Pr[0]+(1-He)*(Pt+ln*Ut),Pr[1]=He*Pr[1]+(1-He)*(It+ln*hr);return Re(Te)}function zt(Te,He){return Te[0]*He[0]+Te[1]*He[1]+Te[2]*He[2]+Te[3]*He[3]}var rr=[0,2/3,1/3,0],Tr=[0,1/3,2/3,0],zr=[0,1/6,2/3,1/6];function qr(Te,He,ct){Te.push("C",zt(rr,He),",",zt(rr,ct),",",zt(Tr,He),",",zt(Tr,ct),",",zt(zr,He),",",zt(zr,ct))}function pn(Te,He){return(He[1]-Te[1])/(He[0]-Te[0])}function Dn(Te){for(var He=0,ct=Te.length-1,Pt=[],It=Te[0],Ut=Te[1],hr=Pt[0]=pn(It,Ut);++He<ct;)Pt[He]=(hr+(hr=pn(It=Ut,Ut=Te[He+1])))/2;return Pt[He]=hr,Pt}function nt(Te){for(var He=[],ct,Pt,It,Ut,hr=Dn(Te),fr=-1,Pr=Te.length-1;++fr<Pr;)ct=pn(Te[fr],Te[fr+1]),c(ct)<ot?hr[fr]=hr[fr+1]=0:(Pt=hr[fr]/ct,It=hr[fr+1]/ct,Ut=Pt*Pt+It*It,Ut>9&&(Ut=ct*3/Math.sqrt(Ut),hr[fr]=Ut*Pt,hr[fr+1]=Ut*It));for(fr=-1;++fr<=Pr;)Ut=(Te[Math.min(Pr,fr+1)][0]-Te[Math.max(0,fr-1)][0])/(6*(1+hr[fr]*hr[fr])),He.push([Ut||0,hr[fr]*Ut||0]);return He}function ut(Te){return Te.length<3?Ou(Te):Te[0]+O(Te,nt(Te))}v.svg.line.radial=function(){var Te=Sc(wt);return Te.radius=Te.x,delete Te.x,Te.angle=Te.y,delete Te.y,Te};function wt(Te){for(var He,ct=-1,Pt=Te.length,It,Ut;++ct<Pt;)He=Te[ct],It=He[0],Ut=He[1]-tt,He[0]=It*Math.cos(Ut),He[1]=It*Math.sin(Ut);return Te}function kt(Te){var He=wo,ct=wo,Pt=0,It=Uo,Ut=oh,hr=Ou,fr=hr.key,Pr=hr,ln="L",on=.7;function Mn(jn){var Vn=[],Ka=[],Zn=[],ya=-1,Sa=jn.length,Xa,Qa=Rt(He),Aa=Rt(Pt),Si=He===ct?function(){return Ki}:Rt(ct),ho=Pt===It?function(){return lo}:Rt(It),Ki,lo;function zo(){Vn.push("M",hr(Te(Zn),on),ln,Pr(Te(Ka.reverse()),on),"Z")}for(;++ya<Sa;)Ut.call(this,Xa=jn[ya],ya)?(Ka.push([Ki=+Qa.call(this,Xa,ya),lo=+Aa.call(this,Xa,ya)]),Zn.push([+Si.call(this,Xa,ya),+ho.call(this,Xa,ya)])):Ka.length&&(zo(),Ka=[],Zn=[]);return Ka.length&&zo(),Vn.length?Vn.join(""):null}return Mn.x=function(jn){return arguments.length?(He=ct=jn,Mn):ct},Mn.x0=function(jn){return arguments.length?(He=jn,Mn):He},Mn.x1=function(jn){return arguments.length?(ct=jn,Mn):ct},Mn.y=function(jn){return arguments.length?(Pt=It=jn,Mn):It},Mn.y0=function(jn){return arguments.length?(Pt=jn,Mn):Pt},Mn.y1=function(jn){return arguments.length?(It=jn,Mn):It},Mn.defined=function(jn){return arguments.length?(Ut=jn,Mn):Ut},Mn.interpolate=function(jn){return arguments.length?(typeof jn=="function"?fr=hr=jn:fr=(hr=Ff.get(jn)||Ou).key,Pr=hr.reverse||hr,ln=hr.closed?"M":"L",Mn):fr},Mn.tension=function(jn){return arguments.length?(on=jn,Mn):on},Mn}_s.reverse=jf,jf.reverse=_s,v.svg.area=function(){return kt(U)},v.svg.area.radial=function(){var Te=kt(wt);return Te.radius=Te.x,delete Te.x,Te.innerRadius=Te.x0,delete Te.x0,Te.outerRadius=Te.x1,delete Te.x1,Te.angle=Te.y,delete Te.y,Te.startAngle=Te.y0,delete Te.y0,Te.endAngle=Te.y1,delete Te.y1,Te};function Ht(Te){return Te.source}function Ot(Te){return Te.target}v.svg.chord=function(){var Te=Ht,He=Ot,ct=Kt,Pt=ql,It=Al;function Ut(on,Mn){var jn=hr(this,Te,on,Mn),Vn=hr(this,He,on,Mn);return"M"+jn.p0+Pr(jn.r,jn.p1,jn.a1-jn.a0)+(fr(jn,Vn)?ln(jn.r,jn.p1,jn.r,jn.p0):ln(jn.r,jn.p1,Vn.r,Vn.p0)+Pr(Vn.r,Vn.p1,Vn.a1-Vn.a0)+ln(Vn.r,Vn.p1,jn.r,jn.p0))+"Z"}function hr(on,Mn,jn,Vn){var Ka=Mn.call(on,jn,Vn),Zn=ct.call(on,Ka,Vn),ya=Pt.call(on,Ka,Vn)-tt,Sa=It.call(on,Ka,Vn)-tt;return{r:Zn,a0:ya,a1:Sa,p0:[Zn*Math.cos(ya),Zn*Math.sin(ya)],p1:[Zn*Math.cos(Sa),Zn*Math.sin(Sa)]}}function fr(on,Mn){return on.a0==Mn.a0&&on.a1==Mn.a1}function Pr(on,Mn,jn){return"A"+on+","+on+" 0 "+ +(jn>Ee)+",1 "+Mn}function ln(on,Mn,jn,Vn){return"Q 0,0 "+Vn}return Ut.radius=function(on){return arguments.length?(ct=Rt(on),Ut):ct},Ut.source=function(on){return arguments.length?(Te=Rt(on),Ut):Te},Ut.target=function(on){return arguments.length?(He=Rt(on),Ut):He},Ut.startAngle=function(on){return arguments.length?(Pt=Rt(on),Ut):Pt},Ut.endAngle=function(on){return arguments.length?(It=Rt(on),Ut):It},Ut};function Kt(Te){return Te.radius}v.svg.diagonal=function(){var Te=Ht,He=Ot,ct=Cr;function Pt(It,Ut){var hr=Te.call(this,It,Ut),fr=He.call(this,It,Ut),Pr=(hr.y+fr.y)/2,ln=[hr,{x:hr.x,y:Pr},{x:fr.x,y:Pr},fr];return ln=ln.map(ct),"M"+ln[0]+"C"+ln[1]+" "+ln[2]+" "+ln[3]}return Pt.source=function(It){return arguments.length?(Te=Rt(It),Pt):Te},Pt.target=function(It){return arguments.length?(He=Rt(It),Pt):He},Pt.projection=function(It){return arguments.length?(ct=It,Pt):ct},Pt};function Cr(Te){return[Te.x,Te.y]}v.svg.diagonal.radial=function(){var Te=v.svg.diagonal(),He=Cr,ct=Te.projection;return Te.projection=function(Pt){return arguments.length?ct(Or(He=Pt)):He},Te};function Or(Te){return function(){var He=Te.apply(this,arguments),ct=He[0],Pt=He[1]-tt;return[ct*Math.cos(Pt),ct*Math.sin(Pt)]}}v.svg.symbol=function(){var Te=sn,He=Vr;function ct(Pt,It){return(Un.get(Te.call(this,Pt,It))||bn)(He.call(this,Pt,It))}return ct.type=function(Pt){return arguments.length?(Te=Rt(Pt),ct):Te},ct.size=function(Pt){return arguments.length?(He=Rt(Pt),ct):He},ct};function Vr(){return 64}function sn(){return"circle"}function bn(Te){var He=Math.sqrt(Te/Ee);return"M0,"+He+"A"+He+","+He+" 0 1,1 0,"+-He+"A"+He+","+He+" 0 1,1 0,"+He+"Z"}var Un=v.map({circle:bn,cross:function(Te){var He=Math.sqrt(Te/5)/2;return"M"+-3*He+","+-He+"H"+-He+"V"+-3*He+"H"+He+"V"+-He+"H"+3*He+"V"+He+"H"+He+"V"+3*He+"H"+-He+"V"+He+"H"+-3*He+"Z"},diamond:function(Te){var He=Math.sqrt(Te/(2*ua)),ct=He*ua;return"M0,"+-He+"L"+ct+",0 0,"+He+" "+-ct+",0Z"},square:function(Te){var He=Math.sqrt(Te)/2;return"M"+-He+","+-He+"L"+He+","+-He+" "+He+","+He+" "+-He+","+He+"Z"},"triangle-down":function(Te){var He=Math.sqrt(Te/Gn),ct=He*Gn/2;return"M0,"+ct+"L"+He+","+-ct+" "+-He+","+-ct+"Z"},"triangle-up":function(Te){var He=Math.sqrt(Te/Gn),ct=He*Gn/2;return"M0,"+-ct+"L"+He+","+ct+" "+-He+","+ct+"Z"}});v.svg.symbolTypes=Un.keys();var Gn=Math.sqrt(3),ua=Math.tan(30*st);oe.transition=function(Te){for(var He=Fo||++po,ct=ol(Te),Pt=[],It,Ut,hr=Po||{time:Date.now(),ease:Zo,delay:0,duration:250},fr=-1,Pr=this.length;++fr<Pr;){Pt.push(It=[]);for(var ln=this[fr],on=-1,Mn=ln.length;++on<Mn;)(Ut=ln[on])&&Bs(Ut,on,ct,He,hr),It.push(Ut)}return mi(Pt,ct,He)},oe.interrupt=function(Te){return this.each(Te==null?Ha:Ti(ol(Te)))};var Ha=Ti(ol());function Ti(Te){return function(){var He,ct,Pt;(He=this[Te])&&(Pt=He[ct=He.active])&&(Pt.timer.c=null,Pt.timer.t=NaN,--He.count?delete He[ct]:delete this[Te],He.active+=.5,Pt.event&&Pt.event.interrupt.call(this,this.__data__,Pt.index))}}function mi(Te,He,ct){return W(Te,Ai),Te.namespace=He,Te.id=ct,Te}var Ai=[],po=0,Fo,Po;Ai.call=oe.call,Ai.empty=oe.empty,Ai.node=oe.node,Ai.size=oe.size,v.transition=function(Te,He){return Te&&Te.transition?Fo?Te.transition(He):Te:v.selection().transition(Te)},v.transition.prototype=Ai,Ai.select=function(Te){var He=this.id,ct=this.namespace,Pt=[],It,Ut,hr;Te=Y(Te);for(var fr=-1,Pr=this.length;++fr<Pr;){Pt.push(It=[]);for(var ln=this[fr],on=-1,Mn=ln.length;++on<Mn;)(hr=ln[on])&&(Ut=Te.call(hr,hr.__data__,on,fr))?("__data__"in hr&&(Ut.__data__=hr.__data__),Bs(Ut,on,ct,He,hr[ct][He]),It.push(Ut)):It.push(null)}return mi(Pt,ct,He)},Ai.selectAll=function(Te){var He=this.id,ct=this.namespace,Pt=[],It,Ut,hr,fr,Pr;Te=ce(Te);for(var ln=-1,on=this.length;++ln<on;)for(var Mn=this[ln],jn=-1,Vn=Mn.length;++jn<Vn;)if(hr=Mn[jn]){Pr=hr[ct][He],Ut=Te.call(hr,hr.__data__,jn,ln),Pt.push(It=[]);for(var Ka=-1,Zn=Ut.length;++Ka<Zn;)(fr=Ut[Ka])&&Bs(fr,Ka,ct,He,Pr),It.push(fr)}return mi(Pt,ct,He)},Ai.filter=function(Te){var He=[],ct,Pt,It;typeof Te!="function"&&(Te=be(Te));for(var Ut=0,hr=this.length;Ut<hr;Ut++){He.push(ct=[]);for(var Pt=this[Ut],fr=0,Pr=Pt.length;fr<Pr;fr++)(It=Pt[fr])&&Te.call(It,It.__data__,fr,Ut)&&ct.push(It)}return mi(He,this.namespace,this.id)},Ai.tween=function(Te,He){var ct=this.id,Pt=this.namespace;return arguments.length<2?this.node()[Pt][ct].tween.get(Te):mt(this,He==null?function(It){It[Pt][ct].tween.remove(Te)}:function(It){It[Pt][ct].tween.set(Te,He)})};function us(Te,He,ct,Pt){var It=Te.id,Ut=Te.namespace;return mt(Te,typeof ct=="function"?function(hr,fr,Pr){hr[Ut][It].tween.set(He,Pt(ct.call(hr,hr.__data__,fr,Pr)))}:(ct=Pt(ct),function(hr){hr[Ut][It].tween.set(He,ct)}))}Ai.attr=function(Te,He){if(arguments.length<2){for(He in Te)this.attr(He,Te[He]);return this}var ct=Te=="transform"?Oh:Js,Pt=v.ns.qualify(Te);function It(){this.removeAttribute(Pt)}function Ut(){this.removeAttributeNS(Pt.space,Pt.local)}function hr(Pr){return Pr==null?It:(Pr+="",function(){var ln=this.getAttribute(Pt),on;return ln!==Pr&&(on=ct(ln,Pr),function(Mn){this.setAttribute(Pt,on(Mn))})})}function fr(Pr){return Pr==null?Ut:(Pr+="",function(){var ln=this.getAttributeNS(Pt.space,Pt.local),on;return ln!==Pr&&(on=ct(ln,Pr),function(Mn){this.setAttributeNS(Pt.space,Pt.local,on(Mn))})})}return us(this,"attr."+Te,He,Pt.local?fr:hr)},Ai.attrTween=function(Te,He){var ct=v.ns.qualify(Te);function Pt(Ut,hr){var fr=He.call(this,Ut,hr,this.getAttribute(ct));return fr&&function(Pr){this.setAttribute(ct,fr(Pr))}}function It(Ut,hr){var fr=He.call(this,Ut,hr,this.getAttributeNS(ct.space,ct.local));return fr&&function(Pr){this.setAttributeNS(ct.space,ct.local,fr(Pr))}}return this.tween("attr."+Te,ct.local?It:Pt)},Ai.style=function(Te,He,ct){var Pt=arguments.length;if(Pt<3){if(typeof Te!="string"){Pt<2&&(He="");for(ct in Te)this.style(ct,Te[ct],He);return this}ct=""}function It(){this.style.removeProperty(Te)}function Ut(hr){return hr==null?It:(hr+="",function(){var fr=r(this).getComputedStyle(this,null).getPropertyValue(Te),Pr;return fr!==hr&&(Pr=Js(fr,hr),function(ln){this.style.setProperty(Te,Pr(ln),ct)})})}return us(this,"style."+Te,He,Ut)},Ai.styleTween=function(Te,He,ct){arguments.length<3&&(ct="");function Pt(It,Ut){var hr=He.call(this,It,Ut,r(this).getComputedStyle(this,null).getPropertyValue(Te));return hr&&function(fr){this.style.setProperty(Te,hr(fr),ct)}}return this.tween("style."+Te,Pt)},Ai.text=function(Te){return us(this,"text",Te,il)};function il(Te){return Te==null&&(Te=""),function(){this.textContent=Te}}Ai.remove=function(){var Te=this.namespace;return this.each("end.transition",function(){var He;this[Te].count<2&&(He=this.parentNode)&&He.removeChild(this)})},Ai.ease=function(Te){var He=this.id,ct=this.namespace;return arguments.length<1?this.node()[ct][He].ease:(typeof Te!="function"&&(Te=v.ease.apply(v,arguments)),mt(this,function(Pt){Pt[ct][He].ease=Te}))},Ai.delay=function(Te){var He=this.id,ct=this.namespace;return arguments.length<1?this.node()[ct][He].delay:mt(this,typeof Te=="function"?function(Pt,It,Ut){Pt[ct][He].delay=+Te.call(Pt,Pt.__data__,It,Ut)}:(Te=+Te,function(Pt){Pt[ct][He].delay=Te}))},Ai.duration=function(Te){var He=this.id,ct=this.namespace;return arguments.length<1?this.node()[ct][He].duration:mt(this,typeof Te=="function"?function(Pt,It,Ut){Pt[ct][He].duration=Math.max(1,Te.call(Pt,Pt.__data__,It,Ut))}:(Te=Math.max(1,Te),function(Pt){Pt[ct][He].duration=Te}))},Ai.each=function(Te,He){var ct=this.id,Pt=this.namespace;if(arguments.length<2){var It=Po,Ut=Fo;try{Fo=ct,mt(this,function(hr,fr,Pr){Po=hr[Pt][ct],Te.call(hr,hr.__data__,fr,Pr)})}finally{Po=It,Fo=Ut}}else mt(this,function(hr){var fr=hr[Pt][ct];(fr.event||(fr.event=v.dispatch("start","end","interrupt"))).on(Te,He)});return this},Ai.transition=function(){for(var Te=this.id,He=++po,ct=this.namespace,Pt=[],It,Ut,hr,fr,Pr=0,ln=this.length;Pr<ln;Pr++){Pt.push(It=[]);for(var Ut=this[Pr],on=0,Mn=Ut.length;on<Mn;on++)(hr=Ut[on])&&(fr=hr[ct][Te],Bs(hr,on,ct,He,{time:fr.time,ease:fr.ease,delay:fr.delay+fr.duration,duration:fr.duration})),It.push(hr)}return mi(Pt,ct,He)};function ol(Te){return Te==null?"__transition__":"__transition_"+Te+"__"}function Bs(Te,He,ct,Pt,It){var Ut=Te[ct]||(Te[ct]={active:0,count:0}),hr=Ut[Pt],fr,Pr,ln,on,Mn;function jn(Zn){var ya=hr.delay;if(Pr.t=ya+fr,ya<=Zn)return Vn(Zn-ya);Pr.c=Vn}function Vn(Zn){var ya=Ut.active,Sa=Ut[ya];Sa&&(Sa.timer.c=null,Sa.timer.t=NaN,--Ut.count,delete Ut[ya],Sa.event&&Sa.event.interrupt.call(Te,Te.__data__,Sa.index));for(var Xa in Ut)if(+Xa<Pt){var Qa=Ut[Xa];Qa.timer.c=null,Qa.timer.t=NaN,--Ut.count,delete Ut[Xa]}Pr.c=Ka,Ya(function(){return Pr.c&&Ka(Zn||1)&&(Pr.c=null,Pr.t=NaN),1},0,fr),Ut.active=Pt,hr.event&&hr.event.start.call(Te,Te.__data__,He),Mn=[],hr.tween.forEach(function(Aa,Si){(Si=Si.call(Te,Te.__data__,He))&&Mn.push(Si)}),on=hr.ease,ln=hr.duration}function Ka(Zn){for(var ya=Zn/ln,Sa=on(ya),Xa=Mn.length;Xa>0;)Mn[--Xa].call(Te,Sa);if(ya>=1)return hr.event&&hr.event.end.call(Te,Te.__data__,He),--Ut.count?delete Ut[Pt]:delete Te[ct],1}hr||(fr=It.time,Pr=Ya(jn,0,fr),hr=Ut[Pt]={tween:new M,time:fr,timer:Pr,delay:It.delay,duration:It.duration,ease:It.ease,index:He},It=null,++Ut.count)}v.svg.axis=function(){var Te=v.scale.linear(),He=hl,ct=6,Pt=6,It=3,Ut=[10],hr=null,fr;function Pr(ln){ln.each(function(){var on=v.select(this),Mn=this.__chart__||Te,jn=this.__chart__=Te.copy(),Vn=hr??(jn.ticks?jn.ticks.apply(jn,Ut):jn.domain()),Ka=fr??(jn.tickFormat?jn.tickFormat.apply(jn,Ut):U),Zn=on.selectAll(".tick").data(Vn,jn),ya=Zn.enter().insert("g",".domain").attr("class","tick").style("opacity",ot),Sa=v.transition(Zn.exit()).style("opacity",ot).remove(),Xa=v.transition(Zn.order()).style("opacity",1),Qa=Math.max(ct,0)+It,Aa,Si=Ga(jn),ho=on.selectAll(".domain").data([0]),Ki=(ho.enter().append("path").attr("class","domain"),v.transition(ho));ya.append("line"),ya.append("text");var lo=ya.select("line"),zo=Xa.select("line"),qo=Zn.select("text").text(Ka),nl=ya.select("text"),Go=Xa.select("text"),bs=He==="top"||He==="left"?-1:1,fl,ju,ou,So;if(He==="bottom"||He==="top"?(Aa=cu,fl="x",ou="y",ju="x2",So="y2",qo.attr("dy",bs<0?"0em":".71em").style("text-anchor","middle"),Ki.attr("d","M"+Si[0]+","+bs*Pt+"V0H"+Si[1]+"V"+bs*Pt)):(Aa=js,fl="y",ou="x",ju="y2",So="x2",qo.attr("dy",".32em").style("text-anchor",bs<0?"end":"start"),Ki.attr("d","M"+bs*Pt+","+Si[0]+"H0V"+Si[1]+"H"+bs*Pt)),lo.attr(So,bs*ct),nl.attr(ou,bs*Qa),zo.attr(ju,0).attr(So,bs*ct),Go.attr(fl,0).attr(ou,bs*Qa),jn.rangeBand){var qs=jn,sl=qs.rangeBand()/2;Mn=jn=function(tu){return qs(tu)+sl}}else Mn.rangeBand?Mn=jn:Sa.call(Aa,jn,Mn);ya.call(Aa,Mn,jn),Xa.call(Aa,jn,jn)})}return Pr.scale=function(ln){return arguments.length?(Te=ln,Pr):Te},Pr.orient=function(ln){return arguments.length?(He=ln in bu?ln+"":hl,Pr):He},Pr.ticks=function(){return arguments.length?(Ut=C(arguments),Pr):Ut},Pr.tickValues=function(ln){return arguments.length?(hr=ln,Pr):hr},Pr.tickFormat=function(ln){return arguments.length?(fr=ln,Pr):fr},Pr.tickSize=function(ln){var on=arguments.length;return on?(ct=+ln,Pt=+arguments[on-1],Pr):ct},Pr.innerTickSize=function(ln){return arguments.length?(ct=+ln,Pr):ct},Pr.outerTickSize=function(ln){return arguments.length?(Pt=+ln,Pr):Pt},Pr.tickPadding=function(ln){return arguments.length?(It=+ln,Pr):It},Pr.tickSubdivide=function(){return arguments.length&&Pr},Pr};var hl="bottom",bu={top:1,right:1,bottom:1,left:1};function cu(Te,He,ct){Te.attr("transform",function(Pt){var It=He(Pt);return"translate("+(isFinite(It)?It:ct(Pt))+",0)"})}function js(Te,He,ct){Te.attr("transform",function(Pt){var It=He(Pt);return"translate(0,"+(isFinite(It)?It:ct(Pt))+")"})}v.svg.brush=function(){var Te=de(on,"brushstart","brush","brushend"),He=null,ct=null,Pt=[0,0],It=[0,0],Ut,hr,fr=!0,Pr=!0,ln=Bu[0];function on(Zn){Zn.each(function(){var ya=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ka).on("touchstart.brush",Ka),Sa=ya.selectAll(".background").data([0]);Sa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),ya.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Xa=ya.selectAll(".resize").data(ln,U);Xa.exit().remove(),Xa.enter().append("g").attr("class",function(ho){return"resize "+ho}).style("cursor",function(ho){return Us[ho]}).append("rect").attr("x",function(ho){return/[ew]$/.test(ho)?-3:null}).attr("y",function(ho){return/^[ns]/.test(ho)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Xa.style("display",on.empty()?"none":null);var Qa=v.transition(ya),Aa=v.transition(Sa),Si;He&&(Si=Ga(He),Aa.attr("x",Si[0]).attr("width",Si[1]-Si[0]),jn(Qa)),ct&&(Si=Ga(ct),Aa.attr("y",Si[0]).attr("height",Si[1]-Si[0]),Vn(Qa)),Mn(Qa)})}on.event=function(Zn){Zn.each(function(){var ya=Te.of(this,arguments),Sa={x:Pt,y:It,i:Ut,j:hr},Xa=this.__chart__||Sa;this.__chart__=Sa,Fo?v.select(this).transition().each("start.brush",function(){Ut=Xa.i,hr=Xa.j,Pt=Xa.x,It=Xa.y,ya({type:"brushstart"})}).tween("brush:brush",function(){var Qa=Ul(Pt,Sa.x),Aa=Ul(It,Sa.y);return Ut=hr=null,function(Si){Pt=Sa.x=Qa(Si),It=Sa.y=Aa(Si),ya({type:"brush",mode:"resize"})}}).each("end.brush",function(){Ut=Sa.i,hr=Sa.j,ya({type:"brush",mode:"resize"}),ya({type:"brushend"})}):(ya({type:"brushstart"}),ya({type:"brush",mode:"resize"}),ya({type:"brushend"}))})};function Mn(Zn){Zn.selectAll(".resize").attr("transform",function(ya){return"translate("+Pt[+/e$/.test(ya)]+","+It[+/^s/.test(ya)]+")"})}function jn(Zn){Zn.select(".extent").attr("x",Pt[0]),Zn.selectAll(".extent,.n>rect,.s>rect").attr("width",Pt[1]-Pt[0])}function Vn(Zn){Zn.select(".extent").attr("y",It[0]),Zn.selectAll(".extent,.e>rect,.w>rect").attr("height",It[1]-It[0])}function Ka(){var Zn=this,ya=v.select(v.event.target),Sa=Te.of(Zn,arguments),Xa=v.select(Zn),Qa=ya.datum(),Aa=!/^(n|s)$/.test(Qa)&&He,Si=!/^(e|w)$/.test(Qa)&&ct,ho=ya.classed("extent"),Ki=Nr(Zn),lo,zo=v.mouse(Zn),qo,nl=v.select(r(Zn)).on("keydown.brush",fl).on("keyup.brush",ju);if(v.event.changedTouches?nl.on("touchmove.brush",ou).on("touchend.brush",qs):nl.on("mousemove.brush",ou).on("mouseup.brush",qs),Xa.interrupt().selectAll("*").interrupt(),ho)zo[0]=Pt[0]-zo[0],zo[1]=It[0]-zo[1];else if(Qa){var Go=+/w$/.test(Qa),bs=+/^n/.test(Qa);qo=[Pt[1-Go]-zo[0],It[1-bs]-zo[1]],zo[0]=Pt[Go],zo[1]=It[bs]}else v.event.altKey&&(lo=zo.slice());Xa.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",ya.style("cursor")),Sa({type:"brushstart"}),ou();function fl(){v.event.keyCode==32&&(ho||(lo=null,zo[0]-=Pt[1],zo[1]-=It[1],ho=2),le())}function ju(){v.event.keyCode==32&&ho==2&&(zo[0]+=Pt[1],zo[1]+=It[1],ho=0,le())}function ou(){var sl=v.mouse(Zn),tu=!1;qo&&(sl[0]+=qo[0],sl[1]+=qo[1]),ho||(v.event.altKey?(lo||(lo=[(Pt[0]+Pt[1])/2,(It[0]+It[1])/2]),zo[0]=Pt[+(sl[0]<lo[0])],zo[1]=It[+(sl[1]<lo[1])]):lo=null),Aa&&So(sl,He,0)&&(jn(Xa),tu=!0),Si&&So(sl,ct,1)&&(Vn(Xa),tu=!0),tu&&(Mn(Xa),Sa({type:"brush",mode:ho?"move":"resize"}))}function So(sl,tu,Vl){var Lc=Ga(tu),Ol=Lc[0],ru=Lc[1],af=zo[Vl],zu=Vl?It:Pt,At=zu[1]-zu[0],kr,Dr;if(ho&&(Ol-=af,ru-=At+af),kr=(Vl?Pr:fr)?Math.max(Ol,Math.min(ru,sl[Vl])):sl[Vl],ho?Dr=(kr+=af)+At:(lo&&(af=Math.max(Ol,Math.min(ru,2*lo[Vl]-kr))),af<kr?(Dr=kr,kr=af):Dr=af),zu[0]!=kr||zu[1]!=Dr)return Vl?hr=null:Ut=null,zu[0]=kr,zu[1]=Dr,!0}function qs(){ou(),Xa.style("pointer-events","all").selectAll(".resize").style("display",on.empty()?"none":null),v.select("body").style("cursor",null),nl.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),Ki(),Sa({type:"brushend"})}}return on.x=function(Zn){return arguments.length?(He=Zn,ln=Bu[!He<<1|!ct],on):He},on.y=function(Zn){return arguments.length?(ct=Zn,ln=Bu[!He<<1|!ct],on):ct},on.clamp=function(Zn){return arguments.length?(He&&ct?(fr=!!Zn[0],Pr=!!Zn[1]):He?fr=!!Zn:ct&&(Pr=!!Zn),on):He&&ct?[fr,Pr]:He?fr:ct?Pr:null},on.extent=function(Zn){var ya,Sa,Xa,Qa,Aa;return arguments.length?(He&&(ya=Zn[0],Sa=Zn[1],ct&&(ya=ya[0],Sa=Sa[0]),Ut=[ya,Sa],He.invert&&(ya=He(ya),Sa=He(Sa)),Sa<ya&&(Aa=ya,ya=Sa,Sa=Aa),(ya!=Pt[0]||Sa!=Pt[1])&&(Pt=[ya,Sa])),ct&&(Xa=Zn[0],Qa=Zn[1],He&&(Xa=Xa[1],Qa=Qa[1]),hr=[Xa,Qa],ct.invert&&(Xa=ct(Xa),Qa=ct(Qa)),Qa<Xa&&(Aa=Xa,Xa=Qa,Qa=Aa),(Xa!=It[0]||Qa!=It[1])&&(It=[Xa,Qa])),on):(He&&(Ut?(ya=Ut[0],Sa=Ut[1]):(ya=Pt[0],Sa=Pt[1],He.invert&&(ya=He.invert(ya),Sa=He.invert(Sa)),Sa<ya&&(Aa=ya,ya=Sa,Sa=Aa))),ct&&(hr?(Xa=hr[0],Qa=hr[1]):(Xa=It[0],Qa=It[1],ct.invert&&(Xa=ct.invert(Xa),Qa=ct.invert(Qa)),Qa<Xa&&(Aa=Xa,Xa=Qa,Qa=Aa))),He&&ct?[[ya,Xa],[Sa,Qa]]:He?[ya,Sa]:ct&&[Xa,Qa])},on.clear=function(){return on.empty()||(Pt=[0,0],It=[0,0],Ut=hr=null),on},on.empty=function(){return!!He&&Pt[0]==Pt[1]||!!ct&&It[0]==It[1]},v.rebind(on,Te,"on")};var Us={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Bu=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];v.text=xr(function(Te){return Te.responseText}),v.json=function(Te,He){return Wr(Te,"application/json",pc,He)};function pc(Te){return JSON.parse(Te.responseText)}v.html=function(Te,He){return Wr(Te,"text/html",Xc,He)};function Xc(Te){var He=P.createRange();return He.selectNode(P.body),He.createContextualFragment(Te.responseText)}v.xml=xr(function(Te){return Te.responseXML}),typeof Z=="object"&&Z.exports?Z.exports=v:this.d3=v}).apply(self)}}),Na=Ne({"node_modules/d3-time/dist/d3-time.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=new Date,C=new Date;function P(be,Ye,mt,bt){function ft(Wt){return be(Wt=arguments.length===0?new Date:new Date(+Wt)),Wt}return ft.floor=function(Wt){return be(Wt=new Date(+Wt)),Wt},ft.ceil=function(Wt){return be(Wt=new Date(Wt-1)),Ye(Wt,1),be(Wt),Wt},ft.round=function(Wt){var Zt=ft(Wt),cr=ft.ceil(Wt);return Wt-Zt<cr-Wt?Zt:cr},ft.offset=function(Wt,Zt){return Ye(Wt=new Date(+Wt),Zt==null?1:Math.floor(Zt)),Wt},ft.range=function(Wt,Zt,cr){var pr=[],Br;if(Wt=ft.ceil(Wt),cr=cr==null?1:Math.floor(cr),!(Wt<Zt)||!(cr>0))return pr;do pr.push(Br=new Date(+Wt)),Ye(Wt,cr),be(Wt);while(Br<Wt&&Wt<Zt);return pr},ft.filter=function(Wt){return P(function(Zt){if(Zt>=Zt)for(;be(Zt),!Wt(Zt);)Zt.setTime(Zt-1)},function(Zt,cr){if(Zt>=Zt)if(cr<0)for(;++cr<=0;)for(;Ye(Zt,-1),!Wt(Zt););else for(;--cr>=0;)for(;Ye(Zt,1),!Wt(Zt););})},mt&&(ft.count=function(Wt,Zt){return w.setTime(+Wt),C.setTime(+Zt),be(w),be(C),Math.floor(mt(w,C))},ft.every=function(Wt){return Wt=Math.floor(Wt),!isFinite(Wt)||!(Wt>0)?null:Wt>1?ft.filter(bt?function(Zt){return bt(Zt)%Wt===0}:function(Zt){return ft.count(0,Zt)%Wt===0}):ft}),ft}var t=P(function(){},function(be,Ye){be.setTime(+be+Ye)},function(be,Ye){return Ye-be});t.every=function(be){return be=Math.floor(be),!isFinite(be)||!(be>0)?null:be>1?P(function(Ye){Ye.setTime(Math.floor(Ye/be)*be)},function(Ye,mt){Ye.setTime(+Ye+mt*be)},function(Ye,mt){return(mt-Ye)/be}):t};var r=t.range,a=1e3,l=6e4,i=36e5,s=864e5,o=6048e5,u=P(function(be){be.setTime(be-be.getMilliseconds())},function(be,Ye){be.setTime(+be+Ye*a)},function(be,Ye){return(Ye-be)/a},function(be){return be.getUTCSeconds()}),d=u.range,h=P(function(be){be.setTime(be-be.getMilliseconds()-be.getSeconds()*a)},function(be,Ye){be.setTime(+be+Ye*l)},function(be,Ye){return(Ye-be)/l},function(be){return be.getMinutes()}),y=h.range,m=P(function(be){be.setTime(be-be.getMilliseconds()-be.getSeconds()*a-be.getMinutes()*l)},function(be,Ye){be.setTime(+be+Ye*i)},function(be,Ye){return(Ye-be)/i},function(be){return be.getHours()}),E=m.range,c=P(function(be){be.setHours(0,0,0,0)},function(be,Ye){be.setDate(be.getDate()+Ye)},function(be,Ye){return(Ye-be-(Ye.getTimezoneOffset()-be.getTimezoneOffset())*l)/s},function(be){return be.getDate()-1}),_=c.range;function T(be){return P(function(Ye){Ye.setDate(Ye.getDate()-(Ye.getDay()+7-be)%7),Ye.setHours(0,0,0,0)},function(Ye,mt){Ye.setDate(Ye.getDate()+mt*7)},function(Ye,mt){return(mt-Ye-(mt.getTimezoneOffset()-Ye.getTimezoneOffset())*l)/o})}var M=T(0),k=T(1),b=T(2),A=T(3),g=T(4),f=T(5),p=T(6),x=M.range,N=k.range,D=b.range,B=A.range,U=g.range,V=f.range,q=p.range,z=P(function(be){be.setDate(1),be.setHours(0,0,0,0)},function(be,Ye){be.setMonth(be.getMonth()+Ye)},function(be,Ye){return Ye.getMonth()-be.getMonth()+(Ye.getFullYear()-be.getFullYear())*12},function(be){return be.getMonth()}),H=z.range,G=P(function(be){be.setMonth(0,1),be.setHours(0,0,0,0)},function(be,Ye){be.setFullYear(be.getFullYear()+Ye)},function(be,Ye){return Ye.getFullYear()-be.getFullYear()},function(be){return be.getFullYear()});G.every=function(be){return!isFinite(be=Math.floor(be))||!(be>0)?null:P(function(Ye){Ye.setFullYear(Math.floor(Ye.getFullYear()/be)*be),Ye.setMonth(0,1),Ye.setHours(0,0,0,0)},function(Ye,mt){Ye.setFullYear(Ye.getFullYear()+mt*be)})};var J=G.range,le=P(function(be){be.setUTCSeconds(0,0)},function(be,Ye){be.setTime(+be+Ye*l)},function(be,Ye){return(Ye-be)/l},function(be){return be.getUTCMinutes()}),ye=le.range,de=P(function(be){be.setUTCMinutes(0,0,0)},function(be,Ye){be.setTime(+be+Ye*i)},function(be,Ye){return(Ye-be)/i},function(be){return be.getUTCHours()}),me=de.range,W=P(function(be){be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCDate(be.getUTCDate()+Ye)},function(be,Ye){return(Ye-be)/s},function(be){return be.getUTCDate()-1}),ie=W.range;function se(be){return P(function(Ye){Ye.setUTCDate(Ye.getUTCDate()-(Ye.getUTCDay()+7-be)%7),Ye.setUTCHours(0,0,0,0)},function(Ye,mt){Ye.setUTCDate(Ye.getUTCDate()+mt*7)},function(Ye,mt){return(mt-Ye)/o})}var ee=se(0),pe=se(1),oe=se(2),Y=se(3),ce=se(4),ue=se(5),_e=se(6),Le=ee.range,ze=pe.range,Ge=oe.range,Ve=Y.range,rt=ce.range,pt=ue.range,gt=_e.range,ht=P(function(be){be.setUTCDate(1),be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCMonth(be.getUTCMonth()+Ye)},function(be,Ye){return Ye.getUTCMonth()-be.getUTCMonth()+(Ye.getUTCFullYear()-be.getUTCFullYear())*12},function(be){return be.getUTCMonth()}),lt=ht.range,Fe=P(function(be){be.setUTCMonth(0,1),be.setUTCHours(0,0,0,0)},function(be,Ye){be.setUTCFullYear(be.getUTCFullYear()+Ye)},function(be,Ye){return Ye.getUTCFullYear()-be.getUTCFullYear()},function(be){return be.getUTCFullYear()});Fe.every=function(be){return!isFinite(be=Math.floor(be))||!(be>0)?null:P(function(Ye){Ye.setUTCFullYear(Math.floor(Ye.getUTCFullYear()/be)*be),Ye.setUTCMonth(0,1),Ye.setUTCHours(0,0,0,0)},function(Ye,mt){Ye.setUTCFullYear(Ye.getUTCFullYear()+mt*be)})};var Pe=Fe.range;v.timeDay=c,v.timeDays=_,v.timeFriday=f,v.timeFridays=V,v.timeHour=m,v.timeHours=E,v.timeInterval=P,v.timeMillisecond=t,v.timeMilliseconds=r,v.timeMinute=h,v.timeMinutes=y,v.timeMonday=k,v.timeMondays=N,v.timeMonth=z,v.timeMonths=H,v.timeSaturday=p,v.timeSaturdays=q,v.timeSecond=u,v.timeSeconds=d,v.timeSunday=M,v.timeSundays=x,v.timeThursday=g,v.timeThursdays=U,v.timeTuesday=b,v.timeTuesdays=D,v.timeWednesday=A,v.timeWednesdays=B,v.timeWeek=M,v.timeWeeks=x,v.timeYear=G,v.timeYears=J,v.utcDay=W,v.utcDays=ie,v.utcFriday=ue,v.utcFridays=pt,v.utcHour=de,v.utcHours=me,v.utcMillisecond=t,v.utcMilliseconds=r,v.utcMinute=le,v.utcMinutes=ye,v.utcMonday=pe,v.utcMondays=ze,v.utcMonth=ht,v.utcMonths=lt,v.utcSaturday=_e,v.utcSaturdays=gt,v.utcSecond=u,v.utcSeconds=d,v.utcSunday=ee,v.utcSundays=Le,v.utcThursday=ce,v.utcThursdays=rt,v.utcTuesday=oe,v.utcTuesdays=Ge,v.utcWednesday=Y,v.utcWednesdays=Ve,v.utcWeek=ee,v.utcWeeks=Le,v.utcYear=Fe,v.utcYears=Pe,Object.defineProperty(v,"__esModule",{value:!0})})}}),zn=Ne({"node_modules/d3-time-format/dist/d3-time-format.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,Na()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C($e){if(0<=$e.y&&$e.y<100){var ot=new Date(-1,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L);return ot.setFullYear($e.y),ot}return new Date($e.y,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L)}function P($e){if(0<=$e.y&&$e.y<100){var ot=new Date(Date.UTC(-1,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L));return ot.setUTCFullYear($e.y),ot}return new Date(Date.UTC($e.y,$e.m,$e.d,$e.H,$e.M,$e.S,$e.L))}function t($e,ot,De){return{y:$e,m:ot,d:De,H:0,M:0,S:0,L:0}}function r($e){var ot=$e.dateTime,De=$e.date,Ee=$e.time,Ae=$e.periods,Ie=$e.days,tt=$e.shortDays,st=$e.months,Ft=$e.shortMonths,Nt=d(Ae),Xt=h(Ae),lr=d(Ie),Rr=h(Ie),Mr=d(tt),Sr=h(tt),Kr=d(st),qn=h(st),ha=d(Ft),ia=h(Ft),xa={a:Da,A:Pa,b:Fa,B:$a,c:null,d:z,e:z,f:ye,H,I:G,j:J,L:le,m:de,M:me,p:oa,q:zi,Q:Zt,s:cr,S:W,u:ie,U:se,V:ee,w:pe,W:oe,x:null,X:null,y:Y,Y:ce,Z:ue,"%":Wt},ba={a:Gi,A:qt,b:Ct,B:Ur,c:null,d:_e,e:_e,f:rt,H:Le,I:ze,j:Ge,L:Ve,m:pt,M:gt,p:Qr,q:tn,Q:Zt,s:cr,S:ht,u:lt,U:Fe,V:Pe,w:be,W:Ye,x:null,X:null,y:mt,Y:bt,Z:ft,"%":Wt},ea={a:yr,A:br,b:nn,B:wn,c:Ln,d:g,e:g,f:B,H:p,I:p,j:f,L:D,m:A,M:x,p:Qt,q:b,Q:V,s:q,S:N,u:m,U:E,V:c,w:y,W:_,x:Fn,X:va,y:M,Y:T,Z:k,"%":U};xa.x=Za(De,xa),xa.X=Za(Ee,xa),xa.c=Za(ot,xa),ba.x=Za(De,ba),ba.X=Za(Ee,ba),ba.c=Za(ot,ba);function Za(Xr,en){return function(Tn){var hn=[],Rt=-1,xr=0,Wr=Xr.length,An,Xn,na;for(Tn instanceof Date||(Tn=new Date(+Tn));++Rt<Wr;)Xr.charCodeAt(Rt)===37&&(hn.push(Xr.slice(xr,Rt)),(Xn=a[An=Xr.charAt(++Rt)])!=null?An=Xr.charAt(++Rt):Xn=An==="e"?" ":"0",(na=en[An])&&(An=na(Tn,Xn)),hn.push(An),xr=Rt+1);return hn.push(Xr.slice(xr,Rt)),hn.join("")}}function ui(Xr,en){return function(Tn){var hn=t(1900,void 0,1),Rt=_r(hn,Xr,Tn+="",0),xr,Wr;if(Rt!=Tn.length)return null;if("Q"in hn)return new Date(hn.Q);if("s"in hn)return new Date(hn.s*1e3+("L"in hn?hn.L:0));if(en&&!("Z"in hn)&&(hn.Z=0),"p"in hn&&(hn.H=hn.H%12+hn.p*12),hn.m===void 0&&(hn.m="q"in hn?hn.q:0),"V"in hn){if(hn.V<1||hn.V>53)return null;"w"in hn||(hn.w=1),"Z"in hn?(xr=P(t(hn.y,0,1)),Wr=xr.getUTCDay(),xr=Wr>4||Wr===0?w.utcMonday.ceil(xr):w.utcMonday(xr),xr=w.utcDay.offset(xr,(hn.V-1)*7),hn.y=xr.getUTCFullYear(),hn.m=xr.getUTCMonth(),hn.d=xr.getUTCDate()+(hn.w+6)%7):(xr=C(t(hn.y,0,1)),Wr=xr.getDay(),xr=Wr>4||Wr===0?w.timeMonday.ceil(xr):w.timeMonday(xr),xr=w.timeDay.offset(xr,(hn.V-1)*7),hn.y=xr.getFullYear(),hn.m=xr.getMonth(),hn.d=xr.getDate()+(hn.w+6)%7)}else("W"in hn||"U"in hn)&&("w"in hn||(hn.w="u"in hn?hn.u%7:"W"in hn?1:0),Wr="Z"in hn?P(t(hn.y,0,1)).getUTCDay():C(t(hn.y,0,1)).getDay(),hn.m=0,hn.d="W"in hn?(hn.w+6)%7+hn.W*7-(Wr+5)%7:hn.w+hn.U*7-(Wr+6)%7);return"Z"in hn?(hn.H+=hn.Z/100|0,hn.M+=hn.Z%100,P(hn)):C(hn)}}function _r(Xr,en,Tn,hn){for(var Rt=0,xr=en.length,Wr=Tn.length,An,Xn;Rt<xr;){if(hn>=Wr)return-1;if(An=en.charCodeAt(Rt++),An===37){if(An=en.charAt(Rt++),Xn=ea[An in a?en.charAt(Rt++):An],!Xn||(hn=Xn(Xr,Tn,hn))<0)return-1}else if(An!=Tn.charCodeAt(hn++))return-1}return hn}function Qt(Xr,en,Tn){var hn=Nt.exec(en.slice(Tn));return hn?(Xr.p=Xt[hn[0].toLowerCase()],Tn+hn[0].length):-1}function yr(Xr,en,Tn){var hn=Mr.exec(en.slice(Tn));return hn?(Xr.w=Sr[hn[0].toLowerCase()],Tn+hn[0].length):-1}function br(Xr,en,Tn){var hn=lr.exec(en.slice(Tn));return hn?(Xr.w=Rr[hn[0].toLowerCase()],Tn+hn[0].length):-1}function nn(Xr,en,Tn){var hn=ha.exec(en.slice(Tn));return hn?(Xr.m=ia[hn[0].toLowerCase()],Tn+hn[0].length):-1}function wn(Xr,en,Tn){var hn=Kr.exec(en.slice(Tn));return hn?(Xr.m=qn[hn[0].toLowerCase()],Tn+hn[0].length):-1}function Ln(Xr,en,Tn){return _r(Xr,ot,en,Tn)}function Fn(Xr,en,Tn){return _r(Xr,De,en,Tn)}function va(Xr,en,Tn){return _r(Xr,Ee,en,Tn)}function Da(Xr){return tt[Xr.getDay()]}function Pa(Xr){return Ie[Xr.getDay()]}function Fa(Xr){return Ft[Xr.getMonth()]}function $a(Xr){return st[Xr.getMonth()]}function oa(Xr){return Ae[+(Xr.getHours()>=12)]}function zi(Xr){return 1+~~(Xr.getMonth()/3)}function Gi(Xr){return tt[Xr.getUTCDay()]}function qt(Xr){return Ie[Xr.getUTCDay()]}function Ct(Xr){return Ft[Xr.getUTCMonth()]}function Ur(Xr){return st[Xr.getUTCMonth()]}function Qr(Xr){return Ae[+(Xr.getUTCHours()>=12)]}function tn(Xr){return 1+~~(Xr.getUTCMonth()/3)}return{format:function(Xr){var en=Za(Xr+="",xa);return en.toString=function(){return Xr},en},parse:function(Xr){var en=ui(Xr+="",!1);return en.toString=function(){return Xr},en},utcFormat:function(Xr){var en=Za(Xr+="",ba);return en.toString=function(){return Xr},en},utcParse:function(Xr){var en=ui(Xr+="",!0);return en.toString=function(){return Xr},en}}}var a={"-":"",_:" ",0:"0"},l=/^\s*\d+/,i=/^%/,s=/[\\^$*+?|[\]().{}]/g;function o($e,ot,De){var Ee=$e<0?"-":"",Ae=(Ee?-$e:$e)+"",Ie=Ae.length;return Ee+(Ie<De?new Array(De-Ie+1).join(ot)+Ae:Ae)}function u($e){return $e.replace(s,"\\$&")}function d($e){return new RegExp("^(?:"+$e.map(u).join("|")+")","i")}function h($e){for(var ot={},De=-1,Ee=$e.length;++De<Ee;)ot[$e[De].toLowerCase()]=De;return ot}function y($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.w=+Ee[0],De+Ee[0].length):-1}function m($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.u=+Ee[0],De+Ee[0].length):-1}function E($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.U=+Ee[0],De+Ee[0].length):-1}function c($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.V=+Ee[0],De+Ee[0].length):-1}function _($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.W=+Ee[0],De+Ee[0].length):-1}function T($e,ot,De){var Ee=l.exec(ot.slice(De,De+4));return Ee?($e.y=+Ee[0],De+Ee[0].length):-1}function M($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.y=+Ee[0]+(+Ee[0]>68?1900:2e3),De+Ee[0].length):-1}function k($e,ot,De){var Ee=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ot.slice(De,De+6));return Ee?($e.Z=Ee[1]?0:-(Ee[2]+(Ee[3]||"00")),De+Ee[0].length):-1}function b($e,ot,De){var Ee=l.exec(ot.slice(De,De+1));return Ee?($e.q=Ee[0]*3-3,De+Ee[0].length):-1}function A($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.m=Ee[0]-1,De+Ee[0].length):-1}function g($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.d=+Ee[0],De+Ee[0].length):-1}function f($e,ot,De){var Ee=l.exec(ot.slice(De,De+3));return Ee?($e.m=0,$e.d=+Ee[0],De+Ee[0].length):-1}function p($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.H=+Ee[0],De+Ee[0].length):-1}function x($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.M=+Ee[0],De+Ee[0].length):-1}function N($e,ot,De){var Ee=l.exec(ot.slice(De,De+2));return Ee?($e.S=+Ee[0],De+Ee[0].length):-1}function D($e,ot,De){var Ee=l.exec(ot.slice(De,De+3));return Ee?($e.L=+Ee[0],De+Ee[0].length):-1}function B($e,ot,De){var Ee=l.exec(ot.slice(De,De+6));return Ee?($e.L=Math.floor(Ee[0]/1e3),De+Ee[0].length):-1}function U($e,ot,De){var Ee=i.exec(ot.slice(De,De+1));return Ee?De+Ee[0].length:-1}function V($e,ot,De){var Ee=l.exec(ot.slice(De));return Ee?($e.Q=+Ee[0],De+Ee[0].length):-1}function q($e,ot,De){var Ee=l.exec(ot.slice(De));return Ee?($e.s=+Ee[0],De+Ee[0].length):-1}function z($e,ot){return o($e.getDate(),ot,2)}function H($e,ot){return o($e.getHours(),ot,2)}function G($e,ot){return o($e.getHours()%12||12,ot,2)}function J($e,ot){return o(1+w.timeDay.count(w.timeYear($e),$e),ot,3)}function le($e,ot){return o($e.getMilliseconds(),ot,3)}function ye($e,ot){return le($e,ot)+"000"}function de($e,ot){return o($e.getMonth()+1,ot,2)}function me($e,ot){return o($e.getMinutes(),ot,2)}function W($e,ot){return o($e.getSeconds(),ot,2)}function ie($e){var ot=$e.getDay();return ot===0?7:ot}function se($e,ot){return o(w.timeSunday.count(w.timeYear($e)-1,$e),ot,2)}function ee($e,ot){var De=$e.getDay();return $e=De>=4||De===0?w.timeThursday($e):w.timeThursday.ceil($e),o(w.timeThursday.count(w.timeYear($e),$e)+(w.timeYear($e).getDay()===4),ot,2)}function pe($e){return $e.getDay()}function oe($e,ot){return o(w.timeMonday.count(w.timeYear($e)-1,$e),ot,2)}function Y($e,ot){return o($e.getFullYear()%100,ot,2)}function ce($e,ot){return o($e.getFullYear()%1e4,ot,4)}function ue($e){var ot=$e.getTimezoneOffset();return(ot>0?"-":(ot*=-1,"+"))+o(ot/60|0,"0",2)+o(ot%60,"0",2)}function _e($e,ot){return o($e.getUTCDate(),ot,2)}function Le($e,ot){return o($e.getUTCHours(),ot,2)}function ze($e,ot){return o($e.getUTCHours()%12||12,ot,2)}function Ge($e,ot){return o(1+w.utcDay.count(w.utcYear($e),$e),ot,3)}function Ve($e,ot){return o($e.getUTCMilliseconds(),ot,3)}function rt($e,ot){return Ve($e,ot)+"000"}function pt($e,ot){return o($e.getUTCMonth()+1,ot,2)}function gt($e,ot){return o($e.getUTCMinutes(),ot,2)}function ht($e,ot){return o($e.getUTCSeconds(),ot,2)}function lt($e){var ot=$e.getUTCDay();return ot===0?7:ot}function Fe($e,ot){return o(w.utcSunday.count(w.utcYear($e)-1,$e),ot,2)}function Pe($e,ot){var De=$e.getUTCDay();return $e=De>=4||De===0?w.utcThursday($e):w.utcThursday.ceil($e),o(w.utcThursday.count(w.utcYear($e),$e)+(w.utcYear($e).getUTCDay()===4),ot,2)}function be($e){return $e.getUTCDay()}function Ye($e,ot){return o(w.utcMonday.count(w.utcYear($e)-1,$e),ot,2)}function mt($e,ot){return o($e.getUTCFullYear()%100,ot,2)}function bt($e,ot){return o($e.getUTCFullYear()%1e4,ot,4)}function ft(){return"+0000"}function Wt(){return"%"}function Zt($e){return+$e}function cr($e){return Math.floor(+$e/1e3)}var pr;Br({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 Br($e){return pr=r($e),v.timeFormat=pr.format,v.timeParse=pr.parse,v.utcFormat=pr.utcFormat,v.utcParse=pr.utcParse,pr}var Fr="%Y-%m-%dT%H:%M:%S.%LZ";function cn($e){return $e.toISOString()}var Nr=Date.prototype.toISOString?cn:v.utcFormat(Fr);function Jr($e){var ot=new Date($e);return isNaN(ot)?null:ot}var Dt=+new Date("2000-01-01T00:00:00.000Z")?Jr:v.utcParse(Fr);v.isoFormat=Nr,v.isoParse=Dt,v.timeFormatDefaultLocale=Br,v.timeFormatLocale=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),ta=Ne({"node_modules/d3-format/dist/d3-format.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=typeof globalThis<"u"?globalThis:v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function C(A,g){if((f=(A=g?A.toExponential(g-1):A.toExponential()).indexOf("e"))<0)return null;var f,p=A.slice(0,f);return[p.length>1?p[0]+p.slice(2):p,+A.slice(f+1)]}function P(A){return A=C(Math.abs(A)),A?A[1]:NaN}function t(A,g){return function(f,p){for(var x=f.length,N=[],D=0,B=A[0],U=0;x>0&&B>0&&(U+B+1>p&&(B=Math.max(1,p-U)),N.push(f.substring(x-=B,x+B)),!((U+=B+1)>p));)B=A[D=(D+1)%A.length];return N.reverse().join(g)}}function r(A){return function(g){return g.replace(/[0-9]/g,function(f){return A[+f]})}}var a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(A){if(!(g=a.exec(A)))throw new Error("invalid format: "+A);var g;return new i({fill:g[1],align:g[2],sign:g[3],symbol:g[4],zero:g[5],width:g[6],comma:g[7],precision:g[8]&&g[8].slice(1),trim:g[9],type:g[10]})}l.prototype=i.prototype;function i(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}i.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 s(A){e:for(var g=A.length,f=1,p=-1,x;f<g;++f)switch(A[f]){case".":p=x=f;break;case"0":p===0&&(p=f),x=f;break;default:if(!+A[f])break e;p>0&&(p=0);break}return p>0?A.slice(0,p)+A.slice(x+1):A}var o;function u(A,g){var f=C(A,g);if(!f)return A+"";var p=f[0],x=f[1],N=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,D=p.length;return N===D?p:N>D?p+new Array(N-D+1).join("0"):N>0?p.slice(0,N)+"."+p.slice(N):"0."+new Array(1-N).join("0")+C(A,Math.max(0,g+N-1))[0]}function d(A,g){var f=C(A,g);if(!f)return A+"";var p=f[0],x=f[1];return x<0?"0."+new Array(-x).join("0")+p:p.length>x+1?p.slice(0,x+1)+"."+p.slice(x+1):p+new Array(x-p.length+2).join("0")}var h={"%":function(A,g){return(A*100).toFixed(g)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:w,e:function(A,g){return A.toExponential(g)},f:function(A,g){return A.toFixed(g)},g:function(A,g){return A.toPrecision(g)},o:function(A){return Math.round(A).toString(8)},p:function(A,g){return d(A*100,g)},r:d,s:u,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function y(A){return A}var m=Array.prototype.map,E=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function c(A){var g=A.grouping===void 0||A.thousands===void 0?y:t(m.call(A.grouping,Number),A.thousands+""),f=A.currency===void 0?"":A.currency[0]+"",p=A.currency===void 0?"":A.currency[1]+"",x=A.decimal===void 0?".":A.decimal+"",N=A.numerals===void 0?y:r(m.call(A.numerals,String)),D=A.percent===void 0?"%":A.percent+"",B=A.minus===void 0?"-":A.minus+"",U=A.nan===void 0?"NaN":A.nan+"";function V(z){z=l(z);var H=z.fill,G=z.align,J=z.sign,le=z.symbol,ye=z.zero,de=z.width,me=z.comma,W=z.precision,ie=z.trim,se=z.type;se==="n"?(me=!0,se="g"):h[se]||(W===void 0&&(W=12),ie=!0,se="g"),(ye||H==="0"&&G==="=")&&(ye=!0,H="0",G="=");var ee=le==="$"?f:le==="#"&&/[boxX]/.test(se)?"0"+se.toLowerCase():"",pe=le==="$"?p:/[%p]/.test(se)?D:"",oe=h[se],Y=/[defgprs%]/.test(se);W=W===void 0?6:/[gprs]/.test(se)?Math.max(1,Math.min(21,W)):Math.max(0,Math.min(20,W));function ce(ue){var _e=ee,Le=pe,ze,Ge,Ve;if(se==="c")Le=oe(ue)+Le,ue="";else{ue=+ue;var rt=ue<0||1/ue<0;if(ue=isNaN(ue)?U:oe(Math.abs(ue),W),ie&&(ue=s(ue)),rt&&+ue==0&&J!=="+"&&(rt=!1),_e=(rt?J==="("?J:B:J==="-"||J==="("?"":J)+_e,Le=(se==="s"?E[8+o/3]:"")+Le+(rt&&J==="("?")":""),Y){for(ze=-1,Ge=ue.length;++ze<Ge;)if(Ve=ue.charCodeAt(ze),48>Ve||Ve>57){Le=(Ve===46?x+ue.slice(ze+1):ue.slice(ze))+Le,ue=ue.slice(0,ze);break}}}me&&!ye&&(ue=g(ue,1/0));var pt=_e.length+ue.length+Le.length,gt=pt<de?new Array(de-pt+1).join(H):"";switch(me&&ye&&(ue=g(gt+ue,gt.length?de-Le.length:1/0),gt=""),G){case"<":ue=_e+ue+Le+gt;break;case"=":ue=_e+gt+ue+Le;break;case"^":ue=gt.slice(0,pt=gt.length>>1)+_e+ue+Le+gt.slice(pt);break;default:ue=gt+_e+ue+Le;break}return N(ue)}return ce.toString=function(){return z+""},ce}function q(z,H){var G=V((z=l(z),z.type="f",z)),J=Math.max(-8,Math.min(8,Math.floor(P(H)/3)))*3,le=Math.pow(10,-J),ye=E[8+J/3];return function(de){return G(le*de)+ye}}return{format:V,formatPrefix:q}}var _;T({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function T(A){return _=c(A),v.format=_.format,v.formatPrefix=_.formatPrefix,_}function M(A){return Math.max(0,-P(Math.abs(A)))}function k(A,g){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(P(g)/3)))*3-P(Math.abs(A)))}function b(A,g){return A=Math.abs(A),g=Math.abs(g)-A,Math.max(0,P(g)-P(A))+1}v.FormatSpecifier=i,v.formatDefaultLocale=T,v.formatLocale=c,v.formatSpecifier=l,v.precisionFixed=M,v.precisionPrefix=k,v.precisionRound=b,Object.defineProperty(v,"__esModule",{value:!0})})}}),qa=Ne({"node_modules/is-string-blank/index.js"(te,Z){Z.exports=function(v){for(var w=v.length,C,P=0;P<w;P++)if(C=v.charCodeAt(P),(C<9||C>13)&&C!==32&&C!==133&&C!==160&&C!==5760&&C!==6158&&(C<8192||C>8205)&&C!==8232&&C!==8233&&C!==8239&&C!==8287&&C!==8288&&C!==12288&&C!==65279)return!1;return!0}}}),la=Ne({"node_modules/fast-isnumeric/index.js"(te,Z){var v=qa();Z.exports=function(w){var C=typeof w;if(C==="string"){var P=w;if(w=+w,w===0&&v(P))return!1}else if(C!=="number")return!1;return w-w<1}}}),ja=Ne({"src/constants/numerical.js"(te,Z){Z.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:"−"}}}),pa=Ne({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=typeof globalThis<"u"?globalThis:v||self,w(v["base64-arraybuffer"]={}))})(te,function(v){for(var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=typeof Uint8Array>"u"?[]:new Uint8Array(256),P=0;P<w.length;P++)C[w.charCodeAt(P)]=P;var t=function(a){var l=new Uint8Array(a),i,s=l.length,o="";for(i=0;i<s;i+=3)o+=w[l[i]>>2],o+=w[(l[i]&3)<<4|l[i+1]>>4],o+=w[(l[i+1]&15)<<2|l[i+2]>>6],o+=w[l[i+2]&63];return s%3===2?o=o.substring(0,o.length-1)+"=":s%3===1&&(o=o.substring(0,o.length-2)+"=="),o},r=function(a){var l=a.length*.75,i=a.length,s,o=0,u,d,h,y;a[a.length-1]==="="&&(l--,a[a.length-2]==="="&&l--);var m=new ArrayBuffer(l),E=new Uint8Array(m);for(s=0;s<i;s+=4)u=C[a.charCodeAt(s)],d=C[a.charCodeAt(s+1)],h=C[a.charCodeAt(s+2)],y=C[a.charCodeAt(s+3)],E[o++]=u<<2|d>>4,E[o++]=(d&15)<<4|h>>2,E[o++]=(h&3)<<6|y&63;return m};v.decode=r,v.encode=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),Ra=Ne({"src/lib/is_plain_object.js"(te,Z){Z.exports=function(w){return window&&window.process&&window.process.versions?Object.prototype.toString.call(w)==="[object Object]":Object.prototype.toString.call(w)==="[object Object]"&&Object.getPrototypeOf(w).hasOwnProperty("hasOwnProperty")}}}),vi=Ne({"src/lib/array.js"(te){var Z=pa().decode,v=Ra(),w=Array.isArray,C=ArrayBuffer,P=DataView;function t(u){return C.isView(u)&&!(u instanceof P)}te.isTypedArray=t;function r(u){return w(u)||t(u)}te.isArrayOrTypedArray=r;function a(u){return!r(u[0])}te.isArray1D=a,te.ensureArray=function(u,d){return w(u)||(u=[]),u.length=d,u};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};l.uint8c=l.u1c,l.uint8=l.u1,l.int8=l.i1,l.uint16=l.u2,l.int16=l.i2,l.uint32=l.u4,l.int32=l.i4,l.float32=l.f4,l.float64=l.f8;function i(u){return u.constructor===ArrayBuffer}te.isArrayBuffer=i,te.decodeTypedArraySpec=function(u){var d=[],h=s(u),y=h.dtype,m=l[y];if(!m)throw new Error('Error in dtype: "'+y+'"');var E=m.BYTES_PER_ELEMENT,c=h.bdata;i(c)||(c=Z(c));var _=h.shape===void 0?[c.byteLength/E]:(""+h.shape).split(",");_.reverse();var T=_.length,M,k,b=+_[0],A=E*b,g=0;if(T===1)d=new m(c);else if(T===2)for(M=+_[1],k=0;k<M;k++)d[k]=new m(c,g,b),g+=A;else if(T===3){M=+_[1];for(var f=+_[2],p=0;p<f;p++)for(d[p]=[],k=0;k<M;k++)d[p][k]=new m(c,g,b),g+=A}else throw new Error("ndim: "+T+'is not supported with the shape:"'+h.shape+'"');return d.bdata=h.bdata,d.dtype=h.dtype,d.shape=_.reverse().join(","),u._inputArray=d,d},te.isTypedArraySpec=function(u){return v(u)&&u.hasOwnProperty("dtype")&&typeof u.dtype=="string"&&u.hasOwnProperty("bdata")&&(typeof u.bdata=="string"||i(u.bdata))&&(u.shape===void 0||u.hasOwnProperty("shape")&&(typeof u.shape=="string"||typeof u.shape=="number"))};function s(u){return{bdata:u.bdata,dtype:u.dtype,shape:u.shape}}te.concat=function(){var u=[],d=!0,h=0,y,m,E,c,_,T,M,k;for(E=0;E<arguments.length;E++)c=arguments[E],T=c.length,T&&(m?u.push(c):(m=c,_=T),w(c)?y=!1:(d=!1,h?y!==c.constructor&&(y=!1):y=c.constructor),h+=T);if(!h)return[];if(!u.length)return m;if(d)return m.concat.apply(m,u);if(y){for(M=new y(h),M.set(m),E=0;E<u.length;E++)c=u[E],M.set(c,_),_+=c.length;return M}for(M=new Array(h),k=0;k<m.length;k++)M[k]=m[k];for(E=0;E<u.length;E++){for(c=u[E],k=0;k<c.length;k++)M[_+k]=c[k];_+=k}return M},te.maxRowLength=function(u){return o(u,Math.max,0)},te.minRowLength=function(u){return o(u,Math.min,1/0)};function o(u,d,h){if(r(u))if(r(u[0])){for(var y=h,m=0;m<u.length;m++)y=d(y,u[m].length);return y}else return u.length;return 0}}}),Pi=Ne({"src/lib/nested_property.js"(te,Z){var v=la(),w=vi().isArrayOrTypedArray;Z.exports=function(u,d){if(v(d))d=String(d);else if(typeof d!="string"||d.substr(d.length-4)==="[-1]")throw"bad property string";var h=d.split("."),y,m,E,c;for(c=0;c<h.length;c++)if(String(h[c]).slice(0,2)==="__")throw"bad property string";for(c=0;c<h.length;){if(y=String(h[c]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/),y){if(y[1])h[c]=y[1];else if(c===0)h.splice(0,1);else throw"bad property string";for(m=y[2].substr(1,y[2].length-2).split("]["),E=0;E<m.length;E++)c++,h.splice(c,0,Number(m[E]))}c++}return typeof u!="object"?s(u,d,h):{set:r(u,h,d),get:C(u,h),astr:d,parts:h,obj:u}};function C(o,u){return function(d){var h=o,y,m,E,c,_;for(c=0;c<u.length-1;c++){if(y=u[c],y===-1){for(m=!0,E=[],_=0;_<h.length;_++)E[_]=C(h[_],u.slice(c+1))(d),E[_]!==E[0]&&(m=!1);return m?E[0]:E}if(typeof y=="number"&&!w(h)||(h=h[y],typeof h!="object"||h===null))return}if(!(typeof h!="object"||h===null)&&(E=h[u[c]],!(!d&&E===null)))return E}}var P=/(^|\.)args\[/;function t(o,u){return o===void 0||o===null&&!u.match(P)}function r(o,u,d){return function(h){var y=o,m="",E=t(h,d),c,_;for(_=0;_<u.length-1;_++){if(c=u[_],typeof c=="number"&&!w(y))throw"array index but container is not an array";if(c===-1){if(E=!l(y,u.slice(_+1),h,d),E)break;return}if(!i(y,c,u[_+1],E))break;if(y=y[c],typeof y!="object"||y===null)throw"container is not an object";m=a(m,c)}if(E){if(_===u.length-1&&(delete y[u[_]],Array.isArray(y)&&+u[_]===y.length-1))for(;y.length&&y[y.length-1]===void 0;)y.pop()}else y[u[_]]=h}}function a(o,u){var d=u;return v(u)?d="["+u+"]":o&&(d="."+u),o+d}function l(o,u,d,h){var y=w(d),m=!0,E=d,c=h.replace("-1",0),_=y?!1:t(d,c),T=u[0],M;for(M=0;M<o.length;M++)c=h.replace("-1",M),y&&(E=d[M%d.length],_=t(E,c)),_&&(m=!1),i(o,M,T,_)&&r(o[M],u,h.replace("-1",M))(E);return m}function i(o,u,d,h){if(o[u]===void 0){if(h)return!1;typeof d=="number"?o[u]=[]:o[u]={}}return!0}function s(o,u,d){return{set:function(){throw"bad container"},get:function(){},astr:u,parts:d,obj:o}}}}),Eo=Ne({"src/lib/keyed_container.js"(te,Z){var v=Pi(),w=/^\w*$/,C=0,P=1,t=2,r=3,a=4;Z.exports=function(i,s,o,u){o=o||"name",u=u||"value";var d,h,y,m={};s&&s.length?(y=v(i,s),h=y.get()):h=i,s=s||"";var E={};if(h)for(d=0;d<h.length;d++)E[h[d][o]]=d;var c=w.test(u),_={set:function(T,M){var k=M===null?a:C;if(!h){if(!y||k===a)return;h=[],y.set(h)}var b=E[T];if(b===void 0){if(k===a)return;k=k|r,b=h.length,E[T]=b}else M!==(c?h[b][u]:v(h[b],u).get())&&(k=k|t);var A=h[b]=h[b]||{};return A[o]=T,c?A[u]=M:v(A,u).set(M),M!==null&&(k=k&~a),m[b]=m[b]|k,_},get:function(T){if(h){var M=E[T];if(M!==void 0)return c?h[M][u]:v(h[M],u).get()}},rename:function(T,M){var k=E[T];return k===void 0||(m[k]=m[k]|P,E[M]=k,delete E[T],h[k][o]=M),_},remove:function(T){var M=E[T];if(M===void 0)return _;var k=h[M];if(Object.keys(k).length>2)return m[M]=m[M]|t,_.set(T,null);if(c){for(d=M;d<h.length;d++)m[d]=m[d]|r;for(d=M;d<h.length;d++)E[h[d][o]]--;h.splice(M,1),delete E[T]}else v(k,u).set(null),m[M]=m[M]|t|a;return _},constructUpdate:function(){for(var T,M,k={},b=Object.keys(m),A=0;A<b.length;A++)M=b[A],T=s+"["+M+"]",h[M]?(m[M]&P&&(k[T+"."+o]=h[M][o]),m[M]&t&&(c?k[T+"."+u]=m[M]&a?null:h[M][u]:k[T+"."+u]=m[M]&a?null:v(h[M],u).get())):k[T]=null;return k}};return _}}}),ma=Ne({"src/lib/relative_attr.js"(te,Z){var v=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,w=/^[^\.\[\]]+$/;Z.exports=function(C,P){for(;P;){var t=C.match(v);if(t)C=t[1];else if(C.match(w))C="";else throw new Error("bad relativeAttr call:"+[C,P]);if(P.charAt(0)==="^")P=P.slice(1);else break}return C&&P.charAt(0)!=="["?C+"."+P:C+P}}}),_a=Ne({"src/lib/to_log_range.js"(te,Z){var v=la();Z.exports=function(C,P){if(C>0)return Math.log(C)/Math.LN10;var t=Math.log(Math.min(P[0],P[1]))/Math.LN10;return v(t)||(t=Math.log(Math.max(P[0],P[1]))/Math.LN10-6),t}}}),Li=Ne({"src/lib/relink_private.js"(te,Z){var v=vi().isArrayOrTypedArray,w=Ra();Z.exports=function C(P,t){for(var r in t){var a=t[r],l=P[r];if(l!==a)if(r.charAt(0)==="_"||typeof a=="function"){if(r in P)continue;P[r]=a}else if(v(a)&&v(l)&&w(a[0])){if(r==="customdata"||r==="ids")continue;for(var i=Math.min(a.length,l.length),s=0;s<i;s++)l[s]!==a[s]&&w(a[s])&&w(l[s])&&C(l[s],a[s])}else w(a)&&w(l)&&(C(l,a),Object.keys(l).length||delete P[r])}}}}),so=Ne({"src/lib/mod.js"(te,Z){function v(C,P){var t=C%P;return t<0?t+P:t}function w(C,P){return Math.abs(C)>P/2?C-Math.round(C/P)*P:C}Z.exports={mod:v,modHalf:w}}}),Ro=Ne({"node_modules/tinycolor2/tinycolor.js"(te,Z){(function(v){var w=/^\s+/,C=/\s+$/,P=0,t=v.round,r=v.min,a=v.max,l=v.random;function i(Y,ce){if(Y=Y||"",ce=ce||{},Y instanceof i)return Y;if(!(this instanceof i))return new i(Y,ce);var ue=s(Y);this._originalInput=Y,this._r=ue.r,this._g=ue.g,this._b=ue.b,this._a=ue.a,this._roundA=t(100*this._a)/100,this._format=ce.format||ue.format,this._gradientType=ce.gradientType,this._r<1&&(this._r=t(this._r)),this._g<1&&(this._g=t(this._g)),this._b<1&&(this._b=t(this._b)),this._ok=ue.ok,this._tc_id=P++}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ce,ue,_e,Le,ze,Ge;return ce=Y.r/255,ue=Y.g/255,_e=Y.b/255,ce<=.03928?Le=ce/12.92:Le=v.pow((ce+.055)/1.055,2.4),ue<=.03928?ze=ue/12.92:ze=v.pow((ue+.055)/1.055,2.4),_e<=.03928?Ge=_e/12.92:Ge=v.pow((_e+.055)/1.055,2.4),.2126*Le+.7152*ze+.0722*Ge},setAlpha:function(Y){return this._a=z(Y),this._roundA=t(100*this._a)/100,this},toHsv:function(){var Y=h(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=h(this._r,this._g,this._b),ce=t(Y.h*360),ue=t(Y.s*100),_e=t(Y.v*100);return this._a==1?"hsv("+ce+", "+ue+"%, "+_e+"%)":"hsva("+ce+", "+ue+"%, "+_e+"%, "+this._roundA+")"},toHsl:function(){var Y=u(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=u(this._r,this._g,this._b),ce=t(Y.h*360),ue=t(Y.s*100),_e=t(Y.l*100);return this._a==1?"hsl("+ce+", "+ue+"%, "+_e+"%)":"hsla("+ce+", "+ue+"%, "+_e+"%, "+this._roundA+")"},toHex:function(Y){return m(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return E(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:t(this._r),g:t(this._g),b:t(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+t(this._r)+", "+t(this._g)+", "+t(this._b)+")":"rgba("+t(this._r)+", "+t(this._g)+", "+t(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:t(H(this._r,255)*100)+"%",g:t(H(this._g,255)*100)+"%",b:t(H(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+t(H(this._r,255)*100)+"%, "+t(H(this._g,255)*100)+"%, "+t(H(this._b,255)*100)+"%)":"rgba("+t(H(this._r,255)*100)+"%, "+t(H(this._g,255)*100)+"%, "+t(H(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:V[m(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ce="#"+c(this._r,this._g,this._b,this._a),ue=ce,_e=this._gradientType?"GradientType = 1, ":"";if(Y){var Le=i(Y);ue="#"+c(Le._r,Le._g,Le._b,Le._a)}return"progid:DXImageTransform.Microsoft.gradient("+_e+"startColorstr="+ce+",endColorstr="+ue+")"},toString:function(Y){var ce=!!Y;Y=Y||this._format;var ue=!1,_e=this._a<1&&this._a>=0,Le=!ce&&_e&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return Le?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ue=this.toRgbString()),Y==="prgb"&&(ue=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ue=this.toHexString()),Y==="hex3"&&(ue=this.toHexString(!0)),Y==="hex4"&&(ue=this.toHex8String(!0)),Y==="hex8"&&(ue=this.toHex8String()),Y==="name"&&(ue=this.toName()),Y==="hsl"&&(ue=this.toHslString()),Y==="hsv"&&(ue=this.toHsvString()),ue||this.toHexString())},clone:function(){return i(this.toString())},_applyModification:function(Y,ce){var ue=Y.apply(null,[this].concat([].slice.call(ce)));return this._r=ue._r,this._g=ue._g,this._b=ue._b,this.setAlpha(ue._a),this},lighten:function(){return this._applyModification(k,arguments)},brighten:function(){return this._applyModification(b,arguments)},darken:function(){return this._applyModification(A,arguments)},desaturate:function(){return this._applyModification(_,arguments)},saturate:function(){return this._applyModification(T,arguments)},greyscale:function(){return this._applyModification(M,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(Y,ce){return Y.apply(null,[this].concat([].slice.call(ce)))},analogous:function(){return this._applyCombination(D,arguments)},complement:function(){return this._applyCombination(f,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(N,arguments)},triad:function(){return this._applyCombination(p,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},i.fromRatio=function(Y,ce){if(typeof Y=="object"){var ue={};for(var _e in Y)Y.hasOwnProperty(_e)&&(_e==="a"?ue[_e]=Y[_e]:ue[_e]=me(Y[_e]));Y=ue}return i(Y,ce)};function s(Y){var ce={r:0,g:0,b:0},ue=1,_e=null,Le=null,ze=null,Ge=!1,Ve=!1;return typeof Y=="string"&&(Y=pe(Y)),typeof Y=="object"&&(ee(Y.r)&&ee(Y.g)&&ee(Y.b)?(ce=o(Y.r,Y.g,Y.b),Ge=!0,Ve=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):ee(Y.h)&&ee(Y.s)&&ee(Y.v)?(_e=me(Y.s),Le=me(Y.v),ce=y(Y.h,_e,Le),Ge=!0,Ve="hsv"):ee(Y.h)&&ee(Y.s)&&ee(Y.l)&&(_e=me(Y.s),ze=me(Y.l),ce=d(Y.h,_e,ze),Ge=!0,Ve="hsl"),Y.hasOwnProperty("a")&&(ue=Y.a)),ue=z(ue),{ok:Ge,format:Y.format||Ve,r:r(255,a(ce.r,0)),g:r(255,a(ce.g,0)),b:r(255,a(ce.b,0)),a:ue}}function o(Y,ce,ue){return{r:H(Y,255)*255,g:H(ce,255)*255,b:H(ue,255)*255}}function u(Y,ce,ue){Y=H(Y,255),ce=H(ce,255),ue=H(ue,255);var _e=a(Y,ce,ue),Le=r(Y,ce,ue),ze,Ge,Ve=(_e+Le)/2;if(_e==Le)ze=Ge=0;else{var rt=_e-Le;switch(Ge=Ve>.5?rt/(2-_e-Le):rt/(_e+Le),_e){case Y:ze=(ce-ue)/rt+(ce<ue?6:0);break;case ce:ze=(ue-Y)/rt+2;break;case ue:ze=(Y-ce)/rt+4;break}ze/=6}return{h:ze,s:Ge,l:Ve}}function d(Y,ce,ue){var _e,Le,ze;Y=H(Y,360),ce=H(ce,100),ue=H(ue,100);function Ge(pt,gt,ht){return ht<0&&(ht+=1),ht>1&&(ht-=1),ht<1/6?pt+(gt-pt)*6*ht:ht<1/2?gt:ht<2/3?pt+(gt-pt)*(2/3-ht)*6:pt}if(ce===0)_e=Le=ze=ue;else{var Ve=ue<.5?ue*(1+ce):ue+ce-ue*ce,rt=2*ue-Ve;_e=Ge(rt,Ve,Y+1/3),Le=Ge(rt,Ve,Y),ze=Ge(rt,Ve,Y-1/3)}return{r:_e*255,g:Le*255,b:ze*255}}function h(Y,ce,ue){Y=H(Y,255),ce=H(ce,255),ue=H(ue,255);var _e=a(Y,ce,ue),Le=r(Y,ce,ue),ze,Ge,Ve=_e,rt=_e-Le;if(Ge=_e===0?0:rt/_e,_e==Le)ze=0;else{switch(_e){case Y:ze=(ce-ue)/rt+(ce<ue?6:0);break;case ce:ze=(ue-Y)/rt+2;break;case ue:ze=(Y-ce)/rt+4;break}ze/=6}return{h:ze,s:Ge,v:Ve}}function y(Y,ce,ue){Y=H(Y,360)*6,ce=H(ce,100),ue=H(ue,100);var _e=v.floor(Y),Le=Y-_e,ze=ue*(1-ce),Ge=ue*(1-Le*ce),Ve=ue*(1-(1-Le)*ce),rt=_e%6,pt=[ue,Ge,ze,ze,Ve,ue][rt],gt=[Ve,ue,ue,Ge,ze,ze][rt],ht=[ze,ze,Ve,ue,ue,Ge][rt];return{r:pt*255,g:gt*255,b:ht*255}}function m(Y,ce,ue,_e){var Le=[de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16))];return _e&&Le[0].charAt(0)==Le[0].charAt(1)&&Le[1].charAt(0)==Le[1].charAt(1)&&Le[2].charAt(0)==Le[2].charAt(1)?Le[0].charAt(0)+Le[1].charAt(0)+Le[2].charAt(0):Le.join("")}function E(Y,ce,ue,_e,Le){var ze=[de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16)),de(W(_e))];return Le&&ze[0].charAt(0)==ze[0].charAt(1)&&ze[1].charAt(0)==ze[1].charAt(1)&&ze[2].charAt(0)==ze[2].charAt(1)&&ze[3].charAt(0)==ze[3].charAt(1)?ze[0].charAt(0)+ze[1].charAt(0)+ze[2].charAt(0)+ze[3].charAt(0):ze.join("")}function c(Y,ce,ue,_e){var Le=[de(W(_e)),de(t(Y).toString(16)),de(t(ce).toString(16)),de(t(ue).toString(16))];return Le.join("")}i.equals=function(Y,ce){return!Y||!ce?!1:i(Y).toRgbString()==i(ce).toRgbString()},i.random=function(){return i.fromRatio({r:l(),g:l(),b:l()})};function _(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.s-=ce/100,ue.s=G(ue.s),i(ue)}function T(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.s+=ce/100,ue.s=G(ue.s),i(ue)}function M(Y){return i(Y).desaturate(100)}function k(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.l+=ce/100,ue.l=G(ue.l),i(ue)}function b(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toRgb();return ue.r=a(0,r(255,ue.r-t(255*-(ce/100)))),ue.g=a(0,r(255,ue.g-t(255*-(ce/100)))),ue.b=a(0,r(255,ue.b-t(255*-(ce/100)))),i(ue)}function A(Y,ce){ce=ce===0?0:ce||10;var ue=i(Y).toHsl();return ue.l-=ce/100,ue.l=G(ue.l),i(ue)}function g(Y,ce){var ue=i(Y).toHsl(),_e=(ue.h+ce)%360;return ue.h=_e<0?360+_e:_e,i(ue)}function f(Y){var ce=i(Y).toHsl();return ce.h=(ce.h+180)%360,i(ce)}function p(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+120)%360,s:ce.s,l:ce.l}),i({h:(ue+240)%360,s:ce.s,l:ce.l})]}function x(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+90)%360,s:ce.s,l:ce.l}),i({h:(ue+180)%360,s:ce.s,l:ce.l}),i({h:(ue+270)%360,s:ce.s,l:ce.l})]}function N(Y){var ce=i(Y).toHsl(),ue=ce.h;return[i(Y),i({h:(ue+72)%360,s:ce.s,l:ce.l}),i({h:(ue+216)%360,s:ce.s,l:ce.l})]}function D(Y,ce,ue){ce=ce||6,ue=ue||30;var _e=i(Y).toHsl(),Le=360/ue,ze=[i(Y)];for(_e.h=(_e.h-(Le*ce>>1)+720)%360;--ce;)_e.h=(_e.h+Le)%360,ze.push(i(_e));return ze}function B(Y,ce){ce=ce||6;for(var ue=i(Y).toHsv(),_e=ue.h,Le=ue.s,ze=ue.v,Ge=[],Ve=1/ce;ce--;)Ge.push(i({h:_e,s:Le,v:ze})),ze=(ze+Ve)%1;return Ge}i.mix=function(Y,ce,ue){ue=ue===0?0:ue||50;var _e=i(Y).toRgb(),Le=i(ce).toRgb(),ze=ue/100,Ge={r:(Le.r-_e.r)*ze+_e.r,g:(Le.g-_e.g)*ze+_e.g,b:(Le.b-_e.b)*ze+_e.b,a:(Le.a-_e.a)*ze+_e.a};return i(Ge)},i.readability=function(Y,ce){var ue=i(Y),_e=i(ce);return(v.max(ue.getLuminance(),_e.getLuminance())+.05)/(v.min(ue.getLuminance(),_e.getLuminance())+.05)},i.isReadable=function(Y,ce,ue){var _e=i.readability(Y,ce),Le,ze;switch(ze=!1,Le=oe(ue),Le.level+Le.size){case"AAsmall":case"AAAlarge":ze=_e>=4.5;break;case"AAlarge":ze=_e>=3;break;case"AAAsmall":ze=_e>=7;break}return ze},i.mostReadable=function(Y,ce,ue){var _e=null,Le=0,ze,Ge,Ve,rt;ue=ue||{},Ge=ue.includeFallbackColors,Ve=ue.level,rt=ue.size;for(var pt=0;pt<ce.length;pt++)ze=i.readability(Y,ce[pt]),ze>Le&&(Le=ze,_e=i(ce[pt]));return i.isReadable(Y,_e,{level:Ve,size:rt})||!Ge?_e:(ue.includeFallbackColors=!1,i.mostReadable(Y,["#fff","#000"],ue))};var U=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},V=i.hexNames=q(U);function q(Y){var ce={};for(var ue in Y)Y.hasOwnProperty(ue)&&(ce[Y[ue]]=ue);return ce}function z(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function H(Y,ce){le(Y)&&(Y="100%");var ue=ye(Y);return Y=r(ce,a(0,parseFloat(Y))),ue&&(Y=parseInt(Y*ce,10)/100),v.abs(Y-ce)<1e-6?1:Y%ce/parseFloat(ce)}function G(Y){return r(1,a(0,Y))}function J(Y){return parseInt(Y,16)}function le(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function ye(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function de(Y){return Y.length==1?"0"+Y:""+Y}function me(Y){return Y<=1&&(Y=Y*100+"%"),Y}function W(Y){return v.round(parseFloat(Y)*255).toString(16)}function ie(Y){return J(Y)/255}var se=(function(){var Y="[-\\+]?\\d+%?",ce="[-\\+]?\\d*\\.\\d+%?",ue="(?:"+ce+")|(?:"+Y+")",_e="[\\s|\\(]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")\\s*\\)?",Le="[\\s|\\(]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")[,|\\s]+("+ue+")\\s*\\)?";return{CSS_UNIT:new RegExp(ue),rgb:new RegExp("rgb"+_e),rgba:new RegExp("rgba"+Le),hsl:new RegExp("hsl"+_e),hsla:new RegExp("hsla"+Le),hsv:new RegExp("hsv"+_e),hsva:new RegExp("hsva"+Le),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}})();function ee(Y){return!!se.CSS_UNIT.exec(Y)}function pe(Y){Y=Y.replace(w,"").replace(C,"").toLowerCase();var ce=!1;if(U[Y])Y=U[Y],ce=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ue;return(ue=se.rgb.exec(Y))?{r:ue[1],g:ue[2],b:ue[3]}:(ue=se.rgba.exec(Y))?{r:ue[1],g:ue[2],b:ue[3],a:ue[4]}:(ue=se.hsl.exec(Y))?{h:ue[1],s:ue[2],l:ue[3]}:(ue=se.hsla.exec(Y))?{h:ue[1],s:ue[2],l:ue[3],a:ue[4]}:(ue=se.hsv.exec(Y))?{h:ue[1],s:ue[2],v:ue[3]}:(ue=se.hsva.exec(Y))?{h:ue[1],s:ue[2],v:ue[3],a:ue[4]}:(ue=se.hex8.exec(Y))?{r:J(ue[1]),g:J(ue[2]),b:J(ue[3]),a:ie(ue[4]),format:ce?"name":"hex8"}:(ue=se.hex6.exec(Y))?{r:J(ue[1]),g:J(ue[2]),b:J(ue[3]),format:ce?"name":"hex"}:(ue=se.hex4.exec(Y))?{r:J(ue[1]+""+ue[1]),g:J(ue[2]+""+ue[2]),b:J(ue[3]+""+ue[3]),a:ie(ue[4]+""+ue[4]),format:ce?"name":"hex8"}:(ue=se.hex3.exec(Y))?{r:J(ue[1]+""+ue[1]),g:J(ue[2]+""+ue[2]),b:J(ue[3]+""+ue[3]),format:ce?"name":"hex"}:!1}function oe(Y){var ce,ue;return Y=Y||{level:"AA",size:"small"},ce=(Y.level||"AA").toUpperCase(),ue=(Y.size||"small").toLowerCase(),ce!=="AA"&&ce!=="AAA"&&(ce="AA"),ue!=="small"&&ue!=="large"&&(ue="small"),{level:ce,size:ue}}typeof Z<"u"&&Z.exports?Z.exports=i:window.tinycolor=i})(Math)}}),co=Ne({"src/lib/extend.js"(te){var Z=Ra(),v=Array.isArray;function w(P,t){var r,a;for(r=0;r<P.length;r++){if(a=P[r],a!==null&&typeof a=="object")return!1;a!==void 0&&(t[r]=a)}return!0}te.extendFlat=function(){return C(arguments,!1,!1,!1)},te.extendDeep=function(){return C(arguments,!0,!1,!1)},te.extendDeepAll=function(){return C(arguments,!0,!0,!1)},te.extendDeepNoArrays=function(){return C(arguments,!0,!1,!0)};function C(P,t,r,a){var l=P[0],i=P.length,s,o,u,d,h,y,m;if(i===2&&v(l)&&v(P[1])&&l.length===0){if(m=w(P[1],l),m)return l;l.splice(0,l.length)}for(var E=1;E<i;E++){s=P[E];for(o in s)u=l[o],d=s[o],a&&v(d)?l[o]=d:t&&d&&(Z(d)||(h=v(d)))?(h?(h=!1,y=u&&v(u)?u:[]):y=u&&Z(u)?u:{},l[o]=C([y,d],t,r,a)):(typeof d<"u"||r)&&(l[o]=d)}return l}}}),$o=Ne({"src/plots/font_attributes.js"(te,Z){Z.exports=function(v){var w=v.variantValues,C=v.editType,P=v.colorEditType;P===void 0&&(P=C);var t={editType:C,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};v.noNumericWeightValues&&(t.valType="enumerated",t.values=t.extras,t.extras=void 0,t.min=void 0,t.max=void 0);var r={family:{valType:"string",noBlank:!0,strict:!0,editType:C},size:{valType:"number",min:1,editType:C},color:{valType:"color",editType:P},weight:t,style:{editType:C,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:v.noFontVariant?void 0:{editType:C,valType:"enumerated",values:w||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:v.noFontTextcase?void 0:{editType:C,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:v.noFontLineposition?void 0:{editType:C,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:v.noFontShadow?void 0:{editType:C,valType:"string",dflt:v.autoShadowDflt?"auto":"none"},editType:C};return v.autoSize&&(r.size.dflt="auto"),v.autoColor&&(r.color.dflt="auto"),v.arrayOk&&(r.family.arrayOk=!0,r.weight.arrayOk=!0,r.style.arrayOk=!0,v.noFontVariant||(r.variant.arrayOk=!0),v.noFontTextcase||(r.textcase.arrayOk=!0),v.noFontLineposition||(r.lineposition.arrayOk=!0),v.noFontShadow||(r.shadow.arrayOk=!0),r.size.arrayOk=!0,r.color.arrayOk=!0),r}}}),$u=Ne({"src/components/fx/constants.js"(te,Z){Z.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),Bo=Ne({"src/components/fx/layout_attributes.js"(te,Z){var v=$u(),w=$o(),C=w({editType:"none"});C.family.dflt=v.HOVERFONT,C.size.dflt=v.HOVERFONTSIZE,Z.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"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",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:C,grouptitlefont:w({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"}}}}),Ml=Ne({"src/components/fx/attributes.js"(te,Z){var v=$o(),w=Bo().hoverlabel,C=co().extendFlat;Z.exports={hoverlabel:{bgcolor:C({},w.bgcolor,{arrayOk:!0}),bordercolor:C({},w.bordercolor,{arrayOk:!0}),font:v({arrayOk:!0,editType:"none"}),align:C({},w.align,{arrayOk:!0}),namelength:C({},w.namelength,{arrayOk:!0}),showarrow:C({},w.showarrow),editType:"none"}}}}),ns=Ne({"src/plots/attributes.js"(te,Z){var v=$o(),w=Ml();Z.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:v({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:w.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},uirevision:{valType:"any",editType:"none"}}}}),Do=Ne({"src/components/colorscale/scales.js"(te,Z){var v=Ro(),w={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)"]]},C=w.RdBu;function P(a,l){if(l||(l=C),!a)return l;function i(){try{a=w[a]||JSON.parse(a)}catch{a=l}}return typeof a=="string"&&(i(),typeof a=="string"&&i()),t(a)?a:l}function t(a){var l=0;if(!Array.isArray(a)||a.length<2||!a[0]||!a[a.length-1]||+a[0][0]!=0||+a[a.length-1][0]!=1)return!1;for(var i=0;i<a.length;i++){var s=a[i];if(s.length!==2||+s[0]<l||!v(s[1]).isValid())return!1;l=+s[0]}return!0}function r(a){return w[a]!==void 0?!0:t(a)}Z.exports={scales:w,defaultScale:C,get:P,isValid:r}}}),lu=Ne({"src/components/color/attributes.js"(te){te.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],te.defaultLine="#444",te.lightLine="#eee",te.background="#fff",te.borderLine="#BEC8D9",te.lightFraction=1e3/11}}),io=Ne({"src/components/color/index.js"(te,Z){var v=Ro(),w=la(),C=vi().isTypedArray,P=Z.exports={},t=lu();P.defaults=t.defaults;var r=P.defaultLine=t.defaultLine;P.lightLine=t.lightLine;var a=P.background=t.background;P.tinyRGB=function(i){var s=i.toRgb();return"rgb("+Math.round(s.r)+", "+Math.round(s.g)+", "+Math.round(s.b)+")"},P.rgb=function(i){return P.tinyRGB(v(i))},P.opacity=function(i){return i?v(i).getAlpha():0},P.addOpacity=function(i,s){var o=v(i).toRgb();return"rgba("+Math.round(o.r)+", "+Math.round(o.g)+", "+Math.round(o.b)+", "+s+")"},P.combine=function(i,s){var o=v(i).toRgb();if(o.a===1)return v(i).toRgbString();var u=v(s||a).toRgb(),d=u.a===1?u:{r:255*(1-u.a)+u.r*u.a,g:255*(1-u.a)+u.g*u.a,b:255*(1-u.a)+u.b*u.a},h={r:d.r*(1-o.a)+o.r*o.a,g:d.g*(1-o.a)+o.g*o.a,b:d.b*(1-o.a)+o.b*o.a};return v(h).toRgbString()},P.interpolate=function(i,s,o){var u=v(i).toRgb(),d=v(s).toRgb(),h={r:o*u.r+(1-o)*d.r,g:o*u.g+(1-o)*d.g,b:o*u.b+(1-o)*d.b};return v(h).toRgbString()},P.contrast=function(i,s,o){var u=v(i);u.getAlpha()!==1&&(u=v(P.combine(i,a)));var d=u.isDark()?s?u.lighten(s):a:o?u.darken(o):r;return d.toString()},P.stroke=function(i,s){var o=v(s);i.style({stroke:P.tinyRGB(o),"stroke-opacity":o.getAlpha()})},P.fill=function(i,s){var o=v(s);i.style({fill:P.tinyRGB(o),"fill-opacity":o.getAlpha()})},P.clean=function(i){if(!(!i||typeof i!="object")){var s=Object.keys(i),o,u,d,h;for(o=0;o<s.length;o++)if(d=s[o],h=i[d],d.substr(d.length-5)==="color")if(Array.isArray(h))for(u=0;u<h.length;u++)h[u]=l(h[u]);else i[d]=l(h);else if(d.substr(d.length-10)==="colorscale"&&Array.isArray(h))for(u=0;u<h.length;u++)Array.isArray(h[u])&&(h[u][1]=l(h[u][1]));else if(Array.isArray(h)){var y=h[0];if(!Array.isArray(y)&&y&&typeof y=="object")for(u=0;u<h.length;u++)P.clean(h[u])}else h&&typeof h=="object"&&!C(h)&&P.clean(h)}};function l(i){if(w(i)||typeof i!="string")return i;var s=i.trim();if(s.substr(0,3)!=="rgb")return i;var o=s.match(/^rgba?\s*\(([^()]*)\)$/);if(!o)return i;var u=o[1].trim().split(/\s*[\s,]\s*/),d=s.charAt(3)==="a"&&u.length===4;if(!d&&u.length!==3)return i;for(var h=0;h<u.length;h++){if(!u[h].length||(u[h]=Number(u[h]),!(u[h]>=0)))return i;if(h===3)u[h]>1&&(u[h]=1);else if(u[h]>=1)return i}var y=Math.round(u[0]*255)+", "+Math.round(u[1]*255)+", "+Math.round(u[2]*255);return d?"rgba("+y+", "+u[3]+")":"rgb("+y+")"}}}),$c=Ne({"src/constants/interactions.js"(te,Z){Z.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}}}),sf=Ne({"src/lib/regex.js"(te){te.counter=function(Z,v,w,C){var P=(v||"")+(w?"":"$"),t=C===!1?"":"^";return Z==="xy"?new RegExp(t+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+P):new RegExp(t+Z+"([2-9]|[1-9][0-9]+)?"+P)}}}),rv=Ne({"src/lib/coerce.js"(te){var Z=la(),v=Ro(),w=co().extendFlat,C=ns(),P=Do(),t=io(),r=$c().DESELECTDIM,a=Pi(),l=sf().counter,i=so().modHalf,s=vi().isArrayOrTypedArray,o=vi().isTypedArraySpec,u=vi().decodeTypedArraySpec;te.valObjectMeta={data_array:{coerceFunction:function(h,y,m){y.set(s(h)?h:o(h)?u(h):m)}},enumerated:{coerceFunction:function(h,y,m,E){E.coerceNumber&&(h=+h),E.values.indexOf(h)===-1?y.set(m):y.set(h)},validateFunction:function(h,y){y.coerceNumber&&(h=+h);for(var m=y.values,E=0;E<m.length;E++){var c=String(m[E]);if(c.charAt(0)==="/"&&c.charAt(c.length-1)==="/"){var _=new RegExp(c.substr(1,c.length-2));if(_.test(h))return!0}else if(h===m[E])return!0}return!1}},boolean:{coerceFunction:function(h,y,m){h===!0||h===!1?y.set(h):y.set(m)}},number:{coerceFunction:function(h,y,m,E){o(h)&&(h=u(h)),!Z(h)||E.min!==void 0&&h<E.min||E.max!==void 0&&h>E.max?y.set(m):y.set(+h)}},integer:{coerceFunction:function(h,y,m,E){if((E.extras||[]).indexOf(h)!==-1){y.set(h);return}o(h)&&(h=u(h)),h%1||!Z(h)||E.min!==void 0&&h<E.min||E.max!==void 0&&h>E.max?y.set(m):y.set(+h)}},string:{coerceFunction:function(h,y,m,E){if(typeof h!="string"){var c=typeof h=="number";E.strict===!0||!c?y.set(m):y.set(String(h))}else E.noBlank&&!h?y.set(m):y.set(h)}},color:{coerceFunction:function(h,y,m){o(h)&&(h=u(h)),v(h).isValid()?y.set(h):y.set(m)}},colorlist:{coerceFunction:function(h,y,m){function E(c){return v(c).isValid()}!Array.isArray(h)||!h.length?y.set(m):h.every(E)?y.set(h):y.set(m)}},colorscale:{coerceFunction:function(h,y,m){y.set(P.get(h,m))}},angle:{coerceFunction:function(h,y,m){o(h)&&(h=u(h)),h==="auto"?y.set("auto"):Z(h)?y.set(i(+h,360)):y.set(m)}},subplotid:{coerceFunction:function(h,y,m,E){var c=E.regex||l(m);if(typeof h=="string"&&c.test(h)){y.set(h);return}y.set(m)},validateFunction:function(h,y){var m=y.dflt;return h===m?!0:typeof h!="string"?!1:!!l(m).test(h)}},flaglist:{coerceFunction:function(h,y,m,E){if((E.extras||[]).indexOf(h)!==-1){y.set(h);return}if(typeof h!="string"){y.set(m);return}for(var c=h.split("+"),_=0;_<c.length;){var T=c[_];E.flags.indexOf(T)===-1||c.indexOf(T)<_?c.splice(_,1):_++}c.length?y.set(c.join("+")):y.set(m)}},any:{coerceFunction:function(h,y,m){h===void 0?y.set(m):y.set(o(h)?u(h):h)}},info_array:{coerceFunction:function(h,y,m,E){function c(U,V,q){var z,H={set:function(G){z=G}};return q===void 0&&(q=V.dflt),te.valObjectMeta[V.valType].coerceFunction(U,H,q,V),z}if(o(h)&&(h=u(h)),!s(h)){y.set(m);return}var _=E.dimensions===2||E.dimensions==="1-2"&&Array.isArray(h)&&s(h[0]),T=E.items,M=[],k=Array.isArray(T),b=k&&_&&s(T[0]),A=_&&k&&!b,g=k&&!A?T.length:h.length,f,p,x,N,D,B;if(m=Array.isArray(m)?m:[],_)for(f=0;f<g;f++)for(M[f]=[],x=s(h[f])?h[f]:[],A?D=T.length:k?D=T[f].length:D=x.length,p=0;p<D;p++)A?N=T[p]:k?N=T[f][p]:N=T,B=c(x[p],N,(m[f]||[])[p]),B!==void 0&&(M[f][p]=B);else for(f=0;f<g;f++)B=c(h[f],k?T[f]:T,m[f]),B!==void 0&&(M[f]=B);y.set(M)},validateFunction:function(h,y){if(!s(h))return!1;var m=y.items,E=Array.isArray(m),c=y.dimensions===2;if(!y.freeLength&&h.length!==m.length)return!1;for(var _=0;_<h.length;_++)if(c){if(!s(h[_])||!y.freeLength&&h[_].length!==m[_].length)return!1;for(var T=0;T<h[_].length;T++)if(!d(h[_][T],E?m[_][T]:m))return!1}else if(!d(h[_],E?m[_]:m))return!1;return!0}}},te.coerce=function(h,y,m,E,c){var _=a(m,E).get(),T=a(h,E),M=a(y,E),k=T.get(),b=y._template;if(k===void 0&&b&&(k=a(b,E).get(),b=0),c===void 0&&(c=_.dflt),_.arrayOk){if(s(k))return M.set(k),k;if(o(k))return k=u(k),M.set(k),k}var A=te.valObjectMeta[_.valType].coerceFunction;A(k,M,c,_);var g=M.get();return b&&g===c&&!d(k,_)&&(k=a(b,E).get(),A(k,M,c,_),g=M.get()),g},te.coerce2=function(h,y,m,E,c){var _=a(h,E),T=te.coerce(h,y,m,E,c),M=_.get();return M!=null?T:!1},te.coerceFont=function(h,y,m,E){E||(E={}),m=w({},m),m=w(m,E.overrideDflt||{});var c={family:h(y+".family",m.family),size:h(y+".size",m.size),color:h(y+".color",m.color),weight:h(y+".weight",m.weight),style:h(y+".style",m.style)};if(E.noFontVariant||(c.variant=h(y+".variant",m.variant)),E.noFontLineposition||(c.lineposition=h(y+".lineposition",m.lineposition)),E.noFontTextcase||(c.textcase=h(y+".textcase",m.textcase)),!E.noFontShadow){var _=m.shadow;_==="none"&&E.autoShadowDflt&&(_="auto"),c.shadow=h(y+".shadow",_)}return c},te.coercePattern=function(h,y,m,E){var c=h(y+".shape"),_;if(c||(_=h(y+".path")),c||_){c&&h(y+".solidity"),h(y+".size");var T=h(y+".fillmode"),M=T==="overlay";if(!E){var k=h(y+".bgcolor",M?m:void 0);h(y+".fgcolor",M?t.contrast(k):m)}h(y+".fgopacity",M?.5:1)}},te.coerceHoverinfo=function(h,y,m){var E=y._module.attributes,c=E.hoverinfo?E:C,_=c.hoverinfo,T;if(m._dataLength===1){var M=_.dflt==="all"?_.flags.slice():_.dflt.split("+");M.splice(M.indexOf("name"),1),T=M.join("+")}return te.coerce(h,y,c,"hoverinfo",T)},te.coerceSelectionMarkerOpacity=function(h,y){if(h.marker){var m=h.marker.opacity;if(m!==void 0){var E,c;!s(m)&&!h.selected&&!h.unselected&&(E=m,c=r*m),y("selected.marker.opacity",E),y("unselected.marker.opacity",c)}}};function d(h,y){var m=te.valObjectMeta[y.valType];if(y.arrayOk&&s(h))return!0;if(m.validateFunction)return m.validateFunction(h,y);var E={},c=E,_={set:function(T){c=T}};return m.coerceFunction(h,_,E,y),c!==E}te.validate=d}}),gd=Ne({"src/plot_api/plot_config.js"(te,Z){var v={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:""},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","mapbox","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},showLink:{valType:"boolean",dflt:!1},linkText:{valType:"string",dflt:"Edit chart",noBlank:!0},sendData:{valType:"boolean",dflt:!0},showSources:{valType:"any",dflt:!1},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!1},showEditInChartStudio:{valType:"boolean",dflt:!1},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/"},mapboxAccessToken:{valType:"string",dflt:null},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:{}}},w={};function C(P,t){for(var r in P){var a=P[r];a.valType?t[r]=a.dflt:(t[r]||(t[r]={}),C(a,t[r]))}}C(v,w),Z.exports={configAttributes:v,dfltConfig:w}}}),Fp=Ne({"src/lib/notifier.js"(te,Z){var v=xn(),w=la(),C=[];Z.exports=function(P,t){if(C.indexOf(P)!==-1)return;C.push(P);var r=1e3;w(t)?r=t:t==="long"&&(r=3e3);var a=v.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var l=a.selectAll(".notifier-note").data(C);function i(s){s.duration(700).style("opacity",0).each("end",function(o){var u=C.indexOf(o);u!==-1&&C.splice(u,1),v.select(this).remove()})}l.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var o=v.select(this);o.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){o.transition().call(i)});for(var u=o.append("p"),d=s.split(/<br\s*\/?>/g),h=0;h<d.length;h++)h&&u.append("br"),u.append("span").text(d[h]);t==="stick"?o.transition().duration(350).style("opacity",1):o.transition().duration(700).style("opacity",1).transition().delay(r).call(i)})}}}),yv=Ne({"src/lib/loggers.js"(te,Z){var v=gd().dfltConfig,w=Fp(),C=Z.exports={};C.log=function(){var P;if(v.logging>1){var t=["LOG:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.trace.apply(console,t)}if(v.notifyOnLogging>1){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"long")}},C.warn=function(){var P;if(v.logging>0){var t=["WARN:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.trace.apply(console,t)}if(v.notifyOnLogging>0){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"stick")}},C.error=function(){var P;if(v.logging>0){var t=["ERROR:"];for(P=0;P<arguments.length;P++)t.push(arguments[P]);console.error.apply(console,t)}if(v.notifyOnLogging>0){var r=[];for(P=0;P<arguments.length;P++)r.push(arguments[P]);w(r.join("<br>"),"stick")}}}}),Id=Ne({"src/lib/noop.js"(te,Z){Z.exports=function(){}}}),Bp=Ne({"src/lib/push_unique.js"(te,Z){Z.exports=function(w,C){if(C instanceof RegExp){for(var P=C.toString(),t=0;t<w.length;t++)if(w[t]instanceof RegExp&&w[t].toString()===P)return w;w.push(C)}else(C||C===0)&&w.indexOf(C)===-1&&w.push(C);return w}}}),jp=Ne({"node_modules/gl-mat4/create.js"(te,Z){Z.exports=v;function v(){var w=new Float32Array(16);return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),nv=Ne({"node_modules/gl-mat4/clone.js"(te,Z){Z.exports=v;function v(w){var C=new Float32Array(16);return C[0]=w[0],C[1]=w[1],C[2]=w[2],C[3]=w[3],C[4]=w[4],C[5]=w[5],C[6]=w[6],C[7]=w[7],C[8]=w[8],C[9]=w[9],C[10]=w[10],C[11]=w[11],C[12]=w[12],C[13]=w[13],C[14]=w[14],C[15]=w[15],C}}}),P1=Ne({"node_modules/gl-mat4/copy.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=C[0],w[1]=C[1],w[2]=C[2],w[3]=C[3],w[4]=C[4],w[5]=C[5],w[6]=C[6],w[7]=C[7],w[8]=C[8],w[9]=C[9],w[10]=C[10],w[11]=C[11],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15],w}}}),zv=Ne({"node_modules/gl-mat4/identity.js"(te,Z){Z.exports=v;function v(w){return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),R0=Ne({"node_modules/gl-mat4/transpose.js"(te,Z){Z.exports=v;function v(w,C){if(w===C){var P=C[1],t=C[2],r=C[3],a=C[6],l=C[7],i=C[11];w[1]=C[4],w[2]=C[8],w[3]=C[12],w[4]=P,w[6]=C[9],w[7]=C[13],w[8]=t,w[9]=a,w[11]=C[14],w[12]=r,w[13]=l,w[14]=i}else w[0]=C[0],w[1]=C[4],w[2]=C[8],w[3]=C[12],w[4]=C[1],w[5]=C[5],w[6]=C[9],w[7]=C[13],w[8]=C[2],w[9]=C[6],w[10]=C[10],w[11]=C[14],w[12]=C[3],w[13]=C[7],w[14]=C[11],w[15]=C[15];return w}}}),L1=Ne({"node_modules/gl-mat4/invert.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=C[4],i=C[5],s=C[6],o=C[7],u=C[8],d=C[9],h=C[10],y=C[11],m=C[12],E=C[13],c=C[14],_=C[15],T=P*i-t*l,M=P*s-r*l,k=P*o-a*l,b=t*s-r*i,A=t*o-a*i,g=r*o-a*s,f=u*E-d*m,p=u*c-h*m,x=u*_-y*m,N=d*c-h*E,D=d*_-y*E,B=h*_-y*c,U=T*B-M*D+k*N+b*x-A*p+g*f;return U?(U=1/U,w[0]=(i*B-s*D+o*N)*U,w[1]=(r*D-t*B-a*N)*U,w[2]=(E*g-c*A+_*b)*U,w[3]=(h*A-d*g-y*b)*U,w[4]=(s*x-l*B-o*p)*U,w[5]=(P*B-r*x+a*p)*U,w[6]=(c*k-m*g-_*M)*U,w[7]=(u*g-h*k+y*M)*U,w[8]=(l*D-i*x+o*f)*U,w[9]=(t*x-P*D-a*f)*U,w[10]=(m*A-E*k+_*T)*U,w[11]=(d*k-u*A-y*T)*U,w[12]=(i*p-l*N-s*f)*U,w[13]=(P*N-t*p+r*f)*U,w[14]=(E*M-m*b-c*T)*U,w[15]=(u*b-d*M+h*T)*U,w):null}}}),WT=Ne({"node_modules/gl-mat4/adjoint.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=C[4],i=C[5],s=C[6],o=C[7],u=C[8],d=C[9],h=C[10],y=C[11],m=C[12],E=C[13],c=C[14],_=C[15];return w[0]=i*(h*_-y*c)-d*(s*_-o*c)+E*(s*y-o*h),w[1]=-(t*(h*_-y*c)-d*(r*_-a*c)+E*(r*y-a*h)),w[2]=t*(s*_-o*c)-i*(r*_-a*c)+E*(r*o-a*s),w[3]=-(t*(s*y-o*h)-i*(r*y-a*h)+d*(r*o-a*s)),w[4]=-(l*(h*_-y*c)-u*(s*_-o*c)+m*(s*y-o*h)),w[5]=P*(h*_-y*c)-u*(r*_-a*c)+m*(r*y-a*h),w[6]=-(P*(s*_-o*c)-l*(r*_-a*c)+m*(r*o-a*s)),w[7]=P*(s*y-o*h)-l*(r*y-a*h)+u*(r*o-a*s),w[8]=l*(d*_-y*E)-u*(i*_-o*E)+m*(i*y-o*d),w[9]=-(P*(d*_-y*E)-u*(t*_-a*E)+m*(t*y-a*d)),w[10]=P*(i*_-o*E)-l*(t*_-a*E)+m*(t*o-a*i),w[11]=-(P*(i*y-o*d)-l*(t*y-a*d)+u*(t*o-a*i)),w[12]=-(l*(d*c-h*E)-u*(i*c-s*E)+m*(i*h-s*d)),w[13]=P*(d*c-h*E)-u*(t*c-r*E)+m*(t*h-r*d),w[14]=-(P*(i*c-s*E)-l*(t*c-r*E)+m*(t*s-r*i)),w[15]=P*(i*h-s*d)-l*(t*h-r*d)+u*(t*s-r*i),w}}}),xg=Ne({"node_modules/gl-mat4/determinant.js"(te,Z){Z.exports=v;function v(w){var C=w[0],P=w[1],t=w[2],r=w[3],a=w[4],l=w[5],i=w[6],s=w[7],o=w[8],u=w[9],d=w[10],h=w[11],y=w[12],m=w[13],E=w[14],c=w[15],_=C*l-P*a,T=C*i-t*a,M=C*s-r*a,k=P*i-t*l,b=P*s-r*l,A=t*s-r*i,g=o*m-u*y,f=o*E-d*y,p=o*c-h*y,x=u*E-d*m,N=u*c-h*m,D=d*c-h*E;return _*D-T*N+M*x+k*p-b*f+A*g}}}),YT=Ne({"node_modules/gl-mat4/multiply.js"(te,Z){Z.exports=v;function v(w,C,P){var t=C[0],r=C[1],a=C[2],l=C[3],i=C[4],s=C[5],o=C[6],u=C[7],d=C[8],h=C[9],y=C[10],m=C[11],E=C[12],c=C[13],_=C[14],T=C[15],M=P[0],k=P[1],b=P[2],A=P[3];return w[0]=M*t+k*i+b*d+A*E,w[1]=M*r+k*s+b*h+A*c,w[2]=M*a+k*o+b*y+A*_,w[3]=M*l+k*u+b*m+A*T,M=P[4],k=P[5],b=P[6],A=P[7],w[4]=M*t+k*i+b*d+A*E,w[5]=M*r+k*s+b*h+A*c,w[6]=M*a+k*o+b*y+A*_,w[7]=M*l+k*u+b*m+A*T,M=P[8],k=P[9],b=P[10],A=P[11],w[8]=M*t+k*i+b*d+A*E,w[9]=M*r+k*s+b*h+A*c,w[10]=M*a+k*o+b*y+A*_,w[11]=M*l+k*u+b*m+A*T,M=P[12],k=P[13],b=P[14],A=P[15],w[12]=M*t+k*i+b*d+A*E,w[13]=M*r+k*s+b*h+A*c,w[14]=M*a+k*o+b*y+A*_,w[15]=M*l+k*u+b*m+A*T,w}}}),Sw=Ne({"node_modules/gl-mat4/translate.js"(te,Z){Z.exports=v;function v(w,C,P){var t=P[0],r=P[1],a=P[2],l,i,s,o,u,d,h,y,m,E,c,_;return C===w?(w[12]=C[0]*t+C[4]*r+C[8]*a+C[12],w[13]=C[1]*t+C[5]*r+C[9]*a+C[13],w[14]=C[2]*t+C[6]*r+C[10]*a+C[14],w[15]=C[3]*t+C[7]*r+C[11]*a+C[15]):(l=C[0],i=C[1],s=C[2],o=C[3],u=C[4],d=C[5],h=C[6],y=C[7],m=C[8],E=C[9],c=C[10],_=C[11],w[0]=l,w[1]=i,w[2]=s,w[3]=o,w[4]=u,w[5]=d,w[6]=h,w[7]=y,w[8]=m,w[9]=E,w[10]=c,w[11]=_,w[12]=l*t+u*r+m*a+C[12],w[13]=i*t+d*r+E*a+C[13],w[14]=s*t+h*r+c*a+C[14],w[15]=o*t+y*r+_*a+C[15]),w}}}),I0=Ne({"node_modules/gl-mat4/scale.js"(te,Z){Z.exports=v;function v(w,C,P){var t=P[0],r=P[1],a=P[2];return w[0]=C[0]*t,w[1]=C[1]*t,w[2]=C[2]*t,w[3]=C[3]*t,w[4]=C[4]*r,w[5]=C[5]*r,w[6]=C[6]*r,w[7]=C[7]*r,w[8]=C[8]*a,w[9]=C[9]*a,w[10]=C[10]*a,w[11]=C[11]*a,w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15],w}}}),_d=Ne({"node_modules/gl-mat4/rotate.js"(te,Z){Z.exports=v;function v(w,C,P,t){var r=t[0],a=t[1],l=t[2],i=Math.sqrt(r*r+a*a+l*l),s,o,u,d,h,y,m,E,c,_,T,M,k,b,A,g,f,p,x,N,D,B,U,V;return Math.abs(i)<1e-6?null:(i=1/i,r*=i,a*=i,l*=i,s=Math.sin(P),o=Math.cos(P),u=1-o,d=C[0],h=C[1],y=C[2],m=C[3],E=C[4],c=C[5],_=C[6],T=C[7],M=C[8],k=C[9],b=C[10],A=C[11],g=r*r*u+o,f=a*r*u+l*s,p=l*r*u-a*s,x=r*a*u-l*s,N=a*a*u+o,D=l*a*u+r*s,B=r*l*u+a*s,U=a*l*u-r*s,V=l*l*u+o,w[0]=d*g+E*f+M*p,w[1]=h*g+c*f+k*p,w[2]=y*g+_*f+b*p,w[3]=m*g+T*f+A*p,w[4]=d*x+E*N+M*D,w[5]=h*x+c*N+k*D,w[6]=y*x+_*N+b*D,w[7]=m*x+T*N+A*D,w[8]=d*B+E*U+M*V,w[9]=h*B+c*U+k*V,w[10]=y*B+_*U+b*V,w[11]=m*B+T*U+A*V,C!==w&&(w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w)}}}),Am=Ne({"node_modules/gl-mat4/rotateX.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[4],l=C[5],i=C[6],s=C[7],o=C[8],u=C[9],d=C[10],h=C[11];return C!==w&&(w[0]=C[0],w[1]=C[1],w[2]=C[2],w[3]=C[3],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[4]=a*r+o*t,w[5]=l*r+u*t,w[6]=i*r+d*t,w[7]=s*r+h*t,w[8]=o*r-a*t,w[9]=u*r-l*t,w[10]=d*r-i*t,w[11]=h*r-s*t,w}}}),xd=Ne({"node_modules/gl-mat4/rotateY.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[0],l=C[1],i=C[2],s=C[3],o=C[8],u=C[9],d=C[10],h=C[11];return C!==w&&(w[4]=C[4],w[5]=C[5],w[6]=C[6],w[7]=C[7],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[0]=a*r-o*t,w[1]=l*r-u*t,w[2]=i*r-d*t,w[3]=s*r-h*t,w[8]=a*t+o*r,w[9]=l*t+u*r,w[10]=i*t+d*r,w[11]=s*t+h*r,w}}}),ZT=Ne({"node_modules/gl-mat4/rotateZ.js"(te,Z){Z.exports=v;function v(w,C,P){var t=Math.sin(P),r=Math.cos(P),a=C[0],l=C[1],i=C[2],s=C[3],o=C[4],u=C[5],d=C[6],h=C[7];return C!==w&&(w[8]=C[8],w[9]=C[9],w[10]=C[10],w[11]=C[11],w[12]=C[12],w[13]=C[13],w[14]=C[14],w[15]=C[15]),w[0]=a*r+o*t,w[1]=l*r+u*t,w[2]=i*r+d*t,w[3]=s*r+h*t,w[4]=o*r-a*t,w[5]=u*r-l*t,w[6]=d*r-i*t,w[7]=h*r-s*t,w}}}),$T=Ne({"node_modules/gl-mat4/fromRotation.js"(te,Z){Z.exports=v;function v(w,C,P){var t,r,a,l=P[0],i=P[1],s=P[2],o=Math.sqrt(l*l+i*i+s*s);return Math.abs(o)<1e-6?null:(o=1/o,l*=o,i*=o,s*=o,t=Math.sin(C),r=Math.cos(C),a=1-r,w[0]=l*l*a+r,w[1]=i*l*a+s*t,w[2]=s*l*a-i*t,w[3]=0,w[4]=l*i*a-s*t,w[5]=i*i*a+r,w[6]=s*i*a+l*t,w[7]=0,w[8]=l*s*a+i*t,w[9]=i*s*a-l*t,w[10]=s*s*a+r,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w)}}}),Ew=Ne({"node_modules/gl-mat4/fromRotationTranslation.js"(te,Z){Z.exports=v;function v(w,C,P){var t=C[0],r=C[1],a=C[2],l=C[3],i=t+t,s=r+r,o=a+a,u=t*i,d=t*s,h=t*o,y=r*s,m=r*o,E=a*o,c=l*i,_=l*s,T=l*o;return w[0]=1-(y+E),w[1]=d+T,w[2]=h-_,w[3]=0,w[4]=d-T,w[5]=1-(u+E),w[6]=m+c,w[7]=0,w[8]=h+_,w[9]=m-c,w[10]=1-(u+y),w[11]=0,w[12]=P[0],w[13]=P[1],w[14]=P[2],w[15]=1,w}}}),bg=Ne({"node_modules/gl-mat4/fromScaling.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=C[0],w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=C[1],w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=C[2],w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),R1=Ne({"node_modules/gl-mat4/fromTranslation.js"(te,Z){Z.exports=v;function v(w,C){return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=C[0],w[13]=C[1],w[14]=C[2],w[15]=1,w}}}),yy=Ne({"node_modules/gl-mat4/fromXRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=1,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=t,w[6]=P,w[7]=0,w[8]=0,w[9]=-P,w[10]=t,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),Nv=Ne({"node_modules/gl-mat4/fromYRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=t,w[1]=0,w[2]=-P,w[3]=0,w[4]=0,w[5]=1,w[6]=0,w[7]=0,w[8]=P,w[9]=0,w[10]=t,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),I1=Ne({"node_modules/gl-mat4/fromZRotation.js"(te,Z){Z.exports=v;function v(w,C){var P=Math.sin(C),t=Math.cos(C);return w[0]=t,w[1]=P,w[2]=0,w[3]=0,w[4]=-P,w[5]=t,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=1,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),nu=Ne({"node_modules/gl-mat4/fromQuat.js"(te,Z){Z.exports=v;function v(w,C){var P=C[0],t=C[1],r=C[2],a=C[3],l=P+P,i=t+t,s=r+r,o=P*l,u=t*l,d=t*i,h=r*l,y=r*i,m=r*s,E=a*l,c=a*i,_=a*s;return w[0]=1-d-m,w[1]=u+_,w[2]=h-c,w[3]=0,w[4]=u-_,w[5]=1-o-m,w[6]=y+E,w[7]=0,w[8]=h+c,w[9]=y-E,w[10]=1-o-d,w[11]=0,w[12]=0,w[13]=0,w[14]=0,w[15]=1,w}}}),lf=Ne({"node_modules/gl-mat4/frustum.js"(te,Z){Z.exports=v;function v(w,C,P,t,r,a,l){var i=1/(P-C),s=1/(r-t),o=1/(a-l);return w[0]=a*2*i,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=a*2*s,w[6]=0,w[7]=0,w[8]=(P+C)*i,w[9]=(r+t)*s,w[10]=(l+a)*o,w[11]=-1,w[12]=0,w[13]=0,w[14]=l*a*2*o,w[15]=0,w}}}),Vf=Ne({"node_modules/gl-mat4/perspective.js"(te,Z){Z.exports=v;function v(w,C,P,t,r){var a=1/Math.tan(C/2),l=1/(t-r);return w[0]=a/P,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=a,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=(r+t)*l,w[11]=-1,w[12]=0,w[13]=0,w[14]=2*r*t*l,w[15]=0,w}}}),ep=Ne({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(te,Z){Z.exports=v;function v(w,C,P,t){var r=Math.tan(C.upDegrees*Math.PI/180),a=Math.tan(C.downDegrees*Math.PI/180),l=Math.tan(C.leftDegrees*Math.PI/180),i=Math.tan(C.rightDegrees*Math.PI/180),s=2/(l+i),o=2/(r+a);return w[0]=s,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=o,w[6]=0,w[7]=0,w[8]=-((l-i)*s*.5),w[9]=(r-a)*o*.5,w[10]=t/(P-t),w[11]=-1,w[12]=0,w[13]=0,w[14]=t*P/(P-t),w[15]=0,w}}}),gv=Ne({"node_modules/gl-mat4/ortho.js"(te,Z){Z.exports=v;function v(w,C,P,t,r,a,l){var i=1/(C-P),s=1/(t-r),o=1/(a-l);return w[0]=-2*i,w[1]=0,w[2]=0,w[3]=0,w[4]=0,w[5]=-2*s,w[6]=0,w[7]=0,w[8]=0,w[9]=0,w[10]=2*o,w[11]=0,w[12]=(C+P)*i,w[13]=(r+t)*s,w[14]=(l+a)*o,w[15]=1,w}}}),t0=Ne({"node_modules/gl-mat4/lookAt.js"(te,Z){var v=zv();Z.exports=w;function w(C,P,t,r){var a,l,i,s,o,u,d,h,y,m,E=P[0],c=P[1],_=P[2],T=r[0],M=r[1],k=r[2],b=t[0],A=t[1],g=t[2];return Math.abs(E-b)<1e-6&&Math.abs(c-A)<1e-6&&Math.abs(_-g)<1e-6?v(C):(d=E-b,h=c-A,y=_-g,m=1/Math.sqrt(d*d+h*h+y*y),d*=m,h*=m,y*=m,a=M*y-k*h,l=k*d-T*y,i=T*h-M*d,m=Math.sqrt(a*a+l*l+i*i),m?(m=1/m,a*=m,l*=m,i*=m):(a=0,l=0,i=0),s=h*i-y*l,o=y*a-d*i,u=d*l-h*a,m=Math.sqrt(s*s+o*o+u*u),m?(m=1/m,s*=m,o*=m,u*=m):(s=0,o=0,u=0),C[0]=a,C[1]=s,C[2]=d,C[3]=0,C[4]=l,C[5]=o,C[6]=h,C[7]=0,C[8]=i,C[9]=u,C[10]=y,C[11]=0,C[12]=-(a*E+l*c+i*_),C[13]=-(s*E+o*c+u*_),C[14]=-(d*E+h*c+y*_),C[15]=1,C)}}}),r0=Ne({"node_modules/gl-mat4/str.js"(te,Z){Z.exports=v;function v(w){return"mat4("+w[0]+", "+w[1]+", "+w[2]+", "+w[3]+", "+w[4]+", "+w[5]+", "+w[6]+", "+w[7]+", "+w[8]+", "+w[9]+", "+w[10]+", "+w[11]+", "+w[12]+", "+w[13]+", "+w[14]+", "+w[15]+")"}}}),tp=Ne({"node_modules/gl-mat4/index.js"(te,Z){Z.exports={create:jp(),clone:nv(),copy:P1(),identity:zv(),transpose:R0(),invert:L1(),adjoint:WT(),determinant:xg(),multiply:YT(),translate:Sw(),scale:I0(),rotate:_d(),rotateX:Am(),rotateY:xd(),rotateZ:ZT(),fromRotation:$T(),fromRotationTranslation:Ew(),fromScaling:bg(),fromTranslation:R1(),fromXRotation:yy(),fromYRotation:Nv(),fromZRotation:I1(),fromQuat:nu(),frustum:lf(),perspective:Vf(),perspectiveFromFieldOfView:ep(),ortho:gv(),lookAt:t0(),str:r0()}}}),Up=Ne({"src/lib/matrix.js"(te){var Z=tp();te.init2dArray=function(v,w){for(var C=new Array(v),P=0;P<v;P++)C[P]=new Array(w);return C},te.transposeRagged=function(v){var w=0,C=v.length,P,t;for(P=0;P<C;P++)w=Math.max(w,v[P].length);var r=new Array(w);for(P=0;P<w;P++)for(r[P]=new Array(C),t=0;t<C;t++)r[P][t]=v[t][P];return r},te.dot=function(v,w){if(!(v.length&&w.length)||v.length!==w.length)return null;var C=v.length,P,t;if(v[0].length)for(P=new Array(C),t=0;t<C;t++)P[t]=te.dot(v[t],w);else if(w[0].length){var r=te.transposeRagged(w);for(P=new Array(r.length),t=0;t<r.length;t++)P[t]=te.dot(v,r[t])}else for(P=0,t=0;t<C;t++)P+=v[t]*w[t];return P},te.translationMatrix=function(v,w){return[[1,0,v],[0,1,w],[0,0,1]]},te.rotationMatrix=function(v){var w=v*Math.PI/180;return[[Math.cos(w),-Math.sin(w),0],[Math.sin(w),Math.cos(w),0],[0,0,1]]},te.rotationXYMatrix=function(v,w,C){return te.dot(te.dot(te.translationMatrix(w,C),te.rotationMatrix(v)),te.translationMatrix(-w,-C))},te.apply3DTransform=function(v){return function(){var w=arguments,C=arguments.length===1?w[0]:[w[0],w[1],w[2]||0];return te.dot(v,[C[0],C[1],C[2],1]).slice(0,3)}},te.apply2DTransform=function(v){return function(){var w=arguments;w.length===3&&(w=w[0]);var C=arguments.length===1?w[0]:[w[0],w[1]];return te.dot(v,[C[0],C[1],1]).slice(0,2)}},te.apply2DTransform2=function(v){var w=te.apply2DTransform(v);return function(C){return w(C.slice(0,2)).concat(w(C.slice(2,4)))}},te.convertCssMatrix=function(v){if(v){var w=v.length;if(w===16)return v;if(w===6)return[v[0],v[1],0,0,v[2],v[3],0,0,0,0,1,0,v[4],v[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},te.inverseTransformMatrix=function(v){var w=[];return Z.invert(w,v),[[w[0],w[1],w[2],w[3]],[w[4],w[5],w[6],w[7]],[w[8],w[9],w[10],w[11]],[w[12],w[13],w[14],w[15]]]}}}),D1=Ne({"src/lib/dom.js"(te,Z){var v=xn(),w=yv(),C=Up(),P=tp();function t(E){var c;if(typeof E=="string"){if(c=document.getElementById(E),c===null)throw new Error("No DOM element with id '"+E+"' exists on the page.");return c}else if(E==null)throw new Error("DOM element provided is null or undefined");return E}function r(E){var c=v.select(E);return c.node()instanceof HTMLElement&&c.size()&&c.classed("js-plotly-plot")}function a(E){var c=E&&E.parentNode;c&&c.removeChild(E)}function l(E,c){i("global",E,c)}function i(E,c,_){var T="plotly.js-style-"+E,M=document.getElementById(T);if(!(M&&M.matches(".no-inline-styles"))){M||(M=document.createElement("style"),M.setAttribute("id",T),M.appendChild(document.createTextNode("")),document.head.appendChild(M));var k=M.sheet;k?k.insertRule?k.insertRule(c+"{"+_+"}",0):k.addRule?k.addRule(c,_,0):w.warn("addStyleRule failed"):w.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function s(E){var c="plotly.js-style-"+E,_=document.getElementById(c);_&&a(_)}function o(E,c,_,T,M,k){var b=T.split(":"),A=M.split(":"),g="data-btn-style-event-added";k||(k=document),k.querySelectorAll(E).forEach(function(f){f.getAttribute(g)||(f.addEventListener("mouseenter",function(){var p=this.querySelector(_);p&&(p.style[b[0]]=b[1])}),f.addEventListener("mouseleave",function(){var p=this.querySelector(_);p&&(c&&this.matches(c)?p.style[b[0]]=b[1]:p.style[A[0]]=A[1])}),f.setAttribute(g,!0))})}function u(E){var c=h(E),_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return c.forEach(function(T){var M=d(T);if(M){var k=C.convertCssMatrix(M);_=P.multiply(_,_,k)}}),_}function d(E){var c=window.getComputedStyle(E,null),_=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("-moz-transform")||c.getPropertyValue("-ms-transform")||c.getPropertyValue("-o-transform")||c.getPropertyValue("transform");return _==="none"?null:_.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(T){return+T})}function h(E){for(var c=[];y(E);)c.push(E),E=E.parentNode,typeof ShadowRoot=="function"&&E instanceof ShadowRoot&&(E=E.host);return c}function y(E){return E&&(E instanceof Element||E instanceof HTMLElement)}function m(E,c){return E&&c&&E.top===c.top&&E.left===c.left&&E.right===c.right&&E.bottom===c.bottom}Z.exports={getGraphDiv:t,isPlotDiv:r,removeElement:a,addStyleRule:l,addRelatedStyleRule:i,deleteRelatedStyleRule:s,setStyleOnHover:o,getFullTransformMatrix:u,getElementTransformMatrix:d,getElementAndAncestors:h,equalDomRects:m}}}),O1=Ne({"src/plots/animation_attributes.js"(te,Z){Z.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"}}}}}),Kc=Ne({"src/plot_api/edit_types.js"(te,Z){var v=co().extendFlat,w=Ra(),C={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},P={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},t=C.flags.slice().concat(["fullReplot"]),r=P.flags.slice().concat("layoutReplot");Z.exports={traces:C,layout:P,traceFlags:function(){return a(t)},layoutFlags:function(){return a(r)},update:function(s,o){var u=o.editType;if(u&&u!=="none")for(var d=u.split("+"),h=0;h<d.length;h++)s[d[h]]=!0},overrideAll:l};function a(s){for(var o={},u=0;u<s.length;u++)o[s[u]]=!1;return o}function l(s,o,u){var d=v({},s);for(var h in d){var y=d[h];w(y)&&(d[h]=i(y,o,u,h))}return u==="from-root"&&(d.editType=o),d}function i(s,o,u,d){if(s.valType){var h=v({},s);if(h.editType=o,Array.isArray(s.items)){h.items=new Array(s.items.length);for(var y=0;y<s.items.length;y++)h.items[y]=i(s.items[y],o)}return h}else return l(s,o,d.charAt(0)==="_"?"nested":"from-root")}}}),Dd=Ne({"src/components/drawing/attributes.js"(te){te.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},te.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"}}}),D0=Ne({"src/constants/docs.js"(te,Z){Z.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"}}}),Il=Ne({"src/plots/template_attributes.js"(te){var{DATE_FORMAT_LINK:Z,FORMAT_LINK:v}=D0(),w=["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 C({supportOther:P}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(P?" 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}".`,v,"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}".`,Z,"for details on the date formatting syntax.",w].join(" ")}te.templateFormatStringDescription=C,te.hovertemplateAttrs=({editType:P="none",arrayOk:t}={},r={})=>gr({valType:"string",dflt:"",editType:P},t!==!1?{arrayOk:!0}:{}),te.texttemplateAttrs=({editType:P="calc",arrayOk:t}={},r={})=>gr({valType:"string",dflt:"",editType:P},t!==!1?{arrayOk:!0}:{}),te.shapeTexttemplateAttrs=({editType:P="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:P}),te.templatefallbackAttrs=({editType:P="none"}={})=>({valType:"any",dflt:"-",editType:P})}}),Fv=Ne({"src/components/shapes/label_texttemplate.js"(te,Z){function v(_,T){return T?T.d2l(_):_}function w(_,T){return T?T.l2d(_):_}function C(_){return _.x0}function P(_){return _.x1}function t(_){return _.y0}function r(_){return _.y1}function a(_){return _.x0shift||0}function l(_){return _.x1shift||0}function i(_){return _.y0shift||0}function s(_){return _.y1shift||0}function o(_,T){return v(_.x1,T)+l(_)-v(_.x0,T)-a(_)}function u(_,T,M){return v(_.y1,M)+s(_)-v(_.y0,M)-i(_)}function d(_,T){return Math.abs(o(_,T))}function h(_,T,M){return Math.abs(u(_,T,M))}function y(_,T,M){return _.type!=="line"?void 0:Math.sqrt(Math.pow(o(_,T),2)+Math.pow(u(_,T,M),2))}function m(_,T){return w((v(_.x1,T)+l(_)+v(_.x0,T)+a(_))/2,T)}function E(_,T,M){return w((v(_.y1,M)+s(_)+v(_.y0,M)+i(_))/2,M)}function c(_,T,M){return _.type!=="line"?void 0:u(_,T,M)/o(_,T)}Z.exports={x0:C,x1:P,y0:t,y1:r,slope:c,dx:o,dy:u,width:d,height:h,length:y,xcenter:m,ycenter:E}}}),z1=Ne({"src/components/shapes/draw_newshape/attributes.js"(te,Z){var v=Kc().overrideAll,w=ns(),C=$o(),P=Dd().dash,t=co().extendFlat,{shapeTexttemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=Fv();Z.exports=v({newshape:{visible:t({},w.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:t({},w.legend,{}),legendgroup:t({},w.legendgroup,{}),legendgrouptitle:{text:t({},w.legendgrouptitle.text,{}),font:C({})},legendrank:t({},w.legendrank,{}),legendwidth:t({},w.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:t({},P,{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:t({},w.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:r({newshape:!0},{keys:Object.keys(l)}),texttemplatefallback:a({editType:"arraydraw"}),font:C({}),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")}}),KT=Ne({"src/components/selections/draw_newselection/attributes.js"(te,Z){var v=Dd().dash,w=co().extendFlat;Z.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:w({},v,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),JT=Ne({"src/plots/pad_attributes.js"(te,Z){Z.exports=function(v){var w=v.editType;return{t:{valType:"number",dflt:0,editType:w},r:{valType:"number",dflt:0,editType:w},b:{valType:"number",dflt:0,editType:w},l:{valType:"number",dflt:0,editType:w},editType:w}}}}),_x=Ne({"src/plots/layout_attributes.js"(te,Z){var v=$o(),w=O1(),C=lu(),P=z1(),t=KT(),r=JT(),a=co().extendFlat,l=v({editType:"calc"});l.family.dflt='"Open Sans", verdana, arial, sans-serif',l.size.dflt=12,l.color.dflt=C.defaultLine,Z.exports={font:l,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:a(r({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:C.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:C.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},hidesources:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:C.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:P.newshape,activeshape:P.activeshape,newselection:t.newselection,activeselection:t.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:a({},w.transition,{editType:"none"})}}}),YE=Ne({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var te=document.createElement("style");te.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",te.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(te)}})()}}),Xo=Ne({"src/registry.js"(te){var Z=yv(),v=Id(),w=Bp(),C=Ra(),P=D1().addStyleRule,t=co(),r=ns(),a=_x(),l=t.extendFlat,i=t.extendDeepAll;te.modules={},te.allCategories={},te.allTypes=[],te.subplotsRegistry={},te.componentsRegistry={},te.layoutArrayContainers=[],te.layoutArrayRegexes=[],te.traceLayoutAttributes={},te.localeRegistry={},te.apiMethodRegistry={},te.collectableSubplotTypes=null,te.register=function(T){if(te.collectableSubplotTypes=null,T)T&&!Array.isArray(T)&&(T=[T]);else throw new Error("No argument passed to Plotly.register.");for(var M=0;M<T.length;M++){var k=T[M];if(!k)throw new Error("Invalid module was attempted to be registered!");switch(k.moduleType){case"trace":s(k);break;case"transform":d(k);break;case"component":u(k);break;case"locale":h(k);break;case"apiMethod":var b=k.name;te.apiMethodRegistry[b]=k.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},te.getModule=function(_){var T=te.modules[c(_)];return T?T._module:!1},te.traceIs=function(_,T){if(_=c(_),_==="various")return!1;var M=te.modules[_];return M||(_&&Z.log("Unrecognized trace type "+_+"."),M=te.modules[r.type.dflt]),!!M.categories[T]},te.getComponentMethod=function(_,T){var M=te.componentsRegistry[_];return M&&M[T]||v},te.call=function(){var _=arguments[0],T=[].slice.call(arguments,1);return te.apiMethodRegistry[_].apply(null,T)};function s(_){var T=_.name,M=_.categories,k=_.meta;if(te.modules[T]){Z.log("Type "+T+" already registered");return}te.subplotsRegistry[_.basePlotModule.name]||o(_.basePlotModule);for(var b={},A=0;A<M.length;A++)b[M[A]]=!0,te.allCategories[M[A]]=!0;te.modules[T]={_module:_,categories:b},k&&Object.keys(k).length&&(te.modules[T].meta=k),te.allTypes.push(T);for(var g in te.componentsRegistry)m(g,T);_.layoutAttributes&&l(te.traceLayoutAttributes,_.layoutAttributes);var f=_.basePlotModule,p=f.name;if(p==="mapbox"){var x=f.constants.styleRules;for(var N in x)P(".js-plotly-plot .plotly .mapboxgl-"+N,x[N])}p==="map"&&YE(),(p==="geo"||p==="mapbox"||p==="map")&&window.PlotlyGeoAssets===void 0&&(window.PlotlyGeoAssets={topojson:{}})}function o(_){var T=_.name;if(te.subplotsRegistry[T]){Z.log("Plot type "+T+" already registered.");return}y(_),te.subplotsRegistry[T]=_;for(var M in te.componentsRegistry)E(M,_.name)}function u(_){if(typeof _.name!="string")throw new Error("Component module *name* must be a string.");var T=_.name;te.componentsRegistry[T]=_,_.layoutAttributes&&(_.layoutAttributes._isLinkedToArray&&w(te.layoutArrayContainers,T),y(_));for(var M in te.modules)m(T,M);for(var k in te.subplotsRegistry)E(T,k);_.schema&&_.schema.layout&&i(a,_.schema.layout)}function d(_){if(typeof _.name!="string")throw new Error("Transform module *name* must be a string.");var T="Transform module "+_.name,M=typeof _.transform=="function",k=typeof _.calcTransform=="function";if(!M&&!k)throw new Error(T+" is missing a *transform* or *calcTransform* method.");M&&k&&Z.log([T+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),C(_.attributes)||Z.log(T+" registered without an *attributes* object."),typeof _.supplyDefaults!="function"&&Z.log(T+" registered without a *supplyDefaults* method.")}function h(_){var T=_.name,M=T.split("-")[0],k=_.dictionary,b=_.format,A=k&&Object.keys(k).length,g=b&&Object.keys(b).length,f=te.localeRegistry,p=f[T];if(p||(f[T]=p={}),M!==T){var x=f[M];x||(f[M]=x={}),A&&x.dictionary===p.dictionary&&(x.dictionary=k),g&&x.format===p.format&&(x.format=b)}A&&(p.dictionary=k),g&&(p.format=b)}function y(_){if(_.layoutAttributes){var T=_.layoutAttributes._arrayAttrRegexps;if(T)for(var M=0;M<T.length;M++)w(te.layoutArrayRegexes,T[M])}}function m(_,T){var M=te.componentsRegistry[_].schema;if(!(!M||!M.traces)){var k=M.traces[T];k&&i(te.modules[T]._module.attributes,k)}}function E(_,T){var M=te.componentsRegistry[_].schema;if(!(!M||!M.subplots)){var k=te.subplotsRegistry[T],b=k.layoutAttributes,A=k.attr==="subplot"?k.name:k.attr;Array.isArray(A)&&(A=A[0]);var g=M.subplots[A];b&&g&&i(b,g)}}function c(_){return typeof _=="object"&&(_=_.type),_}}}),QT=Ne({"src/lib/dates.js"(te){var Z=zn().timeFormat,v=la(),w=yv(),C=so().mod,P=ja(),t=P.BADNUM,r=P.ONEDAY,a=P.ONEHOUR,l=P.ONEMIN,i=P.ONESEC,s=P.EPOCHJD,o=Xo(),u=zn().utcFormat,d=/^\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,h=/^\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,y=new Date().getFullYear()-70;function m(U){return U&&o.componentsRegistry.calendars&&typeof U=="string"&&U!=="gregorian"}te.dateTick0=function(U,V){var q=E(U,!!V);if(V<2)return q;var z=te.dateTime2ms(q,U);return z+=r*(V-1),te.ms2DateTime(z,0,U)};function E(U,V){return m(U)?V?o.getComponentMethod("calendars","CANONICAL_SUNDAY")[U]:o.getComponentMethod("calendars","CANONICAL_TICK")[U]:V?"2000-01-02":"2000-01-01"}te.dfltRange=function(U){return m(U)?o.getComponentMethod("calendars","DFLTRANGE")[U]:["2000-01-01","2001-01-01"]},te.isJSDate=function(U){return typeof U=="object"&&U!==null&&typeof U.getTime=="function"};var c,_;te.dateTime2ms=function(U,V){if(te.isJSDate(U)){var q=U.getTimezoneOffset()*l,z=(U.getUTCMinutes()-U.getMinutes())*l+(U.getUTCSeconds()-U.getSeconds())*i+(U.getUTCMilliseconds()-U.getMilliseconds());if(z){var H=3*l;q=q-H/2+C(z-q+H/2,H)}return U=Number(U)-q,U>=c&&U<=_?U:t}if(typeof U!="string"&&typeof U!="number")return t;U=String(U);var G=m(V),J=U.charAt(0);G&&(J==="G"||J==="g")&&(U=U.substr(1),V="");var le=G&&V.substr(0,7)==="chinese",ye=U.match(le?h:d);if(!ye)return t;var de=ye[1],me=ye[3]||"1",W=Number(ye[5]||1),ie=Number(ye[7]||0),se=Number(ye[9]||0),ee=Number(ye[11]||0);if(G){if(de.length===2)return t;de=Number(de);var pe;try{var oe=o.getComponentMethod("calendars","getCal")(V);if(le){var Y=me.charAt(me.length-1)==="i";me=parseInt(me,10),pe=oe.newDate(de,oe.toMonthIndex(de,me,Y),W)}else pe=oe.newDate(de,Number(me),W)}catch{return t}return pe?(pe.toJD()-s)*r+ie*a+se*l+ee*i:t}de.length===2?de=(Number(de)+2e3-y)%100+y:de=Number(de),me-=1;var ce=new Date(Date.UTC(2e3,me,W,ie,se));return ce.setUTCFullYear(de),ce.getUTCMonth()!==me||ce.getUTCDate()!==W?t:ce.getTime()+ee*i},c=te.MIN_MS=te.dateTime2ms("-9999"),_=te.MAX_MS=te.dateTime2ms("9999-12-31 23:59:59.9999"),te.isDateTime=function(U,V){return te.dateTime2ms(U,V)!==t};function T(U,V){return String(U+Math.pow(10,V)).substr(1)}var M=90*r,k=3*a,b=5*l;te.ms2DateTime=function(U,V,q){if(typeof U!="number"||!(U>=c&&U<=_))return t;V||(V=0);var z=Math.floor(C(U+.05,1)*10),H=Math.round(U-z/10),G,J,le,ye,de,me;if(m(q)){var W=Math.floor(H/r)+s,ie=Math.floor(C(U,r));try{G=o.getComponentMethod("calendars","getCal")(q).fromJD(W).formatDate("yyyy-mm-dd")}catch{G=u("G%Y-%m-%d")(new Date(H))}if(G.charAt(0)==="-")for(;G.length<11;)G="-0"+G.substr(1);else for(;G.length<10;)G="0"+G;J=V<M?Math.floor(ie/a):0,le=V<M?Math.floor(ie%a/l):0,ye=V<k?Math.floor(ie%l/i):0,de=V<b?ie%i*10+z:0}else me=new Date(H),G=u("%Y-%m-%d")(me),J=V<M?me.getUTCHours():0,le=V<M?me.getUTCMinutes():0,ye=V<k?me.getUTCSeconds():0,de=V<b?me.getUTCMilliseconds()*10+z:0;return A(G,J,le,ye,de)},te.ms2DateTimeLocal=function(U){if(!(U>=c+r&&U<=_-r))return t;var V=Math.floor(C(U+.05,1)*10),q=new Date(Math.round(U-V/10)),z=Z("%Y-%m-%d")(q),H=q.getHours(),G=q.getMinutes(),J=q.getSeconds(),le=q.getUTCMilliseconds()*10+V;return A(z,H,G,J,le)};function A(U,V,q,z,H){if((V||q||z||H)&&(U+=" "+T(V,2)+":"+T(q,2),(z||H)&&(U+=":"+T(z,2),H))){for(var G=4;H%10===0;)G-=1,H/=10;U+="."+T(H,G)}return U}te.cleanDate=function(U,V,q){if(U===t)return V;if(te.isJSDate(U)||typeof U=="number"&&isFinite(U)){if(m(q))return w.error("JS Dates and milliseconds are incompatible with world calendars",U),V;if(U=te.ms2DateTimeLocal(+U),!U&&V!==void 0)return V}else if(!te.isDateTime(U,q))return w.error("unrecognized date",U),V;return U};var g=/%\d?f/g,f=/%h/g,p={1:"1",2:"1",3:"2",4:"2"};function x(U,V,q,z){U=U.replace(g,function(G){var J=Math.min(+G.charAt(1)||6,6),le=(V/1e3%1+2).toFixed(J).substr(2).replace(/0+$/,"")||"0";return le});var H=new Date(Math.floor(V+.05));if(U=U.replace(f,function(){return p[q("%q")(H)]}),m(z))try{U=o.getComponentMethod("calendars","worldCalFmt")(U,V,z)}catch{return"Invalid"}return q(U)(H)}var N=[59,59.9,59.99,59.999,59.9999];function D(U,V){var q=C(U+.05,r),z=T(Math.floor(q/a),2)+":"+T(C(Math.floor(q/l),60),2);if(V!=="M"){v(V)||(V=0);var H=Math.min(C(U/i,60),N[V]),G=(100+H).toFixed(V).substr(1);V>0&&(G=G.replace(/0+$/,"").replace(/[\.]$/,"")),z+=":"+G}return z}te.formatDate=function(U,V,q,z,H,G){if(H=m(H)&&H,!V)if(q==="y")V=G.year;else if(q==="m")V=G.month;else if(q==="d")V=G.dayMonth+`
`+G.year;else return D(U,q)+`
`+x(G.dayMonthYear,U,z,H);return x(V,U,z,H)};var B=3*r;te.incrementMonth=function(U,V,q){q=m(q)&&q;var z=C(U,r);if(U=Math.round(U-z),q)try{var H=Math.round(U/r)+s,G=o.getComponentMethod("calendars","getCal")(q),J=G.fromJD(H);return V%12?G.add(J,V,"m"):G.add(J,V/12,"y"),(J.toJD()-s)*r+z}catch{w.error("invalid ms "+U+" in calendar "+q)}var le=new Date(U+B);return le.setUTCMonth(le.getUTCMonth()+V)+z-B},te.findExactDates=function(U,V){for(var q=0,z=0,H=0,G=0,J,le,ye=m(V)&&o.getComponentMethod("calendars","getCal")(V),de=0;de<U.length;de++){if(le=U[de],!v(le)){G++;continue}if(!(le%r))if(ye)try{J=ye.fromJD(le/r+s),J.day()===1?J.month()===1?q++:z++:H++}catch{}else J=new Date(le),J.getUTCDate()===1?J.getUTCMonth()===0?q++:z++:H++}z+=q,H+=z;var me=U.length-G;return{exactYears:q/me,exactMonths:z/me,exactDays:H/me}}}}),O0=Ne({"src/lib/identity.js"(te,Z){Z.exports=function(w){return w}}}),gy=Ne({"src/lib/search.js"(te){var Z=la(),v=yv(),w=O0(),C=ja().BADNUM,P=1e-9;te.findBin=function(i,s,o){if(Z(s.start))return o?Math.ceil((i-s.start)/s.size-P)-1:Math.floor((i-s.start)/s.size+P);var u=0,d=s.length,h=0,y=d>1?(s[d-1]-s[0])/(d-1):1,m,E;for(y>=0?E=o?t:r:E=o?l:a,i+=y*P*(o?-1:1)*(y>=0?1:-1);u<d&&h++<100;)m=Math.floor((u+d)/2),E(s[m],i)?u=m+1:d=m;return h>90&&v.log("Long binary search..."),u-1};function t(i,s){return i<s}function r(i,s){return i<=s}function a(i,s){return i>s}function l(i,s){return i>=s}te.sorterAsc=function(i,s){return i-s},te.sorterDes=function(i,s){return s-i},te.distinctVals=function(i){var s=i.slice();s.sort(te.sorterAsc);var o;for(o=s.length-1;o>-1&&s[o]===C;o--);for(var u=s[o]-s[0]||1,d=u/(o||1)/1e4,h=[],y,m=0;m<=o;m++){var E=s[m],c=E-y;y===void 0?(h.push(E),y=E):c>d&&(u=Math.min(u,c),h.push(E),y=E)}return{vals:h,minDiff:u}},te.roundUp=function(i,s,o){for(var u=0,d=s.length-1,h,y=0,m=o?0:1,E=o?1:0,c=o?Math.ceil:Math.floor;u<d&&y++<100;)h=c((u+d)/2),s[h]<=i?u=h+m:d=h-E;return s[u]},te.sort=function(i,s){for(var o=0,u=0,d=1;d<i.length;d++){var h=s(i[d],i[d-1]);if(h<0?o=1:h>0&&(u=1),o&&u)return i.sort(s)}return u?i:i.reverse()},te.findIndexOfMin=function(i,s){s=s||w;for(var o=1/0,u,d=0;d<i.length;d++){var h=s(i[d]);h<o&&(o=h,u=d)}return u}}}),Sm=Ne({"src/lib/sort_object_keys.js"(te,Z){Z.exports=function(w){return Object.keys(w).sort()}}}),N1=Ne({"src/lib/stats.js"(te){var Z=la(),v=vi().isArrayOrTypedArray;te.aggNums=function(w,C,P,t){var r,a;if((!t||t>P.length)&&(t=P.length),Z(C)||(C=!1),v(P[0])){for(a=new Array(t),r=0;r<t;r++)a[r]=te.aggNums(w,C,P[r]);P=a}for(r=0;r<t;r++)Z(C)?Z(P[r])&&(C=w(+C,+P[r])):C=P[r];return C},te.len=function(w){return te.aggNums(function(C){return C+1},0,w)},te.mean=function(w,C){return C||(C=te.len(w)),te.aggNums(function(P,t){return P+t},0,w)/C},te.geometricMean=function(w,C){return C||(C=te.len(w)),Math.pow(te.aggNums(function(P,t){return P*t},1,w),1/C)},te.midRange=function(w){if(!(w===void 0||w.length===0))return(te.aggNums(Math.max,null,w)+te.aggNums(Math.min,null,w))/2},te.variance=function(w,C,P){return C||(C=te.len(w)),Z(P)||(P=te.mean(w,C)),te.aggNums(function(t,r){return t+Math.pow(r-P,2)},0,w)/C},te.stdev=function(w,C,P){return Math.sqrt(te.variance(w,C,P))},te.median=function(w){var C=w.slice().sort();return te.interp(C,.5)},te.interp=function(w,C){if(!Z(C))throw"n should be a finite number";if(C=C*w.length-.5,C<0)return w[0];if(C>w.length-1)return w[w.length-1];var P=C%1;return P*w[Math.ceil(C)]+(1-P)*w[Math.floor(C)]}}}),av=Ne({"src/lib/angles.js"(te,Z){var v=so(),w=v.mod,C=v.modHalf,P=Math.PI,t=2*P;function r(E){return E/180*P}function a(E){return E/P*180}function l(E){return Math.abs(E[1]-E[0])>t-1e-14}function i(E,c){return C(c-E,t)}function s(E,c){return Math.abs(i(E,c))}function o(E,c){if(l(c))return!0;var _,T;c[0]<c[1]?(_=c[0],T=c[1]):(_=c[1],T=c[0]),_=w(_,t),T=w(T,t),_>T&&(T+=t);var M=w(E,t),k=M+t;return M>=_&&M<=T||k>=_&&k<=T}function u(E,c,_,T){if(!o(c,T))return!1;var M,k;return _[0]<_[1]?(M=_[0],k=_[1]):(M=_[1],k=_[0]),E>=M&&E<=k}function d(E,c,_,T,M,k,b){M=M||0,k=k||0;var A=l([_,T]),g,f,p,x,N;A?(g=0,f=P,p=t):_<T?(g=_,p=T):(g=T,p=_),E<c?(x=E,N=c):(x=c,N=E);function D(q,z){return[q*Math.cos(z)+M,k-q*Math.sin(z)]}var B=Math.abs(p-g)<=P?0:1;function U(q,z,H){return"A"+[q,q]+" "+[0,B,H]+" "+D(q,z)}var V;return A?x===null?V="M"+D(N,g)+U(N,f,0)+U(N,p,0)+"Z":V="M"+D(x,g)+U(x,f,0)+U(x,p,0)+"ZM"+D(N,g)+U(N,f,1)+U(N,p,1)+"Z":x===null?(V="M"+D(N,g)+U(N,p,0),b&&(V+="L0,0Z")):V="M"+D(x,g)+"L"+D(N,g)+U(N,p,0)+"L"+D(x,p)+U(x,g,1)+"Z",V}function h(E,c,_,T,M){return d(null,E,c,_,T,M,0)}function y(E,c,_,T,M){return d(null,E,c,_,T,M,1)}function m(E,c,_,T,M,k){return d(E,c,_,T,M,k,1)}Z.exports={deg2rad:r,rad2deg:a,angleDelta:i,angleDist:s,isFullCircle:l,isAngleInsideSector:o,isPtInsideSector:u,pathArc:h,pathSector:y,pathAnnulus:m}}}),ZE=Ne({"src/lib/anchor_utils.js"(te){te.isLeftAnchor=function(v){return v.xanchor==="left"||v.xanchor==="auto"&&v.x<=1/3},te.isCenterAnchor=function(v){return v.xanchor==="center"||v.xanchor==="auto"&&v.x>1/3&&v.x<2/3},te.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},te.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},te.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},te.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),$E=Ne({"src/lib/geometry2d.js"(te){var Z=so().mod;te.segmentsIntersect=v;function v(r,a,l,i,s,o,u,d){var h=l-r,y=s-r,m=u-s,E=i-a,c=o-a,_=d-o,T=h*_-m*E;if(T===0)return null;var M=(y*_-m*c)/T,k=(y*E-h*c)/T;return k<0||k>1||M<0||M>1?null:{x:r+h*M,y:a+E*M}}te.segmentDistance=function(a,l,i,s,o,u,d,h){if(v(a,l,i,s,o,u,d,h))return 0;var y=i-a,m=s-l,E=d-o,c=h-u,_=y*y+m*m,T=E*E+c*c,M=Math.min(w(y,m,_,o-a,u-l),w(y,m,_,d-a,h-l),w(E,c,T,a-o,l-u),w(E,c,T,i-o,s-u));return Math.sqrt(M)};function w(r,a,l,i,s){var o=i*r+s*a;if(o<0)return i*i+s*s;if(o>l){var u=i-r,d=s-a;return u*u+d*d}else{var h=i*a-s*r;return h*h/l}}var C,P,t;te.getTextLocation=function(a,l,i,s){if((a!==P||s!==t)&&(C={},P=a,t=s),C[i])return C[i];var o=a.getPointAtLength(Z(i-s/2,l)),u=a.getPointAtLength(Z(i+s/2,l)),d=Math.atan((u.y-o.y)/(u.x-o.x)),h=a.getPointAtLength(Z(i,l)),y=(h.x*4+o.x+u.x)/6,m=(h.y*4+o.y+u.y)/6,E={x:y,y:m,theta:d};return C[i]=E,E},te.clearLocationCache=function(){P=null},te.getVisibleSegment=function(a,l,i){var s=l.left,o=l.right,u=l.top,d=l.bottom,h=0,y=a.getTotalLength(),m=y,E,c;function _(M){var k=a.getPointAtLength(M);M===0?E=k:M===y&&(c=k);var b=k.x<s?s-k.x:k.x>o?k.x-o:0,A=k.y<u?u-k.y:k.y>d?k.y-d:0;return Math.sqrt(b*b+A*A)}for(var T=_(h);T;){if(h+=T+i,h>m)return;T=_(h)}for(T=_(m);T;){if(m-=T+i,h>m)return;T=_(m)}return{min:h,max:m,len:m-h,total:y,isClosed:h===0&&m===y&&Math.abs(E.x-c.x)<.1&&Math.abs(E.y-c.y)<.1}},te.findPointOnPath=function(a,l,i,s){s=s||{};for(var o=s.pathLength||a.getTotalLength(),u=s.tolerance||.001,d=s.iterationLimit||30,h=a.getPointAtLength(0)[i]>a.getPointAtLength(o)[i]?-1:1,y=0,m=0,E=o,c,_,T;y<d;){if(c=(m+E)/2,_=a.getPointAtLength(c),T=_[i]-l,Math.abs(T)<u)return _;h*T>0?E=c:m=c,y++}return _}}}),z0=Ne({"src/lib/throttle.js"(te){var Z={};te.throttle=function(C,P,t){var r=Z[C],a=Date.now();if(!r){for(var l in Z)Z[l].ts<a-6e4&&delete Z[l];r=Z[C]={ts:0,timer:null}}v(r);function i(){t(),r.ts=Date.now(),r.onDone&&(r.onDone(),r.onDone=null)}if(a>r.ts+P){i();return}r.timer=setTimeout(function(){i(),r.timer=null},P)},te.done=function(w){var C=Z[w];return!C||!C.timer?Promise.resolve():new Promise(function(P){var t=C.onDone;C.onDone=function(){t&&t(),P(),C.onDone=null}})},te.clear=function(w){if(w)v(Z[w]),delete Z[w];else for(var C in Z)te.clear(C)};function v(w){w&&w.timer!==null&&(clearTimeout(w.timer),w.timer=null)}}}),F1=Ne({"src/lib/clear_responsive.js"(te,Z){Z.exports=function(w){w._responsiveChartHandler&&(window.removeEventListener("resize",w._responsiveChartHandler),delete w._responsiveChartHandler)}}}),yL=Ne({"node_modules/is-mobile/index.js"(te,Z){Z.exports=P,Z.exports.isMobile=P,Z.exports.default=P;var v=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,w=/CrOS/,C=/android|ipad|playbook|silk/i;function P(t){t||(t={});let r=t.ua;if(!r&&typeof navigator<"u"&&(r=navigator.userAgent),r&&r.headers&&typeof r.headers["user-agent"]=="string"&&(r=r.headers["user-agent"]),typeof r!="string")return!1;let a=v.test(r)&&!w.test(r)||!!t.tablet&&C.test(r);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&r.indexOf("Macintosh")!==-1&&r.indexOf("Safari")!==-1&&(a=!0),a}}}),KE=Ne({"src/lib/preserve_drawing_buffer.js"(te,Z){var v=la(),w=yL();Z.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=C(),typeof r!="string")return!0;var a=w({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!a)for(var l=r.split(" "),i=1;i<l.length;i++){var s=l[i];if(s.indexOf("Safari")!==-1)for(var o=i-1;o>-1;o--){var u=l[o];if(u.substr(0,8)==="Version/"){var d=u.substr(8).split(".")[0];if(v(d)&&(d=+d),d>=13)return!0}}}return a};function C(){var P;return typeof navigator<"u"&&(P=navigator.userAgent),P&&P.headers&&typeof P.headers["user-agent"]=="string"&&(P=P.headers["user-agent"]),P}}}),JE=Ne({"src/lib/make_trace_groups.js"(te,Z){var v=xn();Z.exports=function(C,P,t){var r=C.selectAll("g."+t.replace(/\s/g,".")).data(P,function(l){return l[0].trace.uid});r.exit().remove(),r.enter().append("g").attr("class",t),r.order();var a=C.classed("rangeplot")?"nodeRangePlot3":"node3";return r.each(function(l){l[0][a]=v.select(this)}),r}}}),gL=Ne({"src/lib/localize.js"(te,Z){var v=Xo();Z.exports=function(C,P){for(var t=C._context.locale,r=0;r<2;r++){for(var a=C._context.locales,l=0;l<2;l++){var i=(a[t]||{}).dictionary;if(i){var s=i[P];if(s)return s}a=v.localeRegistry}var o=t.split("-")[0];if(o===t)break;t=o}return P}}}),xx=Ne({"src/lib/filter_unique.js"(te,Z){Z.exports=function(w){for(var C={},P=[],t=0,r=0;r<w.length;r++){var a=w[r];C[a]!==1&&(C[a]=1,P[t++]=a)}return P}}}),Mw=Ne({"src/lib/filter_visible.js"(te,Z){Z.exports=function(t){for(var r=C(t)?w:v,a=[],l=0;l<t.length;l++){var i=t[l];r(i)&&a.push(i)}return a};function v(P){return P.visible===!0}function w(P){var t=P[0].trace;return t.visible===!0&&t._length!==0}function C(P){return Array.isArray(P)&&Array.isArray(P[0])&&P[0][0]&&P[0][0].trace}}}),N0=Ne({"src/lib/increment.js"(te,Z){Z.exports=function(w,C){if(!C)return w;var P=1/Math.abs(C),t=P>1?(P*w+P*C)/P:w+C,r=String(t).length;if(r>16){var a=String(C).length,l=String(w).length;if(r>=l+a){var i=parseFloat(t).toPrecision(12);i.indexOf("e+")===-1&&(t=+i)}}return t}}}),nm=Ne({"src/lib/clean_number.js"(te,Z){var v=la(),w=ja().BADNUM,C=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;Z.exports=function(t){return typeof t=="string"&&(t=t.replace(C,"")),v(t)?Number(t):w}}}),In=Ne({"src/lib/index.js"(te,Z){var v=xn(),w=zn().utcFormat,C=ta().format,P=la(),t=ja(),r=t.FP_SAFE,a=-r,l=t.BADNUM,i=Z.exports={};i.adjustFormat=function(Y){return!Y||/^\d[.]\df/.test(Y)||/[.]\d%/.test(Y)?Y:Y==="0.f"?"~f":/^\d%/.test(Y)?"~%":/^\ds/.test(Y)?"~s":!/^[~,.0$]/.test(Y)&&/[&fps]/.test(Y)?"~"+Y:Y};var s={};i.warnBadFormat=function(oe){var Y=String(oe);s[Y]||(s[Y]=1,i.warn('encountered bad format: "'+Y+'"'))},i.noFormat=function(oe){return String(oe)},i.numberFormat=function(oe){var Y;try{Y=C(i.adjustFormat(oe))}catch{return i.warnBadFormat(oe),i.noFormat}return Y},i.nestedProperty=Pi(),i.keyedContainer=Eo(),i.relativeAttr=ma(),i.isPlainObject=Ra(),i.toLogRange=_a(),i.relinkPrivateKeys=Li();var o=vi();i.isArrayBuffer=o.isArrayBuffer,i.isTypedArray=o.isTypedArray,i.isArrayOrTypedArray=o.isArrayOrTypedArray,i.isArray1D=o.isArray1D,i.ensureArray=o.ensureArray,i.concat=o.concat,i.maxRowLength=o.maxRowLength,i.minRowLength=o.minRowLength;var u=so();i.mod=u.mod,i.modHalf=u.modHalf;var d=rv();i.valObjectMeta=d.valObjectMeta,i.coerce=d.coerce,i.coerce2=d.coerce2,i.coerceFont=d.coerceFont,i.coercePattern=d.coercePattern,i.coerceHoverinfo=d.coerceHoverinfo,i.coerceSelectionMarkerOpacity=d.coerceSelectionMarkerOpacity,i.validate=d.validate;var h=QT();i.dateTime2ms=h.dateTime2ms,i.isDateTime=h.isDateTime,i.ms2DateTime=h.ms2DateTime,i.ms2DateTimeLocal=h.ms2DateTimeLocal,i.cleanDate=h.cleanDate,i.isJSDate=h.isJSDate,i.formatDate=h.formatDate,i.incrementMonth=h.incrementMonth,i.dateTick0=h.dateTick0,i.dfltRange=h.dfltRange,i.findExactDates=h.findExactDates,i.MIN_MS=h.MIN_MS,i.MAX_MS=h.MAX_MS;var y=gy();i.findBin=y.findBin,i.sorterAsc=y.sorterAsc,i.sorterDes=y.sorterDes,i.distinctVals=y.distinctVals,i.roundUp=y.roundUp,i.sort=y.sort,i.findIndexOfMin=y.findIndexOfMin,i.sortObjectKeys=Sm();var m=N1();i.aggNums=m.aggNums,i.len=m.len,i.mean=m.mean,i.geometricMean=m.geometricMean,i.median=m.median,i.midRange=m.midRange,i.variance=m.variance,i.stdev=m.stdev,i.interp=m.interp;var E=Up();i.init2dArray=E.init2dArray,i.transposeRagged=E.transposeRagged,i.dot=E.dot,i.translationMatrix=E.translationMatrix,i.rotationMatrix=E.rotationMatrix,i.rotationXYMatrix=E.rotationXYMatrix,i.apply3DTransform=E.apply3DTransform,i.apply2DTransform=E.apply2DTransform,i.apply2DTransform2=E.apply2DTransform2,i.convertCssMatrix=E.convertCssMatrix,i.inverseTransformMatrix=E.inverseTransformMatrix;var c=av();i.deg2rad=c.deg2rad,i.rad2deg=c.rad2deg,i.angleDelta=c.angleDelta,i.angleDist=c.angleDist,i.isFullCircle=c.isFullCircle,i.isAngleInsideSector=c.isAngleInsideSector,i.isPtInsideSector=c.isPtInsideSector,i.pathArc=c.pathArc,i.pathSector=c.pathSector,i.pathAnnulus=c.pathAnnulus;var _=ZE();i.isLeftAnchor=_.isLeftAnchor,i.isCenterAnchor=_.isCenterAnchor,i.isRightAnchor=_.isRightAnchor,i.isTopAnchor=_.isTopAnchor,i.isMiddleAnchor=_.isMiddleAnchor,i.isBottomAnchor=_.isBottomAnchor;var T=$E();i.segmentsIntersect=T.segmentsIntersect,i.segmentDistance=T.segmentDistance,i.getTextLocation=T.getTextLocation,i.clearLocationCache=T.clearLocationCache,i.getVisibleSegment=T.getVisibleSegment,i.findPointOnPath=T.findPointOnPath;var M=co();i.extendFlat=M.extendFlat,i.extendDeep=M.extendDeep,i.extendDeepAll=M.extendDeepAll,i.extendDeepNoArrays=M.extendDeepNoArrays;var k=yv();i.log=k.log,i.warn=k.warn,i.error=k.error;var b=sf();i.counterRegex=b.counter;var A=z0();i.throttle=A.throttle,i.throttleDone=A.done,i.clearThrottle=A.clear;var g=D1();i.getGraphDiv=g.getGraphDiv,i.isPlotDiv=g.isPlotDiv,i.removeElement=g.removeElement,i.addStyleRule=g.addStyleRule,i.addRelatedStyleRule=g.addRelatedStyleRule,i.deleteRelatedStyleRule=g.deleteRelatedStyleRule,i.setStyleOnHover=g.setStyleOnHover,i.getFullTransformMatrix=g.getFullTransformMatrix,i.getElementTransformMatrix=g.getElementTransformMatrix,i.getElementAndAncestors=g.getElementAndAncestors,i.equalDomRects=g.equalDomRects,i.clearResponsive=F1(),i.preserveDrawingBuffer=KE(),i.makeTraceGroups=JE(),i._=gL(),i.notifier=Fp(),i.filterUnique=xx(),i.filterVisible=Mw(),i.pushUnique=Bp(),i.increment=N0(),i.cleanNumber=nm(),i.ensureNumber=function(Y){return P(Y)?(Y=Number(Y),Y>r||Y<a?l:Y):l},i.isIndex=function(oe,Y){return Y!==void 0&&oe>=Y?!1:P(oe)&&oe>=0&&oe%1===0},i.noop=Id(),i.identity=O0(),i.repeat=function(oe,Y){for(var ce=new Array(Y),ue=0;ue<Y;ue++)ce[ue]=oe;return ce},i.swapAttrs=function(oe,Y,ce,ue){ce||(ce="x"),ue||(ue="y");for(var _e=0;_e<Y.length;_e++){var Le=Y[_e],ze=i.nestedProperty(oe,Le.replace("?",ce)),Ge=i.nestedProperty(oe,Le.replace("?",ue)),Ve=ze.get();ze.set(Ge.get()),Ge.set(Ve)}},i.raiseToTop=function(Y){Y.parentNode.appendChild(Y)},i.cancelTransition=function(oe){return oe.transition().duration(0)},i.constrain=function(oe,Y,ce){return Y>ce?Math.max(ce,Math.min(Y,oe)):Math.max(Y,Math.min(ce,oe))},i.bBoxIntersect=function(oe,Y,ce){return ce=ce||0,oe.left<=Y.right+ce&&Y.left<=oe.right+ce&&oe.top<=Y.bottom+ce&&Y.top<=oe.bottom+ce},i.simpleMap=function(oe,Y,ce,ue,_e){for(var Le=oe.length,ze=new Array(Le),Ge=0;Ge<Le;Ge++)ze[Ge]=Y(oe[Ge],ce,ue,_e);return ze},i.randstr=function oe(Y,ce,ue,_e){if(ue||(ue=16),ce===void 0&&(ce=24),ce<=0)return"0";var Le=Math.log(Math.pow(2,ce))/Math.log(ue),ze="",Ge,Ve,rt;for(Ge=2;Le===1/0;Ge*=2)Le=Math.log(Math.pow(2,ce/Ge))/Math.log(ue)*Ge;var pt=Le-Math.floor(Le);for(Ge=0;Ge<Math.floor(Le);Ge++)rt=Math.floor(Math.random()*ue).toString(ue),ze=rt+ze;pt&&(Ve=Math.pow(ue,pt),rt=Math.floor(Math.random()*Ve).toString(ue),ze=rt+ze);var gt=parseInt(ze,ue);return Y&&Y[ze]||gt!==1/0&&gt>=Math.pow(2,ce)?_e>10?(i.warn("randstr failed uniqueness"),ze):oe(Y,ce,ue,(_e||0)+1):ze},i.OptionControl=function(oe,Y){oe||(oe={}),Y||(Y="opt");var ce={};return ce.optionList=[],ce._newoption=function(ue){ue[Y]=oe,ce[ue.name]=ue,ce.optionList.push(ue)},ce["_"+Y]=oe,ce},i.smooth=function(oe,Y){if(Y=Math.round(Y)||0,Y<2)return oe;var ce=oe.length,ue=2*ce,_e=2*Y-1,Le=new Array(_e),ze=new Array(ce),Ge,Ve,rt,pt;for(Ge=0;Ge<_e;Ge++)Le[Ge]=(1-Math.cos(Math.PI*(Ge+1)/Y))/(2*Y);for(Ge=0;Ge<ce;Ge++){for(pt=0,Ve=0;Ve<_e;Ve++)rt=Ge+Ve+1-Y,rt<-ce?rt-=ue*Math.round(rt/ue):rt>=ue&&(rt-=ue*Math.floor(rt/ue)),rt<0?rt=-1-rt:rt>=ce&&(rt=ue-1-rt),pt+=oe[rt]*Le[Ve];ze[Ge]=pt}return ze},i.syncOrAsync=function(oe,Y,ce){var ue,_e;function Le(){return i.syncOrAsync(oe,Y,ce)}for(;oe.length;)if(_e=oe.splice(0,1)[0],ue=_e(Y),ue&&ue.then)return ue.then(Le);return ce&&ce(Y)},i.stripTrailingSlash=function(oe){return oe.substr(-1)==="/"?oe.substr(0,oe.length-1):oe},i.noneOrAll=function(oe,Y,ce){if(oe){var ue=!1,_e=!0,Le,ze;for(Le=0;Le<ce.length;Le++)ze=oe[ce[Le]],ze!=null?ue=!0:_e=!1;if(ue&&!_e)for(Le=0;Le<ce.length;Le++)oe[ce[Le]]=Y[ce[Le]]}},i.mergeArray=function(oe,Y,ce,ue){var _e=typeof ue=="function";if(i.isArrayOrTypedArray(oe))for(var Le=Math.min(oe.length,Y.length),ze=0;ze<Le;ze++){var Ge=oe[ze];Y[ze][ce]=_e?ue(Ge):Ge}},i.mergeArrayCastPositive=function(oe,Y,ce){return i.mergeArray(oe,Y,ce,function(ue){var _e=+ue;return isFinite(_e)&&_e>0?_e:0})},i.fillArray=function(oe,Y,ce,ue){if(ue=ue||i.identity,i.isArrayOrTypedArray(oe))for(var _e=0;_e<Y.length;_e++)Y[_e][ce]=ue(oe[_e])},i.castOption=function(oe,Y,ce,ue){ue=ue||i.identity;var _e=i.nestedProperty(oe,ce).get();return i.isArrayOrTypedArray(_e)?Array.isArray(Y)&&i.isArrayOrTypedArray(_e[Y[0]])?ue(_e[Y[0]][Y[1]]):ue(_e[Y]):_e},i.extractOption=function(oe,Y,ce,ue){if(ce in oe)return oe[ce];var _e=i.nestedProperty(Y,ue).get();if(!Array.isArray(_e))return _e};function f(oe){var Y={};for(var ce in oe)for(var ue=oe[ce],_e=0;_e<ue.length;_e++)Y[ue[_e]]=+ce;return Y}i.tagSelected=function(oe,Y,ce){var ue=Y.selectedpoints,_e=Y._indexToPoints,Le;_e&&(Le=f(_e));function ze(gt){return gt!==void 0&&gt<oe.length}for(var Ge=0;Ge<ue.length;Ge++){var Ve=ue[Ge];if(i.isIndex(Ve)||i.isArrayOrTypedArray(Ve)&&i.isIndex(Ve[0])&&i.isIndex(Ve[1])){var rt=Le?Le[Ve]:Ve,pt=ce?ce[rt]:rt;ze(pt)&&(oe[pt].selected=1)}}},i.selIndices2selPoints=function(oe){var Y=oe.selectedpoints,ce=oe._indexToPoints;if(ce){for(var ue=f(ce),_e=[],Le=0;Le<Y.length;Le++){var ze=Y[Le];if(i.isIndex(ze)){var Ge=ue[ze];i.isIndex(Ge)&&_e.push(Ge)}}return _e}else return Y},i.getTargetArray=function(oe,Y){var ce=Y.target;if(typeof ce=="string"&&ce){var ue=i.nestedProperty(oe,ce).get();return i.isArrayOrTypedArray(ue)?ue:!1}else if(i.isArrayOrTypedArray(ce))return ce;return!1};function p(oe,Y,ce){var ue={};typeof Y!="object"&&(Y={});var _e=ce==="pieLike"?-1:3,Le=Object.keys(oe),ze,Ge,Ve;for(ze=0;ze<Le.length;ze++)Ge=Le[ze],Ve=oe[Ge],!(Ge.charAt(0)==="_"||typeof Ve=="function")&&(Ge==="module"?ue[Ge]=Ve:Array.isArray(Ve)?Ge==="colorscale"||_e===-1?ue[Ge]=Ve.slice():ue[Ge]=Ve.slice(0,_e):i.isTypedArray(Ve)?_e===-1?ue[Ge]=Ve.subarray():ue[Ge]=Ve.subarray(0,_e):Ve&&typeof Ve=="object"?ue[Ge]=p(oe[Ge],Y[Ge],ce):ue[Ge]=Ve);for(Le=Object.keys(Y),ze=0;ze<Le.length;ze++)Ge=Le[ze],Ve=Y[Ge],(typeof Ve!="object"||!(Ge in ue)||typeof ue[Ge]!="object")&&(ue[Ge]=Ve);return ue}i.minExtend=p,i.titleCase=function(oe){return oe.charAt(0).toUpperCase()+oe.substr(1)},i.containsAny=function(oe,Y){for(var ce=0;ce<Y.length;ce++)if(oe.indexOf(Y[ce])!==-1)return!0;return!1};var x=/Version\/[\d\.]+.*Safari/;i.isSafari=function(){return x.test(window.navigator.userAgent)};var N=/iPad|iPhone|iPod/;i.isIOS=function(){return N.test(window.navigator.userAgent)};var D=/Macintosh.+AppleWebKit.+Gecko\)$/;i.isMacWKWebView=()=>D.test(window.navigator.userAgent);var B=/Firefox\/(\d+)\.\d+/;i.getFirefoxVersion=function(){var oe=B.exec(window.navigator.userAgent);if(oe&&oe.length===2){var Y=parseInt(oe[1]);if(!isNaN(Y))return Y}return null},i.isD3Selection=function(oe){return oe instanceof v.selection},i.ensureSingle=function(oe,Y,ce,ue){var _e=oe.select(Y+(ce?"."+ce:""));if(_e.size())return _e;var Le=oe.append(Y);return ce&&Le.classed(ce,!0),ue&&Le.call(ue),Le},i.ensureSingleById=function(oe,Y,ce,ue){var _e=oe.select(Y+"#"+ce);if(_e.size())return _e;var Le=oe.append(Y).attr("id",ce);return ue&&Le.call(ue),Le},i.objectFromPath=function(oe,Y){for(var ce=oe.split("."),ue,_e=ue={},Le=0;Le<ce.length;Le++){var ze=ce[Le],Ge=null,Ve=ce[Le].match(/(.*)\[([0-9]+)\]/);Ve?(ze=Ve[1],Ge=Ve[2],ue=ue[ze]=[],Le===ce.length-1?ue[Ge]=Y:ue[Ge]={},ue=ue[Ge]):(Le===ce.length-1?ue[ze]=Y:ue[ze]={},ue=ue[ze])}return _e};var U=/^([^\[\.]+)\.(.+)?/,V=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function q(oe){return oe.slice(0,2)==="__"}i.expandObjectPaths=function(oe){var Y,ce,ue,_e,Le,ze,Ge;if(typeof oe=="object"&&!Array.isArray(oe)){for(ce in oe)if(oe.hasOwnProperty(ce))if(Y=ce.match(U)){if(_e=oe[ce],ue=Y[1],q(ue))continue;delete oe[ce],oe[ue]=i.extendDeepNoArrays(oe[ue]||{},i.objectFromPath(ce,i.expandObjectPaths(_e))[ue])}else if(Y=ce.match(V)){if(_e=oe[ce],ue=Y[1],q(ue))continue;if(Le=parseInt(Y[2]),delete oe[ce],oe[ue]=oe[ue]||[],Y[3]===".")Ge=Y[4],ze=oe[ue][Le]=oe[ue][Le]||{},i.extendDeepNoArrays(ze,i.objectFromPath(Ge,i.expandObjectPaths(_e)));else{if(q(ue))continue;oe[ue][Le]=i.expandObjectPaths(_e)}}else{if(q(ce))continue;oe[ce]=i.expandObjectPaths(oe[ce])}}return oe},i.numSeparate=function(oe,Y,ce){if(ce||(ce=!1),typeof Y!="string"||Y.length===0)throw new Error("Separator string required for formatting!");typeof oe=="number"&&(oe=String(oe));var ue=/(\d+)(\d{3})/,_e=Y.charAt(0),Le=Y.charAt(1),ze=oe.split("."),Ge=ze[0],Ve=ze.length>1?_e+ze[1]:"";if(Le&&(ze.length>1||Ge.length>4||ce))for(;ue.test(Ge);)Ge=Ge.replace(ue,"$1"+Le+"$2");return Ge+Ve},i.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;i.templateString=function(oe,Y){var ce={};return oe.replace(i.TEMPLATE_STRING_REGEX,function(ue,_e){var Le;return z.test(_e)?Le=Y[_e]:(ce[_e]=ce[_e]||i.nestedProperty(Y,_e).get,Le=ce[_e](!0)),Le!==void 0?Le:""})};var H={max:10,count:0,name:"hovertemplate"};i.hovertemplateString=oe=>me(sr(gr({},oe),{opts:H}));var G={max:10,count:0,name:"texttemplate"};i.texttemplateString=oe=>me(sr(gr({},oe),{opts:G}));var J=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function le(oe){var Y=oe.match(J);return Y?{key:Y[1],op:Y[2],number:Number(Y[3])}:{key:oe,op:null,number:null}}var ye={max:10,count:0,name:"texttemplate",parseMultDiv:!0};i.texttemplateStringForShapes=oe=>me(sr(gr({},oe),{opts:ye}));var de=/^[:|\|]/;function me({data:oe=[],locale:Y,fallback:ce,labels:ue={},opts:_e,template:Le}){return Le.replace(i.TEMPLATE_STRING_REGEX,(ze,Ge,Ve)=>{const rt=["xother","yother"].includes(Ge),pt=["_xother","_yother"].includes(Ge),gt=["_xother_","_yother_"].includes(Ge),ht=["xother_","yother_"].includes(Ge),lt=rt||pt||ht||gt;(pt||gt)&&(Ge=Ge.substring(1)),(ht||gt)&&(Ge=Ge.substring(0,Ge.length-1));let Fe=null,Pe=null;if(_e.parseMultDiv){var be=le(Ge);Ge=be.key,Fe=be.op,Pe=be.number}let Ye;if(lt){if(ue[Ge]===void 0)return"";Ye=ue[Ge]}else for(const Wt of oe)if(Wt){if(Wt.hasOwnProperty(Ge)){Ye=Wt[Ge];break}if(z.test(Ge)||(Ye=i.nestedProperty(Wt,Ge).get(!0)),Ye!==void 0)break}if(Ye===void 0){const{count:Wt,max:Zt,name:cr}=_e,pr=ce===!1?ze:ce;return Wt<Zt&&i.warn([`Variable '${Ge}' in ${cr} could not be found!`,"Please verify that the template is correct.",`Using value: '${pr}'.`].join(" ")),Wt===Zt&&i.warn(`Too many '${cr}' warnings - additional warnings will be suppressed.`),_e.count++,pr}if(Fe==="*"&&(Ye*=Pe),Fe==="/"&&(Ye/=Pe),Ve){var mt;if(Ve[0]===":"&&(mt=Y?Y.numberFormat:i.numberFormat,Ye!==""&&(Ye=mt(Ve.replace(de,""))(Ye))),Ve[0]==="|"){mt=Y?Y.timeFormat:w;var bt=i.dateTime2ms(Ye);Ye=i.formatDate(bt,Ve.replace(de,""),!1,mt)}}else{var ft=Ge+"Label";ue.hasOwnProperty(ft)&&(Ye=ue[ft])}return lt&&(Ye="("+Ye+")",(pt||gt)&&(Ye=" "+Ye),(ht||gt)&&(Ye=Ye+" ")),Ye})}var W=48,ie=57;i.subplotSort=function(oe,Y){for(var ce=Math.min(oe.length,Y.length)+1,ue=0,_e=0,Le=0;Le<ce;Le++){var ze=oe.charCodeAt(Le)||0,Ge=Y.charCodeAt(Le)||0,Ve=ze>=W&&ze<=ie,rt=Ge>=W&&Ge<=ie;if(Ve&&(ue=10*ue+ze-W),rt&&(_e=10*_e+Ge-W),!Ve||!rt){if(ue!==_e)return ue-_e;if(ze!==Ge)return ze-Ge}}return _e-ue};var se=2e9;i.seedPseudoRandom=function(){se=2e9},i.pseudoRandom=function(){var oe=se;return se=(69069*se+1)%4294967296,Math.abs(se-oe)<429496729?i.pseudoRandom():se/4294967296},i.fillText=function(oe,Y,ce){var ue=Array.isArray(ce)?function(ze){ce.push(ze)}:function(ze){ce.text=ze},_e=i.extractOption(oe,Y,"htx","hovertext");if(i.isValidTextValue(_e))return ue(_e);var Le=i.extractOption(oe,Y,"tx","text");if(i.isValidTextValue(Le))return ue(Le)},i.isValidTextValue=function(oe){return oe||oe===0},i.formatPercent=function(oe,Y){Y=Y||0;for(var ce=(Math.round(100*oe*Math.pow(10,Y))*Math.pow(.1,Y)).toFixed(Y)+"%",ue=0;ue<Y;ue++)ce.indexOf(".")!==-1&&(ce=ce.replace("0%","%"),ce=ce.replace(".%","%"));return ce},i.isHidden=function(oe){var Y=window.getComputedStyle(oe).display;return!Y||Y==="none"},i.strTranslate=function(oe,Y){return oe||Y?"translate("+oe+","+Y+")":""},i.strRotate=function(oe){return oe?"rotate("+oe+")":""},i.strScale=function(oe){return oe!==1?"scale("+oe+")":""},i.getTextTransform=function(oe){var Y=oe.noCenter,ce=oe.textX,ue=oe.textY,_e=oe.targetX,Le=oe.targetY,ze=oe.anchorX||0,Ge=oe.anchorY||0,Ve=oe.rotate,rt=oe.scale;return rt?rt>1&&(rt=1):rt=0,i.strTranslate(_e-rt*(ce+ze),Le-rt*(ue+Ge))+i.strScale(rt)+(Ve?"rotate("+Ve+(Y?"":" "+ce+" "+ue)+")":"")},i.setTransormAndDisplay=function(oe,Y){oe.attr("transform",i.getTextTransform(Y)),oe.style("display",Y.scale?null:"none")},i.ensureUniformFontSize=function(oe,Y){var ce=i.extendFlat({},Y);return ce.size=Math.max(Y.size,oe._fullLayout.uniformtext.minsize||0),ce},i.join2=function(oe,Y,ce){var ue=oe.length;return ue>1?oe.slice(0,-1).join(Y)+ce+oe[ue-1]:oe.join(Y)},i.bigFont=function(oe){return Math.round(1.2*oe)};var ee=i.getFirefoxVersion(),pe=ee!==null&&ee<86;i.getPositionFromD3Event=function(){return pe?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),_L=Ne({"build/plotcss.js"(){var te=In(),Z={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(w in Z)v=w.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),te.addStyleRule(v,Z[w]);var v,w}}),Cw=Ne({"node_modules/is-browser/client.js"(te,Z){Z.exports=!0}}),eA=Ne({"node_modules/has-hover/index.js"(te,Z){var v=Cw(),w;typeof window.matchMedia=="function"?w=!window.matchMedia("(hover: none)").matches:w=v,Z.exports=w}}),F0=Ne({"node_modules/events/events.js"(te,Z){var v=typeof Reflect=="object"?Reflect:null,w=v&&typeof v.apply=="function"?v.apply:function(k,b,A){return Function.prototype.apply.call(k,b,A)},C;v&&typeof v.ownKeys=="function"?C=v.ownKeys:Object.getOwnPropertySymbols?C=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:C=function(k){return Object.getOwnPropertyNames(k)};function P(M){console&&console.warn&&console.warn(M)}var t=Number.isNaN||function(k){return k!==k};function r(){r.init.call(this)}Z.exports=r,Z.exports.once=c,r.EventEmitter=r,r.prototype._events=void 0,r.prototype._eventsCount=0,r.prototype._maxListeners=void 0;var a=10;function l(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(r,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(M){if(typeof M!="number"||M<0||t(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");a=M}}),r.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},r.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||t(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function i(M){return M._maxListeners===void 0?r.defaultMaxListeners:M._maxListeners}r.prototype.getMaxListeners=function(){return i(this)},r.prototype.emit=function(k){for(var b=[],A=1;A<arguments.length;A++)b.push(arguments[A]);var g=k==="error",f=this._events;if(f!==void 0)g=g&&f.error===void 0;else if(!g)return!1;if(g){var p;if(b.length>0&&(p=b[0]),p instanceof Error)throw p;var x=new Error("Unhandled error."+(p?" ("+p.message+")":""));throw x.context=p,x}var N=f[k];if(N===void 0)return!1;if(typeof N=="function")w(N,this,b);else for(var D=N.length,B=y(N,D),A=0;A<D;++A)w(B[A],this,b);return!0};function s(M,k,b,A){var g,f,p;if(l(b),f=M._events,f===void 0?(f=M._events=Object.create(null),M._eventsCount=0):(f.newListener!==void 0&&(M.emit("newListener",k,b.listener?b.listener:b),f=M._events),p=f[k]),p===void 0)p=f[k]=b,++M._eventsCount;else if(typeof p=="function"?p=f[k]=A?[b,p]:[p,b]:A?p.unshift(b):p.push(b),g=i(M),g>0&&p.length>g&&!p.warned){p.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+p.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=k,x.count=p.length,P(x)}return M}r.prototype.addListener=function(k,b){return s(this,k,b,!1)},r.prototype.on=r.prototype.addListener,r.prototype.prependListener=function(k,b){return s(this,k,b,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(M,k,b){var A={fired:!1,wrapFn:void 0,target:M,type:k,listener:b},g=o.bind(A);return g.listener=b,A.wrapFn=g,g}r.prototype.once=function(k,b){return l(b),this.on(k,u(this,k,b)),this},r.prototype.prependOnceListener=function(k,b){return l(b),this.prependListener(k,u(this,k,b)),this},r.prototype.removeListener=function(k,b){var A,g,f,p,x;if(l(b),g=this._events,g===void 0)return this;if(A=g[k],A===void 0)return this;if(A===b||A.listener===b)--this._eventsCount===0?this._events=Object.create(null):(delete g[k],g.removeListener&&this.emit("removeListener",k,A.listener||b));else if(typeof A!="function"){for(f=-1,p=A.length-1;p>=0;p--)if(A[p]===b||A[p].listener===b){x=A[p].listener,f=p;break}if(f<0)return this;f===0?A.shift():m(A,f),A.length===1&&(g[k]=A[0]),g.removeListener!==void 0&&this.emit("removeListener",k,x||b)}return this},r.prototype.off=r.prototype.removeListener,r.prototype.removeAllListeners=function(k){var b,A,g;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[k]),this;if(arguments.length===0){var f=Object.keys(A),p;for(g=0;g<f.length;++g)p=f[g],p!=="removeListener"&&this.removeAllListeners(p);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(b=A[k],typeof b=="function")this.removeListener(k,b);else if(b!==void 0)for(g=b.length-1;g>=0;g--)this.removeListener(k,b[g]);return this};function d(M,k,b){var A=M._events;if(A===void 0)return[];var g=A[k];return g===void 0?[]:typeof g=="function"?b?[g.listener||g]:[g]:b?E(g):y(g,g.length)}r.prototype.listeners=function(k){return d(this,k,!0)},r.prototype.rawListeners=function(k){return d(this,k,!1)},r.listenerCount=function(M,k){return typeof M.listenerCount=="function"?M.listenerCount(k):h.call(M,k)},r.prototype.listenerCount=h;function h(M){var k=this._events;if(k!==void 0){var b=k[M];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}r.prototype.eventNames=function(){return this._eventsCount>0?C(this._events):[]};function y(M,k){for(var b=new Array(k),A=0;A<k;++A)b[A]=M[A];return b}function m(M,k){for(;k+1<M.length;k++)M[k]=M[k+1];M.pop()}function E(M){for(var k=new Array(M.length),b=0;b<k.length;++b)k[b]=M[b].listener||M[b];return k}function c(M,k){return new Promise(function(b,A){function g(p){M.removeListener(k,f),A(p)}function f(){typeof M.removeListener=="function"&&M.removeListener("error",g),b([].slice.call(arguments))}T(M,k,f,{once:!0}),k!=="error"&&_(M,g,{once:!0})})}function _(M,k,b){typeof M.on=="function"&&T(M,"error",k,b)}function T(M,k,b,A){if(typeof M.on=="function")A.once?M.once(k,b):M.on(k,b);else if(typeof M.addEventListener=="function")M.addEventListener(k,function g(f){A.once&&M.removeEventListener(k,g),b(f)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof M)}}}),bx=Ne({"src/lib/events.js"(te,Z){var v=F0().EventEmitter,w={init:function(C){if(C._ev instanceof v)return C;var P=new v,t=new v;return C._ev=P,C._internalEv=t,C.on=P.on.bind(P),C.once=P.once.bind(P),C.removeListener=P.removeListener.bind(P),C.removeAllListeners=P.removeAllListeners.bind(P),C._internalOn=t.on.bind(t),C._internalOnce=t.once.bind(t),C._removeInternalListener=t.removeListener.bind(t),C._removeAllInternalListeners=t.removeAllListeners.bind(t),C.emit=function(r,a){P.emit(r,a),t.emit(r,a)},typeof C.addEventListener=="function"&&C.addEventListener("wheel",()=>{},{passive:!0}),C},triggerHandler:function(C,P,t){var r,a=C._ev;if(!a)return;var l=a._events[P];if(!l)return;function i(o){if(o.listener){if(a.removeListener(P,o.listener),!o.fired)return o.fired=!0,o.listener.apply(a,[t])}else return o.apply(a,[t])}l=Array.isArray(l)?l:[l];var s;for(s=0;s<l.length-1;s++)i(l[s]);return r=i(l[s]),r},purge:function(C){return delete C._ev,delete C.on,delete C.once,delete C.removeListener,delete C.removeAllListeners,delete C.emit,delete C._ev,delete C._internalEv,delete C._internalOn,delete C._internalOnce,delete C._removeInternalListener,delete C._removeAllInternalListeners,C}};Z.exports=w}}),am=Ne({"src/lib/queue.js"(te,Z){var v=In(),w=gd().dfltConfig;function C(t,r){for(var a=[],l,i=0;i<r.length;i++)l=r[i],l===t?a[i]=l:typeof l=="object"?a[i]=Array.isArray(l)?v.extendDeep([],l):v.extendDeepAll({},l):a[i]=l;return a}var P={};P.add=function(t,r,a,l,i){var s,o;if(t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},o=t.undoQueue.index,t.autoplay){t.undoQueue.inSequence||(t.autoplay=!1);return}!t.undoQueue.sequence||t.undoQueue.beginSequence?(s={undo:{calls:[],args:[]},redo:{calls:[],args:[]}},t.undoQueue.queue.splice(o,t.undoQueue.queue.length-o,s),t.undoQueue.index+=1):s=t.undoQueue.queue[o-1],t.undoQueue.beginSequence=!1,s&&(s.undo.calls.unshift(r),s.undo.args.unshift(a),s.redo.calls.push(l),s.redo.args.push(i)),t.undoQueue.queue.length>w.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--)},P.startSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},P.stopSequence=function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},P.undo=function(r){var a,l;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index<=0)){for(r.undoQueue.index--,a=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,l=0;l<a.undo.calls.length;l++)P.plotDo(r,a.undo.calls[l],a.undo.args[l]);r.undoQueue.inSequence=!1,r.autoplay=!1}},P.redo=function(r){var a,l;if(!(r.undoQueue===void 0||isNaN(r.undoQueue.index)||r.undoQueue.index>=r.undoQueue.queue.length)){for(a=r.undoQueue.queue[r.undoQueue.index],r.undoQueue.inSequence=!0,l=0;l<a.redo.calls.length;l++)P.plotDo(r,a.redo.calls[l],a.redo.args[l]);r.undoQueue.inSequence=!1,r.autoplay=!1,r.undoQueue.index++}},P.plotDo=function(t,r,a){t.autoplay=!0,a=C(t,a),r.apply(null,a)},Z.exports=P}}),kw=Ne({"src/plots/frame_attributes.js"(te,Z){Z.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}}}),B1=Ne({"src/plot_api/plot_schema.js"(te){var Z=Xo(),v=In(),w=ns(),C=_x(),P=kw(),t=O1(),r=gd().configAttributes,a=Kc(),l=v.extendDeepAll,i=v.isPlainObject,s=v.isArrayOrTypedArray,o=v.nestedProperty,u=v.valObjectMeta,d="_isSubplotObj",h="_isLinkedToArray",y="_arrayAttrRegexps",m="_deprecated",E=[d,h,y,m];te.IS_SUBPLOT_OBJ=d,te.IS_LINKED_TO_ARRAY=h,te.DEPRECATED=m,te.UNDERSCORE_ATTRS=E,te.get=function(){var D={};return Z.allTypes.forEach(function(B){D[B]=M(B)}),{defs:{valObjects:u,metaKeys:E.concat(["description","role","editType","impliedEdits"]),editType:{traces:a.traces,layout:a.layout},impliedEdits:{}},traces:D,layout:k(),frames:b(),animation:A(t),config:A(r)}},te.crawl=function(D,B,U,V){var q=U||0;V=V||"",Object.keys(D).forEach(function(z){var H=D[z];if(E.indexOf(z)===-1){var G=(V?V+".":"")+z;B(H,z,D,q,G),!te.isValObject(H)&&i(H)&&z!=="impliedEdits"&&te.crawl(H,B,q+1,G)}})},te.isValObject=function(D){return D&&D.valType!==void 0},te.findArrayAttributes=function(D){var B=[],U=[],V=[],q,z;function H(J,le,ye,de){U=U.slice(0,de).concat([le]),V=V.slice(0,de).concat([J&&J._isLinkedToArray]);var me=J&&(J.valType==="data_array"||J.arrayOk===!0)&&!(U[de-1]==="colorbar"&&(le==="ticktext"||le==="tickvals"));me&&G(q,0,"")}function G(J,le,ye){var de=J[U[le]],me=ye+U[le];if(le===U.length-1)s(de)&&B.push(z+me);else if(V[le]){if(Array.isArray(de))for(var W=0;W<de.length;W++)i(de[W])&&G(de[W],le+1,me+"["+W+"].")}else i(de)&&G(de,le+1,me+".")}return q=D,z="",te.crawl(w,H),D._module&&D._module.attributes&&te.crawl(D._module.attributes,H),B},te.getTraceValObject=function(D,B){var U=B[0],V=1,q,z,H=D._module;if(H||(H=(Z.modules[D.type||w.type.dflt]||{})._module),!H)return!1;if(q=H.attributes,z=q&&q[U],!z){var G=H.basePlotModule;G&&G.attributes&&(z=G.attributes[U])}return z||(z=w[U]),_(z,B,V)},te.getLayoutValObject=function(D,B){var U=c(D,B[0]);return _(U,B,1)};function c(D,B){var U,V,q,z,H=D._basePlotModules;if(H){var G;for(U=0;U<H.length;U++){if(q=H[U],q.attrRegex&&q.attrRegex.test(B)){if(q.layoutAttrOverrides)return q.layoutAttrOverrides;!G&&q.layoutAttributes&&(G=q.layoutAttributes)}var J=q.baseLayoutAttrOverrides;if(J&&B in J)return J[B]}if(G)return G}var le=D._modules;if(le){for(U=0;U<le.length;U++)if(z=le[U].layoutAttributes,z&&B in z)return z[B]}for(V in Z.componentsRegistry){if(q=Z.componentsRegistry[V],q.name==="colorscale"&&B.indexOf("coloraxis")===0)return q.layoutAttributes[B];if(!q.schema&&B===q.name)return q.layoutAttributes}return B in C?C[B]:!1}function _(D,B,U){if(!D)return!1;if(D._isLinkedToArray){if(T(B[U]))U++;else if(U<B.length)return!1}for(;U<B.length;U++){var V=D[B[U]];if(i(V))D=V;else break;if(U===B.length-1)break;if(D._isLinkedToArray){if(U++,!T(B[U]))return!1}else if(D.valType==="info_array"){U++;var q=B[U];if(!T(q))return!1;var z=D.items;if(Array.isArray(z)){if(q>=z.length)return!1;if(D.dimensions===2){if(U++,B.length===U)return D;var H=B[U];if(!T(H))return!1;D=z[q][H]}else D=z[q]}else D=z}}return D}function T(D){return D===Math.round(D)&&D>=0}function M(D){var B,U;B=Z.modules[D]._module,U=B.basePlotModule;var V={};V.type=null;var q=l({},w),z=l({},B.attributes);te.crawl(z,function(J,le,ye,de,me){o(q,me).set(void 0),J===void 0&&o(z,me).set(void 0)}),l(V,q),Z.traceIs(D,"noOpacity")&&delete V.opacity,Z.traceIs(D,"showLegend")||(delete V.showlegend,delete V.legendgroup),Z.traceIs(D,"noHover")&&(delete V.hoverinfo,delete V.hoverlabel),B.selectPoints||delete V.selectedpoints,l(V,z),U.attributes&&l(V,U.attributes),V.type=D;var H={meta:B.meta||{},categories:B.categories||{},animatable:!!B.animatable,type:D,attributes:A(V)};if(B.layoutAttributes){var G={};l(G,B.layoutAttributes),H.layoutAttributes=A(G)}return B.animatable||te.crawl(H,function(J){te.isValObject(J)&&"anim"in J&&delete J.anim}),H}function k(){var D={},B,U;l(D,C);for(B in Z.subplotsRegistry)if(U=Z.subplotsRegistry[B],!!U.layoutAttributes)if(Array.isArray(U.attr))for(var V=0;V<U.attr.length;V++)x(D,U,U.attr[V]);else{var q=U.attr==="subplot"?U.name:U.attr;x(D,U,q)}for(B in Z.componentsRegistry){U=Z.componentsRegistry[B];var z=U.schema;if(z&&(z.subplots||z.layout)){var H=z.subplots;if(H&&H.xaxis&&!H.yaxis)for(var G in H.xaxis)delete D.yaxis[G];delete D.xaxis.shift,delete D.xaxis.autoshift}else U.name==="colorscale"?l(D,U.layoutAttributes):U.layoutAttributes&&N(D,U.layoutAttributes,U.name)}return{layoutAttributes:A(D)}}function b(){var D={frames:l({},P)};return A(D),D.frames}function A(D){return g(D),f(D),p(D),D}function g(D){function B(V){return{valType:"string",editType:"none"}}function U(V,q,z){te.isValObject(V)?(V.arrayOk===!0||V.valType==="data_array")&&(z[q+"src"]=B()):i(V)&&(V.role="object")}te.crawl(D,U)}function f(D){function B(U,V,q){if(U){var z=U[h];z&&(delete U[h],q[V]={items:{}},q[V].items[z]=U,q[V].role="object")}}te.crawl(D,B)}function p(D){function B(U){for(var V in U)if(i(U[V]))B(U[V]);else if(Array.isArray(U[V]))for(var q=0;q<U[V].length;q++)B(U[V][q]);else U[V]instanceof RegExp&&(U[V]=U[V].toString())}B(D)}function x(D,B,U){var V=o(D,U),q=l({},B.layoutAttributes);q[d]=!0,V.set(q)}function N(D,B,U){var V=o(D,U);V.set(l(V.get()||{},B))}}}),Tu=Ne({"src/plot_api/plot_template.js"(te){var Z=In(),v=ns(),w="templateitemname",C={name:{valType:"string",editType:"none"}};C[w]={valType:"string",editType:"calc"},te.templatedArray=function(r,a){return a._isLinkedToArray=r,a.name=C.name,a[w]=C[w],a},te.traceTemplater=function(r){var a={},l,i;for(l in r)i=r[l],Array.isArray(i)&&i.length&&(a[l]=0);function s(o){l=Z.coerce(o,{},v,"type");var u={type:l,_template:null};if(l in a){i=r[l];var d=a[l]%i.length;a[l]++,u._template=i[d]}return u}return{newTrace:s}},te.newContainer=function(r,a,l){var i=r._template,s=i&&(i[a]||l&&i[l]);Z.isPlainObject(s)||(s=null);var o=r[a]={_template:s};return o},te.arrayTemplater=function(r,a,l){var i=r._template,s=i&&i[t(a)],o=i&&i[a];(!Array.isArray(o)||!o.length)&&(o=[]);var u={};function d(y){var m={name:y.name,_input:y},E=m[w]=y[w];if(!P(E))return m._template=s,m;for(var c=0;c<o.length;c++){var _=o[c];if(_.name===E)return u[E]=1,m._template=_,m}return m[l]=y[l]||!1,m._template=!1,m}function h(){for(var y=[],m=0;m<o.length;m++){var E=o[m],c=E.name;if(P(c)&&!u[c]){var _={_template:E,name:c,_input:{_templateitemname:c}};_[w]=E[w],y.push(_),u[c]=1}}return y}return{newItem:d,defaultItems:h}};function P(r){return r&&typeof r=="string"}function t(r){var a=r.length-1;return r.charAt(a)!=="s"&&Z.warn("bad argument to arrayDefaultKey: "+r),r.substr(0,r.length-1)+"defaults"}te.arrayDefaultKey=t,te.arrayEditor=function(r,a,l){var i=(Z.nestedProperty(r,a).get()||[]).length,s=l._index,o=s>=i&&(l._input||{})._templateitemname;o&&(s=i);var u=a+"["+s+"]",d;function h(){d={},o&&(d[u]={},d[u][w]=o)}h();function y(_,T){d[_]=T}function m(_,T){o?Z.nestedProperty(d[u],_).set(T):d[u+"."+_]=T}function E(){var _=d;return h(),_}function c(_,T){_&&m(_,T);var M=E();for(var k in M)Z.nestedProperty(r,k).set(M[k])}return{modifyBase:y,modifyItem:m,getUpdateObj:E,applyUpdate:c}}}}),xh=Ne({"src/plots/cartesian/constants.js"(te,Z){var v=sf().counter;Z.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Hf=Ne({"src/plots/cartesian/axis_ids.js"(te){var Z=Xo(),v=xh();te.id2name=function(P){if(!(typeof P!="string"||!P.match(v.AX_ID_PATTERN))){var t=P.split(" ")[0].substr(1);return t==="1"&&(t=""),P.charAt(0)+"axis"+t}},te.name2id=function(P){if(P.match(v.AX_NAME_PATTERN)){var t=P.substr(5);return t==="1"&&(t=""),P.charAt(0)+t}},te.cleanId=function(P,t,r){var a=/( domain)$/.test(P);if(!(typeof P!="string"||!P.match(v.AX_ID_PATTERN))&&!(t&&P.charAt(0)!==t)&&!(a&&!r)){var l=P.split(" ")[0].substr(1).replace(/^0+/,"");return l==="1"&&(l=""),P.charAt(0)+l+(a&&r?" domain":"")}},te.list=function(C,P,t){var r=C._fullLayout;if(!r)return[];var a=te.listIds(C,P),l=new Array(a.length),i;for(i=0;i<a.length;i++){var s=a[i];l[i]=r[s.charAt(0)+"axis"+s.substr(1)]}if(!t){var o=r._subplots.gl3d||[];for(i=0;i<o.length;i++){var u=r[o[i]];P?l.push(u[P+"axis"]):l.push(u.xaxis,u.yaxis,u.zaxis)}}return l},te.listIds=function(C,P){var t=C._fullLayout;if(!t)return[];var r=t._subplots;return P?r[P+"axis"]:r.xaxis.concat(r.yaxis)},te.getFromId=function(C,P,t){var r=C._fullLayout;return P=P===void 0||typeof P!="string"?P:P.replace(" domain",""),t==="x"?P=P.replace(/y[0-9]*/,""):t==="y"&&(P=P.replace(/x[0-9]*/,"")),r[te.id2name(P)]},te.getFromTrace=function(C,P,t){var r=C._fullLayout,a=null;if(Z.traceIs(P,"gl3d")){var l=P.scene;l.substr(0,5)==="scene"&&(a=r[l][t+"axis"])}else a=te.getFromId(C,P[t+"axis"]||t);return a},te.idSort=function(C,P){var t=C.charAt(0),r=P.charAt(0);return t!==r?t>r?1:-1:+(C.substr(1)||1)-+(P.substr(1)||1)},te.ref2id=function(C){return/^[xyz]/.test(C)?C.split(" ")[0]:!1};function w(C,P){if(P&&P.length){for(var t=0;t<P.length;t++)if(P[t][C])return!0}return!1}te.isLinked=function(C,P){return w(P,C._axisMatchGroups)||w(P,C._axisConstraintGroups)}}}),_y=Ne({"src/components/shapes/handle_outline.js"(te,Z){function v(C){var P=C._fullLayout._zoomlayer;P&&P.selectAll(".outline-controllers").remove()}function w(C){var P=C._fullLayout._zoomlayer;P&&P.selectAll(".select-outline").remove(),C._fullLayout._outlining=!1}Z.exports={clearOutlineControllers:v,clearOutline:w}}}),xy=Ne({"src/traces/scatter/layout_attributes.js"(te,Z){Z.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),iv=Ne({"src/plots/get_data.js"(te){var Z=Xo();xh().SUBPLOT_PATTERN,te.getSubplotCalcData=function(v,w,C){var P=Z.subplotsRegistry[w];if(!P)return[];for(var t=P.attr,r=[],a=0;a<v.length;a++){var l=v[a],i=l[0].trace;i[t]===C&&r.push(l)}return r},te.getModuleCalcData=function(v,w,C){var P=[],t=[],r;if(typeof w=="string"?r=Z.getModule(w).plot:typeof w=="function"?r=w:r=w.plot,!r)return[P,v];for(var a=C,l=0;l<v.length;l++){var i=v[l],s=i[0].trace,o=s.zorder!==void 0;s.visible!==!0||s._length===0||(s._module&&s._module.plot===r&&(!o||s.zorder===a)?P.push(i):t.push(i))}return[P,t]},te.getSubplotData=function(w,C,P){if(!Z.subplotsRegistry[C])return[];for(var t=Z.subplotsRegistry[C].attr,r=[],a,l=0;l<w.length;l++)a=w[l],a[t]===P&&r.push(a);return r}}}),QE=Ne({"src/plots/command.js"(te){var Z=Xo(),v=In();te.manageCommandObserver=function(a,l,i,s){var o={},u=!0;l&&l._commandObserver&&(o=l._commandObserver),o.cache||(o.cache={}),o.lookupTable={};var d=te.hasSimpleAPICommandBindings(a,i,o.lookupTable);if(l&&l._commandObserver){if(d)return o;if(l._commandObserver.remove)return l._commandObserver.remove(),l._commandObserver=null,o}if(d){w(a,d,o.cache),o.check=function(){if(u){var E=w(a,d,o.cache);return E.changed&&s&&o.lookupTable[E.value]!==void 0&&(o.disable(),Promise.resolve(s({value:E.value,type:d.type,prop:d.prop,traces:d.traces,index:o.lookupTable[E.value]})).then(o.enable,o.enable)),E.changed}};for(var h=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],y=0;y<h.length;y++)a._internalOn(h[y],o.check);o.remove=function(){for(var m=0;m<h.length;m++)a._removeInternalListener(h[m],o.check)}}else v.log("Unable to automatically bind plot updates to API command"),o.lookupTable={},o.remove=function(){};return o.disable=function(){u=!1},o.enable=function(){u=!0},l&&(l._commandObserver=o),o},te.hasSimpleAPICommandBindings=function(a,l,i){var s,o=l.length,u;for(s=0;s<o;s++){var d,h=l[s],y=h.method,m=h.args;if(Array.isArray(m)||(m=[]),!y)return!1;var E=te.computeAPICommandBindings(a,y,m);if(E.length!==1)return!1;if(!u)u=E[0],Array.isArray(u.traces)&&u.traces.sort();else{if(d=E[0],d.type!==u.type||d.prop!==u.prop)return!1;if(Array.isArray(u.traces))if(Array.isArray(d.traces)){d.traces.sort();for(var c=0;c<u.traces.length;c++)if(u.traces[c]!==d.traces[c])return!1}else return!1;else if(d.prop!==u.prop)return!1}d=E[0];var _=d.value;if(Array.isArray(_))if(_.length===1)_=_[0];else return!1;i&&(i[_]=s)}return u};function w(a,l,i){var s,o,u,d=!1;if(l.type==="data")s=a._fullData[l.traces!==null?l.traces[0]:0];else if(l.type==="layout")s=a._fullLayout;else return!1;return o=v.nestedProperty(s,l.prop).get(),u=i[l.type]=i[l.type]||{},u.hasOwnProperty(l.prop)&&u[l.prop]!==o&&(d=!0),u[l.prop]=o,{changed:d,value:o}}te.executeAPICommand=function(a,l,i){if(l==="skip")return Promise.resolve();var s=Z.apiMethodRegistry[l],o=[a];Array.isArray(i)||(i=[]);for(var u=0;u<i.length;u++)o.push(i[u]);return s.apply(null,o).catch(function(d){return v.warn("API call to Plotly."+l+" rejected.",d),Promise.reject(d)})},te.computeAPICommandBindings=function(a,l,i){var s;switch(Array.isArray(i)||(i=[]),l){case"restyle":s=t(a,i);break;case"relayout":s=P(a,i);break;case"update":s=t(a,[i[0],i[2]]).concat(P(a,[i[1]]));break;case"animate":s=C(a,i);break;default:s=[]}return s};function C(a,l){return Array.isArray(l[0])&&l[0].length===1&&["string","number"].indexOf(typeof l[0][0])!==-1?[{type:"layout",prop:"_currentFrame",value:l[0][0].toString()}]:[]}function P(a,l){var i=[],s=l[0],o={};if(typeof s=="string")o[s]=l[1];else if(v.isPlainObject(s))o=s;else return i;return r(o,function(u,d,h){i.push({type:"layout",prop:u,value:h})},"",0),i}function t(a,l){var i,s,o,u,d=[];if(s=l[0],o=l[1],i=l[2],u={},typeof s=="string")u[s]=o;else if(v.isPlainObject(s))u=s,i===void 0&&(i=o);else return d;return i===void 0&&(i=null),r(u,function(h,y,m){var E,c;if(Array.isArray(m)){c=m.slice();var _=Math.min(c.length,a.data.length);i&&(_=Math.min(_,i.length)),E=[];for(var T=0;T<_;T++)E[T]=i?i[T]:T}else c=m,E=i?i.slice():null;if(E===null)Array.isArray(c)&&(c=c[0]);else if(Array.isArray(E)){if(!Array.isArray(c)){var M=c;c=[];for(var k=0;k<E.length;k++)c[k]=M}c.length=Math.min(E.length,c.length)}d.push({type:"data",prop:h,traces:E,value:c})},"",0),d}function r(a,l,i,s){Object.keys(a).forEach(function(o){var u=a[o];if(o[0]!=="_"){var d=i+(s>0?".":"")+o;v.isPlainObject(u)?r(u,l,d,s+1):l(d,o,u)}})}}}),uf=Ne({"src/plots/plots.js"(te,Z){var v=xn(),w=zn().timeFormatLocale,C=ta().formatLocale,P=la(),t=pa(),r=Xo(),a=B1(),l=Tu(),i=In(),s=io(),o=ja().BADNUM,u=Hf(),d=_y().clearOutline,h=xy(),y=O1(),m=kw(),E=iv().getModuleCalcData,c=i.relinkPrivateKeys,_=i._,T=Z.exports={};i.extendFlat(T,r),T.attributes=ns(),T.attributes.type.values=T.allTypes,T.fontAttrs=$o(),T.layoutAttributes=_x();var M=QE();T.executeAPICommand=M.executeAPICommand,T.computeAPICommandBindings=M.computeAPICommandBindings,T.manageCommandObserver=M.manageCommandObserver,T.hasSimpleAPICommandBindings=M.hasSimpleAPICommandBindings,T.redrawText=function(W){return W=i.getGraphDiv(W),new Promise(function(ie){setTimeout(function(){W._fullLayout&&(r.getComponentMethod("annotations","draw")(W),r.getComponentMethod("legend","draw")(W),r.getComponentMethod("colorbar","draw")(W),ie(T.previousPromises(W)))},300)})},T.resize=function(W){W=i.getGraphDiv(W);var ie,se=new Promise(function(ee,pe){(!W||i.isHidden(W))&&pe(new Error("Resize must be passed a displayed plot div element.")),W._redrawTimer&&clearTimeout(W._redrawTimer),W._resolveResize&&(ie=W._resolveResize),W._resolveResize=ee,W._redrawTimer=setTimeout(function(){if(!W.layout||W.layout.width&&W.layout.height||i.isHidden(W)){ee(W);return}delete W.layout.width,delete W.layout.height;var oe=W.changed;W.autoplay=!0,r.call("relayout",W,{autosize:!0}).then(function(){W.changed=oe,W._resolveResize===ee&&(delete W._resolveResize,ee(W))})},100)});return ie&&ie(se),se},T.previousPromises=function(W){if((W._promises||[]).length)return Promise.all(W._promises).then(function(){W._promises=[]})},T.addLinks=function(W){if(!(!W._context.showLink&&!W._context.showSources)){var ie=W._fullLayout,se=i.ensureSingle(ie._paper,"text","js-plot-link-container",function(ue){ue.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:s.defaultLine,"pointer-events":"all"}).each(function(){var _e=v.select(this);_e.append("tspan").classed("js-link-to-tool",!0),_e.append("tspan").classed("js-link-spacer",!0),_e.append("tspan").classed("js-sourcelinks",!0)})}),ee=se.node(),pe={y:ie._paper.attr("height")-9};document.body.contains(ee)&&ee.getComputedTextLength()>=ie.width-20?(pe["text-anchor"]="start",pe.x=5):(pe["text-anchor"]="end",pe.x=ie._paper.attr("width")-7),se.attr(pe);var oe=se.select(".js-link-to-tool"),Y=se.select(".js-link-spacer"),ce=se.select(".js-sourcelinks");W._context.showSources&&W._context.showSources(W),W._context.showLink&&k(W,oe),Y.text(oe.text()&&ce.text()?" - ":"")}};function k(W,ie){ie.text("");var se=ie.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(W._context.linkText+" »");if(W._context.sendData)se.on("click",function(){T.sendDataToCloud(W)});else{var ee=window.location.pathname.split("/"),pe=window.location.search;se.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+ee[2].split(".")[0]+"/"+ee[1]+pe})}}T.sendDataToCloud=function(W){var ie=(window.PLOTLYENV||{}).BASE_URL||W._context.plotlyServerURL;if(ie){W.emit("plotly_beforeexport");var se=v.select(W).append("div").attr("id","hiddenform").style("display","none"),ee=se.append("form").attr({action:ie+"/external",method:"post",target:"_blank"}),pe=ee.append("input").attr({type:"text",name:"data"});return pe.node().value=T.graphJson(W,!1,"keepdata"),ee.node().submit(),se.remove(),W.emit("plotly_afterexport"),!1}};var b=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];T.supplyDefaults=function(W,ie){var se=ie&&ie.skipUpdateCalc,ee=W._fullLayout||{};if(ee._skipDefaults){delete ee._skipDefaults;return}var pe=W._fullLayout={},oe=W.layout||{},Y=W._fullData||[],ce=W._fullData=[],ue=W.data||[],_e=W.calcdata||[],Le=W._context||{},ze;W._transitionData||T.createTransitionData(W),pe._dfltTitle={plot:_(W,"Click to enter Plot title"),subtitle:_(W,"Click to enter Plot subtitle"),x:_(W,"Click to enter X axis title"),y:_(W,"Click to enter Y axis title"),colorbar:_(W,"Click to enter Colorscale title"),annotation:_(W,"new text")},pe._traceWord=_(W,"trace");var Ge=p(W,b);if(pe._mapboxAccessToken=Le.mapboxAccessToken,ee._initialAutoSizeIsDone){var Ve=ee.width,rt=ee.height;T.supplyLayoutGlobalDefaults(oe,pe,Ge),oe.width||(pe.width=Ve),oe.height||(pe.height=rt),T.sanitizeMargins(pe)}else{T.supplyLayoutGlobalDefaults(oe,pe,Ge);var pt=!oe.width||!oe.height,gt=pe.autosize,ht=Le.autosizable,lt=pt&&(gt||ht);lt?T.plotAutoSize(W,oe,pe):pt&&T.sanitizeMargins(pe),!gt&&pt&&(oe.width=pe.width,oe.height=pe.height)}pe._d3locale=x(Ge,pe.separators),pe._extraFormat=p(W,A),pe._initialAutoSizeIsDone=!0,pe._dataLength=ue.length,pe._modules=[],pe._visibleModules=[],pe._basePlotModules=[];var Fe=pe._subplots=f(),Pe=pe._splomAxes={x:{},y:{}},be=pe._splomSubplots={};pe._splomGridDflt={},pe._scatterStackOpts={},pe._firstScatter={},pe._alignmentOpts={},pe._colorAxes={},pe._requestRangeslider={},pe._traceUids=g(Y,ue),T.supplyDataDefaults(ue,ce,oe,pe);var Ye=Object.keys(Pe.x),mt=Object.keys(Pe.y);if(Ye.length>1&&mt.length>1){for(r.getComponentMethod("grid","sizeDefaults")(oe,pe),ze=0;ze<Ye.length;ze++)i.pushUnique(Fe.xaxis,Ye[ze]);for(ze=0;ze<mt.length;ze++)i.pushUnique(Fe.yaxis,mt[ze]);for(var bt in be)i.pushUnique(Fe.cartesian,bt)}if(pe._has=T._hasPlotType.bind(pe),Y.length===ce.length)for(ze=0;ze<ce.length;ze++)c(ce[ze],Y[ze]);T.supplyLayoutModuleDefaults(oe,pe,ce,W._transitionData);var ft=pe._visibleModules,Wt=[];for(ze=0;ze<ft.length;ze++){var Zt=ft[ze].crossTraceDefaults;Zt&&i.pushUnique(Wt,Zt)}for(ze=0;ze<Wt.length;ze++)Wt[ze](ce,pe);pe._hasOnlyLargeSploms=pe._basePlotModules.length===1&&pe._basePlotModules[0].name==="splom"&&Ye.length>15&&mt.length>15&&pe.shapes.length===0&&pe.images.length===0,T.linkSubplots(ce,pe,Y,ee),T.cleanPlot(ce,pe,Y,ee);var cr=!!(ee._has&&ee._has("cartesian")),pr=!!(pe._has&&pe._has("cartesian")),Br=cr,Fr=pr;Br&&!Fr?ee._bgLayer.remove():Fr&&!Br&&(pe._shouldCreateBgLayer=!0),ee._zoomlayer&&!W._dragging&&d({_fullLayout:ee}),N(ce,pe),c(pe,ee),r.getComponentMethod("colorscale","crossTraceDefaults")(ce,pe),pe._preGUI||(pe._preGUI={}),pe._tracePreGUI||(pe._tracePreGUI={});var cn=pe._tracePreGUI,Nr={},Jr;for(Jr in cn)Nr[Jr]="old";for(ze=0;ze<ce.length;ze++)Jr=ce[ze]._fullInput.uid,Nr[Jr]||(cn[Jr]={}),Nr[Jr]="new";for(Jr in Nr)Nr[Jr]==="old"&&delete cn[Jr];U(pe),r.getComponentMethod("rangeslider","makeData")(pe),!se&&_e.length===ce.length&&T.supplyDefaultsUpdateCalc(_e,ce)},T.supplyDefaultsUpdateCalc=function(W,ie){for(var se=0;se<ie.length;se++){var ee=ie[se],pe=(W[se]||[])[0];if(pe&&pe.trace){var oe=pe.trace;if(oe._hasCalcTransform){var Y=oe._arrayAttrs,ce,ue,_e;for(ce=0;ce<Y.length;ce++)ue=Y[ce],_e=i.nestedProperty(oe,ue).get().slice(),i.nestedProperty(ee,ue).set(_e)}pe.trace=ee}}};function g(W,ie){var se=ie.length,ee=[],pe,oe;for(pe=0;pe<W.length;pe++){var Y=W[pe]._fullInput;Y!==oe&&ee.push(Y),oe=Y}var ce=ee.length,ue=new Array(se),_e={};function Le(Ve,rt){ue[rt]=Ve,_e[Ve]=1}function ze(Ve,rt){if(Ve&&typeof Ve=="string"&&!_e[Ve])return Le(Ve,rt),!0}for(pe=0;pe<se;pe++){var Ge=ie[pe].uid;typeof Ge=="number"&&(Ge=String(Ge)),!ze(Ge,pe)&&(pe<ce&&ze(ee[pe].uid,pe)||Le(i.randstr(_e),pe))}return ue}function f(){var W=r.collectableSubplotTypes,ie={},se,ee;if(!W){W=[];var pe=r.subplotsRegistry;for(var oe in pe){var Y=pe[oe],ce=Y.attr;if(ce&&(W.push(oe),Array.isArray(ce)))for(ee=0;ee<ce.length;ee++)i.pushUnique(W,ce[ee])}}for(se=0;se<W.length;se++)ie[W[se]]=[];return ie}function p(W,ie){var se=W._context.locale;se||(se="en-US");var ee=!1,pe={};function oe(ze){for(var Ge=!0,Ve=0;Ve<ie.length;Ve++){var rt=ie[Ve];pe[rt]||(ze[rt]?pe[rt]=ze[rt]:Ge=!1)}Ge&&(ee=!0)}for(var Y=0;Y<2;Y++){for(var ce=W._context.locales,ue=0;ue<2;ue++){var _e=(ce[se]||{}).format;if(_e&&(oe(_e),ee))break;ce=r.localeRegistry}var Le=se.split("-")[0];if(ee||Le===se)break;se=Le}return ee||oe(r.localeRegistry.en.format),pe}function x(W,ie){return W.decimal=ie.charAt(0),W.thousands=ie.charAt(1),{numberFormat:function(se){try{se=C(W).format(i.adjustFormat(se))}catch{return i.warnBadFormat(se),i.noFormat}return se},timeFormat:w(W).utcFormat}}function N(W,ie){var se,ee=[];ie.meta&&(se=ie._meta={meta:ie.meta,layout:{meta:ie.meta}});for(var pe=0;pe<W.length;pe++){var oe=W[pe];oe.meta?ee[oe.index]=oe._meta={meta:oe.meta}:ie.meta&&(oe._meta={meta:ie.meta}),ie.meta&&(oe._meta.layout={meta:ie.meta})}ee.length&&(se||(se=ie._meta={}),se.data=ee)}T.createTransitionData=function(W){W._transitionData||(W._transitionData={}),W._transitionData._frames||(W._transitionData._frames=[]),W._transitionData._frameHash||(W._transitionData._frameHash={}),W._transitionData._counter||(W._transitionData._counter=0),W._transitionData._interruptCallbacks||(W._transitionData._interruptCallbacks=[])},T._hasPlotType=function(W){var ie,se=this._basePlotModules||[];for(ie=0;ie<se.length;ie++)if(se[ie].name===W)return!0;var ee=this._modules||[];for(ie=0;ie<ee.length;ie++){var pe=ee[ie].name;if(pe===W)return!0;var oe=r.modules[pe];if(oe&&oe.categories[W])return!0}return!1},T.cleanPlot=function(W,ie,se,ee){var pe,oe,Y=ee._basePlotModules||[];for(pe=0;pe<Y.length;pe++){var ce=Y[pe];ce.clean&&ce.clean(W,ie,se,ee)}var ue=ee._has&&ee._has("gl"),_e=ie._has&&ie._has("gl");ue&&!_e&&ee._glcontainer!==void 0&&(ee._glcontainer.selectAll(".gl-canvas").remove(),ee._glcontainer.selectAll(".no-webgl").remove(),ee._glcanvas=null);var Le=!!ee._infolayer;e:for(pe=0;pe<se.length;pe++){var ze=se[pe],Ge=ze.uid;for(oe=0;oe<W.length;oe++){var Ve=W[oe];if(Ge===Ve.uid)continue e}Le&&ee._infolayer.select(".cb"+Ge).remove()}},T.linkSubplots=function(W,ie,se,ee){var pe,oe,Y=ee._plots||{},ce=ie._plots={},ue=ie._subplots,_e={_fullData:W,_fullLayout:ie},Le=ue.cartesian||[];for(pe=0;pe<Le.length;pe++){var ze=Le[pe],Ge=Y[ze],Ve=u.getFromId(_e,ze,"x"),rt=u.getFromId(_e,ze,"y"),pt;for(Ge?pt=ce[ze]=Ge:(pt=ce[ze]={},pt.id=ze),Ve._counterAxes.push(rt._id),rt._counterAxes.push(Ve._id),Ve._subplotsWith.push(ze),rt._subplotsWith.push(ze),pt.xaxis=Ve,pt.yaxis=rt,pt._hasClipOnAxisFalse=!1,oe=0;oe<W.length;oe++){var gt=W[oe];if(gt.xaxis===pt.xaxis._id&&gt.yaxis===pt.yaxis._id&&gt.cliponaxis===!1){pt._hasClipOnAxisFalse=!0;break}}}var ht=u.list(_e,null,!0),lt;for(pe=0;pe<ht.length;pe++){lt=ht[pe];var Fe=null;lt.overlaying&&(Fe=u.getFromId(_e,lt.overlaying),Fe&&Fe.overlaying&&(lt.overlaying=!1,Fe=null)),lt._mainAxis=Fe||lt,Fe&&(lt.domain=Fe.domain.slice()),lt._anchorAxis=lt.anchor==="free"?null:u.getFromId(_e,lt.anchor)}for(pe=0;pe<ht.length;pe++)if(lt=ht[pe],lt._counterAxes.sort(u.idSort),lt._subplotsWith.sort(i.subplotSort),lt._mainSubplot=D(lt,ie),lt._counterAxes.length&&(lt.spikemode&&lt.spikemode.indexOf("across")!==-1||lt.automargin&&lt.mirror&&lt.anchor!=="free"||r.getComponentMethod("rangeslider","isVisible")(lt))){var Pe=1,be=0;for(oe=0;oe<lt._counterAxes.length;oe++){var Ye=u.getFromId(_e,lt._counterAxes[oe]);Pe=Math.min(Pe,Ye.domain[0]),be=Math.max(be,Ye.domain[1])}Pe<be&&(lt._counterDomainMin=Pe,lt._counterDomainMax=be)}};function D(W,ie){var se={_fullLayout:ie},ee=W._id.charAt(0)==="x",pe=W._mainAxis._anchorAxis,oe="",Y="",ce="";if(pe&&(ce=pe._mainAxis._id,oe=ee?W._id+ce:ce+W._id),!oe||!ie._plots[oe]){oe="";for(var ue=W._counterAxes,_e=0;_e<ue.length;_e++){var Le=ue[_e],ze=ee?W._id+Le:Le+W._id;Y||(Y=ze);var Ge=u.getFromId(se,Le);if(ce&&Ge.overlaying===ce){oe=ze;break}}}return oe||Y}T.clearExpandedTraceDefaultColors=function(W){var ie,se,ee;function pe(Y,ce,ue,_e){se[_e]=ce,se.length=_e+1,Y.valType==="color"&&Y.dflt===void 0&&ie.push(se.join("."))}for(se=[],ie=W._module._colorAttrs,ie||(W._module._colorAttrs=ie=[],a.crawl(W._module.attributes,pe)),ee=0;ee<ie.length;ee++){var oe=i.nestedProperty(W,"_input."+ie[ee]);oe.get()||i.nestedProperty(W,ie[ee]).set(null)}},T.supplyDataDefaults=function(W,ie,se,ee){var pe=ee._modules,oe=ee._visibleModules,Y=ee._basePlotModules,ce=0,ue,_e,Le;ee._transformModules=[];function ze(ht){ie.push(ht);var lt=ht._module;lt&&(i.pushUnique(pe,lt),ht.visible===!0&&i.pushUnique(oe,lt),i.pushUnique(Y,ht._module.basePlotModule),ht._input.visible!==!1&&ce++)}var Ge={},Ve=[],rt=(se.template||{}).data||{},pt=l.traceTemplater(rt);for(ue=0;ue<W.length;ue++)Le=W[ue],_e=pt.newTrace(Le),_e.uid=ee._traceUids[ue],T.supplyTraceDefaults(Le,_e,ce,ee,ue),_e.index=ue,_e._input=Le,_e._fullInput=_e,ze(_e),r.traceIs(_e,"carpetAxis")&&(Ge[_e.carpet]=_e),r.traceIs(_e,"carpetDependent")&&Ve.push(ue);for(ue=0;ue<Ve.length;ue++)if(_e=ie[Ve[ue]],!!_e.visible){var gt=Ge[_e.carpet];if(_e._carpet=gt,!gt||!gt.visible){_e.visible=!1;continue}_e.xaxis=gt.xaxis,_e.yaxis=gt.yaxis}},T.supplyAnimationDefaults=function(W){W=W||{};var ie,se={};function ee(pe,oe){return i.coerce(W||{},se,y,pe,oe)}if(ee("mode"),ee("direction"),ee("fromcurrent"),Array.isArray(W.frame))for(se.frame=[],ie=0;ie<W.frame.length;ie++)se.frame[ie]=T.supplyAnimationFrameDefaults(W.frame[ie]||{});else se.frame=T.supplyAnimationFrameDefaults(W.frame||{});if(Array.isArray(W.transition))for(se.transition=[],ie=0;ie<W.transition.length;ie++)se.transition[ie]=T.supplyAnimationTransitionDefaults(W.transition[ie]||{});else se.transition=T.supplyAnimationTransitionDefaults(W.transition||{});return se},T.supplyAnimationFrameDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W||{},ie,y.frame,ee,pe)}return se("duration"),se("redraw"),ie},T.supplyAnimationTransitionDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W||{},ie,y.transition,ee,pe)}return se("duration"),se("easing"),ie},T.supplyFrameDefaults=function(W){var ie={};function se(ee,pe){return i.coerce(W,ie,m,ee,pe)}return se("group"),se("name"),se("traces"),se("baseframe"),se("data"),se("layout"),ie},T.supplyTraceDefaults=function(W,ie,se,ee,pe){var oe=ee.colorway||s.defaults,Y=oe[se%oe.length],ce;function ue(Fe,Pe){return i.coerce(W,ie,T.attributes,Fe,Pe)}var _e=ue("visible");ue("type"),ue("name",ee._traceWord+" "+pe),ue("uirevision",ee.uirevision);var Le=T.getModule(ie);if(ie._module=Le,Le){var ze=Le.basePlotModule,Ge=ze.attr,Ve=ze.attributes;if(Ge&&Ve){var rt=ee._subplots,pt="";if(Array.isArray(Ge))for(ce=0;ce<Ge.length;ce++){var gt=Ge[ce],ht=i.coerce(W,ie,Ve,gt);rt[gt]&&i.pushUnique(rt[gt],ht),pt+=ht}else pt=i.coerce(W,ie,Ve,Ge);rt[ze.name]&&i.pushUnique(rt[ze.name],pt)}}if(_e&&(ue("customdata"),ue("ids"),ue("meta"),r.traceIs(ie,"showLegend")?(i.coerce(W,ie,Le.attributes.showlegend?Le.attributes:T.attributes,"showlegend"),ue("legend"),ue("legendwidth"),ue("legendgroup"),ue("legendgrouptitle.text"),ue("legendrank"),ie._dfltShowLegend=!0):ie._dfltShowLegend=!1,Le&&Le.supplyDefaults(W,ie,Y,ee),r.traceIs(ie,"noOpacity")||ue("opacity"),r.traceIs(ie,"notLegendIsolatable")&&(ie.visible=!!ie.visible),r.traceIs(ie,"noHover")||(ie.hovertemplate||i.coerceHoverinfo(W,ie,ee),ie.type!=="parcats"&&r.getComponentMethod("fx","supplyDefaults")(W,ie,Y,ee)),Le&&Le.selectPoints)){var lt=ue("selectedpoints");i.isTypedArray(lt)&&(ie.selectedpoints=Array.from(lt))}return ie},T.supplyLayoutGlobalDefaults=function(W,ie,se){function ee(ze,Ge){return i.coerce(W,ie,T.layoutAttributes,ze,Ge)}var pe=W.template;i.isPlainObject(pe)&&(ie.template=pe,ie._template=pe.layout,ie._dataTemplate=pe.data),ee("autotypenumbers");var oe=i.coerceFont(ee,"font"),Y=oe.size;i.coerceFont(ee,"title.font",oe,{overrideDflt:{size:Math.round(Y*1.4)}}),ee("title.text",ie._dfltTitle.plot),ee("title.xref");var ce=ee("title.yref");ee("title.pad.t"),ee("title.pad.r"),ee("title.pad.b"),ee("title.pad.l");var ue=ee("title.automargin");ee("title.x"),ee("title.xanchor"),ee("title.y"),ee("title.yanchor"),ee("title.subtitle.text",ie._dfltTitle.subtitle),i.coerceFont(ee,"title.subtitle.font",oe,{overrideDflt:{size:Math.round(ie.title.font.size*.7)}}),ue&&(ce==="paper"&&(ie.title.y!==0&&(ie.title.y=1),ie.title.yanchor==="auto"&&(ie.title.yanchor=ie.title.y===0?"top":"bottom")),ce==="container"&&(ie.title.y==="auto"&&(ie.title.y=1),ie.title.yanchor==="auto"&&(ie.title.yanchor=ie.title.y<.5?"bottom":"top")));var _e=ee("uniformtext.mode");_e&&ee("uniformtext.minsize"),ee("autosize",!(W.width&&W.height)),ee("width"),ee("height"),ee("minreducedwidth"),ee("minreducedheight"),ee("margin.l"),ee("margin.r"),ee("margin.t"),ee("margin.b"),ee("margin.pad"),ee("margin.autoexpand"),W.width&&W.height&&T.sanitizeMargins(ie),r.getComponentMethod("grid","sizeDefaults")(W,ie),ee("paper_bgcolor"),ee("separators",se.decimal+se.thousands),ee("hidesources"),ee("colorway"),ee("datarevision");var Le=ee("uirevision");ee("editrevision",Le),ee("selectionrevision",Le),r.getComponentMethod("modebar","supplyLayoutDefaults")(W,ie),r.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(W,ie,ee),r.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(W,ie,ee),ee("meta"),i.isPlainObject(W.transition)&&(ee("transition.duration"),ee("transition.easing"),ee("transition.ordering")),r.getComponentMethod("calendars","handleDefaults")(W,ie,"calendar"),r.getComponentMethod("fx","supplyLayoutGlobalDefaults")(W,ie,ee),i.coerce(W,ie,h,"scattermode")};function B(W){return typeof W=="string"&&W.substr(W.length-2)==="px"&&parseFloat(W)}T.plotAutoSize=function(ie,se,ee){var pe=ie._context||{},oe=pe.frameMargins,Y,ce,ue=i.isPlotDiv(ie);if(ue&&ie.emit("plotly_autosize"),pe.fillFrame)Y=window.innerWidth,ce=window.innerHeight,document.body.style.overflow="hidden";else{var _e=ue?window.getComputedStyle(ie):{};if(Y=B(_e.width)||B(_e.maxWidth)||ee.width,ce=B(_e.height)||B(_e.maxHeight)||ee.height,P(oe)&&oe>0){var Le=1-2*oe;Y=Math.round(Le*Y),ce=Math.round(Le*ce)}}var ze=T.layoutAttributes.width.min,Ge=T.layoutAttributes.height.min;Y<ze&&(Y=ze),ce<Ge&&(ce=Ge);var Ve=!se.width&&Math.abs(ee.width-Y)>1,rt=!se.height&&Math.abs(ee.height-ce)>1;(rt||Ve)&&(Ve&&(ee.width=Y),rt&&(ee.height=ce)),ie._initialAutoSize||(ie._initialAutoSize={width:Y,height:ce}),T.sanitizeMargins(ee)},T.supplyLayoutModuleDefaults=function(W,ie,se,ee){var pe=r.componentsRegistry,oe=ie._basePlotModules,Y,ce,ue,_e=r.subplotsRegistry.cartesian;for(Y in pe)ue=pe[Y],ue.includeBasePlot&&ue.includeBasePlot(W,ie);oe.length||oe.push(_e),ie._has("cartesian")&&(r.getComponentMethod("grid","contentDefaults")(W,ie),_e.finalizeSubplots(W,ie));for(var Le in ie._subplots)ie._subplots[Le].sort(i.subplotSort);for(ce=0;ce<oe.length;ce++)ue=oe[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se);var ze=ie._modules;for(ce=0;ce<ze.length;ce++)ue=ze[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se);var Ge=ie._transformModules;for(ce=0;ce<Ge.length;ce++)ue=Ge[ce],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se,ee);for(Y in pe)ue=pe[Y],ue.supplyLayoutDefaults&&ue.supplyLayoutDefaults(W,ie,se)},T.purge=function(W){var ie=W._fullLayout||{};ie._glcontainer!==void 0&&(ie._glcontainer.selectAll(".gl-canvas").remove(),ie._glcontainer.remove(),ie._glcanvas=null),ie._modeBar&&ie._modeBar.destroy(),W._transitionData&&(W._transitionData._interruptCallbacks&&(W._transitionData._interruptCallbacks.length=0),W._transitionData._animationRaf&&window.cancelAnimationFrame(W._transitionData._animationRaf)),i.clearThrottle(),i.clearResponsive(W),delete W.data,delete W.layout,delete W._fullData,delete W._fullLayout,delete W.calcdata,delete W.empty,delete W.fid,delete W.undoqueue,delete W.undonum,delete W.autoplay,delete W.changed,delete W._promises,delete W._redrawTimer,delete W._hmlumcount,delete W._hmpixcount,delete W._transitionData,delete W._transitioning,delete W._initialAutoSize,delete W._transitioningWithDuration,delete W._dragging,delete W._dragged,delete W._dragdata,delete W._hoverdata,delete W._snapshotInProgress,delete W._editing,delete W._mouseDownTime,delete W._legendMouseDownTime,W.removeAllListeners&&W.removeAllListeners()},T.style=function(W){var ie=W._fullLayout._visibleModules,se=[],ee;for(ee=0;ee<ie.length;ee++){var pe=ie[ee];pe.style&&i.pushUnique(se,pe.style)}for(ee=0;ee<se.length;ee++)se[ee](W)},T.sanitizeMargins=function(W){if(!(!W||!W.margin)){var ie=W.width,se=W.height,ee=W.margin,pe=ie-(ee.l+ee.r),oe=se-(ee.t+ee.b),Y;pe<0&&(Y=(ie-1)/(ee.l+ee.r),ee.l=Math.floor(Y*ee.l),ee.r=Math.floor(Y*ee.r)),oe<0&&(Y=(se-1)/(ee.t+ee.b),ee.t=Math.floor(Y*ee.t),ee.b=Math.floor(Y*ee.b))}},T.clearAutoMarginIds=function(W){W._fullLayout._pushmarginIds={}},T.allowAutoMargin=function(W,ie){W._fullLayout._pushmarginIds[ie]=1};function U(W){var ie=W.margin;if(!W._size){var se=W._size={l:Math.round(ie.l),r:Math.round(ie.r),t:Math.round(ie.t),b:Math.round(ie.b),p:Math.round(ie.pad)};se.w=Math.round(W.width)-se.l-se.r,se.h=Math.round(W.height)-se.t-se.b}W._pushmargin||(W._pushmargin={}),W._pushmarginIds||(W._pushmarginIds={}),W._reservedMargin||(W._reservedMargin={})}var V=2,q=2;T.autoMargin=function(W,ie,se){var ee=W._fullLayout,pe=ee.width,oe=ee.height,Y=ee.margin,ce=ee.minreducedwidth,ue=ee.minreducedheight,_e=i.constrain(pe-Y.l-Y.r,V,ce),Le=i.constrain(oe-Y.t-Y.b,q,ue),ze=Math.max(0,pe-_e),Ge=Math.max(0,oe-Le),Ve=ee._pushmargin,rt=ee._pushmarginIds;if(Y.autoexpand!==!1){if(!se)delete Ve[ie],delete rt[ie];else{var pt=se.pad;if(pt===void 0&&(pt=Math.min(12,Y.l,Y.r,Y.t,Y.b)),ze){var gt=(se.l+se.r)/ze;gt>1&&(se.l/=gt,se.r/=gt)}if(Ge){var ht=(se.t+se.b)/Ge;ht>1&&(se.t/=ht,se.b/=ht)}var lt=se.xl!==void 0?se.xl:se.x,Fe=se.xr!==void 0?se.xr:se.x,Pe=se.yt!==void 0?se.yt:se.y,be=se.yb!==void 0?se.yb:se.y;Ve[ie]={l:{val:lt,size:se.l+pt},r:{val:Fe,size:se.r+pt},b:{val:be,size:se.b+pt},t:{val:Pe,size:se.t+pt}},rt[ie]=1}if(!ee._replotting)return T.doAutoMargin(W)}};function z(W){if("_redrawFromAutoMarginCount"in W._fullLayout)return!1;var ie=u.list(W,"",!0);for(var se in ie)if(ie[se].autoshift||ie[se].shift)return!0;return!1}T.doAutoMargin=function(W){var ie=W._fullLayout,se=ie.width,ee=ie.height;ie._size||(ie._size={}),U(ie);var pe=ie._size,oe=ie.margin,Y={t:0,b:0,l:0,r:0},ce=i.extendFlat({},pe),ue=oe.l,_e=oe.r,Le=oe.t,ze=oe.b,Ge=ie._pushmargin,Ve=ie._pushmarginIds,rt=ie.minreducedwidth,pt=ie.minreducedheight;if(oe.autoexpand!==!1){for(var gt in Ge)Ve[gt]||delete Ge[gt];var ht=W._fullLayout._reservedMargin;for(var lt in ht)for(var Fe in ht[lt]){var Pe=ht[lt][Fe];Y[Fe]=Math.max(Y[Fe],Pe)}Ge.base={l:{val:0,size:ue},r:{val:1,size:_e},t:{val:1,size:Le},b:{val:0,size:ze}};for(var be in Y){var Ye=0;for(var mt in Ge)mt!=="base"&&P(Ge[mt][be].size)&&(Ye=Ge[mt][be].size>Ye?Ge[mt][be].size:Ye);var bt=Math.max(0,oe[be]-Ye);Y[be]=Math.max(0,Y[be]-bt)}for(var ft in Ge){var Wt=Ge[ft].l||{},Zt=Ge[ft].b||{},cr=Wt.val,pr=Wt.size,Br=Zt.val,Fr=Zt.size,cn=se-Y.r-Y.l,Nr=ee-Y.t-Y.b;for(var Jr in Ge){if(P(pr)&&Ge[Jr].r){var Dt=Ge[Jr].r.val,$e=Ge[Jr].r.size;if(Dt>cr){var ot=(pr*Dt+($e-cn)*cr)/(Dt-cr),De=($e*(1-cr)+(pr-cn)*(1-Dt))/(Dt-cr);ot+De>ue+_e&&(ue=ot,_e=De)}}if(P(Fr)&&Ge[Jr].t){var Ee=Ge[Jr].t.val,Ae=Ge[Jr].t.size;if(Ee>Br){var Ie=(Fr*Ee+(Ae-Nr)*Br)/(Ee-Br),tt=(Ae*(1-Br)+(Fr-Nr)*(1-Ee))/(Ee-Br);Ie+tt>ze+Le&&(ze=Ie,Le=tt)}}}}}var st=i.constrain(se-oe.l-oe.r,V,rt),Ft=i.constrain(ee-oe.t-oe.b,q,pt),Nt=Math.max(0,se-st),Xt=Math.max(0,ee-Ft);if(Nt){var lr=(ue+_e)/Nt;lr>1&&(ue/=lr,_e/=lr)}if(Xt){var Rr=(ze+Le)/Xt;Rr>1&&(ze/=Rr,Le/=Rr)}if(pe.l=Math.round(ue)+Y.l,pe.r=Math.round(_e)+Y.r,pe.t=Math.round(Le)+Y.t,pe.b=Math.round(ze)+Y.b,pe.p=Math.round(oe.pad),pe.w=Math.round(se)-pe.l-pe.r,pe.h=Math.round(ee)-pe.t-pe.b,!ie._replotting&&(T.didMarginChange(ce,pe)||z(W))){"_redrawFromAutoMarginCount"in ie?ie._redrawFromAutoMarginCount++:ie._redrawFromAutoMarginCount=1;var Mr=3*(1+Object.keys(Ve).length);if(ie._redrawFromAutoMarginCount<Mr)return r.call("_doPlot",W);ie._size=ce,i.warn("Too many auto-margin redraws.")}H(W)};function H(W){var ie=u.list(W,"",!0);["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(se){for(var ee=0;ee<ie.length;ee++){var pe=ie[ee][se];pe&&pe()}})}var G=["l","r","t","b","p","w","h"];T.didMarginChange=function(W,ie){for(var se=0;se<G.length;se++){var ee=G[se],pe=W[ee],oe=ie[ee];if(!P(pe)||Math.abs(oe-pe)>1)return!0}return!1},T.graphJson=function(W,ie,se,ee,pe,oe){(pe&&ie&&!W._fullData||pe&&!ie&&!W._fullLayout)&&T.supplyDefaults(W);var Y=pe?W._fullData:W.data,ce=pe?W._fullLayout:W.layout,ue=(W._transitionData||{})._frames;function _e(Ge,Ve){if(typeof Ge=="function")return Ve?"_function_":null;if(i.isPlainObject(Ge)){var rt={},pt;return Object.keys(Ge).sort().forEach(function(Fe){if(["_","["].indexOf(Fe.charAt(0))===-1){if(typeof Ge[Fe]=="function"){Ve&&(rt[Fe]="_function");return}if(se==="keepdata"){if(Fe.substr(Fe.length-3)==="src")return}else if(se==="keepstream"){if(pt=Ge[Fe+"src"],typeof pt=="string"&&pt.indexOf(":")>0&&!i.isPlainObject(Ge.stream))return}else if(se!=="keepall"&&(pt=Ge[Fe+"src"],typeof pt=="string"&&pt.indexOf(":")>0))return;rt[Fe]=_e(Ge[Fe],Ve)}}),rt}var gt=Array.isArray(Ge),ht=i.isTypedArray(Ge);if((gt||ht)&&Ge.dtype&&Ge.shape){var lt=Ge.bdata;return _e({dtype:Ge.dtype,shape:Ge.shape,bdata:i.isArrayBuffer(lt)?t.encode(lt):lt},Ve)}return gt?Ge.map(function(Fe){return _e(Fe,Ve)}):ht?i.simpleMap(Ge,i.identity):i.isJSDate(Ge)?i.ms2DateTimeLocal(+Ge):Ge}var Le={data:(Y||[]).map(function(Ge){var Ve=_e(Ge);return ie&&delete Ve.fit,Ve})};if(!ie&&(Le.layout=_e(ce),pe)){var ze=ce._size;Le.layout.computed={margin:{b:ze.b,l:ze.l,r:ze.r,t:ze.t}}}return ue&&(Le.frames=_e(ue)),oe&&(Le.config=_e(W._context,!0)),ee==="object"?Le:JSON.stringify(Le)},T.modifyFrames=function(W,ie){var se,ee,pe,oe=W._transitionData._frames,Y=W._transitionData._frameHash;for(se=0;se<ie.length;se++)switch(ee=ie[se],ee.type){case"replace":pe=ee.value;var ce=(oe[ee.index]||{}).name,ue=pe.name;oe[ee.index]=Y[ue]=pe,ue!==ce&&(delete Y[ce],Y[ue]=pe);break;case"insert":pe=ee.value,Y[pe.name]=pe,oe.splice(ee.index,0,pe);break;case"delete":pe=oe[ee.index],delete Y[pe.name],oe.splice(ee.index,1);break}return Promise.resolve()},T.computeFrame=function(W,ie){var se=W._transitionData._frameHash,ee,pe,oe,Y;if(!ie)throw new Error("computeFrame must be given a string frame name");var ce=se[ie.toString()];if(!ce)return!1;for(var ue=[ce],_e=[ce.name];ce.baseframe&&(ce=se[ce.baseframe.toString()])&&_e.indexOf(ce.name)===-1;)ue.push(ce),_e.push(ce.name);for(var Le={};ce=ue.pop();)if(ce.layout&&(Le.layout=T.extendLayout(Le.layout,ce.layout)),ce.data){if(Le.data||(Le.data=[]),pe=ce.traces,!pe)for(pe=[],ee=0;ee<ce.data.length;ee++)pe[ee]=ee;for(Le.traces||(Le.traces=[]),ee=0;ee<ce.data.length;ee++)oe=pe[ee],oe!=null&&(Y=Le.traces.indexOf(oe),Y===-1&&(Y=Le.data.length,Le.traces[Y]=oe),Le.data[Y]=T.extendTrace(Le.data[Y],ce.data[ee]))}return Le},T.recomputeFrameHash=function(W){for(var ie=W._transitionData._frameHash={},se=W._transitionData._frames,ee=0;ee<se.length;ee++){var pe=se[ee];pe&&pe.name&&(ie[pe.name]=pe)}},T.extendObjectWithContainers=function(W,ie,se){var ee,pe,oe,Y,ce,ue,_e,Le,ze=i.extendDeepNoArrays({},ie||{}),Ge=i.expandObjectPaths(ze),Ve={};if(se&&se.length)for(oe=0;oe<se.length;oe++)ee=i.nestedProperty(Ge,se[oe]),pe=ee.get(),pe===void 0?i.nestedProperty(Ve,se[oe]).set(null):(ee.set(null),i.nestedProperty(Ve,se[oe]).set(pe));if(W=i.extendDeepNoArrays(W||{},Ge),se&&se.length){for(oe=0;oe<se.length;oe++)if(ce=i.nestedProperty(Ve,se[oe]),_e=ce.get(),!!_e){for(ue=i.nestedProperty(W,se[oe]),Le=ue.get(),Array.isArray(Le)||(Le=[],ue.set(Le)),Y=0;Y<_e.length;Y++){var rt=_e[Y];rt===null?Le[Y]=null:Le[Y]=T.extendObjectWithContainers(Le[Y],rt)}ue.set(Le)}}return W},T.dataArrayContainers=["transforms","dimensions"],T.layoutArrayContainers=r.layoutArrayContainers,T.extendTrace=function(W,ie){return T.extendObjectWithContainers(W,ie,T.dataArrayContainers)},T.extendLayout=function(W,ie){return T.extendObjectWithContainers(W,ie,T.layoutArrayContainers)},T.transition=function(W,ie,se,ee,pe,oe){var Y={redraw:pe.redraw},ce={},ue=[];return Y.prepareFn=function(){for(var _e=Array.isArray(ie)?ie.length:0,Le=ee.slice(0,_e),ze=0;ze<Le.length;ze++){var Ge=Le[ze],Ve=W._fullData[Ge],rt=Ve._module;if(rt){if(rt.animatable){var pt=rt.basePlotModule.name;ce[pt]||(ce[pt]=[]),ce[pt].push(Ge)}W.data[Le[ze]]=T.extendTrace(W.data[Le[ze]],ie[ze])}}var gt=i.expandObjectPaths(i.extendDeepNoArrays({},se)),ht=/^[xy]axis[0-9]*$/;for(var lt in gt)ht.test(lt)&&delete gt[lt].range;T.extendLayout(W.layout,gt),delete W.calcdata,T.supplyDefaults(W),T.doCalcdata(W);var Fe=i.expandObjectPaths(se);if(Fe){var Pe=W._fullLayout._plots;for(var be in Pe){var Ye=Pe[be],mt=Ye.xaxis,bt=Ye.yaxis,ft=mt.range.slice(),Wt=bt.range.slice(),Zt=null,cr=null,pr=null,Br=null;Array.isArray(Fe[mt._name+".range"])?Zt=Fe[mt._name+".range"].slice():Array.isArray((Fe[mt._name]||{}).range)&&(Zt=Fe[mt._name].range.slice()),Array.isArray(Fe[bt._name+".range"])?cr=Fe[bt._name+".range"].slice():Array.isArray((Fe[bt._name]||{}).range)&&(cr=Fe[bt._name].range.slice()),ft&&Zt&&(mt.r2l(ft[0])!==mt.r2l(Zt[0])||mt.r2l(ft[1])!==mt.r2l(Zt[1]))&&(pr={xr0:ft,xr1:Zt}),Wt&&cr&&(bt.r2l(Wt[0])!==bt.r2l(cr[0])||bt.r2l(Wt[1])!==bt.r2l(cr[1]))&&(Br={yr0:Wt,yr1:cr}),(pr||Br)&&ue.push(i.extendFlat({plotinfo:Ye},pr,Br))}}return Promise.resolve()},Y.runFn=function(_e){var Le,ze=W._fullLayout._basePlotModules,Ge=ue.length,Ve;if(se)for(Ve=0;Ve<ze.length;Ve++)ze[Ve].transitionAxes&&ze[Ve].transitionAxes(W,ue,oe,_e);Ge?(Le=i.extendFlat({},oe),Le.duration=0,delete ce.cartesian):Le=oe;for(var rt in ce){var pt=ce[rt],gt=W._fullData[pt[0]]._module;gt.basePlotModule.plot(W,pt,Le,_e)}},J(W,oe,Y)},T.transitionFromReact=function(W,ie,se,ee){var pe=W._fullLayout,oe=pe.transition,Y={},ce=[];return Y.prepareFn=function(){var ue=pe._plots;Y.redraw=!1,ie.anim==="some"&&(Y.redraw=!0),se.anim==="some"&&(Y.redraw=!0);for(var _e in ue){var Le=ue[_e],ze=Le.xaxis,Ge=Le.yaxis,Ve=ee[ze._name].range.slice(),rt=ee[Ge._name].range.slice(),pt=ze.range.slice(),gt=Ge.range.slice();ze.setScale(),Ge.setScale();var ht=null,lt=null;(ze.r2l(Ve[0])!==ze.r2l(pt[0])||ze.r2l(Ve[1])!==ze.r2l(pt[1]))&&(ht={xr0:Ve,xr1:pt}),(Ge.r2l(rt[0])!==Ge.r2l(gt[0])||Ge.r2l(rt[1])!==Ge.r2l(gt[1]))&&(lt={yr0:rt,yr1:gt}),(ht||lt)&&ce.push(i.extendFlat({plotinfo:Le},ht,lt))}return Promise.resolve()},Y.runFn=function(ue){for(var _e=W._fullData,Le=W._fullLayout,ze=Le._basePlotModules,Ge,Ve,rt,pt=[],gt=0;gt<_e.length;gt++)pt.push(gt);function ht(){if(W._fullLayout)for(var Fe=0;Fe<ze.length;Fe++)ze[Fe].transitionAxes&&ze[Fe].transitionAxes(W,ce,Ge,ue)}function lt(){if(W._fullLayout)for(var Fe=0;Fe<ze.length;Fe++)ze[Fe].plot(W,rt,Ve,ue)}ce.length&&ie.anim?oe.ordering==="traces first"?(Ge=i.extendFlat({},oe,{duration:0}),rt=pt,Ve=oe,setTimeout(ht,oe.duration),lt()):(Ge=oe,rt=null,Ve=i.extendFlat({},oe,{duration:0}),setTimeout(lt,Ge.duration),ht()):ce.length?(Ge=oe,ht()):ie.anim&&(rt=pt,Ve=oe,lt())},J(W,oe,Y)};function J(W,ie,se){var ee=!1;function pe(ze){var Ge=Promise.resolve();if(!ze)return Ge;for(;ze.length;)Ge=Ge.then(ze.shift());return Ge}function oe(ze){if(ze)for(;ze.length;)ze.shift()}function Y(){return W.emit("plotly_transitioning",[]),new Promise(function(ze){W._transitioning=!0,ie.duration>0&&(W._transitioningWithDuration=!0),W._transitionData._interruptCallbacks.push(function(){ee=!0}),se.redraw&&W._transitionData._interruptCallbacks.push(function(){return r.call("redraw",W)}),W._transitionData._interruptCallbacks.push(function(){W.emit("plotly_transitioninterrupted",[])});var Ge=0,Ve=0;function rt(){return Ge++,function(){Ve++,!ee&&Ve===Ge&&ce(ze)}}se.runFn(rt),setTimeout(rt())})}function ce(ze){if(W._transitionData)return oe(W._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(se.redraw)return r.call("redraw",W)}).then(function(){W._transitioning=!1,W._transitioningWithDuration=!1,W.emit("plotly_transitioned",[])}).then(ze)}function ue(){if(W._transitionData)return W._transitioning=!1,pe(W._transitionData._interruptCallbacks)}var _e=[T.previousPromises,ue,se.prepareFn,T.rehover,T.reselect,Y],Le=i.syncOrAsync(_e,W);return(!Le||!Le.then)&&(Le=Promise.resolve()),Le.then(function(){return W})}T.doCalcdata=function(W,ie){var se=u.list(W),ee=W._fullData,pe=W._fullLayout,oe,Y,ce,ue,_e=new Array(ee.length),Le=(W.calcdata||[]).slice();for(W.calcdata=_e,pe._numBoxes=0,pe._numViolins=0,pe._violinScaleGroupStats={},W._hmpixcount=0,W._hmlumcount=0,pe._piecolormap={},pe._sunburstcolormap={},pe._treemapcolormap={},pe._iciclecolormap={},pe._funnelareacolormap={},ce=0;ce<ee.length;ce++)if(Array.isArray(ie)&&ie.indexOf(ce)===-1){_e[ce]=Le[ce];continue}for(ce=0;ce<ee.length;ce++)oe=ee[ce],oe._arrayAttrs=a.findArrayAttributes(oe),oe._extremes={};var ze=pe._subplots.polar||[];for(ce=0;ce<ze.length;ce++)se.push(pe[ze[ce]].radialaxis,pe[ze[ce]].angularaxis);for(var Ge in pe._colorAxes){var Ve=pe[Ge];Ve.cauto!==!1&&(delete Ve.cmin,delete Ve.cmax)}var rt=!1;function pt(lt){if(oe=ee[lt],Y=oe._module,oe.visible===!0&&oe.transforms){if(Y&&Y.calc){var Fe=Y.calc(W,oe);Fe[0]&&Fe[0].t&&Fe[0].t._scene&&delete Fe[0].t._scene.dirty}for(ue=0;ue<oe.transforms.length;ue++){var Pe=oe.transforms[ue];Y=transformsRegistry[Pe.type],Y&&Y.calcTransform&&(oe._hasCalcTransform=!0,rt=!0,Y.calcTransform(W,oe,Pe))}}}function gt(lt,Fe){if(oe=ee[lt],Y=oe._module,!!Y.isContainer===Fe){var Pe=[];if(oe.visible===!0&&oe._length!==0){delete oe._indexToPoints;var be=oe.transforms||[];for(ue=be.length-1;ue>=0;ue--)if(be[ue].enabled){oe._indexToPoints=be[ue]._indexToPoints;break}Y&&Y.calc&&(Pe=Y.calc(W,oe))}(!Array.isArray(Pe)||!Pe[0])&&(Pe=[{x:o,y:o}]),Pe[0].t||(Pe[0].t={}),Pe[0].trace=oe,_e[lt]=Pe}}for(de(se,ee,pe),ce=0;ce<ee.length;ce++)gt(ce,!0);for(ce=0;ce<ee.length;ce++)pt(ce);for(rt&&de(se,ee,pe),ce=0;ce<ee.length;ce++)gt(ce,!0);for(ce=0;ce<ee.length;ce++)gt(ce,!1);me(W);var ht=ye(se,W);if(ht.length){for(pe._numBoxes=0,pe._numViolins=0,ce=0;ce<ht.length;ce++)gt(ht[ce],!0);for(ce=0;ce<ht.length;ce++)gt(ht[ce],!1);me(W)}r.getComponentMethod("fx","calc")(W),r.getComponentMethod("errorbars","calc")(W)};var le=/(total|sum|min|max|mean|geometric mean|median) (ascending|descending)/;function ye(W,ie){var se=[],ee,pe,oe,Y,ce;function ue(Jr,Dt,$e){var ot=Dt._id.charAt(0);if(Jr==="histogram2dcontour"){var De=Dt._counterAxes[0],Ee=u.getFromId(ie,De),Ae=ot==="x"||De==="x"&&Ee.type==="category",Ie=ot==="y"||De==="y"&&Ee.type==="category";return function(tt,st){return tt===0||st===0||Ae&&tt===$e[st].length-1||Ie&&st===$e.length-1?-1:(ot==="y"?st:tt)-1}}else return function(tt,st){return ot==="y"?st:tt}}var _e={min:function(Jr){return i.aggNums(Math.min,null,Jr)},max:function(Jr){return i.aggNums(Math.max,null,Jr)},sum:function(Jr){return i.aggNums(function(Dt,$e){return Dt+$e},null,Jr)},total:function(Jr){return i.aggNums(function(Dt,$e){return Dt+$e},null,Jr)},mean:function(Jr){return i.mean(Jr)},"geometric mean":function(Jr){return i.geometricMean(Jr)},median:function(Jr){return i.median(Jr)}};function Le(Jr,Dt){return Jr[1]-Dt[1]}function ze(Jr,Dt){return Dt[1]-Jr[1]}for(ee=0;ee<W.length;ee++){var Ge=W[ee];if(Ge.type==="category"){var Ve=Ge.categoryorder.match(le);if(Ve){var rt=Ve[1],pt=Ve[2],gt=Ge._id.charAt(0),ht=gt==="x",lt=[];for(pe=0;pe<Ge._categories.length;pe++)lt.push([Ge._categories[pe],[]]);for(pe=0;pe<Ge._traceIndices.length;pe++){var Fe=Ge._traceIndices[pe],Pe=ie._fullData[Fe];if(Pe.visible===!0){var be=Pe.type;r.traceIs(Pe,"histogram")&&(delete Pe._xautoBinFinished,delete Pe._yautoBinFinished);var Ye=be==="splom",mt=be==="scattergl",bt=ie.calcdata[Fe];for(oe=0;oe<bt.length;oe++){var ft=bt[oe],Wt,Zt;if(Ye){var cr=Pe._axesDim[Ge._id];if(!ht){var pr=Pe._diag[cr][0];pr&&(Ge=ie._fullLayout[u.id2name(pr)])}var Br=ft.trace.dimensions[cr].values;for(Y=0;Y<Br.length;Y++)for(Wt=Ge._categoriesMap[Br[Y]],ce=0;ce<ft.trace.dimensions.length;ce++)if(ce!==cr){var Fr=ft.trace.dimensions[ce];lt[Wt][1].push(Fr.values[Y])}}else if(mt){for(Y=0;Y<ft.t.x.length;Y++)ht?(Wt=ft.t.x[Y],Zt=ft.t.y[Y]):(Wt=ft.t.y[Y],Zt=ft.t.x[Y]),lt[Wt][1].push(Zt);ft.t&&ft.t._scene&&delete ft.t._scene.dirty}else if(ft.hasOwnProperty("z")){Zt=ft.z;var cn=ue(Pe.type,Ge,Zt);for(Y=0;Y<Zt.length;Y++)for(ce=0;ce<Zt[Y].length;ce++)Wt=cn(ce,Y),Wt+1&&lt[Wt][1].push(Zt[Y][ce])}else for(Wt=ft.p,Wt===void 0&&(Wt=ft[gt]),Zt=ft.s,Zt===void 0&&(Zt=ft.v),Zt===void 0&&(Zt=ht?ft.y:ft.x),Array.isArray(Zt)||(Zt===void 0?Zt=[]:Zt=[Zt]),Y=0;Y<Zt.length;Y++)lt[Wt][1].push(Zt[Y])}}}Ge._categoriesValue=lt;var Nr=[];for(pe=0;pe<lt.length;pe++)Nr.push([lt[pe][0],_e[rt](lt[pe][1])]);Nr.sort(pt==="descending"?ze:Le),Ge._categoriesAggregatedValue=Nr,Ge._initialCategories=Nr.map(function(Jr){return Jr[0]}),se=se.concat(Ge.sortByInitialCategories())}}}return se}function de(W,ie,se){var ee={};function pe(ue){ue.clearCalc(),ue.type==="multicategory"&&ue.setupMultiCategory(ie),ee[ue._id]=1}i.simpleMap(W,pe);for(var oe=se._axisMatchGroups||[],Y=0;Y<oe.length;Y++)for(var ce in oe[Y])ee[ce]||pe(se[u.id2name(ce)])}function me(W){var ie=W._fullLayout,se=ie._visibleModules,ee={},pe,oe,Y;for(oe=0;oe<se.length;oe++){var ce=se[oe],ue=ce.crossTraceCalc;if(ue){var _e=ce.basePlotModule.name;ee[_e]?i.pushUnique(ee[_e],ue):ee[_e]=[ue]}}for(Y in ee){var Le=ee[Y],ze=ie._subplots[Y];if(Array.isArray(ze))for(pe=0;pe<ze.length;pe++){var Ge=ze[pe],Ve=Y==="cartesian"?ie._plots[Ge]:ie[Ge];for(oe=0;oe<Le.length;oe++)Le[oe](W,Ve,Ge)}else for(oe=0;oe<Le.length;oe++)Le[oe](W)}}T.rehover=function(W){W._fullLayout._rehover&&W._fullLayout._rehover()},T.redrag=function(W){W._fullLayout._redrag&&W._fullLayout._redrag()},T.reselect=function(W){var ie=W._fullLayout,se=(W.layout||{}).selections,ee=ie._previousSelections;ie._previousSelections=se;var pe=ie._reselect||JSON.stringify(se)!==JSON.stringify(ee);r.getComponentMethod("selections","reselect")(W,pe)},T.generalUpdatePerTraceModule=function(W,ie,se,ee){var pe=ie.traceHash,oe={},Y;for(Y=0;Y<se.length;Y++){var ce=se[Y],ue=ce[0].trace;ue.visible&&(oe[ue.type]=oe[ue.type]||[],oe[ue.type].push(ce))}for(var _e in pe)if(!oe[_e]){var Le=pe[_e][0],ze=Le[0].trace;ze.visible=!1,oe[_e]=[Le]}for(var Ge in oe){var Ve=oe[Ge],rt=Ve[0][0].trace._module;rt.plot(W,ie,i.filterVisible(Ve),ee)}ie.traceHash=oe},T.plotBasePlot=function(W,ie,se,ee,pe){var oe=r.getModule(W),Y=E(ie.calcdata,oe)[0];oe.plot(ie,Y,ee,pe)},T.cleanBasePlot=function(W,ie,se,ee,pe){var oe=pe._has&&pe._has(W),Y=se._has&&se._has(W);oe&&!Y&&pe["_"+W+"layer"].selectAll("g.trace").remove()}}}),cp=Ne({"src/constants/xmlns_namespaces.js"(te){te.xmlns="http://www.w3.org/2000/xmlns/",te.svg="http://www.w3.org/2000/svg",te.xlink="http://www.w3.org/1999/xlink",te.svgAttrs={xmlns:te.svg,"xmlns:xlink":te.xlink}}}),bd=Ne({"src/constants/alignment.js"(te,Z){Z.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"}}}}),uc=Ne({"src/lib/svg_text_utils.js"(te){var Z=xn(),v=In(),w=v.strTranslate,C=cp(),P=bd().LINE_SPACING,t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;te.convertToTspans=function(q,z,H){var G=q.text(),J=!q.attr("data-notex")&&z&&z._context.typesetMath&&typeof MathJax<"u"&&G.match(t),le=Z.select(q.node().parentNode);if(le.empty())return;var ye=q.attr("class")?q.attr("class").split(" ")[0]:"text";ye+="-math",le.selectAll("svg."+ye).remove(),le.selectAll("g."+ye+"-group").remove(),q.style("display",null).attr({"data-unformatted":G,"data-math":"N"});function de(){le.empty()||(ye=q.attr("class")+"-math",le.select("svg."+ye).remove()),q.text("").style("white-space","pre");var me=D(q.node(),G);me&&q.style("pointer-events","all"),te.positionText(q),H&&H.call(q)}return J?(z&&z._promises||[]).push(new Promise(function(me){q.style("display","none");var W=parseInt(q.node().style.fontSize,10),ie={fontSize:W};s(J[2],ie,function(se,ee,pe){le.selectAll("svg."+ye).remove(),le.selectAll("g."+ye+"-group").remove();var oe=se&&se.select("svg");if(!oe||!oe.node()){de(),me();return}var Y=le.append("g").classed(ye+"-group",!0).attr({"pointer-events":"none","data-unformatted":G,"data-math":"Y"});Y.node().appendChild(oe.node()),ee&&ee.node()&&oe.node().insertBefore(ee.node().cloneNode(!0),oe.node().firstChild);var ce=pe.width,ue=pe.height;oe.attr({class:ye,height:ue,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var _e=q.node().style.fill||"black",Le=oe.select("g");Le.attr({fill:_e,stroke:_e});var ze=Le.node().getBoundingClientRect(),Ge=ze.width,Ve=ze.height;(Ge>ce||Ve>ue)&&(oe.style("overflow","hidden"),ze=oe.node().getBoundingClientRect(),Ge=ze.width,Ve=ze.height);var rt=+q.attr("x"),pt=+q.attr("y"),gt=W||q.node().getBoundingClientRect().height,ht=-gt/4;if(ye[0]==="y")Y.attr({transform:"rotate("+[-90,rt,pt]+")"+w(-Ge/2,ht-Ve/2)});else if(ye[0]==="l")pt=ht-Ve/2;else if(ye[0]==="a"&&ye.indexOf("atitle")!==0)rt=0,pt=ht;else{var lt=q.attr("text-anchor");rt=rt-Ge*(lt==="middle"?.5:lt==="end"?1:0),pt=pt+ht-Ve/2}oe.attr({x:rt,y:pt}),H&&H.call(q,Y),me(Y)})})):de(),q};var r=/(<|&lt;|&#60;)/g,a=/(>|&gt;|&#62;)/g;function l(q){return q.replace(r,"\\lt ").replace(a,"\\gt ")}var i=[["$","$"],["\\(","\\)"]];function s(q,z,H){var G=parseInt((MathJax.version||"").split(".")[0]);if(G!==2&&G!==3){v.warn("No MathJax version:",MathJax.version);return}var J,le,ye,de,me=function(){return le=v.extendDeepAll({},MathJax.Hub.config),ye=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:i},displayAlign:"left"})},W=function(){le=v.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=i},ie=function(){if(J=MathJax.Hub.config.menuSettings.renderer,J!=="SVG")return MathJax.Hub.setRenderer("SVG")},se=function(){J=MathJax.config.startup.output,J!=="svg"&&(MathJax.config.startup.output="svg")},ee=function(){var _e="math-output-"+v.randstr({},64);de=Z.select("body").append("div").attr({id:_e}).style({visibility:"hidden",position:"absolute","font-size":z.fontSize+"px"}).text(l(q));var Le=de.node();return G===2?MathJax.Hub.Typeset(Le):MathJax.typeset([Le])},pe=function(){var _e=de.select(G===2?".MathJax_SVG":".MathJax"),Le=!_e.empty()&&de.select("svg").node();if(!Le)v.log("There was an error in the tex syntax.",q),H();else{var ze=Le.getBoundingClientRect(),Ge;G===2?Ge=Z.select("body").select("#MathJax_SVG_glyphs"):Ge=_e.select("defs"),H(_e,Ge,ze)}de.remove()},oe=function(){if(J!=="SVG")return MathJax.Hub.setRenderer(J)},Y=function(){J!=="svg"&&(MathJax.config.startup.output=J)},ce=function(){return ye!==void 0&&(MathJax.Hub.processSectionDelay=ye),MathJax.Hub.Config(le)},ue=function(){MathJax.config=le};G===2?MathJax.Hub.Queue(me,ie,ee,pe,oe,ce):G===3&&(W(),se(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){ee(),pe(),Y(),ue()}))}var o={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"},u={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},h="​",y=["http:","https:","mailto:","",void 0,":"],m=te.NEWLINES=/(\r\n?|\n)/g,E=/(<[^<>]*>)/,c=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=/<br(\s+.*)?>/i;te.BR_TAG_ALL=/<br(\s+.*)?>/gi;var T=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,b=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(q,z){if(!q)return null;var H=q.match(z),G=H&&(H[3]||H[4]);return G&&x(G)}var g=/(^|;)\s*color:/;te.plainText=function(q,z){z=z||{};for(var H=z.len!==void 0&&z.len!==-1?z.len:1/0,G=z.allowedTags!==void 0?z.allowedTags:["br"],J="...",le=J.length,ye=q.split(E),de=[],me="",W=0,ie=0;ie<ye.length;ie++){var se=ye[ie],ee=se.match(c),pe=ee&&ee[2].toLowerCase();if(pe)G.indexOf(pe)!==-1&&(de.push(se),me=pe);else{var oe=se.length;if(W+oe<H)de.push(se),W+=oe;else if(W<H){var Y=H-W;me&&(me!=="br"||Y<=le||oe<=le)&&de.pop(),H>le?de.push(se.substr(0,Y-le)+J):de.push(se.substr(0,Y));break}me=""}}return de.join("")};var f={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},p=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function x(q){return q.replace(p,function(z,H){var G;return H.charAt(0)==="#"?G=N(H.charAt(1)==="x"?parseInt(H.substr(2),16):parseInt(H.substr(1),10)):G=f[H],G||z})}te.convertEntities=x;function N(q){if(!(q>1114111)){var z=String.fromCodePoint;if(z)return z(q);var H=String.fromCharCode;return q<=65535?H(q):H((q>>10)+55232,q%1024+56320)}}function D(q,z){z=z.replace(m," ");var H=!1,G=[],J,le=-1;function ye(){le++;var Ve=document.createElementNS(C.svg,"tspan");Z.select(Ve).attr({class:"line",dy:le*P+"em"}),q.appendChild(Ve),J=Ve;var rt=G;if(G=[{node:Ve}],rt.length>1)for(var pt=1;pt<rt.length;pt++)de(rt[pt])}function de(Ve){var rt=Ve.type,pt={},gt;if(rt==="a"){gt="a";var ht=Ve.target,lt=Ve.href,Fe=Ve.popup;lt&&(pt={"xlink:xlink:show":ht==="_blank"||ht.charAt(0)!=="_"?"new":"replace",target:ht,"xlink:xlink:href":lt},Fe&&(pt.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+Fe+'");return false;'))}else gt="tspan";Ve.style&&(pt.style=Ve.style);var Pe=document.createElementNS(C.svg,gt);if(rt==="sup"||rt==="sub"){me(J,h),J.appendChild(Pe);var be=document.createElementNS(C.svg,"tspan");me(be,h),Z.select(be).attr("dy",d[rt]),pt.dy=u[rt],J.appendChild(Pe),J.appendChild(be)}else J.appendChild(Pe);Z.select(Pe).attr(pt),J=Ve.node=Pe,G.push(Ve)}function me(Ve,rt){Ve.appendChild(document.createTextNode(rt))}function W(Ve){if(G.length===1){v.log("Ignoring unexpected end tag </"+Ve+">.",z);return}var rt=G.pop();Ve!==rt.type&&v.log("Start tag <"+rt.type+"> doesnt match end tag <"+Ve+">. Pretending it did match.",z),J=G[G.length-1].node}var ie=_.test(z);ie?ye():(J=q,G=[{node:q}]);for(var se=z.split(E),ee=0;ee<se.length;ee++){var pe=se[ee],oe=pe.match(c),Y=oe&&oe[2].toLowerCase(),ce=o[Y];if(Y==="br")ye();else if(ce===void 0)me(J,x(pe));else if(oe[1])W(Y);else{var ue=oe[4],_e={type:Y},Le=A(ue,T);if(Le?(Le=Le.replace(g,"$1 fill:"),ce&&(Le+=";"+ce)):ce&&(Le=ce),Le&&(_e.style=Le),Y==="a"){H=!0;var ze=A(ue,M);if(ze){var Ge=B(ze);Ge&&(_e.href=Ge,_e.target=A(ue,k)||"_blank",_e.popup=A(ue,b))}}de(_e)}}return H}function B(q){var z=encodeURI(decodeURI(q)),H=document.createElement("a"),G=document.createElement("a");H.href=q,G.href=z;var J=H.protocol,le=G.protocol;return y.indexOf(J)!==-1&&y.indexOf(le)!==-1?z:""}te.sanitizeHTML=function(z){z=z.replace(m," ");for(var H=document.createElement("p"),G=H,J=[],le=z.split(E),ye=0;ye<le.length;ye++){var de=le[ye],me=de.match(c),W=me&&me[2].toLowerCase();if(W in o)if(me[1])J.length&&(G=J.pop());else{var ie=me[4],se=A(ie,T),ee=se?{style:se}:{};if(W==="a"){var pe=A(ie,M);if(pe){var oe=B(pe);if(oe){ee.href=oe;var Y=A(ie,k);Y&&(ee.target=Y)}}}var ce=document.createElement(W);G.appendChild(ce),Z.select(ce).attr(ee),G=ce,J.push(ce)}else G.appendChild(document.createTextNode(x(de)))}var ue="innerHTML";return H[ue]},te.lineCount=function(z){return z.selectAll("tspan.line").size()||1},te.positionText=function(z,H,G){return z.each(function(){var J=Z.select(this);function le(me,W){return W===void 0?(W=J.attr(me),W===null&&(J.attr(me,0),W=0)):J.attr(me,W),W}var ye=le("x",H),de=le("y",G);this.nodeName==="text"&&J.selectAll("tspan.line").attr({x:ye,y:de})})};function U(q,z,H){var G=H.horizontalAlign,J=H.verticalAlign||"top",le=q.node().getBoundingClientRect(),ye=z.node().getBoundingClientRect(),de,me,W;return J==="bottom"?me=function(){return le.bottom-de.height}:J==="middle"?me=function(){return le.top+(le.height-de.height)/2}:me=function(){return le.top},G==="right"?W=function(){return le.right-de.width}:G==="center"?W=function(){return le.left+(le.width-de.width)/2}:W=function(){return le.left},function(){de=this.node().getBoundingClientRect();var ie=W()-ye.left,se=me()-ye.top,ee=H.gd||{};if(H.gd){ee._fullLayout._calcInverseTransform(ee);var pe=v.apply3DTransform(ee._fullLayout._invTransform)(ie,se);ie=pe[0],se=pe[1]}return this.style({top:se+"px",left:ie+"px","z-index":1e3}),this}}var V="1px ";te.makeTextShadow=function(q){var z=V,H=V,G=V;return z+H+G+q+", -"+z+"-"+H+G+q+", "+z+"-"+H+G+q+", -"+z+H+G+q},te.makeEditable=function(q,z){var H=z.gd,G=z.delegate,J=Z.dispatch("edit","input","cancel"),le=G||q;if(q.style({"pointer-events":G?"none":"all"}),q.size()!==1)throw new Error("boo");function ye(){me(),q.style({opacity:0});var W=le.attr("class"),ie;W?ie="."+W.split(" ")[0]+"-math-group":ie="[class*=-math-group]",ie&&Z.select(q.node().parentNode).select(ie).style({opacity:0})}function de(W){var ie=W.node(),se=document.createRange();se.selectNodeContents(ie);var ee=window.getSelection();ee.removeAllRanges(),ee.addRange(se),ie.focus()}function me(){var W=Z.select(H),ie=W.select(".svg-container"),se=ie.append("div"),ee=q.node().style,pe=parseFloat(ee.fontSize||12),oe=z.text;oe===void 0&&(oe=q.attr("data-unformatted")),se.classed("plugin-editable editable",!0).style({position:"absolute","font-family":ee.fontFamily||"Arial","font-size":pe,color:z.fill||ee.fill||"black",opacity:1,"background-color":z.background||"transparent",outline:"#ffffff33 1px solid",margin:[-pe/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(oe).call(U(q,ie,z)).on("blur",function(){H._editing=!1,q.text(this.textContent).style({opacity:1});var Y=Z.select(this).attr("class"),ce;Y?ce="."+Y.split(" ")[0]+"-math-group":ce="[class*=-math-group]",ce&&Z.select(q.node().parentNode).select(ce).style({opacity:0});var ue=this.textContent;Z.select(this).transition().duration(0).remove(),Z.select(document).on("mouseup",null),J.edit.call(q,ue)}).on("focus",function(){var Y=this;H._editing=!0,Z.select(document).on("mouseup",function(){if(Z.event.target===Y)return!1;document.activeElement===se.node()&&se.node().blur()})}).on("keyup",function(){Z.event.which===27?(H._editing=!1,q.style({opacity:1}),Z.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),J.cancel.call(q,this.textContent)):(J.input.call(q,this.textContent),Z.select(this).call(U(q,ie,z)))}).on("keydown",function(){Z.event.which===13&&this.blur()}).call(de)}return z.immediate?ye():le.on("click",ye),Z.rebind(q,J,"on")}}}),Od=Ne({"src/components/colorscale/helpers.js"(te,Z){var v=xn(),w=Ro(),C=la(),P=In(),t=io(),r=Do().isValid;function a(m,E,c){var _=E?P.nestedProperty(m,E).get()||{}:m,T=_[c||"color"];T&&T._inputArray&&(T=T._inputArray);var M=!1;if(P.isArrayOrTypedArray(T)){for(var k=0;k<T.length;k++)if(C(T[k])){M=!0;break}}return P.isPlainObject(_)&&(M||_.showscale===!0||C(_.cmin)&&C(_.cmax)||r(_.colorscale)||P.isPlainObject(_.colorbar))}var l=["showscale","autocolorscale","colorscale","reversescale","colorbar"],i=["min","max","mid","auto"];function s(m){var E=m._colorAx,c=E||m,_={},T,M,k;for(M=0;M<l.length;M++)k=l[M],_[k]=c[k];if(E)for(T="c",M=0;M<i.length;M++)k=i[M],_[k]=c["c"+k];else{var b;for(M=0;M<i.length;M++){if(k=i[M],b="c"+k,b in c){_[k]=c[b];continue}b="z"+k,b in c&&(_[k]=c[b])}T=b.charAt(0)}return _._sync=function(A,g){var f=i.indexOf(A)!==-1?T+A:A;c[f]=c["_"+f]=g},_}function o(m){for(var E=s(m),c=E.min,_=E.max,T=E.reversescale?u(E.colorscale):E.colorscale,M=T.length,k=new Array(M),b=new Array(M),A=0;A<M;A++){var g=T[A];k[A]=c+g[0]*(_-c),b[A]=g[1]}return{domain:k,range:b}}function u(m){for(var E=m.length,c=new Array(E),_=E-1,T=0;_>=0;_--,T++){var M=m[_];c[T]=[1-M[0],M[1]]}return c}function d(m,E){E=E||{};for(var c=m.domain,_=m.range,T=_.length,M=new Array(T),k=0;k<T;k++){var b=w(_[k]).toRgb();M[k]=[b.r,b.g,b.b,b.a]}var A=v.scale.linear().domain(c).range(M).clamp(!0),g=E.noNumericCheck,f=E.returnArray,p;return g&&f?p=A:g?p=function(x){return y(A(x))}:f?p=function(x){return C(x)?A(x):w(x).isValid()?x:t.defaultLine}:p=function(x){return C(x)?y(A(x)):w(x).isValid()?x:t.defaultLine},p.domain=A.domain,p.range=function(){return _},p}function h(m,E){return d(o(m),E)}function y(m){var E={r:m[0],g:m[1],b:m[2],a:m[3]};return w(E).toRgbString()}Z.exports={hasColorscale:a,extractOpts:s,extractScale:o,flipScale:u,makeColorScaleFunc:d,makeColorScaleFuncFromTrace:h}}}),bc=Ne({"src/plots/cartesian/axis_format_attributes.js"(te,Z){var v=D0(),w=v.FORMAT_LINK,C=v.DATE_FORMAT_LINK;function P(a,l){return{valType:"string",dflt:"",editType:"none",description:(l?t:r)("hover text",a)+["By default the values are formatted using "+(l?"generic number format":"`"+a+"axis.hoverformat`")+"."].join(" ")}}function t(a,l){return["Sets the "+a+" formatting rule"+(l?"for `"+l+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+w+"."].join(" ")}function r(a,l){return t(a,l)+[" And for dates see: "+C+".","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(" ")}Z.exports={axisHoverFormat:P,descriptionOnlyNumbers:t,descriptionWithDates:r}}}),wd=Ne({"src/plots/cartesian/layout_attributes.js"(te,Z){var v=$o(),w=lu(),C=Dd().dash,P=co().extendFlat,t=Tu().templatedArray;Il().templateFormatStringDescription;var r=bc().descriptionWithDates,a=ja().ONEDAY,l=xh(),i=l.HOUR_PATTERN,s=l.WEEKDAY_PATTERN,o={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},u=P({},o,{values:o.values.slice().concat(["sync"])});function d(g){return{valType:"integer",min:0,dflt:g?5:0,editType:"ticks"}}var h={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},y={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},m={valType:"data_array",editType:"ticks"},E={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function c(g){var f={valType:"number",min:0,editType:"ticks"};return g||(f.dflt=5),f}function _(g){var f={valType:"number",min:0,editType:"ticks"};return g||(f.dflt=1),f}var T={valType:"color",dflt:w.defaultLine,editType:"ticks"},M={valType:"color",dflt:w.lightLine,editType:"ticks"};function k(g){var f={valType:"number",min:0,editType:"ticks"};return g||(f.dflt=1),f}var b=P({},C,{editType:"ticks"}),A={valType:"boolean",editType:"ticks"};Z.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:w.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:v({editType:"ticks"}),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:[l.idRegex.x.toString(),l.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:[l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"calc"},rangebreaks:t("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:[s,i,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:a},editType:"calc"}),tickmode:u,nticks:d(),tick0:h,dtick:y,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:m,ticktext:{valType:"data_array",editType:"ticks"},ticks:E,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:c(),tickwidth:_(),tickcolor:T,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:P({},C,{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:v({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:r("tick label")},tickformatstops:t("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:r("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:w.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:A,gridcolor:M,gridwidth:k(),griddash:b,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:w.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:w.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",l.idRegex.x.toString(),l.idRegex.y.toString()],editType:"plot"},minor:{tickmode:o,nticks:d("minor"),tick0:h,dtick:y,tickvals:m,ticks:E,ticklen:c("minor"),tickwidth:_("minor"),tickcolor:T,gridcolor:M,gridwidth:k("minor"),griddash:b,showgrid:A,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"}}}),wx=Ne({"src/components/colorbar/attributes.js"(te,Z){var v=wd(),w=$o(),C=co().extendFlat,P=Kc().overrideAll;Z.exports=P({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:v.linecolor,outlinewidth:v.linewidth,bordercolor:v.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:C({},v.ticks,{dflt:""}),ticklabeloverflow:C({},v.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:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,ticklabelstep:v.ticklabelstep,showticklabels:v.showticklabels,labelalias:v.labelalias,tickfont:w({}),tickangle:v.tickangle,tickformat:v.tickformat,tickformatstops:v.tickformatstops,tickprefix:v.tickprefix,showtickprefix:v.showtickprefix,ticksuffix:v.ticksuffix,showticksuffix:v.showticksuffix,separatethousands:v.separatethousands,exponentformat:v.exponentformat,minexponent:v.minexponent,showexponent:v.showexponent,title:{text:{valType:"string"},font:w({}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")}}),Vu=Ne({"src/components/colorscale/attributes.js"(te,Z){var v=wx(),w=sf().counter,C=Sm(),P=Do().scales;C(P),Z.exports=function(r,a){r=r||"",a=a||{};var l=a.cLetter||"c";"onlyIfNumerical"in a&&a.onlyIfNumerical;var i="noScale"in a?a.noScale:r==="marker.line",s="showScaleDflt"in a?a.showScaleDflt:l==="z",o=typeof a.colorscaleDflt=="string"?P[a.colorscaleDflt]:null,u=a.editTypeOverride||"",d;"colorAttr"in a?(d=a.colorAttr,a.colorAttr):d={z:"z",c:"color"}[l];var h=l+"auto",y=l+"min",m=l+"max",E=l+"mid",c={};c[y]=c[m]=void 0;var _={};_[h]=!1;var T={};return d==="color"&&(T.color={valType:"color",arrayOk:!0,editType:u||"style"},a.anim&&(T.color.anim=!0)),T[h]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:c},T[y]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},T[m]={valType:"number",dflt:null,editType:u||"plot",impliedEdits:_},T[E]={valType:"number",dflt:null,editType:"calc",impliedEdits:c},T.colorscale={valType:"colorscale",editType:"calc",dflt:o,impliedEdits:{autocolorscale:!1}},T.autocolorscale={valType:"boolean",dflt:a.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},T.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(T.showscale={valType:"boolean",dflt:s,editType:"calc"},T.colorbar=v),a.noColorAxis||(T.coloraxis={valType:"subplotid",regex:w("coloraxis"),dflt:null,editType:"calc"}),T}}}),wg=Ne({"src/components/colorscale/layout_attributes.js"(te,Z){var v=co().extendFlat,w=Vu(),C=Do().scales;Z.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:C.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:C.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:C.RdBu,editType:"calc"}},coloraxis:v({_isSubplotObj:!0,editType:"calc"},w("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}}}),tA=Ne({"src/components/colorbar/has_colorbar.js"(te,Z){var v=In();Z.exports=function(C){return v.isPlainObject(C.colorbar)}}}),Pw=Ne({"src/plots/cartesian/clean_ticks.js"(te){var Z=la(),v=In(),w=ja(),C=w.ONEDAY,P=w.ONEWEEK;te.dtick=function(t,r){var a=r==="log",l=r==="date",i=r==="category",s=l?C:1;if(!t)return s;if(Z(t))return t=Number(t),t<=0?s:i?Math.max(1,Math.round(t)):l?Math.max(.1,t):t;if(typeof t!="string"||!(l||a))return s;var o=t.charAt(0),u=t.substr(1);return u=Z(u)?Number(u):0,u<=0||!(l&&o==="M"&&u===Math.round(u)||a&&o==="L"||a&&o==="D"&&(u===1||u===2))?s:t},te.tick0=function(t,r,a,l){if(r==="date")return v.cleanDate(t,v.dateTick0(a,l%P===0?1:0));if(!(l==="D1"||l==="D2"))return Z(t)?Number(t):0}}}),Tg=Ne({"src/plots/cartesian/tick_value_defaults.js"(te,Z){var v=Pw(),w=In().isArrayOrTypedArray,C=vi().isTypedArraySpec,P=vi().decodeTypedArraySpec;Z.exports=function(r,a,l,i,s){s||(s={});var o=s.isMinor,u=o?r.minor||{}:r,d=o?a.minor:a,h=o?"minor.":"";function y(b){var A=u[b];return C(A)&&(A=P(A)),A!==void 0?A:(d._template||{})[b]}var m=y("tick0"),E=y("dtick"),c=y("tickvals"),_=w(c)?"array":E?"linear":"auto",T=l(h+"tickmode",_);if(T==="auto"||T==="sync")l(h+"nticks");else if(T==="linear"){var M=d.dtick=v.dtick(E,i);d.tick0=v.tick0(m,i,a.calendar,M)}else if(i!=="multicategory"){var k=l(h+"tickvals");k===void 0?d.tickmode="auto":o||l("ticktext")}}}}),B0=Ne({"src/plots/cartesian/tick_mark_defaults.js"(te,Z){var v=In(),w=wd();Z.exports=function(P,t,r,a){var l=a.isMinor,i=l?P.minor||{}:P,s=l?t.minor:t,o=l?w.minor:w,u=l?"minor.":"",d=v.coerce2(i,s,o,"ticklen",l?(t.ticklen||5)*.6:void 0),h=v.coerce2(i,s,o,"tickwidth",l?t.tickwidth||1:void 0),y=v.coerce2(i,s,o,"tickcolor",(l?t.tickcolor:void 0)||s.color),m=r(u+"ticks",!l&&a.outerTicks||d||h||y?"outside":"");m||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}}}),n0=Ne({"src/plots/cartesian/show_dflt.js"(te,Z){Z.exports=function(w){var C=["showexponent","showtickprefix","showticksuffix"],P=C.filter(function(r){return w[r]!==void 0}),t=function(r){return w[r]===w[P[0]]};if(P.every(t)||P.length===1)return w[P[0]]}}}),zd=Ne({"src/plots/array_container_defaults.js"(te,Z){var v=In(),w=Tu();Z.exports=function(P,t,r){var a=r.name,l=r.inclusionAttr||"visible",i=t[a],s=v.isArrayOrTypedArray(P[a])?P[a]:[],o=t[a]=[],u=w.arrayTemplater(t,a,l),d,h;for(d=0;d<s.length;d++){var y=s[d];v.isPlainObject(y)?h=u.newItem(y):(h=u.newItem({}),h[l]=!1),h._index=d,h[l]!==!1&&r.handleItemDefaults(y,h,t,r),o.push(h)}var m=u.defaultItems();for(d=0;d<m.length;d++)h=m[d],h._index=o.length,r.handleItemDefaults({},h,t,r,{}),o.push(h);if(v.isArrayOrTypedArray(i)){var E=Math.min(i.length,o.length);for(d=0;d<E;d++)v.relinkPrivateKeys(o[d],i[d])}return o}}}),Em=Ne({"src/plots/cartesian/tick_label_defaults.js"(te,Z){var v=In(),w=io().contrast,C=wd(),P=n0(),t=zd();Z.exports=function(l,i,s,o,u){u||(u={});var d=s("labelalias");v.isPlainObject(d)||delete i.labelalias;var h=P(l),y=s("showticklabels");if(y){u.noTicklabelshift||s("ticklabelshift"),u.noTicklabelstandoff||s("ticklabelstandoff");var m=u.font||{},E=i.color,c=i.ticklabelposition||"",_=c.indexOf("inside")!==-1?w(u.bgColor):E&&E!==C.color.dflt?E:m.color;if(v.coerceFont(s,"tickfont",m,{overrideDflt:{color:_}}),!u.noTicklabelstep&&o!=="multicategory"&&o!=="log"&&s("ticklabelstep"),!u.noAng){var T=s("tickangle");!u.noAutotickangles&&T==="auto"&&s("autotickangles")}if(o!=="category"){var M=s("tickformat");t(l,i,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:r}),i.tickformatstops.length||delete i.tickformatstops,!u.noExp&&!M&&o!=="date"&&(s("showexponent",h),s("exponentformat"),s("minexponent"),s("separatethousands"))}!u.noMinorloglabels&&o==="log"&&s("minorloglabels")}};function r(a,l){function i(o,u){return v.coerce(a,l,C.tickformatstops,o,u)}var s=i("enabled");s&&(i("dtickrange"),i("value"))}}}),fp=Ne({"src/plots/cartesian/prefix_suffix_defaults.js"(te,Z){var v=n0();Z.exports=function(C,P,t,r,a){a||(a={});var l=a.tickSuffixDflt,i=v(C),s=t("tickprefix");s&&t("showtickprefix",i);var o=t("ticksuffix",l);o&&t("showticksuffix",i)}}}),Lw=Ne({"src/components/colorbar/defaults.js"(te,Z){var v=In(),w=Tu(),C=Tg(),P=B0(),t=Em(),r=fp(),a=wx();Z.exports=function(i,s,o){var u=w.newContainer(s,"colorbar"),d=i.colorbar||{};function h(z,H){return v.coerce(d,u,a,z,H)}var y=o.margin||{t:0,b:0,l:0,r:0},m=o.width-y.l-y.r,E=o.height-y.t-y.b,c=h("orientation"),_=c==="v",T=h("thicknessmode");h("thickness",T==="fraction"?30/(_?m:E):30);var M=h("lenmode");h("len",M==="fraction"?1:_?E:m);var k=h("yref"),b=h("xref"),A=k==="paper",g=b==="paper",f,p,x,N="left";_?(x="middle",N=g?"left":"right",f=g?1.02:1,p=.5):(x=A?"bottom":"top",N="center",f=.5,p=A?1.02:1),v.coerce(d,u,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:f}},"x"),v.coerce(d,u,{y:{valType:"number",min:A?-2:0,max:A?3:1,dflt:p}},"y"),h("xanchor",N),h("xpad"),h("yanchor",x),h("ypad"),v.noneOrAll(d,u,["x","y"]),h("outlinecolor"),h("outlinewidth"),h("bordercolor"),h("borderwidth"),h("bgcolor");var D=v.coerce(d,u,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:_?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");h("ticklabeloverflow",D.indexOf("inside")!==-1?"hide past domain":"hide past div"),C(d,u,h,"linear");var B=o.font,U={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:B};D.indexOf("inside")!==-1&&(U.bgColor="black"),r(d,u,h,"linear",U),t(d,u,h,"linear",U),P(d,u,h,"linear",U),h("title.text",o._dfltTitle.colorbar);var V=u.showticklabels?u.tickfont:B,q=v.extendFlat({},B,{family:V.family,size:v.bigFont(V.size)});v.coerceFont(h,"title.font",q),h("title.side",_?"top":"right")}}}),Ph=Ne({"src/components/colorscale/defaults.js"(te,Z){var v=la(),w=In(),C=tA(),P=Lw(),t=Do().isValid,r=Xo().traceIs;function a(l,i){var s=i.slice(0,i.length-1);return i?w.nestedProperty(l,s).get()||{}:l}Z.exports=function l(i,s,o,u,d){var h=d.prefix,y=d.cLetter,m="_module"in s,E=a(i,h),c=a(s,h),_=a(s._template||{},h)||{},T=function(){return delete i.coloraxis,delete s.coloraxis,l(i,s,o,u,d)};if(m){var M=o._colorAxes||{},k=u(h+"coloraxis");if(k){var b=r(s,"contour")&&w.nestedProperty(s,"contours.coloring").get()||"heatmap",A=M[k];A?(A[2].push(T),A[0]!==b&&(A[0]=!1,w.warn(["Ignoring coloraxis:",k,"setting","as it is linked to incompatible colorscales."].join(" ")))):M[k]=[b,s,[T]];return}}var g=E[y+"min"],f=E[y+"max"],p=v(g)&&v(f)&&g<f,x=u(h+y+"auto",!p);x?u(h+y+"mid"):(u(h+y+"min"),u(h+y+"max"));var N=E.colorscale,D=_.colorscale,B;if(N!==void 0&&(B=!t(N)),D!==void 0&&(B=!t(D)),u(h+"autocolorscale",B),u(h+"colorscale"),u(h+"reversescale"),h!=="marker.line."){var U;h&&m&&(U=C(E));var V=u(h+"showscale",U);V&&(h&&_&&(c._template=_),P(E,c,o))}}}}),eM=Ne({"src/components/colorscale/layout_defaults.js"(te,Z){var v=In(),w=Tu(),C=wg(),P=Ph();Z.exports=function(r,a){function l(m,E){return v.coerce(r,a,C,m,E)}l("colorscale.sequential"),l("colorscale.sequentialminus"),l("colorscale.diverging");var i=a._colorAxes,s,o;function u(m,E){return v.coerce(s,o,C.coloraxis,m,E)}for(var d in i){var h=i[d];if(h[0])s=r[d]||{},o=w.newContainer(a,d,"coloraxis"),o._name=d,P(s,o,a,u,{prefix:"",cLetter:"c"});else{for(var y=0;y<h[2].length;y++)h[2][y]();delete a._colorAxes[d]}}}}}),Rw=Ne({"src/components/colorscale/cross_trace_defaults.js"(te,Z){var v=In(),w=Od().hasColorscale,C=Od().extractOpts;Z.exports=function(t,r){function a(h,y){var m=h["_"+y];m!==void 0&&(h[y]=m)}function l(h,y){var m=y.container?v.nestedProperty(h,y.container).get():h;if(m)if(m.coloraxis)m._colorAx=r[m.coloraxis];else{var E=C(m),c=E.auto;(c||E.min===void 0)&&a(m,y.min),(c||E.max===void 0)&&a(m,y.max),E.autocolorscale&&a(m,"colorscale")}}for(var i=0;i<t.length;i++){var s=t[i],o=s._module.colorbar;if(o)if(Array.isArray(o))for(var u=0;u<o.length;u++)l(s,o[u]);else l(s,o);w(s,"marker.line")&&l(s,{container:"marker.line",min:"cmin",max:"cmax"})}for(var d in r._colorAxes)l(r[d],{min:"cmin",max:"cmax"})}}}),Nd=Ne({"src/components/colorscale/calc.js"(te,Z){var v=la(),w=In(),C=Od().extractOpts;Z.exports=function(t,r,a){var l=t._fullLayout,i=a.vals,s=a.containerStr,o=s?w.nestedProperty(r,s).get():r,u=C(o),d=u.auto!==!1,h=u.min,y=u.max,m=u.mid,E=function(){return w.aggNums(Math.min,null,i)},c=function(){return w.aggNums(Math.max,null,i)};if(h===void 0?h=E():d&&(o._colorAx&&v(h)?h=Math.min(h,E()):h=E()),y===void 0?y=c():d&&(o._colorAx&&v(y)?y=Math.max(y,c()):y=c()),d&&m!==void 0&&(y-m>m-h?h=m-(y-m):y-m<m-h&&(y=m+(m-h))),h===y&&(h-=.5,y+=.5),u._sync("min",h),u._sync("max",y),u.autocolorscale){var _;h*y<0?_=l.colorscale.diverging:h>=0?_=l.colorscale.sequential:_=l.colorscale.sequentialminus,u._sync("colorscale",_)}}}}),Dc=Ne({"src/components/colorscale/index.js"(te,Z){var v=Do(),w=Od();Z.exports={moduleType:"component",name:"colorscale",attributes:Vu(),layoutAttributes:wg(),supplyLayoutDefaults:eM(),handleDefaults:Ph(),crossTraceDefaults:Rw(),calc:Nd(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:w.hasColorscale,extractOpts:w.extractOpts,extractScale:w.extractScale,flipScale:w.flipScale,makeColorScaleFunc:w.makeColorScaleFunc,makeColorScaleFuncFromTrace:w.makeColorScaleFuncFromTrace}}}),vu=Ne({"src/traces/scatter/subtypes.js"(te,Z){var v=In(),w=vi().isTypedArraySpec;Z.exports={hasLines:function(C){return C.visible&&C.mode&&C.mode.indexOf("lines")!==-1},hasMarkers:function(C){return C.visible&&(C.mode&&C.mode.indexOf("markers")!==-1||C.type==="splom")},hasText:function(C){return C.visible&&C.mode&&C.mode.indexOf("text")!==-1},isBubble:function(C){var P=C.marker;return v.isPlainObject(P)&&(v.isArrayOrTypedArray(P.size)||w(P.size))}}}}),Mm=Ne({"src/traces/scatter/make_bubble_size_func.js"(te,Z){var v=la();Z.exports=function(C,P){P||(P=2);var t=C.marker,r=t.sizeref||1,a=t.sizemin||0,l=t.sizemode==="area"?function(i){return Math.sqrt(i/r)}:function(i){return i/r};return function(i){var s=l(i/P);return v(s)&&s>0?Math.max(s,a):0}}}}),_v=Ne({"src/components/fx/helpers.js"(te){var Z=In();te.getSubplot=function(r){return r.subplot||r.xaxis+r.yaxis||r.geo},te.isTraceInSubplots=function(r,a){if(r.type==="splom"){for(var l=r.xaxes||[],i=r.yaxes||[],s=0;s<l.length;s++)for(var o=0;o<i.length;o++)if(a.indexOf(l[s]+i[o])!==-1)return!0;return!1}return a.indexOf(te.getSubplot(r))!==-1},te.flat=function(r,a){for(var l=new Array(r.length),i=0;i<r.length;i++)l[i]=a;return l},te.p2c=function(r,a){for(var l=new Array(r.length),i=0;i<r.length;i++)l[i]=r[i].p2c(a);return l},te.getDistanceFunction=function(r,a,l,i){return r==="closest"?i||te.quadrature(a,l):r.charAt(0)==="x"?a:l},te.getClosest=function(r,a,l){if(l.index!==!1)l.index>=0&&l.index<r.length?l.distance=0:l.index=!1;else for(var i=1/0,s=r.length,o=0;o<s;o++)i=a(r[o]),i<=l.distance&&(l.index=o,l.distance=i);return l},te.inbox=function(r,a,l){return r*a<0||r===0?l:1/0},te.quadrature=function(r,a){return function(l){var i=r(l),s=a(l);return Math.sqrt(i*i+s*s)}},te.makeEventData=function(r,a,l){var i="index"in r?r.index:r.pointNumber,s={data:a._input,fullData:a,curveNumber:a.index,pointNumber:i};if(a._indexToPoints){var o=a._indexToPoints[i];o.length===1?s.pointIndex=o[0]:s.pointIndices=o}else s.pointIndex=i;return a._module.eventData?s=a._module.eventData(s,r,a,l,i):("xVal"in r?s.x=r.xVal:"x"in r&&(s.x=r.x),"yVal"in r?s.y=r.yVal:"y"in r&&(s.y=r.y),r.xa&&(s.xaxis=r.xa),r.ya&&(s.yaxis=r.ya),r.zLabelVal!==void 0&&(s.z=r.zLabelVal)),te.appendArrayPointValue(s,a,i),s},te.appendArrayPointValue=function(r,a,l){var i=a._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var o=i[s],u=w(o);if(r[u]===void 0){var d=Z.nestedProperty(a,o).get(),h=C(d,l);h!==void 0&&(r[u]=h)}}},te.appendArrayMultiPointValues=function(r,a,l){var i=a._arrayAttrs;if(i)for(var s=0;s<i.length;s++){var o=i[s],u=w(o);if(r[u]===void 0){for(var d=Z.nestedProperty(a,o).get(),h=new Array(l.length),y=0;y<l.length;y++)h[y]=C(d,l[y]);r[u]=h}}};var v={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function w(r){return v[r]||r}function C(r,a){if(Array.isArray(a)){if(Z.isArrayOrTypedArray(r)&&Z.isArrayOrTypedArray(r[a[0]]))return r[a[0]][a[1]]}else return r[a]}var P={x:!0,y:!0},t={"x unified":!0,"y unified":!0};te.isUnifiedHover=function(r){return typeof r!="string"?!1:!!t[r]},te.isXYhover=function(r){return typeof r!="string"?!1:!!P[r]}}}),by=Ne({"node_modules/parse-svg-path/index.js"(te,Z){Z.exports=C;var v={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},w=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function C(r){var a=[];return r.replace(w,function(l,i,s){var o=i.toLowerCase();for(s=t(s),o=="m"&&s.length>2&&(a.push([i].concat(s.splice(0,2))),o="l",i=i=="m"?"l":"L");;){if(s.length==v[o])return s.unshift(i),a.push(s);if(s.length<v[o])throw new Error("malformed path data");a.push([i].concat(s.splice(0,v[o])))}}),a}var P=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function t(r){var a=r.match(P);return a?a.map(Number):[]}}}),xL=Ne({"src/components/drawing/symbol_defs.js"(te,Z){var v=by(),w=(function(y,m){return m?Math.round(y*(m=Math.pow(10,m)))/m:Math.round(y)}),C="M0,0Z",P=Math.sqrt(2),t=Math.sqrt(3),r=Math.PI,a=Math.cos,l=Math.sin;Z.exports={circle:{n:0,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_="M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z";return E?h(m,E,_):_}},square:{n:1,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")}},diamond:{n:2,f:function(y,m,E){if(i(m))return C;var c=w(y*1.3,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"Z")}},cross:{n:3,f:function(y,m,E){if(i(m))return C;var c=w(y*.4,2),_=w(y*1.2,2);return h(m,E,"M"+_+","+c+"H"+c+"V"+_+"H-"+c+"V"+c+"H-"+_+"V-"+c+"H-"+c+"V-"+_+"H"+c+"V-"+c+"H"+_+"Z")}},x:{n:4,f:function(y,m,E){if(i(m))return C;var c=w(y*.8/P,2),_="l"+c+","+c,T="l"+c+",-"+c,M="l-"+c+",-"+c,k="l-"+c+","+c;return h(m,E,"M0,"+c+_+T+M+T+M+k+M+k+_+k+_+"Z")}},"triangle-up":{n:5,f:function(y,m,E){if(i(m))return C;var c=w(y*2/t,2),_=w(y/2,2),T=w(y,2);return h(m,E,"M-"+c+","+_+"H"+c+"L0,-"+T+"Z")}},"triangle-down":{n:6,f:function(y,m,E){if(i(m))return C;var c=w(y*2/t,2),_=w(y/2,2),T=w(y,2);return h(m,E,"M-"+c+",-"+_+"H"+c+"L0,"+T+"Z")}},"triangle-left":{n:7,f:function(y,m,E){if(i(m))return C;var c=w(y*2/t,2),_=w(y/2,2),T=w(y,2);return h(m,E,"M"+_+",-"+c+"V"+c+"L-"+T+",0Z")}},"triangle-right":{n:8,f:function(y,m,E){if(i(m))return C;var c=w(y*2/t,2),_=w(y/2,2),T=w(y,2);return h(m,E,"M-"+_+",-"+c+"V"+c+"L"+T+",0Z")}},"triangle-ne":{n:9,f:function(y,m,E){if(i(m))return C;var c=w(y*.6,2),_=w(y*1.2,2);return h(m,E,"M-"+_+",-"+c+"H"+c+"V"+_+"Z")}},"triangle-se":{n:10,f:function(y,m,E){if(i(m))return C;var c=w(y*.6,2),_=w(y*1.2,2);return h(m,E,"M"+c+",-"+_+"V"+c+"H-"+_+"Z")}},"triangle-sw":{n:11,f:function(y,m,E){if(i(m))return C;var c=w(y*.6,2),_=w(y*1.2,2);return h(m,E,"M"+_+","+c+"H-"+c+"V-"+_+"Z")}},"triangle-nw":{n:12,f:function(y,m,E){if(i(m))return C;var c=w(y*.6,2),_=w(y*1.2,2);return h(m,E,"M-"+c+","+_+"V-"+c+"H"+_+"Z")}},pentagon:{n:13,f:function(y,m,E){if(i(m))return C;var c=w(y*.951,2),_=w(y*.588,2),T=w(-y,2),M=w(y*-.309,2),k=w(y*.809,2);return h(m,E,"M"+c+","+M+"L"+_+","+k+"H-"+_+"L-"+c+","+M+"L0,"+T+"Z")}},hexagon:{n:14,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y/2,2),T=w(y*t/2,2);return h(m,E,"M"+T+",-"+_+"V"+_+"L0,"+c+"L-"+T+","+_+"V-"+_+"L0,-"+c+"Z")}},hexagon2:{n:15,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y/2,2),T=w(y*t/2,2);return h(m,E,"M-"+_+","+T+"H"+_+"L"+c+",0L"+_+",-"+T+"H-"+_+"L-"+c+",0Z")}},octagon:{n:16,f:function(y,m,E){if(i(m))return C;var c=w(y*.924,2),_=w(y*.383,2);return h(m,E,"M-"+_+",-"+c+"H"+_+"L"+c+",-"+_+"V"+_+"L"+_+","+c+"H-"+_+"L-"+c+","+_+"V-"+_+"Z")}},star:{n:17,f:function(y,m,E){if(i(m))return C;var c=y*1.4,_=w(c*.225,2),T=w(c*.951,2),M=w(c*.363,2),k=w(c*.588,2),b=w(-c,2),A=w(c*-.309,2),g=w(c*.118,2),f=w(c*.809,2),p=w(c*.382,2);return h(m,E,"M"+_+","+A+"H"+T+"L"+M+","+g+"L"+k+","+f+"L0,"+p+"L-"+k+","+f+"L-"+M+","+g+"L-"+T+","+A+"H-"+_+"L0,"+b+"Z")}},hexagram:{n:18,f:function(y,m,E){if(i(m))return C;var c=w(y*.66,2),_=w(y*.38,2),T=w(y*.76,2);return h(m,E,"M-"+T+",0l-"+_+",-"+c+"h"+T+"l"+_+",-"+c+"l"+_+","+c+"h"+T+"l-"+_+","+c+"l"+_+","+c+"h-"+T+"l-"+_+","+c+"l-"+_+",-"+c+"h-"+T+"Z")}},"star-triangle-up":{n:19,f:function(y,m,E){if(i(m))return C;var c=w(y*t*.8,2),_=w(y*.8,2),T=w(y*1.6,2),M=w(y*4,2),k="A "+M+","+M+" 0 0 1 ";return h(m,E,"M-"+c+","+_+k+c+","+_+k+"0,-"+T+k+"-"+c+","+_+"Z")}},"star-triangle-down":{n:20,f:function(y,m,E){if(i(m))return C;var c=w(y*t*.8,2),_=w(y*.8,2),T=w(y*1.6,2),M=w(y*4,2),k="A "+M+","+M+" 0 0 1 ";return h(m,E,"M"+c+",-"+_+k+"-"+c+",-"+_+k+"0,"+T+k+c+",-"+_+"Z")}},"star-square":{n:21,f:function(y,m,E){if(i(m))return C;var c=w(y*1.1,2),_=w(y*2,2),T="A "+_+","+_+" 0 0 1 ";return h(m,E,"M-"+c+",-"+c+T+"-"+c+","+c+T+c+","+c+T+c+",-"+c+T+"-"+c+",-"+c+"Z")}},"star-diamond":{n:22,f:function(y,m,E){if(i(m))return C;var c=w(y*1.4,2),_=w(y*1.9,2),T="A "+_+","+_+" 0 0 1 ";return h(m,E,"M-"+c+",0"+T+"0,"+c+T+c+",0"+T+"0,-"+c+T+"-"+c+",0Z")}},"diamond-tall":{n:23,f:function(y,m,E){if(i(m))return C;var c=w(y*.7,2),_=w(y*1.4,2);return h(m,E,"M0,"+_+"L"+c+",0L0,-"+_+"L-"+c+",0Z")}},"diamond-wide":{n:24,f:function(y,m,E){if(i(m))return C;var c=w(y*1.4,2),_=w(y*.7,2);return h(m,E,"M0,"+_+"L"+c+",0L0,-"+_+"L-"+c+",0Z")}},hourglass:{n:25,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"H-"+c+"L"+c+",-"+c+"H-"+c+"Z")},noDot:!0},bowtie:{n:26,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"V-"+c+"L-"+c+","+c+"V-"+c+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y/P,2);return h(m,E,"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_+"M"+c+",0A"+c+","+c+" 0 1,1 0,-"+c+"A"+c+","+c+" 0 0,1 "+c+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c+"M"+c+","+c+"H-"+c+"V-"+c+"H"+c+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,m,E){if(i(m))return C;var c=w(y*1.3,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM0,-"+c+"V"+c+"M-"+c+",0H"+c)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,m,E){if(i(m))return C;var c=w(y*1.3,2),_=w(y*.65,2);return h(m,E,"M"+c+",0L0,"+c+"L-"+c+",0L0,-"+c+"ZM-"+_+",-"+_+"L"+_+","+_+"M-"+_+","+_+"L"+_+",-"+_)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,m,E){if(i(m))return C;var c=w(y*1.4,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c+"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,m,E){if(i(m))return C;var c=w(y*1.2,2),_=w(y*.85,2);return h(m,E,"M0,"+c+"V-"+c+"M"+c+",0H-"+c+"M"+_+","+_+"L-"+_+",-"+_+"M"+_+",-"+_+"L-"+_+","+_)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,m,E){if(i(m))return C;var c=w(y/2,2),_=w(y,2);return h(m,E,"M"+c+","+_+"V-"+_+"M"+(c-_)+",-"+_+"V"+_+"M"+_+","+c+"H-"+_+"M-"+_+","+(c-_)+"H"+_)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,m,E){if(i(m))return C;var c=w(y*1.2,2),_=w(y*1.6,2),T=w(y*.8,2);return h(m,E,"M-"+c+","+T+"L0,0M"+c+","+T+"L0,0M0,-"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,m,E){if(i(m))return C;var c=w(y*1.2,2),_=w(y*1.6,2),T=w(y*.8,2);return h(m,E,"M-"+c+",-"+T+"L0,0M"+c+",-"+T+"L0,0M0,"+_+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,m,E){if(i(m))return C;var c=w(y*1.2,2),_=w(y*1.6,2),T=w(y*.8,2);return h(m,E,"M"+T+","+c+"L0,0M"+T+",-"+c+"L0,0M-"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,m,E){if(i(m))return C;var c=w(y*1.2,2),_=w(y*1.6,2),T=w(y*.8,2);return h(m,E,"M-"+T+","+c+"L0,0M-"+T+",-"+c+"L0,0M"+_+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,m,E){if(i(m))return C;var c=w(y*1.4,2);return h(m,E,"M"+c+",0H-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,m,E){if(i(m))return C;var c=w(y*1.4,2);return h(m,E,"M0,"+c+"V-"+c)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+",-"+c+"L-"+c+","+c)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,m,E){if(i(m))return C;var c=w(y,2);return h(m,E,"M"+c+","+c+"L-"+c+",-"+c)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y*2,2);return h(m,E,"M0,0L-"+c+","+_+"H"+c+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y*2,2);return h(m,E,"M0,0L-"+c+",-"+_+"H"+c+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,m,E){if(i(m))return C;var c=w(y*2,2),_=w(y,2);return h(m,E,"M0,0L"+c+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,m,E){if(i(m))return C;var c=w(y*2,2),_=w(y,2);return h(m,E,"M0,0L-"+c+",-"+_+"V"+_+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y*2,2);return h(m,E,"M-"+c+",0H"+c+"M0,0L-"+c+","+_+"H"+c+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,m,E){if(i(m))return C;var c=w(y,2),_=w(y*2,2);return h(m,E,"M-"+c+",0H"+c+"M0,0L-"+c+",-"+_+"H"+c+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,m,E){if(i(m))return C;var c=w(y*2,2),_=w(y,2);return h(m,E,"M0,-"+_+"V"+_+"M0,0L"+c+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,m,E){if(i(m))return C;var c=w(y*2,2),_=w(y,2);return h(m,E,"M0,-"+_+"V"+_+"M0,0L-"+c+",-"+_+"V"+_+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,m,E){if(i(m))return C;var c=r/2.5,_=2*y*a(c),T=2*y*l(c);return h(m,E,"M0,0L"+-_+","+T+"L"+_+","+T+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,m,E){if(i(m))return C;var c=r/4,_=2*y*a(c),T=2*y*l(c);return h(m,E,"M0,0L"+-_+","+T+"A "+2*y+","+2*y+" 0 0 1 "+_+","+T+"Z")},backoff:.4,noDot:!0}};function i(y){return y===null}var s,o,u,d;function h(y,m,E){if((!y||y%360===0)&&!m)return E;if(u===y&&d===m&&s===E)return o;u=y,d=m,s=E;function c(B,U){var V=a(B),q=l(B),z=U[0],H=U[1]+(m||0);return[z*V-H*q,z*q+H*V]}for(var _=y/180*r,T=0,M=0,k=v(E),b="",A=0;A<k.length;A++){var g=k[A],f=g[0],p=T,x=M;if(f==="M"||f==="L")T=+g[1],M=+g[2];else if(f==="m"||f==="l")T+=+g[1],M+=+g[2];else if(f==="H")T=+g[1];else if(f==="h")T+=+g[1];else if(f==="V")M=+g[1];else if(f==="v")M+=+g[1];else if(f==="A"){T=+g[1],M=+g[2];var N=c(_,[+g[6],+g[7]]);g[6]=N[0],g[7]=N[1],g[3]=+g[3]+y}(f==="H"||f==="V")&&(f="L"),(f==="h"||f==="v")&&(f="l"),(f==="m"||f==="l")&&(T-=p,M-=x);var D=c(_,[T,M]);(f==="H"||f==="V")&&(f="L"),(f==="M"||f==="L"||f==="m"||f==="l")&&(g[1]=D[0],g[2]=D[1]),g[0]=f,b+=g[0]+g.slice(1).join(",")}return o=b,b}}}),zs=Ne({"src/components/drawing/index.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=la(),t=Ro(),r=Xo(),a=io(),l=Dc(),i=w.strTranslate,s=uc(),o=cp(),u=bd(),d=u.LINE_SPACING,h=$c().DESELECTDIM,y=vu(),m=Mm(),E=_v().appendArrayPointValue,c=Z.exports={};c.font=function(Fe,Pe){var be=Pe.variant,Ye=Pe.style,mt=Pe.weight,bt=Pe.color,ft=Pe.size,Wt=Pe.family,Zt=Pe.shadow,cr=Pe.lineposition,pr=Pe.textcase;Wt&&Fe.style("font-family",Wt),ft+1&&Fe.style("font-size",ft+"px"),bt&&Fe.call(a.fill,bt),mt&&Fe.style("font-weight",mt),Ye&&Fe.style("font-style",Ye),be&&Fe.style("font-variant",be),pr&&Fe.style("text-transform",_(M(pr))),Zt&&Fe.style("text-shadow",Zt==="auto"?s.makeTextShadow(a.contrast(bt)):_(Zt)),cr&&Fe.style("text-decoration-line",_(k(cr)))};function _(Fe){return Fe==="none"?void 0:Fe}var T={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function M(Fe){return T[Fe]}function k(Fe){return Fe.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}c.setPosition=function(Fe,Pe,be){Fe.attr("x",Pe).attr("y",be)},c.setSize=function(Fe,Pe,be){Fe.attr("width",Pe).attr("height",be)},c.setRect=function(Fe,Pe,be,Ye,mt){Fe.call(c.setPosition,Pe,be).call(c.setSize,Ye,mt)},c.translatePoint=function(Fe,Pe,be,Ye){var mt=be.c2p(Fe.x),bt=Ye.c2p(Fe.y);if(P(mt)&&P(bt)&&Pe.node())Pe.node().nodeName==="text"?Pe.attr("x",mt).attr("y",bt):Pe.attr("transform",i(mt,bt));else return!1;return!0},c.translatePoints=function(Fe,Pe,be){Fe.each(function(Ye){var mt=v.select(this);c.translatePoint(Ye,mt,Pe,be)})},c.hideOutsideRangePoint=function(Fe,Pe,be,Ye,mt,bt){Pe.attr("display",be.isPtWithinRange(Fe,mt)&&Ye.isPtWithinRange(Fe,bt)?null:"none")},c.hideOutsideRangePoints=function(Fe,Pe){if(Pe._hasClipOnAxisFalse){var be=Pe.xaxis,Ye=Pe.yaxis;Fe.each(function(mt){var bt=mt[0].trace,ft=bt.xcalendar,Wt=bt.ycalendar,Zt=r.traceIs(bt,"bar-like")?".bartext":".point,.textpoint";Fe.selectAll(Zt).each(function(cr){c.hideOutsideRangePoint(cr,v.select(this),be,Ye,ft,Wt)})})}},c.crispRound=function(Fe,Pe,be){return!Pe||!P(Pe)?be||0:Fe._context.staticPlot?Pe:Pe<1?1:Math.round(Pe)},c.singleLineStyle=function(Fe,Pe,be,Ye,mt){Pe.style("fill","none");var bt=(((Fe||[])[0]||{}).trace||{}).line||{},ft=be||bt.width||0,Wt=mt||bt.dash||"";a.stroke(Pe,Ye||bt.color),c.dashLine(Pe,Wt,ft)},c.lineGroupStyle=function(Fe,Pe,be,Ye){Fe.style("fill","none").each(function(mt){var bt=(((mt||[])[0]||{}).trace||{}).line||{},ft=Pe||bt.width||0,Wt=Ye||bt.dash||"";v.select(this).call(a.stroke,be||bt.color).call(c.dashLine,Wt,ft)})},c.dashLine=function(Fe,Pe,be){be=+be||0,Pe=c.dashStyle(Pe,be),Fe.style({"stroke-dasharray":Pe,"stroke-width":be+"px"})},c.dashStyle=function(Fe,Pe){Pe=+Pe||1;var be=Math.max(Pe,3);return Fe==="solid"?Fe="":Fe==="dot"?Fe=be+"px,"+be+"px":Fe==="dash"?Fe=3*be+"px,"+3*be+"px":Fe==="longdash"?Fe=5*be+"px,"+5*be+"px":Fe==="dashdot"?Fe=3*be+"px,"+be+"px,"+be+"px,"+be+"px":Fe==="longdashdot"&&(Fe=5*be+"px,"+2*be+"px,"+be+"px,"+2*be+"px"),Fe};function b(Fe,Pe,be,Ye){var mt=Pe.fillpattern,bt=Pe.fillgradient,ft=c.getPatternAttr,Wt=mt&&(ft(mt.shape,0,"")||ft(mt.path,0,""));if(Wt){var Zt=ft(mt.bgcolor,0,null),cr=ft(mt.fgcolor,0,null),pr=mt.fgopacity,Br=ft(mt.size,0,8),Fr=ft(mt.solidity,0,.3),cn=Pe.uid;c.pattern(Fe,"point",be,cn,Wt,Br,Fr,void 0,mt.fillmode,Zt,cr,pr)}else if(bt&&bt.type!=="none"){var Nr=bt.type,Jr="scatterfill-"+Pe.uid;if(Ye&&(Jr="legendfill-"+Pe.uid),!Ye&&(bt.start!==void 0||bt.stop!==void 0)){var Dt,$e;Nr==="horizontal"?(Dt={x:bt.start,y:0},$e={x:bt.stop,y:0}):Nr==="vertical"&&(Dt={x:0,y:bt.start},$e={x:0,y:bt.stop}),Dt.x=Pe._xA.c2p(Dt.x===void 0?Pe._extremes.x.min[0].val:Dt.x,!0),Dt.y=Pe._yA.c2p(Dt.y===void 0?Pe._extremes.y.min[0].val:Dt.y,!0),$e.x=Pe._xA.c2p($e.x===void 0?Pe._extremes.x.max[0].val:$e.x,!0),$e.y=Pe._yA.c2p($e.y===void 0?Pe._extremes.y.max[0].val:$e.y,!0),Fe.call(D,be,Jr,"linear",bt.colorscale,"fill",Dt,$e,!0,!1)}else Nr==="horizontal"&&(Nr=Nr+"reversed"),Fe.call(c.gradient,be,Jr,Nr,bt.colorscale,"fill")}else Pe.fillcolor&&Fe.call(a.fill,Pe.fillcolor)}c.singleFillStyle=function(Fe,Pe){var be=v.select(Fe.node()),Ye=be.data(),mt=((Ye[0]||[])[0]||{}).trace||{};b(Fe,mt,Pe,!1)},c.fillGroupStyle=function(Fe,Pe,be){Fe.style("stroke-width",0).each(function(Ye){var mt=v.select(this);Ye[0].trace&&b(mt,Ye[0].trace,Pe,be)})};var A=xL();c.symbolNames=[],c.symbolFuncs=[],c.symbolBackOffs=[],c.symbolNeedLines={},c.symbolNoDot={},c.symbolNoFill={},c.symbolList=[],Object.keys(A).forEach(function(Fe){var Pe=A[Fe],be=Pe.n;c.symbolList.push(be,String(be),Fe,be+100,String(be+100),Fe+"-open"),c.symbolNames[be]=Fe,c.symbolFuncs[be]=Pe.f,c.symbolBackOffs[be]=Pe.backoff||0,Pe.needLine&&(c.symbolNeedLines[be]=!0),Pe.noDot?c.symbolNoDot[be]=!0:c.symbolList.push(be+200,String(be+200),Fe+"-dot",be+300,String(be+300),Fe+"-open-dot"),Pe.noFill&&(c.symbolNoFill[be]=!0)});var g=c.symbolNames.length,f="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";c.symbolNumber=function(Fe){if(P(Fe))Fe=+Fe;else if(typeof Fe=="string"){var Pe=0;Fe.indexOf("-open")>0&&(Pe=100,Fe=Fe.replace("-open","")),Fe.indexOf("-dot")>0&&(Pe+=200,Fe=Fe.replace("-dot","")),Fe=c.symbolNames.indexOf(Fe),Fe>=0&&(Fe+=Pe)}return Fe%100>=g||Fe>=400?0:Math.floor(Math.max(Fe,0))};function p(Fe,Pe,be,Ye){var mt=Fe%100;return c.symbolFuncs[mt](Pe,be,Ye)+(Fe>=200?f:"")}var x=C("~f"),N={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}};c.gradient=function(Fe,Pe,be,Ye,mt,bt){var ft=N[Ye];return D(Fe,Pe,be,ft.type,mt,bt,ft.start,ft.stop,!1,ft.reversed)};function D(Fe,Pe,be,Ye,mt,bt,ft,Wt,Zt,cr){var pr=mt.length,Br;Ye==="linear"?Br={node:"linearGradient",attrs:{x1:ft.x,y1:ft.y,x2:Wt.x,y2:Wt.y,gradientUnits:Zt?"userSpaceOnUse":"objectBoundingBox"},reversed:cr}:Ye==="radial"&&(Br={node:"radialGradient",reversed:cr});for(var Fr=new Array(pr),cn=0;cn<pr;cn++)Br.reversed?Fr[pr-1-cn]=[x((1-mt[cn][0])*100),mt[cn][1]]:Fr[cn]=[x(mt[cn][0]*100),mt[cn][1]];var Nr=Pe._fullLayout,Jr="g"+Nr._uid+"-"+be,Dt=Nr._defs.select(".gradients").selectAll("#"+Jr).data([Ye+Fr.join(";")],w.identity);Dt.exit().remove(),Dt.enter().append(Br.node).each(function(){var $e=v.select(this);Br.attrs&&$e.attr(Br.attrs),$e.attr("id",Jr);var ot=$e.selectAll("stop").data(Fr);ot.exit().remove(),ot.enter().append("stop"),ot.each(function(De){var Ee=t(De[1]);v.select(this).attr({offset:De[0]+"%","stop-color":a.tinyRGB(Ee),"stop-opacity":Ee.getAlpha()})})}),Fe.style(bt,pe(Jr,Pe)).style(bt+"-opacity",null),Fe.classed("gradient_filled",!0)}c.pattern=function(Fe,Pe,be,Ye,mt,bt,ft,Wt,Zt,cr,pr,Br){var Fr=Pe==="legend";Wt&&(Zt==="overlay"?(cr=Wt,pr=a.contrast(cr)):(cr=void 0,pr=Wt));var cn=be._fullLayout,Nr="p"+cn._uid+"-"+Ye,Jr,Dt,$e=function(Rr,Mr,Sr,Kr,qn){return Kr+(qn-Kr)*(Rr-Mr)/(Sr-Mr)},ot,De,Ee,Ae,Ie={},tt=t(pr),st=a.tinyRGB(tt),Ft=tt.getAlpha(),Nt=Br*Ft;switch(mt){case"/":Jr=bt*Math.sqrt(2),Dt=bt*Math.sqrt(2),ot="M-"+Jr/4+","+Dt/4+"l"+Jr/2+",-"+Dt/2+"M0,"+Dt+"L"+Jr+",0M"+Jr/4*3+","+Dt/4*5+"l"+Jr/2+",-"+Dt/2,De=ft*bt,Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case"\\":Jr=bt*Math.sqrt(2),Dt=bt*Math.sqrt(2),ot="M"+Jr/4*3+",-"+Dt/4+"l"+Jr/2+","+Dt/2+"M0,0L"+Jr+","+Dt+"M-"+Jr/4+","+Dt/4*3+"l"+Jr/2+","+Dt/2,De=ft*bt,Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case"x":Jr=bt*Math.sqrt(2),Dt=bt*Math.sqrt(2),ot="M-"+Jr/4+","+Dt/4+"l"+Jr/2+",-"+Dt/2+"M0,"+Dt+"L"+Jr+",0M"+Jr/4*3+","+Dt/4*5+"l"+Jr/2+",-"+Dt/2+"M"+Jr/4*3+",-"+Dt/4+"l"+Jr/2+","+Dt/2+"M0,0L"+Jr+","+Dt+"M-"+Jr/4+","+Dt/4*3+"l"+Jr/2+","+Dt/2,De=bt-bt*Math.sqrt(1-ft),Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case"|":Jr=bt,Dt=bt,Ae="path",ot="M"+Jr/2+",0L"+Jr/2+","+Dt,De=ft*bt,Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case"-":Jr=bt,Dt=bt,Ae="path",ot="M0,"+Dt/2+"L"+Jr+","+Dt/2,De=ft*bt,Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case"+":Jr=bt,Dt=bt,Ae="path",ot="M"+Jr/2+",0L"+Jr/2+","+Dt+"M0,"+Dt/2+"L"+Jr+","+Dt/2,De=bt-bt*Math.sqrt(1-ft),Ae="path",Ie={d:ot,opacity:Nt,stroke:st,"stroke-width":De+"px"};break;case".":Jr=bt,Dt=bt,ft<Math.PI/4?Ee=Math.sqrt(ft*bt*bt/Math.PI):Ee=$e(ft,Math.PI/4,1,bt/2,bt/Math.sqrt(2)),Ae="circle",Ie={cx:Jr/2,cy:Dt/2,r:Ee,opacity:Nt,fill:st};break;default:Jr=bt,Dt=bt,Ae="path",Ie={d:mt,opacity:Nt,fill:st};break}var Xt=[mt||"noSh",cr||"noBg",pr||"noFg",bt,ft].join(";"),lr=cn._defs.select(".patterns").selectAll("#"+Nr).data([Xt],w.identity);lr.exit().remove(),lr.enter().append("pattern").each(function(){var Rr=v.select(this);if(Rr.attr({id:Nr,width:Jr+"px",height:Dt+"px",patternUnits:"userSpaceOnUse",patternTransform:Fr?"scale(0.8)":""}),cr){var Mr=t(cr),Sr=a.tinyRGB(Mr),Kr=Mr.getAlpha(),qn=Rr.selectAll("rect").data([0]);qn.exit().remove(),qn.enter().append("rect").attr({width:Jr+"px",height:Dt+"px",fill:Sr,"fill-opacity":Kr})}var ha=Rr.selectAll(Ae).data([0]);ha.exit().remove(),ha.enter().append(Ae).attr(Ie)}),Fe.style("fill",pe(Nr,be)).style("fill-opacity",null),Fe.classed("pattern_filled",!0)},c.initGradients=function(Fe){var Pe=Fe._fullLayout,be=w.ensureSingle(Pe._defs,"g","gradients");be.selectAll("linearGradient,radialGradient").remove(),v.select(Fe).selectAll(".gradient_filled").classed("gradient_filled",!1)},c.initPatterns=function(Fe){var Pe=Fe._fullLayout,be=w.ensureSingle(Pe._defs,"g","patterns");be.selectAll("pattern").remove(),v.select(Fe).selectAll(".pattern_filled").classed("pattern_filled",!1)},c.getPatternAttr=function(Fe,Pe,be){return Fe&&w.isArrayOrTypedArray(Fe)?Pe<Fe.length?Fe[Pe]:be:Fe},c.pointStyle=function(Fe,Pe,be,Ye){if(Fe.size()){var mt=c.makePointStyleFns(Pe);Fe.each(function(bt){c.singlePointStyle(bt,v.select(this),Pe,mt,be,Ye)})}},c.singlePointStyle=function(Fe,Pe,be,Ye,mt,bt){var ft=be.marker,Wt=ft.line;if(bt&&bt.i>=0&&Fe.i===void 0&&(Fe.i=bt.i),Pe.style("opacity",Ye.selectedOpacityFn?Ye.selectedOpacityFn(Fe):Fe.mo===void 0?ft.opacity:Fe.mo),Ye.ms2mrc){var Zt;Fe.ms==="various"||ft.size==="various"?Zt=3:Zt=Ye.ms2mrc(Fe.ms),Fe.mrc=Zt,Ye.selectedSizeFn&&(Zt=Fe.mrc=Ye.selectedSizeFn(Fe));var cr=c.symbolNumber(Fe.mx||ft.symbol)||0;Fe.om=cr%200>=100;var pr=lt(Fe,be),Br=ce(Fe,be);Pe.attr("d",p(cr,Zt,pr,Br))}var Fr=!1,cn,Nr,Jr;if(Fe.so)Jr=Wt.outlierwidth,Nr=Wt.outliercolor,cn=ft.outliercolor;else{var Dt=(Wt||{}).width;Jr=(Fe.mlw+1||Dt+1||(Fe.trace?(Fe.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in Fe?Nr=Fe.mlcc=Ye.lineScale(Fe.mlc):w.isArrayOrTypedArray(Wt.color)?Nr=a.defaultLine:Nr=Wt.color,w.isArrayOrTypedArray(ft.color)&&(cn=a.defaultLine,Fr=!0),"mc"in Fe?cn=Fe.mcc=Ye.markerScale(Fe.mc):cn=ft.color||ft.colors||"rgba(0,0,0,0)",Ye.selectedColorFn&&(cn=Ye.selectedColorFn(Fe))}if(Fe.om)Pe.call(a.stroke,cn).style({"stroke-width":(Jr||1)+"px",fill:"none"});else{Pe.style("stroke-width",(Fe.isBlank?0:Jr)+"px");var $e=ft.gradient,ot=Fe.mgt;ot?Fr=!0:ot=$e&&$e.type,w.isArrayOrTypedArray(ot)&&(ot=ot[0],N[ot]||(ot=0));var De=ft.pattern,Ee=c.getPatternAttr,Ae=De&&(Ee(De.shape,Fe.i,"")||Ee(De.path,Fe.i,""));if(ot&&ot!=="none"){var Ie=Fe.mgc;Ie?Fr=!0:Ie=$e.color;var tt=be.uid;Fr&&(tt+="-"+Fe.i),c.gradient(Pe,mt,tt,ot,[[0,Ie],[1,cn]],"fill")}else if(Ae){var st=!1,Ft=De.fgcolor;!Ft&&bt&&bt.color&&(Ft=bt.color,st=!0);var Nt=Ee(Ft,Fe.i,bt&&bt.color||null),Xt=Ee(De.bgcolor,Fe.i,null),lr=De.fgopacity,Rr=Ee(De.size,Fe.i,8),Mr=Ee(De.solidity,Fe.i,.3);st=st||Fe.mcc||w.isArrayOrTypedArray(De.shape)||w.isArrayOrTypedArray(De.path)||w.isArrayOrTypedArray(De.bgcolor)||w.isArrayOrTypedArray(De.fgcolor)||w.isArrayOrTypedArray(De.size)||w.isArrayOrTypedArray(De.solidity);var Sr=be.uid;st&&(Sr+="-"+Fe.i),c.pattern(Pe,"point",mt,Sr,Ae,Rr,Mr,Fe.mcc,De.fillmode,Xt,Nt,lr)}else w.isArrayOrTypedArray(cn)?a.fill(Pe,cn[Fe.i]):a.fill(Pe,cn);Jr&&a.stroke(Pe,Nr)}},c.makePointStyleFns=function(Fe){var Pe={},be=Fe.marker;return Pe.markerScale=c.tryColorscale(be,""),Pe.lineScale=c.tryColorscale(be,"line"),r.traceIs(Fe,"symbols")&&(Pe.ms2mrc=y.isBubble(Fe)?m(Fe):function(){return(be.size||6)/2}),Fe.selectedpoints&&w.extendFlat(Pe,c.makeSelectedPointStyleFns(Fe)),Pe},c.makeSelectedPointStyleFns=function(Fe){var Pe={},be=Fe.selected||{},Ye=Fe.unselected||{},mt=Fe.marker||{},bt=be.marker||{},ft=Ye.marker||{},Wt=mt.opacity,Zt=bt.opacity,cr=ft.opacity,pr=Zt!==void 0,Br=cr!==void 0;(w.isArrayOrTypedArray(Wt)||pr||Br)&&(Pe.selectedOpacityFn=function(Ee){var Ae=Ee.mo===void 0?mt.opacity:Ee.mo;return Ee.selected?pr?Zt:Ae:Br?cr:h*Ae});var Fr=mt.color,cn=bt.color,Nr=ft.color;(cn||Nr)&&(Pe.selectedColorFn=function(Ee){var Ae=Ee.mcc||Fr;return Ee.selected?cn||Ae:Nr||Ae});var Jr=mt.size,Dt=bt.size,$e=ft.size,ot=Dt!==void 0,De=$e!==void 0;return r.traceIs(Fe,"symbols")&&(ot||De)&&(Pe.selectedSizeFn=function(Ee){var Ae=Ee.mrc||Jr/2;return Ee.selected?ot?Dt/2:Ae:De?$e/2:Ae}),Pe},c.makeSelectedTextStyleFns=function(Fe){var Pe={},be=Fe.selected||{},Ye=Fe.unselected||{},mt=Fe.textfont||{},bt=be.textfont||{},ft=Ye.textfont||{},Wt=mt.color,Zt=bt.color,cr=ft.color;return Pe.selectedTextColorFn=function(pr){var Br=pr.tc||Wt;return pr.selected?Zt||Br:cr||(Zt?Br:a.addOpacity(Br,h))},Pe},c.selectedPointStyle=function(Fe,Pe){if(!(!Fe.size()||!Pe.selectedpoints)){var be=c.makeSelectedPointStyleFns(Pe),Ye=Pe.marker||{},mt=[];be.selectedOpacityFn&&mt.push(function(bt,ft){bt.style("opacity",be.selectedOpacityFn(ft))}),be.selectedColorFn&&mt.push(function(bt,ft){a.fill(bt,be.selectedColorFn(ft))}),be.selectedSizeFn&&mt.push(function(bt,ft){var Wt=ft.mx||Ye.symbol||0,Zt=be.selectedSizeFn(ft);bt.attr("d",p(c.symbolNumber(Wt),Zt,lt(ft,Pe),ce(ft,Pe))),ft.mrc2=Zt}),mt.length&&Fe.each(function(bt){for(var ft=v.select(this),Wt=0;Wt<mt.length;Wt++)mt[Wt](ft,bt)})}},c.tryColorscale=function(Fe,Pe){var be=Pe?w.nestedProperty(Fe,Pe).get():Fe;if(be){var Ye=be.color;if((be.colorscale||be._colorAx)&&w.isArrayOrTypedArray(Ye))return l.makeColorScaleFuncFromTrace(be)}return w.identity};var B={start:1,end:-1,middle:0,bottom:1,top:-1};function U(Fe,Pe,be,Ye,mt){var bt=v.select(Fe.node().parentNode),ft=Pe.indexOf("top")!==-1?"top":Pe.indexOf("bottom")!==-1?"bottom":"middle",Wt=Pe.indexOf("left")!==-1?"end":Pe.indexOf("right")!==-1?"start":"middle",Zt=Ye?Ye/.8+1:0,cr=(s.lineCount(Fe)-1)*d+1,pr=B[Wt]*Zt,Br=be*.75+B[ft]*Zt+(B[ft]-1)*cr*be/2;Fe.attr("text-anchor",Wt),mt||bt.attr("transform",i(pr,Br))}function V(Fe,Pe){var be=Fe.ts||Pe.textfont.size;return P(be)&&be>0?be:0}c.textPointStyle=function(Fe,Pe,be){if(Fe.size()){var Ye;if(Pe.selectedpoints){var mt=c.makeSelectedTextStyleFns(Pe);Ye=mt.selectedTextColorFn}var bt=Pe.texttemplate,ft=be._fullLayout;Fe.each(function(Wt){var Zt=v.select(this),cr=bt?w.extractOption(Wt,Pe,"txt","texttemplate"):w.extractOption(Wt,Pe,"tx","text");if(!cr&&cr!==0){Zt.remove();return}if(bt){var pr=Pe._module.formatLabels,Br=pr?pr(Wt,Pe,ft):{},Fr={};E(Fr,Pe,Wt.i),cr=w.texttemplateString({data:[Fr,Wt,Pe._meta],fallback:Pe.texttemplatefallback,labels:Br,locale:ft._d3locale,template:cr})}var cn=Wt.tp||Pe.textposition,Nr=V(Wt,Pe),Jr=Ye?Ye(Wt):Wt.tc||Pe.textfont.color;Zt.call(c.font,{family:Wt.tf||Pe.textfont.family,weight:Wt.tw||Pe.textfont.weight,style:Wt.ty||Pe.textfont.style,variant:Wt.tv||Pe.textfont.variant,textcase:Wt.tC||Pe.textfont.textcase,lineposition:Wt.tE||Pe.textfont.lineposition,shadow:Wt.tS||Pe.textfont.shadow,size:Nr,color:Jr}).text(cr).call(s.convertToTspans,be).call(U,cn,Nr,Wt.mrc)})}},c.selectedTextStyle=function(Fe,Pe){if(!(!Fe.size()||!Pe.selectedpoints)){var be=c.makeSelectedTextStyleFns(Pe);Fe.each(function(Ye){var mt=v.select(this),bt=be.selectedTextColorFn(Ye),ft=Ye.tp||Pe.textposition,Wt=V(Ye,Pe);a.fill(mt,bt);var Zt=r.traceIs(Pe,"bar-like");U(mt,ft,Wt,Ye.mrc2||Ye.mrc,Zt)})}};var q=.5;c.smoothopen=function(Fe,Pe){if(Fe.length<3)return"M"+Fe.join("L");var be="M"+Fe[0],Ye=[],mt;for(mt=1;mt<Fe.length-1;mt++)Ye.push(ye(Fe[mt-1],Fe[mt],Fe[mt+1],Pe));for(be+="Q"+Ye[0][0]+" "+Fe[1],mt=2;mt<Fe.length-1;mt++)be+="C"+Ye[mt-2][1]+" "+Ye[mt-1][0]+" "+Fe[mt];return be+="Q"+Ye[Fe.length-3][1]+" "+Fe[Fe.length-1],be},c.smoothclosed=function(Fe,Pe){if(Fe.length<3)return"M"+Fe.join("L")+"Z";var be="M"+Fe[0],Ye=Fe.length-1,mt=[ye(Fe[Ye],Fe[0],Fe[1],Pe)],bt;for(bt=1;bt<Ye;bt++)mt.push(ye(Fe[bt-1],Fe[bt],Fe[bt+1],Pe));for(mt.push(ye(Fe[Ye-1],Fe[Ye],Fe[0],Pe)),bt=1;bt<=Ye;bt++)be+="C"+mt[bt-1][1]+" "+mt[bt][0]+" "+Fe[bt];return be+="C"+mt[Ye][1]+" "+mt[0][0]+" "+Fe[0]+"Z",be};var z,H;function G(Fe,Pe,be){return be&&(Fe=W(Fe)),Pe?le(Fe[1]):J(Fe[0])}function J(Fe){var Pe=v.round(Fe,2);return z=Pe,Pe}function le(Fe){var Pe=v.round(Fe,2);return H=Pe,Pe}function ye(Fe,Pe,be,Ye){var mt=Fe[0]-Pe[0],bt=Fe[1]-Pe[1],ft=be[0]-Pe[0],Wt=be[1]-Pe[1],Zt=Math.pow(mt*mt+bt*bt,q/2),cr=Math.pow(ft*ft+Wt*Wt,q/2),pr=(cr*cr*mt-Zt*Zt*ft)*Ye,Br=(cr*cr*bt-Zt*Zt*Wt)*Ye,Fr=3*cr*(Zt+cr),cn=3*Zt*(Zt+cr);return[[J(Pe[0]+(Fr&&pr/Fr)),le(Pe[1]+(Fr&&Br/Fr))],[J(Pe[0]-(cn&&pr/cn)),le(Pe[1]-(cn&&Br/cn))]]}var de={hv:function(Fe,Pe,be){return"H"+J(Pe[0])+"V"+G(Pe,1,be)},vh:function(Fe,Pe,be){return"V"+le(Pe[1])+"H"+G(Pe,0,be)},hvh:function(Fe,Pe,be){return"H"+J((Fe[0]+Pe[0])/2)+"V"+le(Pe[1])+"H"+G(Pe,0,be)},vhv:function(Fe,Pe,be){return"V"+le((Fe[1]+Pe[1])/2)+"H"+J(Pe[0])+"V"+G(Pe,1,be)}},me=function(Fe,Pe,be){return"L"+G(Pe,0,be)+","+G(Pe,1,be)};c.steps=function(Fe){var Pe=de[Fe]||me;return function(be){for(var Ye="M"+J(be[0][0])+","+le(be[0][1]),mt=be.length,bt=1;bt<mt;bt++)Ye+=Pe(be[bt-1],be[bt],bt===mt-1);return Ye}};function W(Fe,Pe){var be=Fe.backoff,Ye=Fe.trace,mt=Fe.d,bt=Fe.i;if(be&&Ye&&Ye.marker&&Ye.marker.angle%360===0&&Ye.line&&Ye.line.shape!=="spline"){var ft=w.isArrayOrTypedArray(be),Wt=Fe,Zt=Pe?Pe[0]:z||0,cr=Pe?Pe[1]:H||0,pr=Wt[0],Br=Wt[1],Fr=pr-Zt,cn=Br-cr,Nr=Math.atan2(cn,Fr),Jr=ft?be[bt]:be;if(Jr==="auto"){var Dt=Wt.i;Ye.type==="scatter"&&Dt--;var $e=Wt.marker,ot=$e.symbol;w.isArrayOrTypedArray(ot)&&(ot=ot[Dt]);var De=$e.size;w.isArrayOrTypedArray(De)&&(De=De[Dt]),Jr=$e?c.symbolBackOffs[c.symbolNumber(ot)]*De:0,Jr+=c.getMarkerStandoff(mt[Dt],Ye)||0}var Ee=pr-Jr*Math.cos(Nr),Ae=Br-Jr*Math.sin(Nr);(Ee<=pr&&Ee>=Zt||Ee>=pr&&Ee<=Zt)&&(Ae<=Br&&Ae>=cr||Ae>=Br&&Ae<=cr)&&(Fe=[Ee,Ae])}return Fe}c.applyBackoff=W,c.makeTester=function(){var Fe=w.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(be){be.attr(o.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Pe=w.ensureSingle(Fe,"path","js-reference-point",function(be){be.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});c.tester=Fe,c.testref=Pe},c.savedBBoxes={};var ie=0,se=1e4;c.bBox=function(Fe,Pe,be){be||(be=ee(Fe));var Ye;if(be){if(Ye=c.savedBBoxes[be],Ye)return w.extendFlat({},Ye)}else if(Fe.childNodes.length===1){var mt=Fe.childNodes[0];if(be=ee(mt),be){var bt=+mt.getAttribute("x")||0,ft=+mt.getAttribute("y")||0,Wt=mt.getAttribute("transform");if(!Wt){var Zt=c.bBox(mt,!1,be);return bt&&(Zt.left+=bt,Zt.right+=bt),ft&&(Zt.top+=ft,Zt.bottom+=ft),Zt}if(be+="~"+bt+"~"+ft+"~"+Wt,Ye=c.savedBBoxes[be],Ye)return w.extendFlat({},Ye)}}var cr,pr;Pe?cr=Fe:(pr=c.tester.node(),cr=Fe.cloneNode(!0),pr.appendChild(cr)),v.select(cr).attr("transform",null).call(s.positionText,0,0);var Br=cr.getBoundingClientRect(),Fr=c.testref.node().getBoundingClientRect();Pe||pr.removeChild(cr);var cn={height:Br.height,width:Br.width,left:Br.left-Fr.left,top:Br.top-Fr.top,right:Br.right-Fr.left,bottom:Br.bottom-Fr.top};return ie>=se&&(c.savedBBoxes={},ie=0),be&&(c.savedBBoxes[be]=cn),ie++,w.extendFlat({},cn)};function ee(Fe){var Pe=Fe.getAttribute("data-unformatted");if(Pe!==null)return Pe+Fe.getAttribute("data-math")+Fe.getAttribute("text-anchor")+Fe.getAttribute("style")}c.setClipUrl=function(Fe,Pe,be){Fe.attr("clip-path",pe(Pe,be))};function pe(Fe,Pe){if(!Fe)return null;var be=Pe._context,Ye=be._exportedPlot?"":be._baseUrl||"";return Ye?"url('"+Ye+"#"+Fe+"')":"url(#"+Fe+")"}c.getTranslate=function(Fe){var Pe=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,be=Fe.attr?"attr":"getAttribute",Ye=Fe[be]("transform")||"",mt=Ye.replace(Pe,function(bt,ft,Wt){return[ft,Wt].join(" ")}).split(" ");return{x:+mt[0]||0,y:+mt[1]||0}},c.setTranslate=function(Fe,Pe,be){var Ye=/(\btranslate\(.*?\);?)/,mt=Fe.attr?"attr":"getAttribute",bt=Fe.attr?"attr":"setAttribute",ft=Fe[mt]("transform")||"";return Pe=Pe||0,be=be||0,ft=ft.replace(Ye,"").trim(),ft+=i(Pe,be),ft=ft.trim(),Fe[bt]("transform",ft),ft},c.getScale=function(Fe){var Pe=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,be=Fe.attr?"attr":"getAttribute",Ye=Fe[be]("transform")||"",mt=Ye.replace(Pe,function(bt,ft,Wt){return[ft,Wt].join(" ")}).split(" ");return{x:+mt[0]||1,y:+mt[1]||1}},c.setScale=function(Fe,Pe,be){var Ye=/(\bscale\(.*?\);?)/,mt=Fe.attr?"attr":"getAttribute",bt=Fe.attr?"attr":"setAttribute",ft=Fe[mt]("transform")||"";return Pe=Pe||1,be=be||1,ft=ft.replace(Ye,"").trim(),ft+="scale("+Pe+","+be+")",ft=ft.trim(),Fe[bt]("transform",ft),ft};var oe=/\s*sc.*/;c.setPointGroupScale=function(Fe,Pe,be){if(Pe=Pe||1,be=be||1,!!Fe){var Ye=Pe===1&&be===1?"":"scale("+Pe+","+be+")";Fe.each(function(){var mt=(this.getAttribute("transform")||"").replace(oe,"");mt+=Ye,mt=mt.trim(),this.setAttribute("transform",mt)})}};var Y=/translate\([^)]*\)\s*$/;c.setTextPointsScale=function(Fe,Pe,be){Fe&&Fe.each(function(){var Ye,mt=v.select(this),bt=mt.select("text");if(bt.node()){var ft=parseFloat(bt.attr("x")||0),Wt=parseFloat(bt.attr("y")||0),Zt=(mt.attr("transform")||"").match(Y);Pe===1&&be===1?Ye=[]:Ye=[i(ft,Wt),"scale("+Pe+","+be+")",i(-ft,-Wt)],Zt&&Ye.push(Zt),mt.attr("transform",Ye.join(""))}})};function ce(Fe,Pe){var be;return Fe&&(be=Fe.mf),be===void 0&&(be=Pe.marker&&Pe.marker.standoff||0),!Pe._geo&&!Pe._xA?-be:be}c.getMarkerStandoff=ce;var ue=Math.atan2,_e=Math.cos,Le=Math.sin;function ze(Fe,Pe){var be=Pe[0],Ye=Pe[1];return[be*_e(Fe)-Ye*Le(Fe),be*Le(Fe)+Ye*_e(Fe)]}var Ge,Ve,rt,pt,gt,ht;function lt(Fe,Pe){var be=Fe.ma;be===void 0&&(be=Pe.marker.angle,(!be||w.isArrayOrTypedArray(be))&&(be=0));var Ye,mt,bt=Pe.marker.angleref;if(bt==="previous"||bt==="north"){if(Pe._geo){var ft=Pe._geo.project(Fe.lonlat);Ye=ft[0],mt=ft[1]}else{var Wt=Pe._xA,Zt=Pe._yA;if(Wt&&Zt)Ye=Wt.c2p(Fe.x),mt=Zt.c2p(Fe.y);else return 90}if(Pe._geo){var cr=Fe.lonlat[0],pr=Fe.lonlat[1],Br=Pe._geo.project([cr,pr+1e-5]),Fr=Pe._geo.project([cr+1e-5,pr]),cn=ue(Fr[1]-mt,Fr[0]-Ye),Nr=ue(Br[1]-mt,Br[0]-Ye),Jr;if(bt==="north")Jr=be/180*Math.PI;else if(bt==="previous"){var Dt=cr/180*Math.PI,$e=pr/180*Math.PI,ot=Ge/180*Math.PI,De=Ve/180*Math.PI,Ee=ot-Dt,Ae=_e(De)*Le(Ee),Ie=Le(De)*_e($e)-_e(De)*Le($e)*_e(Ee);Jr=-ue(Ae,Ie)-Math.PI,Ge=cr,Ve=pr}var tt=ze(cn,[_e(Jr),0]),st=ze(Nr,[Le(Jr),0]);be=ue(tt[1]+st[1],tt[0]+st[0])/Math.PI*180,bt==="previous"&&!(ht===Pe.uid&&Fe.i===gt+1)&&(be=null)}if(bt==="previous"&&!Pe._geo)if(ht===Pe.uid&&Fe.i===gt+1&&P(Ye)&&P(mt)){var Ft=Ye-rt,Nt=mt-pt,Xt=Pe.line&&Pe.line.shape||"",lr=Xt.slice(Xt.length-1);lr==="h"&&(Nt=0),lr==="v"&&(Ft=0),be+=ue(Nt,Ft)/Math.PI*180+90}else be=null}return rt=Ye,pt=mt,gt=Fe.i,ht=Pe.uid,be}c.getMarkerAngle=lt}}),wy=Ne({"src/components/titles/index.js"(te,Z){var v=xn(),w=la(),C=uf(),P=Xo(),t=In(),r=t.strTranslate,a=zs(),l=io(),i=uc(),s=$c(),o=bd().OPPOSITE_SIDE,u=/ [XY][0-9]* /,d=1.6,h=1.6;function y(m,E,c){var _=m._fullLayout,T=c.propContainer,M=c.propName,k=c.placeholder,b=c.traceIndex,A=c.avoid||{},g=c.attributes,f=c.transform,p=c.containerGroup,x=1,N=T.title,D=(N&&N.text?N.text:"").trim(),B=!1,U=N&&N.font?N.font:{},V=U.family,q=U.size,z=U.color,H=U.weight,G=U.style,J=U.variant,le=U.textcase,ye=U.lineposition,de=U.shadow,me=c.subtitlePropName,W=!!me,ie=c.subtitlePlaceholder,se=(T.title||{}).subtitle||{text:"",font:{}},ee=(se.text||"").trim(),pe=!1,oe=1,Y=se.font,ce=Y.family,ue=Y.size,_e=Y.color,Le=Y.weight,ze=Y.style,Ge=Y.variant,Ve=Y.textcase,rt=Y.lineposition,pt=Y.shadow,gt;M==="title.text"?gt="titleText":M.indexOf("axis")!==-1?gt="axisTitleText":M.indexOf("colorbar")!==-1&&(gt="colorbarTitleText");var ht=m._context.edits[gt];function lt(Fr,cn){return Fr===void 0||cn===void 0?!1:Fr.replace(u," % ")===cn.replace(u," % ")}D===""?x=0:lt(D,k)&&(ht||(D=""),x=.2,B=!0),W&&(ee===""?oe=0:lt(ee,ie)&&(ht||(ee=""),oe=.2,pe=!0)),c._meta?D=t.templateString(D,c._meta):_._meta&&(D=t.templateString(D,_._meta));var Fe=D||ee||ht,Pe;p||(p=t.ensureSingle(_._infolayer,"g","g-"+E),Pe=_._hColorbarMoveTitle);var be=p.selectAll("text."+E).data(Fe?[0]:[]);be.enter().append("text"),be.text(D).attr("class",E),be.exit().remove();var Ye=null,mt=E+"-subtitle",bt=ee||ht;if(W&&(Ye=p.selectAll("text."+mt).data(bt?[0]:[]),Ye.enter().append("text"),Ye.text(ee).attr("class",mt),Ye.exit().remove()),!Fe)return p;function ft(Fr,cn){t.syncOrAsync([Wt,Zt],{title:Fr,subtitle:cn})}function Wt(Fr){var cn=Fr.title,Nr=Fr.subtitle,Jr;!f&&Pe&&(f={}),f?(Jr="",f.rotate&&(Jr+="rotate("+[f.rotate,g.x,g.y]+")"),(f.offset||Pe)&&(Jr+=r(0,(f.offset||0)-(Pe||0)))):Jr=null,cn.attr("transform",Jr);function Dt(Ie){if(Ie){var tt=v.select(Ie.node().parentNode).select("."+mt);if(!tt.empty()){var st=Ie.node().getBBox();if(st.height){var Ft=st.y+st.height+d*ue;tt.attr("y",Ft)}}}}if(cn.style("opacity",x*l.opacity(z)).call(a.font,{color:l.rgb(z),size:v.round(q,2),family:V,weight:H,style:G,variant:J,textcase:le,shadow:de,lineposition:ye}).attr(g).call(i.convertToTspans,m,Dt),Nr&&!Nr.empty()){var $e=p.select("."+E+"-math-group"),ot=cn.node().getBBox(),De=$e.node()?$e.node().getBBox():void 0,Ee=De?De.y+De.height+d*ue:ot.y+ot.height+h*ue,Ae=t.extendFlat({},g,{y:Ee});Nr.attr("transform",Jr),Nr.style("opacity",oe*l.opacity(_e)).call(a.font,{color:l.rgb(_e),size:v.round(ue,2),family:ce,weight:Le,style:ze,variant:Ge,textcase:Ve,shadow:pt,lineposition:rt}).attr(Ae).call(i.convertToTspans,m)}return C.previousPromises(m)}function Zt(Fr){var cn=Fr.title,Nr=v.select(cn.node().parentNode);if(A&&A.selection&&A.side&&D){Nr.attr("transform",null);var Jr=o[A.side],Dt=A.side==="left"||A.side==="top"?-1:1,$e=w(A.pad)?A.pad:2,ot=a.bBox(Nr.node()),De={t:0,b:0,l:0,r:0},Ee=m._fullLayout._reservedMargin;for(var Ae in Ee)for(var Ie in Ee[Ae]){var tt=Ee[Ae][Ie];De[Ie]=Math.max(De[Ie],tt)}var st={left:De.l,top:De.t,right:_.width-De.r,bottom:_.height-De.b},Ft=A.maxShift||Dt*(st[A.side]-ot[A.side]),Nt=0;if(Ft<0)Nt=Ft;else{var Xt=A.offsetLeft||0,lr=A.offsetTop||0;ot.left-=Xt,ot.right-=Xt,ot.top-=lr,ot.bottom-=lr,A.selection.each(function(){var Mr=a.bBox(this);t.bBoxIntersect(ot,Mr,$e)&&(Nt=Math.max(Nt,Dt*(Mr[A.side]-ot[Jr])+$e))}),Nt=Math.min(Ft,Nt),T._titleScoot=Math.abs(Nt)}if(Nt>0||Ft<0){var Rr={left:[-Nt,0],right:[Nt,0],top:[0,-Nt],bottom:[0,Nt]}[A.side];Nr.attr("transform",r(Rr[0],Rr[1]))}}}be.call(ft,Ye);function cr(Fr,cn){Fr.text(cn).on("mouseover.opacity",function(){v.select(this).transition().duration(s.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(s.HIDE_PLACEHOLDER).style("opacity",0)})}if(ht&&(D?be.on(".opacity",null):(cr(be,k),B=!0),be.call(i.makeEditable,{gd:m}).on("edit",function(Fr){b!==void 0?P.call("_guiRestyle",m,M,Fr,b):P.call("_guiRelayout",m,M,Fr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ft)}).on("input",function(Fr){this.text(Fr||" ").call(i.positionText,g.x,g.y)}),W)){if(W&&!D){var pr=be.node().getBBox(),Br=pr.y+pr.height+h*ue;Ye.attr("y",Br)}ee?Ye.on(".opacity",null):(cr(Ye,ie),pe=!0),Ye.call(i.makeEditable,{gd:m}).on("edit",function(Fr){P.call("_guiRelayout",m,"title.subtitle.text",Fr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ft)}).on("input",function(Fr){this.text(Fr||" ").call(i.positionText,Ye.attr("x"),Ye.attr("y"))})}return be.classed("js-placeholder",B),Ye&&!Ye.empty()&&Ye.classed("js-placeholder",pe),p}Z.exports={draw:y,SUBTITLE_PADDING_EM:h,SUBTITLE_PADDING_MATHJAX_EM:d}}}),qp=Ne({"src/plots/cartesian/set_convert.js"(te,Z){var v=xn(),w=zn().utcFormat,C=In(),P=C.numberFormat,t=la(),r=C.cleanNumber,a=C.ms2DateTime,l=C.dateTime2ms,i=C.ensureNumber,s=C.isArrayOrTypedArray,o=ja(),u=o.FP_SAFE,d=o.BADNUM,h=o.LOG_CLIP,y=o.ONEWEEK,m=o.ONEDAY,E=o.ONEHOUR,c=o.ONEMIN,_=o.ONESEC,T=Hf(),M=xh(),k=M.HOUR_PATTERN,b=M.WEEKDAY_PATTERN;function A(f){return Math.pow(10,f)}function g(f){return f!=null}Z.exports=function(p,x){x=x||{};var N=p._id||"x",D=N.charAt(0);function B(ee,pe){if(ee>0)return Math.log(ee)/Math.LN10;if(ee<=0&&pe&&p.range&&p.range.length===2){var oe=p.range[0],Y=p.range[1];return .5*(oe+Y-2*h*Math.abs(oe-Y))}else return d}function U(ee,pe,oe,Y){if((Y||{}).msUTC&&t(ee))return+ee;var ce=l(ee,oe||p.calendar);if(ce===d)if(t(ee)){ee=+ee;var ue=Math.floor(C.mod(ee+.05,1)*10),_e=Math.round(ee-ue/10);ce=l(new Date(_e))+ue/10}else return d;return ce}function V(ee,pe,oe){return a(ee,pe,oe||p.calendar)}function q(ee){return p._categories[Math.round(ee)]}function z(ee){if(g(ee)){if(p._categoriesMap===void 0&&(p._categoriesMap={}),p._categoriesMap[ee]!==void 0)return p._categoriesMap[ee];p._categories.push(typeof ee=="number"?String(ee):ee);var pe=p._categories.length-1;return p._categoriesMap[ee]=pe,pe}return d}function H(ee,pe){for(var oe=new Array(pe),Y=0;Y<pe;Y++){var ce=(ee[0]||[])[Y],ue=(ee[1]||[])[Y];oe[Y]=G([ce,ue])}return oe}function G(ee){if(p._categoriesMap)return p._categoriesMap[ee]}function J(ee){var pe=G(ee);if(pe!==void 0)return pe;if(t(ee))return+ee}function le(ee){return t(ee)?+ee:G(ee)}function ye(ee,pe,oe){return v.round(oe+pe*ee,2)}function de(ee,pe,oe){return(ee-oe)/pe}var me=function(pe){return t(pe)?ye(pe,p._m,p._b):d},W=function(ee){return de(ee,p._m,p._b)};if(p.rangebreaks){var ie=D==="y";me=function(ee){if(!t(ee))return d;var pe=p._rangebreaks.length;if(!pe)return ye(ee,p._m,p._b);var oe=ie;p.range[0]>p.range[1]&&(oe=!oe);for(var Y=oe?-1:1,ce=Y*ee,ue=0,_e=0;_e<pe;_e++){var Le=Y*p._rangebreaks[_e].min,ze=Y*p._rangebreaks[_e].max;if(ce<Le)break;if(ce>ze)ue=_e+1;else{ue=ce<(Le+ze)/2?_e:_e+1;break}}var Ge=p._B[ue]||0;return isFinite(Ge)?ye(ee,p._m2,Ge):0},W=function(ee){var pe=p._rangebreaks.length;if(!pe)return de(ee,p._m,p._b);for(var oe=0,Y=0;Y<pe&&!(ee<p._rangebreaks[Y].pmin);Y++)ee>p._rangebreaks[Y].pmax&&(oe=Y+1);return de(ee,p._m2,p._B[oe])}}p.c2l=p.type==="log"?B:i,p.l2c=p.type==="log"?A:i,p.l2p=me,p.p2l=W,p.c2p=p.type==="log"?function(ee,pe){return me(B(ee,pe))}:me,p.p2c=p.type==="log"?function(ee){return A(W(ee))}:W,["linear","-"].indexOf(p.type)!==-1?(p.d2r=p.r2d=p.d2c=p.r2c=p.d2l=p.r2l=r,p.c2d=p.c2r=p.l2d=p.l2r=i,p.d2p=p.r2p=function(ee){return p.l2p(r(ee))},p.p2d=p.p2r=W,p.cleanPos=i):p.type==="log"?(p.d2r=p.d2l=function(ee,pe){return B(r(ee),pe)},p.r2d=p.r2c=function(ee){return A(r(ee))},p.d2c=p.r2l=r,p.c2d=p.l2r=i,p.c2r=B,p.l2d=A,p.d2p=function(ee,pe){return p.l2p(p.d2r(ee,pe))},p.p2d=function(ee){return A(W(ee))},p.r2p=function(ee){return p.l2p(r(ee))},p.p2r=W,p.cleanPos=i):p.type==="date"?(p.d2r=p.r2d=C.identity,p.d2c=p.r2c=p.d2l=p.r2l=U,p.c2d=p.c2r=p.l2d=p.l2r=V,p.d2p=p.r2p=function(ee,pe,oe){return p.l2p(U(ee,0,oe))},p.p2d=p.p2r=function(ee,pe,oe){return V(W(ee),pe,oe)},p.cleanPos=function(ee){return C.cleanDate(ee,d,p.calendar)}):p.type==="category"?(p.d2c=p.d2l=z,p.r2d=p.c2d=p.l2d=q,p.d2r=p.d2l_noadd=J,p.r2c=function(ee){var pe=le(ee);return pe!==void 0?pe:p.fraction2r(.5)},p.l2r=p.c2r=i,p.r2l=le,p.d2p=function(ee){return p.l2p(p.r2c(ee))},p.p2d=function(ee){return q(W(ee))},p.r2p=p.d2p,p.p2r=W,p.cleanPos=function(ee){return typeof ee=="string"&&ee!==""?ee:i(ee)}):p.type==="multicategory"&&(p.r2d=p.c2d=p.l2d=q,p.d2r=p.d2l_noadd=J,p.r2c=function(ee){var pe=J(ee);return pe!==void 0?pe:p.fraction2r(.5)},p.r2c_just_indices=G,p.l2r=p.c2r=i,p.r2l=J,p.d2p=function(ee){return p.l2p(p.r2c(ee))},p.p2d=function(ee){return q(W(ee))},p.r2p=p.d2p,p.p2r=W,p.cleanPos=function(ee){return Array.isArray(ee)||typeof ee=="string"&&ee!==""?ee:i(ee)},p.setupMultiCategory=function(ee){var pe=p._traceIndices,oe,Y,ce=p._matchGroup;if(ce&&p._categories.length===0){for(var ue in ce)if(ue!==N){var _e=x[T.id2name(ue)];pe=pe.concat(_e._traceIndices)}}var Le=[[0,{}],[0,{}]],ze=[];for(oe=0;oe<pe.length;oe++){var Ge=ee[pe[oe]];if(D in Ge){var Ve=Ge[D],rt=Ge._length||C.minRowLength(Ve);if(s(Ve[0])&&s(Ve[1]))for(Y=0;Y<rt;Y++){var pt=Ve[0][Y],gt=Ve[1][Y];g(pt)&&g(gt)&&(ze.push([pt,gt]),pt in Le[0][1]||(Le[0][1][pt]=Le[0][0]++),gt in Le[1][1]||(Le[1][1][gt]=Le[1][0]++))}}}for(ze.sort(function(ht,lt){var Fe=Le[0][1],Pe=Fe[ht[0]]-Fe[lt[0]];if(Pe)return Pe;var be=Le[1][1];return be[ht[1]]-be[lt[1]]}),oe=0;oe<ze.length;oe++)z(ze[oe])}),p.fraction2r=function(ee){var pe=p.r2l(p.range[0]),oe=p.r2l(p.range[1]);return p.l2r(pe+ee*(oe-pe))},p.r2fraction=function(ee){var pe=p.r2l(p.range[0]),oe=p.r2l(p.range[1]);return(p.r2l(ee)-pe)/(oe-pe)},p.limitRange=function(ee){var pe=p.minallowed,oe=p.maxallowed;if(!(pe===void 0&&oe===void 0)){ee||(ee="range");var Y=C.nestedProperty(p,ee).get(),ce=C.simpleMap(Y,p.r2l),ue=ce[1]<ce[0];ue&&ce.reverse();var _e=C.simpleMap([pe,oe],p.r2l);if(pe!==void 0&&ce[0]<_e[0]&&(Y[ue?1:0]=pe),oe!==void 0&&ce[1]>_e[1]&&(Y[ue?0:1]=oe),Y[0]===Y[1]){var Le=p.l2r(pe),ze=p.l2r(oe);if(pe!==void 0){var Ge=Le+1;oe!==void 0&&(Ge=Math.min(Ge,ze)),Y[ue?1:0]=Ge}if(oe!==void 0){var Ve=ze+1;pe!==void 0&&(Ve=Math.max(Ve,Le)),Y[ue?0:1]=Ve}}}},p.cleanRange=function(ee,pe){p._cleanRange(ee,pe),p.limitRange(ee)},p._cleanRange=function(ee,pe){pe||(pe={}),ee||(ee="range");var oe=C.nestedProperty(p,ee).get(),Y,ce;if(p.type==="date"?ce=C.dfltRange(p.calendar):D==="y"?ce=M.DFLTRANGEY:p._name==="realaxis"?ce=[0,1]:ce=pe.dfltRange||M.DFLTRANGEX,ce=ce.slice(),(p.rangemode==="tozero"||p.rangemode==="nonnegative")&&(ce[0]=0),!oe||oe.length!==2){C.nestedProperty(p,ee).set(ce);return}var ue=oe[0]===null,_e=oe[1]===null;for(p.type==="date"&&!p.autorange&&(oe[0]=C.cleanDate(oe[0],d,p.calendar),oe[1]=C.cleanDate(oe[1],d,p.calendar)),Y=0;Y<2;Y++)if(p.type==="date"){if(!C.isDateTime(oe[Y],p.calendar)){p[ee]=ce;break}if(p.r2l(oe[0])===p.r2l(oe[1])){var Le=C.constrain(p.r2l(oe[0]),C.MIN_MS+1e3,C.MAX_MS-1e3);oe[0]=p.l2r(Le-1e3),oe[1]=p.l2r(Le+1e3);break}}else{if(!t(oe[Y]))if(!(ue||_e)&&t(oe[1-Y]))oe[Y]=oe[1-Y]*(Y?10:.1);else{p[ee]=ce;break}if(oe[Y]<-u?oe[Y]=-u:oe[Y]>u&&(oe[Y]=u),oe[0]===oe[1]){var ze=Math.max(1,Math.abs(oe[0]*1e-6));oe[0]-=ze,oe[1]+=ze}}},p.setScale=function(ee){var pe=x._size;if(p.overlaying){var oe=T.getFromId({_fullLayout:x},p.overlaying);p.domain=oe.domain}var Y=ee&&p._r?"_r":"range",ce=p.calendar;p.cleanRange(Y);var ue=p.r2l(p[Y][0],ce),_e=p.r2l(p[Y][1],ce),Le=D==="y";if(Le?(p._offset=pe.t+(1-p.domain[1])*pe.h,p._length=pe.h*(p.domain[1]-p.domain[0]),p._m=p._length/(ue-_e),p._b=-p._m*_e):(p._offset=pe.l+p.domain[0]*pe.w,p._length=pe.w*(p.domain[1]-p.domain[0]),p._m=p._length/(_e-ue),p._b=-p._m*ue),p._rangebreaks=[],p._lBreaks=0,p._m2=0,p._B=[],p.rangebreaks){var ze,Ge;if(p._rangebreaks=p.locateBreaks(Math.min(ue,_e),Math.max(ue,_e)),p._rangebreaks.length){for(ze=0;ze<p._rangebreaks.length;ze++)Ge=p._rangebreaks[ze],p._lBreaks+=Math.abs(Ge.max-Ge.min);var Ve=Le;ue>_e&&(Ve=!Ve),Ve&&p._rangebreaks.reverse();var rt=Ve?-1:1;for(p._m2=rt*p._length/(Math.abs(_e-ue)-p._lBreaks),p._B.push(-p._m2*(Le?_e:ue)),ze=0;ze<p._rangebreaks.length;ze++)Ge=p._rangebreaks[ze],p._B.push(p._B[p._B.length-1]-rt*p._m2*(Ge.max-Ge.min));for(ze=0;ze<p._rangebreaks.length;ze++)Ge=p._rangebreaks[ze],Ge.pmin=me(Ge.min),Ge.pmax=me(Ge.max)}}if(!isFinite(p._m)||!isFinite(p._b)||p._length<0)throw x._replotting=!1,new Error("Something went wrong with axis scaling")},p.maskBreaks=function(ee){var pe=p.rangebreaks||[],oe,Y,ce,ue,_e;pe._cachedPatterns||(pe._cachedPatterns=pe.map(function(Fe){return Fe.enabled&&Fe.bounds?C.simpleMap(Fe.bounds,Fe.pattern?r:p.d2c):null})),pe._cachedValues||(pe._cachedValues=pe.map(function(Fe){return Fe.enabled&&Fe.values?C.simpleMap(Fe.values,p.d2c).sort(C.sorterAsc):null}));for(var Le=0;Le<pe.length;Le++){var ze=pe[Le];if(ze.enabled){if(ze.bounds){var Ge=ze.pattern;switch(oe=pe._cachedPatterns[Le],Y=oe[0],ce=oe[1],Ge){case b:_e=new Date(ee),ue=_e.getUTCDay(),Y>ce&&(ce+=7,ue<Y&&(ue+=7));break;case k:_e=new Date(ee);var Ve=_e.getUTCHours(),rt=_e.getUTCMinutes(),pt=_e.getUTCSeconds(),gt=_e.getUTCMilliseconds();ue=Ve+(rt/60+pt/3600+gt/36e5),Y>ce&&(ce+=24,ue<Y&&(ue+=24));break;case"":ue=ee;break}if(ue>=Y&&ue<ce)return d}else for(var ht=pe._cachedValues[Le],lt=0;lt<ht.length;lt++)if(Y=ht[lt],ce=Y+ze.dvalue,ee>=Y&&ee<ce)return d}}return ee},p.locateBreaks=function(ee,pe){var oe,Y,ce,ue,_e=[];if(!p.rangebreaks)return _e;var Le=p.rangebreaks.slice().sort(function(be,Ye){return be.pattern===b&&Ye.pattern===k?-1:Ye.pattern===b&&be.pattern===k?1:0}),ze=function(be,Ye){if(be=C.constrain(be,ee,pe),Ye=C.constrain(Ye,ee,pe),be!==Ye){for(var mt=!0,bt=0;bt<_e.length;bt++){var ft=_e[bt];be<ft.max&&Ye>=ft.min&&(be<ft.min&&(ft.min=be),Ye>ft.max&&(ft.max=Ye),mt=!1)}mt&&_e.push({min:be,max:Ye})}};for(oe=0;oe<Le.length;oe++){var Ge=Le[oe];if(Ge.enabled)if(Ge.bounds){var Ve=ee,rt=pe;Ge.pattern&&(Ve=Math.floor(Ve)),Y=C.simpleMap(Ge.bounds,Ge.pattern?r:p.r2l),ce=Y[0],ue=Y[1];var pt=new Date(Ve),gt,ht;switch(Ge.pattern){case b:ht=y,gt=((ue<ce?7:0)+(ue-ce))*m,Ve+=ce*m-(pt.getUTCDay()*m+pt.getUTCHours()*E+pt.getUTCMinutes()*c+pt.getUTCSeconds()*_+pt.getUTCMilliseconds());break;case k:ht=m,gt=((ue<ce?24:0)+(ue-ce))*E,Ve+=ce*E-(pt.getUTCHours()*E+pt.getUTCMinutes()*c+pt.getUTCSeconds()*_+pt.getUTCMilliseconds());break;default:Ve=Math.min(Y[0],Y[1]),rt=Math.max(Y[0],Y[1]),ht=rt-Ve,gt=ht}for(var lt=Ve;lt<rt;lt+=ht)ze(lt,lt+gt)}else for(var Fe=C.simpleMap(Ge.values,p.d2c),Pe=0;Pe<Fe.length;Pe++)ce=Fe[Pe],ue=ce+Ge.dvalue,ze(ce,ue)}return _e.sort(function(be,Ye){return be.min-Ye.min}),_e},p.makeCalcdata=function(ee,pe,oe){var Y,ce,ue,_e,Le=p.type,ze=Le==="date"&&ee[pe+"calendar"];if(pe in ee){if(Y=ee[pe],_e=ee._length||C.minRowLength(Y),C.isTypedArray(Y)&&(Le==="linear"||Le==="log")){if(_e===Y.length)return Y;if(Y.subarray)return Y.subarray(0,_e)}if(Le==="multicategory")return H(Y,_e);for(ce=new Array(_e),ue=0;ue<_e;ue++)ce[ue]=p.d2c(Y[ue],0,ze,oe)}else{var Ge=pe+"0"in ee?p.d2c(ee[pe+"0"],0,ze):0,Ve=ee["d"+pe]?Number(ee["d"+pe]):1;for(Y=ee[{x:"y",y:"x"}[pe]],_e=ee._length||Y.length,ce=new Array(_e),ue=0;ue<_e;ue++)ce[ue]=Ge+ue*Ve}if(p.rangebreaks)for(ue=0;ue<_e;ue++)ce[ue]=p.maskBreaks(ce[ue]);return ce},p.isValidRange=function(ee,pe){return Array.isArray(ee)&&ee.length===2&&(pe&&ee[0]===null||t(p.r2l(ee[0])))&&(pe&&ee[1]===null||t(p.r2l(ee[1])))},p.getAutorangeDflt=function(ee,pe){var oe=!p.isValidRange(ee,"nullOk");return oe&&pe&&pe.reverseDflt?oe="reversed":ee&&(ee[0]===null&&ee[1]===null?oe=!0:ee[0]===null&&ee[1]!==null?oe="min":ee[0]!==null&&ee[1]===null&&(oe="max")),oe},p.isReversed=function(){var ee=p.autorange;return ee==="reversed"||ee==="min reversed"||ee==="max reversed"},p.isPtWithinRange=function(ee,pe){var oe=p.c2l(ee[D],null,pe),Y=p.r2l(p.range[0]),ce=p.r2l(p.range[1]);return Y<ce?Y<=oe&&oe<=ce:ce<=oe&&oe<=Y},p._emptyCategories=function(){p._categories=[],p._categoriesMap={}},p.clearCalc=function(){var ee=p._matchGroup;if(ee){var pe=null,oe=null;for(var Y in ee){var ce=x[T.id2name(Y)];if(ce._categories){pe=ce._categories,oe=ce._categoriesMap;break}}pe&&oe?(p._categories=pe,p._categoriesMap=oe):p._emptyCategories()}else p._emptyCategories();if(p._initialCategories)for(var ue=0;ue<p._initialCategories.length;ue++)z(p._initialCategories[ue])},p.sortByInitialCategories=function(){var ee=[];if(p._emptyCategories(),p._initialCategories)for(var pe=0;pe<p._initialCategories.length;pe++)z(p._initialCategories[pe]);ee=ee.concat(p._traceIndices);var oe=p._matchGroup;for(var Y in oe)if(N!==Y){var ce=x[T.id2name(Y)];ce._categories=p._categories,ce._categoriesMap=p._categoriesMap,ee=ee.concat(ce._traceIndices)}return ee};var se=x._d3locale;p.type==="date"&&(p._dateFormat=se?se.timeFormat:w,p._extraFormat=x._extraFormat),p._separators=x.separators,p._numFormat=se?se.numberFormat:P,delete p._minDtick,delete p._forceTick0}}}),Ty=Ne({"src/plots/cartesian/axis_autotype.js"(te,Z){var v=la(),w=In(),C=ja().BADNUM,P=w.isArrayOrTypedArray,t=w.isDateTime,r=w.cleanNumber,a=Math.round;Z.exports=function(y,m,E){var c=y,_=E.noMultiCategory;if(P(c)&&!c.length)return"-";if(!_&&d(c))return"multicategory";if(_&&Array.isArray(c[0])){for(var T=[],M=0;M<c.length;M++)if(P(c[M]))for(var k=0;k<c[M].length;k++)T.push(c[M][k]);c=T}if(s(c,m))return"date";var b=E.autotypenumbers!=="strict";return u(c,b)?"category":i(c,b)?"linear":"-"};function l(h,y){return y?v(h):typeof h=="number"}function i(h,y){for(var m=h.length,E=0;E<m;E++)if(l(h[E],y))return!0;return!1}function s(h,y){for(var m=h.length,E=o(m),c=0,_=0,T={},M=0;M<m;M+=E){var k=a(M),b=h[k],A=String(b);T[A]||(T[A]=1,t(b,y)&&c++,v(b)&&_++)}return c>_*2}function o(h){return Math.max(1,(h-1)/1e3)}function u(h,y){for(var m=h.length,E=o(m),c=0,_=0,T={},M=0;M<m;M+=E){var k=a(M),b=h[k],A=String(b);if(!T[A]){T[A]=1;var g=typeof b;g==="boolean"?_++:(y?r(b)!==C:g==="number")?c++:g==="string"&&_++}}return _>c*2}function d(h){return P(h[0])&&P(h[1])}}}),Cm=Ne({"src/plots/cartesian/autorange.js"(te,Z){var v=xn(),w=la(),C=In(),P=ja().FP_SAFE,t=Xo(),r=zs(),a=Hf(),l=a.getFromId,i=a.isLinked;Z.exports={applyAutorangeOptions:p,getAutoRange:s,makePadFn:u,doAutoRange:m,findExtremes:E,concatExtremes:y};function s(x,N){var D,B,U=[],V=x._fullLayout,q=u(V,N,0),z=u(V,N,1),H=y(x,N),G=H.min,J=H.max;if(G.length===0||J.length===0)return C.simpleMap(N.range,N.r2l);var le=G[0].val,ye=J[0].val;for(D=1;D<G.length&&le===ye;D++)le=Math.min(le,G[D].val);for(D=1;D<J.length&&le===ye;D++)ye=Math.max(ye,J[D].val);var de=N.autorange,me=de==="reversed"||de==="min reversed"||de==="max reversed";if(!me&&N.range){var W=C.simpleMap(N.range,N.r2l);me=W[1]<W[0]}N.autorange==="reversed"&&(N.autorange=!0);var ie=N.rangemode,se=ie==="tozero",ee=ie==="nonnegative",pe=N._length,oe=pe/10,Y=0,ce,ue,_e,Le,ze,Ge;for(D=0;D<G.length;D++)for(ce=G[D],B=0;B<J.length;B++)ue=J[B],Ge=ue.val-ce.val-o(N,ce.val,ue.val),Ge>0&&(ze=pe-q(ce)-z(ue),ze>oe?Ge/ze>Y&&(_e=ce,Le=ue,Y=Ge/ze):Ge/pe>Y&&(_e={val:ce.val,nopad:1},Le={val:ue.val,nopad:1},Y=Ge/pe));function Ve(lt,Fe){return Math.max(lt,z(Fe))}if(le===ye){var rt=le-1,pt=le+1;if(se)if(le===0)U=[0,1];else{var gt=(le>0?J:G).reduce(Ve,0),ht=le/(1-Math.min(.5,gt/pe));U=le>0?[0,ht]:[ht,0]}else ee?U=[Math.max(0,rt),Math.max(1,pt)]:U=[rt,pt]}else se?(_e.val>=0&&(_e={val:0,nopad:1}),Le.val<=0&&(Le={val:0,nopad:1})):ee&&(_e.val-Y*q(_e)<0&&(_e={val:0,nopad:1}),Le.val<=0&&(Le={val:1,nopad:1})),Y=(Le.val-_e.val-o(N,ce.val,ue.val))/(pe-q(_e)-z(Le)),U=[_e.val-Y*q(_e),Le.val+Y*z(Le)];return U=p(U,N),N.limitRange&&N.limitRange(),me&&U.reverse(),C.simpleMap(U,N.l2r||Number)}function o(x,N,D){var B=0;if(x.rangebreaks)for(var U=x.locateBreaks(N,D),V=0;V<U.length;V++){var q=U[V];B+=q.max-q.min}return B}function u(x,N,D){var B=.05*N._length,U=N._anchorAxis||{};if((N.ticklabelposition||"").indexOf("inside")!==-1||(U.ticklabelposition||"").indexOf("inside")!==-1){var V=N.isReversed();if(!V){var q=C.simpleMap(N.range,N.r2l);V=q[1]<q[0]}V&&(D=!D)}var z=0;return i(x,N._id)||(z=h(x,N,D)),B=Math.max(z,B),N.constrain==="domain"&&N._inputDomain&&(B*=(N._inputDomain[1]-N._inputDomain[0])/(N.domain[1]-N.domain[0])),function(G){return G.nopad?0:G.pad+(G.extrapad?B:z)}}var d=3;function h(x,N,D){var B=0,U=N._id.charAt(0)==="x";for(var V in x._plots){var q=x._plots[V];if(!(N._id!==q.xaxis._id&&N._id!==q.yaxis._id)){var z=(U?q.yaxis:q.xaxis)||{};if((z.ticklabelposition||"").indexOf("inside")!==-1&&(!D&&(z.side==="left"||z.side==="bottom")||D&&(z.side==="top"||z.side==="right"))){if(z._vals){var H=C.deg2rad(z._tickAngles[z._id+"tick"]||0),G=Math.abs(Math.cos(H)),J=Math.abs(Math.sin(H));if(!z._vals[0].bb){var le=z._id+"tick",ye=z._selections[le];ye.each(function(ee){var pe=v.select(this),oe=pe.select(".text-math-group");oe.empty()&&(ee.bb=r.bBox(pe.node()))})}for(var de=0;de<z._vals.length;de++){var me=z._vals[de],W=me.bb;if(W){var ie=2*d+W.width,se=2*d+W.height;B=Math.max(B,U?Math.max(ie*G,se*J):Math.max(se*G,ie*J))}}}z.ticks==="inside"&&z.ticklabelposition==="inside"&&(B+=z.ticklen||0)}}}return B}function y(x,N,D){var B=N._id,U=x._fullData,V=x._fullLayout,q=[],z=[],H,G,J;function le(ie,se){for(H=0;H<se.length;H++){var ee=ie[se[H]],pe=(ee._extremes||{})[B];if(ee.visible===!0&&pe){for(G=0;G<pe.min.length;G++)J=pe.min[G],c(q,J.val,J.pad,{extrapad:J.extrapad});for(G=0;G<pe.max.length;G++)J=pe.max[G],_(z,J.val,J.pad,{extrapad:J.extrapad})}}}if(le(U,N._traceIndices),le(V.annotations||[],N._annIndices||[]),le(V.shapes||[],N._shapeIndices||[]),N._matchGroup&&!D){for(var ye in N._matchGroup)if(ye!==N._id){var de=l(x,ye),me=y(x,de,!0),W=N._length/de._length;for(G=0;G<me.min.length;G++)J=me.min[G],c(q,J.val,J.pad*W,{extrapad:J.extrapad});for(G=0;G<me.max.length;G++)J=me.max[G],_(z,J.val,J.pad*W,{extrapad:J.extrapad})}}return{min:q,max:z}}function m(x,N,D){if(N.setScale(),N.autorange){N.range=D?D.slice():s(x,N),N._r=N.range.slice(),N._rl=C.simpleMap(N._r,N.r2l);var B=N._input,U={};U[N._attr+".range"]=N.range,U[N._attr+".autorange"]=N.autorange,t.call("_storeDirectGUIEdit",x.layout,x._fullLayout._preGUI,U),B.range=N.range.slice(),B.autorange=N.autorange}var V=N._anchorAxis;if(V&&V.rangeslider){var q=V.rangeslider[N._name];q&&q.rangemode==="auto"&&(q.range=s(x,N)),V._input.rangeslider[N._name]=C.extendFlat({},q)}}function E(x,N,D){D||(D={}),x._m||x.setScale();var B=[],U=[],V=N.length,q=D.padded||!1,z=D.tozero&&(x.type==="linear"||x.type==="-"),H=x.type==="log",G=!1,J=D.vpadLinearized||!1,le,ye,de,me,W,ie,se,ee,pe;function oe(Ve){if(Array.isArray(Ve))return G=!0,function(pt){return Math.max(Number(Ve[pt]||0),0)};var rt=Math.max(Number(Ve||0),0);return function(){return rt}}var Y=oe((x._m>0?D.ppadplus:D.ppadminus)||D.ppad||0),ce=oe((x._m>0?D.ppadminus:D.ppadplus)||D.ppad||0),ue=oe(D.vpadplus||D.vpad),_e=oe(D.vpadminus||D.vpad);if(!G){if(ee=1/0,pe=-1/0,H)for(le=0;le<V;le++)ye=N[le],ye<ee&&ye>0&&(ee=ye),ye>pe&&ye<P&&(pe=ye);else for(le=0;le<V;le++)ye=N[le],ye<ee&&ye>-P&&(ee=ye),ye>pe&&ye<P&&(pe=ye);N=[ee,pe],V=2}var Le={tozero:z,extrapad:q};function ze(Ve){de=N[Ve],w(de)&&(ie=Y(Ve),se=ce(Ve),J?(me=x.c2l(de)-_e(Ve),W=x.c2l(de)+ue(Ve)):(ee=de-_e(Ve),pe=de+ue(Ve),H&&ee<pe/10&&(ee=pe/10),me=x.c2l(ee),W=x.c2l(pe)),z&&(me=Math.min(0,me),W=Math.max(0,W)),M(me)&&c(B,me,se,Le),M(W)&&_(U,W,ie,Le))}var Ge=Math.min(6,V);for(le=0;le<Ge;le++)ze(le);for(le=V-1;le>=Ge;le--)ze(le);return{min:B,max:U,opts:D}}function c(x,N,D,B){T(x,N,D,B,k)}function _(x,N,D,B){T(x,N,D,B,b)}function T(x,N,D,B,U){for(var V=B.tozero,q=B.extrapad,z=!0,H=0;H<x.length&&z;H++){var G=x[H];if(U(G.val,N)&&G.pad>=D&&(G.extrapad||!q)){z=!1;break}else U(N,G.val)&&G.pad<=D&&(q||!G.extrapad)&&(x.splice(H,1),H--)}if(z){var J=V&&N===0;x.push({val:N,pad:J?0:D,extrapad:J?!1:q})}}function M(x){return w(x)&&Math.abs(x)<P}function k(x,N){return x<=N}function b(x,N){return x>=N}function A(x,N){var D=N.autorangeoptions;return D&&D.minallowed!==void 0&&f(N,D.minallowed,D.maxallowed)?D.minallowed:D&&D.clipmin!==void 0&&f(N,D.clipmin,D.clipmax)?Math.max(x,N.d2l(D.clipmin)):x}function g(x,N){var D=N.autorangeoptions;return D&&D.maxallowed!==void 0&&f(N,D.minallowed,D.maxallowed)?D.maxallowed:D&&D.clipmax!==void 0&&f(N,D.clipmin,D.clipmax)?Math.min(x,N.d2l(D.clipmax)):x}function f(x,N,D){return N!==void 0&&D!==void 0?(N=x.d2l(N),D=x.d2l(D),N<D):!0}function p(x,N){if(!N||!N.autorangeoptions)return x;var D=x[0],B=x[1],U=N.autorangeoptions.include;if(U!==void 0){var V=N.d2l(D),q=N.d2l(B);C.isArrayOrTypedArray(U)||(U=[U]);for(var z=0;z<U.length;z++){var H=N.d2l(U[z]);V>=H&&(V=H,D=H),q<=H&&(q=H,B=H)}}return D=A(D,N),B=g(B,N),[D,B]}}}),Os=Ne({"src/plots/cartesian/axes.js"(te,Z){var v=xn(),w=la(),C=uf(),P=Xo(),t=In(),r=t.strTranslate,a=uc(),l=wy(),i=io(),s=zs(),o=wd(),u=Pw(),d=ja(),h=d.ONEMAXYEAR,y=d.ONEAVGYEAR,m=d.ONEMINYEAR,E=d.ONEMAXQUARTER,c=d.ONEAVGQUARTER,_=d.ONEMINQUARTER,T=d.ONEMAXMONTH,M=d.ONEAVGMONTH,k=d.ONEMINMONTH,b=d.ONEWEEK,A=d.ONEDAY,g=A/2,f=d.ONEHOUR,p=d.ONEMIN,x=d.ONESEC,N=d.ONEMILLI,D=d.ONEMICROSEC,B=d.MINUS_SIGN,U=d.BADNUM,V={K:"zeroline"},q={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},H={K:"tick",L:"path"},G={K:"tick",L:"text"},J={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},le=bd(),ye=le.MID_SHIFT,de=le.CAP_SHIFT,me=le.LINE_SPACING,W=le.OPPOSITE_SIDE,ie=3,se=Z.exports={};se.setConvert=qp();var ee=Ty(),pe=Hf(),oe=pe.idSort,Y=pe.isLinked;se.id2name=pe.id2name,se.name2id=pe.name2id,se.cleanId=pe.cleanId,se.list=pe.list,se.listIds=pe.listIds,se.getFromId=pe.getFromId,se.getFromTrace=pe.getFromTrace;var ce=Cm();se.getAutoRange=ce.getAutoRange,se.findExtremes=ce.findExtremes;var ue=1e-4;function _e(qt){var Ct=(qt[1]-qt[0])*ue;return[qt[0]-Ct,qt[1]+Ct]}se.coerceRef=function(qt,Ct,Ur,Qr,tn,Xr){var en=Qr.charAt(Qr.length-1),Tn=Ur._fullLayout._subplots[en+"axis"],hn=Qr+"ref",Rt={};return tn||(tn=Tn[0]||(typeof Xr=="string"?Xr:Xr[0])),Xr||(Xr=tn),Tn=Tn.concat(Tn.map(function(xr){return xr+" domain"})),Rt[hn]={valType:"enumerated",values:Tn.concat(Xr?typeof Xr=="string"?[Xr]:Xr:[]),dflt:tn},t.coerce(qt,Ct,Rt,hn)},se.getRefType=function(qt){return qt===void 0?qt:qt==="paper"?"paper":qt==="pixel"?"pixel":/( domain)$/.test(qt)?"domain":"range"},se.coercePosition=function(qt,Ct,Ur,Qr,tn,Xr){var en,Tn,hn=se.getRefType(Qr);if(hn!=="range")en=t.ensureNumber,Tn=Ur(tn,Xr);else{var Rt=se.getFromId(Ct,Qr);Xr=Rt.fraction2r(Xr),Tn=Ur(tn,Xr),en=Rt.cleanPos}qt[tn]=en(Tn)},se.cleanPosition=function(qt,Ct,Ur){var Qr=Ur==="paper"||Ur==="pixel"?t.ensureNumber:se.getFromId(Ct,Ur).cleanPos;return Qr(qt)},se.redrawComponents=function(qt,Ct){Ct=Ct||se.listIds(qt);var Ur=qt._fullLayout;function Qr(tn,Xr,en,Tn){for(var hn=P.getComponentMethod(tn,Xr),Rt={},xr=0;xr<Ct.length;xr++)for(var Wr=Ur[se.id2name(Ct[xr])],An=Wr[en],Xn=0;Xn<An.length;Xn++){var na=An[Xn];if(!Rt[na]&&(hn(qt,na),Rt[na]=1,Tn))return}}Qr("annotations","drawOne","_annIndices"),Qr("shapes","drawOne","_shapeIndices"),Qr("images","draw","_imgIndices",!0),Qr("selections","drawOne","_selectionIndices")};var Le=se.getDataConversions=function(qt,Ct,Ur,Qr){var tn,Xr=Ur==="x"||Ur==="y"||Ur==="z"?Ur:Qr;if(t.isArrayOrTypedArray(Xr)){if(tn={type:ee(Qr,void 0,{autotypenumbers:qt._fullLayout.autotypenumbers}),_categories:[]},se.setConvert(tn),tn.type==="category")for(var en=0;en<Qr.length;en++)tn.d2c(Qr[en])}else tn=se.getFromTrace(qt,Ct,Xr);return tn?{d2c:tn.d2c,c2d:tn.c2d}:Xr==="ids"?{d2c:Ge,c2d:Ge}:{d2c:ze,c2d:ze}};function ze(qt){return+qt}function Ge(qt){return String(qt)}se.getDataToCoordFunc=function(qt,Ct,Ur,Qr){return Le(qt,Ct,Ur,Qr).d2c},se.counterLetter=function(qt){var Ct=qt.charAt(0);if(Ct==="x")return"y";if(Ct==="y")return"x"},se.minDtick=function(qt,Ct,Ur,Qr){["log","category","multicategory"].indexOf(qt.type)!==-1||!Qr?qt._minDtick=0:qt._minDtick===void 0?(qt._minDtick=Ct,qt._forceTick0=Ur):qt._minDtick&&((qt._minDtick/Ct+1e-6)%1<2e-6&&((Ur-qt._forceTick0)/Ct%1+1.000001)%1<2e-6?(qt._minDtick=Ct,qt._forceTick0=Ur):((Ct/qt._minDtick+1e-6)%1>2e-6||((Ur-qt._forceTick0)/qt._minDtick%1+1.000001)%1>2e-6)&&(qt._minDtick=0))},se.saveRangeInitial=function(qt,Ct){for(var Ur=se.list(qt,"",!0),Qr=!1,tn=0;tn<Ur.length;tn++){var Xr=Ur[tn],en=Xr._rangeInitial0===void 0&&Xr._rangeInitial1===void 0,Tn=en||Xr.range[0]!==Xr._rangeInitial0||Xr.range[1]!==Xr._rangeInitial1,hn=Xr.autorange;(en&&hn!==!0||Ct&&Tn)&&(Xr._rangeInitial0=hn==="min"||hn==="max reversed"?void 0:Xr.range[0],Xr._rangeInitial1=hn==="max"||hn==="min reversed"?void 0:Xr.range[1],Xr._autorangeInitial=hn,Qr=!0)}return Qr},se.saveShowSpikeInitial=function(qt,Ct){for(var Ur=se.list(qt,"",!0),Qr=!1,tn="on",Xr=0;Xr<Ur.length;Xr++){var en=Ur[Xr],Tn=en._showSpikeInitial===void 0,hn=Tn||en.showspikes!==en._showspikes;(Tn||Ct&&hn)&&(en._showSpikeInitial=en.showspikes,Qr=!0),tn==="on"&&!en.showspikes&&(tn="off")}return qt._fullLayout._cartesianSpikesEnabled=tn,Qr},se.autoBin=function(qt,Ct,Ur,Qr,tn,Xr){var en=t.aggNums(Math.min,null,qt),Tn=t.aggNums(Math.max,null,qt);if(Ct.type==="category"||Ct.type==="multicategory")return{start:en-.5,end:Tn+.5,size:Math.max(1,Math.round(Xr)||1),_dataSpan:Tn-en};tn||(tn=Ct.calendar);var hn;if(Ct.type==="log"?hn={type:"linear",range:[en,Tn]}:hn={type:Ct.type,range:t.simpleMap([en,Tn],Ct.c2r,0,tn),calendar:tn},se.setConvert(hn),Xr=Xr&&u.dtick(Xr,hn.type),Xr)hn.dtick=Xr,hn.tick0=u.tick0(void 0,hn.type,tn);else{var Rt;if(Ur)Rt=(Tn-en)/Ur;else{var xr=t.distinctVals(qt),Wr=Math.pow(10,Math.floor(Math.log(xr.minDiff)/Math.LN10)),An=Wr*t.roundUp(xr.minDiff/Wr,[.9,1.9,4.9,9.9],!0);Rt=Math.max(An,2*t.stdev(qt)/Math.pow(qt.length,Qr?.25:.4)),w(Rt)||(Rt=1)}se.autoTicks(hn,Rt)}var Xn=hn.dtick,na=se.tickIncrement(se.tickFirst(hn),Xn,"reverse",tn),ra,Sn;if(typeof Xn=="number")na=Ve(na,qt,hn,en,Tn),Sn=1+Math.floor((Tn-na)/Xn),ra=na+Sn*Xn;else for(hn.dtick.charAt(0)==="M"&&(na=rt(na,qt,Xn,en,tn)),ra=na,Sn=0;ra<=Tn;)ra=se.tickIncrement(ra,Xn,!1,tn),Sn++;return{start:Ct.c2r(na,0,tn),end:Ct.c2r(ra,0,tn),size:Xn,_dataSpan:Tn-en}};function Ve(qt,Ct,Ur,Qr,tn){var Xr=0,en=0,Tn=0,hn=0;function Rt(Xn){return(1+(Xn-qt)*100/Ur.dtick)%100<2}for(var xr=0;xr<Ct.length;xr++)Ct[xr]%1===0?Tn++:w(Ct[xr])||hn++,Rt(Ct[xr])&&Xr++,Rt(Ct[xr]+Ur.dtick/2)&&en++;var Wr=Ct.length-hn;if(Tn===Wr&&Ur.type!=="date")Ur.dtick<1?qt=Qr-.5*Ur.dtick:(qt-=.5,qt+Ur.dtick<Qr&&(qt+=Ur.dtick));else if(en<Wr*.1&&(Xr>Wr*.3||Rt(Qr)||Rt(tn))){var An=Ur.dtick/2;qt+=qt+An<Qr?An:-An}return qt}function rt(qt,Ct,Ur,Qr,tn){var Xr=t.findExactDates(Ct,tn),en=.8;if(Xr.exactDays>en){var Tn=Number(Ur.substr(1));Xr.exactYears>en&&Tn%12===0?qt=se.tickIncrement(qt,"M6","reverse")+A*1.5:Xr.exactMonths>en?qt=se.tickIncrement(qt,"M1","reverse")+A*15.5:qt-=g;var hn=se.tickIncrement(qt,Ur);if(hn<=Qr)return hn}return qt}se.prepMinorTicks=function(qt,Ct,Ur){if(!Ct.minor.dtick){delete qt.dtick;var Qr=Ct.dtick&&w(Ct._tmin),tn;if(Qr){var Xr=se.tickIncrement(Ct._tmin,Ct.dtick,!0);tn=[Ct._tmin,Xr*.99+Ct._tmin*.01]}else{var en=t.simpleMap(Ct.range,Ct.r2l);tn=[en[0],.8*en[0]+.2*en[1]]}if(qt.range=t.simpleMap(tn,Ct.l2r),qt._isMinor=!0,se.prepTicks(qt,Ur),Qr){var Tn=w(Ct.dtick),hn=w(qt.dtick),Rt=Tn?Ct.dtick:+Ct.dtick.substring(1),xr=hn?qt.dtick:+qt.dtick.substring(1);Tn&&hn?pt(Rt,xr)?Rt===2*b&&xr===2*A&&(qt.dtick=b):Rt===2*b&&xr===3*A?qt.dtick=b:Rt===b&&!(Ct._input.minor||{}).nticks?qt.dtick=A:gt(Rt/xr,2.5)?qt.dtick=Rt/2:qt.dtick=Rt:String(Ct.dtick).charAt(0)==="M"?hn?qt.dtick="M1":pt(Rt,xr)?Rt>=12&&xr===2&&(qt.dtick="M3"):qt.dtick=Ct.dtick:String(qt.dtick).charAt(0)==="L"?String(Ct.dtick).charAt(0)==="L"?pt(Rt,xr)||(qt.dtick=gt(Rt/xr,2.5)?Ct.dtick/2:Ct.dtick):qt.dtick="D1":qt.dtick==="D2"&&+Ct.dtick>1&&(qt.dtick=1)}qt.range=Ct.range}Ct.minor._tick0Init===void 0&&(qt.tick0=Ct.tick0)};function pt(qt,Ct){return Math.abs((qt/Ct+.5)%1-.5)<.001}function gt(qt,Ct){return Math.abs(qt/Ct-1)<.001}se.prepTicks=function(qt,Ct){var Ur=t.simpleMap(qt.range,qt.r2l,void 0,void 0,Ct);if(qt.tickmode==="auto"||!qt.dtick){var Qr=qt.nticks,tn;Qr||(qt.type==="category"||qt.type==="multicategory"?(tn=qt.tickfont?t.bigFont(qt.tickfont.size||12):15,Qr=qt._length/tn):(tn=qt._id.charAt(0)==="y"?40:80,Qr=t.constrain(qt._length/tn,4,9)+1),qt._name==="radialaxis"&&(Qr*=2)),qt.minor&&qt.minor.tickmode!=="array"||qt.tickmode==="array"&&(Qr*=100),qt._roughDTick=Math.abs(Ur[1]-Ur[0])/Qr,se.autoTicks(qt,qt._roughDTick),qt._minDtick>0&&qt.dtick<qt._minDtick*2&&(qt.dtick=qt._minDtick,qt.tick0=qt.l2r(qt._forceTick0))}qt.ticklabelmode==="period"&&lt(qt),qt.tick0||(qt.tick0=qt.type==="date"?"2000-01-01":0),qt.type==="date"&&qt.dtick<.1&&(qt.dtick=.1),Fr(qt)};function ht(qt){return+qt.substring(1)}function lt(qt){var Ct;function Ur(){return!(w(qt.dtick)||qt.dtick.charAt(0)!=="M")}var Qr=Ur(),tn=se.getTickFormat(qt);if(tn){var Xr=qt._dtickInit!==qt.dtick;/%[fLQsSMX]/.test(tn)||(/%[HI]/.test(tn)?(Ct=f,Xr&&!Qr&&qt.dtick<f&&(qt.dtick=f)):/%p/.test(tn)?(Ct=g,Xr&&!Qr&&qt.dtick<g&&(qt.dtick=g)):/%[Aadejuwx]/.test(tn)?(Ct=A,Xr&&!Qr&&qt.dtick<A&&(qt.dtick=A)):/%[UVW]/.test(tn)?(Ct=b,Xr&&!Qr&&qt.dtick<b&&(qt.dtick=b)):/%[Bbm]/.test(tn)?(Ct=M,Xr&&(Qr?ht(qt.dtick)<1:qt.dtick<k)&&(qt.dtick="M1")):/%[q]/.test(tn)?(Ct=c,Xr&&(Qr?ht(qt.dtick)<3:qt.dtick<_)&&(qt.dtick="M3")):/%[Yy]/.test(tn)&&(Ct=y,Xr&&(Qr?ht(qt.dtick)<12:qt.dtick<m)&&(qt.dtick="M12")))}Qr=Ur(),Qr&&qt.tick0===qt._dowTick0&&(qt.tick0=qt._rawTick0),qt._definedDelta=Ct}function Fe(qt,Ct,Ur){for(var Qr=0;Qr<qt.length;Qr++){var tn=qt[Qr].value,Xr=Qr,en=Qr+1;Qr<qt.length-1?(Xr=Qr,en=Qr+1):Qr>0?(Xr=Qr-1,en=Qr):(Xr=Qr,en=Qr);var Tn=qt[Xr].value,hn=qt[en].value,Rt=Math.abs(hn-Tn),xr=Ur||Rt,Wr=0;xr>=m?Rt>=m&&Rt<=h?Wr=Rt:Wr=y:Ur===c&&xr>=_?Rt>=_&&Rt<=E?Wr=Rt:Wr=c:xr>=k?Rt>=k&&Rt<=T?Wr=Rt:Wr=M:Ur===b&&xr>=b?Wr=b:xr>=A?Wr=A:Ur===g&&xr>=g?Wr=g:Ur===f&&xr>=f&&(Wr=f);var An;Wr>=Rt&&(Wr=Rt,An=!0);var Xn=tn+Wr;if(Ct.rangebreaks&&Wr>0){for(var na=84,ra=0,Sn=0;Sn<na;Sn++){var Wn=(Sn+.5)/na;Ct.maskBreaks(tn*(1-Wn)+Wn*Xn)!==U&&ra++}Wr*=ra/na,Wr||(qt[Qr].drop=!0),An&&Rt>b&&(Wr=Rt)}(Wr>0||Qr===0)&&(qt[Qr].periodX=tn+Wr/2)}}se.calcTicks=function(Ct,Ur){for(var Qr=Ct.type,tn=Ct.calendar,Xr=Ct.ticklabelstep,en=Ct.ticklabelmode==="period",Tn=Ct.range[0]>Ct.range[1],hn=!Ct.ticklabelindex||t.isArrayOrTypedArray(Ct.ticklabelindex)?Ct.ticklabelindex:[Ct.ticklabelindex],Rt=t.simpleMap(Ct.range,Ct.r2l,void 0,void 0,Ur),xr=Rt[1]<Rt[0],Wr=Math.min(Rt[0],Rt[1]),An=Math.max(Rt[0],Rt[1]),Xn=Math.max(1e3,Ct._length||0),na=[],ra=[],Sn=[],Wn=[],Fi=[],Ya=Ct.minor&&(Ct.minor.ticks||Ct.minor.showgrid),Wi=1;Wi>=(Ya?0:1);Wi--){var uo=!Wi;Wi?(Ct._dtickInit=Ct.dtick,Ct._tick0Init=Ct.tick0):(Ct.minor._dtickInit=Ct.minor.dtick,Ct.minor._tick0Init=Ct.minor.tick0);var Ao=Wi?Ct:t.extendFlat({},Ct,Ct.minor);if(uo?se.prepMinorTicks(Ao,Ct,Ur):se.prepTicks(Ao,Ur),Ao.tickmode==="array"){Wi?(Sn=[],na=Ye(Ct,!uo)):(Wn=[],ra=Ye(Ct,!uo));continue}if(Ao.tickmode==="sync"){Sn=[],na=be(Ct);continue}var wo=_e(Rt),Uo=wo[0],Ri=wo[1],ps=w(Ao.dtick),as=Qr==="log"&&!(ps||Ao.dtick.charAt(0)==="L"),el=se.tickFirst(Ao,Ur);if(Wi){if(Ct._tmin=el,el<Uo!==xr)break;(Qr==="category"||Qr==="multicategory")&&(Ri=xr?Math.max(-.5,Ri):Math.min(Ct._categories.length-.5,Ri))}var As=null,hs=el,es;if(Wi){var tl;ps?tl=Ct.dtick:Qr==="date"?typeof Ct.dtick=="string"&&Ct.dtick.charAt(0)==="M"&&(tl=M*Ct.dtick.substring(1)):tl=Ct._roughDTick,es=Math.round((Ct.r2l(hs)-Ct.r2l(Ct.tick0))/tl)-1}var Ks=Ao.dtick;for(Ao.rangebreaks&&Ao._tick0Init!==Ao.tick0&&(hs=Pa(hs,Ct),xr||(hs=se.tickIncrement(hs,Ks,!xr,tn))),Wi&&en&&(hs=se.tickIncrement(hs,Ks,!xr,tn),es--);xr?hs>=Ri:hs<=Ri;hs=se.tickIncrement(hs,Ks,xr,tn)){if(Wi&&es++,Ao.rangebreaks&&!xr){if(hs<Uo)continue;if(Ao.maskBreaks(hs)===U&&Pa(hs,Ao)>=An)break}if(Sn.length>Xn||hs===As)break;As=hs;var pl={value:hs};Wi?(as&&hs!==(hs|0)&&(pl.simpleLabel=!0),Xr>1&&es%Xr&&(pl.skipLabel=!0),Sn.push(pl)):(pl.minor=!0,Wn.push(pl))}}if(!Wn||Wn.length<2)hn=!1;else{var Ss=(Wn[1].value-Wn[0].value)*(Tn?-1:1);Gi(Ss,Ct.tickformat)||(hn=!1)}if(!hn)Fi=Sn;else{var ls=Sn.concat(Wn);en&&Sn.length&&(ls=ls.slice(1)),ls=ls.sort(function(Wo,pu){return Wo.value-pu.value}).filter(function(Wo,pu,_u){return pu===0||Wo.value!==_u[pu-1].value});var Lo=ls.map(function(Wo,pu){return Wo.minor===void 0&&!Wo.skipLabel?pu:null}).filter(function(Wo){return Wo!==null});Lo.forEach(function(Wo){hn.map(function(pu){var _u=Wo+pu;_u>=0&&_u<ls.length&&t.pushUnique(Fi,ls[_u])})})}if(Ya){var Es=Ct.minor.ticks==="inside"&&Ct.ticks==="outside"||Ct.minor.ticks==="outside"&&Ct.ticks==="inside";if(!Es){for(var ml=Sn.map(function(Wo){return Wo.value}),zl=[],Bl=0;Bl<Wn.length;Bl++){var Fs=Wn[Bl],Di=Fs.value;if(ml.indexOf(Di)===-1){for(var _o=!1,Nl=0;!_o&&Nl<Sn.length;Nl++)1e7+Sn[Nl].value===1e7+Di&&(_o=!0);_o||zl.push(Fs)}}Wn=zl}}en&&Fe(Fi,Ct,Ct._definedDelta);var Vs;if(Ct.rangebreaks){var Ko=Ct._id.charAt(0)==="y",jl=1;Ct.tickmode==="auto"&&(jl=Ct.tickfont?Ct.tickfont.size:12);var rl=NaN;for(Vs=Sn.length-1;Vs>-1;Vs--){if(Sn[Vs].drop){Sn.splice(Vs,1);continue}Sn[Vs].value=Pa(Sn[Vs].value,Ct);var yl=Ct.c2p(Sn[Vs].value);(Ko?rl>yl-jl:rl<yl+jl)?Sn.splice(xr?Vs+1:Vs,1):rl=yl}}Da(Ct)&&Math.abs(Rt[1]-Rt[0])===360&&Sn.pop(),Ct._tmax=(Sn[Sn.length-1]||{}).value,Ct._prevDateHead="",Ct._inCalcTicks=!0;var Cu,yo=function(Wo){Wo.text="",Ct._prevDateHead=Cu};Sn=Sn.concat(Wn);function Ps(Wo,pu){var _u=se.tickText(Wo,pu.value,!1,pu.simpleLabel),Xs=pu.periodX;return Xs!==void 0&&(_u.periodX=Xs,(Xs>An||Xs<Wr)&&(Xs>An&&(_u.periodX=An),Xs<Wr&&(_u.periodX=Wr),yo(_u))),_u}var ms;for(Vs=0;Vs<Sn.length;Vs++){var Kl=Sn[Vs].minor,Jl=Sn[Vs].value;Kl?(hn&&Fi.indexOf(Sn[Vs])!==-1?ms=Ps(Ct,Sn[Vs]):ms={x:Jl},ms.minor=!0,ra.push(ms)):(Cu=Ct._prevDateHead,ms=Ps(Ct,Sn[Vs]),(Sn[Vs].skipLabel||hn&&Fi.indexOf(Sn[Vs])===-1)&&yo(ms),na.push(ms))}return na=na.concat(ra),Ct._inCalcTicks=!1,en&&na.length&&(na[0].noTick=!0),na};function Pe(qt,Ct){return qt.rangebreaks&&(Ct=Ct.filter(function(Ur){return qt.maskBreaks(Ur.x)!==U})),Ct}function be(qt){var Ct=qt._mainAxis,Ur=[];if(Ct._vals){for(var Qr=0;Qr<Ct._vals.length;Qr++)if(!Ct._vals[Qr].noTick){var tn=Ct.l2p(Ct._vals[Qr].x),Xr=qt.p2l(tn),en=se.tickText(qt,Xr);Ct._vals[Qr].minor&&(en.minor=!0,en.text=""),Ur.push(en)}}return Ur=Pe(qt,Ur),Ur}function Ye(qt,Ct){var Ur=t.simpleMap(qt.range,qt.r2l),Qr=_e(Ur),tn=Math.min(Qr[0],Qr[1]),Xr=Math.max(Qr[0],Qr[1]),en=qt.type==="category"?qt.d2l_noadd:qt.d2l;qt.type==="log"&&String(qt.dtick).charAt(0)!=="L"&&(qt.dtick="L"+Math.pow(10,Math.floor(Math.min(qt.range[0],qt.range[1]))-1));for(var Tn=[],hn=0;hn<=1;hn++)if(!(Ct!==void 0&&(Ct&&hn||Ct===!1&&!hn))&&!(hn&&!qt.minor)){var Rt=hn?qt.minor.tickvals:qt.tickvals,xr=hn?[]:qt.ticktext;if(Rt){t.isArrayOrTypedArray(xr)||(xr=[]);for(var Wr=0;Wr<Rt.length;Wr++){var An=en(Rt[Wr]);if(An>tn&&An<Xr){var Xn=se.tickText(qt,An,!1,String(xr[Wr]));hn&&(Xn.minor=!0,Xn.text=""),Tn.push(Xn)}}}}return Tn=Pe(qt,Tn),Tn}var mt=[2,5,10],bt=[1,2,3,6,12],ft=[1,2,5,10,15,30],Wt=[1,2,3,7,14],Zt=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],cr=[-.301,0,.301,.699,1],pr=[15,30,45,90,180];function Br(qt,Ct,Ur){return Ct*t.roundUp(qt/Ct,Ur)}se.autoTicks=function(qt,Ct,Ur){var Qr;function tn(Wr){return Math.pow(Wr,Math.floor(Math.log(Ct)/Math.LN10))}if(qt.type==="date"){qt.tick0=t.dateTick0(qt.calendar,0);var Xr=2*Ct;if(Xr>y)Ct/=y,Qr=tn(10),qt.dtick="M"+12*Br(Ct,Qr,mt);else if(Xr>M)Ct/=M,qt.dtick="M"+Br(Ct,1,bt);else if(Xr>A){if(qt.dtick=Br(Ct,A,qt._hasDayOfWeekBreaks?[1,2,7,14]:Wt),!Ur){var en=se.getTickFormat(qt),Tn=qt.ticklabelmode==="period";Tn&&(qt._rawTick0=qt.tick0),/%[uVW]/.test(en)?qt.tick0=t.dateTick0(qt.calendar,2):qt.tick0=t.dateTick0(qt.calendar,1),Tn&&(qt._dowTick0=qt.tick0)}}else Xr>f?qt.dtick=Br(Ct,f,bt):Xr>p?qt.dtick=Br(Ct,p,ft):Xr>x?qt.dtick=Br(Ct,x,ft):(Qr=tn(10),qt.dtick=Br(Ct,Qr,mt))}else if(qt.type==="log"){qt.tick0=0;var hn=t.simpleMap(qt.range,qt.r2l);if(qt._isMinor&&(Ct*=1.5),Ct>.7)qt.dtick=Math.ceil(Ct);else if(Math.abs(hn[1]-hn[0])<1){var Rt=1.5*Math.abs((hn[1]-hn[0])/Ct);Ct=Math.abs(Math.pow(10,hn[1])-Math.pow(10,hn[0]))/Rt,Qr=tn(10),qt.dtick="L"+Br(Ct,Qr,mt)}else qt.dtick=Ct>.3?"D2":"D1"}else qt.type==="category"||qt.type==="multicategory"?(qt.tick0=0,qt.dtick=Math.ceil(Math.max(Ct,1))):Da(qt)?(qt.tick0=0,Qr=1,qt.dtick=Br(Ct,Qr,pr)):(qt.tick0=0,Qr=tn(10),qt.dtick=Br(Ct,Qr,mt));if(qt.dtick===0&&(qt.dtick=1),!w(qt.dtick)&&typeof qt.dtick!="string"){var xr=qt.dtick;throw qt.dtick=1,"ax.dtick error: "+String(xr)}};function Fr(qt){var Ct=qt.dtick;if(qt._tickexponent=0,!w(Ct)&&typeof Ct!="string"&&(Ct=1),(qt.type==="category"||qt.type==="multicategory")&&(qt._tickround=null),qt.type==="date"){var Ur=qt.r2l(qt.tick0),Qr=qt.l2r(Ur).replace(/(^-|i)/g,""),tn=Qr.length;if(String(Ct).charAt(0)==="M")tn>10||Qr.substr(5)!=="01-01"?qt._tickround="d":qt._tickround=+Ct.substr(1)%12===0?"y":"m";else if(Ct>=A&&tn<=10||Ct>=A*15)qt._tickround="d";else if(Ct>=p&&tn<=16||Ct>=f)qt._tickround="M";else if(Ct>=x&&tn<=19||Ct>=p)qt._tickround="S";else{var Xr=qt.l2r(Ur+Ct).replace(/^-/,"").length;qt._tickround=Math.max(tn,Xr)-20,qt._tickround<0&&(qt._tickround=4)}}else if(w(Ct)||Ct.charAt(0)==="L"){var en=qt.range.map(qt.r2d||Number);w(Ct)||(Ct=Number(Ct.substr(1))),qt._tickround=2-Math.floor(Math.log(Ct)/Math.LN10+.01);var Tn=Math.max(Math.abs(en[0]),Math.abs(en[1])),hn=Math.floor(Math.log(Tn)/Math.LN10+.01),Rt=qt.minexponent===void 0?3:qt.minexponent;Math.abs(hn)>Rt&&(tt(qt.exponentformat)&&qt.exponentformat!=="SI extended"&&!st(hn)||tt(qt.exponentformat)&&qt.exponentformat==="SI extended"&&!Ft(hn)?qt._tickexponent=3*Math.round((hn-1)/3):qt._tickexponent=hn)}else qt._tickround=null}se.tickIncrement=function(qt,Ct,Ur,Qr){var tn=Ur?-1:1;if(w(Ct))return t.increment(qt,tn*Ct);var Xr=Ct.charAt(0),en=tn*Number(Ct.substr(1));if(Xr==="M")return t.incrementMonth(qt,en,Qr);if(Xr==="L")return Math.log(Math.pow(10,qt)+en)/Math.LN10;if(Xr==="D"){var Tn=Ct==="D2"?cr:Zt,hn=qt+tn*.01,Rt=t.roundUp(t.mod(hn,1),Tn,Ur);return Math.floor(hn)+Math.log(v.round(Math.pow(10,Rt),1))/Math.LN10}throw"unrecognized dtick "+String(Ct)},se.tickFirst=function(qt,Ct){var Ur=qt.r2l||Number,Qr=t.simpleMap(qt.range,Ur,void 0,void 0,Ct),tn=Qr[1]<Qr[0],Xr=tn?Math.floor:Math.ceil,en=_e(Qr)[0],Tn=qt.dtick,hn=Ur(qt.tick0);if(w(Tn)){var Rt=Xr((en-hn)/Tn)*Tn+hn;return(qt.type==="category"||qt.type==="multicategory")&&(Rt=t.constrain(Rt,0,qt._categories.length-1)),Rt}var xr=Tn.charAt(0),Wr=Number(Tn.substr(1));if(xr==="M"){for(var An=0,Xn=hn,na,ra,Sn;An<10;){if(na=se.tickIncrement(Xn,Tn,tn,qt.calendar),(na-en)*(Xn-en)<=0)return tn?Math.min(Xn,na):Math.max(Xn,na);ra=(en-(Xn+na)/2)/(na-Xn),Sn=xr+(Math.abs(Math.round(ra))||1)*Wr,Xn=se.tickIncrement(Xn,Sn,ra<0?!tn:tn,qt.calendar),An++}return t.error("tickFirst did not converge",qt),Xn}else{if(xr==="L")return Math.log(Xr((Math.pow(10,en)-hn)/Wr)*Wr+hn)/Math.LN10;if(xr==="D"){var Wn=Tn==="D2"?cr:Zt,Fi=t.roundUp(t.mod(en,1),Wn,tn);return Math.floor(en)+Math.log(v.round(Math.pow(10,Fi),1))/Math.LN10}else throw"unrecognized dtick "+String(Tn)}},se.tickText=function(qt,Ct,Ur,Qr){var tn=cn(qt,Ct),Xr=qt.tickmode==="array",en=Ur||Xr,Tn=qt.type,hn=Tn==="category"?qt.d2l_noadd:qt.d2l,Rt,xr=function(Sn){var Wn=qt.l2p(Sn);return Wn>=0&&Wn<=qt._length?Sn:null};if(Xr&&t.isArrayOrTypedArray(qt.ticktext)){var Wr=t.simpleMap(qt.range,qt.r2l),An=(Math.abs(Wr[1]-Wr[0])-(qt._lBreaks||0))/1e4;for(Rt=0;Rt<qt.ticktext.length&&!(Math.abs(Ct-hn(qt.tickvals[Rt]))<An);Rt++);if(Rt<qt.ticktext.length)return tn.text=String(qt.ticktext[Rt]),tn.xbnd=[xr(tn.x-.5),xr(tn.x+qt.dtick-.5)],tn}function Xn(Sn){if(Sn===void 0)return!0;if(Ur)return Sn==="none";var Wn={first:qt._tmin,last:qt._tmax}[Sn];return Sn!=="all"&&Ct!==Wn}var na=Ur?"never":qt.exponentformat!=="none"&&Xn(qt.showexponent)?"hide":"";if(Tn==="date"?Nr(qt,tn,Ur,en):Tn==="log"?Jr(qt,tn,Ur,en,na):Tn==="category"?Dt(qt,tn):Tn==="multicategory"?$e(qt,tn,Ur):Da(qt)?De(qt,tn,Ur,en,na):ot(qt,tn,Ur,en,na),Qr||(qt.tickprefix&&!Xn(qt.showtickprefix)&&(tn.text=qt.tickprefix+tn.text),qt.ticksuffix&&!Xn(qt.showticksuffix)&&(tn.text+=qt.ticksuffix)),qt.labelalias&&qt.labelalias.hasOwnProperty(tn.text)){var ra=qt.labelalias[tn.text];typeof ra=="string"&&(tn.text=ra)}return(qt.tickson==="boundaries"||qt.showdividers)&&(tn.xbnd=[xr(tn.x-.5),xr(tn.x+qt.dtick-.5)]),tn},se.hoverLabelText=function(qt,Ct,Ur){Ur&&(qt=t.extendFlat({},qt,{hoverformat:Ur}));var Qr=t.isArrayOrTypedArray(Ct)?Ct[0]:Ct,tn=t.isArrayOrTypedArray(Ct)?Ct[1]:void 0;if(tn!==void 0&&tn!==Qr)return se.hoverLabelText(qt,Qr,Ur)+" - "+se.hoverLabelText(qt,tn,Ur);var Xr=qt.type==="log"&&Qr<=0,en=se.tickText(qt,qt.c2l(Xr?-Qr:Qr),"hover").text;return Xr?Qr===0?"0":B+en:en};function cn(qt,Ct,Ur){var Qr=qt.tickfont||{};return{x:Ct,dx:0,dy:0,text:Ur||"",fontSize:Qr.size,font:Qr.family,fontWeight:Qr.weight,fontStyle:Qr.style,fontVariant:Qr.variant,fontTextcase:Qr.textcase,fontLineposition:Qr.lineposition,fontShadow:Qr.shadow,fontColor:Qr.color}}function Nr(qt,Ct,Ur,Qr){var tn=qt._tickround,Xr=Ur&&qt.hoverformat||se.getTickFormat(qt);Qr=!Xr&&Qr,Qr&&(w(tn)?tn=4:tn={y:"m",m:"d",d:"M",M:"S",S:4}[tn]);var en=t.formatDate(Ct.x,Xr,tn,qt._dateFormat,qt.calendar,qt._extraFormat),Tn,hn=en.indexOf(`
`);if(hn!==-1&&(Tn=en.substr(hn+1),en=en.substr(0,hn)),Qr&&(Tn!==void 0&&(en==="00:00:00"||en==="00:00")?(en=Tn,Tn=""):en.length===8&&(en=en.replace(/:00$/,""))),Tn)if(Ur)tn==="d"?en+=", "+Tn:en=Tn+(en?", "+en:"");else if(!qt._inCalcTicks||qt._prevDateHead!==Tn)qt._prevDateHead=Tn,en+="<br>"+Tn;else{var Rt=Fa(qt),xr=qt._trueSide||qt.side;(!Rt&&xr==="top"||Rt&&xr==="bottom")&&(en+="<br> ")}Ct.text=en}function Jr(qt,Ct,Ur,Qr,tn){var Xr=qt.dtick,en=Ct.x,Tn=qt.tickformat,hn=typeof Xr=="string"&&Xr.charAt(0);if(tn==="never"&&(tn=""),Qr&&hn!=="L"&&(Xr="L3",hn="L"),Tn||hn==="L")Ct.text=Xt(Math.pow(10,en),qt,tn,Qr);else if(w(Xr)||hn==="D"&&(qt.minorloglabels==="complete"||t.mod(en+.01,1)<.1)){qt.minorloglabels==="complete"&&!(t.mod(en+.01,1)<.1)&&(Ct.fontSize*=.75);var Rt=Math.pow(10,en).toExponential(0),xr=Rt.split("e"),Wr=+xr[1],An=Math.abs(Wr),Xn=qt.exponentformat;Xn==="power"||tt(Xn)&&Xn!=="SI extended"&&st(Wr)||tt(Xn)&&Xn==="SI extended"&&Ft(Wr)?(Ct.text=xr[0],An>0&&(Ct.text+="x10"),Ct.text==="1x10"&&(Ct.text="10"),Wr!==0&&Wr!==1&&(Ct.text+="<sup>"+(Wr>0?"":B)+An+"</sup>"),Ct.fontSize*=1.25):(Xn==="e"||Xn==="E")&&An>2?Ct.text=xr[0]+Xn+(Wr>0?"+":B)+An:(Ct.text=Xt(Math.pow(10,en),qt,"","fakehover"),Xr==="D1"&&qt._id.charAt(0)==="y"&&(Ct.dy-=Ct.fontSize/6))}else if(hn==="D")Ct.text=qt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,t.mod(en,1)))),Ct.fontSize*=.75;else throw"unrecognized dtick "+String(Xr);if(qt.dtick==="D1"){var na=String(Ct.text).charAt(0);(na==="0"||na==="1")&&(qt._id.charAt(0)==="y"?Ct.dx-=Ct.fontSize/4:(Ct.dy+=Ct.fontSize/2,Ct.dx+=(qt.range[1]>qt.range[0]?1:-1)*Ct.fontSize*(en<0?.5:.25)))}}function Dt(qt,Ct){var Ur=qt._categories[Math.round(Ct.x)];Ur===void 0&&(Ur=""),Ct.text=String(Ur)}function $e(qt,Ct,Ur){var Qr=Math.round(Ct.x),tn=qt._categories[Qr]||[],Xr=tn[1]===void 0?"":String(tn[1]),en=tn[0]===void 0?"":String(tn[0]);Ur?Ct.text=en+" - "+Xr:(Ct.text=Xr,Ct.text2=en)}function ot(qt,Ct,Ur,Qr,tn){tn==="never"?tn="":qt.showexponent==="all"&&Math.abs(Ct.x/qt.dtick)<1e-6&&(tn="hide"),Ct.text=Xt(Ct.x,qt,tn,Qr)}function De(qt,Ct,Ur,Qr,tn){if(qt.thetaunit==="radians"&&!Ur){var Xr=Ct.x/180;if(Xr===0)Ct.text="0";else{var en=Ee(Xr);if(en[1]>=100)Ct.text=Xt(t.deg2rad(Ct.x),qt,tn,Qr);else{var Tn=Ct.x<0;en[1]===1?en[0]===1?Ct.text="π":Ct.text=en[0]+"π":Ct.text=["<sup>",en[0],"</sup>","⁄","<sub>",en[1],"</sub>","π"].join(""),Tn&&(Ct.text=B+Ct.text)}}}else Ct.text=Xt(Ct.x,qt,tn,Qr)}function Ee(qt){function Ct(Tn,hn){return Math.abs(Tn-hn)<=1e-6}function Ur(Tn,hn){return Ct(hn,0)?Tn:Ur(hn,Tn%hn)}function Qr(Tn){for(var hn=1;!Ct(Math.round(Tn*hn)/hn,Tn);)hn*=10;return hn}var tn=Qr(qt),Xr=qt*tn,en=Math.abs(Ur(Xr,tn));return[Math.round(Xr/en),Math.round(tn/en)]}var Ae=["f","p","n","μ","m","","k","M","G","T"],Ie=["q","r","y","z","a",...Ae,"P","E","Z","Y","R","Q"],tt=qt=>["SI","SI extended","B"].includes(qt);function st(qt){return qt>14||qt<-15}function Ft(qt){return qt>32||qt<-30}function Nt(qt,Ct){return tt(Ct)?!!(Ct==="SI extended"&&Ft(qt)||Ct!=="SI extended"&&st(qt)):!1}function Xt(qt,Ct,Ur,Qr){var tn=qt<0,Xr=Ct._tickround,en=Ur||Ct.exponentformat||"B",Tn=Ct._tickexponent,hn=se.getTickFormat(Ct),Rt=Ct.separatethousands;if(Qr){var xr={exponentformat:en,minexponent:Ct.minexponent,dtick:Ct.showexponent==="none"?Ct.dtick:w(qt)&&Math.abs(qt)||1,range:Ct.showexponent==="none"?Ct.range.map(Ct.r2d):[0,qt||1]};Fr(xr),Xr=(Number(xr._tickround)||0)+4,Tn=xr._tickexponent,Ct.hoverformat&&(hn=Ct.hoverformat)}if(hn)return Ct._numFormat(hn)(qt).replace(/-/g,B);var Wr=Math.pow(10,-Xr)/2;if(en==="none"&&(Tn=0),qt=Math.abs(qt),qt<Wr)qt="0",tn=!1;else{if(qt+=Wr,Tn&&(qt*=Math.pow(10,-Tn),Xr+=Tn),Xr===0)qt=String(Math.floor(qt));else if(Xr<0){qt=String(Math.round(qt)),qt=qt.substr(0,qt.length+Xr);for(var An=Xr;An<0;An++)qt+="0"}else{qt=String(qt);var Xn=qt.indexOf(".")+1;Xn&&(qt=qt.substr(0,Xn+Xr).replace(/\.?0+$/,""))}qt=t.numSeparate(qt,Ct._separators,Rt)}if(Tn&&en!=="hide"){Nt(Tn,en)&&(en="power");var na;Tn<0?na=B+-Tn:en!=="power"?na="+"+Tn:na=String(Tn),en==="e"||en==="E"?qt+=en+na:en==="power"?qt+="×10<sup>"+na+"</sup>":en==="B"&&Tn===9?qt+="B":tt(en)&&(qt+=en==="SI extended"?Ie[Tn/3+10]:Ae[Tn/3+5])}return tn?B+qt:qt}se.getTickFormat=function(qt){var Ct;function Ur(hn){return typeof hn!="string"?hn:Number(hn.replace("M",""))*M}function Qr(hn,Rt){var xr=["L","D"];if(typeof hn==typeof Rt){if(typeof hn=="number")return hn-Rt;var Wr=xr.indexOf(hn.charAt(0)),An=xr.indexOf(Rt.charAt(0));return Wr===An?Number(hn.replace(/(L|D)/g,""))-Number(Rt.replace(/(L|D)/g,"")):Wr-An}else return typeof hn=="number"?1:-1}function tn(hn,Rt,xr){var Wr=xr||function(na){return na},An=Rt[0],Xn=Rt[1];return(!An&&typeof An!="number"||Wr(An)<=Wr(hn))&&(!Xn&&typeof Xn!="number"||Wr(Xn)>=Wr(hn))}function Xr(hn,Rt){var xr=Rt[0]===null,Wr=Rt[1]===null,An=Qr(hn,Rt[0])>=0,Xn=Qr(hn,Rt[1])<=0;return(xr||An)&&(Wr||Xn)}var en,Tn;if(qt.tickformatstops&&qt.tickformatstops.length>0)switch(qt.type){case"date":case"linear":{for(Ct=0;Ct<qt.tickformatstops.length;Ct++)if(Tn=qt.tickformatstops[Ct],Tn.enabled&&tn(qt.dtick,Tn.dtickrange,Ur)){en=Tn;break}break}case"log":{for(Ct=0;Ct<qt.tickformatstops.length;Ct++)if(Tn=qt.tickformatstops[Ct],Tn.enabled&&Xr(qt.dtick,Tn.dtickrange)){en=Tn;break}break}}return en?en.value:qt.tickformat},se.getSubplots=function(qt,Ct){var Ur=qt._fullLayout._subplots,Qr=Ur.cartesian.concat(Ur.gl2d||[]),tn=Ct?se.findSubplotsWithAxis(Qr,Ct):Qr;return tn.sort(function(Xr,en){var Tn=Xr.substr(1).split("y"),hn=en.substr(1).split("y");return Tn[0]===hn[0]?+Tn[1]-+hn[1]:+Tn[0]-+hn[0]}),tn},se.findSubplotsWithAxis=function(qt,Ct){for(var Ur=new RegExp(Ct._id.charAt(0)==="x"?"^"+Ct._id+"y":Ct._id+"$"),Qr=[],tn=0;tn<qt.length;tn++){var Xr=qt[tn];Ur.test(Xr)&&Qr.push(Xr)}return Qr},se.makeClipPaths=function(qt){var Ct=qt._fullLayout;if(!Ct._hasOnlyLargeSploms){var Ur={_offset:0,_length:Ct.width,_id:""},Qr={_offset:0,_length:Ct.height,_id:""},tn=se.list(qt,"x",!0),Xr=se.list(qt,"y",!0),en=[],Tn,hn;for(Tn=0;Tn<tn.length;Tn++)for(en.push({x:tn[Tn],y:Qr}),hn=0;hn<Xr.length;hn++)Tn===0&&en.push({x:Ur,y:Xr[hn]}),en.push({x:tn[Tn],y:Xr[hn]});var Rt=Ct._clips.selectAll(".axesclip").data(en,function(xr){return xr.x._id+xr.y._id});Rt.enter().append("clipPath").classed("axesclip",!0).attr("id",function(xr){return"clip"+Ct._uid+xr.x._id+xr.y._id}).append("rect"),Rt.exit().remove(),Rt.each(function(xr){v.select(this).select("rect").attr({x:xr.x._offset||0,y:xr.y._offset||0,width:xr.x._length||1,height:xr.y._length||1})})}},se.draw=function(qt,Ct,Ur){var Qr=qt._fullLayout;Ct==="redraw"&&Qr._paper.selectAll("g.subplot").each(function(hn){var Rt=hn[0],xr=Qr._plots[Rt];if(xr){var Wr=xr.xaxis,An=xr.yaxis;xr.xaxislayer.selectAll("."+Wr._id+"tick").remove(),xr.yaxislayer.selectAll("."+An._id+"tick").remove(),xr.xaxislayer.selectAll("."+Wr._id+"tick2").remove(),xr.yaxislayer.selectAll("."+An._id+"tick2").remove(),xr.xaxislayer.selectAll("."+Wr._id+"divider").remove(),xr.yaxislayer.selectAll("."+An._id+"divider").remove(),xr.minorGridlayer&&xr.minorGridlayer.selectAll("path").remove(),xr.gridlayer&&xr.gridlayer.selectAll("path").remove(),xr.zerolinelayer&&xr.zerolinelayer.selectAll("path").remove(),xr.zerolinelayerAbove&&xr.zerolinelayerAbove.selectAll("path").remove(),Qr._infolayer.select(".g-"+Wr._id+"title").remove(),Qr._infolayer.select(".g-"+An._id+"title").remove()}});var tn=!Ct||Ct==="redraw"?se.listIds(qt):Ct,Xr=se.list(qt),en=Xr.filter(function(hn){return hn.autoshift}).map(function(hn){return hn.overlaying});tn.map(function(hn){var Rt=se.getFromId(qt,hn);if(Rt.tickmode==="sync"&&Rt.overlaying){var xr=tn.findIndex(function(Wr){return Wr===Rt.overlaying});xr>=0&&tn.unshift(tn.splice(xr,1).shift())}});var Tn={false:{left:0,right:0}};return t.syncOrAsync(tn.map(function(hn){return function(){if(hn){var Rt=se.getFromId(qt,hn);Ur||(Ur={}),Ur.axShifts=Tn,Ur.overlayingShiftedAx=en;var xr=se.drawOne(qt,Rt,Ur);return Rt._shiftPusher&&oa(Rt,Rt._fullDepth||0,Tn,!0),Rt._r=Rt.range.slice(),Rt._rl=t.simpleMap(Rt._r,Rt.r2l),xr}}}))},se.drawOne=function(qt,Ct,Ur){Ur=Ur||{};var Qr=Ur.axShifts||{},tn=Ur.overlayingShiftedAx||[],Xr,en,Tn;Ct.setScale();var hn=qt._fullLayout,Rt=Ct._id,xr=Rt.charAt(0),Wr=se.counterLetter(Rt),An=hn._plots[Ct._mainSubplot],Xn=Ct.zerolinelayer==="above traces";if(!An)return;if(Ct._shiftPusher=Ct.autoshift||tn.indexOf(Ct._id)!==-1||tn.indexOf(Ct.overlaying)!==-1,Ct._shiftPusher&Ct.anchor==="free"){var na=Ct.linewidth/2||0;Ct.ticks==="inside"&&(na+=Ct.ticklen),oa(Ct,na,Qr,!0),oa(Ct,Ct.shift||0,Qr,!1)}(Ur.skipTitle!==!0||Ct._shift===void 0)&&(Ct._shift=zi(Ct,Qr));var ra=An[xr+"axislayer"],Sn=Ct._mainLinePosition,Wn=Sn+=Ct._shift,Fi=Ct._mainMirrorPosition,Ya=Ct._vals=se.calcTicks(Ct),Wi=[Ct.mirror,Wn,Fi].join("_");for(Xr=0;Xr<Ya.length;Xr++)Ya[Xr].axInfo=Wi;Ct._selections={},Ct._tickAngles&&(Ct._prevTickAngles=Ct._tickAngles),Ct._tickAngles={},Ct._depth=null;var uo={};function Ao(Jl){var Wo=Rt+(Jl||"tick");return uo[Wo]||(uo[Wo]=Kr(Ct,Wo,Wn)),uo[Wo]}if(Ct.visible){var wo=se.makeTransTickFn(Ct),Uo=se.makeTransTickLabelFn(Ct),Ri,ps,as=Ct.ticks==="inside",el=Ct.ticks==="outside";if(Ct.tickson==="boundaries"){var As=Rr(Ct,Ya);ps=se.clipEnds(Ct,As),Ri=as?ps:As}else ps=se.clipEnds(Ct,Ya),Ri=as&&Ct.ticklabelmode!=="period"?ps:Ya;var hs=Ct._gridVals=ps,es=Sr(Ct,Ya);if(!hn._hasOnlyLargeSploms){var tl=Ct._subplotsWith,Ks={};for(Xr=0;Xr<tl.length;Xr++){en=tl[Xr],Tn=hn._plots[en];var pl=Tn[Wr+"axis"],Ss=pl._mainAxis._id;if(!Ks[Ss]){Ks[Ss]=1;var ls=xr==="x"?"M0,"+pl._offset+"v"+pl._length:"M"+pl._offset+",0h"+pl._length;se.drawGrid(qt,Ct,{vals:hs,counterAxis:pl,layer:Tn.gridlayer.select("."+Rt),minorLayer:Tn.minorGridlayer.select("."+Rt),path:ls,transFn:wo}),se.drawZeroLine(qt,Ct,{counterAxis:pl,layer:Xn?Tn.zerolinelayerAbove:Tn.zerolinelayer,path:ls,transFn:wo})}}}var Lo,Es=se.getTickSigns(Ct),ml=se.getTickSigns(Ct,"minor");if(Ct.ticks||Ct.minor&&Ct.minor.ticks){var zl=se.makeTickPath(Ct,Wn,Es[2]),Bl=se.makeTickPath(Ct,Wn,ml[2],{minor:!0}),Fs,Di,_o,Nl;if(Ct._anchorAxis&&Ct.mirror&&Ct.mirror!==!0?(Fs=se.makeTickPath(Ct,Fi,Es[3]),Di=se.makeTickPath(Ct,Fi,ml[3],{minor:!0}),_o=zl+Fs,Nl=Bl+Di):(Fs="",Di="",_o=zl,Nl=Bl),Ct.showdividers&&el&&Ct.tickson==="boundaries"){var Vs={};for(Xr=0;Xr<es.length;Xr++)Vs[es[Xr].x]=1;Lo=function(Jl){return Vs[Jl.x]?Fs:_o}}else Lo=function(Jl){return Jl.minor?Nl:_o}}if(se.drawTicks(qt,Ct,{vals:Ri,layer:ra,path:Lo,transFn:wo}),Ct.mirror==="allticks"){var Ko=Object.keys(Ct._linepositions||{});for(Xr=0;Xr<Ko.length;Xr++){en=Ko[Xr],Tn=hn._plots[en];var jl=Ct._linepositions[en]||[],rl=jl[0],yl=jl[1],Cu=jl[2],yo=se.makeTickPath(Ct,rl,Cu?Es[0]:ml[0],{minor:Cu})+se.makeTickPath(Ct,yl,Cu?Es[1]:ml[1],{minor:Cu});se.drawTicks(qt,Ct,{vals:Ri,layer:Tn[xr+"axislayer"],path:yo,transFn:wo})}}var Ps=[];if(Ps.push(function(){return se.drawLabels(qt,Ct,{vals:Ya,layer:ra,plotinfo:Tn,transFn:Uo,labelFns:se.makeLabelFns(Ct,Wn)})}),Ct.type==="multicategory"){var ms={x:2,y:10}[xr];Ps.push(function(){var Jl={x:"height",y:"width"}[xr],Wo=Ao()[Jl]+ms+(Ct._tickAngles[Rt+"tick"]?Ct.tickfont.size*me:0);return se.drawLabels(qt,Ct,{vals:Mr(Ct,Ya),layer:ra,cls:Rt+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:wo,labelFns:se.makeLabelFns(Ct,Wn+Wo*Es[4])})}),Ps.push(function(){return Ct._depth=Es[4]*(Ao("tick2")[Ct.side]-Wn),xa(qt,Ct,{vals:es,layer:ra,path:se.makeTickPath(Ct,Wn,Es[4],{len:Ct._depth}),transFn:wo})})}else Ct.title.hasOwnProperty("standoff")&&Ps.push(function(){Ct._depth=Es[4]*(Ao()[Ct.side]-Wn)});var Kl=P.getComponentMethod("rangeslider","isVisible")(Ct);return!Ur.skipTitle&&!(Kl&&Ct.side==="bottom")&&Ps.push(function(){return ea(qt,Ct)}),Ps.push(function(){var Jl=Ct.side.charAt(0),Wo=W[Ct.side].charAt(0),pu=se.getPxPosition(qt,Ct),_u=el?Ct.ticklen:0,Xs,Pl,Gl,Yl;(Ct.automargin||Kl||Ct._shiftPusher)&&(Ct.type==="multicategory"?Xs=Ao("tick2"):(Xs=Ao(),xr==="x"&&Jl==="b"&&(Ct._depth=Math.max(Xs.width>0?Xs.bottom-pu:0,_u))));var tc=0,bf=0;if(Ct._shiftPusher&&(tc=Math.max(_u,Xs.height>0?Jl==="l"?pu-Xs.left:Xs.right-pu:0),Ct.title.text!==hn._dfltTitle[xr]&&(bf=(Ct._titleStandoff||0)+(Ct._titleScoot||0),Jl==="l"&&(bf+=ba(Ct))),Ct._fullDepth=Math.max(tc,bf)),Ct.automargin){Pl={x:0,y:0,r:0,l:0,t:0,b:0};var Qc=[0,1],ff=typeof Ct._shift=="number"?Ct._shift:0;if(xr==="x"){if(Jl==="b"?Pl[Jl]=Ct._depth:(Pl[Jl]=Ct._depth=Math.max(Xs.width>0?pu-Xs.top:0,_u),Qc.reverse()),Xs.width>0){var Wh=Xs.right-(Ct._offset+Ct._length);Wh>0&&(Pl.xr=1,Pl.r=Wh);var Dh=Ct._offset-Xs.left;Dh>0&&(Pl.xl=0,Pl.l=Dh)}}else if(Jl==="l"?(Ct._depth=Math.max(Xs.height>0?pu-Xs.left:0,_u),Pl[Jl]=Ct._depth-ff):(Ct._depth=Math.max(Xs.height>0?Xs.right-pu:0,_u),Pl[Jl]=Ct._depth+ff,Qc.reverse()),Xs.height>0){var Ll=Xs.bottom-(Ct._offset+Ct._length);Ll>0&&(Pl.yb=0,Pl.b=Ll);var jc=Ct._offset-Xs.top;jc>0&&(Pl.yt=1,Pl.t=jc)}Pl[Wr]=Ct.anchor==="free"?Ct.position:Ct._anchorAxis.domain[Qc[0]],Ct.title.text!==hn._dfltTitle[xr]&&(Pl[Jl]+=ba(Ct)+(Ct.title.standoff||0)),Ct.mirror&&Ct.anchor!=="free"&&(Gl={x:0,y:0,r:0,l:0,t:0,b:0},Gl[Wo]=Ct.linewidth,Ct.mirror&&Ct.mirror!==!0&&(Gl[Wo]+=_u),Ct.mirror===!0||Ct.mirror==="ticks"?Gl[Wr]=Ct._anchorAxis.domain[Qc[1]]:(Ct.mirror==="all"||Ct.mirror==="allticks")&&(Gl[Wr]=[Ct._counterDomainMin,Ct._counterDomainMax][Qc[1]]))}Kl&&(Yl=P.getComponentMethod("rangeslider","autoMarginOpts")(qt,Ct)),typeof Ct.automargin=="string"&&(lr(Pl,Ct.automargin),lr(Gl,Ct.automargin)),C.autoMargin(qt,yr(Ct),Pl),C.autoMargin(qt,br(Ct),Gl),C.autoMargin(qt,nn(Ct),Yl)}),t.syncOrAsync(Ps)}};function lr(qt,Ct){if(qt){var Ur=Object.keys(J).reduce(function(Qr,tn){return Ct.indexOf(tn)!==-1&&J[tn].forEach(function(Xr){Qr[Xr]=1}),Qr},{});Object.keys(qt).forEach(function(Qr){Ur[Qr]||(Qr.length===1?qt[Qr]=0:delete qt[Qr])})}}function Rr(qt,Ct){var Ur=[],Qr,tn=function(Xr,en){var Tn=Xr.xbnd[en];Tn!==null&&Ur.push(t.extendFlat({},Xr,{x:Tn}))};if(Ct.length){for(Qr=0;Qr<Ct.length;Qr++)tn(Ct[Qr],0);tn(Ct[Qr-1],1)}return Ur}function Mr(qt,Ct){for(var Ur=[],Qr={},tn=0;tn<Ct.length;tn++){var Xr=Ct[tn];Qr[Xr.text2]?Qr[Xr.text2].push(Xr.x):Qr[Xr.text2]=[Xr.x]}for(var en in Qr)Ur.push(cn(qt,t.interp(Qr[en],.5),en));return Ur}function Sr(qt,Ct){var Ur=[],Qr,tn,Xr=Ct.length&&Ct[Ct.length-1].x<Ct[0].x,en=function(hn,Rt){var xr=hn.xbnd[Rt];xr!==null&&Ur.push(t.extendFlat({},hn,{x:xr}))};if(qt.showdividers&&Ct.length){for(Qr=0;Qr<Ct.length;Qr++){var Tn=Ct[Qr];Tn.text2!==tn&&en(Tn,Xr?1:0),tn=Tn.text2}en(Ct[Qr-1],Xr?0:1)}return Ur}function Kr(qt,Ct,Ur){var Qr,tn,Xr,en;if(qt._selections[Ct].size())Qr=1/0,tn=-1/0,Xr=1/0,en=-1/0,qt._selections[Ct].each(function(){var hn=Qt(this);if(hn.node().style.display!=="none"){var Rt=s.bBox(hn.node().parentNode);Qr=Math.min(Qr,Rt.top),tn=Math.max(tn,Rt.bottom),Xr=Math.min(Xr,Rt.left),en=Math.max(en,Rt.right)}});else{var Tn=se.makeLabelFns(qt,Ur);Qr=tn=Tn.yFn({dx:0,dy:0,fontSize:0}),Xr=en=Tn.xFn({dx:0,dy:0,fontSize:0})}return{top:Qr,bottom:tn,left:Xr,right:en,height:tn-Qr,width:en-Xr}}se.getTickSigns=function(qt,Ct){var Ur=qt._id.charAt(0),Qr={x:"top",y:"right"}[Ur],tn=qt.side===Qr?1:-1,Xr=[-1,1,tn,-tn],en=Ct?(qt.minor||{}).ticks:qt.ticks;return en!=="inside"==(Ur==="x")&&(Xr=Xr.map(function(Tn){return-Tn})),qt.side&&Xr.push({l:-1,t:-1,r:1,b:1}[qt.side.charAt(0)]),Xr},se.makeTransTickFn=function(qt){return qt._id.charAt(0)==="x"?function(Ct){return r(qt._offset+qt.l2p(Ct.x),0)}:function(Ct){return r(0,qt._offset+qt.l2p(Ct.x))}},se.makeTransTickLabelFn=function(qt){var Ct=ha(qt),Ur=qt.ticklabelshift||0,Qr=qt.ticklabelstandoff||0,tn=Ct[0],Xr=Ct[1],en=qt.range[0]>qt.range[1],Tn=qt.ticklabelposition&&qt.ticklabelposition.indexOf("inside")!==-1,hn=!Tn;if(Ur){var Rt=en?-1:1;Ur=Ur*Rt}if(Qr){var xr=qt.side,Wr=Tn&&(xr==="top"||xr==="left")||hn&&(xr==="bottom"||xr==="right")?1:-1;Qr=Qr*Wr}return qt._id.charAt(0)==="x"?function(An){return r(tn+qt._offset+qt.l2p(qn(An))+Ur,Xr+Qr)}:function(An){return r(Xr+Qr,tn+qt._offset+qt.l2p(qn(An))+Ur)}};function qn(qt){return qt.periodX!==void 0?qt.periodX:qt.x}function ha(qt){var Ct=qt.ticklabelposition||"",Ur=qt.tickson||"",Qr=function(na){return Ct.indexOf(na)!==-1},tn=Qr("top"),Xr=Qr("left"),en=Qr("right"),Tn=Qr("bottom"),hn=Qr("inside"),Rt=Ur!=="boundaries"&&(Tn||Xr||tn||en);if(!Rt&&!hn)return[0,0];var xr=qt.side,Wr=Rt?(qt.tickwidth||0)/2:0,An=ie,Xn=qt.tickfont?qt.tickfont.size:12;return(Tn||tn)&&(Wr+=Xn*de,An+=(qt.linewidth||0)/2),(Xr||en)&&(Wr+=(qt.linewidth||0)/2,An+=ie),hn&&xr==="top"&&(An-=Xn*(1-de)),(Xr||tn)&&(Wr=-Wr),(xr==="bottom"||xr==="right")&&(An=-An),[Rt?Wr:0,hn?An:0]}se.makeTickPath=function(qt,Ct,Ur,Qr){Qr||(Qr={});var tn=Qr.minor;if(tn&&!qt.minor)return"";var Xr=Qr.len!==void 0?Qr.len:tn?qt.minor.ticklen:qt.ticklen,en=qt._id.charAt(0),Tn=(qt.linewidth||1)/2;return en==="x"?"M0,"+(Ct+Tn*Ur)+"v"+Xr*Ur:"M"+(Ct+Tn*Ur)+",0h"+Xr*Ur},se.makeLabelFns=function(qt,Ct,Ur){var Qr=qt.ticklabelposition||"",tn=qt.tickson||"",Xr=function(As){return Qr.indexOf(As)!==-1},en=Xr("top"),Tn=Xr("left"),hn=Xr("right"),Rt=Xr("bottom"),xr=tn!=="boundaries"&&(Rt||Tn||en||hn),Wr=Xr("inside"),An=Qr==="inside"&&qt.ticks==="inside"||!Wr&&qt.ticks==="outside"&&tn!=="boundaries",Xn=0,na=0,ra=An?qt.ticklen:0;if(Wr?ra*=-1:xr&&(ra=0),An&&(Xn+=ra,Ur)){var Sn=t.deg2rad(Ur);Xn=ra*Math.cos(Sn)+1,na=ra*Math.sin(Sn)}qt.showticklabels&&(An||qt.showline)&&(Xn+=.2*qt.tickfont.size),Xn+=(qt.linewidth||1)/2*(Wr?-1:1);var Wn={labelStandoff:Xn,labelShift:na},Fi,Ya,Wi,uo,Ao=0,wo=qt.side,Uo=qt._id.charAt(0),Ri=qt.tickangle,ps;if(Uo==="x")ps=!Wr&&wo==="bottom"||Wr&&wo==="top",uo=ps?1:-1,Wr&&(uo*=-1),Fi=na*uo,Ya=Ct+Xn*uo,Wi=ps?1:-.2,Math.abs(Ri)===90&&(Wr?Wi+=ye:Ri===-90&&wo==="bottom"?Wi=de:Ri===90&&wo==="top"?Wi=ye:Wi=.5,Ao=ye/2*(Ri/90)),Wn.xFn=function(As){return As.dx+Fi+Ao*As.fontSize},Wn.yFn=function(As){return As.dy+Ya+As.fontSize*Wi},Wn.anchorFn=function(As,hs){if(xr){if(Tn)return"end";if(hn)return"start"}return!w(hs)||hs===0||hs===180?"middle":hs*uo<0!==Wr?"end":"start"},Wn.heightFn=function(As,hs,es){return hs<-60||hs>60?-.5*es:qt.side==="top"!==Wr?-es:0};else if(Uo==="y"){if(ps=!Wr&&wo==="left"||Wr&&wo==="right",uo=ps?1:-1,Wr&&(uo*=-1),Fi=Xn,Ya=na*uo,Wi=0,!Wr&&Math.abs(Ri)===90&&(Ri===-90&&wo==="left"||Ri===90&&wo==="right"?Wi=de:Wi=.5),Wr){var as=w(Ri)?+Ri:0;if(as!==0){var el=t.deg2rad(as);Ao=Math.abs(Math.sin(el))*de*uo,Wi=0}}Wn.xFn=function(As){return As.dx+Ct-(Fi+As.fontSize*Wi)*uo+Ao*As.fontSize},Wn.yFn=function(As){return As.dy+Ya+As.fontSize*ye},Wn.anchorFn=function(As,hs){return w(hs)&&Math.abs(hs)===90?"middle":ps?"end":"start"},Wn.heightFn=function(As,hs,es){return qt.side==="right"&&(hs*=-1),hs<-30?-es:hs<30?-.5*es:0}}return Wn};function ia(qt){return[qt.text,qt.x,qt.axInfo,qt.font,qt.fontSize,qt.fontColor].join("_")}se.drawTicks=function(qt,Ct,Ur){Ur=Ur||{};var Qr=Ct._id+"tick",tn=[].concat(Ct.minor&&Ct.minor.ticks?Ur.vals.filter(function(en){return en.minor&&!en.noTick}):[]).concat(Ct.ticks?Ur.vals.filter(function(en){return!en.minor&&!en.noTick}):[]),Xr=Ur.layer.selectAll("path."+Qr).data(tn,ia);Xr.exit().remove(),Xr.enter().append("path").classed(Qr,1).classed("ticks",1).classed("crisp",Ur.crisp!==!1).each(function(en){return i.stroke(v.select(this),en.minor?Ct.minor.tickcolor:Ct.tickcolor)}).style("stroke-width",function(en){return s.crispRound(qt,en.minor?Ct.minor.tickwidth:Ct.tickwidth,1)+"px"}).attr("d",Ur.path).style("display",null),$a(Ct,[H]),Xr.attr("transform",Ur.transFn)},se.drawGrid=function(qt,Ct,Ur){if(Ur=Ur||{},Ct.tickmode!=="sync"){var Qr=Ct._id+"grid",tn=Ct.minor&&Ct.minor.showgrid,Xr=tn?Ur.vals.filter(function(Wn){return Wn.minor}):[],en=Ct.showgrid?Ur.vals.filter(function(Wn){return!Wn.minor}):[],Tn=Ur.counterAxis;if(Tn&&se.shouldShowZeroLine(qt,Ct,Tn))for(var hn=Ct.tickmode==="array",Rt=0;Rt<en.length;Rt++){var xr=en[Rt].x;if(hn?!xr:Math.abs(xr)<Ct.dtick/100)if(en=en.slice(0,Rt).concat(en.slice(Rt+1)),hn)Rt--;else break}Ct._gw=s.crispRound(qt,Ct.gridwidth,1);for(var Wr=tn?s.crispRound(qt,Ct.minor.gridwidth,1):0,An=Ur.layer,Xn=Ur.minorLayer,na=1;na>=0;na--){var ra=na?An:Xn;if(ra){var Sn=ra.selectAll("path."+Qr).data(na?en:Xr,ia);Sn.exit().remove(),Sn.enter().append("path").classed(Qr,1).classed("crisp",Ur.crisp!==!1),Sn.attr("transform",Ur.transFn).attr("d",Ur.path).each(function(Wn){return i.stroke(v.select(this),Wn.minor?Ct.minor.gridcolor:Ct.gridcolor||"#ddd")}).style("stroke-dasharray",function(Wn){return s.dashStyle(Wn.minor?Ct.minor.griddash:Ct.griddash,Wn.minor?Ct.minor.gridwidth:Ct.gridwidth)}).style("stroke-width",function(Wn){return(Wn.minor?Wr:Ct._gw)+"px"}).style("display",null),typeof Ur.path=="function"&&Sn.attr("d",Ur.path)}}$a(Ct,[q,z])}},se.drawZeroLine=function(qt,Ct,Ur){Ur=Ur||Ur;var Qr=Ct._id+"zl",tn=se.shouldShowZeroLine(qt,Ct,Ur.counterAxis),Xr=Ur.layer.selectAll("path."+Qr).data(tn?[{x:0,id:Ct._id}]:[]);Xr.exit().remove(),Xr.enter().append("path").classed(Qr,1).classed("zl",1).classed("crisp",Ur.crisp!==!1).each(function(){Ur.layer.selectAll("path").sort(function(en,Tn){return oe(en.id,Tn.id)})}),Xr.attr("transform",Ur.transFn).attr("d",Ur.path).call(i.stroke,Ct.zerolinecolor||i.defaultLine).style("stroke-width",s.crispRound(qt,Ct.zerolinewidth,Ct._gw||1)+"px").style("display",null),$a(Ct,[V])},se.drawLabels=function(qt,Ct,Ur){Ur=Ur||{};var Qr=qt._fullLayout,tn=Ct._id,Xr=Ct.zerolinelayer==="above traces",en=Ur.cls||tn+"tick",Tn=Ur.vals.filter(function(Ss){return Ss.text}),hn=Ur.labelFns,Rt=Ur.secondary?0:Ct.tickangle,xr=(Ct._prevTickAngles||{})[en],Wr=Ur.layer.selectAll("g."+en).data(Ct.showticklabels?Tn:[],ia),An=[];Wr.enter().append("g").classed(en,1).append("text").attr("text-anchor","middle").each(function(Ss){var ls=v.select(this),Lo=qt._promises.length;ls.call(a.positionText,hn.xFn(Ss),hn.yFn(Ss)).call(s.font,{family:Ss.font,size:Ss.fontSize,color:Ss.fontColor,weight:Ss.fontWeight,style:Ss.fontStyle,variant:Ss.fontVariant,textcase:Ss.fontTextcase,lineposition:Ss.fontLineposition,shadow:Ss.fontShadow}).text(Ss.text).call(a.convertToTspans,qt),qt._promises[Lo]?An.push(qt._promises.pop().then(function(){Xn(ls,Rt)})):Xn(ls,Rt)}),$a(Ct,[G]),Wr.exit().remove(),Ur.repositionOnUpdate&&Wr.each(function(Ss){v.select(this).select("text").call(a.positionText,hn.xFn(Ss),hn.yFn(Ss))});function Xn(Ss,ls){Ss.each(function(Lo){var Es=v.select(this),ml=Es.select(".text-math-group"),zl=hn.anchorFn(Lo,ls),Bl=Ur.transFn.call(Es.node(),Lo)+(w(ls)&&+ls!=0?" rotate("+ls+","+hn.xFn(Lo)+","+(hn.yFn(Lo)-Lo.fontSize/2)+")":""),Fs=a.lineCount(Es),Di=me*Lo.fontSize,_o=hn.heightFn(Lo,w(ls)?+ls:0,(Fs-1)*Di);if(_o&&(Bl+=r(0,_o)),ml.empty()){var Nl=Es.select("text");Nl.attr({transform:Bl,"text-anchor":zl}),Nl.style("display",null),Ct._adjustTickLabelsOverflow&&Ct._adjustTickLabelsOverflow()}else{var Vs=s.bBox(ml.node()).width,Ko=Vs*{end:-.5,start:.5}[zl];ml.attr("transform",Bl+r(Ko,0))}})}Ct._adjustTickLabelsOverflow=function(){var Ss=Ct.ticklabeloverflow;if(!(!Ss||Ss==="allow")){var ls=Ss.indexOf("hide")!==-1,Lo=Ct._id.charAt(0)==="x",Es=0,ml=Lo?qt._fullLayout.width:qt._fullLayout.height;if(Ss.indexOf("domain")!==-1){var zl=t.simpleMap(Ct.range,Ct.r2l);Es=Ct.l2p(zl[0])+Ct._offset,ml=Ct.l2p(zl[1])+Ct._offset}var Bl=Math.min(Es,ml),Fs=Math.max(Es,ml),Di=Ct.side,_o=1/0,Nl=-1/0;Wr.each(function(rl){var yl=v.select(this),Cu=yl.select(".text-math-group");if(Cu.empty()){var yo=s.bBox(yl.node()),Ps=0;Lo?(yo.right>Fs||yo.left<Bl)&&(Ps=1):(yo.bottom>Fs||yo.top+(Ct.tickangle?0:rl.fontSize/4)<Bl)&&(Ps=1);var ms=yl.select("text");Ps?ls&&ms.style("display","none"):ms.node().style.display!=="none"&&(ms.style("display",null),Di==="bottom"||Di==="right"?_o=Math.min(_o,Lo?yo.top:yo.left):_o=-1/0,Di==="top"||Di==="left"?Nl=Math.max(Nl,Lo?yo.bottom:yo.right):Nl=1/0)}});for(var Vs in Qr._plots){var Ko=Qr._plots[Vs];if(!(Ct._id!==Ko.xaxis._id&&Ct._id!==Ko.yaxis._id)){var jl=Lo?Ko.yaxis:Ko.xaxis;jl&&(jl["_visibleLabelMin_"+Ct._id]=_o,jl["_visibleLabelMax_"+Ct._id]=Nl)}}}},Ct._hideCounterAxisInsideTickLabels=function(Ss){var ls=Ct._id.charAt(0)==="x",Lo=[];for(var Es in Qr._plots){var ml=Qr._plots[Es];Ct._id!==ml.xaxis._id&&Ct._id!==ml.yaxis._id||Lo.push(ls?ml.yaxis:ml.xaxis)}Lo.forEach(function(zl,Bl){zl&&Fa(zl)&&(Ss||[V,z,q,H,G]).forEach(function(Fs){var Di=Fs.K==="tick"&&Fs.L==="text"&&Ct.ticklabelmode==="period",_o=Qr._plots[Ct._mainSubplot],Nl;if(Fs.K===V.K){var Vs=Xr?_o.zerolinelayerAbove:_o.zerolinelayer;Nl=Vs.selectAll("."+Ct._id+"zl")}else Fs.K===z.K?Nl=_o.minorGridlayer.selectAll("."+Ct._id):Fs.K===q.K?Nl=_o.gridlayer.selectAll("."+Ct._id):Nl=_o[Ct._id.charAt(0)+"axislayer"];Nl.each(function(){var Ko=v.select(this);Fs.L&&(Ko=Ko.selectAll(Fs.L)),Ko.each(function(jl){var rl=Ct.l2p(Di?qn(jl):jl.x)+Ct._offset,yl=v.select(this);rl<Ct["_visibleLabelMax_"+zl._id]&&rl>Ct["_visibleLabelMin_"+zl._id]?yl.style("display","none"):Fs.K==="tick"&&!Bl&&yl.node().style.display!=="none"&&yl.style("display",null)})})})})},Xn(Wr,xr+1?xr:Rt);function na(){return An.length&&Promise.all(An)}var ra=null;function Sn(){if(Xn(Wr,Rt),Tn.length&&Ct.autotickangles&&(Ct.type!=="log"||String(Ct.dtick).charAt(0)!=="D")){ra=Ct.autotickangles[0];var Ss=0,ls=[],Lo,Es=1;Wr.each(function(Pl){Ss=Math.max(Ss,Pl.fontSize);var Gl=Ct.l2p(Pl.x),Yl=Qt(this),tc=s.bBox(Yl.node());Es=Math.max(Es,a.lineCount(Yl)),ls.push({top:0,bottom:10,height:10,left:Gl-tc.width/2,right:Gl+tc.width/2+2,width:tc.width+2})});var ml=(Ct.tickson==="boundaries"||Ct.showdividers)&&!Ur.secondary,zl=Tn.length,Bl=Math.abs((Tn[zl-1].x-Tn[0].x)*Ct._m)/(zl-1),Fs=ml?Bl/2:Bl,Di=ml?Ct.ticklen:Ss*1.25*Es,_o=Math.sqrt(Math.pow(Fs,2)+Math.pow(Di,2)),Nl=Fs/_o,Vs=Ct.autotickangles.map(function(Pl){return Pl*Math.PI/180}),Ko=Vs.find(function(Pl){return Math.abs(Math.cos(Pl))<=Nl});Ko===void 0&&(Ko=Vs.reduce(function(Pl,Gl){return Math.abs(Math.cos(Pl))<Math.abs(Math.cos(Gl))?Pl:Gl},Vs[0]));var jl=Ko*(180/Math.PI);if(ml){var rl=2;for(Ct.ticks&&(rl+=Ct.tickwidth/2),Lo=0;Lo<ls.length;Lo++){var yl=Tn[Lo].xbnd,Cu=ls[Lo];if(yl[0]!==null&&Cu.left-Ct.l2p(yl[0])<rl||yl[1]!==null&&Ct.l2p(yl[1])-Cu.right<rl){ra=jl;break}}}else{var yo=Ct.ticklabelposition||"",Ps=Ct.tickson||"",ms=function(Pl){return yo.indexOf(Pl)!==-1},Kl=ms("top"),Jl=ms("left"),Wo=ms("right"),pu=ms("bottom"),_u=Ps!=="boundaries"&&(pu||Jl||Kl||Wo),Xs=_u?(Ct.tickwidth||0)+2*ie:0;for(Lo=0;Lo<ls.length-1;Lo++)if(t.bBoxIntersect(ls[Lo],ls[Lo+1],Xs)){ra=jl;break}}ra&&Xn(Wr,ra)}}Ct._selections&&(Ct._selections[en]=Wr);var Wn=[na];Ct.automargin&&Qr._redrawFromAutoMarginCount&&xr===90?(ra=xr,Wn.push(function(){Xn(Wr,xr)})):Wn.push(Sn),Ct._tickAngles&&Wn.push(function(){Ct._tickAngles[en]=ra===null?w(Rt)?Rt:0:ra});var Fi=function(){var Ss=0,ls=0;return Wr.each(function(Lo,Es){var ml=Qt(this),zl=ml.select(".text-math-group");if(zl.empty()){var Bl;Ct._vals[Es]&&(Bl=Ct._vals[Es].bb||s.bBox(ml.node()),Ct._vals[Es].bb=Bl),Ss=Math.max(Ss,Bl.width),ls=Math.max(ls,Bl.height)}}),{labelsMaxW:Ss,labelsMaxH:ls}},Ya=Ct._anchorAxis;if(Ya&&(Ya.autorange||Ya.insiderange)&&Fa(Ct)&&!Y(Qr,Ct._id)&&(Qr._insideTickLabelsUpdaterange||(Qr._insideTickLabelsUpdaterange={}),Ya.autorange&&(Qr._insideTickLabelsUpdaterange[Ya._name+".autorange"]=Ya.autorange,Wn.push(Fi)),Ya.insiderange)){var Wi=Fi(),uo=Ct._id.charAt(0)==="y"?Wi.labelsMaxW:Wi.labelsMaxH;uo+=2*ie,Ct.ticklabelposition==="inside"&&(uo+=Ct.ticklen||0);var Ao=Ct.side==="right"||Ct.side==="top"?1:-1,wo=Ao===1?1:0,Uo=Ao===1?0:1,Ri=[];Ri[Uo]=Ya.range[Uo];var ps=Ya.range,as=Ya.r2p(ps[wo]),el=Ya.r2p(ps[Uo]),As=Qr._insideTickLabelsUpdaterange[Ya._name+".range"];if(As){var hs=Ya.r2p(As[wo]),es=Ya.r2p(As[Uo]),tl=Ao*(Ct._id.charAt(0)==="y"?1:-1);tl*as<tl*hs&&(as=hs,Ri[wo]=ps[wo]=As[wo]),tl*el>tl*es&&(el=es,Ri[Uo]=ps[Uo]=As[Uo])}var Ks=Math.abs(el-as);Ks-uo>0?(Ks-=uo,uo*=1+uo/Ks):uo=0,Ct._id.charAt(0)!=="y"&&(uo=-uo),Ri[wo]=Ya.p2r(Ya.r2p(ps[wo])+Ao*uo),Ya.autorange==="min"||Ya.autorange==="max reversed"?(Ri[0]=null,Ya._rangeInitial0=void 0,Ya._rangeInitial1=void 0):(Ya.autorange==="max"||Ya.autorange==="min reversed")&&(Ri[1]=null,Ya._rangeInitial0=void 0,Ya._rangeInitial1=void 0),Qr._insideTickLabelsUpdaterange[Ya._name+".range"]=Ri}var pl=t.syncOrAsync(Wn);return pl&&pl.then&&qt._promises.push(pl),pl};function xa(qt,Ct,Ur){var Qr=Ct._id+"divider",tn=Ur.vals,Xr=Ur.layer.selectAll("path."+Qr).data(tn,ia);Xr.exit().remove(),Xr.enter().insert("path",":first-child").classed(Qr,1).classed("crisp",1).call(i.stroke,Ct.dividercolor).style("stroke-width",s.crispRound(qt,Ct.dividerwidth,1)+"px"),Xr.attr("transform",Ur.transFn).attr("d",Ur.path)}se.getPxPosition=function(qt,Ct){var Ur=qt._fullLayout._size,Qr=Ct._id.charAt(0),tn=Ct.side,Xr;if(Ct.anchor!=="free"?Xr=Ct._anchorAxis:Qr==="x"?Xr={_offset:Ur.t+(1-(Ct.position||0))*Ur.h,_length:0}:Qr==="y"&&(Xr={_offset:Ur.l+(Ct.position||0)*Ur.w+Ct._shift,_length:0}),tn==="top"||tn==="left")return Xr._offset;if(tn==="bottom"||tn==="right")return Xr._offset+Xr._length};function ba(qt){var Ct=qt.title.font.size,Ur=(qt.title.text.match(a.BR_TAG_ALL)||[]).length;return qt.title.hasOwnProperty("standoff")?Ct*(de+Ur*me):Ur?Ct*(Ur+1)*me:Ct}function ea(qt,Ct){var Ur=qt._fullLayout,Qr=Ct._id,tn=Qr.charAt(0),Xr=Ct.title.font.size,en,Tn=(Ct.title.text.match(a.BR_TAG_ALL)||[]).length;if(Ct.title.hasOwnProperty("standoff"))Ct.side==="bottom"||Ct.side==="right"?en=Ct._depth+Ct.title.standoff+Xr*de:(Ct.side==="top"||Ct.side==="left")&&(en=Ct._depth+Ct.title.standoff+Xr*(ye+Tn*me));else{var hn=Fa(Ct);if(Ct.type==="multicategory")en=Ct._depth;else{var Rt=1.5*Xr;hn&&(Rt=.5*Xr,Ct.ticks==="outside"&&(Rt+=Ct.ticklen)),en=10+Rt+(Ct.linewidth?Ct.linewidth-1:0)}hn||(tn==="x"?en+=Ct.side==="top"?Xr*(Ct.showticklabels?1:0):Xr*(Ct.showticklabels?1.5:.5):en+=Ct.side==="right"?Xr*(Ct.showticklabels?1:.5):Xr*(Ct.showticklabels?.5:0))}var xr=se.getPxPosition(qt,Ct),Wr,An,Xn;tn==="x"?(An=Ct._offset+Ct._length/2,Xn=Ct.side==="top"?xr-en:xr+en):(Xn=Ct._offset+Ct._length/2,An=Ct.side==="right"?xr+en:xr-en,Wr={rotate:"-90",offset:0});var na;if(Ct.type!=="multicategory"){var ra=Ct._selections[Ct._id+"tick"];if(na={selection:ra,side:Ct.side},ra&&ra.node()&&ra.node().parentNode){var Sn=s.getTranslate(ra.node().parentNode);na.offsetLeft=Sn.x,na.offsetTop=Sn.y}Ct.title.hasOwnProperty("standoff")&&(na.pad=0)}return Ct._titleStandoff=en,l.draw(qt,Qr+"title",{propContainer:Ct,propName:Ct._name+".title.text",placeholder:Ur._dfltTitle[tn],avoid:na,transform:Wr,attributes:{x:An,y:Xn,"text-anchor":"middle"}})}se.shouldShowZeroLine=function(qt,Ct,Ur){var Qr=t.simpleMap(Ct.range,Ct.r2l);return Qr[0]*Qr[1]<=0&&Ct.zeroline&&(Ct.type==="linear"||Ct.type==="-")&&!(Ct.rangebreaks&&Ct.maskBreaks(0)===U)&&(Za(Ct,0)||!ui(qt,Ct,Ur,Qr)||_r(qt,Ct))},se.clipEnds=function(qt,Ct){return Ct.filter(function(Ur){return Za(qt,Ur.x)})};function Za(qt,Ct){var Ur=qt.l2p(Ct);return Ur>1&&Ur<qt._length-1}function ui(qt,Ct,Ur,Qr){var tn=Ur._mainAxis;if(!tn)return;var Xr=qt._fullLayout,en=Ct._id.charAt(0),Tn=se.counterLetter(Ct._id),hn=Ct._offset+(Math.abs(Qr[0])<Math.abs(Qr[1])==(en==="x")?0:Ct._length);function Rt(na){if(!na.showline||!na.linewidth)return!1;var ra=Math.max((na.linewidth+Ct.zerolinewidth)/2,1);function Sn(Ya){return typeof Ya=="number"&&Math.abs(Ya-hn)<ra}if(Sn(na._mainLinePosition)||Sn(na._mainMirrorPosition))return!0;var Wn=na._linepositions||{};for(var Fi in Wn)if(Sn(Wn[Fi][0])||Sn(Wn[Fi][1]))return!0}var xr=Xr._plots[Ur._mainSubplot];if(!(xr.mainplotinfo||xr).overlays.length)return Rt(Ur);for(var Wr=se.list(qt,Tn),An=0;An<Wr.length;An++){var Xn=Wr[An];if(Xn._mainAxis===tn&&Rt(Xn))return!0}}function _r(qt,Ct){for(var Ur=qt._fullData,Qr=Ct._mainSubplot,tn=Ct._id.charAt(0),Xr=0;Xr<Ur.length;Xr++){var en=Ur[Xr];if(en.visible===!0&&en.xaxis+en.yaxis===Qr&&(P.traceIs(en,"bar-like")&&en.orientation==={x:"h",y:"v"}[tn]||en.fill&&en.fill.charAt(en.fill.length-1)===tn))return!0}return!1}function Qt(qt){var Ct=v.select(qt),Ur=Ct.select(".text-math-group");return Ur.empty()?Ct.select("text"):Ur}se.allowAutoMargin=function(qt){for(var Ct=se.list(qt,"",!0),Ur=0;Ur<Ct.length;Ur++){var Qr=Ct[Ur];Qr.automargin&&(C.allowAutoMargin(qt,yr(Qr)),Qr.mirror&&C.allowAutoMargin(qt,br(Qr))),P.getComponentMethod("rangeslider","isVisible")(Qr)&&C.allowAutoMargin(qt,nn(Qr))}};function yr(qt){return qt._id+".automargin"}function br(qt){return yr(qt)+".mirror"}function nn(qt){return qt._id+".rangeslider"}se.swap=function(qt,Ct){for(var Ur=wn(qt,Ct),Qr=0;Qr<Ur.length;Qr++)Fn(qt,Ur[Qr].x,Ur[Qr].y)};function wn(qt,Ct){var Ur=[],Qr,tn;for(Qr=0;Qr<Ct.length;Qr++){var Xr=[],en=qt._fullData[Ct[Qr]].xaxis,Tn=qt._fullData[Ct[Qr]].yaxis;if(!(!en||!Tn)){for(tn=0;tn<Ur.length;tn++)(Ur[tn].x.indexOf(en)!==-1||Ur[tn].y.indexOf(Tn)!==-1)&&Xr.push(tn);if(!Xr.length){Ur.push({x:[en],y:[Tn]});continue}var hn=Ur[Xr[0]],Rt;if(Xr.length>1)for(tn=1;tn<Xr.length;tn++)Rt=Ur[Xr[tn]],Ln(hn.x,Rt.x),Ln(hn.y,Rt.y);Ln(hn.x,[en]),Ln(hn.y,[Tn])}}return Ur}function Ln(qt,Ct){for(var Ur=0;Ur<Ct.length;Ur++)qt.indexOf(Ct[Ur])===-1&&qt.push(Ct[Ur])}function Fn(qt,Ct,Ur){var Qr=[],tn=[],Xr=qt.layout,en,Tn;for(en=0;en<Ct.length;en++)Qr.push(se.getFromId(qt,Ct[en]));for(en=0;en<Ur.length;en++)tn.push(se.getFromId(qt,Ur[en]));var hn=Object.keys(o),Rt=["anchor","domain","overlaying","position","side","tickangle","editType"],xr=["linear","log"];for(en=0;en<hn.length;en++){var Wr=hn[en],An=Qr[0][Wr],Xn=tn[0][Wr],na=!0,ra=!1,Sn=!1;if(!(Wr.charAt(0)==="_"||typeof An=="function"||Rt.indexOf(Wr)!==-1)){for(Tn=1;Tn<Qr.length&&na;Tn++){var Wn=Qr[Tn][Wr];Wr==="type"&&xr.indexOf(An)!==-1&&xr.indexOf(Wn)!==-1&&An!==Wn?ra=!0:Wn!==An&&(na=!1)}for(Tn=1;Tn<tn.length&&na;Tn++){var Fi=tn[Tn][Wr];Wr==="type"&&xr.indexOf(Xn)!==-1&&xr.indexOf(Fi)!==-1&&Xn!==Fi?Sn=!0:tn[Tn][Wr]!==Xn&&(na=!1)}na&&(ra&&(Xr[Qr[0]._name].type="linear"),Sn&&(Xr[tn[0]._name].type="linear"),va(Xr,Wr,Qr,tn,qt._fullLayout._dfltTitle))}}for(en=0;en<qt._fullLayout.annotations.length;en++){var Ya=qt._fullLayout.annotations[en];Ct.indexOf(Ya.xref)!==-1&&Ur.indexOf(Ya.yref)!==-1&&t.swapAttrs(Xr.annotations[en],["?"])}}function va(qt,Ct,Ur,Qr,tn){var Xr=t.nestedProperty,en=Xr(qt[Ur[0]._name],Ct).get(),Tn=Xr(qt[Qr[0]._name],Ct).get(),hn;for(Ct==="title"&&(en&&en.text===tn.x&&(en.text=tn.y),Tn&&Tn.text===tn.y&&(Tn.text=tn.x)),hn=0;hn<Ur.length;hn++)Xr(qt,Ur[hn]._name+"."+Ct).set(Tn);for(hn=0;hn<Qr.length;hn++)Xr(qt,Qr[hn]._name+"."+Ct).set(en)}function Da(qt){return qt._id==="angularaxis"}function Pa(qt,Ct){for(var Ur=Ct._rangebreaks.length,Qr=0;Qr<Ur;Qr++){var tn=Ct._rangebreaks[Qr];if(qt>=tn.min&&qt<tn.max)return tn.max}return qt}function Fa(qt){return(qt.ticklabelposition||"").indexOf("inside")!==-1}function $a(qt,Ct){Fa(qt._anchorAxis||{})&&qt._hideCounterAxisInsideTickLabels&&qt._hideCounterAxisInsideTickLabels(Ct)}function oa(qt,Ct,Ur,Qr){var tn=qt.anchor!=="free"&&(qt.overlaying===void 0||qt.overlaying===!1)?qt._id:qt.overlaying,Xr;Qr?Xr=qt.side==="right"?Ct:-Ct:Xr=Ct,tn in Ur||(Ur[tn]={}),qt.side in Ur[tn]||(Ur[tn][qt.side]=0),Ur[tn][qt.side]+=Xr}function zi(qt,Ct){return qt.autoshift?Ct[qt.overlaying][qt.side]:qt.shift||0}function Gi(qt,Ct){return/%f/.test(Ct)?qt>=D:/%L/.test(Ct)?qt>=N:/%[SX]/.test(Ct)?qt>=x:/%M/.test(Ct)?qt>=p:/%[HI]/.test(Ct)?qt>=f:/%p/.test(Ct)?qt>=g:/%[Aadejuwx]/.test(Ct)?qt>=A:/%[UVW]/.test(Ct)?qt>=b:/%[Bbm]/.test(Ct)?qt>=k:/%[q]/.test(Ct)?qt>=_:/%[Yy]/.test(Ct)?qt>=m:!0}}}),tM=Ne({"src/plots/cartesian/autorange_options_defaults.js"(te,Z){Z.exports=function(w,C,P){var t,r;if(P){var a=C==="reversed"||C==="min reversed"||C==="max reversed";t=P[a?1:0],r=P[a?0:1]}var l=w("autorangeoptions.minallowed",r===null?t:void 0),i=w("autorangeoptions.maxallowed",t===null?r:void 0);l===void 0&&w("autorangeoptions.clipmin"),i===void 0&&w("autorangeoptions.clipmax"),w("autorangeoptions.include")}}}),rM=Ne({"src/plots/cartesian/range_defaults.js"(te,Z){var v=tM();Z.exports=function(C,P,t,r){var a=P._template||{},l=P.type||a.type||"-";t("minallowed"),t("maxallowed");var i=t("range");if(!i){var s;!r.noInsiderange&&l!=="log"&&(s=t("insiderange"),s&&(s[0]===null||s[1]===null)&&(P.insiderange=!1,s=void 0),s&&(i=t("range",s)))}var o=P.getAutorangeDflt(i,r),u=t("autorange",o),d;i&&(i[0]===null&&i[1]===null||(i[0]===null||i[1]===null)&&(u==="reversed"||u===!0)||i[0]!==null&&(u==="min"||u==="max reversed")||i[1]!==null&&(u==="max"||u==="min reversed"))&&(i=void 0,delete P.range,P.autorange=!0,d=!0),d||(o=P.getAutorangeDflt(i,r),u=t("autorange",o)),u&&(v(t,u,i),(l==="linear"||l==="-")&&t("rangemode")),P.cleanRange()}}}),rA=Ne({"node_modules/mouse-event-offset/index.js"(te,Z){var v={left:0,top:0};Z.exports=w;function w(P,t,r){t=t||P.currentTarget||P.srcElement,Array.isArray(r)||(r=[0,0]);var a=P.clientX||0,l=P.clientY||0,i=C(t);return r[0]=a-i.left,r[1]=l-i.top,r}function C(P){return P===window||P===document||P===document.body?v:P.getBoundingClientRect()}}}),nA=Ne({"node_modules/has-passive-events/index.js"(te,Z){var v=Cw();function w(){var C=!1;try{var P=Object.defineProperty({},"passive",{get:function(){C=!0}});window.addEventListener("test",null,P),window.removeEventListener("test",null,P)}catch{C=!1}return C}Z.exports=v&&w()}}),bL=Ne({"src/components/dragelement/align.js"(te,Z){Z.exports=function(w,C,P,t,r){var a=(w-P)/(t-P),l=a+C/(t-P),i=(a+l)/2;return r==="left"||r==="bottom"?a:r==="center"||r==="middle"?i:r==="right"||r==="top"?l:a<2/3-i?a:l>4/3-i?l:i}}}),wL=Ne({"src/components/dragelement/cursor.js"(te,Z){var v=In(),w=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];Z.exports=function(P,t,r,a){return r==="left"?P=0:r==="center"?P=1:r==="right"?P=2:P=v.constrain(Math.floor(P*3),0,2),a==="bottom"?t=0:a==="middle"?t=1:a==="top"?t=2:t=v.constrain(Math.floor(t*3),0,2),w[t][P]}}}),TL=Ne({"src/components/dragelement/unhover.js"(te,Z){var v=bx(),w=z0(),C=D1().getGraphDiv,P=$u(),t=Z.exports={};t.wrapped=function(r,a,l){r=C(r),r._fullLayout&&w.clear(r._fullLayout._uid+P.HOVERID),t.raw(r,a,l)},t.raw=function(a,l){var i=a._fullLayout,s=a._hoverdata;l||(l={}),!(l.target&&!a._dragged&&v.triggerHandler(a,"plotly_beforehover",l)===!1)&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),a._hoverdata=void 0,l.target&&s&&a.emit("plotly_unhover",{event:l,points:s}))}}}),Bv=Ne({"src/components/dragelement/index.js"(te,Z){var v=rA(),w=eA(),C=nA(),P=In().removeElement,t=xh(),r=Z.exports={};r.align=bL(),r.getCursor=wL();var a=TL();r.unhover=a.wrapped,r.unhoverRaw=a.raw,r.init=function(o){var u=o.gd,d=1,h=u._context.doubleClickDelay,y=o.element,m,E,c,_,T,M,k,b;u._mouseDownTime||(u._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=f,C?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=f,y.addEventListener("touchstart",f,{passive:!1})):y.ontouchstart=f;function A(N,D,B){return Math.abs(N)<B&&(N=0),Math.abs(D)<B&&(D=0),[N,D]}var g=o.clampFn||A;function f(N){u._dragged=!1,u._dragging=!0;var D=i(N);m=D[0],E=D[1],k=N.target,M=N,b=N.buttons===2||N.ctrlKey,typeof N.clientX>"u"&&typeof N.clientY>"u"&&(N.clientX=m,N.clientY=E),c=new Date().getTime(),c-u._mouseDownTime<h?d+=1:(d=1,u._mouseDownTime=c),o.prepFn&&o.prepFn(N,m,E),w&&!b?(T=l(),T.style.cursor=window.getComputedStyle(y).cursor):w||(T=document,_=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(y).cursor),document.addEventListener("mouseup",x),document.addEventListener("touchend",x),o.dragmode!==!1&&(N.preventDefault(),document.addEventListener("mousemove",p),document.addEventListener("touchmove",p,{passive:!1}))}function p(N){N.preventDefault();var D=i(N),B=o.minDrag||t.MINDRAG,U=g(D[0]-m,D[1]-E,B),V=U[0],q=U[1];(V||q)&&(u._dragged=!0,r.unhover(u,N)),u._dragged&&o.moveFn&&!b&&(u._dragdata={element:y,dx:V,dy:q},o.moveFn(V,q))}function x(N){if(delete u._dragdata,o.dragmode!==!1&&(N.preventDefault(),document.removeEventListener("mousemove",p),document.removeEventListener("touchmove",p)),document.removeEventListener("mouseup",x),document.removeEventListener("touchend",x),w?P(T):_&&(T.documentElement.style.cursor=_,_=null),!u._dragging){u._dragged=!1;return}if(u._dragging=!1,new Date().getTime()-u._mouseDownTime>h&&(d=Math.max(d-1,1)),u._dragged)o.doneFn&&o.doneFn();else{var D;M.target===k?D=M:(D={target:k,srcElement:k,toElement:k},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(B=>{var U=M[B];!D[B]&&typeof U!="function"&&(D[B]=U)})),o.clickFn&&o.clickFn(d,D),b||k.dispatchEvent(new MouseEvent("click",N))}u._dragging=!1,u._dragged=!1}};function l(){var s=document.createElement("div");s.className="dragcover";var o=s.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(s),s}r.coverSlip=l;function i(s){return v(s.changedTouches?s.changedTouches[0]:s,document.body)}}}),km=Ne({"src/lib/setcursor.js"(te,Z){Z.exports=function(w,C){(w.attr("class")||"").split(" ").forEach(function(P){P.indexOf("cursor-")===0&&w.classed(P,!1)}),C&&w.classed("cursor-"+C,!0)}}}),AL=Ne({"src/lib/override_cursor.js"(te,Z){var v=km(),w="data-savedcursor",C="!!";Z.exports=function(t,r){var a=t.attr(w);if(r){if(!a){for(var l=(t.attr("class")||"").split(" "),i=0;i<l.length;i++){var s=l[i];s.indexOf("cursor-")===0&&t.attr(w,s.substr(7)).classed(s,!1)}t.attr(w)||t.attr(w,C)}v(t,r)}else a&&(t.attr(w,null),a===C?v(t):v(t,a))}}}),nM=Ne({"src/components/legend/attributes.js"(te,Z){var v=$o(),w=lu();Z.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:w.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:v({editType:"legend"}),grouptitlefont:v({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"},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:v({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}}}),aA=Ne({"src/components/legend/helpers.js"(te){te.isGrouped=function(v){return(v.traceorder||"").indexOf("grouped")!==-1},te.isVertical=function(v){return v.orientation!=="h"},te.isReversed=function(v){return(v.traceorder||"").indexOf("reversed")!==-1}}}),aM=Ne({"src/components/legend/defaults.js"(te,Z){var v=Xo(),w=In(),C=Tu(),P=ns(),t=nM(),r=_x(),a=aA();function l(i,s,o,u){var d=s[i]||{},h=C.newContainer(o,i);function y(me,W){return w.coerce(d,h,t,me,W)}var m=w.coerceFont(y,"font",o.font);y("bgcolor",o.paper_bgcolor),y("bordercolor");var E=y("visible");if(E){for(var c,_=function(me,W){var ie=c._input,se=c;return w.coerce(ie,se,P,me,W)},T=o.font||{},M=w.coerceFont(y,"grouptitlefont",T,{overrideDflt:{size:Math.round(T.size*1.1)}}),k=0,b=!1,A="normal",g=(o.shapes||[]).filter(function(me){return me.showlegend}),f=u.concat(g).filter(function(me){return i===(me.legend||"legend")}),p=0;p<f.length;p++)if(c=f[p],!!c.visible){var x=c._isShape;(c.showlegend||c._dfltShowLegend&&!(c._module&&c._module.attributes&&c._module.attributes.showlegend&&c._module.attributes.showlegend.dflt===!1))&&(k++,c.showlegend&&(b=!0,(!x&&v.traceIs(c,"pie-like")||c._input.showlegend===!0)&&k++),w.coerceFont(_,"legendgrouptitle.font",M)),(!x&&v.traceIs(c,"bar")&&o.barmode==="stack"||["tonextx","tonexty"].indexOf(c.fill)!==-1)&&(A=a.isGrouped({traceorder:A})?"grouped+reversed":"reversed"),c.legendgroup!==void 0&&c.legendgroup!==""&&(A=a.isReversed({traceorder:A})?"reversed+grouped":"grouped")}var N=w.coerce(s,o,r,"showlegend",b&&k>(i==="legend"?1:0));if(N===!1&&(o[i]=void 0),!(N===!1&&!d.uirevision)&&(y("uirevision",o.uirevision),N!==!1)){y("borderwidth");var D=y("orientation"),B=y("yref"),U=y("xref"),V=D==="h",q=B==="paper",z=U==="paper",H,G,J,le="left";V?(H=0,v.getComponentMethod("rangeslider","isVisible")(s.xaxis)?q?(G=1.1,J="bottom"):(G=1,J="top"):q?(G=-.1,J="top"):(G=0,J="bottom")):(G=1,J="auto",z?H=1.02:(H=1,le="right")),w.coerce(d,h,{x:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:H}},"x"),w.coerce(d,h,{y:{valType:"number",editType:"legend",min:q?-2:0,max:q?3:1,dflt:G}},"y"),y("traceorder",A),a.isGrouped(o[i])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",le),y("yanchor",J),y("maxheight"),y("valign"),w.noneOrAll(d,h,["x","y"]);var ye=y("title.text");if(ye){y("title.side",V?"left":"top");var de=w.extendFlat({},m,{size:w.bigFont(m.size)});w.coerceFont(y,"title.font",de)}}}}Z.exports=function(s,o,u){var d,h=u.slice(),y=o.shapes;if(y)for(d=0;d<y.length;d++){var m=y[d];if(m.showlegend){var E={_input:m._input,visible:m.visible,showlegend:m.showlegend,legend:m.legend};h.push(E)}}var c=["legend"];for(d=0;d<h.length;d++)w.pushUnique(c,h[d].legend);for(o._legends=[],d=0;d<c.length;d++){var _=c[d];l(_,s,o,h),o[_]&&(o[_]._id=_),o._legends.push(_)}}}}),iA=Ne({"src/components/legend/handle_click.js"(te,Z){var v=Xo(),w=In(),C=w.pushUnique,P=!0;Z.exports=function(r,a,l){var i=a._fullLayout;if(a._dragged||a._editing)return;var s=i.legend.itemclick,o=i.legend.itemdoubleclick,u=i.legend.groupclick;l===1&&s==="toggle"&&o==="toggleothers"&&P&&a.data&&a._context.showTips&&w.notifier(w._(a,"Double-click on legend to isolate one trace"),"long"),P=!1;var d;if(l===1?d=s:l===2&&(d=o),!d)return;var h=u==="togglegroup",y=i.hiddenlabels?i.hiddenlabels.slice():[],m=r.data()[0][0];if(m.groupTitle&&m.noClick)return;var E=a._fullData,c=(i.shapes||[]).filter(function(Fe){return Fe.showlegend}),_=E.concat(c),T=m.trace;T._isShape&&(T=T._fullInput);var M=T.legendgroup,k,b,A,g,f,p,x={},N=[],D=[],B=[];function U(Fe,Pe){var be=N.indexOf(Fe),Ye=x.visible;return Ye||(Ye=x.visible=[]),N.indexOf(Fe)===-1&&(N.push(Fe),be=N.length-1),Ye[be]=Pe,be}var V=(i.shapes||[]).map(function(Fe){return Fe._input}),q=!1;function z(Fe,Pe){V[Fe].visible=Pe,q=!0}function H(Fe,Pe){if(!(m.groupTitle&&!h)){var be=Fe._fullInput||Fe,Ye=be._isShape,mt=be.index;mt===void 0&&(mt=be._index);var bt=be.visible===!1?!1:Pe;Ye?z(mt,bt):U(mt,bt)}}var G=T.legend,J=T._fullInput,le=J&&J._isShape;if(!le&&v.traceIs(T,"pie-like")){var ye=m.label,de=y.indexOf(ye);if(d==="toggle")de===-1?y.push(ye):y.splice(de,1);else if(d==="toggleothers"){var me=de!==-1,W=[];for(k=0;k<a.calcdata.length;k++){var ie=a.calcdata[k];for(b=0;b<ie.length;b++){var se=ie[b],ee=se.label;G===ie[0].trace.legend&&ye!==ee&&(y.indexOf(ee)===-1&&(me=!0),C(y,ee),W.push(ee))}}if(!me)for(var pe=0;pe<W.length;pe++){var oe=y.indexOf(W[pe]);oe!==-1&&y.splice(oe,1)}}v.call("_guiRelayout",a,"hiddenlabels",y)}else{var Y=M&&M.length,ce=[],ue;if(Y)for(k=0;k<_.length;k++)ue=_[k],ue.visible&&ue.legendgroup===M&&ce.push(k);if(d==="toggle"){var _e;switch(T.visible){case!0:_e="legendonly";break;case!1:_e=!1;break;case"legendonly":_e=!0;break}if(Y)if(h)for(k=0;k<_.length;k++){var Le=_[k];Le.visible!==!1&&Le.legendgroup===M&&H(Le,_e)}else H(T,_e);else H(T,_e)}else if(d==="toggleothers"){var ze,Ge,Ve,rt,pt,gt=!0;for(k=0;k<_.length;k++)if(pt=_[k],ze=pt===T,Ve=pt.showlegend!==!0,!(ze||Ve)&&(Ge=Y&&pt.legendgroup===M,!Ge&&pt.legend===G&&pt.visible===!0&&!v.traceIs(pt,"notLegendIsolatable"))){gt=!1;break}for(k=0;k<_.length;k++)if(pt=_[k],!(pt.visible===!1||pt.legend!==G)&&!v.traceIs(pt,"notLegendIsolatable"))switch(T.visible){case"legendonly":H(pt,!0);break;case!0:rt=gt?!0:"legendonly",ze=pt===T,Ve=pt.showlegend!==!0&&!pt.legendgroup,Ge=ze||Y&&pt.legendgroup===M,H(pt,Ge||Ve?!0:rt);break}}for(k=0;k<D.length;k++)if(A=D[k],!!A){var ht=A.constructUpdate(),lt=Object.keys(ht);for(b=0;b<lt.length;b++)g=lt[b],p=x[g]=x[g]||[],p[B[k]]=ht[g]}for(f=Object.keys(x),k=0;k<f.length;k++)for(g=f[k],b=0;b<N.length;b++)x[g].hasOwnProperty(b)||(x[g][b]=void 0);q?v.call("_guiUpdate",a,x,{shapes:V},N):v.call("_guiRestyle",a,x,N)}}}}),iM=Ne({"src/components/legend/constants.js"(te,Z){Z.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}}}),SL=Ne({"src/components/legend/get_legend_data.js"(te,Z){var v=Xo(),w=aA();Z.exports=function(P,t,r){var a=t._inHover,l=w.isGrouped(t),i=w.isReversed(t),s={},o=[],u=!1,d={},h=0,y=0,m,E;function c(H,G,J){if(t.visible!==!1&&!(r&&H!==t._id))if(G===""||!w.isGrouped(t)){var le="~~i"+h;o.push(le),s[le]=[J],h++}else o.indexOf(G)===-1?(o.push(G),u=!0,s[G]=[J]):s[G].push(J)}for(m=0;m<P.length;m++){var _=P[m],T=_[0],M=T.trace,k=M.legend,b=M.legendgroup;if(!(!a&&(!M.visible||!M.showlegend)))if(v.traceIs(M,"pie-like"))for(d[b]||(d[b]={}),E=0;E<_.length;E++){var A=_[E].label;d[b][A]||(c(k,b,{label:A,color:_[E].color,i:_[E].i,trace:M,pts:_[E].pts}),d[b][A]=!0,y=Math.max(y,(A||"").length))}else c(k,b,T),y=Math.max(y,(M.name||"").length)}if(!o.length)return[];var g=!u||!l,f=[];for(m=0;m<o.length;m++){var p=s[o[m]];g?f.push(p[0]):f.push(p)}for(g&&(f=[f]),m=0;m<f.length;m++){var x=1/0;for(E=0;E<f[m].length;E++){var N=f[m][E].trace.legendrank;x>N&&(x=N)}f[m][0]._groupMinRank=x,f[m][0]._preGroupSort=m}var D=function(H,G){return H[0]._groupMinRank-G[0]._groupMinRank||H[0]._preGroupSort-G[0]._preGroupSort},B=function(H,G){return H.trace.legendrank-G.trace.legendrank||H._preSort-G._preSort};for(f.forEach(function(H,G){H[0]._preGroupSort=G}),f.sort(D),m=0;m<f.length;m++){f[m].forEach(function(H,G){H._preSort=G}),f[m].sort(B);var U=f[m][0].trace,V=null;for(E=0;E<f[m].length;E++){var q=f[m][E].trace.legendgrouptitle;if(q&&q.text){V=q,a&&(q.font=t._groupTitleFont);break}}if(i&&f[m].reverse(),V){var z=!1;for(E=0;E<f[m].length;E++)if(v.traceIs(f[m][E].trace,"pie-like")){z=!0;break}f[m].unshift({i:-1,groupTitle:V,noClick:z,trace:{showlegend:U.showlegend,legendgroup:U.legendgroup,visible:t.groupclick==="toggleitem"?!0:U.visible}})}for(E=0;E<f[m].length;E++)f[m][E]=[f[m][E]]}return t._lgroupsLength=f.length,t._maxNameLength=y,f}}}),Ag=Ne({"src/traces/pie/helpers.js"(te){var Z=In();function v(w){return w.indexOf("e")!==-1?w.replace(/[.]?0+e/,"e"):w.indexOf(".")!==-1?w.replace(/[.]?0+$/,""):w}te.formatPiePercent=function(C,P){var t=v((C*100).toPrecision(3));return Z.numSeparate(t,P)+"%"},te.formatPieValue=function(C,P){var t=v(C.toPrecision(10));return Z.numSeparate(t,P)},te.getFirstFilled=function(C,P){if(Z.isArrayOrTypedArray(C))for(var t=0;t<P.length;t++){var r=C[P[t]];if(r||r===0||r==="")return r}},te.castOption=function(C,P){if(Z.isArrayOrTypedArray(C))return te.getFirstFilled(C,P);if(C)return C},te.getRotationAngle=function(w){return(w==="auto"?0:w)*Math.PI/180}}}),oM=Ne({"src/traces/pie/fill_one.js"(te,Z){var v=zs(),w=io();Z.exports=function(P,t,r,a){var l=r.marker.pattern;l&&l.shape?v.pointStyle(P,r,a,t):w.fill(P,t.color)}}}),Tx=Ne({"src/traces/pie/style_one.js"(te,Z){var v=io(),w=Ag().castOption,C=oM();Z.exports=function(t,r,a,l){var i=a.marker.line,s=w(i.color,r.pts)||v.defaultLine,o=w(i.width,r.pts)||0;t.call(C,r,a,l).style("stroke-width",o).call(v.stroke,s)}}}),sM=Ne({"src/components/legend/style.js"(te,Z){var v=xn(),w=Xo(),C=In(),P=C.strTranslate,t=zs(),r=io(),a=Od().extractOpts,l=vu(),i=Tx(),s=Ag().castOption,o=iM(),u=12,d=5,h=2,y=10,m=5;Z.exports=function(M,k,b){var A=k._fullLayout;b||(b=A.legend);var g=b.itemsizing==="constant",f=b.itemwidth,p=(f+o.itemGap*2)/2,x=P(p,0),N=function(W,ie,se,ee){var pe;if(W+1)pe=W;else if(ie&&ie.width>0)pe=ie.width;else return 0;return g?ee:Math.min(pe,se)};M.each(function(W){var ie=v.select(this),se=C.ensureSingle(ie,"g","layers");se.style("opacity",W[0].trace.opacity);var ee=b.indentation,pe=b.valign,oe=W[0].lineHeight,Y=W[0].height;if(pe==="middle"&&ee===0||!oe||!Y)se.attr("transform",null);else{var ce={top:1,bottom:-1}[pe],ue=ce*(.5*(oe-Y+3))||0,_e=b.indentation;se.attr("transform",P(_e,ue))}var Le=se.selectAll("g.legendfill").data([W]);Le.enter().append("g").classed("legendfill",!0);var ze=se.selectAll("g.legendlines").data([W]);ze.enter().append("g").classed("legendlines",!0);var Ge=se.selectAll("g.legendsymbols").data([W]);Ge.enter().append("g").classed("legendsymbols",!0),Ge.selectAll("g.legendpoints").data([W]).enter().append("g").classed("legendpoints",!0)}).each(me).each(U).each(q).each(V).each(H).each(ye).each(le).each(D).each(B).each(G).each(J);function D(W){var ie=c(W),se=ie.showFill,ee=ie.showLine,pe=ie.showGradientLine,oe=ie.showGradientFill,Y=ie.anyFill,ce=ie.anyLine,ue=W[0],_e=ue.trace,Le,ze,Ge=a(_e),Ve=Ge.colorscale,rt=Ge.reversescale,pt=function(Ye){if(Ye.size())if(se)t.fillGroupStyle(Ye,k,!0);else{var mt="legendfill-"+_e.uid;t.gradient(Ye,k,mt,E(rt),Ve,"fill")}},gt=function(Ye){if(Ye.size()){var mt="legendline-"+_e.uid;t.lineGroupStyle(Ye),t.gradient(Ye,k,mt,E(rt),Ve,"stroke")}},ht=l.hasMarkers(_e)||!Y?"M5,0":ce?"M5,-2":"M5,-3",lt=v.select(this),Fe=lt.select(".legendfill").selectAll("path").data(se||oe?[W]:[]);if(Fe.enter().append("path").classed("js-fill",!0),Fe.exit().remove(),Fe.attr("d",ht+"h"+f+"v6h-"+f+"z").call(pt),ee||pe){var Pe=N(void 0,_e.line,y,d);ze=C.minExtend(_e,{line:{width:Pe}}),Le=[C.minExtend(ue,{trace:ze})]}var be=lt.select(".legendlines").selectAll("path").data(ee||pe?[Le]:[]);be.enter().append("path").classed("js-line",!0),be.exit().remove(),be.attr("d",ht+(pe?"l"+f+",0.0001":"h"+f)).call(ee?t.lineGroupStyle:gt)}function B(W){var ie=c(W),se=ie.anyFill,ee=ie.anyLine,pe=ie.showLine,oe=ie.showMarker,Y=W[0],ce=Y.trace,ue=!oe&&!ee&&!se&&l.hasText(ce),_e,Le;function ze(Fe,Pe,be,Ye){var mt=C.nestedProperty(ce,Fe).get(),bt=C.isArrayOrTypedArray(mt)&&Pe?Pe(mt):mt;if(g&&bt&&Ye!==void 0&&(bt=Ye),be){if(bt<be[0])return be[0];if(bt>be[1])return be[1]}return bt}function Ge(Fe){return Y._distinct&&Y.index&&Fe[Y.index]?Fe[Y.index]:Fe[0]}if(oe||ue||pe){var Ve={},rt={};if(oe){Ve.mc=ze("marker.color",Ge),Ve.mx=ze("marker.symbol",Ge),Ve.mo=ze("marker.opacity",C.mean,[.2,1]),Ve.mlc=ze("marker.line.color",Ge),Ve.mlw=ze("marker.line.width",C.mean,[0,5],h),rt.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var pt=ze("marker.size",C.mean,[2,16],u);Ve.ms=pt,rt.marker.size=pt}pe&&(rt.line={width:ze("line.width",Ge,[0,10],d)}),ue&&(Ve.tx="Aa",Ve.tp=ze("textposition",Ge),Ve.ts=10,Ve.tc=ze("textfont.color",Ge),Ve.tf=ze("textfont.family",Ge),Ve.tw=ze("textfont.weight",Ge),Ve.ty=ze("textfont.style",Ge),Ve.tv=ze("textfont.variant",Ge),Ve.tC=ze("textfont.textcase",Ge),Ve.tE=ze("textfont.lineposition",Ge),Ve.tS=ze("textfont.shadow",Ge)),_e=[C.minExtend(Y,Ve)],Le=C.minExtend(ce,rt),Le.selectedpoints=null,Le.texttemplate=null}var gt=v.select(this).select("g.legendpoints"),ht=gt.selectAll("path.scatterpts").data(oe?_e:[]);ht.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),ht.exit().remove(),ht.call(t.pointStyle,Le,k),oe&&(_e[0].mrc=3);var lt=gt.selectAll("g.pointtext").data(ue?_e:[]);lt.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),lt.exit().remove(),lt.selectAll("text").call(t.textPointStyle,Le,k)}function U(W){var ie=W[0].trace,se=ie.type==="waterfall";if(W[0]._distinct&&se){var ee=W[0].trace[W[0].dir].marker;return W[0].mc=ee.color,W[0].mlw=ee.line.width,W[0].mlc=ee.line.color,z(W,this,"waterfall")}var pe=[];ie.visible&&se&&(pe=W[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 oe=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(pe);oe.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),oe.exit().remove(),oe.each(function(Y){var ce=v.select(this),ue=ie[Y[0]].marker,_e=N(void 0,ue.line,m,h);ce.attr("d",Y[1]).style("stroke-width",_e+"px").call(r.fill,ue.color),_e&&ce.call(r.stroke,ue.line.color)})}function V(W){z(W,this)}function q(W){z(W,this,"funnel")}function z(W,ie,se){var ee=W[0].trace,pe=ee.marker||{},oe=pe.line||{},Y=pe.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",ce=se?ee.visible&&ee.type===se:w.traceIs(ee,"bar"),ue=v.select(ie).select("g.legendpoints").selectAll("path.legend"+se).data(ce?[W]:[]);ue.enter().append("path").classed("legend"+se,!0).attr("d",Y).attr("transform",x),ue.exit().remove(),ue.each(function(_e){var Le=v.select(this),ze=_e[0],Ge=N(ze.mlw,pe.line,m,h);Le.style("stroke-width",Ge+"px");var Ve=ze.mcc;if(!b._inHover&&"mc"in ze){var rt=a(pe),pt=rt.mid;pt===void 0&&(pt=(rt.max+rt.min)/2),Ve=t.tryColorscale(pe,"")(pt)}var gt=Ve||ze.mc||pe.color,ht=pe.pattern,lt=t.getPatternAttr,Fe=ht&&(lt(ht.shape,0,"")||lt(ht.path,0,""));if(Fe){var Pe=lt(ht.bgcolor,0,null),be=lt(ht.fgcolor,0,null),Ye=ht.fgopacity,mt=_(ht.size,8,10),bt=_(ht.solidity,.5,1),ft="legend-"+ee.uid;Le.call(t.pattern,"legend",k,ft,Fe,mt,bt,Ve,ht.fillmode,Pe,be,Ye)}else Le.call(r.fill,gt);Ge&&r.stroke(Le,ze.mlc||oe.color)})}function H(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(ie.visible&&w.traceIs(ie,"box-violin")?[W]:[]);se.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),se.exit().remove(),se.each(function(){var ee=v.select(this);if((ie.boxpoints==="all"||ie.points==="all")&&r.opacity(ie.fillcolor)===0&&r.opacity((ie.line||{}).color)===0){var pe=C.minExtend(ie,{marker:{size:g?u:C.constrain(ie.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});se.call(t.pointStyle,pe,k)}else{var oe=N(void 0,ie.line,m,h);ee.style("stroke-width",oe+"px").call(r.fill,ie.fillcolor),oe&&r.stroke(ee,ie.line.color)}})}function G(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(ie.visible&&ie.type==="candlestick"?[W,W]:[]);se.enter().append("path").classed("legendcandle",!0).attr("d",function(ee,pe){return pe?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ee,pe){var oe=v.select(this),Y=ie[pe?"increasing":"decreasing"],ce=N(void 0,Y.line,m,h);oe.style("stroke-width",ce+"px").call(r.fill,Y.fillcolor),ce&&r.stroke(oe,Y.line.color)})}function J(W){var ie=W[0].trace,se=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(ie.visible&&ie.type==="ohlc"?[W,W]:[]);se.enter().append("path").classed("legendohlc",!0).attr("d",function(ee,pe){return pe?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),se.exit().remove(),se.each(function(ee,pe){var oe=v.select(this),Y=ie[pe?"increasing":"decreasing"],ce=N(void 0,Y.line,m,h);oe.style("fill","none").call(t.dashLine,Y.line.dash,ce),ce&&r.stroke(oe,Y.line.color)})}function le(W){de(W,this,"pie")}function ye(W){de(W,this,"funnelarea")}function de(W,ie,se){var ee=W[0],pe=ee.trace,oe=se?pe.visible&&pe.type===se:w.traceIs(pe,se),Y=v.select(ie).select("g.legendpoints").selectAll("path.legend"+se).data(oe?[W]:[]);if(Y.enter().append("path").classed("legend"+se,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Y.exit().remove(),Y.size()){var ce=pe.marker||{},ue=N(s(ce.line.width,ee.pts),ce.line,m,h),_e="pieLike",Le=C.minExtend(pe,{marker:{line:{width:ue}}},_e),ze=C.minExtend(ee,{trace:Le},_e);i(Y,ze,Le,k)}}function me(W){var ie=W[0].trace,se,ee=[];if(ie.visible)switch(ie.type){case"histogram2d":case"heatmap":ee=[["M-15,-2V4H15V-2Z"]],se=!0;break;case"choropleth":case"choroplethmapbox":case"choroplethmap":ee=[["M-6,-6V6H6V-6Z"]],se=!0;break;case"densitymapbox":case"densitymap":ee=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],se="radial";break;case"cone":ee=[["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"]],se=!1;break;case"streamtube":ee=[["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"]],se=!1;break;case"surface":ee=[["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"]],se=!0;break;case"mesh3d":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],se=!1;break;case"volume":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],se=!0;break;case"isosurface":ee=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],se=!1;break}var pe=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(ee);pe.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),pe.exit().remove(),pe.each(function(oe,Y){var ce=v.select(this),ue=a(ie),_e=ue.colorscale,Le=ue.reversescale,ze=function(pt){if(pt.size()){var gt="legendfill-"+ie.uid;t.gradient(pt,k,gt,E(Le,se==="radial"),_e,"fill")}},Ge;if(_e){if(!se){var rt=_e.length;Ge=Y===0?_e[Le?rt-1:0][1]:Y===1?_e[Le?0:rt-1][1]:_e[Math.floor((rt-1)/2)][1]}}else{var Ve=ie.vertexcolor||ie.facecolor||ie.color;Ge=C.isArrayOrTypedArray(Ve)?Ve[Y]||Ve[0]:Ve}ce.attr("d",oe[0]),Ge?ce.call(r.fill,Ge):ce.call(ze)})}};function E(T,M){var k=M?"radial":"horizontal";return k+(T?"":"reversed")}function c(T){var M=T[0].trace,k=M.contours,b=l.hasLines(M),A=l.hasMarkers(M),g=M.visible&&M.fill&&M.fill!=="none",f=!1,p=!1;if(k){var x=k.coloring;x==="lines"?f=!0:b=x==="none"||x==="heatmap"||k.showlines,k.type==="constraint"?g=k._operation!=="=":(x==="fill"||x==="heatmap")&&(p=!0)}return{showMarker:A,showLine:b,showFill:g,showGradientLine:f,showGradientFill:p,anyLine:b||f,anyFill:g||p}}function _(T,M,k){return T&&C.isArrayOrTypedArray(T)?M:T>k?k:T}}}),lM=Ne({"src/components/legend/draw.js"(te,Z){var v=xn(),w=In(),C=uf(),P=Xo(),t=bx(),r=Bv(),a=zs(),l=io(),i=uc(),s=iA(),o=iM(),u=bd(),d=u.LINE_SPACING,h=u.FROM_TL,y=u.FROM_BR,m=SL(),E=sM(),c=aA(),_=1,T=/^legend[0-9]*$/;Z.exports=function(G,J){if(J)k(G,J);else{var le=G._fullLayout,ye=le._legends,de=le._infolayer.selectAll('[class^="legend"]');de.each(function(){var se=v.select(this),ee=se.attr("class"),pe=ee.split(" ")[0];pe.match(T)&&ye.indexOf(pe)===-1&&se.remove()});for(var me=0;me<ye.length;me++){var W=ye[me],ie=G._fullLayout[W];k(G,ie)}}};function M(H,G,J){if(!(G.title.side!=="top center"&&G.title.side!=="top right")){var le=G.title.font,ye=le.size*d,de=0,me=H.node(),W=a.bBox(me).width;G.title.side==="top center"?de=.5*(G._width-2*J-2*o.titlePad-W):G.title.side==="top right"&&(de=G._width-2*J-2*o.titlePad-W),i.positionText(H,J+o.titlePad+de,J+ye)}}function k(H,G){var J=G||{},le=H._fullLayout,ye=z(J),de,me,W=J._inHover;if(W?(me=J.layer,de="hover"):(me=le._infolayer,de=ye),!!me){de+=le._uid,H._legendMouseDownTime||(H._legendMouseDownTime=0);var ie;if(W){if(!J.entries)return;ie=m(J.entries,J)}else{for(var se=(H.calcdata||[]).slice(),ee=le.shapes,pe=0;pe<ee.length;pe++){var oe=ee[pe];if(oe.showlegend){var Y={_isShape:!0,_fullInput:oe,index:oe._index,name:oe.name||oe.label.text||"shape "+oe._index,legend:oe.legend,legendgroup:oe.legendgroup,legendgrouptitle:oe.legendgrouptitle,legendrank:oe.legendrank,legendwidth:oe.legendwidth,showlegend:oe.showlegend,visible:oe.visible,opacity:oe.opacity,mode:oe.type==="line"?"lines":"markers",line:oe.line,marker:{line:oe.line,color:oe.fillcolor,size:12,symbol:oe.type==="rect"?"square":oe.type==="circle"?"circle":"hexagon2"}};se.push([{trace:Y}])}}ie=le.showlegend&&m(se,J,le._legends.length>1)}var ce=le.hiddenlabels||[];if(!W&&(!le.showlegend||!ie.length))return me.selectAll("."+ye).remove(),le._topdefs.select("#"+de).remove(),C.autoMargin(H,ye);var ue=w.ensureSingle(me,"g",ye,function(ht){W||ht.attr("pointer-events","all")}),_e=w.ensureSingleById(le._topdefs,"clipPath",de,function(ht){ht.append("rect")}),Le=w.ensureSingle(ue,"rect","bg",function(ht){ht.attr("shape-rendering","crispEdges")});Le.call(l.stroke,J.bordercolor).call(l.fill,J.bgcolor).style("stroke-width",J.borderwidth+"px");var ze=w.ensureSingle(ue,"g","scrollbox"),Ge=J.title;J._titleWidth=0,J._titleHeight=0;var Ve;Ge.text?(Ve=w.ensureSingle(ze,"text",ye+"titletext"),Ve.attr("text-anchor","start").call(a.font,Ge.font).text(Ge.text),x(Ve,ze,H,J,_)):ze.selectAll("."+ye+"titletext").remove();var rt=w.ensureSingle(ue,"rect","scrollbar",function(ht){ht.attr(o.scrollBarEnterAttrs).call(l.fill,o.scrollBarColor)}),pt=ze.selectAll("g.groups").data(ie);pt.enter().append("g").attr("class","groups"),pt.exit().remove();var gt=pt.selectAll("g.traces").data(w.identity);gt.enter().append("g").attr("class","traces"),gt.exit().remove(),gt.style("opacity",function(ht){var lt=ht[0].trace;return P.traceIs(lt,"pie-like")?ce.indexOf(ht[0].label)!==-1?.5:1:lt.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(g,H,J)}).call(E,H,J).each(function(){W||v.select(this).call(p,H,ye)}),w.syncOrAsync([C.previousPromises,function(){return B(H,pt,gt,J)},function(){var ht=le._size,lt=J.borderwidth,Fe=J.xref==="paper",Pe=J.yref==="paper";if(Ge.text&&M(Ve,J,lt),!W){var be,Ye;Fe?be=ht.l+ht.w*J.x-h[V(J)]*J._width:be=le.width*J.x-h[V(J)]*J._width,Pe?Ye=ht.t+ht.h*(1-J.y)-h[q(J)]*J._effHeight:Ye=le.height*(1-J.y)-h[q(J)]*J._effHeight;var mt=U(H,ye,be,Ye);if(mt)return;if(le.margin.autoexpand){var bt=be,ft=Ye;be=Fe?w.constrain(be,0,le.width-J._width):bt,Ye=Pe?w.constrain(Ye,0,le.height-J._effHeight):ft,be!==bt&&w.log("Constrain "+ye+".x to make legend fit inside graph"),Ye!==ft&&w.log("Constrain "+ye+".y to make legend fit inside graph")}a.setTranslate(ue,be,Ye)}if(rt.on(".drag",null),ue.on("wheel",null),W||J._height<=J._maxHeight||H._context.staticPlot){var Wt=J._effHeight;W&&(Wt=J._height),Le.attr({width:J._width-lt,height:Wt-lt,x:lt/2,y:lt/2}),a.setTranslate(ze,0,0),_e.select("rect").attr({width:J._width-2*lt,height:Wt-2*lt,x:lt,y:lt}),a.setClipUrl(ze,de,H),a.setRect(rt,0,0,0,0),delete J._scrollY}else{var Zt=Math.max(o.scrollBarMinHeight,J._effHeight*J._effHeight/J._height),cr=J._effHeight-Zt-2*o.scrollBarMargin,pr=J._height-J._effHeight,Br=cr/pr,Fr=Math.min(J._scrollY||0,pr);Le.attr({width:J._width-2*lt+o.scrollBarWidth+o.scrollBarMargin,height:J._effHeight-lt,x:lt/2,y:lt/2}),_e.select("rect").attr({width:J._width-2*lt+o.scrollBarWidth+o.scrollBarMargin,height:J._effHeight-2*lt,x:lt,y:lt+Fr}),a.setClipUrl(ze,de,H),Ee(Fr,Zt,Br),ue.on("wheel",function(){Fr=w.constrain(J._scrollY+v.event.deltaY/pr*cr,0,pr),Ee(Fr,Zt,Br),Fr!==0&&Fr!==pr&&v.event.preventDefault()});var cn,Nr,Jr,Dt=function(Ft,Nt,Xt){var lr=(Xt-Nt)/Br+Ft;return w.constrain(lr,0,pr)},$e=function(Ft,Nt,Xt){var lr=(Nt-Xt)/Br+Ft;return w.constrain(lr,0,pr)},ot=v.behavior.drag().on("dragstart",function(){var Ft=v.event.sourceEvent;Ft.type==="touchstart"?cn=Ft.changedTouches[0].clientY:cn=Ft.clientY,Jr=Fr}).on("drag",function(){var Ft=v.event.sourceEvent;Ft.buttons===2||Ft.ctrlKey||(Ft.type==="touchmove"?Nr=Ft.changedTouches[0].clientY:Nr=Ft.clientY,Fr=Dt(Jr,cn,Nr),Ee(Fr,Zt,Br))});rt.call(ot);var De=v.behavior.drag().on("dragstart",function(){var Ft=v.event.sourceEvent;Ft.type==="touchstart"&&(cn=Ft.changedTouches[0].clientY,Jr=Fr)}).on("drag",function(){var Ft=v.event.sourceEvent;Ft.type==="touchmove"&&(Nr=Ft.changedTouches[0].clientY,Fr=$e(Jr,cn,Nr),Ee(Fr,Zt,Br))});ze.call(De)}function Ee(Ft,Nt,Xt){J._scrollY=H._fullLayout[ye]._scrollY=Ft,a.setTranslate(ze,0,-Ft),a.setRect(rt,J._width,o.scrollBarMargin+Ft*Xt,o.scrollBarWidth,Nt),_e.select("rect").attr("y",lt+Ft)}if(H._context.edits.legendPosition){var Ae,Ie,tt,st;ue.classed("cursor-move",!0),r.init({element:ue.node(),gd:H,prepFn:function(Ft){if(Ft.target!==rt.node()){var Nt=a.getTranslate(ue);tt=Nt.x,st=Nt.y}},moveFn:function(Ft,Nt){if(tt!==void 0&&st!==void 0){var Xt=tt+Ft,lr=st+Nt;a.setTranslate(ue,Xt,lr),Ae=r.align(Xt,J._width,ht.l,ht.l+ht.w,J.xanchor),Ie=r.align(lr+J._height,-J._height,ht.t+ht.h,ht.t,J.yanchor)}},doneFn:function(){if(Ae!==void 0&&Ie!==void 0){var Ft={};Ft[ye+".x"]=Ae,Ft[ye+".y"]=Ie,P.call("_guiRelayout",H,Ft)}},clickFn:function(Ft,Nt){var Xt=me.selectAll("g.traces").filter(function(){var lr=this.getBoundingClientRect();return Nt.clientX>=lr.left&&Nt.clientX<=lr.right&&Nt.clientY>=lr.top&&Nt.clientY<=lr.bottom});Xt.size()>0&&A(H,ue,Xt,Ft,Nt)}})}}],H)}}function b(H,G,J){var le=H[0],ye=le.width,de=G.entrywidthmode,me=le.trace.legendwidth||G.entrywidth;return de==="fraction"?G._maxWidth*me:J+(me||ye)}function A(H,G,J,le,ye){var de=J.data()[0][0].trace,me={event:ye,node:J.node(),curveNumber:de.index,expandedIndex:de.index,data:H.data,layout:H.layout,frames:H._transitionData._frames,config:H._context,fullData:H._fullData,fullLayout:H._fullLayout};de._group&&(me.group=de._group),P.traceIs(de,"pie-like")&&(me.label=J.datum()[0].label);var W=t.triggerHandler(H,"plotly_legendclick",me);if(le===1){if(W===!1)return;G._clickTimeout=setTimeout(function(){H._fullLayout&&s(J,H,le)},H._context.doubleClickDelay)}else if(le===2){G._clickTimeout&&clearTimeout(G._clickTimeout),H._legendMouseDownTime=0;var ie=t.triggerHandler(H,"plotly_legenddoubleclick",me);ie!==!1&&W!==!1&&s(J,H,le)}}function g(H,G,J){var le=z(J),ye=H.data()[0][0],de=ye.trace,me=P.traceIs(de,"pie-like"),W=!J._inHover&&G._context.edits.legendText&&!me,ie=J._maxNameLength,se,ee;ye.groupTitle?(se=ye.groupTitle.text,ee=ye.groupTitle.font):(ee=J.font,J.entries?se=ye.text:(se=me?ye.label:de.name,de._meta&&(se=w.templateString(se,de._meta))));var pe=w.ensureSingle(H,"text",le+"text");pe.attr("text-anchor","start").call(a.font,ee).text(W?f(se,ie):se);var oe=J.indentation+J.itemwidth+o.itemGap*2;i.positionText(pe,oe,0),W?pe.call(i.makeEditable,{gd:G,text:se}).call(x,H,G,J).on("edit",function(Y){this.text(f(Y,ie)).call(x,H,G,J);var ce=ye.trace._fullInput||{},ue={};return ue.name=Y,ce._isShape?P.call("_guiRelayout",G,"shapes["+de.index+"].name",ue.name):P.call("_guiRestyle",G,ue,de.index)}):x(pe,H,G,J)}function f(H,G){var J=Math.max(4,G);if(H&&H.trim().length>=J/2)return H;H=H||"";for(var le=J-H.length;le>0;le--)H+=" ";return H}function p(H,G,J){var le=G._context.doubleClickDelay,ye,de=1,me=w.ensureSingle(H,"rect",J+"toggle",function(W){G._context.staticPlot||W.style("cursor","pointer").attr("pointer-events","all"),W.call(l.fill,"rgba(0,0,0,0)")});G._context.staticPlot||(me.on("mousedown",function(){ye=new Date().getTime(),ye-G._legendMouseDownTime<le?de+=1:(de=1,G._legendMouseDownTime=ye)}),me.on("mouseup",function(){if(!(G._dragged||G._editing)){var W=G._fullLayout[J];new Date().getTime()-G._legendMouseDownTime>le&&(de=Math.max(de-1,1)),A(G,W,H,de,v.event)}}))}function x(H,G,J,le,ye){le._inHover&&H.attr("data-notex",!0),i.convertToTspans(H,J,function(){N(G,J,le,ye)})}function N(H,G,J,le){var ye=H.data()[0][0];if(!J._inHover&&ye&&!ye.trace.showlegend){H.remove();return}var de=H.select("g[class*=math-group]"),me=de.node(),W=z(J);J||(J=G._fullLayout[W]);var ie=J.borderwidth,se;le===_?se=J.title.font:ye.groupTitle?se=ye.groupTitle.font:se=J.font;var ee=se.size*d,pe,oe;if(me){var Y=a.bBox(me);pe=Y.height,oe=Y.width,le===_?a.setTranslate(de,ie,ie+pe*.75):a.setTranslate(de,0,pe*.25)}else{var ce="."+W+(le===_?"title":"")+"text",ue=H.select(ce),_e=i.lineCount(ue),Le=ue.node();if(pe=ee*_e,oe=Le?a.bBox(Le).width:0,le===_)J.title.side==="left"&&(oe+=o.itemGap*2),i.positionText(ue,ie+o.titlePad,ie+ee);else{var ze=o.itemGap*2+J.indentation+J.itemwidth;ye.groupTitle&&(ze=o.itemGap,oe-=J.indentation+J.itemwidth),i.positionText(ue,ze,-ee*((_e-1)/2-.3))}}le===_?(J._titleWidth=oe,J._titleHeight=pe):(ye.lineHeight=ee,ye.height=Math.max(pe,16)+3,ye.width=oe)}function D(H){var G=0,J=0,le=H.title.side;return le&&(le.indexOf("left")!==-1&&(G=H._titleWidth),le.indexOf("top")!==-1&&(J=H._titleHeight)),[G,J]}function B(H,G,J,le){var ye=H._fullLayout,de=z(le);le||(le=ye[de]);var me=ye._size,W=c.isVertical(le),ie=c.isGrouped(le),se=le.entrywidthmode==="fraction",ee=le.borderwidth,pe=2*ee,oe=o.itemGap,Y=le.indentation+le.itemwidth+oe*2,ce=2*(ee+oe),ue=q(le),_e=le.y<0||le.y===0&&ue==="top",Le=le.y>1||le.y===1&&ue==="bottom",ze=le.tracegroupgap,Ge={};const{orientation:Ve,yref:rt}=le;let{maxheight:pt}=le;const gt=_e||Le||Ve!=="v"||rt!=="paper";pt||(pt=gt?.5:1);const ht=gt?ye.height:me.h;le._maxHeight=Math.max(pt>1?pt:pt*ht,30);var lt=0;le._width=0,le._height=0;var Fe=D(le);if(W)J.each(function(Ee){var Ae=Ee[0].height;a.setTranslate(this,ee+Fe[0],ee+Fe[1]+le._height+Ae/2+oe),le._height+=Ae,le._width=Math.max(le._width,Ee[0].width)}),lt=Y+le._width,le._width+=oe+Y+pe,le._height+=ce,ie&&(G.each(function(Ee,Ae){a.setTranslate(this,0,Ae*le.tracegroupgap)}),le._height+=(le._lgroupsLength-1)*le.tracegroupgap);else{var Pe=V(le),be=le.x<0||le.x===0&&Pe==="right",Ye=le.x>1||le.x===1&&Pe==="left",mt=Le||_e,bt=ye.width/2;le._maxWidth=Math.max(be?mt&&Pe==="left"?me.l+me.w:bt:Ye?mt&&Pe==="right"?me.r+me.w:bt:me.w,2*Y);var ft=0,Wt=0;J.each(function(Ee){var Ae=b(Ee,le,Y);ft=Math.max(ft,Ae),Wt+=Ae}),lt=null;var Zt=0;if(ie){var cr=0,pr=0,Br=0;G.each(function(){var Ee=0,Ae=0;v.select(this).selectAll("g.traces").each(function(tt){var st=b(tt,le,Y),Ft=tt[0].height;a.setTranslate(this,Fe[0],Fe[1]+ee+oe+Ft/2+Ae),Ae+=Ft,Ee=Math.max(Ee,st),Ge[tt[0].trace.legendgroup]=Ee});var Ie=Ee+oe;pr>0&&Ie+ee+pr>le._maxWidth?(Zt=Math.max(Zt,pr),pr=0,Br+=cr+ze,cr=Ae):cr=Math.max(cr,Ae),a.setTranslate(this,pr,Br),pr+=Ie}),le._width=Math.max(Zt,pr)+ee,le._height=Br+cr+ce}else{var Fr=J.size(),cn=Wt+pe+(Fr-1)*oe<le._maxWidth,Nr=0,Jr=0,Dt=0,$e=0;J.each(function(Ee){var Ae=Ee[0].height,Ie=b(Ee,le,Y),tt=cn?Ie:ft;se||(tt+=oe),tt+ee+Jr-oe>=le._maxWidth&&(Zt=Math.max(Zt,$e),Jr=0,Dt+=Nr,le._height+=Nr,Nr=0),a.setTranslate(this,Fe[0]+ee+Jr,Fe[1]+ee+Dt+Ae/2+oe),$e=Jr+Ie+oe,Jr+=tt,Nr=Math.max(Nr,Ae)}),cn?(le._width=Jr+pe,le._height=Nr+ce):(le._width=Math.max(Zt,$e)+pe,le._height+=Nr+ce)}}le._width=Math.ceil(Math.max(le._width+Fe[0],le._titleWidth+2*(ee+o.titlePad))),le._height=Math.ceil(Math.max(le._height+Fe[1],le._titleHeight+2*(ee+o.itemGap))),le._effHeight=Math.min(le._height,le._maxHeight);var ot=H._context.edits,De=ot.legendText||ot.legendPosition;J.each(function(Ee){var Ae=v.select(this).select("."+de+"toggle"),Ie=Ee[0].height,tt=Ee[0].trace.legendgroup,st=b(Ee,le,Y);ie&&tt!==""&&(st=Ge[tt]);var Ft=De?Y:lt||st;!W&&!se&&(Ft+=oe/2),a.setRect(Ae,0,-Ie/2,Ft,Ie)})}function U(H,G,J,le){var ye=H._fullLayout,de=ye[G],me=V(de),W=q(de),ie=de.xref==="paper",se=de.yref==="paper";H._fullLayout._reservedMargin[G]={};var ee=de.y<.5?"b":"t",pe=de.x<.5?"l":"r",oe={r:ye.width-J,l:J+de._width,b:ye.height-le,t:le+de._effHeight};if(ie&&se)return C.autoMargin(H,G,{x:de.x,y:de.y,l:de._width*h[me],r:de._width*y[me],b:de._effHeight*y[W],t:de._effHeight*h[W]});ie?H._fullLayout._reservedMargin[G][ee]=oe[ee]:se||de.orientation==="v"?H._fullLayout._reservedMargin[G][pe]=oe[pe]:H._fullLayout._reservedMargin[G][ee]=oe[ee]}function V(H){return w.isRightAnchor(H)?"right":w.isCenterAnchor(H)?"center":"left"}function q(H){return w.isBottomAnchor(H)?"bottom":w.isMiddleAnchor(H)?"middle":"top"}function z(H){return H._id||"legend"}}}),uM=Ne({"src/components/fx/hover.js"(te){var Z=xn(),v=la(),w=Ro(),C=In(),P=C.pushUnique,t=C.strTranslate,r=C.strRotate,a=bx(),l=uc(),i=AL(),s=zs(),o=io(),u=Bv(),d=Os(),h=xh().zindexSeparator,y=Xo(),m=_v(),E=$u(),c=aM(),_=lM(),T=E.YANGLE,M=Math.PI*T/180,k=1/Math.sin(M),b=Math.cos(M),A=Math.sin(M),g=E.HOVERARROWSIZE,f=E.HOVERTEXTPAD,p={box:!0,ohlc:!0,violin:!0,candlestick:!0},x={scatter:!0,scattergl:!0,splom:!0};function N(Y,ce){return Y.distance-ce.distance}te.hover=function(ce,ue,_e,Le){ce=C.getGraphDiv(ce);var ze=ue.target;C.throttle(ce._fullLayout._uid+E.HOVERID,E.HOVERMINTIME,function(){D(ce,ue,_e,Le,ze)})},te.loneHover=function(ce,ue){var _e=!0;Array.isArray(ce)||(_e=!1,ce=[ce]);var Le=ue.gd,ze=ee(Le),Ge=pe(Le),Ve=ce.map(function(Ye){var mt=Ye._x0||Ye.x0||Ye.x||0,bt=Ye._x1||Ye.x1||Ye.x||0,ft=Ye._y0||Ye.y0||Ye.y||0,Wt=Ye._y1||Ye.y1||Ye.y||0,Zt=Ye.eventData;if(Zt){var cr=Math.min(mt,bt),pr=Math.max(mt,bt),Br=Math.min(ft,Wt),Fr=Math.max(ft,Wt),cn=Ye.trace;if(y.traceIs(cn,"gl3d")){var Nr=Le._fullLayout[cn.scene]._scene.container,Jr=Nr.offsetLeft,Dt=Nr.offsetTop;cr+=Jr,pr+=Jr,Br+=Dt,Fr+=Dt}Zt.bbox={x0:cr+Ge,x1:pr+Ge,y0:Br+ze,y1:Fr+ze},ue.inOut_bbox&&ue.inOut_bbox.push(Zt.bbox)}else Zt=!1;return{color:Ye.color||o.defaultLine,x0:Ye.x0||Ye.x||0,x1:Ye.x1||Ye.x||0,y0:Ye.y0||Ye.y||0,y1:Ye.y1||Ye.y||0,xLabel:Ye.xLabel,yLabel:Ye.yLabel,zLabel:Ye.zLabel,text:Ye.text,name:Ye.name,idealAlign:Ye.idealAlign,borderColor:Ye.borderColor,fontFamily:Ye.fontFamily,fontSize:Ye.fontSize,fontColor:Ye.fontColor,fontWeight:Ye.fontWeight,fontStyle:Ye.fontStyle,fontVariant:Ye.fontVariant,nameLength:Ye.nameLength,textAlign:Ye.textAlign,trace:Ye.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:Ye.hovertemplate||!1,hovertemplateLabels:Ye.hovertemplateLabels||!1,eventData:Zt}}),rt=!1,pt=V(Ve,{gd:Le,hovermode:"closest",rotateLabels:rt,bgColor:ue.bgColor||o.background,container:Z.select(ue.container),outerContainer:ue.outerContainer||ue.container}),gt=pt.hoverLabels,ht=5,lt=0,Fe=0;gt.sort(function(Ye,mt){return Ye.y0-mt.y0}).each(function(Ye,mt){var bt=Ye.y0-Ye.by/2;bt-ht<lt?Ye.offset=lt-bt+ht:Ye.offset=0,lt=bt+Ye.by+Ye.offset,mt===ue.anchorIndex&&(Fe=Ye.offset)}).each(function(Ye){Ye.offset-=Fe});var Pe=Le._fullLayout._invScaleX,be=Le._fullLayout._invScaleY;return J(gt,rt,Pe,be),_e?gt:gt.node()};function D(Y,ce,ue,_e,Le){ue||(ue="xy"),typeof ue=="string"&&(ue=ue.split(h)[0]);var ze=Array.isArray(ue)?ue:[ue],Ge,Ve=Y._fullLayout,rt=Ve.hoversubplots,pt=Ve._plots||[],gt=pt[ue],ht=Ve._has("cartesian"),lt=ce.hovermode||Ve.hovermode,Fe=(lt||"").charAt(0)==="x",Pe=(lt||"").charAt(0)==="y",be,Ye;if(ht&&(Fe||Pe)&&rt==="axis"){for(var mt=ze.length,bt=0;bt<mt;bt++)if(Ge=ze[bt],pt[Ge]){be=d.getFromId(Y,Ge,"x"),Ye=d.getFromId(Y,Ge,"y");var ft=(Fe?be:Ye)._subplotsWith;if(ft&&ft.length)for(var Wt=0;Wt<ft.length;Wt++)P(ze,ft[Wt])}}if(gt&&rt!=="single"){var Zt=gt.overlays.map(function(Ri){return Ri.id});ze=ze.concat(Zt)}for(var cr=ze.length,pr=new Array(cr),Br=new Array(cr),Fr=!1,cn=0;cn<cr;cn++)if(Ge=ze[cn],pt[Ge])Fr=!0,pr[cn]=pt[Ge].xaxis,Br[cn]=pt[Ge].yaxis;else if(Ve[Ge]&&Ve[Ge]._subplot){var Nr=Ve[Ge]._subplot;pr[cn]=Nr.xaxis,Br[cn]=Nr.yaxis}else{C.warn("Unrecognized subplot: "+Ge);return}if(lt&&!Fr&&(lt="closest"),["x","y","closest","x unified","y unified"].indexOf(lt)===-1||!Y.calcdata||Y.querySelector(".zoombox")||Y._dragging)return u.unhoverRaw(Y,ce);var Jr=Ve.hoverdistance;Jr===-1&&(Jr=1/0);var Dt=Ve.spikedistance;Dt===-1&&(Dt=1/0);var $e=[],ot=[],De,Ee,Ae,Ie,tt,st,Ft,Nt,Xt,lr,Rr,Mr,Sr,Kr={hLinePoint:null,vLinePoint:null},qn=!1;if(Array.isArray(ce))for(lt="array",Ae=0;Ae<ce.length;Ae++)tt=Y.calcdata[ce[Ae].curveNumber||0],tt&&(st=tt[0].trace,tt[0].trace.hoverinfo!=="skip"&&(ot.push(tt),st.orientation==="h"&&(qn=!0)));else{var ha=Y.calcdata.slice();for(ha.sort(function(Ri,ps){var as=Ri[0].trace.zorder||0,el=ps[0].trace.zorder||0;return as-el}),Ie=0;Ie<ha.length;Ie++)tt=ha[Ie],st=tt[0].trace,st.hoverinfo!=="skip"&&m.isTraceInSubplots(st,ze)&&(ot.push(tt),st.orientation==="h"&&(qn=!0));var ia=!Le,xa,ba;if(ia)"xpx"in ce?xa=ce.xpx:xa=pr[0]._length/2,"ypx"in ce?ba=ce.ypx:ba=Br[0]._length/2;else{if(a.triggerHandler(Y,"plotly_beforehover",ce)===!1)return;var ea=Le.getBoundingClientRect();xa=ce.clientX-ea.left,ba=ce.clientY-ea.top,Ve._calcInverseTransform(Y);var Za=C.apply3DTransform(Ve._invTransform)(xa,ba);if(xa=Za[0],ba=Za[1],xa<0||xa>pr[0]._length||ba<0||ba>Br[0]._length)return u.unhoverRaw(Y,ce)}if(ce.pointerX=xa+pr[0]._offset,ce.pointerY=ba+Br[0]._offset,"xval"in ce?De=m.flat(ze,ce.xval):De=m.p2c(pr,xa),"yval"in ce?Ee=m.flat(ze,ce.yval):Ee=m.p2c(Br,ba),!v(De[0])||!v(Ee[0]))return C.warn("Fx.hover failed",ce,Y),u.unhoverRaw(Y,ce)}var ui=1/0;function _r(Ri,ps){for(Ie=0;Ie<ot.length;Ie++)if(tt=ot[Ie],!(!tt||!tt[0]||!tt[0].trace)&&(st=tt[0].trace,!(st.visible!==!0||st._length===0)&&["carpet","contourcarpet"].indexOf(st._module.name)===-1)){if(Xt=lt,m.isUnifiedHover(Xt)&&(Xt=Xt.charAt(0)),st.type==="splom"?(Nt=0,Ft=ze[Nt]):(Ft=m.getSubplot(st),Nt=ze.indexOf(Ft)),Mr={cd:tt,trace:st,xa:pr[Nt],ya:Br[Nt],maxHoverDistance:Jr,maxSpikeDistance:Dt,index:!1,distance:Math.min(ui,Jr),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:o.defaultLine,name:st.name,x0:void 0,x1:void 0,y0:void 0,y1:void 0,xLabelVal:void 0,yLabelVal:void 0,zLabelVal:void 0,text:void 0},Ve[Ft]&&(Mr.subplot=Ve[Ft]._subplot),Ve._splomScenes&&Ve._splomScenes[st.uid]&&(Mr.scene=Ve._splomScenes[st.uid]),Xt==="array"){var as=ce[Ie];"pointNumber"in as?(Mr.index=as.pointNumber,Xt="closest"):(Xt="","xval"in as&&(lr=as.xval,Xt="x"),"yval"in as&&(Rr=as.yval,Xt=Xt?"closest":"y"))}else Ri!==void 0&&ps!==void 0?(lr=Ri,Rr=ps):(lr=De[Nt],Rr=Ee[Nt]);if(Sr=$e.length,Jr!==0)if(st._module&&st._module.hoverPoints){var el=st._module.hoverPoints(Mr,lr,Rr,Xt,{finiteRange:!0,hoverLayer:Ve._hoverlayer,hoversubplots:rt,gd:Y});if(el)for(var As,hs=0;hs<el.length;hs++)As=el[hs],v(As.x0)&&v(As.y0)&&$e.push(le(As,lt))}else C.log("Unrecognized trace type in hover:",st);if(lt==="closest"&&$e.length>Sr&&($e.splice(0,Sr),ui=$e[0].distance),ht&&Dt!==0&&$e.length===0){Mr.distance=Dt,Mr.index=!1;var es=st._module.hoverPoints(Mr,lr,Rr,"closest",{hoverLayer:Ve._hoverlayer});if(es&&(es=es.filter(function(Lo){return Lo.spikeDistance<=Dt})),es&&es.length){var tl,Ks=es.filter(function(Lo){return Lo.xa.showspikes&&Lo.xa.spikesnap!=="hovered data"});if(Ks.length){var pl=Ks[0];v(pl.x0)&&v(pl.y0)&&(tl=yr(pl),(!Kr.vLinePoint||Kr.vLinePoint.spikeDistance>tl.spikeDistance)&&(Kr.vLinePoint=tl))}var Ss=es.filter(function(Lo){return Lo.ya.showspikes&&Lo.ya.spikesnap!=="hovered data"});if(Ss.length){var ls=Ss[0];v(ls.x0)&&v(ls.y0)&&(tl=yr(ls),(!Kr.hLinePoint||Kr.hLinePoint.spikeDistance>tl.spikeDistance)&&(Kr.hLinePoint=tl))}}}}}_r();function Qt(Ri,ps,as){for(var el=null,As=1/0,hs,es=0;es<Ri.length;es++)be&&be._id!==Ri[es].xa._id||Ye&&Ye._id!==Ri[es].ya._id||(hs=Ri[es].spikeDistance,as&&es===0&&(hs=-1/0),hs<=As&&hs<=ps&&(el=Ri[es],As=hs));return el}function yr(Ri){return Ri?{xa:Ri.xa,ya:Ri.ya,x:Ri.xSpike!==void 0?Ri.xSpike:(Ri.x0+Ri.x1)/2,y:Ri.ySpike!==void 0?Ri.ySpike:(Ri.y0+Ri.y1)/2,distance:Ri.distance,spikeDistance:Ri.spikeDistance,curveNumber:Ri.trace.index,color:Ri.color,pointNumber:Ri.index}:null}var br={fullLayout:Ve,container:Ve._hoverlayer,event:ce};Y._spikepoints;var nn={vLinePoint:Kr.vLinePoint,hLinePoint:Kr.hLinePoint};Y._spikepoints=nn;var wn=function(){var Ri=$e.filter(function(as){return be&&be._id===as.xa._id&&Ye&&Ye._id===as.ya._id}),ps=$e.filter(function(as){return!(be&&be._id===as.xa._id&&Ye&&Ye._id===as.ya._id)});Ri.sort(N),ps.sort(N),$e=Ri.concat(ps),$e=ie($e,lt)};wn();var Ln=lt.charAt(0),Fn=(Ln==="x"||Ln==="y")&&$e[0]&&x[$e[0].trace.type];if(ht&&Dt!==0&&$e.length!==0){var va=$e.filter(function(Ri){return Ri.ya.showspikes}),Da=Qt(va,Dt,Fn);Kr.hLinePoint=yr(Da);var Pa=$e.filter(function(Ri){return Ri.xa.showspikes}),Fa=Qt(Pa,Dt,Fn);Kr.vLinePoint=yr(Fa)}if($e.length===0){var $a=u.unhoverRaw(Y,ce);return ht&&(Kr.hLinePoint!==null||Kr.vLinePoint!==null)&&me()&&ye(Y,Kr,br),$a}if(ht&&me()&&ye(Y,Kr,br),m.isXYhover(Xt)&&$e[0].length!==0&&$e[0].trace.type!=="splom"){var oa=$e[0];p[oa.trace.type]?$e=$e.filter(Ri=>Ri.trace.index===oa.trace.index):$e=[oa];var zi=$e.length,Gi=se("x",oa,Ve),qt=se("y",oa,Ve);_r(Gi,qt);var Ct=[],Ur={},Qr=0,tn=function(Ri){var ps=p[Ri.trace.type]?B(Ri):Ri.trace.index;if(!Ur[ps])Qr++,Ur[ps]=Qr,Ct.push(Ri);else{var as=Ur[ps]-1,el=Ct[as];as>0&&Math.abs(Ri.distance)<Math.abs(el.distance)&&(Ct[as]=Ri)}},Xr;for(Xr=0;Xr<zi;Xr++)tn($e[Xr]);for(Xr=$e.length-1;Xr>zi-1;Xr--)tn($e[Xr]);$e=Ct,wn()}var en=Y._hoverdata,Tn=[],hn=ee(Y),Rt=pe(Y);for(const Ri of $e){var xr=m.makeEventData(Ri,Ri.trace,Ri.cd);if(Ri.hovertemplate!==!1){var Wr=!1;Ri.cd[Ri.index]&&Ri.cd[Ri.index].ht&&(Wr=Ri.cd[Ri.index].ht),Ri.hovertemplate=Wr||Ri.trace.hovertemplate||!1}if(Ri.xa&&Ri.ya){var An=Ri.x0+Ri.xa._offset,Xn=Ri.x1+Ri.xa._offset,na=Ri.y0+Ri.ya._offset,ra=Ri.y1+Ri.ya._offset,Sn=Math.min(An,Xn),Wn=Math.max(An,Xn),Fi=Math.min(na,ra),Ya=Math.max(na,ra);xr.bbox={x0:Sn+Rt,x1:Wn+Rt,y0:Fi+hn,y1:Ya+hn}}Ri.eventData=[xr],Tn.push(xr)}Y._hoverdata=Tn;var Wi=lt==="y"&&(ot.length>1||$e.length>1)||lt==="closest"&&qn&&$e.length>1,uo=o.combine(Ve.plot_bgcolor||o.background,Ve.paper_bgcolor),Ao=V($e,{gd:Y,hovermode:lt,rotateLabels:Wi,bgColor:uo,container:Ve._hoverlayer,outerContainer:Ve._paper.node(),commonLabelOpts:Ve.hoverlabel,hoverdistance:Ve.hoverdistance}),wo=Ao.hoverLabels;if(m.isUnifiedHover(lt)||(z(wo,Wi,Ve,Ao.commonLabelBoundingBox),J(wo,Wi,Ve._invScaleX,Ve._invScaleY)),Le&&Le.tagName){var Uo=y.getComponentMethod("annotations","hasClickToShow")(Y,Tn);i(Z.select(Le),Uo?"pointer":"")}!Le||_e||!de(Y,ce,en)||(en&&Y.emit("plotly_unhover",{event:ce,points:en}),Y.emit("plotly_hover",{event:ce,points:Y._hoverdata,xaxes:pr,yaxes:Br,xvals:De,yvals:Ee}))}function B(Y){return[Y.trace.index,Y.index,Y.x0,Y.y0,Y.name,Y.attr,Y.xa?Y.xa._id:"",Y.ya?Y.ya._id:""].join(",")}var U=/<extra>([\s\S]*)<\/extra>/;function V(Y,ce){var ue=ce.gd,_e=ue._fullLayout,Le=ce.hovermode,ze=ce.rotateLabels,Ge=ce.bgColor,Ve=ce.container,rt=ce.outerContainer,pt=ce.commonLabelOpts||{};if(Y.length===0)return[[]];var gt=ce.fontFamily||E.HOVERFONT,ht=ce.fontSize||E.HOVERFONTSIZE,lt=ce.fontWeight||_e.font.weight,Fe=ce.fontStyle||_e.font.style,Pe=ce.fontVariant||_e.font.variant,be=ce.fontTextcase||_e.font.textcase,Ye=ce.fontLineposition||_e.font.lineposition,mt=ce.fontShadow||_e.font.shadow,bt=Y[0],ft=bt.xa,Wt=bt.ya,Zt=Le.charAt(0),cr=Zt+"Label",pr=bt[cr];if(pr===void 0&&ft.type==="multicategory")for(var Br=0;Br<Y.length&&(pr=Y[Br][cr],pr===void 0);Br++);var Fr=oe(ue,rt),cn=Fr.top,Nr=Fr.width,Jr=Fr.height,Dt=pr!==void 0&&bt.distance<=ce.hoverdistance&&(Le==="x"||Le==="y");if(Dt){var $e=!0,ot,De;for(ot=0;ot<Y.length;ot++)if($e&&Y[ot].zLabel===void 0&&($e=!1),De=Y[ot].hoverinfo||Y[ot].trace.hoverinfo,De){var Ee=Array.isArray(De)?De:De.split("+");if(Ee.indexOf("all")===-1&&Ee.indexOf(Le)===-1){Dt=!1;break}}$e&&(Dt=!1)}var Ae=Ve.selectAll("g.axistext").data(Dt?[0]:[]);Ae.enter().append("g").classed("axistext",!0),Ae.exit().remove();var Ie={minX:0,maxX:0,minY:0,maxY:0};if(Ae.each(function(){var oa=Z.select(this),zi=C.ensureSingle(oa,"path","",function(Wi){Wi.style({"stroke-width":"1px"})}),Gi=C.ensureSingle(oa,"text","",function(Wi){Wi.attr("data-notex",1)}),qt=pt.bgcolor||o.defaultLine,Ct=pt.bordercolor||o.contrast(qt),Ur=o.contrast(qt),Qr=pt.font,tn={weight:Qr.weight||lt,style:Qr.style||Fe,variant:Qr.variant||Pe,textcase:Qr.textcase||be,lineposition:Qr.lineposition||Ye,shadow:Qr.shadow||mt,family:Qr.family||gt,size:Qr.size||ht,color:Qr.color||Ur};zi.style({fill:qt,stroke:Ct}),Gi.text(pr).call(s.font,tn).call(l.positionText,0,0).call(l.convertToTspans,ue),oa.attr("transform","");var Xr=oe(ue,Gi.node()),en,Tn;if(Le==="x"){var hn=ft.side==="top"?"-":"";Gi.attr("text-anchor","middle").call(l.positionText,0,ft.side==="top"?cn-Xr.bottom-g-f:cn-Xr.top+g+f),en=ft._offset+(bt.x0+bt.x1)/2,Tn=Wt._offset+(ft.side==="top"?0:Wt._length);var Rt=Xr.width/2+f,xr=en;en<Rt?xr=Rt:en>_e.width-Rt&&(xr=_e.width-Rt),zi.attr("d","M"+(en-xr)+",0L"+(en-xr+g)+","+hn+g+"H"+Rt+"v"+hn+(f*2+Xr.height)+"H"+-Rt+"V"+hn+g+"H"+(en-xr-g)+"Z"),en=xr,Ie.minX=en-Rt,Ie.maxX=en+Rt,ft.side==="top"?(Ie.minY=Tn-(f*2+Xr.height),Ie.maxY=Tn-f):(Ie.minY=Tn+f,Ie.maxY=Tn+(f*2+Xr.height))}else{var Wr,An,Xn;Wt.side==="right"?(Wr="start",An=1,Xn="",en=ft._offset+ft._length):(Wr="end",An=-1,Xn="-",en=ft._offset),Tn=Wt._offset+(bt.y0+bt.y1)/2,Gi.attr("text-anchor",Wr),zi.attr("d","M0,0L"+Xn+g+","+g+"V"+(f+Xr.height/2)+"h"+Xn+(f*2+Xr.width)+"V-"+(f+Xr.height/2)+"H"+Xn+g+"V-"+g+"Z"),Ie.minY=Tn-(f+Xr.height/2),Ie.maxY=Tn+(f+Xr.height/2),Wt.side==="right"?(Ie.minX=en+g,Ie.maxX=en+g+(f*2+Xr.width)):(Ie.minX=en-g-(f*2+Xr.width),Ie.maxX=en-g);var na=Xr.height/2,ra=cn-Xr.top-na,Sn="clip"+_e._uid+"commonlabel"+Wt._id,Wn;if(en<Xr.width+2*f+g){Wn="M-"+(g+f)+"-"+na+"h-"+(Xr.width-f)+"V"+na+"h"+(Xr.width-f)+"Z";var Fi=Xr.width-en+f;l.positionText(Gi,Fi,ra),Wr==="end"&&Gi.selectAll("tspan").each(function(){var Wi=Z.select(this),uo=s.tester.append("text").text(Wi.text()).call(s.font,tn),Ao=oe(ue,uo.node());Math.round(Ao.width)<Math.round(Xr.width)&&Wi.attr("x",Fi-Ao.width),uo.remove()})}else l.positionText(Gi,An*(f+g),ra),Wn=null;var Ya=_e._topclips.selectAll("#"+Sn).data(Wn?[0]:[]);Ya.enter().append("clipPath").attr("id",Sn).append("path"),Ya.exit().remove(),Ya.select("path").attr("d",Wn),s.setClipUrl(Gi,Wn?Sn:null,ue)}oa.attr("transform",t(en,Tn))}),m.isUnifiedHover(Le)){Ve.selectAll("g.hovertext").remove();const oa=Y.filter(zi=>zi.hoverinfo!=="none");if(oa.length===0)return[];var tt=_e.hoverlabel,st=tt.font,Ft=oa[0],Nt=((Le==="x unified"?Ft.xa:Ft.ya).unifiedhovertitle||{}).text,Xt=Nt?C.hovertemplateString({data:Le==="x unified"?[{xa:Ft.xa,x:Ft.xVal}]:[{ya:Ft.ya,y:Ft.yVal}],fallback:Ft.trace.hovertemplatefallback,locale:_e._d3locale,template:Nt}):pr,lr={showlegend:!0,legend:{title:{text:Xt,font:st},font:st,bgcolor:tt.bgcolor,bordercolor:tt.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:_e.legend?_e.legend.traceorder:void 0,orientation:"v"}},Rr={font:st};c(lr,Rr,ue._fullData);var Mr=Rr.legend;Mr.entries=[];for(var Sr=0;Sr<oa.length;Sr++){var Kr=oa[Sr];if(Kr.hoverinfo!=="none"){var qn=q(Kr,!0,Le,_e,pr),ha=qn[0],ia=qn[1];Kr.name=ia,ia!==""?Kr.text=ia+" : "+ha:Kr.text=ha;var xa=Kr.cd[Kr.index];xa&&(xa.mc&&(Kr.mc=xa.mc),xa.mcc&&(Kr.mc=xa.mcc),xa.mlc&&(Kr.mlc=xa.mlc),xa.mlcc&&(Kr.mlc=xa.mlcc),xa.mlw&&(Kr.mlw=xa.mlw),xa.mrc&&(Kr.mrc=xa.mrc),xa.dir&&(Kr.dir=xa.dir)),Kr._distinct=!0,Mr.entries.push([Kr])}}Mr.entries.sort(function(zi,Gi){return zi[0].trace.index-Gi[0].trace.index}),Mr.layer=Ve,Mr._inHover=!0,Mr._groupTitleFont=tt.grouptitlefont,_(ue,Mr);var ba=Ve.select("g.legend"),ea=oe(ue,ba.node()),Za=ea.width+2*f,ui=ea.height+2*f,_r=oa[0],Qt=(_r.x0+_r.x1)/2,yr=(_r.y0+_r.y1)/2,br=!(y.traceIs(_r.trace,"bar-like")||y.traceIs(_r.trace,"box-violin")),nn,wn;Zt==="y"?br?(wn=yr-f,nn=yr+f):(wn=Math.min.apply(null,oa.map(function(zi){return Math.min(zi.y0,zi.y1)})),nn=Math.max.apply(null,oa.map(function(zi){return Math.max(zi.y0,zi.y1)}))):wn=nn=C.mean(oa.map(function(zi){return(zi.y0+zi.y1)/2}))-ui/2;var Ln,Fn;Zt==="x"?br?(Ln=Qt+f,Fn=Qt-f):(Ln=Math.max.apply(null,oa.map(function(zi){return Math.max(zi.x0,zi.x1)})),Fn=Math.min.apply(null,oa.map(function(zi){return Math.min(zi.x0,zi.x1)}))):Ln=Fn=C.mean(oa.map(function(zi){return(zi.x0+zi.x1)/2}))-Za/2;var va=ft._offset,Da=Wt._offset;nn+=Da,Ln+=va,Fn+=va-Za,wn+=Da-ui;var Pa,Fa;return Ln+Za<Nr&&Ln>=0?Pa=Ln:Fn+Za<Nr&&Fn>=0?Pa=Fn:va+Za<Nr?Pa=va:Ln-Qt<Qt-Fn+Za?Pa=Nr-Za:Pa=0,Pa+=f,nn+ui<Jr&&nn>=0?Fa=nn:wn+ui<Jr&&wn>=0?Fa=wn:Da+ui<Jr?Fa=Da:nn-yr<yr-wn+ui?Fa=Jr-ui:Fa=0,Fa+=f,ba.attr("transform",t(Pa-1,Fa-1)),ba}var $a=Ve.selectAll("g.hovertext").data(Y,function(oa){return B(oa)});return $a.enter().append("g").classed("hovertext",!0).each(function(){var oa=Z.select(this);oa.append("rect").call(o.fill,o.addOpacity(Ge,.8)),oa.append("text").classed("name",!0),oa.append("path").style("stroke-width","1px"),oa.append("text").classed("nums",!0).call(s.font,{weight:lt,style:Fe,variant:Pe,textcase:be,lineposition:Ye,shadow:mt,family:gt,size:ht})}),$a.exit().remove(),$a.each(function(oa){var zi=Z.select(this).attr("transform",""),Gi=oa.color;Array.isArray(Gi)&&(Gi=Gi[oa.eventData[0].pointNumber]);var qt=oa.bgcolor||Gi,Ct=o.combine(o.opacity(qt)?qt:o.defaultLine,Ge),Ur=o.combine(o.opacity(Gi)?Gi:o.defaultLine,Ge),Qr=oa.borderColor||o.contrast(Ct),tn=q(oa,Dt,Le,_e,pr,zi),Xr=tn[0],en=tn[1],Tn=zi.select("text.nums").call(s.font,{family:oa.fontFamily||gt,size:oa.fontSize||ht,color:oa.fontColor||Qr,weight:oa.fontWeight||lt,style:oa.fontStyle||Fe,variant:oa.fontVariant||Pe,textcase:oa.fontTextcase||be,lineposition:oa.fontLineposition||Ye,shadow:oa.fontShadow||mt}).text(Xr).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,ue),hn=zi.select("text.name"),Rt=0,xr=0;if(en&&en!==Xr){hn.call(s.font,{family:oa.fontFamily||gt,size:oa.fontSize||ht,color:Ur,weight:oa.fontWeight||lt,style:oa.fontStyle||Fe,variant:oa.fontVariant||Pe,textcase:oa.fontTextcase||be,lineposition:oa.fontLineposition||Ye,shadow:oa.fontShadow||mt}).text(en).attr("data-notex",1).call(l.positionText,0,0).call(l.convertToTspans,ue);var Wr=oe(ue,hn.node());Rt=Wr.width+2*f,xr=Wr.height+2*f}else hn.remove(),zi.select("rect").remove();zi.select("path").style({fill:Ct,stroke:Qr});var An=oa.xa._offset+(oa.x0+oa.x1)/2,Xn=oa.ya._offset+(oa.y0+oa.y1)/2,na=Math.abs(oa.x1-oa.x0),ra=Math.abs(oa.y1-oa.y0),Sn=oe(ue,Tn.node()),Wn=Sn.width/_e._invScaleX,Fi=Sn.height/_e._invScaleY;oa.ty0=(cn-Sn.top)/_e._invScaleY,oa.bx=Wn+2*f,oa.by=Math.max(Fi+2*f,xr),oa.anchor="start",oa.txwidth=Wn,oa.tx2width=Rt,oa.offset=0;var Ya=(Wn+g+f+Rt)*_e._invScaleX,Wi,uo;if(ze)oa.pos=An,Wi=Xn+ra/2+Ya<=Jr,uo=Xn-ra/2-Ya>=0,(oa.idealAlign==="top"||!Wi)&&uo?(Xn-=ra/2,oa.anchor="end"):Wi?(Xn+=ra/2,oa.anchor="start"):oa.anchor="middle",oa.crossPos=Xn;else{if(oa.pos=Xn,Wi=An+na/2+Ya<=Nr,uo=An-na/2-Ya>=0,(oa.idealAlign==="left"||!Wi)&&uo)An-=na/2,oa.anchor="end";else if(Wi)An+=na/2,oa.anchor="start";else{oa.anchor="middle";var Ao=Ya/2,wo=An+Ao-Nr,Uo=An-Ao;wo>0&&(An-=wo),Uo<0&&(An+=-Uo)}oa.crossPos=An}Tn.attr("text-anchor",oa.anchor),Rt&&hn.attr("text-anchor",oa.anchor),zi.attr("transform",t(An,Xn)+(ze?r(T):""))}),{hoverLabels:$a,commonLabelBoundingBox:Ie}}function q(Y,ce,ue,_e,Le,ze){var Ge,Ve,rt="",pt="";Y.nameOverride!==void 0&&(Y.name=Y.nameOverride),Y.name&&(Y.trace._meta&&(Y.name=C.templateString(Y.name,Y.trace._meta)),rt=W(Y.name,Y.nameLength));var gt=ue.charAt(0),ht=gt==="x"?"y":"x";Y.zLabel!==void 0?(Y.xLabel!==void 0&&(pt+="x: "+Y.xLabel+"<br>"),Y.yLabel!==void 0&&(pt+="y: "+Y.yLabel+"<br>"),Y.trace.type!=="choropleth"&&Y.trace.type!=="choroplethmapbox"&&Y.trace.type!=="choroplethmap"&&(pt+=(pt?"z: ":"")+Y.zLabel)):ce&&Y[gt+"Label"]===Le?pt=Y[ht+"Label"]||"":Y.xLabel===void 0?Y.yLabel!==void 0&&Y.trace.type!=="scattercarpet"&&(pt=Y.yLabel):Y.yLabel===void 0?pt=Y.xLabel:pt="("+Y.xLabel+", "+Y.yLabel+")",(Y.text||Y.text===0)&&!Array.isArray(Y.text)&&(pt+=(pt?"<br>":"")+Y.text),Y.extraText!==void 0&&(pt+=(pt?"<br>":"")+Y.extraText),ze&&pt===""&&!Y.hovertemplate&&(rt===""&&ze.remove(),pt=rt),(Ve=(Ge=Y.trace)==null?void 0:Ge.hoverlabel)!=null&&Ve.split&&(Y.hovertemplate="");const{hovertemplate:lt=!1}=Y;if(lt){const Fe=Y.hovertemplateLabels||Y;Y[gt+"Label"]!==Le&&(Fe[gt+"other"]=Fe[gt+"Val"],Fe[gt+"otherLabel"]=Fe[gt+"Label"]),pt=C.hovertemplateString({data:[Y.eventData[0]||{},Y.trace._meta],fallback:Y.trace.hovertemplatefallback,labels:Fe,locale:_e._d3locale,template:lt}),pt=pt.replace(U,(Pe,be)=>(rt=W(be,Y.nameLength),""))}return[pt,rt]}function z(Y,ce,ue,_e){var Le=ce?"xa":"ya",ze=ce?"ya":"xa",Ge=0,Ve=1,rt=Y.size(),pt=new Array(rt),gt=0,ht=_e.minX,lt=_e.maxX,Fe=_e.minY,Pe=_e.maxY,be=function(De){return De*ue._invScaleX},Ye=function(De){return De*ue._invScaleY};Y.each(function(De){var Ee=De[Le],Ae=De[ze],Ie=Ee._id.charAt(0)==="x",tt=Ee.range;gt===0&&tt&&tt[0]>tt[1]!==Ie&&(Ve=-1);var st=0,Ft=Ie?ue.width:ue.height;if(ue.hovermode==="x"||ue.hovermode==="y"){var Nt=H(De,ce),Xt=De.anchor,lr=Xt==="end"?-1:1,Rr,Mr;if(Xt==="middle")Rr=De.crossPos+(Ie?Ye(Nt.y-De.by/2):be(De.bx/2+De.tx2width/2)),Mr=Rr+(Ie?Ye(De.by):be(De.bx));else if(Ie)Rr=De.crossPos+Ye(g+Nt.y)-Ye(De.by/2-g),Mr=Rr+Ye(De.by);else{var Sr=be(lr*g+Nt.x),Kr=Sr+be(lr*De.bx);Rr=De.crossPos+Math.min(Sr,Kr),Mr=De.crossPos+Math.max(Sr,Kr)}Ie?Fe!==void 0&&Pe!==void 0&&Math.min(Mr,Pe)-Math.max(Rr,Fe)>1&&(Ae.side==="left"?(st=Ae._mainLinePosition,Ft=ue.width):Ft=Ae._mainLinePosition):ht!==void 0&&lt!==void 0&&Math.min(Mr,lt)-Math.max(Rr,ht)>1&&(Ae.side==="top"?(st=Ae._mainLinePosition,Ft=ue.height):Ft=Ae._mainLinePosition)}pt[gt++]=[{datum:De,traceIndex:De.trace.index,dp:0,pos:De.pos,posref:De.posref,size:De.by*(Ie?k:1)/2,pmin:st,pmax:Ft}]}),pt.sort(function(De,Ee){return De[0].posref-Ee[0].posref||Ve*(Ee[0].traceIndex-De[0].traceIndex)});var mt,bt,ft,Wt,Zt,cr,pr;function Br(De){var Ee=De[0],Ae=De[De.length-1];if(bt=Ee.pmin-Ee.pos-Ee.dp+Ee.size,ft=Ae.pos+Ae.dp+Ae.size-Ee.pmax,bt>.01){for(Zt=De.length-1;Zt>=0;Zt--)De[Zt].dp+=bt;mt=!1}if(!(ft<.01)){if(bt<-.01){for(Zt=De.length-1;Zt>=0;Zt--)De[Zt].dp-=ft;mt=!1}if(mt){var Ie=0;for(Wt=0;Wt<De.length;Wt++)cr=De[Wt],cr.pos+cr.dp+cr.size>Ee.pmax&&Ie++;for(Wt=De.length-1;Wt>=0&&!(Ie<=0);Wt--)cr=De[Wt],cr.pos>Ee.pmax-1&&(cr.del=!0,Ie--);for(Wt=0;Wt<De.length&&!(Ie<=0);Wt++)if(cr=De[Wt],cr.pos<Ee.pmin+1)for(cr.del=!0,Ie--,ft=cr.size*2,Zt=De.length-1;Zt>=0;Zt--)De[Zt].dp-=ft;for(Wt=De.length-1;Wt>=0&&!(Ie<=0);Wt--)cr=De[Wt],cr.pos+cr.dp+cr.size>Ee.pmax&&(cr.del=!0,Ie--)}}}for(;!mt&&Ge<=rt;){for(Ge++,mt=!0,Wt=0;Wt<pt.length-1;){var Fr=pt[Wt],cn=pt[Wt+1],Nr=Fr[Fr.length-1],Jr=cn[0];if(bt=Nr.pos+Nr.dp+Nr.size-Jr.pos-Jr.dp+Jr.size,bt>.01){for(Zt=cn.length-1;Zt>=0;Zt--)cn[Zt].dp+=bt;for(Fr.push.apply(Fr,cn),pt.splice(Wt+1,1),pr=0,Zt=Fr.length-1;Zt>=0;Zt--)pr+=Fr[Zt].dp;for(ft=pr/Fr.length,Zt=Fr.length-1;Zt>=0;Zt--)Fr[Zt].dp-=ft;mt=!1}else Wt++}pt.forEach(Br)}for(Wt=pt.length-1;Wt>=0;Wt--){var Dt=pt[Wt];for(Zt=Dt.length-1;Zt>=0;Zt--){var $e=Dt[Zt],ot=$e.datum;ot.offset=$e.dp,ot.del=$e.del}}}function H(Y,ce){var ue=0,_e=Y.offset;return ce&&(_e*=-A,ue=Y.offset*b),{x:ue,y:_e}}function G(Y){var ce={start:1,end:-1,middle:0}[Y.anchor],ue=ce*(g+f),_e=ue+ce*(Y.txwidth+f),Le=Y.anchor==="middle";return Le&&(ue-=Y.tx2width/2,_e+=Y.txwidth/2+f),{alignShift:ce,textShiftX:ue,text2ShiftX:_e}}function J(Y,ce,ue,_e){var Le=function(Ge){return Ge*ue},ze=function(Ge){return Ge*_e};Y.each(function(Ge){var Ve=Z.select(this);if(Ge.del)return Ve.remove();var rt=Ve.select("text.nums"),pt=Ge.anchor,gt=pt==="end"?-1:1,ht=G(Ge),lt=H(Ge,ce),Fe=lt.x,Pe=lt.y,be=pt==="middle",Ye="hoverlabel"in Ge.trace?Ge.trace.hoverlabel.showarrow:!0,mt;be?mt="M-"+Le(Ge.bx/2+Ge.tx2width/2)+","+ze(Pe-Ge.by/2)+"h"+Le(Ge.bx)+"v"+ze(Ge.by)+"h-"+Le(Ge.bx)+"Z":Ye?mt="M0,0L"+Le(gt*g+Fe)+","+ze(g+Pe)+"v"+ze(Ge.by/2-g)+"h"+Le(gt*Ge.bx)+"v-"+ze(Ge.by)+"H"+Le(gt*g+Fe)+"V"+ze(Pe-g)+"Z":mt="M"+Le(gt*g+Fe)+","+ze(Pe-Ge.by/2)+"h"+Le(gt*Ge.bx)+"v"+ze(Ge.by)+"h"+Le(-gt*Ge.bx)+"Z",Ve.select("path").attr("d",mt);var bt=Fe+ht.textShiftX,ft=Pe+Ge.ty0-Ge.by/2+f,Wt=Ge.textAlign||"auto";Wt!=="auto"&&(Wt==="left"&&pt!=="start"?(rt.attr("text-anchor","start"),bt=be?-Ge.bx/2-Ge.tx2width/2+f:-Ge.bx-f):Wt==="right"&&pt!=="end"&&(rt.attr("text-anchor","end"),bt=be?Ge.bx/2-Ge.tx2width/2-f:Ge.bx+f)),rt.call(l.positionText,Le(bt),ze(ft)),Ge.tx2width&&(Ve.select("text.name").call(l.positionText,Le(ht.text2ShiftX+ht.alignShift*f+Fe),ze(Pe+Ge.ty0-Ge.by/2+f)),Ve.select("rect").call(s.setRect,Le(ht.text2ShiftX+(ht.alignShift-1)*Ge.tx2width/2+Fe),ze(Pe-Ge.by/2-1),Le(Ge.tx2width),ze(Ge.by+2)))})}function le(Y,ce){var ue=Y.index,_e=Y.trace||{},Le=Y.cd[0],ze=Y.cd[ue]||{};function Ge(lt){return lt||v(lt)&&lt===0}var Ve=Array.isArray(ue)?function(lt,Fe){var Pe=C.castOption(Le,ue,lt);return Ge(Pe)?Pe:C.extractOption({},_e,"",Fe)}:function(lt,Fe){return C.extractOption(ze,_e,lt,Fe)};function rt(lt,Fe,Pe){var be=Ve(Fe,Pe);Ge(be)&&(Y[lt]=be)}if(rt("hoverinfo","hi","hoverinfo"),rt("bgcolor","hbg","hoverlabel.bgcolor"),rt("borderColor","hbc","hoverlabel.bordercolor"),rt("fontFamily","htf","hoverlabel.font.family"),rt("fontSize","hts","hoverlabel.font.size"),rt("fontColor","htc","hoverlabel.font.color"),rt("fontWeight","htw","hoverlabel.font.weight"),rt("fontStyle","hty","hoverlabel.font.style"),rt("fontVariant","htv","hoverlabel.font.variant"),rt("nameLength","hnl","hoverlabel.namelength"),rt("textAlign","hta","hoverlabel.align"),Y.posref=ce==="y"||ce==="closest"&&_e.orientation==="h"?Y.xa._offset+(Y.x0+Y.x1)/2:Y.ya._offset+(Y.y0+Y.y1)/2,Y.x0=C.constrain(Y.x0,0,Y.xa._length),Y.x1=C.constrain(Y.x1,0,Y.xa._length),Y.y0=C.constrain(Y.y0,0,Y.ya._length),Y.y1=C.constrain(Y.y1,0,Y.ya._length),Y.xLabelVal!==void 0&&(Y.xLabel="xLabel"in Y?Y.xLabel:d.hoverLabelText(Y.xa,Y.xLabelVal,_e.xhoverformat),Y.xVal=Y.xa.c2d(Y.xLabelVal)),Y.yLabelVal!==void 0&&(Y.yLabel="yLabel"in Y?Y.yLabel:d.hoverLabelText(Y.ya,Y.yLabelVal,_e.yhoverformat),Y.yVal=Y.ya.c2d(Y.yLabelVal)),Y.zLabelVal!==void 0&&Y.zLabel===void 0&&(Y.zLabel=String(Y.zLabelVal)),!isNaN(Y.xerr)&&!(Y.xa.type==="log"&&Y.xerr<=0)){var pt=d.tickText(Y.xa,Y.xa.c2l(Y.xerr),"hover").text;Y.xerrneg!==void 0?Y.xLabel+=" +"+pt+" / -"+d.tickText(Y.xa,Y.xa.c2l(Y.xerrneg),"hover").text:Y.xLabel+=" ± "+pt,ce==="x"&&(Y.distance+=1)}if(!isNaN(Y.yerr)&&!(Y.ya.type==="log"&&Y.yerr<=0)){var gt=d.tickText(Y.ya,Y.ya.c2l(Y.yerr),"hover").text;Y.yerrneg!==void 0?Y.yLabel+=" +"+gt+" / -"+d.tickText(Y.ya,Y.ya.c2l(Y.yerrneg),"hover").text:Y.yLabel+=" ± "+gt,ce==="y"&&(Y.distance+=1)}var ht=Y.hoverinfo||Y.trace.hoverinfo;return ht&&ht!=="all"&&(ht=Array.isArray(ht)?ht:ht.split("+"),ht.indexOf("x")===-1&&(Y.xLabel=void 0),ht.indexOf("y")===-1&&(Y.yLabel=void 0),ht.indexOf("z")===-1&&(Y.zLabel=void 0),ht.indexOf("text")===-1&&(Y.text=void 0),ht.indexOf("name")===-1&&(Y.name=void 0)),Y}function ye(Y,ce,ue){var _e=ue.container,Le=ue.fullLayout,ze=Le._size,Ge=ue.event,Ve=!!ce.hLinePoint,rt=!!ce.vLinePoint,pt,gt;if(_e.selectAll(".spikeline").remove(),!!(rt||Ve)){var ht=o.combine(Le.plot_bgcolor,Le.paper_bgcolor);if(Ve){var lt=ce.hLinePoint,Fe,Pe;pt=lt&&lt.xa,gt=lt&&lt.ya;var be=gt.spikesnap;be==="cursor"?(Fe=Ge.pointerX,Pe=Ge.pointerY):(Fe=pt._offset+lt.x,Pe=gt._offset+lt.y);var Ye=w.readability(lt.color,ht)<1.5?o.contrast(ht):lt.color,mt=gt.spikemode,bt=gt.spikethickness,ft=gt.spikecolor||Ye,Wt=d.getPxPosition(Y,gt),Zt,cr;if(mt.indexOf("toaxis")!==-1||mt.indexOf("across")!==-1){if(mt.indexOf("toaxis")!==-1&&(Zt=Wt,cr=Fe),mt.indexOf("across")!==-1){var pr=gt._counterDomainMin,Br=gt._counterDomainMax;gt.anchor==="free"&&(pr=Math.min(pr,gt.position),Br=Math.max(Br,gt.position)),Zt=ze.l+pr*ze.w,cr=ze.l+Br*ze.w}_e.insert("line",":first-child").attr({x1:Zt,x2:cr,y1:Pe,y2:Pe,"stroke-width":bt,stroke:ft,"stroke-dasharray":s.dashStyle(gt.spikedash,bt)}).classed("spikeline",!0).classed("crisp",!0),_e.insert("line",":first-child").attr({x1:Zt,x2:cr,y1:Pe,y2:Pe,"stroke-width":bt+2,stroke:ht}).classed("spikeline",!0).classed("crisp",!0)}mt.indexOf("marker")!==-1&&_e.insert("circle",":first-child").attr({cx:Wt+(gt.side!=="right"?bt:-bt),cy:Pe,r:bt,fill:ft}).classed("spikeline",!0)}if(rt){var Fr=ce.vLinePoint,cn,Nr;pt=Fr&&Fr.xa,gt=Fr&&Fr.ya;var Jr=pt.spikesnap;Jr==="cursor"?(cn=Ge.pointerX,Nr=Ge.pointerY):(cn=pt._offset+Fr.x,Nr=gt._offset+Fr.y);var Dt=w.readability(Fr.color,ht)<1.5?o.contrast(ht):Fr.color,$e=pt.spikemode,ot=pt.spikethickness,De=pt.spikecolor||Dt,Ee=d.getPxPosition(Y,pt),Ae,Ie;if($e.indexOf("toaxis")!==-1||$e.indexOf("across")!==-1){if($e.indexOf("toaxis")!==-1&&(Ae=Ee,Ie=Nr),$e.indexOf("across")!==-1){var tt=pt._counterDomainMin,st=pt._counterDomainMax;pt.anchor==="free"&&(tt=Math.min(tt,pt.position),st=Math.max(st,pt.position)),Ae=ze.t+(1-st)*ze.h,Ie=ze.t+(1-tt)*ze.h}_e.insert("line",":first-child").attr({x1:cn,x2:cn,y1:Ae,y2:Ie,"stroke-width":ot,stroke:De,"stroke-dasharray":s.dashStyle(pt.spikedash,ot)}).classed("spikeline",!0).classed("crisp",!0),_e.insert("line",":first-child").attr({x1:cn,x2:cn,y1:Ae,y2:Ie,"stroke-width":ot+2,stroke:ht}).classed("spikeline",!0).classed("crisp",!0)}$e.indexOf("marker")!==-1&&_e.insert("circle",":first-child").attr({cx:cn,cy:Ee-(pt.side!=="top"?ot:-ot),r:ot,fill:De}).classed("spikeline",!0)}}}function de(Y,ce,ue){if(!ue||ue.length!==Y._hoverdata.length)return!0;for(var _e=ue.length-1;_e>=0;_e--){var Le=ue[_e],ze=Y._hoverdata[_e];if(Le.curveNumber!==ze.curveNumber||String(Le.pointNumber)!==String(ze.pointNumber)||String(Le.pointNumbers)!==String(ze.pointNumbers)||Le.binNumber!==ze.binNumber)return!0}return!1}function me(Y,ce){return!0}function W(Y,ce){return l.plainText(Y||"",{len:ce,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function ie(Y,ce){for(var ue=ce.charAt(0),_e=[],Le=[],ze=[],Ge=0;Ge<Y.length;Ge++){var Ve=Y[Ge];y.traceIs(Ve.trace,"bar-like")||y.traceIs(Ve.trace,"box-violin")?ze.push(Ve):Ve.trace[ue+"period"]?Le.push(Ve):_e.push(Ve)}return _e.concat(Le).concat(ze)}function se(Y,ce,ue){var _e=ce[Y+"a"],Le=ce[Y+"Val"],ze=ce.cd[0];if(_e.type==="category"||_e.type==="multicategory")Le=_e._categoriesMap[Le];else if(_e.type==="date"){var Ge=ce.trace[Y+"periodalignment"];if(Ge){var Ve=ce.cd[ce.index],rt=Ve[Y+"Start"];rt===void 0&&(rt=Ve[Y]);var pt=Ve[Y+"End"];pt===void 0&&(pt=Ve[Y]);var gt=pt-rt;Ge==="end"?Le+=gt:Ge==="middle"&&(Le+=gt/2)}Le=_e.d2c(Le)}return ze&&ze.t&&ze.t.posLetter===_e._id&&(ue.boxmode==="group"||ue.violinmode==="group")&&(Le+=ze.t.dPos),Le}var ee=Y=>Y.offsetTop+Y.clientTop,pe=Y=>Y.offsetLeft+Y.clientLeft;function oe(Y,ce){var ue=Y._fullLayout,_e=ce.getBoundingClientRect(),Le=_e.left,ze=_e.top,Ge=Le+_e.width,Ve=ze+_e.height,rt=C.apply3DTransform(ue._invTransform)(Le,ze),pt=C.apply3DTransform(ue._invTransform)(Ge,Ve),gt=rt[0],ht=rt[1],lt=pt[0],Fe=pt[1];return{x:gt,y:ht,width:lt-gt,height:Fe-ht,top:Math.min(ht,Fe),left:Math.min(gt,lt),right:Math.max(gt,lt),bottom:Math.max(ht,Fe)}}}}),Iw=Ne({"src/components/fx/hoverlabel_defaults.js"(te,Z){var v=In(),w=io(),C=_v().isUnifiedHover;Z.exports=function(t,r,a,l){l=l||{};var i=r.legend;function s(o){l.font[o]||(l.font[o]=i?r.legend.font[o]:r.font[o])}r&&C(r.hovermode)&&(l.font||(l.font={}),s("size"),s("family"),s("color"),s("weight"),s("style"),s("variant"),i?(l.bgcolor||(l.bgcolor=w.combine(r.legend.bgcolor,r.paper_bgcolor)),l.bordercolor||(l.bordercolor=r.legend.bordercolor)):l.bgcolor||(l.bgcolor=r.paper_bgcolor)),a("hoverlabel.bgcolor",l.bgcolor),a("hoverlabel.bordercolor",l.bordercolor),a("hoverlabel.namelength",l.namelength),a("hoverlabel.showarrow",l.showarrow),v.coerceFont(a,"hoverlabel.font",l.font),a("hoverlabel.align",l.align)}}}),EL=Ne({"src/components/fx/layout_global_defaults.js"(te,Z){var v=In(),w=Iw(),C=Bo();Z.exports=function(t,r){function a(l,i){return v.coerce(t,r,C,l,i)}w(t,r,a)}}}),ML=Ne({"src/components/fx/defaults.js"(te,Z){var v=In(),w=Ml(),C=Iw();Z.exports=function(t,r,a,l){function i(o,u){return v.coerce(t,r,w,o,u)}var s=v.extendFlat({},l.hoverlabel);r.hovertemplate&&(s.namelength=-1),C(t,r,i,s)}}}),cM=Ne({"src/components/fx/hovermode_defaults.js"(te,Z){var v=In(),w=Bo();Z.exports=function(P,t){function r(a,l){return t[a]!==void 0?t[a]:v.coerce(P,t,w,a,l)}return r("clickmode"),r("hoversubplots"),r("hovermode")}}}),CL=Ne({"src/components/fx/layout_defaults.js"(te,Z){var v=In(),w=Bo(),C=cM(),P=Iw();Z.exports=function(r,a){function l(y,m){return v.coerce(r,a,w,y,m)}var i=C(r,a);i&&(l("hoverdistance"),l("spikedistance"));var s=l("dragmode");s==="select"&&l("selectdirection");var o=a._has("mapbox"),u=a._has("map"),d=a._has("geo"),h=a._basePlotModules.length;a.dragmode==="zoom"&&((o||u||d)&&h===1||(o||u)&&d&&h===2)&&(a.dragmode="pan"),P(r,a,l),v.coerceFont(l,"hoverlabel.grouptitlefont",a.hoverlabel.font)}}}),oA=Ne({"src/components/fx/calc.js"(te,Z){var v=In(),w=Xo();Z.exports=function(t){var r=t.calcdata,a=t._fullLayout;function l(d){return function(h){return v.coerceHoverinfo({hoverinfo:h},{_module:d._module},a)}}for(var i=0;i<r.length;i++){var s=r[i],o=s[0].trace;if(!w.traceIs(o,"pie-like")){var u=w.traceIs(o,"2dMap")?C:v.fillArray;u(o.hoverinfo,s,"hi",l(o)),o.hovertemplate&&u(o.hovertemplate,s,"ht"),o.hoverlabel&&(u(o.hoverlabel.bgcolor,s,"hbg"),u(o.hoverlabel.bordercolor,s,"hbc"),u(o.hoverlabel.font.size,s,"hts"),u(o.hoverlabel.font.color,s,"htc"),u(o.hoverlabel.font.family,s,"htf"),u(o.hoverlabel.font.weight,s,"htw"),u(o.hoverlabel.font.style,s,"hty"),u(o.hoverlabel.font.variant,s,"htv"),u(o.hoverlabel.namelength,s,"hnl"),u(o.hoverlabel.align,s,"hta"),u(o.hoverlabel.showarrow,s,"htsa"))}}};function C(P,t,r,a){a=a||v.identity,Array.isArray(P)&&(t[0][r]=a(P))}}}),Ax=Ne({"src/components/fx/click.js"(te,Z){var v=Xo(),w=uM().hover;Z.exports=function(P,t,r){var a=v.getComponentMethod("annotations","onClick")(P,P._hoverdata);r!==void 0&&w(P,t,r,!0);function l(){P.emit("plotly_click",{points:P._hoverdata,event:t})}P._hoverdata&&t&&t.target&&(a&&a.then?a.then(l):l(),t.stopImmediatePropagation&&t.stopImmediatePropagation())}}}),nh=Ne({"src/components/fx/index.js"(te,Z){var v=xn(),w=In(),C=Bv(),P=_v(),t=Bo(),r=uM();Z.exports={moduleType:"component",name:"fx",constants:$u(),schema:{layout:t},attributes:Ml(),layoutAttributes:t,supplyLayoutGlobalDefaults:EL(),supplyDefaults:ML(),supplyLayoutDefaults:CL(),calc:oA(),getDistanceFunction:P.getDistanceFunction,getClosest:P.getClosest,inbox:P.inbox,quadrature:P.quadrature,appendArrayPointValue:P.appendArrayPointValue,castHoverOption:l,castHoverinfo:i,hover:r.hover,unhover:C.unhover,loneHover:r.loneHover,loneUnhover:a,click:Ax()};function a(s){var o=w.isD3Selection(s)?s:v.select(s);o.selectAll("g.hovertext").remove(),o.selectAll(".spikeline").remove()}function l(s,o,u){return w.castOption(s,o,"hoverlabel."+u)}function i(s,o,u){function d(h){return w.coerceHoverinfo({hoverinfo:h},{_module:s._module},o)}return w.castOption(s,u,"hoverinfo",d)}}}),Pm=Ne({"src/components/dragelement/helpers.js"(te){te.selectMode=function(Z){return Z==="lasso"||Z==="select"},te.drawMode=function(Z){return Z==="drawclosedpath"||Z==="drawopenpath"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},te.openMode=function(Z){return Z==="drawline"||Z==="drawopenpath"},te.rectMode=function(Z){return Z==="select"||Z==="drawline"||Z==="drawrect"||Z==="drawcircle"},te.freeMode=function(Z){return Z==="lasso"||Z==="drawclosedpath"||Z==="drawopenpath"},te.selectingOrDrawing=function(Z){return te.freeMode(Z)||te.rectMode(Z)}}}),Sx=Ne({"src/lib/clear_gl_canvases.js"(te,Z){Z.exports=function(w){var C=w._fullLayout;C._glcanvas&&C._glcanvas.size()&&C._glcanvas.each(function(P){P.regl&&P.regl.clear({color:!0,depth:!0})})}}}),Dw=Ne({"src/fonts/ploticon.js"(te,Z){Z.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},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:["<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 132'>"," <title>plotly-logomark</title>"," <g id='symbol'>","  <rect fill='#000' x='0' y='0' width='132' height='132' rx='18' ry='18'/>","  <circle fill='#9EF' cx='102' cy='30' r='6'/>","  <circle fill='#BAC' cx='78' cy='30' r='6'/>","  <circle fill='#BAC' cx='78' cy='54' r='6'/>","  <circle fill='#D69' cx='54' cy='30' r='6'/>","  <circle fill='#F26' cx='30' cy='30' r='6'/>","  <circle fill='#F26' cx='30' cy='54' r='6'/>","  <path fill='#FFF' d='M30,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,30,72Z'/>","  <path fill='#FFF' d='M78,72a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V78A6,6,0,0,0,78,72Z'/>","  <path fill='#FFF' d='M54,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,54,48Z'/>","  <path fill='#FFF' d='M102,48a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V54A6,6,0,0,0,102,48Z'/>"," </g>","</svg>"].join("")}}}}),Ow=Ne({"src/components/shapes/draw_newshape/constants.js"(te,Z){var v=32;Z.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),zw=Ne({"src/components/selections/helpers.js"(te,Z){var v=In().strTranslate;function w(r,a){switch(r.type){case"log":return r.p2d(a);case"date":return r.p2r(a,0,r.calendar);default:return r.p2r(a)}}function C(r,a){switch(r.type){case"log":return r.d2p(a);case"date":return r.r2p(a,0,r.calendar);default:return r.r2p(a)}}function P(r){var a=r._id.charAt(0)==="y"?1:0;return function(l){return w(r,l[a])}}function t(r){return v(r.xaxis._offset,r.yaxis._offset)}Z.exports={p2r:w,r2p:C,axValue:P,getTransform:t}}}),im=Ne({"src/components/shapes/draw_newshape/helpers.js"(te){var Z=by(),v=Ow(),w=v.CIRCLE_SIDES,C=v.SQRT2,P=zw(),t=P.p2r,r=P.r2p,a=[0,3,4,5,6,1,2],l=[0,3,4,1,2];te.writePaths=function(o){var u=o.length;if(!u)return"M0,0Z";for(var d="",h=0;h<u;h++)for(var y=o[h].length,m=0;m<y;m++){var E=o[h][m][0];if(E==="Z")d+="Z";else for(var c=o[h][m].length,_=0;_<c;_++){var T=_;E==="Q"||E==="S"?T=l[_]:E==="C"&&(T=a[_]),d+=o[h][m][T],_>0&&_<c-1&&(d+=",")}}return d},te.readPaths=function(o,u,d,h){var y=Z(o),m=[],E=-1,c=function(){E++,m[E]=[]},_,T=0,M=0,k,b,A=function(){k=T,b=M};A();for(var g=0;g<y.length;g++){var f=[],p,x,N,D,B=y[g][0],U=B;switch(B){case"M":c(),T=+y[g][1],M=+y[g][2],f.push([U,T,M]),A();break;case"Q":case"S":p=+y[g][1],N=+y[g][2],T=+y[g][3],M=+y[g][4],f.push([U,T,M,p,N]);break;case"C":p=+y[g][1],N=+y[g][2],x=+y[g][3],D=+y[g][4],T=+y[g][5],M=+y[g][6],f.push([U,T,M,p,N,x,D]);break;case"T":case"L":T=+y[g][1],M=+y[g][2],f.push([U,T,M]);break;case"H":U="L",T=+y[g][1],f.push([U,T,M]);break;case"V":U="L",M=+y[g][1],f.push([U,T,M]);break;case"A":U="L";var V=+y[g][1],q=+y[g][2];+y[g][4]||(V=-V,q=-q);var z=T-V,H=M;for(_=1;_<=w/2;_++){var G=2*Math.PI*_/w;f.push([U,z+V*Math.cos(G),H+q*Math.sin(G)])}break;case"Z":(T!==k||M!==b)&&(T=k,M=b,f.push([U,T,M]));break}for(var J=(d||{}).domain,le=u._fullLayout._size,ye=d&&d.xsizemode==="pixel",de=d&&d.ysizemode==="pixel",me=h===!1,W=0;W<f.length;W++){for(_=0;_+2<7;_+=2){var ie=f[W][_+1],se=f[W][_+2];ie===void 0||se===void 0||(T=ie,M=se,d&&(d.xaxis&&d.xaxis.p2r?(me&&(ie-=d.xaxis._offset),ye?ie=r(d.xaxis,d.xanchor)+ie:ie=t(d.xaxis,ie)):(me&&(ie-=le.l),J?ie=J.x[0]+ie/le.w:ie=ie/le.w),d.yaxis&&d.yaxis.p2r?(me&&(se-=d.yaxis._offset),de?se=r(d.yaxis,d.yanchor)-se:se=t(d.yaxis,se)):(me&&(se-=le.t),J?se=J.y[1]-se/le.h:se=1-se/le.h)),f[W][_+1]=ie,f[W][_+2]=se)}m[E].push(f[W].slice())}}return m};function i(o,u){return Math.abs(o-u)<=1e-6}function s(o,u){var d=u[1]-o[1],h=u[2]-o[2];return Math.sqrt(d*d+h*h)}te.pointsOnRectangle=function(o){var u=o.length;if(u!==5)return!1;for(var d=1;d<3;d++){var h=o[0][d]-o[1][d],y=o[3][d]-o[2][d];if(!i(h,y))return!1;var m=o[0][d]-o[3][d],E=o[1][d]-o[2][d];if(!i(m,E))return!1}return!i(o[0][1],o[1][1])&&!i(o[0][1],o[3][1])?!1:!!(s(o[0],o[1])*s(o[0],o[3]))},te.pointsOnEllipse=function(o){var u=o.length;if(u!==w+1)return!1;u=w;for(var d=0;d<u;d++){var h=(u*2-d)%u,y=(u/2+h)%u,m=(u/2+d)%u;if(!i(s(o[d],o[m]),s(o[h],o[y])))return!1}return!0},te.handleEllipse=function(o,u,d){if(!o)return[u,d];var h=te.ellipseOver({x0:u[0],y0:u[1],x1:d[0],y1:d[1]}),y=(h.x1+h.x0)/2,m=(h.y1+h.y0)/2,E=(h.x1-h.x0)/2,c=(h.y1-h.y0)/2;E||(E=c=c/C),c||(c=E=E/C);for(var _=[],T=0;T<w;T++){var M=T*2*Math.PI/w;_.push([y+E*Math.cos(M),m+c*Math.sin(M)])}return _},te.ellipseOver=function(o){var u=o.x0,d=o.y0,h=o.x1,y=o.y1,m=h-u,E=y-d;u-=m,d-=E;var c=(u+h)/2,_=(d+y)/2,T=C;return m*=T,E*=T,{x0:c-m,y0:_-E,x1:c+m,y1:_+E}},te.fixDatesForPaths=function(o,u,d){var h=u.type==="date",y=d.type==="date";if(!h&&!y)return o;for(var m=0;m<o.length;m++)for(var E=0;E<o[m].length;E++)for(var c=0;c+2<o[m][E].length;c+=2)h&&(o[m][E][c+1]=o[m][E][c+1].replace(" ","_")),y&&(o[m][E][c+2]=o[m][E][c+2].replace(" ","_"));return o}}}),sA=Ne({"src/components/shapes/draw_newshape/newshapes.js"(te,Z){var v=Hf(),w=Pm(),C=w.drawMode,P=w.openMode,t=Ow(),r=t.i000,a=t.i090,l=t.i180,i=t.i270,s=t.cos45,o=t.sin45,u=zw(),d=u.p2r,h=u.r2p,y=_y(),m=y.clearOutline,E=im(),c=E.readPaths,_=E.writePaths,T=E.ellipseOver,M=E.fixDatesForPaths;function k(A,g){if(A.length){var f=A[0][0];if(f){var p=g.gd,x=g.isActiveShape,N=g.dragmode,D=(p.layout||{}).shapes||[];if(!C(N)&&x!==void 0){var B=p._fullLayout._activeShapeIndex;if(B<D.length)switch(p._fullLayout.shapes[B].type){case"rect":N="drawrect";break;case"circle":N="drawcircle";break;case"line":N="drawline";break;case"path":var U=D[B].path||"";U[U.length-1]==="Z"?N="drawclosedpath":N="drawopenpath";break}}var V=b(A,g,N);m(p);for(var q=g.editHelpers,z=(q||{}).modifyItem,H=[],G=0;G<D.length;G++){var J=p._fullLayout.shapes[G];if(H[G]=J._input,x!==void 0&&G===p._fullLayout._activeShapeIndex){var le=V;switch(J.type){case"line":case"rect":case"circle":var ye=v.getFromId(p,J.xref);J.xref.charAt(0)==="x"&&ye.type.includes("category")?(z("x0",le.x0-(J.x0shift||0)),z("x1",le.x1-(J.x1shift||0))):(z("x0",le.x0),z("x1",le.x1));var de=v.getFromId(p,J.yref);J.yref.charAt(0)==="y"&&de.type.includes("category")?(z("y0",le.y0-(J.y0shift||0)),z("y1",le.y1-(J.y1shift||0))):(z("y0",le.y0),z("y1",le.y1));break;case"path":z("path",le.path);break}}}return x===void 0?(H.push(V),H):q?q.getUpdateObj():{}}}}function b(A,g,f){var p=A[0][0],x=g.gd,N=p.getAttribute("d"),D=x._fullLayout.newshape,B=g.plotinfo,U=g.isActiveShape,V=B.xaxis,q=B.yaxis,z=!!B.domain||!B.xaxis,H=!!B.domain||!B.yaxis,G=P(f),J=c(N,x,B,U),le={editable:!0,visible:D.visible,name:D.name,showlegend:D.showlegend,legend:D.legend,legendwidth:D.legendwidth,legendgroup:D.legendgroup,legendgrouptitle:{text:D.legendgrouptitle.text,font:D.legendgrouptitle.font},legendrank:D.legendrank,label:D.label,xref:z?"paper":V._id,yref:H?"paper":q._id,layer:D.layer,opacity:D.opacity,line:{color:D.line.color,width:D.line.width,dash:D.line.dash}};G||(le.fillcolor=D.fillcolor,le.fillrule=D.fillrule);var ye;if(J.length===1&&(ye=J[0]),ye&&ye.length===5&&f==="drawrect")le.type="rect",le.x0=ye[0][1],le.y0=ye[0][2],le.x1=ye[2][1],le.y1=ye[2][2];else if(ye&&f==="drawline")le.type="line",le.x0=ye[0][1],le.y0=ye[0][2],le.x1=ye[1][1],le.y1=ye[1][2];else if(ye&&f==="drawcircle"){le.type="circle";var de=ye[r][1],me=ye[a][1],W=ye[l][1],ie=ye[i][1],se=ye[r][2],ee=ye[a][2],pe=ye[l][2],oe=ye[i][2],Y=B.xaxis&&(B.xaxis.type==="date"||B.xaxis.type==="log"),ce=B.yaxis&&(B.yaxis.type==="date"||B.yaxis.type==="log");Y&&(de=h(B.xaxis,de),me=h(B.xaxis,me),W=h(B.xaxis,W),ie=h(B.xaxis,ie)),ce&&(se=h(B.yaxis,se),ee=h(B.yaxis,ee),pe=h(B.yaxis,pe),oe=h(B.yaxis,oe));var ue=(me+ie)/2,_e=(se+pe)/2,Le=(ie-me+W-de)/2,ze=(oe-ee+pe-se)/2,Ge=T({x0:ue,y0:_e,x1:ue+Le*s,y1:_e+ze*o});Y&&(Ge.x0=d(B.xaxis,Ge.x0),Ge.x1=d(B.xaxis,Ge.x1)),ce&&(Ge.y0=d(B.yaxis,Ge.y0),Ge.y1=d(B.yaxis,Ge.y1)),le.x0=Ge.x0,le.y0=Ge.y0,le.x1=Ge.x1,le.y1=Ge.y1}else le.type="path",V&&q&&M(J,V,q),le.path=_(J),ye=null;return le}Z.exports={newShapes:k,createShapeObj:b}}}),fM=Ne({"src/components/selections/draw_newselection/newselections.js"(te,Z){var v=Pm(),w=v.selectMode,C=_y(),P=C.clearOutline,t=im(),r=t.readPaths,a=t.writePaths,l=t.fixDatesForPaths;Z.exports=function(s,o){if(s.length){var u=s[0][0];if(u){var d=u.getAttribute("d"),h=o.gd,y=h._fullLayout.newselection,m=o.plotinfo,E=m.xaxis,c=m.yaxis,_=o.isActiveSelection,T=o.dragmode,M=(h.layout||{}).selections||[];if(!w(T)&&_!==void 0){var k=h._fullLayout._activeSelectionIndex;if(k<M.length)switch(h._fullLayout.selections[k].type){case"rect":T="select";break;case"path":T="lasso";break}}var b=r(d,h,m,_),A={xref:E._id,yref:c._id,opacity:y.opacity,line:{color:y.line.color,width:y.line.width,dash:y.line.dash}},g;b.length===1&&(g=b[0]),g&&g.length===5&&T==="select"?(A.type="rect",A.x0=g[0][1],A.y0=g[0][2],A.x1=g[2][1],A.y1=g[2][2]):(A.type="path",E&&c&&l(b,E,c),A.path=a(b),g=null),P(h);for(var f=o.editHelpers,p=(f||{}).modifyItem,x=[],N=0;N<M.length;N++){var D=h._fullLayout.selections[N];if(!D){x[N]=D;continue}if(x[N]=D._input,_!==void 0&&N===h._fullLayout._activeSelectionIndex){var B=A;switch(D.type){case"rect":p("x0",B.x0),p("x1",B.x1),p("y0",B.y0),p("y1",B.y1);break;case"path":p("path",B.path);break}}}return _===void 0?(x.push(A),x):f?f.getUpdateObj():{}}}}}}),Nw=Ne({"src/components/shapes/constants.js"(te,Z){Z.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:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}}}),Ay=Ne({"src/components/shapes/helpers.js"(te){var Z=Nw(),v=In(),w=Os();te.rangeToShapePosition=function(t){return t.type==="log"?t.r2d:function(r){return r}},te.shapePositionToRange=function(t){return t.type==="log"?t.d2r:function(r){return r}},te.decodeDate=function(t){return function(r){return r.replace&&(r=r.replace("_"," ")),t(r)}},te.encodeDate=function(t){return function(r){return t(r).replace(" ","_")}},te.extractPathCoords=function(t,r,a){var l=[],i=t.match(Z.segmentRE);return i.forEach(function(s){var o=r[s.charAt(0)].drawn;if(o!==void 0){var u=s.substr(1).match(Z.paramRE);if(!(!u||u.length<o)){var d=u[o],h=a?d:v.cleanNumber(d);l.push(h)}}}),l},te.getDataToPixel=function(t,r,a,l,i){var s=t._fullLayout._size,o;if(r)if(i==="domain")o=function(d){return r._length*(l?1-d:d)+r._offset};else{var u=te.shapePositionToRange(r);o=function(d){var h=P(r,a);return r._offset+r.r2p(u(d,!0))+h},r.type==="date"&&(o=te.decodeDate(o))}else l?o=function(d){return s.t+s.h*(1-d)}:o=function(d){return s.l+s.w*d};return o},te.getPixelToData=function(t,r,a,l){var i=t._fullLayout._size,s;if(r)if(l==="domain")s=function(u){var d=(u-r._offset)/r._length;return a?1-d:d};else{var o=te.rangeToShapePosition(r);s=function(u){return o(r.p2r(u-r._offset))}}else a?s=function(u){return 1-(u-i.t)/i.h}:s=function(u){return(u-i.l)/i.w};return s},te.roundPositionForSharpStrokeRendering=function(t,r){var a=Math.round(r%2)===1,l=Math.round(t);return a?l+.5:l},te.makeShapesOptionsAndPlotinfo=function(t,r){var a=t._fullLayout.shapes[r]||{},l=t._fullLayout._plots[a.xref+a.yref],i=!!l;return i?l._hadPlotinfo=!0:(l={},a.xref&&a.xref!=="paper"&&(l.xaxis=t._fullLayout[a.xref+"axis"]),a.yref&&a.yref!=="paper"&&(l.yaxis=t._fullLayout[a.yref+"axis"])),l.xsizemode=a.xsizemode,l.ysizemode=a.ysizemode,l.xanchor=a.xanchor,l.yanchor=a.yanchor,{options:a,plotinfo:l}},te.makeSelectionsOptionsAndPlotinfo=function(t,r){var a=t._fullLayout.selections[r]||{},l=t._fullLayout._plots[a.xref+a.yref],i=!!l;return i?l._hadPlotinfo=!0:(l={},a.xref&&(l.xaxis=t._fullLayout[a.xref+"axis"]),a.yref&&(l.yaxis=t._fullLayout[a.yref+"axis"])),{options:a,plotinfo:l}},te.getPathString=function(t,r){var a=r.type,l=w.getRefType(r.xref),i=w.getRefType(r.yref),s=w.getFromId(t,r.xref),o=w.getFromId(t,r.yref),u=t._fullLayout._size,d,h,y,m,E=P(s,r.x0shift),c=P(s,r.x1shift),_=P(o,r.y0shift),T=P(o,r.y1shift),M,k,b,A;if(s?l==="domain"?h=function(q){return s._offset+s._length*q}:(d=te.shapePositionToRange(s),h=function(q){return s._offset+s.r2p(d(q,!0))}):h=function(q){return u.l+u.w*q},o?i==="domain"?m=function(q){return o._offset+o._length*(1-q)}:(y=te.shapePositionToRange(o),m=function(q){return o._offset+o.r2p(y(q,!0))}):m=function(q){return u.t+u.h*(1-q)},a==="path")return s&&s.type==="date"&&(h=te.decodeDate(h)),o&&o.type==="date"&&(m=te.decodeDate(m)),C(r,h,m);if(r.xsizemode==="pixel"){var g=h(r.xanchor);M=g+r.x0+E,k=g+r.x1+c}else M=h(r.x0)+E,k=h(r.x1)+c;if(r.ysizemode==="pixel"){var f=m(r.yanchor);b=f-r.y0+_,A=f-r.y1+T}else b=m(r.y0)+_,A=m(r.y1)+T;if(a==="line")return"M"+M+","+b+"L"+k+","+A;if(a==="rect")return"M"+M+","+b+"H"+k+"V"+A+"H"+M+"Z";var p=(M+k)/2,x=(b+A)/2,N=Math.abs(p-M),D=Math.abs(x-b),B="A"+N+","+D,U=p+N+","+x,V=p+","+(x-D);return"M"+U+B+" 0 1,1 "+V+B+" 0 0,1 "+U+"Z"};function C(t,r,a){var l=t.path,i=t.xsizemode,s=t.ysizemode,o=t.xanchor,u=t.yanchor;return l.replace(Z.segmentRE,function(d){var h=0,y=d.charAt(0),m=Z.paramIsX[y],E=Z.paramIsY[y],c=Z.numParams[y],_=d.substr(1).replace(Z.paramRE,function(T){return m[h]?i==="pixel"?T=r(o)+Number(T):T=r(T):E[h]&&(s==="pixel"?T=a(u)-Number(T):T=a(T)),h++,h>c&&(T="X"),T});return h>c&&(_=_.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+d)),y+_})}function P(t,r){r=r||0;var a=0;return r&&t&&(t.type==="category"||t.type==="multicategory")&&(a=(t.r2p(1)-t.r2p(0))*r),a}}}),lA=Ne({"src/components/shapes/display_labels.js"(te,Z){var v=In(),w=Os(),C=uc(),P=zs(),t=im().readPaths,r=Ay(),a=r.getPathString,l=Fv(),i=bd().FROM_TL;Z.exports=function(d,h,y,m){if(m.selectAll(".shape-label").remove(),!!(y.label.text||y.label.texttemplate)){var E;if(y.label.texttemplate){var c={};if(y.type!=="path"){var _=w.getFromId(d,y.xref),T=w.getFromId(d,y.yref);for(var M in l){var k=l[M](y,_,T);k!==void 0&&(c[M]=k)}}E=v.texttemplateStringForShapes({data:[c],fallback:y.label.texttemplatefallback,locale:d._fullLayout._d3locale,template:y.label.texttemplate})}else E=y.label.text;var b={"data-index":h},A=y.label.font,g={"data-notex":1},f=m.append("g").attr(b).classed("shape-label",!0),p=f.append("text").attr(g).classed("shape-label-text",!0).text(E),x,N,D,B;if(y.path){var U=a(d,y),V=t(U,d);x=1/0,D=1/0,N=-1/0,B=-1/0;for(var q=0;q<V.length;q++)for(var z=0;z<V[q].length;z++)for(var H=V[q][z],G=1;G<H.length;G+=2){var J=H[G],le=H[G+1];x=Math.min(x,J),N=Math.max(N,J),D=Math.min(D,le),B=Math.max(B,le)}}else{var ye=w.getFromId(d,y.xref),de=y.x0shift,me=y.x1shift,W=w.getRefType(y.xref),ie=w.getFromId(d,y.yref),se=y.y0shift,ee=y.y1shift,pe=w.getRefType(y.yref),oe=function(Ve,rt){var pt=r.getDataToPixel(d,ye,rt,!1,W);return pt(Ve)},Y=function(Ve,rt){var pt=r.getDataToPixel(d,ie,rt,!0,pe);return pt(Ve)};x=oe(y.x0,de),N=oe(y.x1,me),D=Y(y.y0,se),B=Y(y.y1,ee)}var ce=y.label.textangle;ce==="auto"&&(y.type==="line"?ce=s(x,D,N,B):ce=0),p.call(function(Ve){return Ve.call(P.font,A).attr({}),C.convertToTspans(Ve,d),Ve});var ue=P.bBox(p.node()),_e=o(x,D,N,B,y,ce,ue),Le=_e.textx,ze=_e.texty,Ge=_e.xanchor;p.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Ge],y:ze,x:Le,transform:"rotate("+ce+","+Le+","+ze+")"}).call(C.positionText,Le,ze)}};function s(u,d,h,y){var m,E;return E=Math.abs(h-u),h>=u?m=d-y:m=y-d,-180/Math.PI*Math.atan2(m,E)}function o(u,d,h,y,m,E,c){var _=m.label.textposition,T=m.label.textangle,M=m.label.padding,k=m.type,b=Math.PI/180*E,A=Math.sin(b),g=Math.cos(b),f=m.label.xanchor,p=m.label.yanchor,x,N,D,B;if(k==="line"){_==="start"?(x=u,N=d):_==="end"?(x=h,N=y):(x=(u+h)/2,N=(d+y)/2),f==="auto"&&(_==="start"?T==="auto"?h>u?f="left":h<u?f="right":f="center":h>u?f="right":h<u?f="left":f="center":_==="end"?T==="auto"?h>u?f="right":h<u?f="left":f="center":h>u?f="left":h<u?f="right":f="center":f="center");var U={left:1,center:0,right:-1},V={bottom:-1,middle:0,top:1};if(T==="auto"){var q=V[p];D=-M*A*q,B=M*g*q}else{var z=U[f],H=V[p];D=M*z,B=M*H}x=x+D,N=N+B}else D=M+3,_.indexOf("right")!==-1?(x=Math.max(u,h)-D,f==="auto"&&(f="right")):_.indexOf("left")!==-1?(x=Math.min(u,h)+D,f==="auto"&&(f="left")):(x=(u+h)/2,f==="auto"&&(f="center")),_.indexOf("top")!==-1?N=Math.min(d,y):_.indexOf("bottom")!==-1?N=Math.max(d,y):N=(d+y)/2,B=M,p==="bottom"?N=N-B:p==="top"&&(N=N+B);var G=i[p],J=m.label.font.size,le=c.height,ye=(le*G-J)*A,de=-(le*G-J)*g;return{textx:x+ye,texty:N+de,xanchor:f}}}}),Sg=Ne({"src/components/shapes/display_outlines.js"(te,Z){var v=In(),w=v.strTranslate,C=Bv(),P=Pm(),t=P.drawMode,r=P.selectMode,a=Xo(),l=io(),i=Ow(),s=i.i000,o=i.i090,u=i.i180,d=i.i270,h=_y(),y=h.clearOutlineControllers,m=im(),E=m.pointsOnRectangle,c=m.pointsOnEllipse,_=m.writePaths,T=sA().newShapes,M=sA().createShapeObj,k=fM(),b=lA();Z.exports=function p(x,N,D,B){B||(B=0);var U=D.gd;function V(){p(x,N,D,B++),(c(x[0])||D.hasText)&&q({redrawing:!0})}function q(ht){var lt={};D.isActiveShape!==void 0&&(D.isActiveShape=!1,lt=T(N,D)),D.isActiveSelection!==void 0&&(D.isActiveSelection=!1,lt=k(N,D),U._fullLayout._reselect=!0),Object.keys(lt).length&&a.call((ht||{}).redrawing?"relayout":"_guiRelayout",U,lt)}var z=U._fullLayout,H=z._zoomlayer,G=D.dragmode,J=t(G),le=r(G);(J||le)&&(U._fullLayout._outlining=!0),y(U),N.attr("d",_(x));var ye,de,me,W,ie;if(!B&&(D.isActiveShape||D.isActiveSelection)){ie=A([],x);var se=H.append("g").attr("class","outline-controllers");Le(se),gt()}if(J&&D.hasText){var ee=H.select(".label-temp"),pe=M(N,D,D.dragmode);b(U,"label-temp",pe,ee)}function oe(ht){me=+ht.srcElement.getAttribute("data-i"),W=+ht.srcElement.getAttribute("data-j"),ye[me][W].moveFn=Y}function Y(ht,lt){if(x.length){var Fe=ie[me][W][1],Pe=ie[me][W][2],be=x[me],Ye=be.length;if(E(be)){var mt=ht,bt=lt;if(D.isActiveSelection){var ft=g(be,W);ft[1]===be[W][1]?bt=0:mt=0}for(var Wt=0;Wt<Ye;Wt++)if(Wt!==W){var Zt=be[Wt];Zt[1]===be[W][1]&&(Zt[1]=Fe+mt),Zt[2]===be[W][2]&&(Zt[2]=Pe+bt)}if(be[W][1]=Fe+mt,be[W][2]=Pe+bt,!E(be))for(var cr=0;cr<Ye;cr++)for(var pr=0;pr<be[cr].length;pr++)be[cr][pr]=ie[me][cr][pr]}else be[W][1]=Fe+ht,be[W][2]=Pe+lt;V()}}function ce(){q()}function ue(){if(x.length&&x[me]&&x[me].length){for(var ht=[],lt=0;lt<x[me].length;lt++)lt!==W&&ht.push(x[me][lt]);ht.length>1&&!(ht.length===2&&ht[1][0]==="Z")&&(W===0&&(ht[0][0]="M"),x[me]=ht,V(),q())}}function _e(ht,lt){if(ht===2){me=+lt.srcElement.getAttribute("data-i"),W=+lt.srcElement.getAttribute("data-j");var Fe=x[me];!E(Fe)&&!c(Fe)&&ue()}}function Le(ht){ye=[];for(var lt=0;lt<x.length;lt++){var Fe=x[lt],Pe=E(Fe),be=!Pe&&c(Fe);ye[lt]=[];for(var Ye=Fe.length,mt=0;mt<Ye;mt++)if(Fe[mt][0]!=="Z"&&!(be&&mt!==s&&mt!==o&&mt!==u&&mt!==d)){var bt=Pe&&D.isActiveSelection,ft;bt&&(ft=g(Fe,mt));var Wt=Fe[mt][1],Zt=Fe[mt][2],cr=ht.append(bt?"rect":"circle").attr("data-i",lt).attr("data-j",mt).style({fill:l.background,stroke:l.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(bt){var pr=ft[1]-Wt,Br=ft[2]-Zt,Fr=Br?5:Math.max(Math.min(25,Math.abs(pr)-5),5),cn=pr?5:Math.max(Math.min(25,Math.abs(Br)-5),5);cr.classed(Br?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",Fr).attr("height",cn).attr("x",Wt-Fr/2).attr("y",Zt-cn/2).attr("transform",w(pr/2,Br/2))}else cr.classed("cursor-grab",!0).attr("r",5).attr("cx",Wt).attr("cy",Zt);ye[lt][mt]={element:cr.node(),gd:U,prepFn:oe,doneFn:ce,clickFn:_e},C.init(ye[lt][mt])}}}function ze(ht,lt){if(x.length)for(var Fe=0;Fe<x.length;Fe++)for(var Pe=0;Pe<x[Fe].length;Pe++)for(var be=0;be+2<x[Fe][Pe].length;be+=2)x[Fe][Pe][be+1]=ie[Fe][Pe][be+1]+ht,x[Fe][Pe][be+2]=ie[Fe][Pe][be+2]+lt}function Ge(ht,lt){ze(ht,lt),V()}function Ve(ht){me=+ht.srcElement.getAttribute("data-i"),me||(me=0),de[me].moveFn=Ge}function rt(){q()}function pt(ht){ht===2&&f(U)}function gt(){if(de=[],!!x.length){var ht=0;de[ht]={element:N[0][0],gd:U,prepFn:Ve,doneFn:rt,clickFn:pt},C.init(de[ht])}}};function A(p,x){for(var N=0;N<x.length;N++){var D=x[N];p[N]=[];for(var B=0;B<D.length;B++){p[N][B]=[];for(var U=0;U<D[B].length;U++)p[N][B][U]=D[B][U]}}return p}function g(p,x){var N=p[x][1],D=p[x][2],B=p.length,U,V,q;return U=(x+1)%B,V=p[U][1],q=p[U][2],V===N&&q===D&&(U=(x+2)%B,V=p[U][1],q=p[U][2]),[U,V,q]}function f(p){if(r(p._fullLayout.dragmode)){y(p);var x=p._fullLayout._activeSelectionIndex,N=(p.layout||{}).selections||[];if(x<N.length){for(var D=[],B=0;B<N.length;B++)B!==x&&D.push(N[B]);delete p._fullLayout._activeSelectionIndex;var U=p._fullLayout.selections[x];p._fullLayout._deselect={xref:U.xref,yref:U.yref},a.call("_guiRelayout",p,{selections:D})}}}}}),Eg=Ne({"src/components/shapes/draw.js"(te,Z){var v=xn(),w=Xo(),C=In(),P=Os(),t=im().readPaths,r=Sg(),a=lA(),l=_y().clearOutlineControllers,i=io(),s=zs(),o=Tu().arrayEditor,u=Bv(),d=km(),h=Nw(),y=Ay(),m=y.getPathString;Z.exports={draw:E,drawOne:T,eraseActiveShape:f,drawLabel:a};function E(p){var x=p._fullLayout;x._shapeUpperLayer.selectAll("path").remove(),x._shapeLowerLayer.selectAll("path").remove(),x._shapeUpperLayer.selectAll("text").remove(),x._shapeLowerLayer.selectAll("text").remove();for(var N in x._plots){var D=x._plots[N].shapelayer;D&&(D.selectAll("path").remove(),D.selectAll("text").remove())}for(var B=0;B<x.shapes.length;B++)x.shapes[B].visible===!0&&T(p,B)}function c(p){return!!p._fullLayout._outlining}function _(p){return!p._context.edits.shapePosition}function T(p,x){p._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+x+'"]').remove();var N=y.makeShapesOptionsAndPlotinfo(p,x),D=N.options,B=N.plotinfo;if(!D._input||D.visible!==!0)return;if(D.layer==="above")V(p._fullLayout._shapeUpperLayer);else if(D.xref==="paper"||D.yref==="paper")V(p._fullLayout._shapeLowerLayer);else if(D.layer==="between")V(B.shapelayerBetween);else if(B._hadPlotinfo){var U=B.mainplotinfo||B;V(U.shapelayer)}else V(p._fullLayout._shapeLowerLayer);function V(q){var z=m(p,D),H={"data-index":x,"fill-rule":D.fillrule,d:z},G=D.opacity,J=D.fillcolor,le=D.line.width?D.line.color:"rgba(0,0,0,0)",ye=D.line.width,de=D.line.dash;!ye&&D.editable===!0&&(ye=5,de="solid");var me=z[z.length-1]!=="Z",W=_(p)&&D.editable&&p._fullLayout._activeShapeIndex===x;W&&(J=me?"rgba(0,0,0,0)":p._fullLayout.activeshape.fillcolor,G=p._fullLayout.activeshape.opacity);var ie=q.append("g").classed("shape-group",!0).attr({"data-index":x}),se=ie.append("path").attr(H).style("opacity",G).call(i.stroke,le).call(i.fill,J).call(s.dashLine,de,ye);M(ie,p,D),a(p,x,D,ie);var ee;if((W||p._context.edits.shapePosition)&&(ee=o(p.layout,"shapes",D)),W){se.style({cursor:"move"});var pe={element:se.node(),plotinfo:B,gd:p,editHelpers:ee,hasText:D.label.text||D.label.texttemplate,isActiveShape:!0},oe=t(z,p);r(oe,se,pe)}else p._context.edits.shapePosition?k(p,se,D,x,q,ee):D.editable===!0&&se.style("pointer-events",me||i.opacity(J)*G<=.5?"stroke":"all");se.node().addEventListener("click",function(){return A(p,se)})}}function M(p,x,N){var D=(N.xref+N.yref).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");s.setClipUrl(p,D?"clip"+x._fullLayout._uid+D:null,x)}function k(p,x,N,D,B,U){var V=10,q=10,z=N.xsizemode==="pixel",H=N.ysizemode==="pixel",G=N.type==="line",J=N.type==="path",le=U.modifyItem,ye,de,me,W,ie,se,ee,pe,oe,Y,ce,ue,_e,Le,ze,Ge=v.select(x.node().parentNode),Ve=P.getFromId(p,N.xref),rt=P.getRefType(N.xref),pt=P.getFromId(p,N.yref),gt=P.getRefType(N.yref),ht=N.x0shift,lt=N.x1shift,Fe=N.y0shift,Pe=N.y1shift,be=function(Ee,Ae){var Ie=y.getDataToPixel(p,Ve,Ae,!1,rt);return Ie(Ee)},Ye=function(Ee,Ae){var Ie=y.getDataToPixel(p,pt,Ae,!0,gt);return Ie(Ee)},mt=y.getPixelToData(p,Ve,!1,rt),bt=y.getPixelToData(p,pt,!0,gt),ft=cr(),Wt={element:ft.node(),gd:p,prepFn:Fr,doneFn:cn,clickFn:Nr},Zt;u.init(Wt),ft.node().onmousemove=Br;function cr(){return G?pr():x}function pr(){var Ee=10,Ae=Math.max(N.line.width,Ee),Ie=B.append("g").attr("data-index",D).attr("drag-helper",!0);Ie.append("path").attr("d",x.attr("d")).style({cursor:"move","stroke-width":Ae,"stroke-opacity":"0"});var tt={"fill-opacity":"0"},st=Math.max(Ae/2,Ee);return Ie.append("circle").attr({"data-line-point":"start-point",cx:z?be(N.xanchor)+N.x0:be(N.x0,ht),cy:H?Ye(N.yanchor)-N.y0:Ye(N.y0,Fe),r:st}).style(tt).classed("cursor-grab",!0),Ie.append("circle").attr({"data-line-point":"end-point",cx:z?be(N.xanchor)+N.x1:be(N.x1,lt),cy:H?Ye(N.yanchor)-N.y1:Ye(N.y1,Pe),r:st}).style(tt).classed("cursor-grab",!0),Ie}function Br(Ee){if(c(p)){Zt=null;return}if(G)Ee.target.tagName==="path"?Zt="move":Zt=Ee.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Ae=Wt.element.getBoundingClientRect(),Ie=Ae.right-Ae.left,tt=Ae.bottom-Ae.top,st=Ee.clientX-Ae.left,Ft=Ee.clientY-Ae.top,Nt=!J&&Ie>V&&tt>q&&!Ee.shiftKey?u.getCursor(st/Ie,1-Ft/tt):"move";d(x,Nt),Zt=Nt.split("-")[0]}}function Fr(Ee){c(p)||(z&&(ie=be(N.xanchor)),H&&(se=Ye(N.yanchor)),N.type==="path"?ze=N.path:(ye=z?N.x0:be(N.x0),de=H?N.y0:Ye(N.y0),me=z?N.x1:be(N.x1),W=H?N.y1:Ye(N.y1)),ye<me?(oe=ye,_e="x0",Y=me,Le="x1"):(oe=me,_e="x1",Y=ye,Le="x0"),!H&&de<W||H&&de>W?(ee=de,ce="y0",pe=W,ue="y1"):(ee=W,ce="y1",pe=de,ue="y0"),Br(Ee),$e(B,N),De(x,N,p),Wt.moveFn=Zt==="move"?Jr:Dt,Wt.altKey=Ee.altKey)}function cn(){c(p)||(d(x),ot(B),M(x,p,N),w.call("_guiRelayout",p,U.getUpdateObj()))}function Nr(){c(p)||ot(B)}function Jr(Ee,Ae){if(N.type==="path"){var Ie=function(Ft){return Ft},tt=Ie,st=Ie;z?le("xanchor",N.xanchor=mt(ie+Ee)):(tt=function(Nt){return mt(be(Nt)+Ee)},Ve&&Ve.type==="date"&&(tt=y.encodeDate(tt))),H?le("yanchor",N.yanchor=bt(se+Ae)):(st=function(Nt){return bt(Ye(Nt)+Ae)},pt&&pt.type==="date"&&(st=y.encodeDate(st))),le("path",N.path=b(ze,tt,st))}else z?le("xanchor",N.xanchor=mt(ie+Ee)):(le("x0",N.x0=mt(ye+Ee)),le("x1",N.x1=mt(me+Ee))),H?le("yanchor",N.yanchor=bt(se+Ae)):(le("y0",N.y0=bt(de+Ae)),le("y1",N.y1=bt(W+Ae)));x.attr("d",m(p,N)),$e(B,N),a(p,D,N,Ge)}function Dt(Ee,Ae){if(J){var Ie=function(ea){return ea},tt=Ie,st=Ie;z?le("xanchor",N.xanchor=mt(ie+Ee)):(tt=function(Za){return mt(be(Za)+Ee)},Ve&&Ve.type==="date"&&(tt=y.encodeDate(tt))),H?le("yanchor",N.yanchor=bt(se+Ae)):(st=function(Za){return bt(Ye(Za)+Ae)},pt&&pt.type==="date"&&(st=y.encodeDate(st))),le("path",N.path=b(ze,tt,st))}else if(G){if(Zt==="resize-over-start-point"){var Ft=ye+Ee,Nt=H?de-Ae:de+Ae;le("x0",N.x0=z?Ft:mt(Ft)),le("y0",N.y0=H?Nt:bt(Nt))}else if(Zt==="resize-over-end-point"){var Xt=me+Ee,lr=H?W-Ae:W+Ae;le("x1",N.x1=z?Xt:mt(Xt)),le("y1",N.y1=H?lr:bt(lr))}}else{var Rr=function(ea){return Zt.indexOf(ea)!==-1},Mr=Rr("n"),Sr=Rr("s"),Kr=Rr("w"),qn=Rr("e"),ha=Mr?ee+Ae:ee,ia=Sr?pe+Ae:pe,xa=Kr?oe+Ee:oe,ba=qn?Y+Ee:Y;H&&(Mr&&(ha=ee-Ae),Sr&&(ia=pe-Ae)),(!H&&ia-ha>q||H&&ha-ia>q)&&(le(ce,N[ce]=H?ha:bt(ha)),le(ue,N[ue]=H?ia:bt(ia))),ba-xa>V&&(le(_e,N[_e]=z?xa:mt(xa)),le(Le,N[Le]=z?ba:mt(ba)))}x.attr("d",m(p,N)),$e(B,N),a(p,D,N,Ge)}function $e(Ee,Ae){(z||H)&&Ie();function Ie(){var tt=Ae.type!=="path",st=Ee.selectAll(".visual-cue").data([0]),Ft=1;st.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ft}).classed("visual-cue",!0);var Nt=be(z?Ae.xanchor:C.midRange(tt?[Ae.x0,Ae.x1]:y.extractPathCoords(Ae.path,h.paramIsX))),Xt=Ye(H?Ae.yanchor:C.midRange(tt?[Ae.y0,Ae.y1]:y.extractPathCoords(Ae.path,h.paramIsY)));if(Nt=y.roundPositionForSharpStrokeRendering(Nt,Ft),Xt=y.roundPositionForSharpStrokeRendering(Xt,Ft),z&&H){var lr="M"+(Nt-1-Ft)+","+(Xt-1-Ft)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";st.attr("d",lr)}else if(z){var Rr="M"+(Nt-1-Ft)+","+(Xt-9-Ft)+"v18 h2 v-18 Z";st.attr("d",Rr)}else{var Mr="M"+(Nt-9-Ft)+","+(Xt-1-Ft)+"h18 v2 h-18 Z";st.attr("d",Mr)}}}function ot(Ee){Ee.selectAll(".visual-cue").remove()}function De(Ee,Ae,Ie){var tt=Ae.xref,st=Ae.yref,Ft=P.getFromId(Ie,tt),Nt=P.getFromId(Ie,st),Xt="";tt!=="paper"&&!Ft.autorange&&(Xt+=tt),st!=="paper"&&!Nt.autorange&&(Xt+=st),s.setClipUrl(Ee,Xt?"clip"+Ie._fullLayout._uid+Xt:null,Ie)}}function b(p,x,N){return p.replace(h.segmentRE,function(D){var B=0,U=D.charAt(0),V=h.paramIsX[U],q=h.paramIsY[U],z=h.numParams[U],H=D.substr(1).replace(h.paramRE,function(G){return B>=z||(V[B]?G=x(G):q[B]&&(G=N(G)),B++),G});return U+H})}function A(p,x){if(_(p)){var N=x.node(),D=+N.getAttribute("data-index");if(D>=0){if(D===p._fullLayout._activeShapeIndex){g(p);return}p._fullLayout._activeShapeIndex=D,p._fullLayout._deactivateShape=g,E(p)}}}function g(p){if(_(p)){var x=p._fullLayout._activeShapeIndex;x>=0&&(l(p),delete p._fullLayout._activeShapeIndex,E(p))}}function f(p){if(_(p)){l(p);var x=p._fullLayout._activeShapeIndex,N=(p.layout||{}).shapes||[];if(x<N.length){for(var D=[],B=0;B<N.length;B++)B!==x&&D.push(N[B]);return delete p._fullLayout._activeShapeIndex,w.call("_guiRelayout",p,{shapes:D})}}}}}),hM=Ne({"src/components/modebar/buttons.js"(te,Z){var v=Xo(),w=uf(),C=Hf(),P=Dw(),t=Eg().eraseActiveShape,r=In(),a=r._,l=Z.exports={};l.toImage={name:"toImage",title:function(k){var b=k._context.toImageButtonOptions||{},A=b.format||"png";return A==="png"?a(k,"Download plot as a PNG"):a(k,"Download plot")},icon:P.camera,click:function(k){var b=k._context.toImageButtonOptions,A={format:b.format||"png"};r.notifier(a(k,"Taking snapshot - this may take a few seconds"),"long"),["filename","width","height","scale"].forEach(function(g){g in b&&(A[g]=b[g])}),v.call("downloadImage",k,A).then(function(g){r.notifier(a(k,"Snapshot succeeded")+" - "+g,"long")}).catch(function(){r.notifier(a(k,"Sorry, there was a problem downloading your snapshot!"),"long")})}},l.sendDataToCloud={name:"sendDataToCloud",title:function(k){return a(k,"Edit in Chart Studio")},icon:P.disk,click:function(k){w.sendDataToCloud(k)}},l.editInChartStudio={name:"editInChartStudio",title:function(k){return a(k,"Edit in Chart Studio")},icon:P.pencil,click:function(k){w.sendDataToCloud(k)}},l.zoom2d={name:"zoom2d",_cat:"zoom",title:function(k){return a(k,"Zoom")},attr:"dragmode",val:"zoom",icon:P.zoombox,click:i},l.pan2d={name:"pan2d",_cat:"pan",title:function(k){return a(k,"Pan")},attr:"dragmode",val:"pan",icon:P.pan,click:i},l.select2d={name:"select2d",_cat:"select",title:function(k){return a(k,"Box Select")},attr:"dragmode",val:"select",icon:P.selectbox,click:i},l.lasso2d={name:"lasso2d",_cat:"lasso",title:function(k){return a(k,"Lasso Select")},attr:"dragmode",val:"lasso",icon:P.lasso,click:i},l.drawclosedpath={name:"drawclosedpath",title:function(k){return a(k,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:P.drawclosedpath,click:i},l.drawopenpath={name:"drawopenpath",title:function(k){return a(k,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:P.drawopenpath,click:i},l.drawline={name:"drawline",title:function(k){return a(k,"Draw line")},attr:"dragmode",val:"drawline",icon:P.drawline,click:i},l.drawrect={name:"drawrect",title:function(k){return a(k,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:P.drawrect,click:i},l.drawcircle={name:"drawcircle",title:function(k){return a(k,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:P.drawcircle,click:i},l.eraseshape={name:"eraseshape",title:function(k){return a(k,"Erase active shape")},icon:P.eraseshape,click:t},l.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:i},l.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:i},l.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(k){return a(k,"Autoscale")},attr:"zoom",val:"auto",icon:P.autoscale,click:i},l.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(k){return a(k,"Reset axes")},attr:"zoom",val:"reset",icon:P.home,click:i},l.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(k){return a(k,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:P.tooltip_basic,gravity:"ne",click:i},l.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(k){return a(k,"Compare data on hover")},attr:"hovermode",val:function(k){return k._fullLayout._isHoriz?"y":"x"},icon:P.tooltip_compare,gravity:"ne",click:i};function i(k,b){var A=b.currentTarget,g=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout,x={},N=C.list(k,null,!0),D=p._cartesianSpikesEnabled,B,U;if(g==="zoom"){var V=f==="in"?.5:2,q=(1+V)/2,z=(1-V)/2,H,G;for(U=0;U<N.length;U++)if(B=N[U],G=B.modebardisable==="none"||B.modebardisable.indexOf(f==="auto"||f==="reset"?"autoscale":"zoominout")===-1,G&&!B.fixedrange)if(H=B._name,f==="auto")x[H+".autorange"]=!0;else if(f==="reset")B._rangeInitial0===void 0&&B._rangeInitial1===void 0?x[H+".autorange"]=!0:B._rangeInitial0===void 0?(x[H+".autorange"]=B._autorangeInitial,x[H+".range"]=[null,B._rangeInitial1]):B._rangeInitial1===void 0?(x[H+".range"]=[B._rangeInitial0,null],x[H+".autorange"]=B._autorangeInitial):x[H+".range"]=[B._rangeInitial0,B._rangeInitial1],B._showSpikeInitial!==void 0&&(x[H+".showspikes"]=B._showSpikeInitial,D==="on"&&!B._showSpikeInitial&&(D="off"));else{var J=[B.r2l(B.range[0]),B.r2l(B.range[1])],le=[q*J[0]+z*J[1],q*J[1]+z*J[0]];x[H+".range[0]"]=B.l2r(le[0]),x[H+".range[1]"]=B.l2r(le[1])}}else g==="hovermode"&&(f==="x"||f==="y")&&(f=p._isHoriz?"y":"x",A.setAttribute("data-val",f)),x[g]=f;p._cartesianSpikesEnabled=D,v.call("_guiRelayout",k,x)}l.zoom3d={name:"zoom3d",_cat:"zoom",title:function(k){return a(k,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:P.zoombox,click:s},l.pan3d={name:"pan3d",_cat:"pan",title:function(k){return a(k,"Pan")},attr:"scene.dragmode",val:"pan",icon:P.pan,click:s},l.orbitRotation={name:"orbitRotation",title:function(k){return a(k,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:P["3d_rotate"],click:s},l.tableRotation={name:"tableRotation",title:function(k){return a(k,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:P["z-axis"],click:s};function s(k,b){for(var A=b.currentTarget,g=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout._subplots.gl3d||[],x={},N=g.split("."),D=0;D<p.length;D++)x[p[D]+"."+N[1]]=f;var B=f==="pan"?f:"zoom";x.dragmode=B,v.call("_guiRelayout",k,x)}l.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(k){return a(k,"Reset camera to default")},attr:"resetDefault",icon:P.home,click:o},l.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(k){return a(k,"Reset camera to last save")},attr:"resetLastSave",icon:P.movie,click:o};function o(k,b){for(var A=b.currentTarget,g=A.getAttribute("data-attr"),f=g==="resetLastSave",p=g==="resetDefault",x=k._fullLayout,N=x._subplots.gl3d||[],D={},B=0;B<N.length;B++){var U=N[B],V=U+".camera",q=U+".aspectratio",z=U+".aspectmode",H=x[U]._scene,G;f?(D[V+".up"]=H.viewInitial.up,D[V+".eye"]=H.viewInitial.eye,D[V+".center"]=H.viewInitial.center,G=!0):p&&(D[V+".up"]=null,D[V+".eye"]=null,D[V+".center"]=null,G=!0),G&&(D[q+".x"]=H.viewInitial.aspectratio.x,D[q+".y"]=H.viewInitial.aspectratio.y,D[q+".z"]=H.viewInitial.aspectratio.z,D[z]=H.viewInitial.aspectmode)}v.call("_guiRelayout",k,D)}l.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:d};function u(k,b){var A=b.currentTarget,g=A._previousVal,f=k._fullLayout,p=f._subplots.gl3d||[],x=["xaxis","yaxis","zaxis"],N={},D={};if(g)D=g,A._previousVal=null;else{for(var B=0;B<p.length;B++){var U=p[B],V=f[U],q=U+".hovermode";N[q]=V.hovermode,D[q]=!1;for(var z=0;z<3;z++){var H=x[z],G=U+"."+H+".showspikes";D[G]=!1,N[G]=V[H].showspikes}}A._previousVal=N}return D}function d(k,b){var A=u(k,b);v.call("_guiRelayout",k,A)}l.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:h},l.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:h},l.resetGeo={name:"resetGeo",_cat:"reset",title:function(k){return a(k,"Reset")},attr:"reset",val:null,icon:P.autoscale,click:h},l.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:m};function h(k,b){for(var A=b.currentTarget,g=A.getAttribute("data-attr"),f=A.getAttribute("data-val")||!0,p=k._fullLayout,x=p._subplots.geo||[],N=0;N<x.length;N++){var D=x[N],B=p[D];if(g==="zoom"){var U=B.projection.scale,V=f==="in"?2*U:.5*U;v.call("_guiRelayout",k,D+".projection.scale",V)}}g==="reset"&&M(k,"geo")}l.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:P.tooltip_basic,gravity:"ne",click:m};function y(k){var b=k._fullLayout;return b.hovermode?!1:b._has("cartesian")?b._isHoriz?"y":"x":"closest"}function m(k){var b=y(k);v.call("_guiRelayout",k,"hovermode",b)}l.resetViewSankey={name:"resetSankeyGroup",title:function(k){return a(k,"Reset view")},icon:P.home,click:function(k){for(var b={"node.groups":[],"node.x":[],"node.y":[]},A=0;A<k._fullData.length;A++){var g=k._fullData[A]._viewInitial;b["node.groups"].push(g.node.groups.slice()),b["node.x"].push(g.node.x.slice()),b["node.y"].push(g.node.y.slice())}v.call("restyle",k,b)}},l.toggleHover={name:"toggleHover",title:function(k){return a(k,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:P.tooltip_basic,gravity:"ne",click:function(k,b){var A=u(k,b);A.hovermode=y(k),v.call("_guiRelayout",k,A)}},l.resetViews={name:"resetViews",title:function(k){return a(k,"Reset views")},icon:P.home,click:function(k,b){var A=b.currentTarget;A.setAttribute("data-attr","zoom"),A.setAttribute("data-val","reset"),i(k,b),A.setAttribute("data-attr","resetLastSave"),o(k,b),M(k,"geo"),M(k,"mapbox"),M(k,"map")}},l.toggleSpikelines={name:"toggleSpikelines",title:function(k){return a(k,"Toggle Spike Lines")},icon:P.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(k){var b=k._fullLayout,A=b._cartesianSpikesEnabled;b._cartesianSpikesEnabled=A==="on"?"off":"on",v.call("_guiRelayout",k,E(k))}};function E(k){for(var b=k._fullLayout,A=b._cartesianSpikesEnabled==="on",g=C.list(k,null,!0),f={},p=0;p<g.length;p++){var x=g[p];f[x._name+".showspikes"]=A?!0:x._showSpikeInitial}return f}l.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(k){return a(k,"Reset view")},attr:"reset",icon:P.home,click:function(k){M(k,"mapbox")}},l.resetViewMap={name:"resetViewMap",_cat:"resetView",title:function(k){return a(k,"Reset view")},attr:"reset",icon:P.home,click:function(k){M(k,"map")}},l.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:c},l.zoomInMap={name:"zoomInMap",_cat:"zoomin",title:function(k){return a(k,"Zoom in")},attr:"zoom",val:"in",icon:P.zoom_plus,click:_},l.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:c},l.zoomOutMap={name:"zoomOutMap",_cat:"zoomout",title:function(k){return a(k,"Zoom out")},attr:"zoom",val:"out",icon:P.zoom_minus,click:_};function c(k,b){T(k,b,"mapbox")}function _(k,b){T(k,b,"map")}function T(k,b,A){for(var g=b.currentTarget,f=g.getAttribute("data-val"),p=k._fullLayout,x=p._subplots[A]||[],N=1.05,D={},B=0;B<x.length;B++){var U=x[B],V=p[U].zoom,q=f==="in"?N*V:V/N;D[U+".zoom"]=q}v.call("_guiRelayout",k,D)}function M(k,b){for(var A=k._fullLayout,g=A._subplots[b]||[],f={},p=0;p<g.length;p++)for(var x=g[p],N=A[x]._subplot,D=N.viewInitial,B=Object.keys(D),U=0;U<B.length;U++){var V=B[U];f[x+"."+V]=D[V]}v.call("_guiRelayout",k,f)}}}),Ex=Ne({"src/components/modebar/constants.js"(te,Z){var v=hM(),w=Object.keys(v),C=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],P=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(C),t=[],r=function(a){if(P.indexOf(a._cat||a.name)===-1){var l=a.name,i=(a._cat||a.name).toLowerCase();t.indexOf(l)===-1&&t.push(l),t.indexOf(i)===-1&&t.push(i)}};w.forEach(function(a){r(v[a])}),t.sort(),Z.exports={DRAW_MODES:C,backButtons:P,foreButtons:t}}}),uA=Ne({"src/components/modebar/attributes.js"(te,Z){Ex(),Z.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}}}),dM=Ne({"src/components/modebar/defaults.js"(te,Z){var v=In(),w=io(),C=Tu(),P=uA();Z.exports=function(r,a){var l=r.modebar||{},i=C.newContainer(a,"modebar");function s(u,d){return v.coerce(l,i,P,u,d)}s("orientation"),s("bgcolor",w.addOpacity(a.paper_bgcolor,.5));var o=w.contrast(w.rgb(a.modebar.bgcolor));s("color",w.addOpacity(o,.3)),s("activecolor",w.addOpacity(o,.7)),s("uirevision",a.uirevision),s("add"),s("remove")}}}),cA=Ne({"src/components/modebar/modebar.js"(te,Z){var v=xn(),w=la(),C=In(),P=Dw(),t=dn().version,r=new DOMParser;function a(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var l=a.prototype;l.update=function(o,u){this.graphInfo=o;var d=this.graphInfo._context,h=this.graphInfo._fullLayout,y="modebar-"+h._uid;this.element.setAttribute("id",y),this.element.setAttribute("role","toolbar"),this._uid=y,this.element.className="modebar modebar--custom",d.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),h.modebar.orientation==="v"&&(this.element.className+=" vertical",u=u.reverse());var m=h.modebar,E="#"+y+" .modebar-group";document.querySelectorAll(E).forEach(function(k){k.style.backgroundColor=m.bgcolor});var c=!this.hasButtons(u),_=this.hasLogo!==d.displaylogo,T=this.locale!==d.locale;if(this.locale=d.locale,(c||_||T)&&(this.removeAllButtons(),this.updateButtons(u),d.watermark||d.displaylogo)){var M=this.getLogo();d.watermark&&(M.className=M.className+" watermark"),h.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),C.setStyleOnHover("#"+y+" .modebar-btn",".active",".icon path","fill: "+m.activecolor,"fill: "+m.color,this.element)},l.updateButtons=function(o){var u=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(d){var h=u.createGroup();d.forEach(function(y){var m=y.name;if(!m)throw new Error("must provide button 'name' in button config");if(u.buttonsNames.indexOf(m)!==-1)throw new Error("button name '"+m+"' is taken");u.buttonsNames.push(m);var E=u.createButton(y);u.buttonElements.push(E),h.appendChild(E)}),u.element.appendChild(h)})},l.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var u=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=u.bgcolor,o},l.createButton=function(o){var u=this,d=document.createElement("button");d.setAttribute("type","button"),d.setAttribute("rel","tooltip"),d.className="modebar-btn";var h=o.title;h===void 0?h=o.name:typeof h=="function"&&(h=h(this.graphInfo)),(h||h===0)&&(d.setAttribute("data-title",h),d.setAttribute("aria-label",h)),o.attr!==void 0&&d.setAttribute("data-attr",o.attr);var y=o.val;y!==void 0&&(typeof y=="function"&&(y=y(this.graphInfo)),d.setAttribute("data-val",y));var m=o.click;if(typeof m!="function")throw new Error("must provide button 'click' function in button config");d.addEventListener("click",function(c){o.click(u.graphInfo,c),u.updateActiveButton(c.currentTarget)}),d.setAttribute("data-toggle",o.toggle||!1),o.toggle&&v.select(d).classed("active",!0);var E=o.icon;return typeof E=="function"?d.appendChild(E()):d.appendChild(this.createIcon(E||P.question)),d.setAttribute("data-gravity",o.gravity||"n"),d},l.createIcon=function(o){var u=w(o.height)?Number(o.height):o.ascent-o.descent,d="http://www.w3.org/2000/svg",h;if(o.path){h=document.createElementNS(d,"svg"),h.setAttribute("viewBox",[0,0,o.width,u].join(" ")),h.setAttribute("class","icon");var y=document.createElementNS(d,"path");y.setAttribute("d",o.path),o.transform?y.setAttribute("transform",o.transform):o.ascent!==void 0&&y.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),h.appendChild(y)}if(o.svg){var m=r.parseFromString(o.svg,"application/xml");h=m.childNodes[0]}return h.setAttribute("height","1em"),h.setAttribute("width","1em"),h},l.updateActiveButton=function(o){var u=this.graphInfo._fullLayout,d=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(h){var y=h.getAttribute("data-val")||!0,m=h.getAttribute("data-attr"),E=h.getAttribute("data-toggle")==="true",c=v.select(h),_=function(k,b){var A=u.modebar,g=k.querySelector(".icon path");g&&(b||k.matches(":hover")?g.style.fill=A.activecolor:g.style.fill=A.color)};if(E){if(m===d){var T=!c.classed("active");c.classed("active",T),_(h,T)}}else{var M=m===null?m:C.nestedProperty(u,m).get();c.classed("active",M===y),_(h,M===y)}})},l.hasButtons=function(o){var u=this.buttons;if(!u||o.length!==u.length)return!1;for(var d=0;d<o.length;++d){if(o[d].length!==u[d].length)return!1;for(var h=0;h<o[d].length;h++)if(o[d][h].name!==u[d][h].name)return!1}return!0};function i(o){return o+" (v"+t+")"}l.getLogo=function(){var o=this.createGroup(),u=document.createElement("a");return u.href="https://plotly.com/",u.target="_blank",u.setAttribute("data-title",i(C._(this.graphInfo,"Produced with Plotly.js"))),u.className="modebar-btn plotlyjsicon modebar-btn--logo",u.appendChild(this.createIcon(P.newplotlylogo)),o.appendChild(u),o},l.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},l.destroy=function(){C.removeElement(this.container.querySelector(".modebar"))};function s(o,u){var d=o._fullLayout,h=new a({graphInfo:o,container:d._modebardiv.node(),buttons:u});return d._privateplot&&v.select(h.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),h}Z.exports=s}}),fA=Ne({"src/components/modebar/manage.js"(te,Z){var v=Hf(),w=vu(),C=Xo(),P=_v().isUnifiedHover,t=cA(),r=hM(),a=Ex().DRAW_MODES,l=In().extendDeep;Z.exports=function(m){var E=m._fullLayout,c=m._context,_=E._modeBar;if(!c.displayModeBar&&!c.watermark){_&&(_.destroy(),delete E._modeBar);return}if(!Array.isArray(c.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(c.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var T=c.modeBarButtons,M;Array.isArray(T)&&T.length?M=h(T):!c.displayModeBar&&c.watermark?M=[]:M=i(m),_?_.update(m,M):E._modeBar=t(m,M)};function i(y){var m=y._fullLayout,E=y._fullData,c=y._context;function _(Y,ce){if(typeof ce=="string"){if(ce.toLowerCase()===Y.toLowerCase())return!0}else{var ue=ce.name,_e=ce._cat||ce.name;if(ue===Y||_e===Y.toLowerCase())return!0}return!1}var T=m.modebar.add;typeof T=="string"&&(T=[T]);var M=m.modebar.remove;typeof M=="string"&&(M=[M]);var k=c.modeBarButtonsToAdd.concat(T.filter(function(Y){for(var ce=0;ce<c.modeBarButtonsToRemove.length;ce++)if(_(Y,c.modeBarButtonsToRemove[ce]))return!1;return!0})),b=c.modeBarButtonsToRemove.concat(M.filter(function(Y){for(var ce=0;ce<c.modeBarButtonsToAdd.length;ce++)if(_(Y,c.modeBarButtonsToAdd[ce]))return!1;return!0})),A=m._has("cartesian"),g=m._has("gl3d"),f=m._has("geo"),p=m._has("pie"),x=m._has("funnelarea"),N=m._has("ternary"),D=m._has("mapbox"),B=m._has("map"),U=m._has("polar"),V=m._has("smith"),q=m._has("sankey"),z=s(m),H=P(m.hovermode),G=[];function J(Y){if(Y.length){for(var ce=[],ue=0;ue<Y.length;ue++){for(var _e=Y[ue],Le=r[_e],ze=Le.name.toLowerCase(),Ge=(Le._cat||Le.name).toLowerCase(),Ve=!1,rt=0;rt<b.length;rt++){var pt=b[rt].toLowerCase();if(pt===ze||pt===Ge){Ve=!0;break}}Ve||ce.push(r[_e])}G.push(ce)}}var le=["toImage"];c.showEditInChartStudio?le.push("editInChartStudio"):c.showSendToCloud&&le.push("sendDataToCloud"),J(le);var ye=[],de=[],me=[],W=[];(A||p||x||N)+f+g+D+B+U+V>1?(de=["toggleHover"],me=["resetViews"]):f?(ye=["zoomInGeo","zoomOutGeo"],de=["hoverClosestGeo"],me=["resetGeo"]):g?(de=["hoverClosest3d"],me=["resetCameraDefault3d","resetCameraLastSave3d"]):D?(ye=["zoomInMapbox","zoomOutMapbox"],de=["toggleHover"],me=["resetViewMapbox"]):B?(ye=["zoomInMap","zoomOutMap"],de=["toggleHover"],me=["resetViewMap"]):p?de=["hoverClosestPie"]:q?(de=["hoverClosestCartesian","hoverCompareCartesian"],me=["resetViewSankey"]):de=["toggleHover"],A&&de.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(u(E)||H)&&(de=[]),A&&!z&&(ye=["zoomIn2d","zoomOut2d","autoScale2d"],me[0]!=="resetViews"&&(me=["resetScale2d"])),g?W=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!z||N?W=["zoom2d","pan2d"]:D||B||f?W=["pan2d"]:U&&(W=["zoom2d"]),o(E)&&W.push("select2d","lasso2d");var ie=[],se=function(Y){ie.indexOf(Y)===-1&&de.indexOf(Y)!==-1&&ie.push(Y)};if(Array.isArray(k)){for(var ee=[],pe=0;pe<k.length;pe++){var oe=k[pe];typeof oe=="string"?(oe=oe.toLowerCase(),a.indexOf(oe)!==-1?(m._has("mapbox")||m._has("map")||m._has("cartesian"))&&W.push(oe):oe==="togglespikelines"?se("toggleSpikelines"):oe==="togglehover"?se("toggleHover"):oe==="hovercompare"?se("hoverCompareCartesian"):oe==="hoverclosest"?(se("hoverClosestCartesian"),se("hoverClosestGeo"),se("hoverClosest3d"),se("hoverClosestPie")):oe==="v1hovermode"&&(se("hoverClosestCartesian"),se("hoverCompareCartesian"),se("hoverClosestGeo"),se("hoverClosest3d"),se("hoverClosestPie"))):ee.push(oe)}k=ee}return J(W),J(ye.concat(me)),J(ie),d(G,k)}function s(y){for(var m=v.list({_fullLayout:y},null,!0),E=0;E<m.length;E++){var c=m[E].modebardisable;if(!m[E].fixedrange&&c!=="autoscale+zoominout"&&c!=="zoominout+autoscale")return!1}return!0}function o(y){for(var m=!1,E=0;E<y.length&&!m;E++){var c=y[E];!c._module||!c._module.selectPoints||(C.traceIs(c,"scatter-like")?(w.hasMarkers(c)||w.hasText(c))&&(m=!0):C.traceIs(c,"box-violin")?(c.boxpoints==="all"||c.points==="all")&&(m=!0):m=!0)}return m}function u(y){for(var m=0;m<y.length;m++)if(!C.traceIs(y[m],"noHover"))return!1;return!0}function d(y,m){if(m.length)if(Array.isArray(m[0]))for(var E=0;E<m.length;E++)y.push(m[E]);else y.push(m);return y}function h(y){for(var m=l([],y),E=0;E<m.length;E++)for(var c=m[E],_=0;_<c.length;_++){var T=c[_];if(typeof T=="string")if(r[T]!==void 0)m[E][_]=r[T];else throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "))}return m}}}),hA=Ne({"src/components/modebar/index.js"(te,Z){Z.exports={moduleType:"component",name:"modebar",layoutAttributes:uA(),supplyLayoutDefaults:dM(),manage:fA()}}}),dA=Ne({"src/plots/cartesian/scale_zoom.js"(te,Z){var v=bd().FROM_BL;Z.exports=function(C,P,t){t===void 0&&(t=v[C.constraintoward||"center"]);var r=[C.r2l(C.range[0]),C.r2l(C.range[1])],a=r[0]+(r[1]-r[0])*t;C.range=C._input.range=[C.l2r(a+(r[0]-a)*P),C.l2r(a+(r[1]-a)*P)],C.setScale()}}}),Mg=Ne({"src/plots/cartesian/constraints.js"(te){var Z=In(),v=Cm(),w=Hf().id2name,C=wd(),P=dA(),t=qp(),r=ja().ALMOST_EQUAL,a=bd().FROM_BL;te.handleDefaults=function(y,m,E){var c=E.axIds,_=E.axHasImage,T=m._axisConstraintGroups=[],M=m._axisMatchGroups=[],k,b,A,g,f,p,x,N;for(k=0;k<c.length;k++)g=w(c[k]),f=y[g],p=m[g],l(f,p,{axIds:c,layoutOut:m,hasImage:_[g]});function D(le,ye){for(k=0;k<le.length;k++){b=le[k];for(A in b)m[w(A)][ye]=b}}for(D(M,"_matchGroup"),k=0;k<T.length;k++){b=T[k];for(A in b)if(p=m[w(A)],p.fixedrange){for(var B in b){var U=w(B);(y[U]||{}).fixedrange===!1&&Z.warn("fixedrange was specified as false for axis "+U+" but was overridden because another axis in its constraint group has fixedrange true"),m[U].fixedrange=!0}break}}for(k=0;k<T.length;){b=T[k];for(A in b){p=m[w(A)],p._matchGroup&&Object.keys(p._matchGroup).length===Object.keys(b).length&&(T.splice(k,1),k--);break}k++}D(T,"_constraintGroup");var V=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],q=!1,z=!1;function H(){N=p[x],x==="rangebreaks"&&(z=p._hasDayOfWeekBreaks)}for(k=0;k<M.length;k++){b=M[k];for(var G=0;G<V.length;G++){x=V[G],N=null;var J;for(A in b)if(g=w(A),f=y[g],p=m[g],x in p){if(!p.matches&&(J=p,x in f)){H();break}N===null&&x in f&&H()}if(x==="range"&&N&&f.range&&f.range.length===2&&f.range[0]!==null&&f.range[1]!==null&&(q=!0),x==="autorange"&&N===null&&q&&(N=!1),N===null&&x in J&&(N=J[x]),N!==null)for(A in b)p=m[w(A)],p[x]=x==="range"?N.slice():N,x==="rangebreaks"&&(p._hasDayOfWeekBreaks=z,t(p,m))}}};function l(y,m,E){var c=E.axIds,_=E.layoutOut,T=E.hasImage,M=_._axisConstraintGroups,k=_._axisMatchGroups,b=m._id,A=b.charAt(0),g=((_._splomAxes||{})[A]||{})[b]||{},f=m._id,p=f.charAt(0)==="x";m._matchGroup=null,m._constraintGroup=null;function x(W,ie){return Z.coerce(y,m,C,W,ie)}x("constrain",T?"domain":"range"),Z.coerce(y,m,{constraintoward:{valType:"enumerated",values:p?["left","center","right"]:["bottom","middle","top"],dflt:p?"center":"middle"}},"constraintoward");var N=m.type,D,B,U=[];for(D=0;D<c.length;D++)if(B=c[D],B!==f){var V=_[w(B)];V.type===N&&U.push(B)}var q=s(M,f);if(q){var z=[];for(D=0;D<U.length;D++)B=U[D],q[B]||z.push(B);U=z}var H=U.length,G,J;H&&(y.matches||g.matches)&&(G=Z.coerce(y,m,{matches:{valType:"enumerated",values:U,dflt:U.indexOf(g.matches)!==-1?g.matches:void 0}},"matches"));var le=T&&!p?m.anchor:void 0;if(H&&!G&&(y.scaleanchor||le)&&(J=Z.coerce(y,m,{scaleanchor:{valType:"enumerated",values:U.concat([!1])}},"scaleanchor",le)),G){m._matchGroup=o(k,f,G,1);var ye=_[w(G)],de=i(_,m)/i(_,ye);p!==(G.charAt(0)==="x")&&(de=(p?"x":"y")+de),o(M,f,G,de)}else y.matches&&c.indexOf(y.matches)!==-1&&Z.warn("ignored "+m._name+'.matches: "'+y.matches+'" to avoid an infinite loop');if(J){var me=x("scaleratio");me||(me=m.scaleratio=1),o(M,f,J,me)}else y.scaleanchor&&c.indexOf(y.scaleanchor)!==-1&&Z.warn("ignored "+m._name+'.scaleanchor: "'+y.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function i(y,m){var E=m.domain;return E||(E=y[w(m.overlaying)].domain),E[1]-E[0]}function s(y,m){for(var E=0;E<y.length;E++)if(y[E][m])return y[E];return null}function o(y,m,E,c){var _,T,M,k,b,A=s(y,m);A===null?(A={},A[m]=1,b=y.length,y.push(A)):b=y.indexOf(A);var g=Object.keys(A);for(_=0;_<y.length;_++)if(M=y[_],_!==b&&M[E]){var f=M[E];for(T=0;T<g.length;T++)k=g[T],M[k]=u(f,u(c,A[k]));y.splice(b,1);return}if(c!==1)for(T=0;T<g.length;T++){var p=g[T];A[p]=u(c,A[p])}A[E]=1}function u(y,m){var E="",c="",_,T;typeof y=="string"&&(E=y.match(/^[xy]*/)[0],_=E.length,y=+y.substr(_)),typeof m=="string"&&(c=m.match(/^[xy]*/)[0],T=c.length,m=+m.substr(T));var M=y*m;return!_&&!T?M:!_||!T||E.charAt(0)===c.charAt(0)?E+c+y*m:_===T?M:(_>T?E.substr(T):c.substr(_))+M}function d(y,m){for(var E=m._size,c=E.h/E.w,_={},T=Object.keys(y),M=0;M<T.length;M++){var k=T[M],b=y[k];if(typeof b=="string"){var A=b.match(/^[xy]*/)[0],g=A.length;b=+b.substr(g);for(var f=A.charAt(0)==="y"?c:1/c,p=0;p<g;p++)b*=f}_[k]=b}return _}te.enforce=function(m){var E=m._fullLayout,c=E._axisConstraintGroups||[],_,T,M,k,b,A,g,f;for(_=0;_<c.length;_++){M=d(c[_],E);var p=Object.keys(M),x=1/0,N=0,D=1/0,B={},U={},V=!1;for(T=0;T<p.length;T++)k=p[T],U[k]=b=E[w(k)],b._inputDomain?b.domain=b._inputDomain.slice():b._inputDomain=b.domain.slice(),b._inputRange||(b._inputRange=b.range.slice()),b.setScale(),B[k]=A=Math.abs(b._m)/M[k],x=Math.min(x,A),(b.constrain==="domain"||!b._constraintShrinkable)&&(D=Math.min(D,A)),delete b._constraintShrinkable,N=Math.max(N,A),b.constrain==="domain"&&(V=!0);if(!(x>r*N&&!V)){for(T=0;T<p.length;T++)if(k=p[T],A=B[k],b=U[k],g=b.constrain,A!==D||g==="domain")if(f=A/D,g==="range")P(b,f);else{var q=b._inputDomain,z=(b.domain[1]-b.domain[0])/(q[1]-q[0]),H=(b.r2l(b.range[1])-b.r2l(b.range[0]))/(b.r2l(b._inputRange[1])-b.r2l(b._inputRange[0]));if(f/=z,f*H<1){b.domain=b._input.domain=q.slice(),P(b,f);continue}if(H<1&&(b.range=b._input.range=b._inputRange.slice(),f*=H),b.autorange){var G=b.r2l(b.range[0]),J=b.r2l(b.range[1]),le=(G+J)/2,ye=le,de=le,me=Math.abs(J-le),W=le-me*f*1.0001,ie=le+me*f*1.0001,se=v.makePadFn(E,b,0),ee=v.makePadFn(E,b,1);h(b,f);var pe=Math.abs(b._m),oe=v.concatExtremes(m,b),Y=oe.min,ce=oe.max,ue,_e;for(_e=0;_e<Y.length;_e++)ue=Y[_e].val-se(Y[_e])/pe,ue>W&&ue<ye&&(ye=ue);for(_e=0;_e<ce.length;_e++)ue=ce[_e].val+ee(ce[_e])/pe,ue<ie&&ue>de&&(de=ue);var Le=(de-ye)/(2*me);f/=Le,ye=b.l2r(ye),de=b.l2r(de),b.range=b._input.range=G<J?[ye,de]:[de,ye]}h(b,f)}}}},te.getAxisGroup=function(m,E){for(var c=m._axisMatchGroups,_=0;_<c.length;_++){var T=c[_];if(T[E])return"g"+_}return E},te.clean=function(m,E){if(E._inputDomain){for(var c=!1,_=E._id,T=m._fullLayout._axisConstraintGroups,M=0;M<T.length;M++)if(T[M][_]){c=!0;break}(!c||E.constrain!=="domain")&&(E._input.domain=E.domain=E._inputDomain,delete E._inputDomain)}};function h(y,m){var E=y._inputDomain,c=a[y.constraintoward],_=E[0]+(E[1]-E[0])*c;y.domain=y._input.domain=[_+(E[0]-_)/m,_+(E[1]-_)/m],y.setScale()}}}),Fw=Ne({"src/plot_api/subroutines.js"(te){var Z=xn(),v=Xo(),w=uf(),C=In(),P=uc(),t=Sx(),r=io(),a=zs(),l=wy(),i=hA(),s=Os(),o=bd(),u=Mg(),d=u.enforce,h=u.clean,y=Cm().doAutoRange,m="start",E="middle",c="end",_=xh().zindexSeparator;te.layoutStyles=function(q){return C.syncOrAsync([w.doAutoMargin,M],q)};function T(q,z,H){for(var G=0;G<H.length;G++){var J=H[G][0],le=H[G][1];if(!(J[0]>=q[1]||J[1]<=q[0])&&le[0]<z[1]&&le[1]>z[0])return!0}return!1}function M(q){var z=q._fullLayout,H=z._size,G=H.p,J=s.list(q,"",!0),le,ye,de,me,W,ie;if(z._paperdiv.style({width:q._context.responsive&&z.autosize&&!q._context._hasZeroWidth&&!q.layout.width?"100%":z.width+"px",height:q._context.responsive&&z.autosize&&!q._context._hasZeroHeight&&!q.layout.height?"100%":z.height+"px"}).selectAll(".main-svg").call(a.setSize,z.width,z.height),q._context.setBackground(q,z.paper_bgcolor),te.drawMainTitle(q),i.manage(q),!z._has("cartesian"))return w.previousPromises(q);function se(De,Ee,Ae){var Ie=De._lw/2;if(De._id.charAt(0)==="x"){if(Ee){if(Ae==="top")return Ee._offset-G-Ie}else return H.t+H.h*(1-(De.position||0))+Ie%1;return Ee._offset+Ee._length+G+Ie}if(Ee){if(Ae==="right")return Ee._offset+Ee._length+G+Ie}else return H.l+H.w*(De.position||0)+Ie%1;return Ee._offset-G-Ie}for(le=0;le<J.length;le++){me=J[le];var ee=me._anchorAxis;me._linepositions={},me._lw=a.crispRound(q,me.linewidth,1),me._mainLinePosition=se(me,ee,me.side),me._mainMirrorPosition=me.mirror&&ee?se(me,ee,o.OPPOSITE_SIDE[me.side]):null}var pe=[],oe=[],Y=[],ce=r.opacity(z.paper_bgcolor)===1&&r.opacity(z.plot_bgcolor)===1&&z.paper_bgcolor===z.plot_bgcolor;for(ye in z._plots)if(de=z._plots[ye],de.mainplot)de.bg&&de.bg.remove(),de.bg=void 0;else{var ue=de.xaxis.domain,_e=de.yaxis.domain,Le=de.plotgroup;if(T(ue,_e,Y)&&ye.indexOf(_)===-1){var ze=Le.node(),Ge=de.bg=C.ensureSingle(Le,"rect","bg");ze.insertBefore(Ge.node(),ze.childNodes[0]),oe.push(ye)}else Le.select("rect.bg").remove(),Y.push([ue,_e]),ce||(pe.push(ye),oe.push(ye))}var Ve=z._bgLayer.selectAll(".bg").data(pe);for(Ve.enter().append("rect").classed("bg",!0),Ve.exit().remove(),Ve.each(function(De){z._plots[De].bg=Z.select(this)}),le=0;le<oe.length;le++)de=z._plots[oe[le]],W=de.xaxis,ie=de.yaxis,de.bg&&W._offset!==void 0&&ie._offset!==void 0&&de.bg.call(a.setRect,W._offset-G,ie._offset-G,W._length+2*G,ie._length+2*G).call(r.fill,z.plot_bgcolor).style("stroke-width",0);if(!z._hasOnlyLargeSploms)for(ye in z._plots){de=z._plots[ye],W=de.xaxis,ie=de.yaxis;var rt=de.clipId="clip"+z._uid+ye+"plot",pt=C.ensureSingleById(z._clips,"clipPath",rt,function(De){De.classed("plotclip",!0).append("rect")});de.clipRect=pt.select("rect").attr({width:W._length,height:ie._length}),a.setTranslate(de.plot,W._offset,ie._offset);var gt,ht;de._hasClipOnAxisFalse?(gt=null,ht=rt):(gt=rt,ht=null),a.setClipUrl(de.plot,gt,q),de.layerClipId=ht}var lt,Fe,Pe,be,Ye,mt,bt,ft,Wt,Zt,cr,pr,Br;function Fr(De){return"M"+lt+","+De+"H"+Fe}function cn(De){return"M"+W._offset+","+De+"h"+W._length}function Nr(De){return"M"+De+","+ft+"V"+bt}function Jr(De){return ie._shift!==void 0&&(De+=ie._shift),"M"+De+","+ie._offset+"v"+ie._length}function Dt(De,Ee,Ae){if(!De.showline||ye!==De._mainSubplot)return"";if(!De._anchorAxis)return Ae(De._mainLinePosition);var Ie=Ee(De._mainLinePosition);return De.mirror&&(Ie+=Ee(De._mainMirrorPosition)),Ie}for(ye in z._plots){de=z._plots[ye],W=de.xaxis,ie=de.yaxis;var $e="M0,0";k(W,ye)&&(Ye=A(W,"left",ie,J),lt=W._offset-(Ye?G+Ye:0),mt=A(W,"right",ie,J),Fe=W._offset+W._length+(mt?G+mt:0),Pe=se(W,ie,"bottom"),be=se(W,ie,"top"),Br=!W._anchorAxis||ye!==W._mainSubplot,Br&&(W.mirror==="allticks"||W.mirror==="all")&&(W._linepositions[ye]=[Pe,be]),$e=Dt(W,Fr,cn),Br&&W.showline&&(W.mirror==="all"||W.mirror==="allticks")&&($e+=Fr(Pe)+Fr(be)),de.xlines.style("stroke-width",W._lw+"px").call(r.stroke,W.showline?W.linecolor:"rgba(0,0,0,0)")),de.xlines.attr("d",$e);var ot="M0,0";k(ie,ye)&&(cr=A(ie,"bottom",W,J),bt=ie._offset+ie._length+(cr?G:0),pr=A(ie,"top",W,J),ft=ie._offset-(pr?G:0),Wt=se(ie,W,"left"),Zt=se(ie,W,"right"),Br=!ie._anchorAxis||ye!==ie._mainSubplot,Br&&(ie.mirror==="allticks"||ie.mirror==="all")&&(ie._linepositions[ye]=[Wt,Zt]),ot=Dt(ie,Nr,Jr),Br&&ie.showline&&(ie.mirror==="all"||ie.mirror==="allticks")&&(ot+=Nr(Wt)+Nr(Zt)),de.ylines.style("stroke-width",ie._lw+"px").call(r.stroke,ie.showline?ie.linecolor:"rgba(0,0,0,0)")),de.ylines.attr("d",ot)}return s.makeClipPaths(q),w.previousPromises(q)}function k(q,z){return(q.ticks||q.showline)&&(z===q._mainSubplot||q.mirror==="all"||q.mirror==="allticks")}function b(q,z,H){if(!H.showline||!H._lw)return!1;if(H.mirror==="all"||H.mirror==="allticks")return!0;var G=H._anchorAxis;if(!G)return!1;var J=o.FROM_BL[z];return H.side===z?G.domain[J]===q.domain[J]:H.mirror&&G.domain[1-J]===q.domain[1-J]}function A(q,z,H,G){if(b(q,z,H))return H._lw;for(var J=0;J<G.length;J++){var le=G[J];if(le._mainAxis===H._mainAxis&&b(q,z,le))return le._lw}return 0}te.drawMainTitle=function(q){var z=q._fullLayout.title,H=q._fullLayout,G=U(H),J=V(H),le=D(H,J),ye=N(H,G);if(l.draw(q,"gtitle",{propContainer:H,propName:"title.text",subtitlePropName:"title.subtitle.text",placeholder:H._dfltTitle.plot,subtitlePlaceholder:H._dfltTitle.subtitle,attributes:{x:ye,y:le,"text-anchor":G,dy:J}}),z.text&&z.automargin){var de=Z.select(q).selectAll(".gtitle"),me=a.bBox(Z.select(q).selectAll(".g-gtitle").node()).height,W=p(q,z,me);if(W>0){x(q,le,W,me),de.attr({x:ye,y:le,"text-anchor":G,dy:B(z.yanchor)}).call(P.positionText,ye,le);var ie=(z.text.match(P.BR_TAG_ALL)||[]).length;if(ie){var se=o.LINE_SPACING*ie+o.MID_SHIFT;z.y===0&&(se=-se),de.selectAll(".line").each(function(){var ce=+this.getAttribute("dy").slice(0,-2)-se+"em";this.setAttribute("dy",ce)})}var ee=Z.select(q).selectAll(".gtitle-subtitle");if(ee.node()){var pe=de.node().getBBox(),oe=pe.y+pe.height,Y=oe+l.SUBTITLE_PADDING_EM*z.subtitle.font.size;ee.attr({x:ye,y:Y,"text-anchor":G,dy:B(z.yanchor)}).call(P.positionText,ye,Y)}}}};function g(q,z,H,G,J){var le=z.yref==="paper"?q._fullLayout._size.h:q._fullLayout.height,ye=C.isTopAnchor(z)?G:G-J,de=H==="b"?le-ye:ye;return C.isTopAnchor(z)&&H==="t"||C.isBottomAnchor(z)&&H==="b"?!1:de<J}function f(q,z,H,G,J){var le=0;return H==="middle"&&(le+=J/2),q==="t"?(H==="top"&&(le+=J),le+=G-z*G):(H==="bottom"&&(le+=J),le+=z*G),le}function p(q,z,H){var G=z.y,J=z.yanchor,le=G>.5?"t":"b",ye=q._fullLayout.margin[le],de=0;return z.yref==="paper"?de=H+z.pad.t+z.pad.b:z.yref==="container"&&(de=f(le,G,J,q._fullLayout.height,H)+z.pad.t+z.pad.b),de>ye?de:0}function x(q,z,H,G){var J="title.automargin",le=q._fullLayout.title,ye=le.y>.5?"t":"b",de={x:le.x,y:le.y,t:0,b:0},me={};le.yref==="paper"&&g(q,le,ye,z,G)?de[ye]=H:le.yref==="container"&&(me[ye]=H,q._fullLayout._reservedMargin[J]=me),w.allowAutoMargin(q,J),w.autoMargin(q,J,de)}function N(q,z){var H=q.title,G=q._size,J=0;switch(z===m?J=H.pad.l:z===c&&(J=-H.pad.r),H.xref){case"paper":return G.l+G.w*H.x+J;case"container":default:return q.width*H.x+J}}function D(q,z){var H=q.title,G=q._size,J=0;if(z==="0em"||!z?J=-H.pad.b:z===o.CAP_SHIFT+"em"&&(J=H.pad.t),H.y==="auto")return G.t/2;switch(H.yref){case"paper":return G.t+G.h-G.h*H.y+J;case"container":default:return q.height-q.height*H.y+J}}function B(q){return q==="top"?o.CAP_SHIFT+.3+"em":q==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function U(q){var z=q.title,H=E;return C.isRightAnchor(z)?H=c:C.isLeftAnchor(z)&&(H=m),H}function V(q){var z=q.title,H="0em";return C.isTopAnchor(z)?H=o.CAP_SHIFT+"em":C.isMiddleAnchor(z)&&(H=o.MID_SHIFT+"em"),H}te.doTraceStyle=function(q){var z=q.calcdata,H=[],G;for(G=0;G<z.length;G++){var J=z[G],le=J[0]||{},ye=le.trace||{},de=ye._module||{},me=de.arraysToCalcdata;me&&me(J,ye);var W=de.editStyle;W&&H.push({fn:W,cd0:le})}if(H.length){for(G=0;G<H.length;G++){var ie=H[G];ie.fn(q,ie.cd0)}t(q),te.redrawReglTraces(q)}return w.style(q),v.getComponentMethod("legend","draw")(q),w.previousPromises(q)},te.doColorBars=function(q){return v.getComponentMethod("colorbar","draw")(q),w.previousPromises(q)},te.layoutReplot=function(q){var z=q.layout;return q.layout=void 0,v.call("_doPlot",q,"",z)},te.doLegend=function(q){return v.getComponentMethod("legend","draw")(q),w.previousPromises(q)},te.doTicksRelayout=function(q){return s.draw(q,"redraw"),q._fullLayout._hasOnlyLargeSploms&&(v.subplotsRegistry.splom.updateGrid(q),t(q),te.redrawReglTraces(q)),te.drawMainTitle(q),w.previousPromises(q)},te.doModeBar=function(q){var z=q._fullLayout;i.manage(q);for(var H=0;H<z._basePlotModules.length;H++){var G=z._basePlotModules[H].updateFx;G&&G(q)}return w.previousPromises(q)},te.doCamera=function(q){for(var z=q._fullLayout,H=z._subplots.gl3d,G=0;G<H.length;G++){var J=z[H[G]],le=J._scene;le.setViewport(J)}},te.drawData=function(q){var z=q._fullLayout;t(q);for(var H=z._basePlotModules,G=0;G<H.length;G++)H[G].plot(q);return te.redrawReglTraces(q),w.style(q),v.getComponentMethod("selections","draw")(q),v.getComponentMethod("shapes","draw")(q),v.getComponentMethod("annotations","draw")(q),v.getComponentMethod("images","draw")(q),z._replotting=!1,w.previousPromises(q)},te.redrawReglTraces=function(q){var z=q._fullLayout;if(z._has("regl")){var H=q._fullData,G=[],J=[],le,ye;for(z._hasOnlyLargeSploms&&z._splomGrid.draw(),le=0;le<H.length;le++){var de=H[le];de.visible===!0&&de._length!==0&&(de.type==="splom"?z._splomScenes[de.uid].draw():de.type==="scattergl"?C.pushUnique(G,de.xaxis+de.yaxis):de.type==="scatterpolargl"&&C.pushUnique(J,de.subplot))}for(le=0;le<G.length;le++)ye=z._plots[G[le]],ye._scene&&ye._scene.draw();for(le=0;le<J.length;le++)ye=z[J[le]]._subplot,ye._scene&&ye._scene.draw()}},te.doAutoRangeAndConstraints=function(q){for(var z=s.list(q,"",!0),H,G={},J=0;J<z.length;J++)if(H=z[J],!G[H._id]){G[H._id]=1,h(q,H),y(q,H);var le=H._matchGroup;if(le)for(var ye in le){var de=s.getFromId(q,ye);y(q,de,H.range),G[ye]=1}}d(q)},te.finalDraw=function(q){v.getComponentMethod("rangeslider","draw")(q),v.getComponentMethod("rangeselector","draw")(q)},te.drawMarginPushers=function(q){v.getComponentMethod("legend","draw")(q),v.getComponentMethod("rangeselector","draw")(q),v.getComponentMethod("sliders","draw")(q),v.getComponentMethod("updatemenus","draw")(q),v.getComponentMethod("colorbar","draw")(q)}}}),vM=Ne({"src/components/selections/draw.js"(te,Z){var v=im().readPaths,w=Sg(),C=_y().clearOutlineControllers,P=io(),t=zs(),r=Tu().arrayEditor,a=Ay(),l=a.getPathString;Z.exports={draw:i,drawOne:o,activateLastSelection:h};function i(m){var E=m._fullLayout;C(m),E._selectionLayer.selectAll("path").remove();for(var c in E._plots){var _=E._plots[c].selectionLayer;_&&_.selectAll("path").remove()}for(var T=0;T<E.selections.length;T++)o(m,T)}function s(m){return m._context.editSelection}function o(m,E){m._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+E+'"]').remove();var c=a.makeSelectionsOptionsAndPlotinfo(m,E),_=c.options,T=c.plotinfo;if(!_._input)return;M(m._fullLayout._selectionLayer);function M(k){var b=l(m,_),A={"data-index":E,"fill-rule":"evenodd",d:b},g=_.opacity,f="rgba(0,0,0,0)",p=_.line.color||P.contrast(m._fullLayout.plot_bgcolor),x=_.line.width,N=_.line.dash;x||(x=5,N="solid");var D=s(m)&&m._fullLayout._activeSelectionIndex===E;D&&(f=m._fullLayout.activeselection.fillcolor,g=m._fullLayout.activeselection.opacity);for(var B=[],U=1;U>=0;U--){var V=k.append("path").attr(A).style("opacity",U?.1:g).call(P.stroke,p).call(P.fill,f).call(t.dashLine,U?"solid":N,U?4+x:x);if(u(V,m,_),D){var q=r(m.layout,"selections",_);V.style({cursor:"move"});var z={element:V.node(),plotinfo:T,gd:m,editHelpers:q,isActiveSelection:!0},H=v(b,m);w(H,V,z)}else V.style("pointer-events",U?"all":"none");B[U]=V}var G=B[0],J=B[1];J.node().addEventListener("click",function(){return d(m,G)})}}function u(m,E,c){var _=c.xref+c.yref;t.setClipUrl(m,"clip"+E._fullLayout._uid+_,E)}function d(m,E){if(s(m)){var c=E.node(),_=+c.getAttribute("data-index");if(_>=0){if(_===m._fullLayout._activeSelectionIndex){y(m);return}m._fullLayout._activeSelectionIndex=_,m._fullLayout._deactivateSelection=y,i(m)}}}function h(m){if(s(m)){var E=m._fullLayout.selections.length-1;m._fullLayout._activeSelectionIndex=E,m._fullLayout._deactivateSelection=y,i(m)}}function y(m){if(s(m)){var E=m._fullLayout._activeSelectionIndex;E>=0&&(C(m),delete m._fullLayout._activeSelectionIndex,i(m))}}}}),kL=Ne({"node_modules/polybooljs/lib/build-log.js"(te,Z){function v(){var w,C=0,P=!1;function t(r,a){return w.list.push({type:r,data:a?JSON.parse(JSON.stringify(a)):void 0}),w}return w={list:[],segmentId:function(){return C++},checkIntersection:function(r,a){return t("check",{seg1:r,seg2:a})},segmentChop:function(r,a){return t("div_seg",{seg:r,pt:a}),t("chop",{seg:r,pt:a})},statusRemove:function(r){return t("pop_seg",{seg:r})},segmentUpdate:function(r){return t("seg_update",{seg:r})},segmentNew:function(r,a){return t("new_seg",{seg:r,primary:a})},segmentRemove:function(r){return t("rem_seg",{seg:r})},tempStatus:function(r,a,l){return t("temp_status",{seg:r,above:a,below:l})},rewind:function(r){return t("rewind",{seg:r})},status:function(r,a,l){return t("status",{seg:r,above:a,below:l})},vert:function(r){return r===P?w:(P=r,t("vert",{x:r}))},log:function(r){return typeof r!="string"&&(r=JSON.stringify(r,!1,"  ")),t("log",{txt:r})},reset:function(){return t("reset")},selected:function(r){return t("selected",{segs:r})},chainStart:function(r){return t("chain_start",{seg:r})},chainRemoveHead:function(r,a){return t("chain_rem_head",{index:r,pt:a})},chainRemoveTail:function(r,a){return t("chain_rem_tail",{index:r,pt:a})},chainNew:function(r,a){return t("chain_new",{pt1:r,pt2:a})},chainMatch:function(r){return t("chain_match",{index:r})},chainClose:function(r){return t("chain_close",{index:r})},chainAddHead:function(r,a){return t("chain_add_head",{index:r,pt:a})},chainAddTail:function(r,a){return t("chain_add_tail",{index:r,pt:a})},chainConnect:function(r,a){return t("chain_con",{index1:r,index2:a})},chainReverse:function(r){return t("chain_rev",{index:r})},chainJoin:function(r,a){return t("chain_join",{index1:r,index2:a})},done:function(){return t("done")}},w}Z.exports=v}}),PL=Ne({"node_modules/polybooljs/lib/epsilon.js"(te,Z){function v(w){typeof w!="number"&&(w=1e-10);var C={epsilon:function(P){return typeof P=="number"&&(w=P),w},pointAboveOrOnLine:function(P,t,r){var a=t[0],l=t[1],i=r[0],s=r[1],o=P[0],u=P[1];return(i-a)*(u-l)-(s-l)*(o-a)>=-w},pointBetween:function(P,t,r){var a=P[1]-t[1],l=r[0]-t[0],i=P[0]-t[0],s=r[1]-t[1],o=i*l+a*s;if(o<w)return!1;var u=l*l+s*s;return!(o-u>-w)},pointsSameX:function(P,t){return Math.abs(P[0]-t[0])<w},pointsSameY:function(P,t){return Math.abs(P[1]-t[1])<w},pointsSame:function(P,t){return C.pointsSameX(P,t)&&C.pointsSameY(P,t)},pointsCompare:function(P,t){return C.pointsSameX(P,t)?C.pointsSameY(P,t)?0:P[1]<t[1]?-1:1:P[0]<t[0]?-1:1},pointsCollinear:function(P,t,r){var a=P[0]-t[0],l=P[1]-t[1],i=t[0]-r[0],s=t[1]-r[1];return Math.abs(a*s-i*l)<w},linesIntersect:function(P,t,r,a){var l=t[0]-P[0],i=t[1]-P[1],s=a[0]-r[0],o=a[1]-r[1],u=l*o-i*s;if(Math.abs(u)<w)return!1;var d=P[0]-r[0],h=P[1]-r[1],y=(s*h-o*d)/u,m=(l*h-i*d)/u,E={alongA:0,alongB:0,pt:[P[0]+y*l,P[1]+y*i]};return y<=-w?E.alongA=-2:y<w?E.alongA=-1:y-1<=-w?E.alongA=0:y-1<w?E.alongA=1:E.alongA=2,m<=-w?E.alongB=-2:m<w?E.alongB=-1:m-1<=-w?E.alongB=0:m-1<w?E.alongB=1:E.alongB=2,E},pointInsideRegion:function(P,t){for(var r=P[0],a=P[1],l=t[t.length-1][0],i=t[t.length-1][1],s=!1,o=0;o<t.length;o++){var u=t[o][0],d=t[o][1];d-a>w!=i-a>w&&(l-u)*(a-d)/(i-d)+u-r>w&&(s=!s),l=u,i=d}return s}};return C}Z.exports=v}}),LL=Ne({"node_modules/polybooljs/lib/linked-list.js"(te,Z){var v={create:function(){var w={root:{root:!0,next:null},exists:function(C){return!(C===null||C===w.root)},isEmpty:function(){return w.root.next===null},getHead:function(){return w.root.next},insertBefore:function(C,P){for(var t=w.root,r=w.root.next;r!==null;){if(P(r)){C.prev=r.prev,C.next=r,r.prev.next=C,r.prev=C;return}t=r,r=r.next}t.next=C,C.prev=t,C.next=null},findTransition:function(C){for(var P=w.root,t=w.root.next;t!==null&&!C(t);)P=t,t=t.next;return{before:P===w.root?null:P,after:t,insert:function(r){return r.prev=P,r.next=t,P.next=r,t!==null&&(t.prev=r),r}}}};return w},node:function(w){return w.prev=null,w.next=null,w.remove=function(){w.prev.next=w.next,w.next&&(w.next.prev=w.prev),w.prev=null,w.next=null},w}};Z.exports=v}}),Vp=Ne({"node_modules/polybooljs/lib/intersecter.js"(te,Z){var v=LL();function w(C,P,t){function r(E,c){return{id:t?t.segmentId():-1,start:E,end:c,myFill:{above:null,below:null},otherFill:null}}function a(E,c,_){return{id:t?t.segmentId():-1,start:E,end:c,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var l=v.create();function i(E,c,_,T,M,k){var b=P.pointsCompare(c,M);return b!==0?b:P.pointsSame(_,k)?0:E!==T?E?1:-1:P.pointAboveOrOnLine(_,T?M:k,T?k:M)?1:-1}function s(E,c){l.insertBefore(E,function(_){var T=i(E.isStart,E.pt,c,_.isStart,_.pt,_.other.pt);return T<0})}function o(E,c){var _=v.node({isStart:!0,pt:E.start,seg:E,primary:c,other:null,status:null});return s(_,E.end),_}function u(E,c,_){var T=v.node({isStart:!1,pt:c.end,seg:c,primary:_,other:E,status:null});E.other=T,s(T,E.pt)}function d(E,c){var _=o(E,c);return u(_,E,c),_}function h(E,c){t&&t.segmentChop(E.seg,c),E.other.remove(),E.seg.end=c,E.other.pt=c,s(E.other,E.pt)}function y(E,c){var _=a(c,E.seg.end,E.seg);return h(E,c),d(_,E.primary)}function m(E,c){var _=v.create();function T(V,q){var z=V.seg.start,H=V.seg.end,G=q.seg.start,J=q.seg.end;return P.pointsCollinear(z,G,J)?P.pointsCollinear(H,G,J)||P.pointAboveOrOnLine(H,G,J)?1:-1:P.pointAboveOrOnLine(z,G,J)?1:-1}function M(V){return _.findTransition(function(q){var z=T(V,q.ev);return z>0})}function k(V,q){var z=V.seg,H=q.seg,G=z.start,J=z.end,le=H.start,ye=H.end;t&&t.checkIntersection(z,H);var de=P.linesIntersect(G,J,le,ye);if(de===!1){if(!P.pointsCollinear(G,J,le)||P.pointsSame(G,ye)||P.pointsSame(J,le))return!1;var me=P.pointsSame(G,le),W=P.pointsSame(J,ye);if(me&&W)return q;var ie=!me&&P.pointBetween(G,le,ye),se=!W&&P.pointBetween(J,le,ye);if(me)return se?y(q,J):y(V,ye),q;ie&&(W||(se?y(q,J):y(V,ye)),y(q,G))}else de.alongA===0&&(de.alongB===-1?y(V,le):de.alongB===0?y(V,de.pt):de.alongB===1&&y(V,ye)),de.alongB===0&&(de.alongA===-1?y(q,G):de.alongA===0?y(q,de.pt):de.alongA===1&&y(q,J));return!1}for(var b=[];!l.isEmpty();){var A=l.getHead();if(t&&t.vert(A.pt[0]),A.isStart){let V=function(){if(f){var q=k(A,f);if(q)return q}return p?k(A,p):!1};t&&t.segmentNew(A.seg,A.primary);var g=M(A),f=g.before?g.before.ev:null,p=g.after?g.after.ev:null;t&&t.tempStatus(A.seg,f?f.seg:!1,p?p.seg:!1);var x=V();if(x){if(C){var N;A.seg.myFill.below===null?N=!0:N=A.seg.myFill.above!==A.seg.myFill.below,N&&(x.seg.myFill.above=!x.seg.myFill.above)}else x.seg.otherFill=A.seg.myFill;t&&t.segmentUpdate(x.seg),A.other.remove(),A.remove()}if(l.getHead()!==A){t&&t.rewind(A.seg);continue}if(C){var N;A.seg.myFill.below===null?N=!0:N=A.seg.myFill.above!==A.seg.myFill.below,p?A.seg.myFill.below=p.seg.myFill.above:A.seg.myFill.below=E,N?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var D;p?A.primary===p.primary?D=p.seg.otherFill.above:D=p.seg.myFill.above:D=A.primary?c:E,A.seg.otherFill={above:D,below:D}}t&&t.status(A.seg,f?f.seg:!1,p?p.seg:!1),A.other.status=g.insert(v.node({ev:A}))}else{var B=A.status;if(B===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(B.prev)&&_.exists(B.next)&&k(B.prev.ev,B.next.ev),t&&t.statusRemove(B.ev.seg),B.remove(),!A.primary){var U=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=U}b.push(A.seg)}l.getHead().remove()}return t&&t.done(),b}return C?{addRegion:function(E){for(var c,_=E[E.length-1],T=0;T<E.length;T++){c=_,_=E[T];var M=P.pointsCompare(c,_);M!==0&&d(r(M<0?c:_,M<0?_:c),!0)}},calculate:function(E){return m(E,!1)}}:{calculate:function(E,c,_,T){return E.forEach(function(M){d(a(M.start,M.end,M),!0)}),_.forEach(function(M){d(a(M.start,M.end,M),!1)}),m(c,T)}}}Z.exports=w}}),Mx=Ne({"node_modules/polybooljs/lib/segment-chainer.js"(te,Z){function v(w,C,P){var t=[],r=[];return w.forEach(function(a){var l=a.start,i=a.end;if(C.pointsSame(l,i)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}P&&P.chainStart(a);var s={index:0,matches_head:!1,matches_pt1:!1},o={index:0,matches_head:!1,matches_pt1:!1},u=s;function d(D,B,U){return u.index=D,u.matches_head=B,u.matches_pt1=U,u===s?(u=o,!1):(u=null,!0)}for(var h=0;h<t.length;h++){var y=t[h],m=y[0];y[1];var E=y[y.length-1];if(y[y.length-2],C.pointsSame(m,l)){if(d(h,!0,!0))break}else if(C.pointsSame(m,i)){if(d(h,!0,!1))break}else if(C.pointsSame(E,l)){if(d(h,!1,!0))break}else if(C.pointsSame(E,i)&&d(h,!1,!1))break}if(u===s){t.push([l,i]),P&&P.chainNew(l,i);return}if(u===o){P&&P.chainMatch(s.index);var c=s.index,_=s.matches_pt1?i:l,T=s.matches_head,y=t[c],M=T?y[0]:y[y.length-1],k=T?y[1]:y[y.length-2],b=T?y[y.length-1]:y[0],A=T?y[y.length-2]:y[1];if(C.pointsCollinear(k,M,_)&&(T?(P&&P.chainRemoveHead(s.index,_),y.shift()):(P&&P.chainRemoveTail(s.index,_),y.pop()),M=k),C.pointsSame(b,_)){t.splice(c,1),C.pointsCollinear(A,b,M)&&(T?(P&&P.chainRemoveTail(s.index,M),y.pop()):(P&&P.chainRemoveHead(s.index,M),y.shift())),P&&P.chainClose(s.index),r.push(y);return}T?(P&&P.chainAddHead(s.index,_),y.unshift(_)):(P&&P.chainAddTail(s.index,_),y.push(_));return}function g(D){P&&P.chainReverse(D),t[D].reverse()}function f(D,B){var U=t[D],V=t[B],q=U[U.length-1],z=U[U.length-2],H=V[0],G=V[1];C.pointsCollinear(z,q,H)&&(P&&P.chainRemoveTail(D,q),U.pop(),q=z),C.pointsCollinear(q,H,G)&&(P&&P.chainRemoveHead(B,H),V.shift()),P&&P.chainJoin(D,B),t[D]=U.concat(V),t.splice(B,1)}var p=s.index,x=o.index;P&&P.chainConnect(p,x);var N=t[p].length<t[x].length;s.matches_head?o.matches_head?N?(g(p),f(p,x)):(g(x),f(x,p)):f(x,p):o.matches_head?f(p,x):N?(g(p),f(x,p)):(g(x),f(p,x))}),r}Z.exports=v}}),pM=Ne({"node_modules/polybooljs/lib/segment-selector.js"(te,Z){function v(C,P,t){var r=[];return C.forEach(function(a){var l=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);P[l]!==0&&r.push({id:t?t.segmentId():-1,start:a.start,end:a.end,myFill:{above:P[l]===1,below:P[l]===2},otherFill:null})}),t&&t.selected(r),r}var w={union:function(C,P){return v(C,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],P)},intersect:function(C,P){return v(C,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],P)},difference:function(C,P){return v(C,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],P)},differenceRev:function(C,P){return v(C,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],P)},xor:function(C,P){return v(C,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],P)}};Z.exports=w}}),mM=Ne({"node_modules/polybooljs/lib/geojson.js"(te,Z){var v={toPolygon:function(w,C){function P(a){if(a.length<=0)return w.segments({inverted:!1,regions:[]});function l(o){var u=o.slice(0,o.length-1);return w.segments({inverted:!1,regions:[u]})}for(var i=l(a[0]),s=1;s<a.length;s++)i=w.selectDifference(w.combine(i,l(a[s])));return i}if(C.type==="Polygon")return w.polygon(P(C.coordinates));if(C.type==="MultiPolygon"){for(var t=w.segments({inverted:!1,regions:[]}),r=0;r<C.coordinates.length;r++)t=w.selectUnion(w.combine(t,P(C.coordinates[r])));return w.polygon(t)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(w,C,P){P=w.polygon(w.segments(P));function t(y,m){return C.pointInsideRegion([(y[0][0]+y[1][0])*.5,(y[0][1]+y[1][1])*.5],m)}function r(y){return{region:y,children:[]}}var a=r(null);function l(y,m){for(var E=0;E<y.children.length;E++){var c=y.children[E];if(t(m,c.region)){l(c,m);return}}for(var _=r(m),E=0;E<y.children.length;E++){var c=y.children[E];t(c.region,m)&&(_.children.push(c),y.children.splice(E,1),E--)}y.children.push(_)}for(var i=0;i<P.regions.length;i++){var s=P.regions[i];s.length<3||l(a,s)}function o(y,m){for(var E=0,c=y[y.length-1][0],_=y[y.length-1][1],T=[],M=0;M<y.length;M++){var k=y[M][0],b=y[M][1];T.push([k,b]),E+=b*c-k*_,c=k,_=b}var A=E<0;return A!==m&&T.reverse(),T.push([T[0][0],T[0][1]]),T}var u=[];function d(y){var m=[o(y.region,!1)];u.push(m);for(var E=0;E<y.children.length;E++)m.push(h(y.children[E]))}function h(y){for(var m=0;m<y.children.length;m++)d(y.children[m]);return o(y.region,!0)}for(var i=0;i<a.children.length;i++)d(a.children[i]);return u.length<=0?{type:"Polygon",coordinates:[]}:u.length==1?{type:"Polygon",coordinates:u[0]}:{type:"MultiPolygon",coordinates:u}}};Z.exports=v}}),yM=Ne({"node_modules/polybooljs/index.js"(te,Z){var v=kL(),w=PL(),C=Vp(),P=Mx(),t=pM(),r=mM(),a=!1,l=w(),i;i={buildLog:function(o){return o===!0?a=v():o===!1&&(a=!1),a===!1?!1:a.list},epsilon:function(o){return l.epsilon(o)},segments:function(o){var u=C(!0,l,a);return o.regions.forEach(u.addRegion),{segments:u.calculate(o.inverted),inverted:o.inverted}},combine:function(o,u){var d=C(!1,l,a);return{combined:d.calculate(o.segments,o.inverted,u.segments,u.inverted),inverted1:o.inverted,inverted2:u.inverted}},selectUnion:function(o){return{segments:t.union(o.combined,a),inverted:o.inverted1||o.inverted2}},selectIntersect:function(o){return{segments:t.intersect(o.combined,a),inverted:o.inverted1&&o.inverted2}},selectDifference:function(o){return{segments:t.difference(o.combined,a),inverted:o.inverted1&&!o.inverted2}},selectDifferenceRev:function(o){return{segments:t.differenceRev(o.combined,a),inverted:!o.inverted1&&o.inverted2}},selectXor:function(o){return{segments:t.xor(o.combined,a),inverted:o.inverted1!==o.inverted2}},polygon:function(o){return{regions:P(o.segments,l,a),inverted:o.inverted}},polygonFromGeoJSON:function(o){return r.toPolygon(i,o)},polygonToGeoJSON:function(o){return r.fromPolygon(i,l,o)},union:function(o,u){return s(o,u,i.selectUnion)},intersect:function(o,u){return s(o,u,i.selectIntersect)},difference:function(o,u){return s(o,u,i.selectDifference)},differenceRev:function(o,u){return s(o,u,i.selectDifferenceRev)},xor:function(o,u){return s(o,u,i.selectXor)}};function s(o,u,d){var h=i.segments(o),y=i.segments(u),m=i.combine(h,y),E=d(m);return i.polygon(E)}typeof window=="object"&&(window.PolyBool=i),Z.exports=i}}),gM=Ne({"node_modules/point-in-polygon/nested.js"(te,Z){Z.exports=function(w,C,P,t){var r=w[0],a=w[1],l=!1;P===void 0&&(P=0),t===void 0&&(t=C.length);for(var i=t-P,s=0,o=i-1;s<i;o=s++){var u=C[s+P][0],d=C[s+P][1],h=C[o+P][0],y=C[o+P][1],m=d>a!=y>a&&r<(h-u)*(a-d)/(y-d)+u;m&&(l=!l)}return l}}}),j1=Ne({"src/lib/polygon.js"(te,Z){var v=Up().dot,w=ja().BADNUM,C=Z.exports={};C.tester=function(t){var r=t.slice(),a=r[0][0],l=a,i=r[0][1],s=i,o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),o=1;o<r.length;o++)a=Math.min(a,r[o][0]),l=Math.max(l,r[o][0]),i=Math.min(i,r[o][1]),s=Math.max(s,r[o][1]);var u=!1,d;r.length===5&&(r[0][0]===r[1][0]?r[2][0]===r[3][0]&&r[0][1]===r[3][1]&&r[1][1]===r[2][1]&&(u=!0,d=function(c){return c[0]===r[0][0]}):r[0][1]===r[1][1]&&r[2][1]===r[3][1]&&r[0][0]===r[3][0]&&r[1][0]===r[2][0]&&(u=!0,d=function(c){return c[1]===r[0][1]}));function h(c,_){var T=c[0],M=c[1];return!(T===w||T<a||T>l||M===w||M<i||M>s||_&&d(c))}function y(c,_){var T=c[0],M=c[1];if(T===w||T<a||T>l||M===w||M<i||M>s)return!1;var k=r.length,b=r[0][0],A=r[0][1],g=0,f,p,x,N,D;for(f=1;f<k;f++)if(p=b,x=A,b=r[f][0],A=r[f][1],N=Math.min(p,b),!(T<N||T>Math.max(p,b)||M>Math.max(x,A)))if(M<Math.min(x,A))T!==N&&g++;else{if(b===p?D=M:D=x+(T-p)*(A-x)/(b-p),M===D)return!(f===1&&_);M<=D&&T!==N&&g++}return g%2===1}var m=!0,E=r[0];for(o=1;o<r.length;o++)if(E[0]!==r[o][0]||E[1]!==r[o][1]){m=!1;break}return{xmin:a,xmax:l,ymin:i,ymax:s,pts:r,contains:u?h:y,isRect:u,degenerate:m}},C.isSegmentBent=function(t,r,a,l){var i=t[r],s=[t[a][0]-i[0],t[a][1]-i[1]],o=v(s,s),u=Math.sqrt(o),d=[-s[1]/u,s[0]/u],h,y,m;for(h=r+1;h<a;h++)if(y=[t[h][0]-i[0],t[h][1]-i[1]],m=v(y,s),m<0||m>o||Math.abs(v(y,d))>l)return!0;return!1},C.filter=function(t,r){var a=[t[0]],l=0,i=0;function s(u){t.push(u);var d=a.length,h=l;a.splice(i+1);for(var y=h+1;y<t.length;y++)(y===t.length-1||C.isSegmentBent(t,h,y+1,r))&&(a.push(t[y]),a.length<d-2&&(l=y,i=a.length-1),h=y)}if(t.length>1){var o=t.pop();s(o)}return{addPt:s,raw:t,filtered:a}}}}),RL=Ne({"src/components/selections/constants.js"(te,Z){Z.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),U1=Ne({"src/components/selections/select.js"(te,Z){var v=yM(),w=gM(),C=Xo(),P=zs().dashStyle,t=io(),r=nh(),a=_v().makeEventData,l=Pm(),i=l.freeMode,s=l.rectMode,o=l.drawMode,u=l.openMode,d=l.selectMode,h=Ay(),y=Nw(),m=Sg(),E=_y().clearOutline,c=im(),_=c.handleEllipse,T=c.readPaths,M=sA().newShapes,k=fM(),b=vM().activateLastSelection,A=In(),g=A.sorterAsc,f=j1(),p=z0(),x=Hf().getFromId,N=Sx(),D=Fw().redrawReglTraces,B=RL(),U=B.MINSELECT,V=f.filter,q=f.tester,z=zw(),H=z.p2r,G=z.axValue,J=z.getTransform;function le($e){return $e.subplot!==void 0}function ye($e,ot,De,Ee,Ae){var Ie=!le(Ee),tt=i(Ae),st=s(Ae),Ft=u(Ae),Nt=o(Ae),Xt=d(Ae),lr=Ae==="drawline",Rr=Ae==="drawcircle",Mr=lr||Rr,Sr=Ee.gd,Kr=Sr._fullLayout,qn=Xt&&Kr.newselection.mode==="immediate"&&Ie,ha=Kr._zoomlayer,ia=Ee.element.getBoundingClientRect(),xa=Ee.plotinfo,ba=J(xa),ea=ot-ia.left,Za=De-ia.top;Kr._calcInverseTransform(Sr);var ui=A.apply3DTransform(Kr._invTransform)(ea,Za);ea=ui[0],Za=ui[1];var _r=Kr._invScaleX,Qt=Kr._invScaleY,yr=ea,br=Za,nn="M"+ea+","+Za,wn=Ee.xaxes[0],Ln=Ee.yaxes[0],Fn=wn._length,va=Ln._length,Da=$e.altKey&&!(o(Ae)&&Ft),Pa,Fa,$a,oa,zi,Gi,qt;ee($e,Sr,Ee),tt&&(Pa=V([[ea,Za]],B.BENDPX));var Ct=ha.selectAll("path.select-outline-"+xa.id).data([1]),Ur=Nt?Kr.newshape:Kr.newselection;Nt&&(Ee.hasText=Ur.label.text||Ur.label.texttemplate);var Qr=Nt&&!Ft?Ur.fillcolor:"rgba(0,0,0,0)",tn=Ur.line.color||(Ie?t.contrast(Sr._fullLayout.plot_bgcolor):"#7f7f7f");Ct.enter().append("path").attr("class","select-outline select-outline-"+xa.id).style({opacity:Nt?Ur.opacity/2:1,"stroke-dasharray":P(Ur.line.dash,Ur.line.width),"stroke-width":Ur.line.width+"px","shape-rendering":"crispEdges"}).call(t.stroke,tn).call(t.fill,Qr).attr("fill-rule","evenodd").classed("cursor-move",!!Nt).attr("transform",ba).attr("d",nn+"Z");var Xr=ha.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1}).attr("transform",ba).attr("d","M0,0Z");if(Nt&&Ee.hasText){var en=ha.select(".label-temp");en.empty()&&(en=ha.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Tn=Kr._uid+B.SELECTID,hn=[],Rt=ue(Sr,Ee.xaxes,Ee.yaxes,Ee.subplot);qn&&!$e.shiftKey&&(Ee._clearSubplotSelections=function(){if(Ie){var Wr=wn._id,An=Ln._id;bt(Sr,Wr,An,Rt);for(var Xn=(Sr.layout||{}).selections||[],na=[],ra=!1,Sn=0;Sn<Xn.length;Sn++){var Wn=Kr.selections[Sn];!Wn||Wn.xref!==Wr||Wn.yref!==An?na.push(Xn[Sn]):ra=!0}ra&&(Sr._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Sr,{selections:na}))}});var xr=cn(Ee);Ee.moveFn=function(Wr,An){Ee._clearSubplotSelections&&(Ee._clearSubplotSelections(),Ee._clearSubplotSelections=void 0),yr=Math.max(0,Math.min(Fn,_r*Wr+ea)),br=Math.max(0,Math.min(va,Qt*An+Za));var Xn=Math.abs(yr-ea),na=Math.abs(br-Za);if(st){var ra,Sn,Wn;if(Xt){var Fi=Kr.selectdirection;switch(Fi==="any"?na<Math.min(Xn*.6,U)?ra="h":Xn<Math.min(na*.6,U)?ra="v":ra="d":ra=Fi,ra){case"h":Sn=Rr?va/2:0,Wn=va;break;case"v":Sn=Rr?Fn/2:0,Wn=Fn;break}}if(Nt)switch(Kr.newshape.drawdirection){case"vertical":ra="h",Sn=Rr?va/2:0,Wn=va;break;case"horizontal":ra="v",Sn=Rr?Fn/2:0,Wn=Fn;break;case"ortho":Xn<na?(ra="h",Sn=Za,Wn=br):(ra="v",Sn=ea,Wn=yr);break;default:ra="d"}ra==="h"?(oa=Mr?_(Rr,[yr,Sn],[yr,Wn]):[[ea,Sn],[ea,Wn],[yr,Wn],[yr,Sn]],oa.xmin=Mr?yr:Math.min(ea,yr),oa.xmax=Mr?yr:Math.max(ea,yr),oa.ymin=Math.min(Sn,Wn),oa.ymax=Math.max(Sn,Wn),Xr.attr("d","M"+oa.xmin+","+(Za-U)+"h-4v"+2*U+"h4ZM"+(oa.xmax-1)+","+(Za-U)+"h4v"+2*U+"h-4Z")):ra==="v"?(oa=Mr?_(Rr,[Sn,br],[Wn,br]):[[Sn,Za],[Sn,br],[Wn,br],[Wn,Za]],oa.xmin=Math.min(Sn,Wn),oa.xmax=Math.max(Sn,Wn),oa.ymin=Mr?br:Math.min(Za,br),oa.ymax=Mr?br:Math.max(Za,br),Xr.attr("d","M"+(ea-U)+","+oa.ymin+"v-4h"+2*U+"v4ZM"+(ea-U)+","+(oa.ymax-1)+"v4h"+2*U+"v-4Z")):ra==="d"&&(oa=Mr?_(Rr,[ea,Za],[yr,br]):[[ea,Za],[ea,br],[yr,br],[yr,Za]],oa.xmin=Math.min(ea,yr),oa.xmax=Math.max(ea,yr),oa.ymin=Math.min(Za,br),oa.ymax=Math.max(Za,br),Xr.attr("d","M0,0Z"))}else tt&&(Pa.addPt([yr,br]),oa=Pa.filtered);if(Ee.selectionDefs&&Ee.selectionDefs.length?($a=ht(Ee.mergedPolygons,oa,Da),oa.subtract=Da,Fa=se(Ee.selectionDefs.concat([oa]))):($a=[oa],Fa=q(oa)),m(Fe($a,Ft),Ct,Ee),Xt){var Ya=be(Sr,!1),Wi=Ya.eventData?Ya.eventData.points.slice():[];Ya=be(Sr,!1,Fa,Rt,Ee),Fa=Ya.selectionTesters,qt=Ya.eventData;var uo;Pa?uo=Pa.filtered:uo=pr($a),p.throttle(Tn,B.SELECTDELAY,function(){hn=Pe(Fa,Rt);for(var Ao=hn.slice(),wo=0;wo<Wi.length;wo++){for(var Uo=Wi[wo],Ri=!1,ps=0;ps<Ao.length;ps++)if(Ao[ps].curveNumber===Uo.curveNumber&&Ao[ps].pointNumber===Uo.pointNumber){Ri=!0;break}Ri||Ao.push(Uo)}Ao.length&&(qt||(qt={}),qt.points=Ao),xr(qt,uo),Nr(Sr,qt)})}},Ee.clickFn=function(Wr,An){if(Xr.remove(),Sr._fullLayout._activeShapeIndex>=0){Sr._fullLayout._deactivateShape(Sr);return}if(!Nt){var Xn=Kr.clickmode;p.done(Tn).then(function(){if(p.clear(Tn),Wr===2){for(Ct.remove(),zi=0;zi<Rt.length;zi++)Gi=Rt[zi],Gi._module.selectPoints(Gi,!1);if(pt(Sr,Rt),Y(Ee),Dt(Sr),Rt.length){var na=Rt[0].xaxis,ra=Rt[0].yaxis;if(na&&ra){for(var Sn=[],Wn=Sr._fullLayout.selections,Fi=0;Fi<Wn.length;Fi++){var Ya=Wn[Fi];Ya&&(Ya.xref!==na._id||Ya.yref!==ra._id)&&Sn.push(Ya)}Sn.length<Wn.length&&(Sr._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Sr,{selections:Sn}))}}}else Xn.indexOf("select")>-1&&de(An,Sr,Ee.xaxes,Ee.yaxes,Ee.subplot,Ee,Ct),Xn==="event"&&Jr(Sr,void 0);r.click(Sr,An,xa.id)}).catch(A.error)}},Ee.doneFn=function(){Xr.remove(),p.done(Tn).then(function(){p.clear(Tn),!qn&&oa&&Ee.selectionDefs&&(oa.subtract=Da,Ee.selectionDefs.push(oa),Ee.mergedPolygons.length=0,[].push.apply(Ee.mergedPolygons,$a)),(qn||Nt)&&Y(Ee,qn),Ee.doneFnCompleted&&Ee.doneFnCompleted(hn),Xt&&Jr(Sr,qt)}).catch(A.error)}}function de($e,ot,De,Ee,Ae,Ie,tt){var st=ot._hoverdata,Ft=ot._fullLayout,Nt=Ft.clickmode,Xt=Nt.indexOf("event")>-1,lr=[],Rr,Mr,Sr,Kr,qn,ha,ia,xa,ba,ea;if(Le(st)){ee($e,ot,Ie),Rr=ue(ot,De,Ee,Ae);var Za=ze(st,Rr),ui=Za.pointNumbers.length>0;if(ui?Ve(Rr,Za):rt(Rr)&&(ia=Ge(Za))){for(tt&&tt.remove(),ea=0;ea<Rr.length;ea++)Mr=Rr[ea],Mr._module.selectPoints(Mr,!1);pt(ot,Rr),Y(Ie),Xt&&Dt(ot)}else{xa=$e.shiftKey&&(ia!==void 0?ia:Ge(Za)),Sr=me(Za.pointNumber,Za.searchInfo,xa);var _r=Ie.selectionDefs.concat([Sr]);for(Kr=se(_r),ea=0;ea<Rr.length;ea++)if(qn=Rr[ea]._module.selectPoints(Rr[ea],Kr),ha=lt(qn,Rr[ea]),lr.length)for(var Qt=0;Qt<ha.length;Qt++)lr.push(ha[Qt]);else lr=ha;if(ba={points:lr},pt(ot,Rr,ba),Sr&&Ie&&Ie.selectionDefs.push(Sr),tt){var yr=Ie.mergedPolygons,br=u(Ie.dragmode);m(Fe(yr,br),tt,Ie)}Xt&&Jr(ot,ba)}}}function me($e,ot,De){return{pointNumber:$e,searchInfo:ot,subtract:!!De}}function W($e){return"pointNumber"in $e&&"searchInfo"in $e}function ie($e){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(ot,De,Ee,Ae){var Ie=$e.searchInfo.cd[0].trace.index,tt=Ae.cd[0].trace.index;return tt===Ie&&Ee===$e.pointNumber},isRect:!1,degenerate:!1,subtract:!!$e.subtract}}function se($e){if(!$e.length)return;for(var ot=[],De=W($e[0])?0:$e[0][0][0],Ee=De,Ae=W($e[0])?0:$e[0][0][1],Ie=Ae,tt=0;tt<$e.length;tt++)if(W($e[tt]))ot.push(ie($e[tt]));else{var st=q($e[tt]);st.subtract=!!$e[tt].subtract,ot.push(st),De=Math.min(De,st.xmin),Ee=Math.max(Ee,st.xmax),Ae=Math.min(Ae,st.ymin),Ie=Math.max(Ie,st.ymax)}function Ft(Nt,Xt,lr,Rr){for(var Mr=!1,Sr=0;Sr<ot.length;Sr++)ot[Sr].contains(Nt,Xt,lr,Rr)&&(Mr=!ot[Sr].subtract);return Mr}return{xmin:De,xmax:Ee,ymin:Ae,ymax:Ie,pts:[],contains:Ft,isRect:!1,degenerate:!1}}function ee($e,ot,De){var Ee=ot._fullLayout,Ae=De.plotinfo,Ie=De.dragmode,tt=Ee._lastSelectedSubplot&&Ee._lastSelectedSubplot===Ae.id,st=($e.shiftKey||$e.altKey)&&!(o(Ie)&&u(Ie));tt&&st&&Ae.selection&&Ae.selection.selectionDefs&&!De.selectionDefs?(De.selectionDefs=Ae.selection.selectionDefs,De.mergedPolygons=Ae.selection.mergedPolygons):(!st||!Ae.selection)&&Y(De),tt||(E(ot),Ee._lastSelectedSubplot=Ae.id)}function pe($e){return $e._fullLayout._activeShapeIndex>=0}function oe($e){return $e._fullLayout._activeSelectionIndex>=0}function Y($e,ot){var De=$e.dragmode,Ee=$e.plotinfo,Ae=$e.gd;pe(Ae)&&Ae._fullLayout._deactivateShape(Ae),oe(Ae)&&Ae._fullLayout._deactivateSelection(Ae);var Ie=Ae._fullLayout,tt=Ie._zoomlayer,st=o(De),Ft=d(De);if(st||Ft){var Nt=tt.selectAll(".select-outline-"+Ee.id);if(Nt&&Ae._fullLayout._outlining){var Xt;st&&(Xt=M(Nt,$e)),Xt&&C.call("_guiRelayout",Ae,{shapes:Xt});var lr;Ft&&!le($e)&&(lr=k(Nt,$e)),lr&&(Ae._fullLayout._noEmitSelectedAtStart=!0,C.call("_guiRelayout",Ae,{selections:lr}).then(function(){ot&&b(Ae)})),Ae._fullLayout._outlining=!1}}Ee.selection={},Ee.selection.selectionDefs=$e.selectionDefs=[],Ee.selection.mergedPolygons=$e.mergedPolygons=[]}function ce($e){return $e._id}function ue($e,ot,De,Ee){if(!$e.calcdata)return[];var Ae=[],Ie=ot.map(ce),tt=De.map(ce),st,Ft,Nt;for(Nt=0;Nt<$e.calcdata.length;Nt++)if(st=$e.calcdata[Nt],Ft=st[0].trace,!(Ft.visible!==!0||!Ft._module||!Ft._module.selectPoints))if(le({subplot:Ee})&&(Ft.subplot===Ee||Ft.geo===Ee))Ae.push(_e(Ft._module,st,ot[0],De[0]));else if(Ft.type==="splom"){if(Ft._xaxes[Ie[0]]&&Ft._yaxes[tt[0]]){var Xt=_e(Ft._module,st,ot[0],De[0]);Xt.scene=$e._fullLayout._splomScenes[Ft.uid],Ae.push(Xt)}}else if(Ft.type==="sankey"){var lr=_e(Ft._module,st,ot[0],De[0]);Ae.push(lr)}else{if(Ie.indexOf(Ft.xaxis)===-1&&(!Ft._xA||!Ft._xA.overlaying)||tt.indexOf(Ft.yaxis)===-1&&(!Ft._yA||!Ft._yA.overlaying))continue;Ae.push(_e(Ft._module,st,x($e,Ft.xaxis),x($e,Ft.yaxis)))}return Ae}function _e($e,ot,De,Ee){return{_module:$e,cd:ot,xaxis:De,yaxis:Ee}}function Le($e){return $e&&Array.isArray($e)&&$e[0].hoverOnBox!==!0}function ze($e,ot){var De=$e[0],Ee=-1,Ae=[],Ie,tt;for(tt=0;tt<ot.length;tt++)if(Ie=ot[tt],De.fullData.index===Ie.cd[0].trace.index){if(De.hoverOnBox===!0)break;De.pointNumber!==void 0?Ee=De.pointNumber:De.binNumber!==void 0&&(Ee=De.binNumber,Ae=De.pointNumbers);break}return{pointNumber:Ee,pointNumbers:Ae,searchInfo:Ie}}function Ge($e){var ot=$e.searchInfo.cd[0].trace,De=$e.pointNumber,Ee=$e.pointNumbers,Ae=Ee.length>0,Ie=Ae?Ee[0]:De;return ot.selectedpoints?ot.selectedpoints.indexOf(Ie)>-1:!1}function Ve($e,ot){var De=[],Ee,Ae,Ie,tt;for(tt=0;tt<$e.length;tt++)Ee=$e[tt],Ee.cd[0].trace.selectedpoints&&Ee.cd[0].trace.selectedpoints.length>0&&De.push(Ee);if(De.length===1&&(Ie=De[0]===ot.searchInfo,Ie&&(Ae=ot.searchInfo.cd[0].trace,Ae.selectedpoints.length===ot.pointNumbers.length))){for(tt=0;tt<ot.pointNumbers.length;tt++)if(Ae.selectedpoints.indexOf(ot.pointNumbers[tt])<0)return!1;return!0}return!1}function rt($e){var ot=0,De,Ee,Ae;for(Ae=0;Ae<$e.length;Ae++)if(De=$e[Ae],Ee=De.cd[0].trace,Ee.selectedpoints&&(Ee.selectedpoints.length>1||(ot+=Ee.selectedpoints.length,ot>1)))return!1;return ot===1}function pt($e,ot,De){var Ee;for(Ee=0;Ee<ot.length;Ee++){var Ae=ot[Ee].cd[0].trace._fullInput,Ie=$e._fullLayout._tracePreGUI[Ae.uid]||{};Ie.selectedpoints===void 0&&(Ie.selectedpoints=Ae._input.selectedpoints||null)}var tt;if(De){var st=De.points||[];for(Ee=0;Ee<ot.length;Ee++)tt=ot[Ee].cd[0].trace,tt._input.selectedpoints=tt._fullInput.selectedpoints=[],tt._fullInput!==tt&&(tt.selectedpoints=[]);for(var Ft=0;Ft<st.length;Ft++){var Nt=st[Ft],Xt=Nt.data,lr=Nt.fullData,Rr=Nt.pointIndex,Mr=Nt.pointIndices;Mr?([].push.apply(Xt.selectedpoints,Mr),tt._fullInput!==tt&&[].push.apply(lr.selectedpoints,Mr)):(Xt.selectedpoints.push(Rr),tt._fullInput!==tt&&lr.selectedpoints.push(Rr))}}else for(Ee=0;Ee<ot.length;Ee++)tt=ot[Ee].cd[0].trace,delete tt.selectedpoints,delete tt._input.selectedpoints,tt._fullInput!==tt&&delete tt._fullInput.selectedpoints;gt($e,ot)}function gt($e,ot){for(var De=!1,Ee=0;Ee<ot.length;Ee++){var Ae=ot[Ee],Ie=Ae.cd;C.traceIs(Ie[0].trace,"regl")&&(De=!0);var tt=Ae._module,st=tt.styleOnSelect||tt.style;st&&(st($e,Ie,Ie[0].node3),Ie[0].nodeRangePlot3&&st($e,Ie,Ie[0].nodeRangePlot3))}De&&(N($e),D($e))}function ht($e,ot,De){for(var Ee=De?v.difference:v.union,Ae=Ee({regions:$e},{regions:[ot]}),Ie=Ae.regions.reverse(),tt=0;tt<Ie.length;tt++){var st=Ie[tt];st.subtract=Zt(st,Ie.slice(0,tt))}return Ie}function lt($e,ot){if(Array.isArray($e))for(var De=ot.cd,Ee=ot.cd[0].trace,Ae=0;Ae<$e.length;Ae++)$e[Ae]=a($e[Ae],Ee,De);return $e}function Fe($e,ot){for(var De=[],Ee=0;Ee<$e.length;Ee++){De[Ee]=[];for(var Ae=0;Ae<$e[Ee].length;Ae++){De[Ee][Ae]=[],De[Ee][Ae][0]=Ae?"L":"M";for(var Ie=0;Ie<$e[Ee][Ae].length;Ie++)De[Ee][Ae].push($e[Ee][Ae][Ie])}ot||De[Ee].push(["Z",De[Ee][0][1],De[Ee][0][2]])}return De}function Pe($e,ot){for(var De=[],Ee,Ae,Ie=0;Ie<ot.length;Ie++){var tt=ot[Ie];Ae=tt._module.selectPoints(tt,$e),Ee=lt(Ae,tt),De=De.concat(Ee)}return De}function be($e,ot,De,Ee,Ae){var Ie=!!Ee,tt,st,Ft;Ae&&(tt=Ae.plotinfo,st=Ae.xaxes[0]._id,Ft=Ae.yaxes[0]._id);var Nt=[],Xt=[],lr=Wt($e),Rr=$e._fullLayout;if(tt){var Mr=Rr._zoomlayer,Sr=Rr.dragmode,Kr=o(Sr),qn=d(Sr);if(Kr||qn){var ha=x($e,st,"x"),ia=x($e,Ft,"y");if(ha&&ia){var xa=Mr.selectAll(".select-outline-"+tt.id);if(xa&&$e._fullLayout._outlining&&xa.length){for(var ba=xa[0][0],ea=ba.getAttribute("d"),Za=T(ea,$e,tt),ui=[],_r=0;_r<Za.length;_r++){for(var Qt=Za[_r],yr=[],br=0;br<Qt.length;br++)yr.push([cr(ha,Qt[br][1]),cr(ia,Qt[br][2])]);yr.xref=st,yr.yref=Ft,yr.subtract=Zt(yr,ui),ui.push(yr)}lr=lr.concat(ui)}}}}var nn=st&&Ft?[st+Ft]:Rr._subplots.cartesian;Ye($e);for(var wn={},Ln=0;Ln<nn.length;Ln++){var Fn=nn[Ln],va=Fn.indexOf("y"),Da=Fn.slice(0,va),Pa=Fn.slice(va),Fa=st&&Ft?De:void 0;if(Fa=ft(lr,Da,Pa,Fa),Fa){var $a=Ee;if(!Ie){var oa=x($e,Da,"x"),zi=x($e,Pa,"y");$a=ue($e,[oa],[zi],Fn);for(var Gi=0;Gi<$a.length;Gi++){var qt=$a[Gi],Ct=qt.cd[0],Ur=Ct.trace;if(qt._module.name==="scattergl"&&!Ct.t.xpx){var Qr=Ur.x,tn=Ur.y,Xr=Ur._length;Ct.t.xpx=[],Ct.t.ypx=[];for(var en=0;en<Xr;en++)Ct.t.xpx[en]=oa.c2p(Qr[en]),Ct.t.ypx[en]=zi.c2p(tn[en])}qt._module.name==="splom"&&(wn[Ur.uid]||(wn[Ur.uid]=!0))}}var Tn=Pe(Fa,$a);Nt=Nt.concat(Tn),Xt=Xt.concat($a)}}var hn={points:Nt};pt($e,Xt,hn);var Rt=Rr.clickmode,xr=Rt.indexOf("event")>-1&&ot;if(!tt&&ot){var Wr=Wt($e,!0);if(Wr.length){var An=Wr[0].xref,Xn=Wr[0].yref;if(An&&Xn){var na=pr(Wr),ra=Fr([x($e,An,"x"),x($e,Xn,"y")]);ra(hn,na)}}$e._fullLayout._noEmitSelectedAtStart?$e._fullLayout._noEmitSelectedAtStart=!1:xr&&Jr($e,hn),Rr._reselect=!1}if(!tt&&Rr._deselect){var Sn=Rr._deselect;st=Sn.xref,Ft=Sn.yref,mt(st,Ft,Xt)||bt($e,st,Ft,Ee),xr&&(hn.points.length?Jr($e,hn):Dt($e)),Rr._deselect=!1}return{eventData:hn,selectionTesters:De}}function Ye($e){var ot=$e.calcdata;if(ot)for(var De=0;De<ot.length;De++){var Ee=ot[De][0],Ae=Ee.trace,Ie=$e._fullLayout._splomScenes;if(Ie){var tt=Ie[Ae.uid];tt&&(tt.selectBatch=[])}}}function mt($e,ot,De){for(var Ee=0;Ee<De.length;Ee++){var Ae=De[Ee];if(Ae.xaxis&&Ae.xaxis._id===$e&&Ae.yaxis&&Ae.yaxis._id===ot)return!0}return!1}function bt($e,ot,De,Ee){Ee=ue($e,[x($e,ot,"x")],[x($e,De,"y")],ot+De);for(var Ae=0;Ae<Ee.length;Ae++){var Ie=Ee[Ae];Ie._module.selectPoints(Ie,!1)}pt($e,Ee)}function ft($e,ot,De,Ee){for(var Ae,Ie=0;Ie<$e.length;Ie++){var tt=$e[Ie];if(!(ot!==tt.xref||De!==tt.yref))if(Ae){var st=!!tt.subtract;Ae=ht(Ae,tt,st),Ee=se(Ae)}else Ae=[tt],Ee=q(tt)}return Ee}function Wt($e,ot){for(var De=[],Ee=$e._fullLayout,Ae=Ee.selections,Ie=Ae.length,tt=0;tt<Ie;tt++)if(!(ot&&tt!==Ee._activeSelectionIndex)){var st=Ae[tt];if(st){var Ft=st.xref,Nt=st.yref,Xt=x($e,Ft,"x"),lr=x($e,Nt,"y"),Rr,Mr,Sr,Kr,qn;if(st.type==="rect"){qn=[];var ha=cr(Xt,st.x0),ia=cr(Xt,st.x1),xa=cr(lr,st.y0),ba=cr(lr,st.y1);qn=[[ha,xa],[ha,ba],[ia,ba],[ia,xa]],Rr=Math.min(ha,ia),Mr=Math.max(ha,ia),Sr=Math.min(xa,ba),Kr=Math.max(xa,ba),qn.xmin=Rr,qn.xmax=Mr,qn.ymin=Sr,qn.ymax=Kr,qn.xref=Ft,qn.yref=Nt,qn.subtract=!1,qn.isRect=!0,De.push(qn)}else if(st.type==="path")for(var ea=st.path.split("Z"),Za=[],ui=0;ui<ea.length;ui++){var _r=ea[ui];if(_r){_r+="Z";var Qt=h.extractPathCoords(_r,y.paramIsX,"raw"),yr=h.extractPathCoords(_r,y.paramIsY,"raw");Rr=1/0,Mr=-1/0,Sr=1/0,Kr=-1/0,qn=[];for(var br=0;br<Qt.length;br++){var nn=cr(Xt,Qt[br]),wn=cr(lr,yr[br]);qn.push([nn,wn]),Rr=Math.min(nn,Rr),Mr=Math.max(nn,Mr),Sr=Math.min(wn,Sr),Kr=Math.max(wn,Kr)}qn.xmin=Rr,qn.xmax=Mr,qn.ymin=Sr,qn.ymax=Kr,qn.xref=Ft,qn.yref=Nt,qn.subtract=Zt(qn,Za),Za.push(qn),De.push(qn)}}}}return De}function Zt($e,ot){for(var De=!1,Ee=0;Ee<ot.length;Ee++)for(var Ae=ot[Ee],Ie=0;Ie<$e.length;Ie++)if(w($e[Ie],Ae)){De=!De;break}return De}function cr($e,ot){return $e.type==="date"&&(ot=ot.replace("_"," ")),$e.type==="log"?$e.c2p(ot):$e.r2p(ot,null,$e.calendar)}function pr($e){for(var ot=$e.length,De=[],Ee=0;Ee<ot;Ee++){var Ae=$e[Ee];De=De.concat(Ae),De=De.concat([Ae[0]])}return Br(De)}function Br($e){return $e.isRect=$e.length===5&&$e[0][0]===$e[4][0]&&$e[0][1]===$e[4][1]&&$e[0][0]===$e[1][0]&&$e[2][0]===$e[3][0]&&$e[0][1]===$e[3][1]&&$e[1][1]===$e[2][1]||$e[0][1]===$e[1][1]&&$e[2][1]===$e[3][1]&&$e[0][0]===$e[3][0]&&$e[1][0]===$e[2][0],$e.isRect&&($e.xmin=Math.min($e[0][0],$e[2][0]),$e.xmax=Math.max($e[0][0],$e[2][0]),$e.ymin=Math.min($e[0][1],$e[2][1]),$e.ymax=Math.max($e[0][1],$e[2][1])),$e}function Fr($e){return function(ot,De){for(var Ee,Ae,Ie=0;Ie<$e.length;Ie++){var tt=$e[Ie],st=tt._id,Ft=st.charAt(0);if(De.isRect){Ee||(Ee={});var Nt=De[Ft+"min"],Xt=De[Ft+"max"];Nt!==void 0&&Xt!==void 0&&(Ee[st]=[H(tt,Nt),H(tt,Xt)].sort(g))}else Ae||(Ae={}),Ae[st]=De.map(G(tt))}Ee&&(ot.range=Ee),Ae&&(ot.lassoPoints=Ae)}}function cn($e){var ot=$e.plotinfo;return ot.fillRangeItems||Fr($e.xaxes.concat($e.yaxes))}function Nr($e,ot){$e.emit("plotly_selecting",ot)}function Jr($e,ot){ot&&(ot.selections=($e.layout||{}).selections||[]),$e.emit("plotly_selected",ot)}function Dt($e){$e.emit("plotly_deselect",null)}Z.exports={reselect:be,prepSelect:ye,clearOutline:E,clearSelectionsCache:Y,selectOnClick:de}}}),Bw=Ne({"src/components/annotations/arrow_paths.js"(te,Z){Z.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}]}}),Sy=Ne({"src/constants/axis_placeable_objects.js"(te,Z){Z.exports={axisRefDescription:function(v,w,C){return["If set to a",v,"axis id (e.g. *"+v+"* or","*"+v+"2*), the `"+v+"` position refers to a",v,"coordinate. If set to *paper*, the `"+v+"`","position refers to the distance from the",w,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",w,"("+C+"). If set to a",v,"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",w,"of the domain of that axis: e.g.,","*"+v+"2 domain* refers to the domain of the second",v," axis and a",v,"position of 0.5 refers to the","point between the",w,"and the",C,"of the domain of the","second",v,"axis."].join(" ")}}}}),Ey=Ne({"src/components/annotations/attributes.js"(te,Z){var v=Bw(),w=$o(),C=xh(),P=Tu().templatedArray;Sy(),Z.exports=P("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:w({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:v.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:v.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",C.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C.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",C.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:w({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),a0=Ne({"src/traces/scatter/constants.js"(te,Z){Z.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),jv=Ne({"src/traces/scatter/fillcolor_attribute.js"(te,Z){Z.exports=function(w){return{valType:"color",editType:"style",anim:!0}}}}),Jc=Ne({"src/traces/scatter/attributes.js"(te,Z){var v=bc().axisHoverFormat,{hovertemplateAttrs:w,texttemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=Vu(),r=$o(),a=Dd().dash,l=Dd().pattern,i=zs(),s=a0(),o=co().extendFlat,u=jv();function d(m){return{valType:"any",dflt:0,editType:"calc"}}function h(m){return{valType:"any",editType:"calc"}}function y(m){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}Z.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:d(),yperiod:d(),xperiod0:h(),yperiod0:h(),xperiodalignment:y(),yperiodalignment:y(),xhoverformat:v("x"),yhoverformat:v("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:C(),texttemplatefallback:P({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:w({},{keys:s.eventDataKeys}),hovertemplatefallback:P(),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:o({},a,{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:u(!0),fillgradient:o({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:l,marker:o({symbol:{valType:"enumerated",values:i.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:o({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},t("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"},t("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:r({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),jw=Ne({"src/components/selections/attributes.js"(te,Z){var v=Ey(),w=Jc().line,C=Dd().dash,P=co().extendFlat,t=Kc().overrideAll,r=Tu().templatedArray;Sy(),Z.exports=t(r("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:P({},v.xref,{}),yref:P({},v.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:w.color,width:P({},w.width,{min:1,dflt:1}),dash:P({},C,{dflt:"dot"})}}),"arraydraw","from-root")}}),_M=Ne({"src/components/selections/defaults.js"(te,Z){var v=In(),w=Os(),C=zd(),P=jw(),t=Ay();Z.exports=function(l,i){C(l,i,{name:"selections",handleItemDefaults:r});for(var s=i.selections,o=0;o<s.length;o++){var u=s[o];u&&u.path===void 0&&(u.x0===void 0||u.x1===void 0||u.y0===void 0||u.y1===void 0)&&(i.selections[o]=null)}};function r(a,l,i){function s(N,D){return v.coerce(a,l,P,N,D)}var o=s("path"),u=o?"path":"rect",d=s("type",u),h=d!=="path";h&&delete l.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var y=["x","y"],m=0;m<2;m++){var E=y[m],c={_fullLayout:i},_,T,M,k=w.coerceRef(a,l,c,E);if(_=w.getFromId(c,k),_._selectionIndices.push(l._index),M=t.rangeToShapePosition(_),T=t.shapePositionToRange(_),h){var b=E+"0",A=E+"1",g=a[b],f=a[A];a[b]=T(a[b],!0),a[A]=T(a[A],!0),w.coercePosition(l,c,s,k,b),w.coercePosition(l,c,s,k,A);var p=l[b],x=l[A];p!==void 0&&x!==void 0&&(l[b]=M(p),l[A]=M(x),a[b]=g,a[A]=f)}}h&&v.noneOrAll(a,l,["x0","x1","y0","y1"])}}}),Cg=Ne({"src/components/selections/draw_newselection/defaults.js"(te,Z){Z.exports=function(w,C,P){P("newselection.mode");var t=P("newselection.line.width");t&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}}}),Cx=Ne({"src/plots/cartesian/include_components.js"(te,Z){var v=Xo(),w=In(),C=Hf();Z.exports=function(t){return function(a,l){var i=a[t];if(Array.isArray(i))for(var s=v.subplotsRegistry.cartesian,o=s.idRegex,u=l._subplots,d=u.xaxis,h=u.yaxis,y=u.cartesian,m=l._has("cartesian"),E=0;E<i.length;E++){var c=i[E];if(w.isPlainObject(c)){var _=C.cleanId(c.xref,"x",!1),T=C.cleanId(c.yref,"y",!1),M=o.x.test(_),k=o.y.test(T);if(M||k){m||w.pushUnique(l._basePlotModules,s);var b=!1;M&&d.indexOf(_)===-1&&(d.push(_),b=!0),k&&h.indexOf(T)===-1&&(h.push(T),b=!0),b&&M&&k&&y.push(_+T)}}}}}}}),fh=Ne({"src/components/selections/index.js"(te,Z){var v=vM(),w=U1();Z.exports={moduleType:"component",name:"selections",layoutAttributes:jw(),supplyLayoutDefaults:_M(),supplyDrawNewSelectionDefaults:Cg(),includeBasePlot:Cx()("selections"),draw:v.draw,drawOne:v.drawOne,reselect:w.reselect,prepSelect:w.prepSelect,clearOutline:w.clearOutline,clearSelectionsCache:w.clearSelectionsCache,selectOnClick:w.selectOnClick}}}),vA=Ne({"src/plots/cartesian/dragbox.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=Ro(),t=nA(),r=Xo(),a=w.strTranslate,l=uc(),i=io(),s=zs(),o=nh(),u=Os(),d=km(),h=Bv(),y=Pm(),m=y.selectingOrDrawing,E=y.freeMode,c=bd().FROM_TL,_=Sx(),T=Fw().redrawReglTraces,M=uf(),k=Hf().getFromId,b=fh().prepSelect,A=fh().clearOutline,g=fh().selectOnClick,f=dA(),p=xh(),x=p.MINDRAG,N=p.MINZOOM,D=!0;function B(_e,Le,ze,Ge,Ve,rt,pt,gt){var ht=_e._fullLayout._zoomlayer,lt=pt+gt==="nsew",Fe=(pt+gt).length===1,Pe,be,Ye,mt,bt,ft,Wt,Zt,cr,pr,Br,Fr,cn,Nr,Jr,Dt,$e,ot,De,Ee,Ae,Ie,tt;ze+=Le.yaxis._shift;function st(){if(Pe=Le.xaxis,be=Le.yaxis,cr=Pe._length,pr=be._length,Wt=Pe._offset,Zt=be._offset,Ye={},Ye[Pe._id]=Pe,mt={},mt[be._id]=be,pt&&gt)for(var Ct=Le.overlays,Ur=0;Ur<Ct.length;Ur++){var Qr=Ct[Ur].xaxis;Ye[Qr._id]=Qr;var tn=Ct[Ur].yaxis;mt[tn._id]=tn}bt=ue(Ye),ft=ue(mt),cn=q(bt,gt),Nr=q(ft,pt),Jr=!Nr&&!cn,Fr=Y(_e,_e._fullLayout._axisMatchGroups,Ye,mt),Br=Y(_e,_e._fullLayout._axisConstraintGroups,Ye,mt,Fr);var Xr=Br.isSubplotConstrained||Fr.isSubplotConstrained;Dt=gt||Xr,$e=pt||Xr;var en=_e._fullLayout;ot=en._has("scattergl"),De=en._has("splom"),Ee=en._has("svg")}st();var Ft=le(Nr+cn,_e._fullLayout.dragmode,lt),Nt=V(Le,pt+gt+"drag",Ft,ze,Ge,Ve,rt);if(Jr&&!lt)return Nt.onmousedown=null,Nt.style.pointerEvents="none",Nt;var Xt={element:Nt,gd:_e,plotinfo:Le};Xt.prepFn=function(Ct,Ur,Qr){var tn=Xt.dragmode,Xr=_e._fullLayout.dragmode;Xr!==tn&&(Xt.dragmode=Xr),st(),Ie=_e._fullLayout._invScaleX,tt=_e._fullLayout._invScaleY,Jr||(lt?Ct.shiftKey?Xr==="pan"?Xr="zoom":m(Xr)||(Xr="pan"):Ct.ctrlKey&&(Xr="pan"):Xr="pan"),E(Xr)?Xt.minDrag=1:Xt.minDrag=void 0,m(Xr)?(Xt.xaxes=bt,Xt.yaxes=ft,b(Ct,Ur,Qr,Xt,Xr)):(Xt.clickFn=Rr,m(tn)&&lr(),Jr||(Xr==="zoom"?(Xt.moveFn=_r,Xt.doneFn=yr,Xt.minDrag=1,ui(Ct,Ur,Qr)):Xr==="pan"&&(Xt.moveFn=va,Xt.doneFn=$a))),_e._fullLayout._redrag=function(){var en=_e._dragdata;if(en&&en.element===Nt){var Tn=_e._fullLayout.dragmode;m(Tn)||(st(),oa([0,0,cr,pr]),Xt.moveFn(en.dx,en.dy))}}};function lr(){Xt.plotinfo.selection=!1,A(_e)}function Rr(Ct,Ur){var Qr=Xt.gd;if(Qr._fullLayout._activeShapeIndex>=0){Qr._fullLayout._deactivateShape(Qr);return}var tn=Qr._fullLayout.clickmode;if(ie(Qr),Ct===2&&!Fe&&Fa(),lt)tn.indexOf("select")>-1&&g(Ur,Qr,bt,ft,Le.id,Xt),tn.indexOf("event")>-1&&o.click(Qr,Ur,Le.id);else if(Ct===1&&Fe){var Xr=pt?be:Pe,en=pt==="s"||gt==="w"?0:1,Tn=Xr._name+".range["+en+"]",hn=z(Xr,en),Rt="left",xr="middle";if(Xr.fixedrange)return;pt?(xr=pt==="n"?"top":"bottom",Xr.side==="right"&&(Rt="right")):gt==="e"&&(Rt="right"),Qr._context.showAxisRangeEntryBoxes&&v.select(Nt).call(l.makeEditable,{gd:Qr,immediate:!0,background:Qr._fullLayout.paper_bgcolor,text:String(hn),fill:Xr.tickfont?Xr.tickfont.color:"#444",horizontalAlign:Rt,verticalAlign:xr}).on("edit",function(Wr){var An=Xr.d2r(Wr);An!==void 0&&r.call("_guiRelayout",Qr,Tn,An)})}}h.init(Xt);var Mr,Sr,Kr,qn,ha,ia,xa,ba,ea,Za;function ui(Ct,Ur,Qr){var tn=Nt.getBoundingClientRect();Mr=Ur-tn.left,Sr=Qr-tn.top,_e._fullLayout._calcInverseTransform(_e);var Xr=w.apply3DTransform(_e._fullLayout._invTransform)(Mr,Sr);Mr=Xr[0],Sr=Xr[1],Kr={l:Mr,r:Mr,w:0,t:Sr,b:Sr,h:0},qn=_e._hmpixcount?_e._hmlumcount/_e._hmpixcount:P(_e._fullLayout.plot_bgcolor).getLuminance(),ha="M0,0H"+cr+"V"+pr+"H0V0",ia=!1,xa="xy",Za=!1,ba=ye(ht,qn,Wt,Zt,ha),ea=de(ht,Wt,Zt)}function _r(Ct,Ur){if(_e._transitioningWithDuration)return!1;var Qr=Math.max(0,Math.min(cr,Ie*Ct+Mr)),tn=Math.max(0,Math.min(pr,tt*Ur+Sr)),Xr=Math.abs(Qr-Mr),en=Math.abs(tn-Sr);Kr.l=Math.min(Mr,Qr),Kr.r=Math.max(Mr,Qr),Kr.t=Math.min(Sr,tn),Kr.b=Math.max(Sr,tn);function Tn(){xa="",Kr.r=Kr.l,Kr.t=Kr.b,ea.attr("d","M0,0Z")}if(Br.isSubplotConstrained)Xr>N||en>N?(xa="xy",Xr/cr>en/pr?(en=Xr*pr/cr,Sr>tn?Kr.t=Sr-en:Kr.b=Sr+en):(Xr=en*cr/pr,Mr>Qr?Kr.l=Mr-Xr:Kr.r=Mr+Xr),ea.attr("d",oe(Kr))):Tn();else if(Fr.isSubplotConstrained)if(Xr>N||en>N){xa="xy";var hn=Math.min(Kr.l/cr,(pr-Kr.b)/pr),Rt=Math.max(Kr.r/cr,(pr-Kr.t)/pr);Kr.l=hn*cr,Kr.r=Rt*cr,Kr.b=(1-hn)*pr,Kr.t=(1-Rt)*pr,ea.attr("d",oe(Kr))}else Tn();else!Nr||en<Math.min(Math.max(Xr*.6,x),N)?Xr<x||!cn?Tn():(Kr.t=0,Kr.b=pr,xa="x",ea.attr("d",ee(Kr,Sr))):!cn||Xr<Math.min(en*.6,N)?(Kr.l=0,Kr.r=cr,xa="y",ea.attr("d",pe(Kr,Mr))):(xa="xy",ea.attr("d",oe(Kr)));Kr.w=Kr.r-Kr.l,Kr.h=Kr.b-Kr.t,xa&&(Za=!0),_e._dragged=Za,me(ba,ea,Kr,ha,ia,qn),Qt(),_e.emit("plotly_relayouting",Ae),ia=!0}function Qt(){Ae={},(xa==="xy"||xa==="x")&&(H(bt,Kr.l/cr,Kr.r/cr,Ae,Br.xaxes),Da("x",Ae)),(xa==="xy"||xa==="y")&&(H(ft,(pr-Kr.b)/pr,(pr-Kr.t)/pr,Ae,Br.yaxes),Da("y",Ae))}function yr(){Qt(),ie(_e),$a(),se(_e)}var br=[0,0,cr,pr],nn=null,wn=p.REDRAWDELAY,Ln=Le.mainplot?_e._fullLayout._plots[Le.mainplot]:Le;function Fn(Ct){if(!_e._context._scrollZoom.cartesian&&!_e._fullLayout._enablescrollzoom)return;if(lr(),_e._transitioningWithDuration){Ct.preventDefault(),Ct.stopPropagation();return}st(),clearTimeout(nn);var Ur=-Ct.deltaY;if(isFinite(Ur)||(Ur=Ct.wheelDelta/10),!isFinite(Ur)){w.log("Did not find wheel motion attributes: ",Ct);return}var Qr=Math.exp(-Math.min(Math.max(Ur,-20),20)/200),tn=Ln.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Xr=(Ct.clientX-tn.left)/tn.width,en=(tn.bottom-Ct.clientY)/tn.height,Tn;function hn(Rt,xr,Wr){if(Rt.fixedrange)return;var An=w.simpleMap(Rt.range,Rt.r2l),Xn=An[0]+(An[1]-An[0])*xr;function na(ra){return Rt.l2r(Xn+(ra-Xn)*Wr)}Rt.range=An.map(na)}if(Dt){for(gt||(Xr=.5),Tn=0;Tn<bt.length;Tn++)hn(bt[Tn],Xr,Qr);Da("x"),br[2]*=Qr,br[0]+=br[2]*Xr*(1/Qr-1)}if($e){for(pt||(en=.5),Tn=0;Tn<ft.length;Tn++)hn(ft[Tn],en,Qr);Da("y"),br[3]*=Qr,br[1]+=br[3]*(1-en)*(1/Qr-1)}oa(br),Pa(),_e.emit("plotly_relayouting",Ae),nn=setTimeout(function(){_e._fullLayout&&(br=[0,0,cr,pr],$a())},wn),Ct.preventDefault()}pt.length*gt.length!==1&&ce(Nt,Fn);function va(Ct,Ur){if(Ct=Ct*Ie,Ur=Ur*tt,_e._transitioningWithDuration)return;if(_e._fullLayout._replotting=!0,cn==="ew"||Nr==="ns"){var Qr=cn?-Ct:0,tn=Nr?-Ur:0;if(Fr.isSubplotConstrained){if(cn&&Nr){var Xr=(Ct/cr-Ur/pr)/2;Ct=Xr*cr,Ur=-Xr*pr,Qr=-Ct,tn=-Ur}Nr?Qr=-tn*cr/pr:tn=-Qr*pr/cr}cn&&(G(bt,Ct),Da("x")),Nr&&(G(ft,Ur),Da("y")),oa([Qr,tn,cr,pr]),Pa(),_e.emit("plotly_relayouting",Ae);return}function en(na,ra,Sn){for(var Wn=1-ra,Fi,Ya,Wi=0;Wi<na.length;Wi++){var uo=na[Wi];if(!uo.fixedrange){Fi=uo,Ya=uo._rl[Wn]+(uo._rl[ra]-uo._rl[Wn])/J(Sn/uo._length);var Ao=uo.l2r(Ya);Ao!==!1&&Ao!==void 0&&(uo.range[ra]=Ao)}}return Fi._length*(Fi._rl[ra]-Ya)/(Fi._rl[ra]-Fi._rl[Wn])}var Tn=cn==="w"==(Nr==="n")?1:-1;if(cn&&Nr&&(Br.isSubplotConstrained||Fr.isSubplotConstrained)){var hn=(Ct/cr+Tn*Ur/pr)/2;Ct=hn*cr,Ur=Tn*hn*pr}var Rt,xr;if(cn==="w"?Ct=en(bt,0,Ct):cn==="e"?Ct=en(bt,1,-Ct):cn||(Ct=0),Nr==="n"?Ur=en(ft,1,Ur):Nr==="s"?Ur=en(ft,0,-Ur):Nr||(Ur=0),Rt=cn==="w"?Ct:0,xr=Nr==="n"?Ur:0,Br.isSubplotConstrained&&!Fr.isSubplotConstrained||Fr.isSubplotConstrained&&cn&&Nr&&Tn>0){var Wr;if(Fr.isSubplotConstrained||!cn&&Nr.length===1){for(Wr=0;Wr<bt.length;Wr++)bt[Wr].range=bt[Wr]._r.slice(),f(bt[Wr],1-Ur/pr);Ct=Ur*cr/pr,Rt=Ct/2}if(Fr.isSubplotConstrained||!Nr&&cn.length===1){for(Wr=0;Wr<ft.length;Wr++)ft[Wr].range=ft[Wr]._r.slice(),f(ft[Wr],1-Ct/cr);Ur=Ct*pr/cr,xr=Ur/2}}(!Fr.isSubplotConstrained||!Nr)&&Da("x"),(!Fr.isSubplotConstrained||!cn)&&Da("y");var An=cr-Ct,Xn=pr-Ur;Fr.isSubplotConstrained&&!(cn&&Nr)&&(cn?(xr=Rt?0:Ct*pr/cr,Xn=An*pr/cr):(Rt=xr?0:Ur*cr/pr,An=Xn*cr/pr)),oa([Rt,xr,An,Xn]),Pa(),_e.emit("plotly_relayouting",Ae)}function Da(Ct,Ur){for(var Qr=Fr.isSubplotConstrained?{x:ft,y:bt}[Ct]:Fr[Ct+"axes"],tn=Fr.isSubplotConstrained?{x:bt,y:ft}[Ct]:[],Xr=0;Xr<Qr.length;Xr++){var en=Qr[Xr],Tn=en._id,hn=Fr.xLinks[Tn]||Fr.yLinks[Tn],Rt=tn[0]||Ye[hn]||mt[hn];Rt&&(Ur?(Ur[en._name+".range[0]"]=Ur[Rt._name+".range[0]"],Ur[en._name+".range[1]"]=Ur[Rt._name+".range[1]"]):en.range=Rt.range.slice())}}function Pa(){var Ct=[],Ur;function Qr(Tn){for(Ur=0;Ur<Tn.length;Ur++)Tn[Ur].fixedrange||Ct.push(Tn[Ur]._id)}function tn(Tn,hn){for(Ur=0;Ur<Tn.length;Ur++){var Rt=Tn[Ur],xr=Rt[hn];!Rt.fixedrange&&xr.tickmode==="sync"&&Ct.push(xr._id)}}for(Dt&&(Qr(bt),Qr(Br.xaxes),Qr(Fr.xaxes),tn(Le.overlays,"xaxis")),$e&&(Qr(ft),Qr(Br.yaxes),Qr(Fr.yaxes),tn(Le.overlays,"yaxis")),Ae={},Ur=0;Ur<Ct.length;Ur++){var Xr=Ct[Ur],en=k(_e,Xr);u.drawOne(_e,en,{skipTitle:!0}),Ae[en._name+".range[0]"]=en.range[0],Ae[en._name+".range[1]"]=en.range[1]}u.redrawComponents(_e,Ct)}function Fa(){if(!_e._transitioningWithDuration){var Ct=_e._context.doubleClick,Ur=[];cn&&(Ur=Ur.concat(bt)),Nr&&(Ur=Ur.concat(ft)),Fr.xaxes&&(Ur=Ur.concat(Fr.xaxes)),Fr.yaxes&&(Ur=Ur.concat(Fr.yaxes));var Qr={},tn,Xr;if(Ct==="reset+autosize")for(Ct="autosize",Xr=0;Xr<Ur.length;Xr++){tn=Ur[Xr];var en=tn._rangeInitial0,Tn=tn._rangeInitial1,hn=en!==void 0||Tn!==void 0;if(hn&&(en!==void 0&&en!==tn.range[0]||Tn!==void 0&&Tn!==tn.range[1])||!hn&&tn.autorange!==!0){Ct="reset";break}}if(Ct==="autosize")for(Xr=0;Xr<Ur.length;Xr++)tn=Ur[Xr],tn.fixedrange||(Qr[tn._name+".autorange"]=!0);else if(Ct==="reset"){for((cn||Br.isSubplotConstrained)&&(Ur=Ur.concat(Br.xaxes)),Nr&&!Br.isSubplotConstrained&&(Ur=Ur.concat(Br.yaxes)),Br.isSubplotConstrained&&(cn?Nr||(Ur=Ur.concat(ft)):Ur=Ur.concat(bt)),Xr=0;Xr<Ur.length;Xr++)if(tn=Ur[Xr],!tn.fixedrange){var Rt=tn._name,xr=tn._autorangeInitial;tn._rangeInitial0===void 0&&tn._rangeInitial1===void 0?Qr[Rt+".autorange"]=!0:tn._rangeInitial0===void 0?(Qr[Rt+".autorange"]=xr,Qr[Rt+".range"]=[null,tn._rangeInitial1]):tn._rangeInitial1===void 0?(Qr[Rt+".range"]=[tn._rangeInitial0,null],Qr[Rt+".autorange"]=xr):Qr[Rt+".range"]=[tn._rangeInitial0,tn._rangeInitial1]}}_e.emit("plotly_doubleclick",null),r.call("_guiRelayout",_e,Qr)}}function $a(){oa([0,0,cr,pr]),w.syncOrAsync([M.previousPromises,function(){_e._fullLayout._replotting=!1,r.call("_guiRelayout",_e,Ae)}],_e)}function oa(Ct){var Ur=_e._fullLayout,Qr=Ur._plots,tn=Ur._subplots.cartesian,Xr,en,Tn,hn;if(De&&r.subplotsRegistry.splom.drag(_e),ot){for(Xr=0;Xr<tn.length;Xr++)if(en=Qr[tn[Xr]],Tn=en.xaxis,hn=en.yaxis,en._scene){Tn.limitRange&&Tn.limitRange(),hn.limitRange&&hn.limitRange();var Rt=w.simpleMap(Tn.range,Tn.r2l),xr=w.simpleMap(hn.range,hn.r2l);en._scene.update({range:[Rt[0],xr[0],Rt[1],xr[1]]})}}if((De||ot)&&(_(_e),T(_e)),Ee){var Wr=Ct[2]/Pe._length,An=Ct[3]/be._length;for(Xr=0;Xr<tn.length;Xr++){en=Qr[tn[Xr]],Tn=en.xaxis,hn=en.yaxis;var Xn=(Dt||Fr.isSubplotConstrained)&&!Tn.fixedrange&&Ye[Tn._id],na=($e||Fr.isSubplotConstrained)&&!hn.fixedrange&&mt[hn._id],ra,Sn,Wn,Fi;if(Xn?(ra=Wr,Wn=gt||Fr.isSubplotConstrained?Ct[0]:qt(Tn,ra)):Fr.xaHash[Tn._id]?(ra=Wr,Wn=Ct[0]*Tn._length/Pe._length):Fr.yaHash[Tn._id]?(ra=An,Wn=Nr==="ns"?-Ct[1]*Tn._length/be._length:qt(Tn,ra,{n:"top",s:"bottom"}[Nr])):(ra=zi(Tn,Wr,An),Wn=Gi(Tn,ra)),ra>1&&(Tn.maxallowed!==void 0&&Dt===(Tn.range[0]<Tn.range[1]?"e":"w")||Tn.minallowed!==void 0&&Dt===(Tn.range[0]<Tn.range[1]?"w":"e"))&&(ra=1,Wn=0),na?(Sn=An,Fi=pt||Fr.isSubplotConstrained?Ct[1]:qt(hn,Sn)):Fr.yaHash[hn._id]?(Sn=An,Fi=Ct[1]*hn._length/be._length):Fr.xaHash[hn._id]?(Sn=Wr,Fi=cn==="ew"?-Ct[0]*hn._length/Pe._length:qt(hn,Sn,{e:"right",w:"left"}[cn])):(Sn=zi(hn,Wr,An),Fi=Gi(hn,Sn)),Sn>1&&(hn.maxallowed!==void 0&&$e===(hn.range[0]<hn.range[1]?"n":"s")||hn.minallowed!==void 0&&$e===(hn.range[0]<hn.range[1]?"s":"n"))&&(Sn=1,Fi=0),!(!ra&&!Sn)){ra||(ra=1),Sn||(Sn=1);var Ya=Tn._offset-Wn/ra,Wi=hn._offset-Fi/Sn;en.clipRect.call(s.setTranslate,Wn,Fi).call(s.setScale,ra,Sn),en.plot.call(s.setTranslate,Ya,Wi).call(s.setScale,1/ra,1/Sn),(ra!==en.xScaleFactor||Sn!==en.yScaleFactor)&&(s.setPointGroupScale(en.zoomScalePts,ra,Sn),s.setTextPointsScale(en.zoomScaleTxt,ra,Sn)),s.hideOutsideRangePoints(en.clipOnAxisFalseTraces,en),en.xScaleFactor=ra,en.yScaleFactor=Sn}}}}function zi(Ct,Ur,Qr){return Ct.fixedrange?0:Dt&&Br.xaHash[Ct._id]?Ur:$e&&(Br.isSubplotConstrained?Br.xaHash:Br.yaHash)[Ct._id]?Qr:0}function Gi(Ct,Ur){return Ur?(Ct.range=Ct._r.slice(),f(Ct,Ur),qt(Ct,Ur)):0}function qt(Ct,Ur,Qr){return Ct._length*(1-Ur)*c[Qr||Ct.constraintoward||"middle"]}return Nt}function U(_e,Le,ze,Ge){var Ve=w.ensureSingle(_e.draglayer,Le,ze,function(rt){rt.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",_e.id)});return Ve.call(d,Ge),Ve.node()}function V(_e,Le,ze,Ge,Ve,rt,pt){var gt=U(_e,"rect",Le,ze);return v.select(gt).call(s.setRect,Ge,Ve,rt,pt),gt}function q(_e,Le){for(var ze=0;ze<_e.length;ze++)if(!_e[ze].fixedrange)return Le;return""}function z(_e,Le){var ze=_e.range[Le],Ge=Math.abs(ze-_e.range[1-Le]),Ve;return _e.type==="date"?ze:_e.type==="log"?(Ve=Math.ceil(Math.max(0,-Math.log(Ge)/Math.LN10))+3,C("."+Ve+"g")(Math.pow(10,ze))):(Ve=Math.floor(Math.log(Math.abs(ze))/Math.LN10)-Math.floor(Math.log(Ge)/Math.LN10)+4,C("."+String(Ve)+"g")(ze))}function H(_e,Le,ze,Ge,Ve){for(var rt=0;rt<_e.length;rt++){var pt=_e[rt];if(!pt.fixedrange)if(pt.rangebreaks){var gt=pt._id.charAt(0)==="y",ht=gt?1-Le:Le,lt=gt?1-ze:ze;Ge[pt._name+".range[0]"]=pt.l2r(pt.p2l(ht*pt._length)),Ge[pt._name+".range[1]"]=pt.l2r(pt.p2l(lt*pt._length))}else{var Fe=pt._rl[0],Pe=pt._rl[1]-Fe;Ge[pt._name+".range[0]"]=pt.l2r(Fe+Pe*Le),Ge[pt._name+".range[1]"]=pt.l2r(Fe+Pe*ze)}}if(Ve&&Ve.length){var be=(Le+(1-ze))/2;H(Ve,be,1-be,Ge,[])}}function G(_e,Le){for(var ze=0;ze<_e.length;ze++){var Ge=_e[ze];if(!Ge.fixedrange){if(Ge.rangebreaks){var Ve=0,rt=Ge._length,pt=Ge.p2l(Ve+Le)-Ge.p2l(Ve),gt=Ge.p2l(rt+Le)-Ge.p2l(rt),ht=(pt+gt)/2;Ge.range=[Ge.l2r(Ge._rl[0]-ht),Ge.l2r(Ge._rl[1]-ht)]}else Ge.range=[Ge.l2r(Ge._rl[0]-Le/Ge._m),Ge.l2r(Ge._rl[1]-Le/Ge._m)];Ge.limitRange&&Ge.limitRange()}}}function J(_e){return 1-(_e>=0?Math.min(_e,.9):1/(1/Math.max(_e,-.3)+3.222))}function le(_e,Le,ze){return _e?_e==="nsew"?ze?"":Le==="pan"?"move":"crosshair":_e.toLowerCase()+"-resize":"pointer"}function ye(_e,Le,ze,Ge,Ve){return _e.append("path").attr("class","zoombox").style({fill:Le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",a(ze,Ge)).attr("d",Ve+"Z")}function de(_e,Le,ze){return _e.append("path").attr("class","zoombox-corners").style({fill:i.background,stroke:i.defaultLine,"stroke-width":1,opacity:0}).attr("transform",a(Le,ze)).attr("d","M0,0Z")}function me(_e,Le,ze,Ge,Ve,rt){_e.attr("d",Ge+"M"+ze.l+","+ze.t+"v"+ze.h+"h"+ze.w+"v-"+ze.h+"h-"+ze.w+"Z"),W(_e,Le,Ve,rt)}function W(_e,Le,ze,Ge){ze||(_e.transition().style("fill",Ge>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Le.transition().style("opacity",1).duration(200))}function ie(_e){v.select(_e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function se(_e){D&&_e.data&&_e._context.showTips&&(w.notifier(w._(_e,"Double-click to zoom back out"),"long"),D=!1)}function ee(_e,Le){return"M"+(_e.l-.5)+","+(Le-N-.5)+"h-3v"+(2*N+1)+"h3ZM"+(_e.r+.5)+","+(Le-N-.5)+"h3v"+(2*N+1)+"h-3Z"}function pe(_e,Le){return"M"+(Le-N-.5)+","+(_e.t-.5)+"v-3h"+(2*N+1)+"v3ZM"+(Le-N-.5)+","+(_e.b+.5)+"v3h"+(2*N+1)+"v-3Z"}function oe(_e){var Le=Math.floor(Math.min(_e.b-_e.t,_e.r-_e.l,N)/2);return"M"+(_e.l-3.5)+","+(_e.t-.5+Le)+"h3v"+-Le+"h"+Le+"v-3h-"+(Le+3)+"ZM"+(_e.r+3.5)+","+(_e.t-.5+Le)+"h-3v"+-Le+"h"+-Le+"v-3h"+(Le+3)+"ZM"+(_e.r+3.5)+","+(_e.b+.5-Le)+"h-3v"+Le+"h"+-Le+"v3h"+(Le+3)+"ZM"+(_e.l-3.5)+","+(_e.b+.5-Le)+"h3v"+Le+"h"+Le+"v3h-"+(Le+3)+"Z"}function Y(_e,Le,ze,Ge,Ve){for(var rt=!1,pt={},gt={},ht,lt,Fe,Pe,be=(Ve||{}).xaHash,Ye=(Ve||{}).yaHash,mt=0;mt<Le.length;mt++){var bt=Le[mt];for(ht in ze)if(bt[ht]){for(Fe in bt)!(Ve&&(be[Fe]||Ye[Fe]))&&!(Fe.charAt(0)==="x"?ze:Ge)[Fe]&&(pt[Fe]=ht);for(lt in Ge)!(Ve&&(be[lt]||Ye[lt]))&&bt[lt]&&(rt=!0)}for(lt in Ge)if(bt[lt])for(Pe in bt)!(Ve&&(be[Pe]||Ye[Pe]))&&!(Pe.charAt(0)==="x"?ze:Ge)[Pe]&&(gt[Pe]=lt)}rt&&(w.extendFlat(pt,gt),gt={});var ft={},Wt=[];for(Fe in pt){var Zt=k(_e,Fe);Wt.push(Zt),ft[Zt._id]=Zt}var cr={},pr=[];for(Pe in gt){var Br=k(_e,Pe);pr.push(Br),cr[Br._id]=Br}return{xaHash:ft,yaHash:cr,xaxes:Wt,yaxes:pr,xLinks:pt,yLinks:gt,isSubplotConstrained:rt}}function ce(_e,Le){if(!t)_e.onwheel!==void 0?_e.onwheel=Le:_e.onmousewheel!==void 0?_e.onmousewheel=Le:_e.isAddedWheelEvent||(_e.isAddedWheelEvent=!0,_e.addEventListener("wheel",Le,{passive:!1}));else{var ze=_e.onwheel!==void 0?"wheel":"mousewheel";_e._onwheel&&_e.removeEventListener(ze,_e._onwheel),_e._onwheel=Le,_e.addEventListener(ze,Le,{passive:!1})}}function ue(_e){var Le=[];for(var ze in _e)Le.push(_e[ze]);return Le}Z.exports={makeDragBox:B,makeDragger:U,makeRectDragger:V,makeZoombox:ye,makeCorners:de,updateZoombox:me,xyCorners:oe,transitionZoombox:W,removeZoombox:ie,showDoubleClickNotifier:se,attachWheelEventHandler:ce}}}),xM=Ne({"src/plots/cartesian/graph_interact.js"(te){var Z=xn(),v=nh(),w=Bv(),C=km(),P=vA().makeDragBox,t=xh().DRAGGERSIZE;te.initInteractions=function(a){var l=a._fullLayout;if(a._context.staticPlot){Z.select(a).selectAll(".drag").remove();return}if(!(!l._has("cartesian")&&!l._has("splom"))){var i=Object.keys(l._plots||{}).sort(function(o,u){if((l._plots[o].mainplot&&!0)===(l._plots[u].mainplot&&!0)){var d=o.split("y"),h=u.split("y");return d[0]===h[0]?Number(d[1]||1)-Number(h[1]||1):Number(d[0]||1)-Number(h[0]||1)}return l._plots[o].mainplot?1:-1});i.forEach(function(o){var u=l._plots[o],d=u.xaxis,h=u.yaxis;if(!u.mainplot){var y=P(a,u,d._offset,h._offset,d._length,h._length,"ns","ew");y.onmousemove=function(c){a._fullLayout._rehover=function(){a._fullLayout._hoversubplot===o&&a._fullLayout._plots[o]&&v.hover(a,c,o)},v.hover(a,c,o),a._fullLayout._lasthover=y,a._fullLayout._hoversubplot=o},y.onmouseout=function(c){a._dragging||(a._fullLayout._hoversubplot=null,w.unhover(a,c))},a._context.showAxisDragHandles&&(P(a,u,d._offset-t,h._offset-t,t,t,"n","w"),P(a,u,d._offset+d._length,h._offset-t,t,t,"n","e"),P(a,u,d._offset-t,h._offset+h._length,t,t,"s","w"),P(a,u,d._offset+d._length,h._offset+h._length,t,t,"s","e"))}if(a._context.showAxisDragHandles){if(o===d._mainSubplot){var m=d._mainLinePosition;d.side==="top"&&(m-=t),P(a,u,d._offset+d._length*.1,m,d._length*.8,t,"","ew"),P(a,u,d._offset,m,d._length*.1,t,"","w"),P(a,u,d._offset+d._length*.9,m,d._length*.1,t,"","e")}if(o===h._mainSubplot){var E=h._mainLinePosition;h.side!=="right"&&(E-=t),P(a,u,E,h._offset+h._length*.1,t,h._length*.8,"ns",""),P(a,u,E,h._offset+h._length*.9,t,h._length*.1,"s",""),P(a,u,E,h._offset,t,h._length*.1,"n","")}}});var s=l._hoverlayer.node();s.onmousemove=function(o){o.target=a._fullLayout._lasthover,v.hover(a,o,l._hoversubplot)},s.onclick=function(o){o.target=a._fullLayout._lasthover,v.click(a,o)},s.onmousedown=function(o){a._fullLayout._lasthover.onmousedown(o)},te.updateFx(a)}},te.updateFx=function(r){var a=r._fullLayout,l=a.dragmode==="pan"?"move":"crosshair";C(a._draggers,l)}}}),IL=Ne({"src/plot_api/container_array_match.js"(te,Z){var v=Xo();Z.exports=function(C){for(var P=v.layoutArrayContainers,t=v.layoutArrayRegexes,r=C.split("[")[0],a,l,i=0;i<t.length;i++)if(l=C.match(t[i]),l&&l.index===0){a=l[0];break}if(a||(a=P[P.indexOf(r)]),!a)return!1;var s=C.substr(a.length);return s?(l=s.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/),l?{array:a,index:Number(l[1]),property:l[3]||""}:!1):{array:a,index:"",property:""}}}}),DL=Ne({"src/plot_api/manage_arrays.js"(te){var Z=Ra(),v=Id(),w=yv(),C=gy().sorterAsc,P=Xo();te.containerArrayMatch=IL();var t=te.isAddVal=function(l){return l==="add"||Z(l)},r=te.isRemoveVal=function(l){return l===null||l==="remove"};te.applyContainerArrayChanges=function(l,i,s,o,u){var d=i.astr,h=P.getComponentMethod(d,"supplyLayoutDefaults"),y=P.getComponentMethod(d,"draw"),m=P.getComponentMethod(d,"drawOne"),E=o.replot||o.recalc||h===v||y===v,c=l.layout,_=l._fullLayout;if(s[""]){Object.keys(s).length>1&&w.warn("Full array edits are incompatible with other edits",d);var T=s[""][""];if(r(T))i.set(null);else if(Array.isArray(T))i.set(T);else return w.warn("Unrecognized full array edit value",d,T),!0;return E?!1:(h(c,_),y(l),!0)}var M=Object.keys(s).map(Number).sort(C),k=i.get(),b=k||[],A=u(_,d).get(),g=[],f=-1,p=b.length,x,N,D,B,U,V,q,z;for(x=0;x<M.length;x++){if(D=M[x],B=s[D],U=Object.keys(B),V=B[""],q=t(V),D<0||D>b.length-(q?0:1)){w.warn("index out of range",d,D);continue}if(V!==void 0)U.length>1&&w.warn("Insertion & removal are incompatible with edits to the same index.",d,D),r(V)?g.push(D):q?(V==="add"&&(V={}),b.splice(D,0,V),A&&A.splice(D,0,{})):w.warn("Unrecognized full object edit value",d,D,V),f===-1&&(f=D);else for(N=0;N<U.length;N++)z=d+"["+D+"].",u(b[D],U[N],z).set(B[U[N]])}for(x=g.length-1;x>=0;x--)b.splice(g[x],1),A&&A.splice(g[x],1);if(b.length?k||i.set(b):i.set(null),E)return!1;if(h(c,_),m!==v){var H;if(f===-1)H=M;else{for(p=Math.max(b.length,p),H=[],x=0;x<M.length&&(D=M[x],!(D>=f));x++)H.push(D);for(x=f;x<p;x++)H.push(x)}for(x=0;x<H.length;x++)m(l,H[x])}else y(l);return!0}}}),bM=Ne({"src/plot_api/helpers.js"(te){var Z=la(),v=Xo(),w=In(),C=uf(),P=Hf(),t=io(),r=P.cleanId,a=P.getFromTrace,l=v.traceIs,i=["x","y","z"];te.clearPromiseQueue=function(c){Array.isArray(c._promises)&&c._promises.length>0&&w.log("Clearing previous rejected promises from queue."),c._promises=[]},te.cleanLayout=function(c){var _;c||(c={}),c.xaxis1&&(c.xaxis||(c.xaxis=c.xaxis1),delete c.xaxis1),c.yaxis1&&(c.yaxis||(c.yaxis=c.yaxis1),delete c.yaxis1),c.scene1&&(c.scene||(c.scene=c.scene1),delete c.scene1);var T=(C.subplotsRegistry.cartesian||{}).attrRegex;(C.subplotsRegistry.polar||{}).attrRegex,(C.subplotsRegistry.ternary||{}).attrRegex,(C.subplotsRegistry.gl3d||{}).attrRegex;var M=Object.keys(c);for(_=0;_<M.length;_++){var k=M[_];if(T&&T.test(k)){var b=c[k];b.anchor&&b.anchor!=="free"&&(b.anchor=r(b.anchor)),b.overlaying&&(b.overlaying=r(b.overlaying)),b.type||(b.isdate?b.type="date":b.islog?b.type="log":b.isdate===!1&&b.islog===!1&&(b.type="linear")),(b.autorange==="withzero"||b.autorange==="tozero")&&(b.autorange=!0,b.rangemode="tozero"),b.insiderange&&delete b.range,delete b.islog,delete b.isdate,delete b.categories,h(b,"domain")&&delete b.domain}}var A=Array.isArray(c.annotations)?c.annotations.length:0;for(_=0;_<A;_++){var g=c.annotations[_];w.isPlainObject(g)&&(s(g,"xref"),s(g,"yref"))}var f=Array.isArray(c.shapes)?c.shapes.length:0;for(_=0;_<f;_++){var p=c.shapes[_];w.isPlainObject(p)&&(s(p,"xref"),s(p,"yref"))}var x=Array.isArray(c.images)?c.images.length:0;for(_=0;_<x;_++){var N=c.images[_];w.isPlainObject(N)&&(s(N,"xref"),s(N,"yref"))}var D=c.legend;return D&&(D.x>3?(D.x=1.02,D.xanchor="left"):D.x<-2&&(D.x=-.02,D.xanchor="right"),D.y>3?(D.y=1.02,D.yanchor="bottom"):D.y<-2&&(D.y=-.02,D.yanchor="top")),c.dragmode==="rotate"&&(c.dragmode="orbit"),t.clean(c),c.template&&c.template.layout&&te.cleanLayout(c.template.layout),c};function s(c,_){var T=c[_],M=_.charAt(0);T&&T!=="paper"&&(c[_]=r(T,M,!0))}te.cleanData=function(c){for(var _=0;_<c.length;_++){var T=c[_],M;if(T.type==="histogramy"&&"xbins"in T&&!("ybins"in T)&&(T.ybins=T.xbins,delete T.xbins),T.type==="histogramy"&&te.swapXYData(T),(T.type==="histogramx"||T.type==="histogramy")&&(T.type="histogram"),"scl"in T&&!("colorscale"in T)&&(T.colorscale=T.scl,delete T.scl),"reversescl"in T&&!("reversescale"in T)&&(T.reversescale=T.reversescl,delete T.reversescl),T.xaxis&&(T.xaxis=r(T.xaxis,"x")),T.yaxis&&(T.yaxis=r(T.yaxis,"y")),l(T,"gl3d")&&T.scene&&(T.scene=C.subplotsRegistry.gl3d.cleanId(T.scene)),!l(T,"pie-like")&&!l(T,"bar-like"))if(Array.isArray(T.textposition))for(M=0;M<T.textposition.length;M++)T.textposition[M]=d(T.textposition[M]);else T.textposition&&(T.textposition=d(T.textposition));var k=v.getModule(T);if(k&&k.colorbar){var b=k.colorbar.container,A=b?T[b]:T;A&&A.colorscale&&(A.colorscale==="YIGnBu"&&(A.colorscale="YlGnBu"),A.colorscale==="YIOrRd"&&(A.colorscale="YlOrRd"))}if(T.type==="surface"&&w.isPlainObject(T.contours)){var g=["x","y","z"];for(M=0;M<g.length;M++){var f=T.contours[g[M]];w.isPlainObject(f)&&(f.highlightColor&&(f.highlightcolor=f.highlightColor,delete f.highlightColor),f.highlightWidth&&(f.highlightwidth=f.highlightWidth,delete f.highlightWidth))}}if(T.type==="candlestick"||T.type==="ohlc"){var p=(T.increasing||{}).showlegend!==!1,x=(T.decreasing||{}).showlegend!==!1,N=o(T.increasing),D=o(T.decreasing);if(N!==!1&&D!==!1){var B=u(N,D,p,x);B&&(T.name=B)}else(N||D)&&!T.name&&(T.name=N||D)}h(T,"line")&&delete T.line,"marker"in T&&(h(T.marker,"line")&&delete T.marker.line,h(T,"marker")&&delete T.marker),t.clean(T),T.autobinx&&(delete T.autobinx,delete T.xbins),T.autobiny&&(delete T.autobiny,delete T.ybins)}};function o(c){if(!w.isPlainObject(c))return!1;var _=c.name;return delete c.name,delete c.showlegend,(typeof _=="string"||typeof _=="number")&&String(_)}function u(c,_,T,M){if(T&&!M)return c;if(M&&!T||!c.trim())return _;if(!_.trim())return c;var k=Math.min(c.length,_.length),b;for(b=0;b<k&&c.charAt(b)===_.charAt(b);b++);var A=c.substr(0,b);return A.trim()}function d(c){var _="middle",T="center";return typeof c=="string"&&(c.indexOf("top")!==-1?_="top":c.indexOf("bottom")!==-1&&(_="bottom"),c.indexOf("left")!==-1?T="left":c.indexOf("right")!==-1&&(T="right")),_+" "+T}function h(c,_){return _ in c&&typeof c[_]=="object"&&Object.keys(c[_]).length===0}te.swapXYData=function(c){var _;if(w.swapAttrs(c,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(c.z)&&Array.isArray(c.z[0])&&(c.transpose?delete c.transpose:c.transpose=!0),c.error_x&&c.error_y){var T=c.error_y,M="copy_ystyle"in T?T.copy_ystyle:!(T.color||T.thickness||T.width);w.swapAttrs(c,["error_?.copy_ystyle"]),M&&w.swapAttrs(c,["error_?.color","error_?.thickness","error_?.width"])}if(typeof c.hoverinfo=="string"){var k=c.hoverinfo.split("+");for(_=0;_<k.length;_++)k[_]==="x"?k[_]="y":k[_]==="y"&&(k[_]="x");c.hoverinfo=k.join("+")}},te.coerceTraceIndices=function(c,_){if(Z(_))return[_];if(!Array.isArray(_)||!_.length)return c.data.map(function(k,b){return b});if(Array.isArray(_)){for(var T=[],M=0;M<_.length;M++)w.isIndex(_[M],c.data.length)?T.push(_[M]):w.warn("trace index (",_[M],") is not a number or is out of bounds");return T}return _},te.manageArrayContainers=function(c,_,T){var M=c.obj,k=c.parts,b=k.length,A=k[b-1],g=Z(A);if(g&&_===null){var f=k.slice(0,b-1).join("."),p=w.nestedProperty(M,f).get();p.splice(A,1)}else g&&c.get()===void 0&&c.get()===void 0&&(T[c.astr]=null),c.set(_)};var y=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function m(c){var _=c.search(y);if(_>0)return c.substr(0,_)}te.hasParent=function(c,_){for(var T=m(_);T;){if(T in c)return!0;T=m(T)}return!1},te.clearAxisTypes=function(c,_,T){for(var M=0;M<_.length;M++)for(var k=c._fullData[M],b=0;b<3;b++){var A=a(c,k,i[b]);if(A&&A.type!=="log"){var g=A._name,f=A._id.substr(1);if(f.substr(0,5)==="scene"){if(T[f]!==void 0)continue;g=f+"."+g}var p=g+".type";T[g]===void 0&&T[p]===void 0&&w.nestedProperty(c.layout,p).set(null)}}};var E=(c,_)=>{const T=(...M)=>M.every(k=>w.isPlainObject(k))||M.every(k=>Array.isArray(k));if([c,_].every(M=>Array.isArray(M))){if(c.length!==_.length)return!1;for(let M=0;M<c.length;M++){const k=c[M],b=_[M];if(k!==b&&!(T(k,b)?E(k,b):!1))return!1}return!0}else if([c,_].every(M=>w.isPlainObject(M))){if(Object.keys(c).length!==Object.keys(_).length)return!1;for(const M in c){if(M.startsWith("_"))continue;const k=c[M],b=_[M];if(k!==b&&!(T(k,b)?E(k,b):!1))return!1}return!0}return!1};te.collectionsAreEqual=E}}),Uw=Ne({"src/plot_api/plot_api.js"(te){var Z=xn(),v=la(),w=eA(),C=In(),P=C.nestedProperty,t=bx(),r=am(),a=Xo(),l=B1(),i=uf(),s=Os(),o=rM(),u=wd(),d=zs(),h=io(),y=xM().initInteractions,m=cp(),E=fh().clearOutline,c=gd().dfltConfig,_=DL(),T=bM(),M=Fw(),k=Kc(),b=xh().AX_NAME_PATTERN,A=0,g=5;function f(De,Ee,Ae,Ie){var tt;if(De=C.getGraphDiv(De),t.init(De),C.isPlainObject(Ee)){var st=Ee;Ee=st.data,Ae=st.layout,Ie=st.config,tt=st.frames}var Ft=t.triggerHandler(De,"plotly_beforeplot",[Ee,Ae,Ie]);if(Ft===!1)return Promise.reject();!Ee&&!Ae&&!C.isPlotDiv(De)&&C.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function Nt(){if(tt)return te.addFrames(De,tt)}B(De,Ie),Ae||(Ae={}),Z.select(De).classed("js-plotly-plot",!0),d.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Xt=(De.data||[]).length===0&&Array.isArray(Ee);Array.isArray(Ee)&&(T.cleanData(Ee),Xt?De.data=Ee:De.data.push.apply(De.data,Ee),De.empty=!1),(!De.layout||Xt)&&(De.layout=T.cleanLayout(Ae)),i.supplyDefaults(De);var lr=De._fullLayout,Rr=lr._has("cartesian");lr._replotting=!0,(Xt||lr._shouldCreateBgLayer)&&(ot(De),lr._shouldCreateBgLayer&&delete lr._shouldCreateBgLayer),d.initGradients(De),d.initPatterns(De),Xt&&s.saveShowSpikeInitial(De);var Mr=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Mr&&i.doCalcdata(De);for(var Sr=0;Sr<De.calcdata.length;Sr++)De.calcdata[Sr][0].trace=De._fullData[Sr];De._context.responsive?De._responsiveChartHandler||(De._responsiveChartHandler=function(){C.isHidden(De)||i.resize(De)},window.addEventListener("resize",De._responsiveChartHandler)):C.clearResponsive(De);var Kr=C.extendFlat({},lr._size),qn=0;function ha(){for(var Qt=lr._basePlotModules,yr=0;yr<Qt.length;yr++)Qt[yr].drawFramework&&Qt[yr].drawFramework(De);!lr._glcanvas&&lr._has("gl")&&(lr._glcanvas=lr._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(Ln){return Ln.key}),lr._glcanvas.enter().append("canvas").attr("class",function(Ln){return"gl-canvas gl-canvas-"+Ln.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var br=De._context.plotGlPixelRatio;if(lr._glcanvas){lr._glcanvas.attr("width",lr.width*br).attr("height",lr.height*br).style("width",lr.width+"px").style("height",lr.height+"px");var nn=lr._glcanvas.data()[0].regl;if(nn&&(Math.floor(lr.width*br)!==nn._gl.drawingBufferWidth||Math.floor(lr.height*br)!==nn._gl.drawingBufferHeight)){var wn="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(qn)C.error(wn);else return C.log(wn+" Clearing graph and plotting again."),i.cleanPlot([],{},De._fullData,lr),i.supplyDefaults(De),lr=De._fullLayout,i.doCalcdata(De),qn++,ha()}}return lr.modebar.orientation==="h"?lr._modebardiv.style("height",null).style("width","100%"):lr._modebardiv.style("width",null).style("height",lr.height+"px"),i.previousPromises(De)}function ia(){if(i.clearAutoMarginIds(De),M.drawMarginPushers(De),s.allowAutoMargin(De),De._fullLayout.title.text&&De._fullLayout.title.automargin&&i.allowAutoMargin(De,"title.automargin"),lr._has("pie"))for(var Qt=De._fullData,yr=0;yr<Qt.length;yr++){var br=Qt[yr];br.type==="pie"&&br.automargin&&i.allowAutoMargin(De,"pie."+br.uid+".automargin")}return i.doAutoMargin(De),i.previousPromises(De)}function xa(){if(i.didMarginChange(Kr,lr._size))return C.syncOrAsync([ia,M.layoutStyles],De)}function ba(){if(!Mr){ea();return}return C.syncOrAsync([a.getComponentMethod("shapes","calcAutorange"),a.getComponentMethod("annotations","calcAutorange"),ea],De)}function ea(){De._transitioning||(M.doAutoRangeAndConstraints(De),Xt&&s.saveRangeInitial(De),a.getComponentMethod("rangeslider","calcAutorange")(De))}function Za(){return s.draw(De,Xt?"":"redraw")}var ui=[i.previousPromises,Nt,ha,ia,xa];Rr&&ui.push(ba),ui.push(M.layoutStyles),Rr&&ui.push(Za,function(yr){var br=yr._fullLayout._insideTickLabelsUpdaterange;if(br)return yr._fullLayout._insideTickLabelsUpdaterange=void 0,Le(yr,br).then(function(){s.saveRangeInitial(yr,!0)})}),ui.push(M.drawData,M.finalDraw,y,i.addLinks,i.rehover,i.redrag,i.reselect,i.doAutoMargin,i.previousPromises);var _r=C.syncOrAsync(ui,De);return(!_r||!_r.then)&&(_r=Promise.resolve()),_r.then(function(){return p(De),De})}function p(De){var Ee=De._fullLayout;Ee._redrawFromAutoMarginCount?Ee._redrawFromAutoMarginCount--:De.emit("plotly_afterplot")}function x(De){return C.extendFlat(c,De)}function N(De,Ee){try{De._fullLayout._paper.style("background",Ee)}catch(Ae){C.error(Ae)}}function D(De,Ee){var Ae=h.combine(Ee,"white");N(De,Ae)}function B(De,Ee){if(!De._context){De._context=C.extendDeep({},c);var Ae=Z.select("base");De._context._baseUrl=Ae.size()&&Ae.attr("href")?window.location.href.split("#")[0]:""}var Ie=De._context,tt,st,Ft;if(Ee){for(st=Object.keys(Ee),tt=0;tt<st.length;tt++)Ft=st[tt],!(Ft==="editable"||Ft==="edits")&&Ft in Ie&&(Ft==="setBackground"&&Ee[Ft]==="opaque"?Ie[Ft]=D:Ie[Ft]=Ee[Ft]);var Nt=Ee.editable;if(Nt!==void 0)for(Ie.editable=Nt,st=Object.keys(Ie.edits),tt=0;tt<st.length;tt++)Ie.edits[st[tt]]=Nt;if(Ee.edits)for(st=Object.keys(Ee.edits),tt=0;tt<st.length;tt++)Ft=st[tt],Ft in Ie.edits&&(Ie.edits[Ft]=Ee.edits[Ft]);Ie._exportedPlot=Ee._exportedPlot}Ie.staticPlot&&(Ie.editable=!1,Ie.edits={},Ie.autosizable=!1,Ie.scrollZoom=!1,Ie.doubleClick=!1,Ie.showTips=!1,Ie.showLink=!1,Ie.displayModeBar=!1),Ie.displayModeBar==="hover"&&!w&&(Ie.displayModeBar=!0),(Ie.setBackground==="transparent"||typeof Ie.setBackground!="function")&&(Ie.setBackground=N),Ie._hasZeroHeight=Ie._hasZeroHeight||De.clientHeight===0,Ie._hasZeroWidth=Ie._hasZeroWidth||De.clientWidth===0;var Xt=Ie.scrollZoom,lr=Ie._scrollZoom={};if(Xt===!0)lr.cartesian=1,lr.gl3d=1,lr.geo=1,lr.mapbox=1,lr.map=1;else if(typeof Xt=="string"){var Rr=Xt.split("+");for(tt=0;tt<Rr.length;tt++)lr[Rr[tt]]=1}else Xt!==!1&&(lr.gl3d=1,lr.geo=1,lr.mapbox=1,lr.map=1)}function U(De){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De);return T.cleanData(De.data),T.cleanLayout(De.layout),De.calcdata=void 0,te._doPlot(De).then(function(){return De.emit("plotly_redraw"),De})}function V(De,Ee,Ae,Ie){return De=C.getGraphDiv(De),i.cleanPlot([],{},De._fullData||[],De._fullLayout||{}),i.purge(De),te._doPlot(De,Ee,Ae,Ie)}function q(De,Ee){var Ae=Ee+1,Ie=[],tt,st;for(tt=0;tt<De.length;tt++)st=De[tt],st<0?Ie.push(Ae+st):Ie.push(st);return Ie}function z(De,Ee,Ae){var Ie,tt;for(Ie=0;Ie<Ee.length;Ie++){if(tt=Ee[Ie],tt!==parseInt(tt,10))throw new Error("all values in "+Ae+" must be integers");if(tt>=De.data.length||tt<-De.data.length)throw new Error(Ae+" must be valid indices for gd.data.");if(Ee.indexOf(tt,Ie+1)>-1||tt>=0&&Ee.indexOf(-De.data.length+tt)>-1||tt<0&&Ee.indexOf(De.data.length+tt)>-1)throw new Error("each index in "+Ae+" must be unique.")}}function H(De,Ee,Ae){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ee>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ee)||(Ee=[Ee]),z(De,Ee,"currentIndices"),typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&z(De,Ae,"newIndices"),typeof Ae<"u"&&Ee.length!==Ae.length)throw new Error("current and new indices must be of equal length.")}function G(De,Ee,Ae){var Ie,tt;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ee>"u")throw new Error("traces must be defined.");for(Array.isArray(Ee)||(Ee=[Ee]),Ie=0;Ie<Ee.length;Ie++)if(tt=Ee[Ie],typeof tt!="object"||Array.isArray(tt)||tt===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ae<"u"&&!Array.isArray(Ae)&&(Ae=[Ae]),typeof Ae<"u"&&Ae.length!==Ee.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function J(De,Ee,Ae,Ie){var tt=C.isPlainObject(Ie);if(!Array.isArray(De.data))throw new Error("gd.data must be an array");if(!C.isPlainObject(Ee))throw new Error("update must be a key:value object");if(typeof Ae>"u")throw new Error("indices must be an integer or array of integers");z(De,Ae,"indices");for(var st in Ee){if(!Array.isArray(Ee[st])||Ee[st].length!==Ae.length)throw new Error("attribute "+st+" must be an array of length equal to indices array length");if(tt&&(!(st in Ie)||!Array.isArray(Ie[st])||Ie[st].length!==Ee[st].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function le(De,Ee,Ae,Ie){var tt=C.isPlainObject(Ie),st=[],Ft,Nt,Xt,lr,Rr;Array.isArray(Ae)||(Ae=[Ae]),Ae=q(Ae,De.data.length-1);for(var Mr in Ee)for(var Sr=0;Sr<Ae.length;Sr++){if(Ft=De.data[Ae[Sr]],Xt=P(Ft,Mr),Nt=Xt.get(),lr=Ee[Mr][Sr],!C.isArrayOrTypedArray(lr))throw new Error("attribute: "+Mr+" index: "+Sr+" must be an array");if(!C.isArrayOrTypedArray(Nt))throw new Error("cannot extend missing or non-array attribute: "+Mr);if(Nt.constructor!==lr.constructor)throw new Error("cannot extend array with an array of a different type: "+Mr);Rr=tt?Ie[Mr][Sr]:Ie,v(Rr)||(Rr=-1),st.push({prop:Xt,target:Nt,insert:lr,maxp:Math.floor(Rr)})}return st}function ye(De,Ee,Ae,Ie,tt){J(De,Ee,Ae,Ie);for(var st=le(De,Ee,Ae,Ie),Ft={},Nt={},Xt=0;Xt<st.length;Xt++){var lr=st[Xt].prop,Rr=st[Xt].maxp,Mr=tt(st[Xt].target,st[Xt].insert,Rr);lr.set(Mr[0]),Array.isArray(Ft[lr.astr])||(Ft[lr.astr]=[]),Ft[lr.astr].push(Mr[1]),Array.isArray(Nt[lr.astr])||(Nt[lr.astr]=[]),Nt[lr.astr].push(st[Xt].target.length)}return{update:Ft,maxPoints:Nt}}function de(De,Ee){var Ae=new De.constructor(De.length+Ee.length);return Ae.set(De),Ae.set(Ee,De.length),Ae}function me(De,Ee,Ae,Ie){De=C.getGraphDiv(De);function tt(Xt,lr,Rr){var Mr,Sr;if(C.isTypedArray(Xt))if(Rr<0){var Kr=new Xt.constructor(0),qn=de(Xt,lr);Rr<0?(Mr=qn,Sr=Kr):(Mr=Kr,Sr=qn)}else if(Mr=new Xt.constructor(Rr),Sr=new Xt.constructor(Xt.length+lr.length-Rr),Rr===lr.length)Mr.set(lr),Sr.set(Xt);else if(Rr<lr.length){var ha=lr.length-Rr;Mr.set(lr.subarray(ha)),Sr.set(Xt),Sr.set(lr.subarray(0,ha),Xt.length)}else{var ia=Rr-lr.length,xa=Xt.length-ia;Mr.set(Xt.subarray(xa)),Mr.set(lr,ia),Sr.set(Xt.subarray(0,xa))}else Mr=Xt.concat(lr),Sr=Rr>=0&&Rr<Mr.length?Mr.splice(0,Mr.length-Rr):[];return[Mr,Sr]}var st=ye(De,Ee,Ae,Ie,tt),Ft=te.redraw(De),Nt=[De,st.update,Ae,st.maxPoints];return r.add(De,te.prependTraces,Nt,me,arguments),Ft}function W(De,Ee,Ae,Ie){De=C.getGraphDiv(De);function tt(Xt,lr,Rr){var Mr,Sr;if(C.isTypedArray(Xt))if(Rr<=0){var Kr=new Xt.constructor(0),qn=de(lr,Xt);Rr<0?(Mr=qn,Sr=Kr):(Mr=Kr,Sr=qn)}else if(Mr=new Xt.constructor(Rr),Sr=new Xt.constructor(Xt.length+lr.length-Rr),Rr===lr.length)Mr.set(lr),Sr.set(Xt);else if(Rr<lr.length){var ha=lr.length-Rr;Mr.set(lr.subarray(0,ha)),Sr.set(lr.subarray(ha)),Sr.set(Xt,ha)}else{var ia=Rr-lr.length;Mr.set(lr),Mr.set(Xt.subarray(0,ia),lr.length),Sr.set(Xt.subarray(ia))}else Mr=lr.concat(Xt),Sr=Rr>=0&&Rr<Mr.length?Mr.splice(Rr,Mr.length):[];return[Mr,Sr]}var st=ye(De,Ee,Ae,Ie,tt),Ft=te.redraw(De),Nt=[De,st.update,Ae,st.maxPoints];return r.add(De,te.extendTraces,Nt,W,arguments),Ft}function ie(De,Ee,Ae){De=C.getGraphDiv(De);var Ie=[],tt=te.deleteTraces,st=ie,Ft=[De,Ie],Nt=[De,Ee],Xt,lr;for(G(De,Ee,Ae),Array.isArray(Ee)||(Ee=[Ee]),Ee=Ee.map(function(Rr){return C.extendFlat({},Rr)}),T.cleanData(Ee),Xt=0;Xt<Ee.length;Xt++)De.data.push(Ee[Xt]);for(Xt=0;Xt<Ee.length;Xt++)Ie.push(-Ee.length+Xt);if(typeof Ae>"u")return lr=te.redraw(De),r.add(De,tt,Ft,st,Nt),lr;Array.isArray(Ae)||(Ae=[Ae]);try{H(De,Ie,Ae)}catch(Rr){throw De.data.splice(De.data.length-Ee.length,Ee.length),Rr}return r.startSequence(De),r.add(De,tt,Ft,st,Nt),lr=te.moveTraces(De,Ie,Ae),r.stopSequence(De),lr}function se(De,Ee){De=C.getGraphDiv(De);var Ae=[],Ie=te.addTraces,tt=se,st=[De,Ae,Ee],Ft=[De,Ee],Nt,Xt;if(typeof Ee>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ee)||(Ee=[Ee]),z(De,Ee,"indices"),Ee=q(Ee,De.data.length-1),Ee.sort(C.sorterDes),Nt=0;Nt<Ee.length;Nt+=1)Xt=De.data.splice(Ee[Nt],1)[0],Ae.push(Xt);var lr=te.redraw(De);return r.add(De,Ie,st,tt,Ft),lr}function ee(De,Ee,Ae){De=C.getGraphDiv(De);var Ie=[],tt=[],st=ee,Ft=ee,Nt=[De,Ae,Ee],Xt=[De,Ee,Ae],lr;if(H(De,Ee,Ae),Ee=Array.isArray(Ee)?Ee:[Ee],typeof Ae>"u")for(Ae=[],lr=0;lr<Ee.length;lr++)Ae.push(-Ee.length+lr);for(Ae=Array.isArray(Ae)?Ae:[Ae],Ee=q(Ee,De.data.length-1),Ae=q(Ae,De.data.length-1),lr=0;lr<De.data.length;lr++)Ee.indexOf(lr)===-1&&Ie.push(De.data[lr]);for(lr=0;lr<Ee.length;lr++)tt.push({newIndex:Ae[lr],trace:De.data[Ee[lr]]});for(tt.sort(function(Mr,Sr){return Mr.newIndex-Sr.newIndex}),lr=0;lr<tt.length;lr+=1)Ie.splice(tt[lr].newIndex,0,tt[lr].trace);De.data=Ie;var Rr=te.redraw(De);return r.add(De,st,Nt,Ft,Xt),Rr}function pe(De,Ee,Ae,Ie){De=C.getGraphDiv(De),T.clearPromiseQueue(De);var tt={};if(typeof Ee=="string")tt[Ee]=Ae;else if(C.isPlainObject(Ee))tt=C.extendFlat({},Ee),Ie===void 0&&(Ie=Ae);else return C.warn("Restyle fail.",Ee,Ae,Ie),Promise.reject();Object.keys(tt).length&&(De.changed=!0);var st=T.coerceTraceIndices(De,Ie),Ft=_e(De,tt,st),Nt=Ft.flags;Nt.calc&&(De.calcdata=void 0),Nt.clearAxisTypes&&T.clearAxisTypes(De,st,{});var Xt=[];Nt.fullReplot?Xt.push(te._doPlot):(Xt.push(i.previousPromises),i.supplyDefaults(De),Nt.markerSize&&(i.doCalcdata(De),Ge(Xt)),Nt.style&&Xt.push(M.doTraceStyle),Nt.colorbars&&Xt.push(M.doColorBars),Xt.push(p)),Xt.push(i.rehover,i.redrag,i.reselect),r.add(De,pe,[De,Ft.undoit,Ft.traces],pe,[De,Ft.redoit,Ft.traces]);var lr=C.syncOrAsync(Xt,De);return(!lr||!lr.then)&&(lr=Promise.resolve()),lr.then(function(){return De.emit("plotly_restyle",Ft.eventData),De})}function oe(De){return De===void 0?null:De}function Y(De,Ee){return Ee?function(Ae,Ie,tt){var st=P(Ae,Ie),Ft=st.set;return st.set=function(Nt){var Xt=(tt||"")+Ie;ce(Xt,st.get(),Nt,De),Ft(Nt)},st}:P}function ce(De,Ee,Ae,Ie){if(Array.isArray(Ee)||Array.isArray(Ae))for(var tt=Array.isArray(Ee)?Ee:[],st=Array.isArray(Ae)?Ae:[],Ft=Math.max(tt.length,st.length),Nt=0;Nt<Ft;Nt++)ce(De+"["+Nt+"]",tt[Nt],st[Nt],Ie);else if(C.isPlainObject(Ee)||C.isPlainObject(Ae)){var Xt=C.isPlainObject(Ee)?Ee:{},lr=C.isPlainObject(Ae)?Ae:{},Rr=C.extendFlat({},Xt,lr);for(var Mr in Rr)ce(De+"."+Mr,Xt[Mr],lr[Mr],Ie)}else Ie[De]===void 0&&(Ie[De]=oe(Ee))}function ue(De,Ee,Ae){for(var Ie in Ae){var tt=P(De,Ie);ce(Ie,tt.get(),Ae[Ie],Ee)}}function _e(De,Ee,Ae){var Ie=De._fullLayout,tt=De._fullData,st=De.data,Ft=Ie._guiEditing,Nt=Y(Ie._preGUI,Ft),Xt=C.extendDeepAll({},Ee),lr,Rr=k.traceFlags(),Mr={},Sr={},Kr;function qn(){return Ae.map(function(){})}function ha(xr){var Wr=s.id2name(xr);Kr.indexOf(Wr)===-1&&Kr.push(Wr)}function ia(xr){return"LAYOUT"+xr+".autorange"}function xa(xr){return"LAYOUT"+xr+".range"}function ba(xr){for(var Wr=xr;Wr<tt.length;Wr++)if(tt[Wr]._input===st[xr])return tt[Wr]}function ea(xr,Wr,An){if(Array.isArray(xr)){xr.forEach(function(Sn){ea(Sn,Wr,An)});return}if(!(xr in Ee||T.hasParent(Ee,xr))){var Xn;if(xr.substr(0,6)==="LAYOUT")Xn=Nt(De.layout,xr.replace("LAYOUT",""));else{var na=Ae[An],ra=Ie._tracePreGUI[ba(na)._fullInput.uid];Xn=Y(ra,Ft)(st[na],xr)}xr in Sr||(Sr[xr]=qn()),Sr[xr][An]===void 0&&(Sr[xr][An]=oe(Xn.get())),Wr!==void 0&&Xn.set(Wr)}}function Za(xr){return function(Wr){return tt[Wr][xr]}}function ui(xr){return function(Wr,An){return Wr===!1?tt[Ae[An]][xr]:null}}for(var _r in Ee){if(T.hasParent(Ee,_r))throw new Error("cannot set "+_r+" and a parent attribute simultaneously");var Qt=Ee[_r],yr,br,nn,wn,Ln,Fn;if((_r==="autobinx"||_r==="autobiny")&&(_r=_r.charAt(_r.length-1)+"bins",Array.isArray(Qt)?Qt=Qt.map(ui(_r)):Qt===!1?Qt=Ae.map(Za(_r)):Qt=null),Mr[_r]=Qt,_r.substr(0,6)==="LAYOUT"){nn=Nt(De.layout,_r.replace("LAYOUT","")),Sr[_r]=[oe(nn.get())],nn.set(Array.isArray(Qt)?Qt[0]:Qt),Rr.calc=!0;continue}for(Sr[_r]=qn(),lr=0;lr<Ae.length;lr++){yr=st[Ae[lr]],br=ba(Ae[lr]);var va=Ie._tracePreGUI[br._fullInput.uid];if(nn=Y(va,Ft)(yr,_r),wn=nn.get(),Ln=Array.isArray(Qt)?Qt[lr%Qt.length]:Qt,Ln!==void 0){var Da=nn.parts[nn.parts.length-1],Pa=_r.substr(0,_r.length-Da.length-1),Fa=Pa?Pa+".":"",$a=Pa?P(br,Pa).get():br;if(Fn=l.getTraceValObject(br,nn.parts),Fn&&Fn.impliedEdits&&Ln!==null)for(var oa in Fn.impliedEdits)ea(C.relativeAttr(_r,oa),Fn.impliedEdits[oa],lr);else if((Da==="thicknessmode"||Da==="lenmode")&&wn!==Ln&&(Ln==="fraction"||Ln==="pixels")&&$a){var zi=Ie._size,Gi=$a.orient,qt=Gi==="top"||Gi==="bottom";if(Da==="thicknessmode"){var Ct=qt?zi.h:zi.w;ea(Fa+"thickness",$a.thickness*(Ln==="fraction"?1/Ct:Ct),lr)}else{var Ur=qt?zi.w:zi.h;ea(Fa+"len",$a.len*(Ln==="fraction"?1/Ur:Ur),lr)}}else if(_r==="type"&&(Ln==="pie"!=(wn==="pie")||Ln==="funnelarea"!=(wn==="funnelarea"))){var Qr="x",tn="y";(Ln==="bar"||wn==="bar")&&yr.orientation==="h"&&(Qr="y",tn="x"),C.swapAttrs(yr,["?","?src"],"labels",Qr),C.swapAttrs(yr,["d?","?0"],"label",Qr),C.swapAttrs(yr,["?","?src"],"values",tn),wn==="pie"||wn==="funnelarea"?(P(yr,"marker.color").set(P(yr,"marker.colors").get()),Ie._pielayer.selectAll("g.trace").remove()):a.traceIs(yr,"cartesian")&&P(yr,"marker.colors").set(P(yr,"marker.color").get())}Sr[_r][lr]=oe(wn);var Xr=["swapxy","swapxyaxes","orientation","orientationaxes"];if(Xr.indexOf(_r)!==-1){if(_r==="orientation"){nn.set(Ln);var en=yr.x&&!yr.y?"h":"v";if((nn.get()||en)===br.orientation)continue}else _r==="orientationaxes"&&(yr.orientation={v:"h",h:"v"}[br.orientation]);T.swapXYData(yr),Rr.calc=Rr.clearAxisTypes=!0}else i.dataArrayContainers.indexOf(nn.parts[0])!==-1?(T.manageArrayContainers(nn,Ln,Sr),Rr.calc=!0):(Fn?Fn.arrayOk&&!a.traceIs(br,"regl")&&(C.isArrayOrTypedArray(Ln)||C.isArrayOrTypedArray(wn))?Rr.calc=!0:k.update(Rr,Fn):Rr.calc=!0,nn.set(Ln))}}if(["swapxyaxes","orientationaxes"].indexOf(_r)!==-1&&s.swap(De,Ae),_r==="orientationaxes"){var Tn=P(De.layout,"hovermode"),hn=Tn.get();hn==="x"?Tn.set("y"):hn==="y"?Tn.set("x"):hn==="x unified"?Tn.set("y unified"):hn==="y unified"&&Tn.set("x unified")}if(["orientation","type"].indexOf(_r)!==-1){for(Kr=[],lr=0;lr<Ae.length;lr++){var Rt=st[Ae[lr]];a.traceIs(Rt,"cartesian")&&(ha(Rt.xaxis||"x"),ha(Rt.yaxis||"y"))}ea(Kr.map(ia),!0,0),ea(Kr.map(xa),[0,1],0)}}return(Rr.calc||Rr.plot)&&(Rr.fullReplot=!0),{flags:Rr,undoit:Sr,redoit:Mr,traces:Ae,eventData:C.extendDeepNoArrays([],[Xt,Ae])}}function Le(De,Ee,Ae){De=C.getGraphDiv(De),T.clearPromiseQueue(De);var Ie={};if(typeof Ee=="string")Ie[Ee]=Ae;else if(C.isPlainObject(Ee))Ie=C.extendFlat({},Ee);else return C.warn("Relayout fail.",Ee,Ae),Promise.reject();Object.keys(Ie).length&&(De.changed=!0);var tt=gt(De,Ie),st=tt.flags;st.calc&&(De.calcdata=void 0);var Ft=[i.previousPromises];st.layoutReplot?Ft.push(M.layoutReplot):Object.keys(Ie).length&&(ze(De,st,tt)||i.supplyDefaults(De),st.legend&&Ft.push(M.doLegend),st.layoutstyle&&Ft.push(M.layoutStyles),st.axrange&&Ge(Ft,tt.rangesAltered),st.ticks&&Ft.push(M.doTicksRelayout),st.modebar&&Ft.push(M.doModeBar),st.camera&&Ft.push(M.doCamera),st.colorbars&&Ft.push(M.doColorBars),Ft.push(p)),Ft.push(i.rehover,i.redrag,i.reselect),r.add(De,Le,[De,tt.undoit],Le,[De,tt.redoit]);var Nt=C.syncOrAsync(Ft,De);return(!Nt||!Nt.then)&&(Nt=Promise.resolve(De)),Nt.then(function(){return De.emit("plotly_relayout",tt.eventData),De})}function ze(De,Ee,Ae){var Ie=De._fullLayout;if(!Ee.axrange)return!1;for(var tt in Ee)if(tt!=="axrange"&&Ee[tt])return!1;var st,Ft,Nt=function(Kr,qn){return C.coerce(st,Ft,u,Kr,qn)},Xt={};for(var lr in Ae.rangesAltered){var Rr=s.id2name(lr);if(st=De.layout[Rr],Ft=Ie[Rr],o(st,Ft,Nt,Xt),Ft._matchGroup){for(var Mr in Ft._matchGroup)if(Mr!==lr){var Sr=Ie[s.id2name(Mr)];Sr.autorange=Ft.autorange,Sr.range=Ft.range.slice(),Sr._input.range=Ft.range.slice()}}}return!0}function Ge(De,Ee){var Ae=Ee?function(Ie){var tt=[],st=!0;for(var Ft in Ee){var Nt=s.getFromId(Ie,Ft);if(tt.push(Ft),(Nt.ticklabelposition||"").indexOf("inside")!==-1&&Nt._anchorAxis&&tt.push(Nt._anchorAxis._id),Nt._matchGroup)for(var Xt in Nt._matchGroup)Ee[Xt]||tt.push(Xt)}return s.draw(Ie,tt,{skipTitle:st})}:function(Ie){return s.draw(Ie,"redraw")};De.push(E,M.doAutoRangeAndConstraints,Ae,M.drawData,M.finalDraw)}var Ve=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,rt=/^[xyz]axis[0-9]*\.autorange$/,pt=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function gt(De,Ee){var Ae=De.layout,Ie=De._fullLayout,tt=Ie._guiEditing,st=Y(Ie._preGUI,tt),Ft=Object.keys(Ee),Nt=s.list(De),Xt=C.extendDeepAll({},Ee),lr={},Rr,Mr,Sr;for(Ft=Object.keys(Ee),Mr=0;Mr<Ft.length;Mr++)if(Ft[Mr].indexOf("allaxes")===0){for(Sr=0;Sr<Nt.length;Sr++){var Kr=Nt[Sr]._id.substr(1),qn=Kr.indexOf("scene")!==-1?Kr+".":"",ha=Ft[Mr].replace("allaxes",qn+Nt[Sr]._name);Ee[ha]||(Ee[ha]=Ee[Ft[Mr]])}delete Ee[Ft[Mr]]}var ia=k.layoutFlags(),xa={},ba={};function ea(ra,Sn){if(Array.isArray(ra)){ra.forEach(function(Fi){ea(Fi,Sn)});return}if(!(ra in Ee||T.hasParent(Ee,ra))){var Wn=st(Ae,ra);ra in ba||(ba[ra]=oe(Wn.get())),Sn!==void 0&&Wn.set(Sn)}}var Za={},ui;function _r(ra){var Sn=s.name2id(ra.split(".")[0]);return Za[Sn]=1,Sn}for(var Qt in Ee){if(T.hasParent(Ee,Qt))throw new Error("cannot set "+Qt+" and a parent attribute simultaneously");for(var yr=st(Ae,Qt),br=Ee[Qt],nn=yr.parts.length,wn=nn-1;wn>0&&typeof yr.parts[wn]!="string";)wn--;var Ln=yr.parts[wn],Fn=yr.parts[wn-1]+"."+Ln,va=yr.parts.slice(0,wn).join("."),Da=P(De.layout,va).get(),Pa=P(Ie,va).get(),Fa=yr.get();if(br!==void 0){xa[Qt]=br,ba[Qt]=Ln==="reverse"?br:oe(Fa);var $a=l.getLayoutValObject(Ie,yr.parts);if($a&&$a.impliedEdits&&br!==null)for(var oa in $a.impliedEdits)ea(C.relativeAttr(Qt,oa),$a.impliedEdits[oa]);if(["width","height"].indexOf(Qt)!==-1)if(br){ea("autosize",null);var zi=Qt==="height"?"width":"height";ea(zi,Ie[zi])}else Ie[Qt]=De._initialAutoSize[Qt];else if(Qt==="autosize")ea("width",br?null:Ie.width),ea("height",br?null:Ie.height);else if(Fn.match(Ve))_r(Fn),P(Ie,va+"._inputRange").set(null);else if(Fn.match(rt)){_r(Fn),P(Ie,va+"._inputRange").set(null);var Gi=P(Ie,va).get();Gi._inputDomain&&(Gi._input.domain=Gi._inputDomain.slice())}else Fn.match(pt)&&P(Ie,va+"._inputDomain").set(null);if(Ln==="type"){ui=Da;var qt=Pa.type==="linear"&&br==="log",Ct=Pa.type==="log"&&br==="linear";if(qt||Ct){if(!ui||!ui.range)ea(va+".autorange",!0);else if(Pa.autorange)qt&&(ui.range=ui.range[1]>ui.range[0]?[1,2]:[2,1]);else{var Ur=ui.range[0],Qr=ui.range[1];qt?(Ur<=0&&Qr<=0&&ea(va+".autorange",!0),Ur<=0?Ur=Qr/1e6:Qr<=0&&(Qr=Ur/1e6),ea(va+".range[0]",Math.log(Ur)/Math.LN10),ea(va+".range[1]",Math.log(Qr)/Math.LN10)):(ea(va+".range[0]",Math.pow(10,Ur)),ea(va+".range[1]",Math.pow(10,Qr)))}Array.isArray(Ie._subplots.polar)&&Ie._subplots.polar.length&&Ie[yr.parts[0]]&&yr.parts[1]==="radialaxis"&&delete Ie[yr.parts[0]]._subplot.viewInitial["radialaxis.range"],a.getComponentMethod("annotations","convertCoords")(De,Pa,br,ea),a.getComponentMethod("images","convertCoords")(De,Pa,br,ea)}else ea(va+".autorange",!0),ea(va+".range",null);P(Ie,va+"._inputRange").set(null)}else if(Ln.match(b)){var tn=P(Ie,Qt).get(),Xr=(br||{}).type;(!Xr||Xr==="-")&&(Xr="linear"),a.getComponentMethod("annotations","convertCoords")(De,tn,Xr,ea),a.getComponentMethod("images","convertCoords")(De,tn,Xr,ea)}var en=_.containerArrayMatch(Qt);if(en){Rr=en.array,Mr=en.index;var Tn=en.property,hn=$a||{editType:"calc"};Mr!==""&&Tn===""&&(_.isAddVal(br)?ba[Qt]=null:_.isRemoveVal(br)?ba[Qt]=(P(Ae,Rr).get()||[])[Mr]:C.warn("unrecognized full object value",Ee)),k.update(ia,hn),lr[Rr]||(lr[Rr]={});var Rt=lr[Rr][Mr];Rt||(Rt=lr[Rr][Mr]={}),Rt[Tn]=br,delete Ee[Qt]}else Ln==="reverse"?(Da.range?Da.range.reverse():(ea(va+".autorange",!0),Da.range=[1,0]),Pa.autorange?ia.calc=!0:ia.plot=!0):(Qt==="dragmode"&&(br===!1&&Fa!==!1||br!==!1&&Fa===!1)||Ie._has("scatter-like")&&Ie._has("regl")&&Qt==="dragmode"&&(br==="lasso"||br==="select")&&!(Fa==="lasso"||Fa==="select")?ia.plot=!0:$a?k.update(ia,$a):ia.calc=!0,yr.set(br))}}for(Rr in lr){var xr=_.applyContainerArrayChanges(De,st(Ae,Rr),lr[Rr],ia,st);xr||(ia.plot=!0)}for(var Wr in Za){ui=s.getFromId(De,Wr);var An=ui&&ui._constraintGroup;if(An){ia.calc=!0;for(var Xn in An)Za[Xn]||(s.getFromId(De,Xn)._constraintShrinkable=!0)}}(ht(De)||Ee.height||Ee.width)&&(ia.plot=!0);var na=Ie.shapes;for(Mr=0;Mr<na.length;Mr++)if(na[Mr].showlegend){ia.calc=!0;break}return(ia.plot||ia.calc)&&(ia.layoutReplot=!0),{flags:ia,rangesAltered:Za,undoit:ba,redoit:xa,eventData:Xt}}function ht(De){var Ee=De._fullLayout,Ae=Ee.width,Ie=Ee.height;return De.layout.autosize&&i.plotAutoSize(De,De.layout,Ee),Ee.width!==Ae||Ee.height!==Ie}function lt(De,Ee,Ae,Ie){De=C.getGraphDiv(De),T.clearPromiseQueue(De),C.isPlainObject(Ee)||(Ee={}),C.isPlainObject(Ae)||(Ae={}),Object.keys(Ee).length&&(De.changed=!0),Object.keys(Ae).length&&(De.changed=!0);var tt=T.coerceTraceIndices(De,Ie),st=_e(De,C.extendFlat({},Ee),tt),Ft=st.flags,Nt=gt(De,C.extendFlat({},Ae)),Xt=Nt.flags;(Ft.calc||Xt.calc)&&(De.calcdata=void 0),Ft.clearAxisTypes&&T.clearAxisTypes(De,tt,Ae);var lr=[];Xt.layoutReplot?lr.push(M.layoutReplot):Ft.fullReplot?lr.push(te._doPlot):(lr.push(i.previousPromises),ze(De,Xt,Nt)||i.supplyDefaults(De),Ft.style&&lr.push(M.doTraceStyle),(Ft.colorbars||Xt.colorbars)&&lr.push(M.doColorBars),Xt.legend&&lr.push(M.doLegend),Xt.layoutstyle&&lr.push(M.layoutStyles),Xt.axrange&&Ge(lr,Nt.rangesAltered),Xt.ticks&&lr.push(M.doTicksRelayout),Xt.modebar&&lr.push(M.doModeBar),Xt.camera&&lr.push(M.doCamera),lr.push(p)),lr.push(i.rehover,i.redrag,i.reselect),r.add(De,lt,[De,st.undoit,Nt.undoit,st.traces],lt,[De,st.redoit,Nt.redoit,st.traces]);var Rr=C.syncOrAsync(lr,De);return(!Rr||!Rr.then)&&(Rr=Promise.resolve(De)),Rr.then(function(){return De.emit("plotly_update",{data:st.eventData,layout:Nt.eventData}),De})}function Fe(De){return function(Ae){Ae._fullLayout._guiEditing=!0;var Ie=De.apply(null,arguments);return Ae._fullLayout._guiEditing=!1,Ie}}var Pe=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^(map\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],be=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Ye(De,Ee){for(var Ae=0;Ae<Ee.length;Ae++){var Ie=Ee[Ae],tt=De.match(Ie.pattern);if(tt){var st=tt[1]||"";return{head:st,tail:De.substr(st.length+1),attr:Ie.attr}}}}function mt(De,Ee){var Ae=P(Ee,De).get();if(Ae!==void 0)return Ae;var Ie=De.split(".");for(Ie.pop();Ie.length>1;)if(Ie.pop(),Ae=P(Ee,Ie.join(".")+".uirevision").get(),Ae!==void 0)return Ae;return Ee.uirevision}function bt(De,Ee){for(var Ae=0;Ae<Ee.length;Ae++)if(Ee[Ae]._fullInput.uid===De)return Ae;return-1}function ft(De,Ee,Ae){for(var Ie=0;Ie<Ee.length;Ie++)if(Ee[Ie].uid===De)return Ie;return!Ee[Ae]||Ee[Ae].uid?-1:Ae}function Wt(De,Ee){var Ae=C.isPlainObject(De),Ie=Array.isArray(De);return Ae||Ie?(Ae&&C.isPlainObject(Ee)||Ie&&Array.isArray(Ee))&&JSON.stringify(De)===JSON.stringify(Ee):De===Ee}function Zt(De,Ee,Ae,Ie){var tt=Ie._preGUI,st,Ft,Nt,Xt,lr,Rr,Mr,Sr,Kr,qn,ha=[],ia={},xa={};for(st in tt){if(lr=Ye(st,Pe),lr){if(Kr=lr.head,qn=lr.tail,Ft=lr.attr||Kr+".uirevision",Nt=P(Ie,Ft).get(),Xt=Nt&&mt(Ft,Ee),Xt&&Xt===Nt){if(Rr=tt[st],Rr===null&&(Rr=void 0),Mr=P(Ee,st),Sr=Mr.get(),Wt(Sr,Rr)){Sr===void 0&&qn==="autorange"&&ha.push(Kr),Mr.set(oe(P(Ie,st).get()));continue}else if(qn==="autorange"||qn.substr(0,6)==="range["){var ba=tt[Kr+".range[0]"],ea=tt[Kr+".range[1]"],Za=tt[Kr+".autorange"];if(Za||Za===null&&ba===null&&ea===null){if(!(Kr in ia)){var ui=P(Ee,Kr).get();ia[Kr]=ui&&(ui.autorange||ui.autorange!==!1&&(!ui.range||ui.range.length!==2))}if(ia[Kr]){Mr.set(oe(P(Ie,st).get()));continue}}}}}else C.warn("unrecognized GUI edit: "+st);delete tt[st],lr&&lr.tail.substr(0,6)==="range["&&(xa[lr.head]=1)}for(var _r=0;_r<ha.length;_r++){var Qt=ha[_r];if(xa[Qt]){var yr=P(Ee,Qt).get();yr&&delete yr.autorange}}var br=Ie._tracePreGUI;for(var nn in br){var wn=br[nn],Ln=null,Fn;for(st in wn){if(!Ln){var va=bt(nn,Ae);if(va<0){delete br[nn];break}var Da=Ae[va];Fn=Da._fullInput;var Pa=ft(nn,De,Fn.index);if(Pa<0){delete br[nn];break}Ln=De[Pa]}if(lr=Ye(st,be),lr){if(lr.attr?(Nt=P(Ie,lr.attr).get(),Xt=Nt&&mt(lr.attr,Ee)):(Nt=Fn.uirevision,Xt=Ln.uirevision,Xt===void 0&&(Xt=Ee.uirevision)),Xt&&Xt===Nt&&(Rr=wn[st],Rr===null&&(Rr=void 0),Mr=P(Ln,st),Sr=Mr.get(),Wt(Sr,Rr))){Mr.set(oe(P(Fn,st).get()));continue}}else C.warn("unrecognized GUI edit: "+st+" in trace uid "+nn);delete wn[st]}}}function cr(De,Ee,Ae,Ie){var tt,st;function Ft(){return te.addFrames(De,tt)}De=C.getGraphDiv(De),T.clearPromiseQueue(De);var Nt=De._fullData,Xt=De._fullLayout;if(!C.isPlotDiv(De)||!Nt||!Xt)st=te.newPlot(De,Ee,Ae,Ie);else{if(C.isPlainObject(Ee)){var lr=Ee;Ee=lr.data,Ae=lr.layout,Ie=lr.config,tt=lr.frames}var Rr=!1;if(Ie){const Fn=C.extendDeepAll({},De._context);De._context=void 0,B(De,Ie),Rr=!T.collectionsAreEqual(Fn,De._context)}if(Rr){const Fn=De._ev.eventNames().map(va=>[va,De._ev.listeners(va)]);st=te.newPlot(De,Ee,Ae,Ie).then(()=>{for(const[va,Da]of Fn)Da.forEach(Pa=>De.on(va,Pa));return te.react(De,Ee,Ae,Ie)})}else{De.data=Ee||[],T.cleanData(De.data),De.layout=Ae||{},T.cleanLayout(De.layout),Zt(De.data,De.layout,Nt,Xt),i.supplyDefaults(De,{skipUpdateCalc:!0});var Mr=De._fullData,Sr=De._fullLayout,Kr=Sr.datarevision===void 0,qn=Sr.transition,ha=Br(De,Xt,Sr,Kr,qn),ia=ha.newDataRevision,xa=pr(De,Nt,Mr,Kr,qn,ia);if(ht(De)&&(ha.layoutReplot=!0),xa.calc||ha.calc){De.calcdata=void 0;for(var ba=Object.getOwnPropertyNames(Sr),ea=0;ea<ba.length;ea++){var Za=ba[ea],ui=Za.substring(0,5);if(ui==="xaxis"||ui==="yaxis"){var _r=Sr[Za]._emptyCategories;_r&&_r()}}}else i.supplyDefaultsUpdateCalc(De.calcdata,Mr);var Qt=[];if(tt&&(De._transitionData={},i.createTransitionData(De),Qt.push(Ft)),Sr.transition&&(xa.anim||ha.anim))ha.ticks&&Qt.push(M.doTicksRelayout),i.doCalcdata(De),M.doAutoRangeAndConstraints(De),Qt.push(function(){return i.transitionFromReact(De,xa,ha,Xt)});else if(xa.fullReplot||ha.layoutReplot)De._fullLayout._skipDefaults=!0,Qt.push(te._doPlot);else{for(var yr in ha.arrays){var br=ha.arrays[yr];if(br.length){var nn=a.getComponentMethod(yr,"drawOne");if(nn!==C.noop)for(var wn=0;wn<br.length;wn++)nn(De,br[wn]);else{var Ln=a.getComponentMethod(yr,"draw");if(Ln===C.noop)throw new Error("cannot draw components: "+yr);Ln(De)}}}Qt.push(i.previousPromises),xa.style&&Qt.push(M.doTraceStyle),(xa.colorbars||ha.colorbars)&&Qt.push(M.doColorBars),ha.legend&&Qt.push(M.doLegend),ha.layoutstyle&&Qt.push(M.layoutStyles),ha.axrange&&Ge(Qt),ha.ticks&&Qt.push(M.doTicksRelayout),ha.modebar&&Qt.push(M.doModeBar),ha.camera&&Qt.push(M.doCamera),Qt.push(p)}Qt.push(i.rehover,i.redrag,i.reselect),st=C.syncOrAsync(Qt,De),(!st||!st.then)&&(st=Promise.resolve(De))}}return st.then(()=>(Rr||De.emit("plotly_react",{config:Ie,data:Ee,layout:Ae}),De))}function pr(De,Ee,Ae,Ie,tt,st){var Ft=Ee.length===Ae.length;if(!tt&&!Ft)return{fullReplot:!0,calc:!0};var Nt=k.traceFlags();Nt.arrays={},Nt.nChanges=0,Nt.nChangesAnim=0;var Xt,lr;function Rr(Kr){var qn=l.getTraceValObject(lr,Kr);return!lr._module.animatable&&qn.anim&&(qn.anim=!1),qn}var Mr={getValObject:Rr,flags:Nt,immutable:Ie,transition:tt,newDataRevision:st,gd:De},Sr={};for(Xt=0;Xt<Ee.length;Xt++)if(Ae[Xt]){if(lr=Ae[Xt]._fullInput,Sr[lr.uid])continue;Sr[lr.uid]=1,Fr(Ee[Xt]._fullInput,lr,[],Mr)}return(Nt.calc||Nt.plot)&&(Nt.fullReplot=!0),tt&&Nt.nChanges&&Nt.nChangesAnim&&(Nt.anim=Nt.nChanges===Nt.nChangesAnim&&Ft?"all":"some"),Nt}function Br(De,Ee,Ae,Ie,tt){var st=k.layoutFlags();st.arrays={},st.rangesAltered={},st.nChanges=0,st.nChangesAnim=0;function Ft(Sr){return l.getLayoutValObject(Ae,Sr)}for(var Nt in Ae)if(!(!Nt.startsWith("xaxis")&&!Nt.startsWith("yaxis"))&&Ee[Nt]){var Xt=Ae[Nt].domain,lr=Ee[Nt].domain,Rr=Ee[Nt]._inputDomain;Ee[Nt]._inputDomain&&(Xt[0]===Rr[0]&&Xt[1]===Rr[1]?Ae[Nt].domain=Ee[Nt].domain:(Xt[0]!==lr[0]||Xt[1]!==lr[1])&&(Ae[Nt]._inputDomain=null))}var Mr={getValObject:Ft,flags:st,immutable:Ie,transition:tt,gd:De};return Fr(Ee,Ae,[],Mr),(st.plot||st.calc)&&(st.layoutReplot=!0),tt&&st.nChanges&&st.nChangesAnim&&(st.anim=st.nChanges===st.nChangesAnim?"all":"some"),st}function Fr(De,Ee,Ae,Ie){var tt,st,Ft,Nt=Ie.getValObject,Xt=Ie.flags,lr=Ie.immutable,Rr=Ie.inArray,Mr=Ie.arrayIndex;function Sr(){var va=tt.editType;if(Rr&&va.indexOf("arraydraw")!==-1){C.pushUnique(Xt.arrays[Rr],Mr);return}k.update(Xt,tt),va!=="none"&&Xt.nChanges++,Ie.transition&&tt.anim&&Xt.nChangesAnim++,(Ve.test(Ft)||rt.test(Ft))&&(Xt.rangesAltered[Ae[0]]=1),st==="datarevision"&&(Xt.newDataRevision=1)}function Kr(va){return va.valType==="data_array"||va.arrayOk}for(st in De){if(Xt.calc&&!Ie.transition)return;var qn=De[st],ha=Ee[st],ia=Ae.concat(st);if(Ft=ia.join("."),!(st.charAt(0)==="_"||typeof qn=="function"||qn===ha)){if((st==="tick0"||st==="dtick")&&Ae[0]!=="geo"){var xa=Ee.tickmode;if(xa==="auto"||xa==="array"||!xa)continue}if(!(st==="range"&&Ee.autorange)&&!((st==="zmin"||st==="zmax")&&Ee.type==="contourcarpet")&&(tt=Nt(ia),!!tt&&!(tt._compareAsJSON&&JSON.stringify(qn)===JSON.stringify(ha)))){var ba=tt.valType,ea,Za=Kr(tt),ui=Array.isArray(qn),_r=Array.isArray(ha);if(ui&&_r){var Qt="_input_"+st,yr=De[Qt],br=Ee[Qt];if(Array.isArray(yr)&&yr===br)continue}if(ha===void 0)Za&&ui?Xt.calc=!0:Sr();else if(tt._isLinkedToArray){var nn=[],wn=!1;Rr||(Xt.arrays[st]=nn);var Ln=Math.min(qn.length,ha.length),Fn=Math.max(qn.length,ha.length);if(Ln!==Fn)if(tt.editType==="arraydraw")wn=!0;else{Sr();continue}for(ea=0;ea<Ln;ea++)Fr(qn[ea],ha[ea],ia.concat(ea),C.extendFlat({inArray:st,arrayIndex:ea},Ie));if(wn)for(ea=Ln;ea<Fn;ea++)nn.push(ea)}else!ba&&C.isPlainObject(qn)?Fr(qn,ha,ia,Ie):Za?ui&&_r?(lr&&(Xt.calc=!0),(lr||Ie.newDataRevision)&&Sr()):ui!==_r?Xt.calc=!0:Sr():ui&&_r?(qn.length!==ha.length||String(qn)!==String(ha))&&Sr():Sr()}}}for(st in Ee)if(!(st in De||st.charAt(0)==="_"||typeof Ee[st]=="function"))if(tt=Nt(Ae.concat(st)),Kr(tt)&&Array.isArray(Ee[st])){Xt.calc=!0;return}else Sr()}function cn(De,Ee,Ae){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var Ie=De._transitionData;Ie._frameQueue||(Ie._frameQueue=[]),Ae=i.supplyAnimationDefaults(Ae);var tt=Ae.transition,st=Ae.frame;Ie._frameWaitingCnt===void 0&&(Ie._frameWaitingCnt=0);function Ft(lr){return Array.isArray(tt)?lr>=tt.length?tt[0]:tt[lr]:tt}function Nt(lr){return Array.isArray(st)?lr>=st.length?st[0]:st[lr]:st}function Xt(lr,Rr){var Mr=0;return function(){if(lr&&++Mr===Rr)return lr()}}return new Promise(function(lr,Rr){function Mr(){if(Ie._frameQueue.length!==0){for(;Ie._frameQueue.length;){var Ln=Ie._frameQueue.pop();Ln.onInterrupt&&Ln.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Sr(Ln){if(Ln.length!==0){for(var Fn=0;Fn<Ln.length;Fn++){var va;Ln[Fn].type==="byname"?va=i.computeFrame(De,Ln[Fn].name):va=Ln[Fn].data;var Da=Nt(Fn),Pa=Ft(Fn);Pa.duration=Math.min(Pa.duration,Da.duration);var Fa={frame:va,name:Ln[Fn].name,frameOpts:Da,transitionOpts:Pa};Fn===Ln.length-1&&(Fa.onComplete=Xt(lr,2),Fa.onInterrupt=Rr),Ie._frameQueue.push(Fa)}Ae.mode==="immediate"&&(Ie._lastFrameAt=-1/0),Ie._animationRaf||ha()}}function Kr(){De.emit("plotly_animated"),window.cancelAnimationFrame(Ie._animationRaf),Ie._animationRaf=null}function qn(){Ie._currentFrame&&Ie._currentFrame.onComplete&&Ie._currentFrame.onComplete();var Ln=Ie._currentFrame=Ie._frameQueue.shift();if(Ln){var Fn=Ln.name?Ln.name.toString():null;De._fullLayout._currentFrame=Fn,Ie._lastFrameAt=Date.now(),Ie._timeToNext=Ln.frameOpts.duration,i.transition(De,Ln.frame.data,Ln.frame.layout,T.coerceTraceIndices(De,Ln.frame.traces),Ln.frameOpts,Ln.transitionOpts).then(function(){Ln.onComplete&&Ln.onComplete()}),De.emit("plotly_animatingframe",{name:Fn,frame:Ln.frame,animation:{frame:Ln.frameOpts,transition:Ln.transitionOpts}})}else Kr()}function ha(){De.emit("plotly_animating"),Ie._lastFrameAt=-1/0,Ie._timeToNext=0,Ie._runningTransitions=0,Ie._currentFrame=null;var Ln=function(){Ie._animationRaf=window.requestAnimationFrame(Ln),Date.now()-Ie._lastFrameAt>Ie._timeToNext&&qn()};Ln()}var ia=0;function xa(Ln){return Array.isArray(tt)?ia>=tt.length?Ln.transitionOpts=tt[ia]:Ln.transitionOpts=tt[0]:Ln.transitionOpts=tt,ia++,Ln}var ba,ea,Za=[],ui=Ee==null,_r=Array.isArray(Ee),Qt=!ui&&!_r&&C.isPlainObject(Ee);if(Qt)Za.push({type:"object",data:xa(C.extendFlat({},Ee))});else if(ui||["string","number"].indexOf(typeof Ee)!==-1)for(ba=0;ba<Ie._frames.length;ba++)ea=Ie._frames[ba],ea&&(ui||String(ea.group)===String(Ee))&&Za.push({type:"byname",name:String(ea.name),data:xa({name:ea.name})});else if(_r)for(ba=0;ba<Ee.length;ba++){var yr=Ee[ba];["number","string"].indexOf(typeof yr)!==-1?(yr=String(yr),Za.push({type:"byname",name:yr,data:xa({name:yr})})):C.isPlainObject(yr)&&Za.push({type:"object",data:xa(C.extendFlat({},yr))})}for(ba=0;ba<Za.length;ba++)if(ea=Za[ba],ea.type==="byname"&&!Ie._frameHash[ea.data.name]){C.warn('animate failure: frame not found: "'+ea.data.name+'"'),Rr();return}["next","immediate"].indexOf(Ae.mode)!==-1&&Mr(),Ae.direction==="reverse"&&Za.reverse();var br=De._fullLayout._currentFrame;if(br&&Ae.fromcurrent){var nn=-1;for(ba=0;ba<Za.length;ba++)if(ea=Za[ba],ea.type==="byname"&&ea.name===br){nn=ba;break}if(nn>0&&nn<Za.length-1){var wn=[];for(ba=0;ba<Za.length;ba++)ea=Za[ba],(Za[ba].type!=="byname"||ba>nn)&&wn.push(ea);Za=wn}}Za.length>0?Sr(Za):(De.emit("plotly_animated"),lr())})}function Nr(De,Ee,Ae){if(De=C.getGraphDiv(De),Ee==null)return Promise.resolve();if(!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ie,tt,st,Ft,Nt=De._transitionData._frames,Xt=De._transitionData._frameHash;if(!Array.isArray(Ee))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ee);var lr=Nt.length+Ee.length*2,Rr=[],Mr={};for(Ie=Ee.length-1;Ie>=0;Ie--)if(C.isPlainObject(Ee[Ie])){var Sr=Ee[Ie].name,Kr=(Xt[Sr]||Mr[Sr]||{}).name,qn=Ee[Ie].name,ha=Xt[Kr]||Mr[Kr];Kr&&qn&&typeof qn=="number"&&ha&&A<g&&(A++,C.warn('addFrames: overwriting frame "'+(Xt[Kr]||Mr[Kr]).name+'" with a frame whose name of type "number" also equates to "'+Kr+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),A===g&&C.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),Mr[Sr]={name:Sr},Rr.push({frame:i.supplyFrameDefaults(Ee[Ie]),index:Ae&&Ae[Ie]!==void 0&&Ae[Ie]!==null?Ae[Ie]:lr+Ie})}Rr.sort(function(Qt,yr){return Qt.index>yr.index?-1:Qt.index<yr.index?1:0});var ia=[],xa=[],ba=Nt.length;for(Ie=Rr.length-1;Ie>=0;Ie--){if(tt=Rr[Ie].frame,typeof tt.name=="number"&&C.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!tt.name)for(;Xt[tt.name="frame "+De._transitionData._counter++];);if(Xt[tt.name]){for(st=0;st<Nt.length&&(Nt[st]||{}).name!==tt.name;st++);ia.push({type:"replace",index:st,value:tt}),xa.unshift({type:"replace",index:st,value:Nt[st]})}else Ft=Math.max(0,Math.min(Rr[Ie].index,ba)),ia.push({type:"insert",index:Ft,value:tt}),xa.unshift({type:"delete",index:Ft}),ba++}var ea=i.modifyFrames,Za=i.modifyFrames,ui=[De,xa],_r=[De,ia];return r&&r.add(De,ea,ui,Za,_r),i.modifyFrames(De,ia)}function Jr(De,Ee){if(De=C.getGraphDiv(De),!C.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De);var Ae,Ie,tt=De._transitionData._frames,st=[],Ft=[];if(!Ee)for(Ee=[],Ae=0;Ae<tt.length;Ae++)Ee.push(Ae);for(Ee=Ee.slice(),Ee.sort(),Ae=Ee.length-1;Ae>=0;Ae--)Ie=Ee[Ae],st.push({type:"delete",index:Ie}),Ft.unshift({type:"insert",index:Ie,value:tt[Ie]});var Nt=i.modifyFrames,Xt=i.modifyFrames,lr=[De,Ft],Rr=[De,st];return r&&r.add(De,Nt,lr,Xt,Rr),i.modifyFrames(De,st)}function Dt(De){De=C.getGraphDiv(De);var Ee=De._fullLayout||{},Ae=De._fullData||[];return i.cleanPlot([],{},Ae,Ee),i.purge(De),t.purge(De),Ee._container&&Ee._container.remove(),delete De._context,De}function $e(De){var Ee=De._fullLayout,Ae=De.getBoundingClientRect();if(!C.equalDomRects(Ae,Ee._lastBBox)){var Ie=Ee._invTransform=C.inverseTransformMatrix(C.getFullTransformMatrix(De));Ee._invScaleX=Math.sqrt(Ie[0][0]*Ie[0][0]+Ie[0][1]*Ie[0][1]+Ie[0][2]*Ie[0][2]),Ee._invScaleY=Math.sqrt(Ie[1][0]*Ie[1][0]+Ie[1][1]*Ie[1][1]+Ie[1][2]*Ie[1][2]),Ee._lastBBox=Ae}}function ot(De){var Ee=Z.select(De),Ae=De._fullLayout;if(Ae._calcInverseTransform=$e,Ae._calcInverseTransform(De),Ae._container=Ee.selectAll(".plot-container").data([0]),Ae._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ae._paperdiv=Ae._container.selectAll(".svg-container").data([0]),Ae._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ae._glcontainer=Ae._paperdiv.selectAll(".gl-container").data([{}]),Ae._glcontainer.enter().append("div").classed("gl-container",!0),Ae._paperdiv.selectAll(".main-svg").remove(),Ae._paperdiv.select(".modebar-container").remove(),Ae._paper=Ae._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ae._toppaper=Ae._paperdiv.append("svg").classed("main-svg",!0),Ae._modebardiv=Ae._paperdiv.append("div"),delete Ae._modeBar,Ae._hoverpaper=Ae._paperdiv.append("svg").classed("main-svg",!0),!Ae._uid){var Ie={};Z.selectAll("defs").each(function(){this.id&&(Ie[this.id.split("-")[1]]=1)}),Ae._uid=C.randstr(Ie)}Ae._paperdiv.selectAll(".main-svg").attr(m.svgAttrs),Ae._defs=Ae._paper.append("defs").attr("id","defs-"+Ae._uid),Ae._clips=Ae._defs.append("g").classed("clips",!0),Ae._topdefs=Ae._toppaper.append("defs").attr("id","topdefs-"+Ae._uid),Ae._topclips=Ae._topdefs.append("g").classed("clips",!0),Ae._bgLayer=Ae._paper.append("g").classed("bglayer",!0),Ae._draggers=Ae._paper.append("g").classed("draglayer",!0);var tt=Ae._paper.append("g").classed("layer-below",!0);Ae._imageLowerLayer=tt.append("g").classed("imagelayer",!0),Ae._shapeLowerLayer=tt.append("g").classed("shapelayer",!0),Ae._cartesianlayer=Ae._paper.append("g").classed("cartesianlayer",!0),Ae._polarlayer=Ae._paper.append("g").classed("polarlayer",!0),Ae._smithlayer=Ae._paper.append("g").classed("smithlayer",!0),Ae._ternarylayer=Ae._paper.append("g").classed("ternarylayer",!0),Ae._geolayer=Ae._paper.append("g").classed("geolayer",!0),Ae._funnelarealayer=Ae._paper.append("g").classed("funnelarealayer",!0),Ae._pielayer=Ae._paper.append("g").classed("pielayer",!0),Ae._iciclelayer=Ae._paper.append("g").classed("iciclelayer",!0),Ae._treemaplayer=Ae._paper.append("g").classed("treemaplayer",!0),Ae._sunburstlayer=Ae._paper.append("g").classed("sunburstlayer",!0),Ae._indicatorlayer=Ae._toppaper.append("g").classed("indicatorlayer",!0),Ae._glimages=Ae._paper.append("g").classed("glimages",!0);var st=Ae._toppaper.append("g").classed("layer-above",!0);Ae._imageUpperLayer=st.append("g").classed("imagelayer",!0),Ae._shapeUpperLayer=st.append("g").classed("shapelayer",!0),Ae._selectionLayer=Ae._toppaper.append("g").classed("selectionlayer",!0),Ae._infolayer=Ae._toppaper.append("g").classed("infolayer",!0),Ae._menulayer=Ae._toppaper.append("g").classed("menulayer",!0),Ae._zoomlayer=Ae._toppaper.append("g").classed("zoomlayer",!0),Ae._hoverlayer=Ae._hoverpaper.append("g").classed("hoverlayer",!0),Ae._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}te.animate=cn,te.addFrames=Nr,te.deleteFrames=Jr,te.addTraces=ie,te.deleteTraces=se,te.extendTraces=me,te.moveTraces=ee,te.prependTraces=W,te.newPlot=V,te._doPlot=f,te.purge=Dt,te.react=cr,te.redraw=U,te.relayout=Le,te.restyle=pe,te.setPlotConfig=x,te.update=lt,te._guiRelayout=Fe(Le),te._guiRestyle=Fe(pe),te._guiUpdate=Fe(lt),te._storeDirectGUIEdit=ue}}),i0=Ne({"src/snapshot/helpers.js"(te){var Z=Xo();te.getDelay=function(C){return C._has&&(C._has("gl3d")||C._has("mapbox")||C._has("map"))?500:0},te.getRedrawFunc=function(C){return function(){Z.getComponentMethod("colorbar","draw")(C)}},te.encodeSVG=function(C){return"data:image/svg+xml,"+encodeURIComponent(C)},te.encodeJSON=function(C){return"data:application/json,"+encodeURIComponent(C)};var v=window.URL||window.webkitURL;te.createObjectURL=function(C){return v.createObjectURL(C)},te.revokeObjectURL=function(C){return v.revokeObjectURL(C)},te.createBlob=function(C,P){if(P==="svg")return new window.Blob([C],{type:"image/svg+xml;charset=utf-8"});if(P==="full-json")return new window.Blob([C],{type:"application/json;charset=utf-8"});var t=w(window.atob(C));return new window.Blob([t],{type:"image/"+P})},te.octetStream=function(C){document.location.href="data:application/octet-stream"+C};function w(C){for(var P=C.length,t=new ArrayBuffer(P),r=new Uint8Array(t),a=0;a<P;a++)r[a]=C.charCodeAt(a);return t}te.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/}}),Hp=Ne({"src/snapshot/tosvg.js"(te,Z){var v=xn();In();var w=zs(),C=io();cp();var P=/"/g,t="TOBESTRIPPED",r=new RegExp('("'+t+")|("+t+'")',"g");function a(i){var s=v.select("body").append("div").style({display:"none"}).html(""),o=i.replace(/(&[^;]*;)/gi,function(u){return u==="&lt;"?"&#60;":u==="&rt;"?"&#62;":u.indexOf("<")!==-1||u.indexOf(">")!==-1?"":s.html(u).text()});return s.remove(),o}function l(i){return i.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")}Z.exports=function(s,o,u){var d=s._fullLayout,h=d._paper,y=d._toppaper,m=d.width,E=d.height,c;h.insert("rect",":first-child").call(w.setRect,0,0,m,E).call(C.fill,d.paper_bgcolor);var _=d._basePlotModules||[];for(c=0;c<_.length;c++){var T=_[c];T.toSVG&&T.toSVG(s)}if(y){var M=y.node().childNodes,k=Array.prototype.slice.call(M);for(c=0;c<k.length;c++){var b=k[c];b.childNodes.length&&h.node().appendChild(b)}}d._draggers&&d._draggers.remove(),h.node().style.background="",h.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var g=v.select(this);if(this.style.visibility==="hidden"||this.style.display==="none"){g.remove();return}else g.style({visibility:null,display:null});var f=this.style.fontFamily;f&&f.indexOf('"')!==-1&&g.style("font-family",f.replace(P,t));var p=this.style.fontWeight;p&&(p==="normal"||p==="400")&&g.style("font-weight",void 0);var x=this.style.fontStyle;x&&x==="normal"&&g.style("font-style",void 0);var N=this.style.fontVariant;N&&N==="normal"&&g.style("font-variant",void 0)}),h.selectAll(".gradient_filled,.pattern_filled").each(function(){var g=v.select(this),f=this.style.fill;f&&f.indexOf("url(")!==-1&&g.style("fill",f.replace(P,t));var p=this.style.stroke;p&&p.indexOf("url(")!==-1&&g.style("stroke",p.replace(P,t))}),(o==="pdf"||o==="eps")&&h.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),o==="svg"&&u&&(h.attr("width",u*m),h.attr("height",u*E),h.attr("viewBox","0 0 "+m+" "+E));var A=new window.XMLSerializer().serializeToString(h.node());return A=a(A),A=l(A),A=A.replace(r,"'"),A}}}),q1=Ne({"src/snapshot/svgtoimg.js"(te,Z){var v=In(),w=F0().EventEmitter,C=i0();function P(t){var r=t.emitter||new w,a=new Promise(function(l,i){var s=window.Image,o=t.svg,u=t.format||"png",d=t.canvas,h=t.scale||1,y=t.width||300,m=t.height||150,E=h*y,c=h*m,_=d.getContext("2d",{willReadFrequently:!0}),T=new s,M,k;u==="svg"||v.isSafari()?k=C.encodeSVG(o):(M=C.createBlob(o,"svg"),k=C.createObjectURL(M)),d.width=E,d.height=c,T.onload=function(){var b;switch(M=null,C.revokeObjectURL(k),u!=="svg"&&_.drawImage(T,0,0,E,c),u){case"jpeg":b=d.toDataURL("image/jpeg");break;case"png":b=d.toDataURL("image/png");break;case"webp":b=d.toDataURL("image/webp");break;case"svg":b=k;break;default:var A="Image format is not jpeg, png, svg or webp.";if(i(new Error(A)),!t.promise)return r.emit("error",A)}l(b),t.promise||r.emit("success",b)},T.onerror=function(b){if(M=null,C.revokeObjectURL(k),i(b),!t.promise)return r.emit("error",b)},T.src=k});return t.promise?a:r}Z.exports=P}}),Gp=Ne({"src/plot_api/to_image.js"(te,Z){var v=la(),w=Uw(),C=uf(),P=In(),t=i0(),r=Hp(),a=q1(),l=dn().version,i={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 s(o,u){u=u||{};var d,h,y,m;P.isPlainObject(o)?(d=o.data||[],h=o.layout||{},y=o.config||{},m={}):(o=P.getGraphDiv(o),d=P.extendDeep([],o.data),h=P.extendDeep({},o.layout),y=o._context,m=o._fullLayout||{});function E(V){return!(V in u)||P.validate(u[V],i[V])}if(!E("width")&&u.width!==null||!E("height")&&u.height!==null)throw new Error("Height and width should be pixel values.");if(!E("format"))throw new Error("Export format is not "+P.join2(i.format.values,", "," or ")+".");var c={};function _(V,q){return P.coerce(u,c,i,V,q)}var T=_("format"),M=_("width"),k=_("height"),b=_("scale"),A=_("setBackground"),g=_("imageDataOnly"),f=document.createElement("div");f.style.position="absolute",f.style.left="-5000px",document.body.appendChild(f);var p=P.extendFlat({},h);M?p.width=M:u.width===null&&v(m.width)&&(p.width=m.width),k?p.height=k:u.height===null&&v(m.height)&&(p.height=m.height);var x=P.extendFlat({},y,{_exportedPlot:!0,staticPlot:!0,setBackground:A}),N=t.getRedrawFunc(f);function D(){return new Promise(function(V){setTimeout(V,t.getDelay(f._fullLayout))})}function B(){return new Promise(function(V,q){var z=r(f,T,b),H=f._fullLayout.width,G=f._fullLayout.height;function J(){w.purge(f),document.body.removeChild(f)}if(T==="full-json"){var le=C.graphJson(f,!1,"keepdata","object",!0,!0);return le.version=l,le=JSON.stringify(le),J(),V(g?le:t.encodeJSON(le))}if(J(),T==="svg")return V(g?z:t.encodeSVG(z));var ye=document.createElement("canvas");ye.id=P.randstr(),a({format:T,width:H,height:G,scale:b,canvas:ye,svg:z,promise:!0}).then(V).catch(q)})}function U(V){return g?V.replace(t.IMAGE_URL_PREFIX,""):V}return new Promise(function(V,q){w.newPlot(f,d,p,x).then(N).then(D).then(B).then(function(z){V(U(z))}).catch(function(z){q(z)})})}Z.exports=s}}),V1=Ne({"src/plot_api/validate.js"(te,Z){var v=In(),w=uf(),C=B1(),P=gd().dfltConfig,t=v.isPlainObject,r=Array.isArray,a=v.isArrayOrTypedArray;Z.exports=function(_,T){_===void 0&&(_=[]),T===void 0&&(T={});var M=C.get(),k=[],b={_context:v.extendFlat({},P)},A,g;r(_)?(b.data=v.extendDeep([],_),A=_):(b.data=[],A=[],k.push(u("array","data"))),t(T)?(b.layout=v.extendDeep({},T),g=T):(b.layout={},g={},arguments.length>1&&k.push(u("object","layout"))),w.supplyDefaults(b);for(var f=b._fullData,p=A.length,x=0;x<p;x++){var N=A[x],D=["data",x];if(!t(N)){k.push(u("object",D));continue}var B=f[x],U=B.type,V=M.traces[U].attributes;V.type={valType:"enumerated",values:[U]},B.visible===!1&&N.visible!==!1&&k.push(u("invisible",D)),l(N,B,V,k,D)}var q=b._fullLayout,z=i(M,f);return l(g,q,z,k,"layout"),k.length===0?void 0:k};function l(c,_,T,M,k,b){b=b||[];for(var A=Object.keys(c),g=0;g<A.length;g++){var f=A[g],p=b.slice();p.push(f);var x=c[f],N=_[f],D=h(T,f),B=(D||{}).valType,U=B==="info_array",V=B==="colorscale",q=(D||{}).items;if(!d(T,f))M.push(u("schema",k,p));else if(t(x)&&t(N)&&B!=="any")l(x,N,D,M,k,p);else if(U&&r(x)){x.length>N.length&&M.push(u("unused",k,p.concat(N.length)));var z=N.length,H=Array.isArray(q);H&&(z=Math.min(z,q.length));var G,J,le,ye,de;if(D.dimensions===2)for(J=0;J<z;J++)if(r(x[J])){x[J].length>N[J].length&&M.push(u("unused",k,p.concat(J,N[J].length)));var me=N[J].length;for(G=0;G<(H?Math.min(me,q[J].length):me);G++)le=H?q[J][G]:q,ye=x[J][G],de=N[J][G],v.validate(ye,le)?de!==ye&&de!==+ye&&M.push(u("dynamic",k,p.concat(J,G),ye,de)):M.push(u("value",k,p.concat(J,G),ye))}else M.push(u("array",k,p.concat(J),x[J]));else for(J=0;J<z;J++)le=H?q[J]:q,ye=x[J],de=N[J],v.validate(ye,le)?de!==ye&&de!==+ye&&M.push(u("dynamic",k,p.concat(J),ye,de)):M.push(u("value",k,p.concat(J),ye))}else if(D.items&&!U&&r(x)){var W=q[Object.keys(q)[0]],ie=[],se,ee;for(se=0;se<N.length;se++){var pe=N[se]._index||se;if(ee=p.slice(),ee.push(pe),t(x[pe])&&t(N[se])){ie.push(pe);var oe=x[pe],Y=N[se];t(oe)&&oe.visible!==!1&&Y.visible===!1?M.push(u("invisible",k,ee)):l(oe,Y,W,M,k,ee)}}for(se=0;se<x.length;se++)ee=p.slice(),ee.push(se),t(x[se])?ie.indexOf(se)===-1&&M.push(u("unused",k,ee)):M.push(u("object",k,ee,x[se]))}else!t(x)&&t(N)?M.push(u("object",k,p,x)):!a(x)&&a(N)&&!U&&!V?M.push(u("array",k,p,x)):f in _?v.validate(x,D)?D.valType==="enumerated"&&(D.coerceNumber&&x!==+N||!a(x)&&x!==N||String(x)!==String(N))&&M.push(u("dynamic",k,p,x,N)):M.push(u("value",k,p,x)):M.push(u("unused",k,p,x))}return M}function i(c,_){for(var T=c.layout.layoutAttributes,M=0;M<_.length;M++){var k=_[M],b=c.traces[k.type],A=b.layoutAttributes;A&&(k.subplot?v.extendFlat(T[b.attributes.subplot.dflt],A):v.extendFlat(T,A))}return T}var s={object:function(c,_){var T;return c==="layout"&&_===""?T="The layout argument":c[0]==="data"&&_===""?T="Trace "+c[1]+" in the data argument":T=o(c)+"key "+_,T+" must be linked to an object container"},array:function(c,_){var T;return c==="data"?T="The data argument":T=o(c)+"key "+_,T+" must be linked to an array container"},schema:function(c,_){return o(c)+"key "+_+" is not part of the schema"},unused:function(c,_,T){var M=t(T)?"container":"key";return o(c)+M+" "+_+" did not get coerced"},dynamic:function(c,_,T,M){return[o(c)+"key",_,"(set to '"+T+"')","got reset to","'"+M+"'","during defaults."].join(" ")},invisible:function(c,_){return(_?o(c)+"item "+_:"Trace "+c[1])+" got defaulted to be not visible"},value:function(c,_,T){return[o(c)+"key "+_,"is set to an invalid value ("+T+")"].join(" ")}};function o(c){return r(c)?"In data trace "+c[1]+", ":"In "+c+", "}function u(c,_,T,M,k){T=T||"";var b,A;r(_)?(b=_[0],A=_[1]):(b=_,A=null);var g=E(T),f=s[c](_,g,M,k);return v.log(f),{code:c,container:b,trace:A,path:T,astr:g,msg:f}}function d(c,_){var T=m(_),M=T.keyMinusId,k=T.id;return M in c&&c[M]._isSubplotObj&&k?!0:_ in c}function h(c,_){if(_ in c)return c[_];var T=m(_);return c[T.keyMinusId]}var y=v.counterRegex("([a-z]+)");function m(c){var _=c.match(y);return{keyMinusId:_&&_[1],id:_&&_[2]}}function E(c){if(!r(c))return String(c);for(var _="",T=0;T<c.length;T++){var M=c[T];typeof M=="number"?_=_.substr(0,_.length-1)+"["+M+"]":_+=M,T<c.length-1&&(_+=".")}return _}}}),pA=Ne({"src/snapshot/filesaver.js"(te,Z){var v=In(),w=i0();function C(P,t,r){var a=document.createElement("a"),l="download"in a,i=new Promise(function(s,o){var u,d;if(l)return u=w.createBlob(P,r),d=w.createObjectURL(u),a.href=d,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),w.revokeObjectURL(d),u=null,s(t);if(v.isSafari()){var h=r==="svg"?",":";base64,";return w.octetStream(h+encodeURIComponent(P)),s(t)}o(new Error("download error"))});return i}Z.exports=C}}),kx=Ne({"src/snapshot/download.js"(te,Z){var v=In(),w=Gp(),C=pA();i0();function P(t,r){var a;return v.isPlainObject(t)||(a=v.getGraphDiv(t)),r=r||{},r.format=r.format||"png",r.width=r.width||null,r.height=r.height||null,r.imageDataOnly=!0,new Promise(function(l,i){a&&a._snapshotInProgress&&i(new Error("Snapshotting already in progress.")),a&&(a._snapshotInProgress=!0);var s=w(t,r),o=r.filename||t.fn||"newplot";o+="."+r.format.replace("-","."),s.then(function(u){return a&&(a._snapshotInProgress=!1),C(u,o,r.format)}).then(function(u){l(u)}).catch(function(u){a&&(a._snapshotInProgress=!1),i(u)})})}Z.exports=P}}),qw=Ne({"src/plot_api/template_api.js"(te){var Z=In(),v=Z.isPlainObject,w=B1(),C=uf(),P=ns(),t=Tu(),r=gd().dfltConfig;te.makeTemplate=function(y){y=Z.isPlainObject(y)?y:Z.getGraphDiv(y),y=Z.extendDeep({_context:r},{data:y.data,layout:y.layout}),C.supplyDefaults(y);var m=y.data||[],E=y.layout||{};E._basePlotModules=y._fullLayout._basePlotModules,E._modules=y._fullLayout._modules;var c={data:{},layout:{}};m.forEach(function(x){var N={};i(x,N,o.bind(null,x));var D=Z.coerce(x,{},P,"type"),B=c.data[D];B||(B=c.data[D]=[]),B.push(N)}),i(E,c.layout,s.bind(null,E)),delete c.layout.template;var _=E.template;if(v(_)){var T=_.layout,M,k,b,A,g,f;v(T)&&a(T,c.layout);var p=_.data;if(v(p)){for(k in c.data)if(b=p[k],Array.isArray(b)){for(g=c.data[k],f=g.length,A=b.length,M=0;M<f;M++)a(b[M%A],g[M]);for(M=f;M<A;M++)g.push(Z.extendDeep({},b[M]))}for(k in p)k in c.data||(c.data[k]=Z.extendDeep([],p[k]))}}return c};function a(y,m){y=Z.extendDeep({},y);var E=Object.keys(y).sort(),c,_;function T(g,f,p){if(v(f)&&v(g))a(g,f);else if(Array.isArray(f)&&Array.isArray(g)){var x=t.arrayTemplater({_template:y},p);for(_=0;_<f.length;_++){var N=f[_],D=x.newItem(N)._template;D&&a(D,N)}var B=x.defaultItems();for(_=0;_<B.length;_++)f.push(B[_]._template);for(_=0;_<f.length;_++)delete f[_].templateitemname}}for(c=0;c<E.length;c++){var M=E[c],k=y[M];if(M in m?T(k,m[M],M):m[M]=k,l(M)===M)for(var b in m){var A=l(b);b!==A&&A===M&&!(b in y)&&T(k,m[b],M)}}}function l(y){return y.replace(/[0-9]+$/,"")}function i(y,m,E,c,_){var T=_&&E(_);for(var M in y){var k=y[M],b=u(y,M,c),A=u(y,M,_),g=E(A);if(!g){var f=l(M);f!==M&&(A=u(y,f,_),g=E(A))}if(!(T&&T===g)&&!(!g||g._noTemplating||g.valType==="data_array"||g.arrayOk&&Array.isArray(k)))if(!g.valType&&v(k))i(k,m,E,b,A);else if(g._isLinkedToArray&&Array.isArray(k))for(var p=!1,x=0,N={},D=0;D<k.length;D++){var B=k[D];if(v(B)){var U=B.name;if(U)N[U]||(i(B,m,E,u(k,x,b),u(k,x,A)),x++,N[U]=1);else if(!p){var V=t.arrayDefaultKey(M),q=u(y,V,c),z=u(k,x,b);i(B,m,E,z,u(k,x,A));var H=Z.nestedProperty(m,z),G=Z.nestedProperty(m,q);G.set(H.get()),H.set(null),p=!0}}}else{var J=Z.nestedProperty(m,b);J.set(k)}}}function s(y,m){return w.getLayoutValObject(y,Z.nestedProperty({},m).parts)}function o(y,m){return w.getTraceValObject(y,Z.nestedProperty({},m).parts)}function u(y,m,E){var c;return E?Array.isArray(y)?c=E+"["+m+"]":c=E+"."+m:c=m,c}te.validateTemplate=function(y,m){var E=Z.extendDeep({},{_context:r,data:y.data,layout:y.layout}),c=E.layout||{};v(m)||(m=c.template||{});var _=m.layout,T=m.data,M=[];E.layout=c,E.layout.template=m,C.supplyDefaults(E);var k=E._fullLayout,b=E._fullData,A={};function g(q,z){for(var H in q)if(H.charAt(0)!=="_"&&v(q[H])){var G=l(H),J=[],le;for(le=0;le<z.length;le++)J.push(u(q,H,z[le])),G!==H&&J.push(u(q,G,z[le]));for(le=0;le<J.length;le++)A[J[le]]=1;g(q[H],J)}}function f(q,z){for(var H in q)if(H.indexOf("defaults")===-1&&v(q[H])){var G=u(q,H,z);A[G]?f(q[H],G):M.push({code:"unused",path:G})}}if(v(_)?(g(k,["layout"]),f(_,"layout")):M.push({code:"layout"}),!v(T))M.push({code:"data"});else{for(var p={},x,N=0;N<b.length;N++){var D=b[N];x=D.type,p[x]=(p[x]||0)+1,D._fullInput._template||M.push({code:"missing",index:D.index,traceType:x})}for(x in T){var B=T[x].length,U=p[x]||0;B>U?M.push({code:"unused",traceType:x,templateCount:B,dataCount:U}):U>B&&M.push({code:"reused",traceType:x,templateCount:B,dataCount:U})}}function V(q,z){for(var H in q)if(H.charAt(0)!=="_"){var G=q[H],J=u(q,H,z);v(G)?(Array.isArray(q)&&G._template===!1&&G.templateitemname&&M.push({code:"missing",path:J,templateitemname:G.templateitemname}),V(G,J)):Array.isArray(G)&&d(G)&&V(G,J)}}if(V({data:b,layout:k},""),M.length)return M.map(h)};function d(y){for(var m=0;m<y.length;m++)if(v(y[m]))return!0}function h(y){var m;switch(y.code){case"data":m="The template has no key data.";break;case"layout":m="The template has no key layout.";break;case"missing":y.path?m="There are no templates for item "+y.path+" with name "+y.templateitemname:m="There are no templates for trace "+y.index+", of type "+y.traceType+".";break;case"unused":y.path?m="The template item at "+y.path+" was not used in constructing the plot.":y.dataCount?m="Some of the templates of type "+y.traceType+" were not used. The template has "+y.templateCount+" traces, the data only has "+y.dataCount+" of this type.":m="The template has "+y.templateCount+" traces of type "+y.traceType+" but there are none in the data.";break;case"reused":m="Some of the templates of type "+y.traceType+" were used more than once. The template has "+y.templateCount+" traces, the data has "+y.dataCount+" of this type.";break}return y.msg=m,y}}}),mA=Ne({"src/plot_api/index.js"(te){var Z=Uw();te._doPlot=Z._doPlot,te.newPlot=Z.newPlot,te.restyle=Z.restyle,te.relayout=Z.relayout,te.redraw=Z.redraw,te.update=Z.update,te._guiRestyle=Z._guiRestyle,te._guiRelayout=Z._guiRelayout,te._guiUpdate=Z._guiUpdate,te._storeDirectGUIEdit=Z._storeDirectGUIEdit,te.react=Z.react,te.extendTraces=Z.extendTraces,te.prependTraces=Z.prependTraces,te.addTraces=Z.addTraces,te.deleteTraces=Z.deleteTraces,te.moveTraces=Z.moveTraces,te.purge=Z.purge,te.addFrames=Z.addFrames,te.deleteFrames=Z.deleteFrames,te.animate=Z.animate,te.setPlotConfig=Z.setPlotConfig;var v=D1().getGraphDiv,w=Eg().eraseActiveShape;te.deleteActiveShape=function(P){return w(v(P))},te.toImage=Gp(),te.validate=V1(),te.downloadImage=kx();var C=qw();te.makeTemplate=C.makeTemplate,te.validateTemplate=C.validateTemplate}}),Lm=Ne({"src/traces/scatter/xy_defaults.js"(te,Z){var v=In(),w=Xo();Z.exports=function(P,t,r,a){var l=a("x"),i=a("y"),s,o=w.getComponentMethod("calendars","handleTraceDefaults");if(o(P,t,["x","y"],r),l){var u=v.minRowLength(l);i?s=Math.min(u,v.minRowLength(i)):(s=u,a("y0"),a("dy"))}else{if(!i)return 0;s=v.minRowLength(i),a("x0"),a("dx")}return t._length=s,s}}}),Rm=Ne({"src/traces/scatter/period_defaults.js"(te,Z){var v=In().dateTick0,w=ja(),C=w.ONEWEEK;function P(t,r){return t%C===0?v(r,1):v(r,0)}Z.exports=function(r,a,l,i,s){if(s||(s={x:!0,y:!0}),s.x){var o=i("xperiod");o&&(i("xperiod0",P(o,a.xcalendar)),i("xperiodalignment"))}if(s.y){var u=i("yperiod");u&&(i("yperiod0",P(u,a.ycalendar)),i("yperiodalignment"))}}}}),Vw=Ne({"src/traces/scatter/stack_defaults.js"(te,Z){var v=["orientation","groupnorm","stackgaps"];Z.exports=function(C,P,t,r){var a=t._scatterStackOpts,l=r("stackgroup");if(l){var i=P.xaxis+P.yaxis,s=a[i];s||(s=a[i]={});var o=s[l],u=!1;o?o.traces.push(P):(o=s[l]={traceIndices:[],traces:[P]},u=!0);for(var d={orientation:P.x&&!P.y?"h":"v"},h=0;h<v.length;h++){var y=v[h],m=y+"Found";if(!o[m]){var E=C[y]!==void 0,c=y==="orientation";if((E||u)&&(o[y]=r(y,d[y]),c&&(o.fillDflt=o[y]==="h"?"tonextx":"tonexty"),E&&(o[m]=!0,!u&&(delete o.traces[0][y],c))))for(var _=0;_<o.traces.length-1;_++){var T=o.traces[_];T._input.fill!==T.fill&&(T.fill=o.fillDflt)}}}return o}}}}),xv=Ne({"src/traces/scatter/marker_defaults.js"(te,Z){var v=io(),w=Od().hasColorscale,C=Ph(),P=vu();Z.exports=function(r,a,l,i,s,o){var u=P.isBubble(r),d=(r.line||{}).color,h;if(o=o||{},d&&(l=d),s("marker.symbol"),s("marker.opacity",u?.7:1),s("marker.size"),o.noAngle||(s("marker.angle"),o.noAngleRef||s("marker.angleref"),o.noStandOff||s("marker.standoff")),s("marker.color",l),w(r,"marker")&&C(r,a,i,s,{prefix:"marker.",cLetter:"c"}),o.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),o.noLine||(d&&!Array.isArray(d)&&a.marker.color!==d?h=d:u?h=v.background:h=v.defaultLine,s("marker.line.color",h),w(r,"marker.line")&&C(r,a,i,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",u?1:0)),u&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),o.gradient){var y=s("marker.gradient.type");y!=="none"&&s("marker.gradient.color")}}}}),Im=Ne({"src/traces/scatter/line_defaults.js"(te,Z){var v=In().isArrayOrTypedArray,w=Od().hasColorscale,C=Ph();Z.exports=function(t,r,a,l,i,s){s||(s={});var o=(t.marker||{}).color;if(o&&o._inputArray&&(o=o._inputArray),i("line.color",a),w(t,"line"))C(t,r,l,i,{prefix:"line.",cLetter:"c"});else{var u=(v(o)?!1:o)||a;i("line.color",u)}i("line.width"),s.noDash||i("line.dash"),s.backoff&&i("line.backoff")}}}),bv=Ne({"src/traces/scatter/line_shape_defaults.js"(te,Z){Z.exports=function(w,C,P){var t=P("line.shape");t==="spline"&&P("line.smoothing")}}}),Xp=Ne({"src/traces/scatter/text_defaults.js"(te,Z){var v=In();Z.exports=function(w,C,P,t,r){r=r||{},t("textposition"),v.coerceFont(t,"textfont",r.font||P.font,r),r.noSelect||(t("selected.textfont.color"),t("unselected.textfont.color"))}}}),ov=Ne({"src/traces/scatter/fillcolor_defaults.js"(te,Z){var v=io(),w=In().isArrayOrTypedArray;function C(P){for(var t=v.interpolate(P[0][1],P[1][1],.5),r=2;r<P.length;r++){var a=v.interpolate(P[r-1][1],P[r][1],.5);t=v.interpolate(t,a,P[r-1][0]/P[r][0])}return t}Z.exports=function(t,r,a,l,i){i||(i={});var s=!1;if(r.marker){var o=r.marker.color,u=(r.marker.line||{}).color;o&&!w(o)?s=o:u&&!w(u)&&(s=u)}var d;if(i.moduleHasFillgradient){var h=l("fillgradient.type");if(h!=="none"){l("fillgradient.start"),l("fillgradient.stop");var y=l("fillgradient.colorscale");y&&(d=C(y))}}l("fillcolor",v.addOpacity((r.line||{}).color||s||d||a,.5))}}}),wM=Ne({"src/traces/scatter/defaults.js"(te,Z){var v=In(),w=Xo(),C=Jc(),P=a0(),t=vu(),r=Lm(),a=Rm(),l=Vw(),i=xv(),s=Im(),o=bv(),u=Xp(),d=ov(),h=In().coercePattern;Z.exports=function(m,E,c,_){function T(x,N){return v.coerce(m,E,C,x,N)}var M=r(m,E,_,T);if(M||(E.visible=!1),!!E.visible){a(m,E,_,T),T("xhoverformat"),T("yhoverformat"),T("zorder");var k=l(m,E,_,T);_.scattermode==="group"&&E.orientation===void 0&&T("orientation","v");var b=!k&&M<P.PTS_LINESONLY?"lines+markers":"lines";T("text"),T("hovertext"),T("mode",b),t.hasMarkers(E)&&i(m,E,c,_,T,{gradient:!0}),t.hasLines(E)&&(s(m,E,c,_,T,{backoff:!0}),o(m,E,T),T("connectgaps"),T("line.simplify")),t.hasText(E)&&(T("texttemplate"),T("texttemplatefallback"),u(m,E,_,T));var A=[];(t.hasMarkers(E)||t.hasText(E))&&(T("cliponaxis"),T("marker.maxdisplayed"),A.push("points")),T("fill",k?k.fillDflt:"none"),E.fill!=="none"&&(d(m,E,c,T,{moduleHasFillgradient:!0}),t.hasLines(E)||o(m,E,T),h(T,"fillpattern",E.fillcolor,!1));var g=(E.line||{}).color,f=(E.marker||{}).color;(E.fill==="tonext"||E.fill==="toself")&&A.push("fills"),T("hoveron",A.join("+")||"points"),E.hoveron!=="fills"&&(T("hovertemplate"),T("hovertemplatefallback"));var p=w.getComponentMethod("errorbars","supplyDefaults");p(m,E,g||f||c,{axis:"y"}),p(m,E,g||f||c,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(E,T)}}}}),j0=Ne({"src/traces/scatter/grouping_defaults.js"(te,Z){var v=Mg().getAxisGroup;Z.exports=function(C,P,t,r,a){var l=P.orientation,i=P[{v:"x",h:"y"}[l]+"axis"],s=v(t,i)+l,o=t._alignmentOpts||{},u=r("alignmentgroup"),d=o[s];d||(d=o[s]={});var h=d[u];h?h.traces.push(P):h=d[u]={traces:[P],alignmentIndex:Object.keys(d).length,offsetGroups:{}};var y=r("offsetgroup")||"",m=h.offsetGroups,E=m[y];P._offsetIndex=0,(a!=="group"||y)&&(E||(E=m[y]={offsetIndex:Object.keys(m).length}),P._offsetIndex=E.offsetIndex)}}}),My=Ne({"src/traces/scatter/cross_trace_defaults.js"(te,Z){var v=In(),w=j0(),C=Jc();Z.exports=function(t,r){var a,l,i,s=r.scattermode;function o(m){return v.coerce(l._input,l,C,m)}if(r.scattermode==="group")for(i=0;i<t.length;i++)l=t[i],l.type==="scatter"&&(a=l._input,w(a,l,r,o,s));for(i=0;i<t.length;i++){var u=t[i];if(u.type==="scatter"){var d=u.fill;if(!(d==="none"||d==="toself")&&(u.opacity=void 0,d==="tonexty"||d==="tonextx"))for(var h=i-1;h>=0;h--){var y=t[h];if(y.type==="scatter"&&y.xaxis===u.xaxis&&y.yaxis===u.yaxis){y.opacity=void 0;break}}}}}}}),yA=Ne({"src/traces/scatter/layout_defaults.js"(te,Z){var v=In(),w=xy();Z.exports=function(C,P){function t(a,l){return v.coerce(C,P,w,a,l)}var r=P.barmode==="group";P.scattermode==="group"&&t("scattergap",r?P.bargap:.2)}}}),Dm=Ne({"src/plots/cartesian/align_period.js"(te,Z){var v=la(),w=In(),C=w.dateTime2ms,P=w.incrementMonth,t=ja(),r=t.ONEAVGMONTH;Z.exports=function(l,i,s,o){if(i.type!=="date")return{vals:o};var u=l[s+"periodalignment"];if(!u)return{vals:o};var d=l[s+"period"],h;if(v(d)){if(d=+d,d<=0)return{vals:o}}else if(typeof d=="string"&&d.charAt(0)==="M"){var y=+d.substring(1);if(y>0&&Math.round(y)===y)h=y;else return{vals:o}}for(var m=i.calendar,E=u==="start",c=u==="end",_=l[s+"period0"],T=C(_,m)||0,M=[],k=[],b=[],A=o.length,g=0;g<A;g++){var f=o[g],p,x,N;if(h){for(p=Math.round((f-T)/(h*r)),N=P(T,h*p,m);N>f;)N=P(N,-h,m);for(;N<=f;)N=P(N,h,m);x=P(N,-h,m)}else{for(p=Math.round((f-T)/d),N=T+p*d;N>f;)N-=d;for(;N<=f;)N+=d;x=N-d}M[g]=E?x:c?N:(x+N)/2,k[g]=x,b[g]=N}return{vals:M,starts:k,ends:b}}}}),Wp=Ne({"src/traces/scatter/colorscale_calc.js"(te,Z){var v=Od().hasColorscale,w=Nd(),C=vu();Z.exports=function(t,r){C.hasLines(r)&&v(r,"line")&&w(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),C.hasMarkers(r)&&(v(r,"marker")&&w(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),v(r,"marker.line")&&w(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),o0=Ne({"src/traces/scatter/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.texttemplate,C,"txt"),v.mergeArray(P.hovertext,C,"htx"),v.mergeArray(P.customdata,C,"data"),v.mergeArray(P.textposition,C,"tp"),P.textfont&&(v.mergeArrayCastPositive(P.textfont.size,C,"ts"),v.mergeArray(P.textfont.color,C,"tc"),v.mergeArray(P.textfont.family,C,"tf"),v.mergeArray(P.textfont.weight,C,"tw"),v.mergeArray(P.textfont.style,C,"ty"),v.mergeArray(P.textfont.variant,C,"tv"),v.mergeArray(P.textfont.textcase,C,"tC"),v.mergeArray(P.textfont.lineposition,C,"tE"),v.mergeArray(P.textfont.shadow,C,"tS"));var r=P.marker;if(r){v.mergeArrayCastPositive(r.size,C,"ms"),v.mergeArrayCastPositive(r.opacity,C,"mo"),v.mergeArray(r.symbol,C,"mx"),v.mergeArray(r.angle,C,"ma"),v.mergeArray(r.standoff,C,"mf"),v.mergeArray(r.color,C,"mc");var a=r.line;r.line&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"));var l=r.gradient;l&&l.type!=="none"&&(v.mergeArray(l.type,C,"mgt"),v.mergeArray(l.color,C,"mgc"))}}}}),Vh=Ne({"src/traces/scatter/calc_selection.js"(te,Z){var v=In();Z.exports=function(C,P){v.isArrayOrTypedArray(P.selectedpoints)&&v.tagSelected(C,P)}}}),Uv=Ne({"src/traces/scatter/calc.js"(te,Z){var v=la(),w=In(),C=Os(),P=Dm(),t=ja().BADNUM,r=vu(),a=Wp(),l=o0(),i=Vh();function s(m,E){var c=m._fullLayout,_=E._xA=C.getFromId(m,E.xaxis||"x","x"),T=E._yA=C.getFromId(m,E.yaxis||"y","y"),M=_.makeCalcdata(E,"x"),k=T.makeCalcdata(E,"y"),b=P(E,_,"x",M),A=P(E,T,"y",k),g=b.vals,f=A.vals,p=E._length,x=new Array(p),N=E.ids,D=y(E,c,_,T),B=!1,U,V,q,z,H,G;d(c,E);var J="x",le="y",ye;if(D)w.pushUnique(D.traceIndices,E.index),U=D.orientation==="v",U?(le="s",ye="x"):(J="s",ye="y"),H=D.stackgaps==="interpolate";else{var de=u(E,p);o(m,E,_,T,g,f,de)}var me=!!E.xperiodalignment,W=!!E.yperiodalignment;for(V=0;V<p;V++){var ie=x[V]={},se=v(g[V]),ee=v(f[V]);se&&ee?(ie[J]=g[V],ie[le]=f[V],me&&(ie.orig_x=M[V],ie.xEnd=b.ends[V],ie.xStart=b.starts[V]),W&&(ie.orig_y=k[V],ie.yEnd=A.ends[V],ie.yStart=A.starts[V])):D&&(U?se:ee)?(ie[ye]=U?g[V]:f[V],ie.gap=!0,H?(ie.s=t,B=!0):ie.s=0):ie[J]=ie[le]=t,N&&(ie.id=String(N[V]))}if(l(x,E),a(m,E),i(x,E),D){for(V=0;V<x.length;)x[V][ye]===t?x.splice(V,1):V++;if(w.sort(x,function(ce,ue){return ce[ye]-ue[ye]||ce.i-ue.i}),B){for(V=0;V<x.length-1&&x[V].gap;)V++;for(G=x[V].s,G||(G=x[V].s=0),q=0;q<V;q++)x[q].s=G;for(z=x.length-1;z>V&&x[z].gap;)z--;for(G=x[z].s,q=x.length-1;q>z;q--)x[q].s=G;for(;V<z;)if(V++,x[V].gap){for(q=V+1;x[q].gap;)q++;for(var pe=x[V-1][ye],oe=x[V-1].s,Y=(x[q].s-oe)/(x[q][ye]-pe);V<q;)x[V].s=oe+(x[V][ye]-pe)*Y,V++}}}return x}function o(m,E,c,_,T,M,k){var b=E._length,A=m._fullLayout,g=c._id,f=_._id,p=A._firstScatter[h(E)]===E.uid,x=(y(E,A,c,_)||{}).orientation,N=E.fill;c._minDtick=0,_._minDtick=0;var D={padded:!0},B={padded:!0};k&&(D.ppad=B.ppad=k);var U=b<2||T[0]!==T[b-1]||M[0]!==M[b-1];U&&(N==="tozerox"||N==="tonextx"&&(p||x==="h"))?D.tozero=!0:!(E.error_y||{}).visible&&(N==="tonexty"||N==="tozeroy"||!r.hasMarkers(E)&&!r.hasText(E))&&(D.padded=!1,D.ppad=0),U&&(N==="tozeroy"||N==="tonexty"&&(p||x==="v"))?B.tozero=!0:(N==="tonextx"||N==="tozerox")&&(B.padded=!1),g&&(E._extremes[g]=C.findExtremes(c,T,D)),f&&(E._extremes[f]=C.findExtremes(_,M,B))}function u(m,E){if(r.hasMarkers(m)){var c=m.marker,_=1.6*(m.marker.sizeref||1),T;if(m.marker.sizemode==="area"?T=function(g){return Math.max(Math.sqrt((g||0)/_),3)}:T=function(g){return Math.max((g||0)/_,3)},w.isArrayOrTypedArray(c.size)){var M={type:"linear"};C.setConvert(M);for(var k=M.makeCalcdata(m.marker,"size"),b=new Array(E),A=0;A<E;A++)b[A]=T(k[A]);return b}else return T(c.size)}}function d(m,E){var c=h(E),_=m._firstScatter;_[c]||(_[c]=E.uid)}function h(m){var E=m.stackgroup;return m.xaxis+m.yaxis+m.type+(E?"-"+E:"")}function y(m,E,c,_){var T=m.stackgroup;if(T){var M=E._scatterStackOpts[c._id+_._id][T],k=M.orientation==="v"?_:c;if(k.type==="linear"||k.type==="log")return M}}Z.exports={calc:s,calcMarkerSize:u,calcAxisExpansion:o,setFirstScatter:d,getStackOpts:y}}}),H1=Ne({"src/traces/bar/sieve.js"(te,Z){Z.exports=w;var v=In().distinctVals;function w(C,P){this.traces=C,this.sepNegVal=P.sepNegVal,this.overlapNoMerge=P.overlapNoMerge;for(var t=1/0,r=P.posAxis._id.charAt(0),a=[],l=0;l<C.length;l++){for(var i=C[l],s=0;s<i.length;s++){var o=i[s],u=o.p;u===void 0&&(u=o[r]),u!==void 0&&a.push(u)}i[0]&&i[0].width1&&(t=Math.min(i[0].width1,t))}this.positions=a;var d=v(a);this.distinctPositions=d.vals,d.vals.length===1&&t!==1/0?this.minDiff=t:this.minDiff=Math.min(d.minDiff,t);var h=(P.posAxis||{}).type;(h==="category"||h==="multicategory")&&(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}w.prototype.put=function(P,t,r){var a=this.getLabel(P,t,r),l=this.bins[a]||0;return this.bins[a]=l+r,l},w.prototype.get=function(P,t,r){var a=this.getLabel(P,t,r);return this.bins[a]||0},w.prototype.getLabel=function(P,t,r){var a=r<0&&this.sepNegVal?"v":"^",l=this.overlapNoMerge?P:Math.round(P/this.binWidth);return a+l+"g"+t}}}),U0=Ne({"src/traces/bar/cross_trace_calc.js"(te,Z){var v=la(),w=In().isArrayOrTypedArray,C=ja().BADNUM,P=Xo(),t=Os(),r=Mg().getAxisGroup,a=H1();function l(x,N){for(var D=N.xaxis,B=N.yaxis,U=x._fullLayout,V=x._fullData,q=x.calcdata,z=[],H=[],G=0;G<V.length;G++){var J=V[G];if(J.visible===!0&&P.traceIs(J,"bar")&&J.xaxis===D._id&&J.yaxis===B._id&&(J.orientation==="h"?z.push(q[G]):H.push(q[G]),J._computePh))for(var le=x.calcdata[G],ye=0;ye<le.length;ye++)typeof le[ye].ph0=="function"&&(le[ye].ph0=le[ye].ph0()),typeof le[ye].ph1=="function"&&(le[ye].ph1=le[ye].ph1())}var de={xCat:D.type==="category"||D.type==="multicategory",yCat:B.type==="category"||B.type==="multicategory",mode:U.barmode,norm:U.barnorm,gap:U.bargap,groupgap:U.bargroupgap};i(x,D,B,H,de),i(x,B,D,z,de)}function i(x,N,D,B,U){if(B.length){var V,q,z,H,G;switch(u(D,B),U.mode){case"overlay":d(x,N,D,B,U);break;case"group":for(V=[],q=[],z=0;z<B.length;z++)H=B[z],G=H[0].trace,G.offset===void 0?q.push(H):V.push(H);q.length&&h(x,N,D,q,U),V.length&&d(x,N,D,V,U);break;case"stack":case"relative":for(V=[],q=[],z=0;z<B.length;z++)H=B[z],G=H[0].trace,G.base===void 0?q.push(H):V.push(H);o(q),q.length&&y(x,N,D,q,U),V.length&&d(x,N,D,V,U);break}s(B),f(B,N)}}function s(x){var N,D,B,U,V,q,z;for(N=0;N<x.length;N++)D=x[N],B=D[0].trace,U=D[0].t,U.cornerradiusvalue===void 0&&(V=B.marker?B.marker.cornerradius:void 0,V!==void 0&&(q=v(V)?+V:+V.slice(0,-1),z=v(V)?"px":"%",U.cornerradiusvalue=q,U.cornerradiusform=z))}function o(x){if(!(x.length<2)){var N,D,B,U,V,q,z;for(N=0;N<x.length&&(D=x[N],B=D[0].trace,V=B.marker?B.marker.cornerradius:void 0,V===void 0);N++);if(V!==void 0)for(q=v(V)?+V:+V.slice(0,-1),z=v(V)?"px":"%",N=0;N<x.length;N++)D=x[N],U=D[0].t,U.cornerradiusvalue=q,U.cornerradiusform=z}}function u(x,N){var D,B;for(D=0;D<N.length;D++){var U=N[D],V=U[0].trace,q=V.type==="funnel"?V._base:V.base,z,H=V.orientation==="h"?V.xcalendar:V.ycalendar,G=x.type==="category"||x.type==="multicategory"?function(){return null}:x.d2c;if(w(q)){for(B=0;B<Math.min(q.length,U.length);B++)z=G(q[B],0,H),v(z)?(U[B].b=+z,U[B].hasB=1):U[B].b=0;for(;B<U.length;B++)U[B].b=0}else{z=G(q,0,H);var J=v(z);for(z=J?z:0,B=0;B<U.length;B++)U[B].b=z,J&&(U[B].hasB=1)}}}function d(x,N,D,B,U){for(var V=0;V<B.length;V++){var q=B[V],z=new a([q],{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});m(x,N,z,U),U.norm?(k(z),A(D,z,U)):T(D,z)}}function h(x,N,D,B,U){var V=new a(B,{posAxis:N,sepNegVal:!1,overlapNoMerge:!U.norm});m(x,N,V,U),b(V,N),U.norm?(k(V),A(D,V,U)):T(D,V)}function y(x,N,D,B,U){var V=new a(B,{posAxis:N,sepNegVal:U.mode==="relative",overlapNoMerge:!(U.norm||U.mode==="stack"||U.mode==="relative")});m(x,N,V,U),M(D,V,U);for(var q=0;q<B.length;q++)for(var z=B[q],H=z[0].t.offsetindex,G=0;G<z.length;G++){var J=z[G];if(J.s!==C){var le=J.b+J.s===V.get(J.p,H,J.s);le&&(J._outmost=!0)}}U.norm&&A(D,V,U)}function m(x,N,D,B){var U=x._fullLayout,V=D.positions,q=D.distinctPositions,z=D.minDiff,H=D.traces,G=H.length,J=V.length!==q.length,le=z*(1-B.gap),ye,de,me,W;if(N._id==="angularaxis")ye=le,de=ye*(1-(B.groupgap||0)),me=-de/2;else{var ie=r(U,N._id)+H[0][0].trace.orientation;W=U._alignmentOpts[ie]||{}}for(var se=0;se<G;se++){var ee=H[se],pe=ee[0].trace;if(N._id!=="angularaxis"){var oe=W[pe.alignmentgroup]||{},Y=Object.keys(oe.offsetGroups||{}).length;Y?ye=le/Y:ye=J?le/G:le,de=ye*(1-(B.groupgap||0)),Y?me=((2*pe._offsetIndex+1-Y)*ye-de)/2:me=J?((2*se+1-G)*ye-de)/2:-de/2}var ce=ee[0].t;ce.barwidth=de,ce.offsetindex=pe._offsetIndex||0,ce.poffset=me,ce.bargroupwidth=le,ce.bardelta=z}D.binWidth=H[0][0].t.barwidth/100,E(D),c(N,D),N._id==="angularaxis"?_(N,D):_(N,D,J)}function E(x){var N=x.traces,D,B;for(D=0;D<N.length;D++){var U=N[D],V=U[0],q=V.trace,z=V.t,H=q._offset||q.offset,G=z.poffset,J;if(w(H)){for(J=Array.prototype.slice.call(H,0,U.length),B=0;B<J.length;B++)v(J[B])||(J[B]=G);for(B=J.length;B<U.length;B++)J.push(G);z.poffset=J}else H!==void 0&&(z.poffset=H);var le=q._width||q.width,ye=z.barwidth;if(w(le)){var de=Array.prototype.slice.call(le,0,U.length);for(B=0;B<de.length;B++)v(de[B])||(de[B]=ye);for(B=de.length;B<U.length;B++)de.push(ye);if(z.barwidth=de,H===void 0){for(J=[],B=0;B<U.length;B++)J.push(G+(ye-de[B])/2);z.poffset=J}}else le!==void 0&&(z.barwidth=le,H===void 0&&(z.poffset=G+(ye-le)/2))}}function c(x,N){for(var D=N.traces,B=p(x),U=0;U<D.length;U++)for(var V=D[U],q=V[0].t,z=q.poffset,H=w(z),G=q.barwidth,J=w(G),le=0;le<V.length;le++){var ye=V[le],de=ye.w=J?G[le]:G;ye.p===void 0&&(ye.p=ye[B],ye["orig_"+B]=ye[B]);var me=(H?z[le]:z)+de/2;ye[B]=ye.p+me}}function _(x,N,D){var B=N.traces,U=N.minDiff,V=U/2;t.minDtick(x,N.minDiff,N.distinctPositions[0],D);for(var q=0;q<B.length;q++){var z=B[q],H=z[0],G=H.trace,J=[],le,ye,de,me;for(me=0;me<z.length;me++)le=z[me],ye=le.p-V,de=le.p+V,J.push(ye,de);if(G.width||G.offset){var W=H.t,ie=W.poffset,se=W.barwidth,ee=w(ie),pe=w(se);for(me=0;me<z.length;me++){le=z[me];var oe=ee?ie[me]:ie,Y=pe?se[me]:se;ye=le.p+oe,de=ye+Y,J.push(ye,de)}}G._extremes[x._id]=t.findExtremes(x,J,{padded:!1})}}function T(x,N){for(var D=N.traces,B=p(x),U=0;U<D.length;U++){for(var V=D[U],q=V[0].trace,z=q.type==="scatter",H=q.orientation==="v",G=[],J=!1,le=0;le<V.length;le++){var ye=V[le],de=z?0:ye.b,me=z?H?ye.y:ye.x:de+ye.s;ye[B]=me,G.push(me),ye.hasB&&G.push(de),(!ye.hasB||!ye.b)&&(J=!0)}q._extremes[x._id]=t.findExtremes(x,G,{tozero:J,padded:!0})}}function M(x,N,D){var B=p(x),U=N.traces,V,q,z,H,G,J,le;for(H=0;H<U.length;H++)if(V=U[H],q=V[0].trace,q.type==="funnel")for(le=V[0].t.offsetindex,G=0;G<V.length;G++)J=V[G],J.s!==C&&N.put(J.p,le,-.5*J.s);for(H=0;H<U.length;H++){V=U[H],q=V[0].trace,z=q.type==="funnel",le=q.type==="barpolar"?0:V[0].t.offsetindex;var ye=[];for(G=0;G<V.length;G++)if(J=V[G],J.s!==C){var de;z?de=J.s:de=J.s+J.b;var me=N.put(J.p,le,de),W=me+de;J.b=me,J[B]=W,D.norm||(ye.push(W),J.hasB&&ye.push(me))}D.norm||(q._extremes[x._id]=t.findExtremes(x,ye,{tozero:!0,padded:!0}))}}function k(x){for(var N=x.traces,D=0;D<N.length;D++)for(var B=N[D],U=B[0].t.offsetindex,V=0;V<B.length;V++){var q=B[V];q.s!==C&&x.put(q.p,U,q.b+q.s)}}function b(x,N){for(var D=x.traces,B=0;B<D.length;B++){var U=D[B],V=U[0].trace,q=U[0].t.offsetindex;if(V.base===void 0)for(var z=new a([U],{posAxis:N,sepNegVal:!0,overlapNoMerge:!0}),H=0;H<U.length;H++){var G=U[H];if(G.p!==C){var J=z.put(G.p,q,G.b+G.s);J&&(G.b=J)}}}}function A(x,N,D){var B=N.traces,U=p(x),V=D.norm==="fraction"?1:100,q=V/1e9,z=x.l2c(x.c2l(0)),H=D.mode==="stack"?V:z;function G(ce){return v(x.c2l(ce))&&(ce<z-q||ce>H+q||!v(z))}for(var J=0;J<B.length;J++){for(var le=B[J],ye=le[0].t.offsetindex,de=le[0].trace,me=[],W=!1,ie=!1,se=0;se<le.length;se++){var ee=le[se];if(ee.s!==C){var pe=Math.abs(V/N.get(ee.p,ye,ee.s));ee.b*=pe,ee.s*=pe;var oe=ee.b,Y=oe+ee.s;ee[U]=Y,me.push(Y),ie=ie||G(Y),ee.hasB&&(me.push(oe),ie=ie||G(oe)),(!ee.hasB||!ee.b)&&(W=!0)}}de._extremes[x._id]=t.findExtremes(x,me,{tozero:W,padded:ie})}}function g(x,N,D,B){for(var U=p(B),V=0;V<x.length;V++)for(var q=x[V],z=0;z<q.length;z++){var H=q[z],G=H[U];H._sMin=N[G],H._sMax=D[G]}}function f(x,N){var D=p(N),B={},U,V,q,z=1/0,H=-1/0;for(U=0;U<x.length;U++)for(q=x[U],V=0;V<q.length;V++){var G=q[V].p;v(G)&&(z=Math.min(z,G),H=Math.max(H,G))}var J=1e4/(H-z),le=B.round=function(_e){return String(Math.round(J*(_e-z)))},ye={},de={},me=x.some(function(_e){var Le=_e[0].trace;return"marker"in Le&&Le.marker.cornerradius});for(U=0;U<x.length;U++){q=x[U],q[0].t.extents=B;var W=q[0].t.poffset,ie=w(W);for(V=0;V<q.length;V++){var se=q[V],ee=se[D]-se.w/2;if(v(ee)){var pe=se[D]+se.w/2,oe=le(se.p);B[oe]?B[oe]=[Math.min(ee,B[oe][0]),Math.max(pe,B[oe][1])]:B[oe]=[ee,pe]}if(se.p0=se.p+(ie?W[V]:W),se.p1=se.p0+se.w,se.s0=se.b,se.s1=se.s0+se.s,me){var Y=Math.min(se.s0,se.s1)||0,ce=Math.max(se.s0,se.s1)||0,ue=se[D];ye[ue]=ue in ye?Math.min(ye[ue],Y):Y,de[ue]=ue in de?Math.max(de[ue],ce):ce}}}me&&g(x,ye,de,N)}function p(x){return x._id.charAt(0)}Z.exports={crossTraceCalc:l,setGroupPositions:i}}}),Px=Ne({"src/traces/scatter/cross_trace_calc.js"(te,Z){var v=Uv(),w=U0().setGroupPositions;function C(r,a){for(var l=a.xaxis,i=a.yaxis,s=r._fullLayout,o=r._fullData,u=r.calcdata,d=[],h=[],y=0;y<o.length;y++){var m=o[y];m.visible===!0&&m.type==="scatter"&&m.xaxis===l._id&&m.yaxis===i._id&&(m.orientation==="h"?d.push(u[y]):m.orientation==="v"&&h.push(u[y]))}var E={mode:s.scattermode,gap:s.scattergap};w(r,l,i,h,E),w(r,i,l,d,E)}Z.exports=function(a,l){a._fullLayout.scattermode==="group"&&C(a,l);var i=l.xaxis,s=l.yaxis,o=i._id+s._id,u=a._fullLayout._scatterStackOpts[o];if(u){var d=a.calcdata,h,y,m,E,c,_,T,M,k,b,A,g,f,p,x;for(var N in u){b=u[N];var D=b.traceIndices;if(D.length){for(A=b.stackgaps==="interpolate",g=b.groupnorm,b.orientation==="v"?(f="x",p="y"):(f="y",p="x"),x=new Array(D.length),h=0;h<x.length;h++)x[h]=!1;_=d[D[0]];var B=new Array(_.length);for(h=0;h<_.length;h++)B[h]=_[h][f];for(h=1;h<D.length;h++){for(c=d[D[h]],y=m=0;y<c.length;y++){for(T=c[y][f];T>B[m]&&m<B.length;m++)P(c,y,B[m],h,x,A,f),y++;if(T!==B[m]){for(E=0;E<h;E++)P(d[D[E]],m,T,E,x,A,f);B.splice(m,0,T)}m++}for(;m<B.length;m++)P(c,y,B[m],h,x,A,f),y++}var U=B.length;for(y=0;y<_.length;y++){for(M=_[y][p]=_[y].s,h=1;h<D.length;h++)c=d[D[h]],c[0].trace._rawLength=c[0].trace._length,c[0].trace._length=U,M+=c[y].s,c[y][p]=M;if(g)for(k=(g==="fraction"?M:M/100)||1,h=0;h<D.length;h++){var V=d[D[h]][y];V[p]/=k,V.sNorm=V.s/k}}for(h=0;h<D.length;h++){c=d[D[h]];var q=c[0].trace,z=v.calcMarkerSize(q,q._rawLength),H=Array.isArray(z);if(z&&x[h]||H){var G=z;for(z=new Array(U),y=0;y<U;y++)z[y]=c[y].gap?0:H?G[c[y].i]:G}var J=new Array(U),le=new Array(U);for(y=0;y<U;y++)J[y]=c[y].x,le[y]=c[y].y;v.calcAxisExpansion(a,q,i,s,J,le,z),c[0].t.orientation=b.orientation}}}}};function P(r,a,l,i,s,o,u){s[i]=!0;var d={i:null,gap:!0,s:0};if(d[u]=l,r.splice(a,0,d),a&&l===r[a-1][u]){var h=r[a-1];d.s=h.s,d.i=h.i,d.gap=h.gap}else o&&(d.s=t(r,a,l,u));a||(r[0].t=r[1].t,r[0].trace=r[1].trace,delete r[1].t,delete r[1].trace)}function t(r,a,l,i){var s=r[a-1],o=r[a+1];return o?s?s.s+(o.s-s.s)*(l-s[i])/(o[i]-s[i]):o.s:s.s}}}),Yp=Ne({"src/traces/scatter/line_points.js"(te,Z){var v=zs(),w=ja(),C=w.BADNUM,P=w.LOG_CLIP,t=P+.5,r=P-.5,a=In(),l=a.segmentsIntersect,i=a.constrain,s=a0();Z.exports=function(u,d){var h=d.trace||{},y=d.xaxis,m=d.yaxis,E=y.type==="log",c=m.type==="log",_=y._length,T=m._length,M=d.backoff,k=h.marker,b=d.connectGaps,A=d.baseTolerance,g=d.shape,f=g==="linear",p=h.fill&&h.fill!=="none",x=[],N=s.minTolerance,D=u.length,B=new Array(D),U=0,V,q,z,H,G,J,le,ye,de,me,W,ie,se,ee,pe,oe;function Y(Nt){var Xt=u[Nt];if(!Xt)return!1;var lr=d.linearized?y.l2p(Xt.x):y.c2p(Xt.x),Rr=d.linearized?m.l2p(Xt.y):m.c2p(Xt.y);if(lr===C){if(E&&(lr=y.c2p(Xt.x,!0)),lr===C)return!1;c&&Rr===C&&(lr*=Math.abs(y._m*T*(y._m>0?t:r)/(m._m*_*(m._m>0?t:r)))),lr*=1e3}if(Rr===C){if(c&&(Rr=m.c2p(Xt.y,!0)),Rr===C)return!1;Rr*=1e3}return[lr,Rr]}function ce(Nt,Xt,lr,Rr){var Mr=lr-Nt,Sr=Rr-Xt,Kr=.5-Nt,qn=.5-Xt,ha=Mr*Mr+Sr*Sr,ia=Mr*Kr+Sr*qn;if(ia>0&&ia<ha){var xa=Kr*Sr-qn*Mr;if(xa*xa<ha)return!0}}var ue,_e;function Le(Nt,Xt){var lr=Nt[0]/_,Rr=Nt[1]/T,Mr=Math.max(0,-lr,lr-1,-Rr,Rr-1);return Mr&&ue!==void 0&&ce(lr,Rr,ue,_e)&&(Mr=0),Mr&&Xt&&ce(lr,Rr,Xt[0]/_,Xt[1]/T)&&(Mr=0),(1+s.toleranceGrowth*Mr)*A}function ze(Nt,Xt){var lr=Nt[0]-Xt[0],Rr=Nt[1]-Xt[1];return Math.sqrt(lr*lr+Rr*Rr)}var Ge=s.maxScreensAway,Ve=-_*Ge,rt=_*(1+Ge),pt=-T*Ge,gt=T*(1+Ge),ht=[[Ve,pt,rt,pt],[rt,pt,rt,gt],[rt,gt,Ve,gt],[Ve,gt,Ve,pt]],lt,Fe,Pe,be,Ye,mt;function bt(Nt,Xt){for(var lr=[],Rr=0,Mr=0;Mr<4;Mr++){var Sr=ht[Mr],Kr=l(Nt[0],Nt[1],Xt[0],Xt[1],Sr[0],Sr[1],Sr[2],Sr[3]);Kr&&(!Rr||Math.abs(Kr.x-lr[0][0])>1||Math.abs(Kr.y-lr[0][1])>1)&&(Kr=[Kr.x,Kr.y],Rr&&ze(Kr,Nt)<ze(lr[0],Nt)?lr.unshift(Kr):lr.push(Kr),Rr++)}return lr}function ft(Nt){if(Nt[0]<Ve||Nt[0]>rt||Nt[1]<pt||Nt[1]>gt)return[i(Nt[0],Ve,rt),i(Nt[1],pt,gt)]}function Wt(Nt,Xt){if(Nt[0]===Xt[0]&&(Nt[0]===Ve||Nt[0]===rt)||Nt[1]===Xt[1]&&(Nt[1]===pt||Nt[1]===gt))return!0}function Zt(Nt,Xt){var lr=[],Rr=ft(Nt),Mr=ft(Xt);return Rr&&Mr&&Wt(Rr,Mr)||(Rr&&lr.push(Rr),Mr&&lr.push(Mr)),lr}function cr(Nt,Xt,lr){return function(Rr,Mr){var Sr=ft(Rr),Kr=ft(Mr),qn=[];if(Sr&&Kr&&Wt(Sr,Kr))return qn;Sr&&qn.push(Sr),Kr&&qn.push(Kr);var ha=2*a.constrain((Rr[Nt]+Mr[Nt])/2,Xt,lr)-((Sr||Rr)[Nt]+(Kr||Mr)[Nt]);if(ha){var ia;Sr&&Kr?ia=ha>0==Sr[Nt]>Kr[Nt]?Sr:Kr:ia=Sr||Kr,ia[Nt]+=ha}return qn}}var pr;g==="linear"||g==="spline"?pr=bt:g==="hv"||g==="vh"?pr=Zt:g==="hvh"?pr=cr(0,Ve,rt):g==="vhv"&&(pr=cr(1,pt,gt));function Br(Nt,Xt){var lr=Xt[0]-Nt[0],Rr=(Xt[1]-Nt[1])/lr,Mr=(Nt[1]*Xt[0]-Xt[1]*Nt[0])/lr;return Mr>0?[Rr>0?Ve:rt,gt]:[Rr>0?rt:Ve,pt]}function Fr(Nt){var Xt=Nt[0],lr=Nt[1],Rr=Xt===B[U-1][0],Mr=lr===B[U-1][1];if(!(Rr&&Mr))if(U>1){var Sr=Xt===B[U-2][0],Kr=lr===B[U-2][1];Rr&&(Xt===Ve||Xt===rt)&&Sr?Kr?U--:B[U-1]=Nt:Mr&&(lr===pt||lr===gt)&&Kr?Sr?U--:B[U-1]=Nt:B[U++]=Nt}else B[U++]=Nt}function cn(Nt){B[U-1][0]!==Nt[0]&&B[U-1][1]!==Nt[1]&&Fr([Pe,be]),Fr(Nt),Ye=null,Pe=be=0}var Nr=a.isArrayOrTypedArray(k);function Jr(Nt){if(Nt&&M&&(Nt.i=V,Nt.d=u,Nt.trace=h,Nt.marker=Nr?k[Nt.i]:k,Nt.backoff=M),ue=Nt[0]/_,_e=Nt[1]/T,lt=Nt[0]<Ve?Ve:Nt[0]>rt?rt:0,Fe=Nt[1]<pt?pt:Nt[1]>gt?gt:0,lt||Fe){if(!U)B[U++]=[lt||Nt[0],Fe||Nt[1]];else if(Ye){var Xt=pr(Ye,Nt);Xt.length>1&&(cn(Xt[0]),B[U++]=Xt[1])}else mt=pr(B[U-1],Nt)[0],B[U++]=mt;var lr=B[U-1];lt&&Fe&&(lr[0]!==lt||lr[1]!==Fe)?(Ye&&(Pe!==lt&&be!==Fe?Fr(Pe&&be?Br(Ye,Nt):[Pe||lt,be||Fe]):Pe&&be&&Fr([Pe,be])),Fr([lt,Fe])):Pe-lt&&be-Fe&&Fr([lt||Pe,Fe||be]),Ye=Nt,Pe=lt,be=Fe}else Ye&&cn(pr(Ye,Nt)[0]),B[U++]=Nt}for(V=0;V<D;V++)if(q=Y(V),!!q){for(U=0,Ye=null,Jr(q),V++;V<D;V++){if(H=Y(V),!H){if(b)continue;break}if(!f||!d.simplify){Jr(H);continue}var Dt=Y(V+1);if(me=ze(H,q),!(!(p&&(U===0||U===D-1))&&me<Le(H,Dt)*N)){for(ye=[(H[0]-q[0])/me,(H[1]-q[1])/me],G=q,W=me,ie=ee=pe=0,le=!1,z=H,V++;V<u.length;V++){if(J=Dt,Dt=Y(V+1),!J){if(b)continue;break}if(de=[J[0]-q[0],J[1]-q[1]],oe=de[0]*ye[1]-de[1]*ye[0],ee=Math.min(ee,oe),pe=Math.max(pe,oe),pe-ee>Le(J,Dt))break;z=J,se=de[0]*ye[0]+de[1]*ye[1],se>W?(W=se,H=J,le=!1):se<ie&&(ie=se,G=J,le=!0)}if(le?(Jr(H),z!==G&&Jr(G)):(G!==q&&Jr(G),z!==H&&Jr(H)),Jr(z),V>=u.length||!J)break;Jr(J),q=J}}Ye&&Fr([Pe||Ye[0],be||Ye[1]]),x.push(B.slice(0,U))}var $e=g.slice(g.length-1);if(M&&$e!=="h"&&$e!=="v"){for(var ot=!1,De=-1,Ee=[],Ae=0;Ae<x.length;Ae++)for(var Ie=0;Ie<x[Ae].length-1;Ie++){var tt=x[Ae][Ie],st=x[Ae][Ie+1],Ft=v.applyBackoff(st,tt);(Ft[0]!==st[0]||Ft[1]!==st[1])&&(ot=!0),Ee[De+1]||(De++,Ee[De]=[tt,[Ft[0],Ft[1]]])}return ot?Ee:x}return x}}}),Zp=Ne({"src/traces/scatter/link_traces.js"(te,Z){var v={tonextx:1,tonexty:1,tonext:1};Z.exports=function(C,P,t){var r,a,l,i,s,o={},u=!1,d=-1,h=0,y=-1;for(a=0;a<t.length;a++)r=t[a][0].trace,l=r.stackgroup||"",l?l in o?s=o[l]:(s=o[l]=h,h++):r.fill in v&&y>=0?s=y:(s=y=h,h++),s<d&&(u=!0),r._groupIndex=d=s;var m=t.slice();u&&m.sort(function(c,_){var T=c[0].trace,M=_[0].trace;return T._groupIndex-M._groupIndex||T.index-M.index});var E={};for(a=0;a<m.length;a++)r=m[a][0].trace,l=r.stackgroup||"",r.visible===!0?(r._nexttrace=null,r.fill in v&&(i=E[l],r._prevtrace=i||null,i&&(i._nexttrace=r)),r._ownfill=r.fill&&(r.fill.substr(0,6)==="tozero"||r.fill==="toself"||r.fill.substr(0,2)==="to"&&!r._prevtrace),E[l]=r):r._prevtrace=r._nexttrace=r._ownfill=null;return m}}}),om=Ne({"src/traces/scatter/plot.js"(te,Z){var v=xn(),w=Xo(),C=In(),P=C.ensureSingle,t=C.identity,r=zs(),a=vu(),l=Yp(),i=Zp(),s=j1().tester;Z.exports=function(y,m,E,c,_,T){var M,k,b=!_,A=!!_&&_.duration>0,g=i(y,m,E);if(M=c.selectAll("g.trace").data(g,function(p){return p[0].trace.uid}),M.enter().append("g").attr("class",function(p){return"trace scatter trace"+p[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(y,M,m),A){T&&(k=T());var f=v.transition().duration(_.duration).ease(_.easing).each("end",function(){k&&k()}).each("interrupt",function(){k&&k()});f.each(function(){c.selectAll("g.trace").each(function(p,x){u(y,x,m,p,g,this,_)})})}else M.each(function(p,x){u(y,x,m,p,g,this,_)});b&&M.exit().remove(),c.selectAll("path:not([d])").remove()};function o(h,y,m){y.each(function(E){var c=P(v.select(this),"g","fills");r.setClipUrl(c,m.layerClipId,h);var _=E[0].trace,T=[];_._ownfill&&T.push("_ownFill"),_._nexttrace&&T.push("_nextFill");var M=c.selectAll("g").data(T,t);M.enter().append("g"),M.exit().each(function(k){_[k]=null}).remove(),M.order().each(function(k){_[k]=P(v.select(this),"path","js-fill")})})}function u(h,y,m,E,c,_,T){var M=h._context.staticPlot,k;d(h,y,m,E,c);var b=!!T&&T.duration>0;function A(Fr){return b?Fr.transition():Fr}var g=m.xaxis,f=m.yaxis,p=E[0].trace,x=p.line,N=v.select(_),D=P(N,"g","errorbars"),B=P(N,"g","lines"),U=P(N,"g","points"),V=P(N,"g","text");if(w.getComponentMethod("errorbars","plot")(h,D,m,T),p.visible!==!0)return;A(N).style("opacity",p.opacity);var q,z,H=p.fill.charAt(p.fill.length-1);H!=="x"&&H!=="y"&&(H="");var G,J;H==="y"?(G=1,J=f.c2p(0,!0)):H==="x"&&(G=0,J=g.c2p(0,!0)),E[0][m.isRangePlot?"nodeRangePlot3":"node3"]=N;var le="",ye=[],de=p._prevtrace,me=null,W=null;de&&(le=de._prevRevpath||"",z=de._nextFill,ye=de._ownPolygons,me=de._fillsegments,W=de._fillElement);var ie,se,ee="",pe="",oe,Y,ce,ue,_e,Le,ze=[];p._polygons=[];var Ge=[],Ve=[],rt=C.noop;if(q=p._ownFill,a.hasLines(p)||p.fill!=="none"){z&&z.datum(E),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(oe=r.steps(x.shape),Y=r.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?oe=Y=function(Fr){var cn=Fr[Fr.length-1];return Fr.length>1&&Fr[0][0]===cn[0]&&Fr[0][1]===cn[1]?r.smoothclosed(Fr.slice(1),x.smoothing):r.smoothopen(Fr,x.smoothing)}:oe=Y=function(Fr){return"M"+Fr.join("L")},ce=function(Fr){return Y(Fr.reverse())},Ve=l(E,{xaxis:g,yaxis:f,trace:p,connectGaps:p.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:p.fill}),Ge=new Array(Ve.length);var pt=0;for(k=0;k<Ve.length;k++){var gt,ht=Ve[k];!gt||!H?(gt=ht.slice(),Ge[pt]=gt,pt++):gt.push.apply(gt,ht)}p._fillElement=null,p._fillExclusionElement=W,p._fillsegments=Ge.slice(0,pt),Ge=p._fillsegments,Ve.length&&(ue=Ve[0][0].slice(),_e=Ve[Ve.length-1],Le=_e[_e.length-1].slice()),rt=function(Fr){return function(cn){if(ie=oe(cn),se=ce(cn),ee?H?(ee+="L"+ie.substr(1),pe=se+("L"+pe.substr(1))):(ee+="Z"+ie,pe=se+"Z"+pe):(ee=ie,pe=se),a.hasLines(p)){var Nr=v.select(this);if(Nr.datum(E),Fr)A(Nr.style("opacity",0).attr("d",ie).call(r.lineGroupStyle)).style("opacity",1);else{var Jr=A(Nr);Jr.attr("d",ie),r.singleLineStyle(E,Jr)}}}}}var lt=B.selectAll(".js-line").data(Ve);A(lt.exit()).style("opacity",0).remove(),lt.each(rt(!1)),lt.enter().append("path").classed("js-line",!0).style("vector-effect",M?"none":"non-scaling-stroke").call(r.lineGroupStyle).each(rt(!0)),r.setClipUrl(lt,m.layerClipId,h);function Fe(Fr){A(Fr).attr("d","M0,0Z")}var Pe=function(){var Fr=new Array(Ge.length);for(k=0;k<Ge.length;k++)Fr[k]=s(Ge[k]);return Fr},be=function(Fr){var cn,Nr;if(!Fr||Fr.length===0)for(cn=new Array(Ge.length),Nr=0;Nr<Ge.length;Nr++){var Jr=Ge[Nr][0].slice(),Dt=Ge[Nr][Ge[Nr].length-1].slice();Jr[G]=Dt[G]=J;var $e=[Dt,Jr],ot=$e.concat(Ge[Nr]);cn[Nr]=s(ot)}else{for(cn=new Array(Fr.length-1+Ge.length),Nr=0;Nr<Fr.length-1;Nr++)cn[Nr]=s(Fr[Nr]);var De=Fr[Fr.length-1].slice();for(De.reverse(),Nr=0;Nr<Ge.length;Nr++)cn[Fr.length-1+Nr]=s(Ge[Nr].concat(De))}return cn};Ve.length?(q?(q.datum(E),ue&&Le&&(H?(ue[G]=Le[G]=J,A(q).attr("d","M"+Le+"L"+ue+"L"+ee.substr(1)).call(r.singleFillStyle,h),ze=be(null)):(A(q).attr("d",ee+"Z").call(r.singleFillStyle,h),ze=Pe())),p._polygons=ze,p._fillElement=q):z&&(p.fill.substr(0,6)==="tonext"&&ee&&le?(p.fill==="tonext"?(A(z).attr("d",ee+"Z"+le+"Z").call(r.singleFillStyle,h),ze=Pe(),p._polygons=ze.concat(ye)):(A(z).attr("d",ee+"L"+le.substr(1)+"Z").call(r.singleFillStyle,h),ze=be(me),p._polygons=ze),p._fillElement=z):Fe(z)),p._prevRevpath=pe):(q?Fe(q):z&&Fe(z),p._prevRevpath=null),p._ownPolygons=ze;function Ye(Fr){return Fr.filter(function(cn){return!cn.gap&&cn.vis})}function mt(Fr){return Fr.filter(function(cn){return cn.vis})}function bt(Fr){return Fr.filter(function(cn){return!cn.gap})}function ft(Fr){return Fr.id}function Wt(Fr){if(Fr.ids)return ft}function Zt(){return!1}function cr(Fr,cn,Nr){var Jr,Dt,$e,ot=Nr[0].trace,De=a.hasMarkers(ot),Ee=a.hasText(ot),Ae=Wt(ot),Ie=Zt,tt=Zt;if(De||Ee){var st=t,Ft=ot.stackgroup,Nt=Ft&&h._fullLayout._scatterStackOpts[g._id+f._id][Ft].stackgaps==="infer zero";ot.marker.maxdisplayed||ot._needsCull?st=Nt?mt:Ye:Ft&&!Nt&&(st=bt),De&&(Ie=st),Ee&&(tt=st)}Dt=Fr.selectAll("path.point"),Jr=Dt.data(Ie,Ae);var Xt=Jr.enter().append("path").classed("point",!0);b&&Xt.call(r.pointStyle,ot,h).call(r.translatePoints,g,f).style("opacity",0).transition().style("opacity",1),Jr.order();var lr;De&&(lr=r.makePointStyleFns(ot)),Jr.each(function(Rr){var Mr=v.select(this),Sr=A(Mr);$e=r.translatePoint(Rr,Sr,g,f),$e?(r.singlePointStyle(Rr,Sr,ot,lr,h),m.layerClipId&&r.hideOutsideRangePoint(Rr,Sr,g,f,ot.xcalendar,ot.ycalendar),ot.customdata&&Mr.classed("plotly-customdata",Rr.data!==null&&Rr.data!==void 0)):Sr.remove()}),b?Jr.exit().transition().style("opacity",0).remove():Jr.exit().remove(),Dt=cn.selectAll("g"),Jr=Dt.data(tt,Ae),Jr.enter().append("g").classed("textpoint",!0).append("text"),Jr.order(),Jr.each(function(Rr){var Mr=v.select(this),Sr=A(Mr.select("text"));$e=r.translatePoint(Rr,Sr,g,f),$e?m.layerClipId&&r.hideOutsideRangePoint(Rr,Mr,g,f,ot.xcalendar,ot.ycalendar):Mr.remove()}),Jr.selectAll("text").call(r.textPointStyle,ot,h).each(function(Rr){var Mr=g.c2p(Rr.x),Sr=f.c2p(Rr.y);v.select(this).selectAll("tspan.line").each(function(){A(v.select(this)).attr({x:Mr,y:Sr})})}),Jr.exit().remove()}U.datum(E),V.datum(E),cr(U,V,E);var pr=p.cliponaxis===!1,Br=pr?null:m.layerClipId;r.setClipUrl(U,Br,h),r.setClipUrl(V,Br,h)}function d(h,y,m,E,c){var _=m.xaxis,T=m.yaxis,M=v.extent(C.simpleMap(_.range,_.r2c)),k=v.extent(C.simpleMap(T.range,T.r2c)),b=E[0].trace;if(a.hasMarkers(b)){var A=b.marker.maxdisplayed;if(A!==0){var g=E.filter(function(N){return N.x>=M[0]&&N.x<=M[1]&&N.y>=k[0]&&N.y<=k[1]}),f=Math.ceil(g.length/A),p=0;c.forEach(function(N,D){var B=N[0].trace;a.hasMarkers(B)&&B.marker.maxdisplayed>0&&D<y&&p++});var x=Math.round(p*f/3+Math.floor(p/3)*f/7.1);E.forEach(function(N){delete N.vis}),g.forEach(function(N,D){Math.round((D+x)%f)===0&&(N.vis=!0)})}}}}}),ah=Ne({"src/traces/scatter/marker_colorbar.js"(te,Z){Z.exports={container:"marker",min:"cmin",max:"cmax"}}}),sm=Ne({"src/traces/scatter/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a={_fullLayout:t},l=v.getFromTrace(a,P,"x"),i=v.getFromTrace(a,P,"y"),s=C.orig_x;s===void 0&&(s=C.x);var o=C.orig_y;return o===void 0&&(o=C.y),r.xLabel=v.tickText(l,l.c2l(s),!0).text,r.yLabel=v.tickText(i,i.c2l(o),!0).text,r}}}),Hh=Ne({"src/traces/scatter/style.js"(te,Z){var v=xn(),w=zs(),C=Xo();function P(l){var i=v.select(l).selectAll("g.trace.scatter");i.style("opacity",function(s){return s[0].trace.opacity}),i.selectAll("g.points").each(function(s){var o=v.select(this),u=s.trace||s[0].trace;t(o,u,l)}),i.selectAll("g.text").each(function(s){var o=v.select(this),u=s.trace||s[0].trace;r(o,u,l)}),i.selectAll("g.trace path.js-line").call(w.lineGroupStyle),i.selectAll("g.trace path.js-fill").call(w.fillGroupStyle,l,!1),C.getComponentMethod("errorbars","style")(i)}function t(l,i,s){w.pointStyle(l.selectAll("path.point"),i,s)}function r(l,i,s){w.textPointStyle(l.selectAll("text"),i,s)}function a(l,i,s){var o=i[0].trace;o.selectedpoints?(w.selectedPointStyle(s.selectAll("path.point"),o),w.selectedTextStyle(s.selectAll("text"),o)):(t(s,o,l),r(s,o,l))}Z.exports={style:P,stylePoints:t,styleText:r,styleOnSelect:a}}}),G1=Ne({"src/traces/scatter/get_trace_color.js"(te,Z){var v=io(),w=vu();Z.exports=function(P,t){var r,a;if(P.mode==="lines")return r=P.line.color,r&&v.opacity(r)?r:P.fillcolor;if(P.mode==="none")return P.fill?P.fillcolor:"";var l=t.mcc||(P.marker||{}).color,i=t.mlcc||((P.marker||{}).line||{}).color;return a=l&&v.opacity(l)?l:i&&v.opacity(i)&&(t.mlw||((P.marker||{}).line||{}).width)?i:"",a?v.opacity(a)<.3?v.addOpacity(a,.3):a:(r=(P.line||{}).color,r&&v.opacity(r)&&w.hasLines(P)&&P.line.width?r:P.fillcolor)}}}),kg=Ne({"src/traces/scatter/hover.js"(te,Z){var v=In(),w=nh(),C=Xo(),P=G1(),t=io(),r=v.fillText;Z.exports=function(l,i,s,o){var u=l.cd,d=u[0].trace,h=l.xa,y=l.ya,m=h.c2p(i),E=y.c2p(s),c=[m,E],_=d.hoveron||"",T=d.mode.indexOf("markers")!==-1?3:.5,M=!!d.xperiodalignment,k=!!d.yperiodalignment;if(_.indexOf("points")!==-1){var b=function(ye){if(M){var de=h.c2p(ye.xStart),me=h.c2p(ye.xEnd);return m>=Math.min(de,me)&&m<=Math.max(de,me)?0:1/0}var W=Math.max(3,ye.mrc||0),ie=1-1/W,se=Math.abs(h.c2p(ye.x)-m);return se<W?ie*se/W:se-W+ie},A=function(ye){if(k){var de=y.c2p(ye.yStart),me=y.c2p(ye.yEnd);return E>=Math.min(de,me)&&E<=Math.max(de,me)?0:1/0}var W=Math.max(3,ye.mrc||0),ie=1-1/W,se=Math.abs(y.c2p(ye.y)-E);return se<W?ie*se/W:se-W+ie},g=function(ye){var de=Math.max(T,ye.mrc||0),me=h.c2p(ye.x)-m,W=y.c2p(ye.y)-E;return Math.max(Math.sqrt(me*me+W*W)-de,1-T/de)},f=w.getDistanceFunction(o,b,A,g);if(w.getClosest(u,f,l),l.index!==!1){var p=u[l.index],x=h.c2p(p.x,!0),N=y.c2p(p.y,!0),D=p.mrc||1;l.index=p.i;var B=u[0].t.orientation,U=B&&(p.sNorm||p.s),V=B==="h"?U:p.orig_x!==void 0?p.orig_x:p.x,q=B==="v"?U:p.orig_y!==void 0?p.orig_y:p.y;return v.extendFlat(l,{color:P(d,p),x0:x-D,x1:x+D,xLabelVal:V,y0:N-D,y1:N+D,yLabelVal:q,spikeDistance:g(p),hovertemplate:d.hovertemplate}),r(p,d,l),C.getComponentMethod("errorbars","hoverInfo")(p,d,l),[l]}}function z(ye){if(!ye)return!1;var de=ye.node();try{var me=new DOMPoint(c[0],c[1]);return de.isPointInFill(me)}catch{var W=de.ownerSVGElement.createSVGPoint();return W.x=c[0],W.y=c[1],de.isPointInFill(W)}}function H(ye){var de,me=[],W=1/0,ie=-1/0,se=1/0,ee=-1/0,pe;for(de=0;de<ye.length;de++){var oe=ye[de];oe.contains(c)&&(me.push(oe),se=Math.min(se,oe.ymin),ee=Math.max(ee,oe.ymax))}if(me.length===0)return null;se=Math.max(se,0),ee=Math.min(ee,y._length),pe=(se+ee)/2;var Y,ce,ue,_e,Le,ze,Ge;for(de=0;de<me.length;de++)for(ce=me[de].pts,Y=1;Y<ce.length;Y++)ze=ce[Y-1][1],Ge=ce[Y][1],ze>pe!=Ge>=pe&&(_e=ce[Y-1][0],Le=ce[Y][0],Ge-ze&&(ue=_e+(Le-_e)*(pe-ze)/(Ge-ze),W=Math.min(W,ue),ie=Math.max(ie,ue)));return W=Math.max(W,0),ie=Math.min(ie,h._length),{x0:W,x1:ie,y0:pe,y1:pe}}if(_.indexOf("fills")!==-1&&d._fillElement){var G=z(d._fillElement)&&!z(d._fillExclusionElement);if(G){var J=H(d._polygons);J===null&&(J={x0:c[0],x1:c[0],y0:c[1],y1:c[1]});var le=t.defaultLine;return t.opacity(d.fillcolor)?le=d.fillcolor:t.opacity((d.line||{}).color)&&(le=d.line.color),v.extendFlat(l,{distance:l.maxHoverDistance,x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1,color:le,hovertemplate:!1}),delete l.index,d.text&&!v.isArrayOrTypedArray(d.text)?l.text=String(d.text):l.text=d.name,[l]}}}}}),Pg=Ne({"src/traces/scatter/select.js"(te,Z){var v=vu();Z.exports=function(C,P){var t=C.cd,r=C.xaxis,a=C.yaxis,l=[],i=t[0].trace,s,o,u,d,h=!v.hasMarkers(i)&&!v.hasText(i);if(h)return[];if(P===!1)for(s=0;s<t.length;s++)t[s].selected=0;else for(s=0;s<t.length;s++)o=t[s],u=r.c2p(o.x),d=a.c2p(o.y),o.i!==null&&P.contains([u,d],!1,s,C)?(l.push({pointNumber:o.i,x:r.c2d(o.x),y:a.c2d(o.y)}),o.selected=1):o.selected=0;return l}}}),TM=Ne({"src/plots/cartesian/attributes.js"(te,Z){Z.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}}}),sv=Ne({"src/plots/cartesian/type_defaults.js"(te,Z){var v=Xo().traceIs,w=Ty();Z.exports=function(l,i,s,o){s("autotypenumbers",o.autotypenumbersDflt);var u=s("type",(o.splomStash||{}).type);u==="-"&&(C(i,o.data),i.type==="-"?i.type="linear":l.type=i.type)};function C(a,l){if(a.type==="-"){var i=a._id,s=i.charAt(0),o;i.indexOf("scene")!==-1&&(i=s);var u=P(l,i,s);if(u){if(u.type==="histogram"&&s==={v:"y",h:"x"}[u.orientation||"v"]){a.type="linear";return}var d=s+"calendar",h=u[d],y={noMultiCategory:!v(u,"cartesian")||v(u,"noMultiCategory")};if(u.type==="box"&&u._hasPreCompStats&&s==={h:"x",v:"y"}[u.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=a.autotypenumbers,r(u,s)){var m=t(u),E=[];for(o=0;o<l.length;o++){var c=l[o];!v(c,"box-violin")||(c[s+"axis"]||s)!==i||(c[m]!==void 0?E.push(c[m][0]):c.name!==void 0?E.push(c.name):E.push("text"),c[d]!==h&&(h=void 0))}a.type=w(E,h,y)}else if(u.type==="splom"){var _=u.dimensions,T=_[u._axesDim[i]];T.visible&&(a.type=w(T.values,h,y))}else a.type=w(u[s]||[u[s+"0"]],h,y)}}}function P(a,l,i){for(var s=0;s<a.length;s++){var o=a[s];if(o.type==="splom"&&o._length>0&&(o["_"+i+"axes"]||{})[l])return o;if((o[i+"axis"]||i)===l){if(r(o,i))return o;if((o[i]||[]).length||o[i+"0"])return o}}}function t(a){return{v:"x",h:"y"}[a.orientation||"v"]}function r(a,l){var i=t(a),s=v(a,"box-violin"),o=v(a._fullInput||{},"candlestick");return s&&!o&&l===i&&a[i]===void 0&&a[i+"0"]===void 0}}}),Gf=Ne({"src/plots/cartesian/category_order_defaults.js"(te,Z){var v=vi().isTypedArraySpec;function w(C,P){var t=P.dataAttr||C._id.charAt(0),r={},a,l,i;if(P.axData)a=P.axData;else for(a=[],l=0;l<P.data.length;l++){var s=P.data[l];s[t+"axis"]===C._id&&a.push(s)}for(l=0;l<a.length;l++){var o=a[l][t];for(i=0;i<o.length;i++){var u=o[i];u!=null&&(r[u]=1)}}return Object.keys(r)}Z.exports=function(P,t,r,a){if(t.type==="category"){var l=P.categoryarray,i=Array.isArray(l)&&l.length>0||v(l),s;i&&(s="array");var o=r("categoryorder",s),u;o==="array"&&(u=r("categoryarray")),!i&&o==="array"&&(o=t.categoryorder="trace"),o==="trace"?t._initialCategories=[]:o==="array"?t._initialCategories=u.slice():(u=w(t,a).sort(),o==="category ascending"?t._initialCategories=u:o==="category descending"&&(t._initialCategories=u.reverse()))}}}}),Ku=Ne({"src/plots/cartesian/line_grid_defaults.js"(te,Z){var v=Ro().mix,w=lu(),C=In();Z.exports=function(t,r,a,l){l=l||{};var i=l.dfltColor;function s(p,x){return C.coerce2(t,r,l.attributes,p,x)}var o=s("linecolor",i),u=s("linewidth"),d=a("showline",l.showLine||!!o||!!u);d||(delete r.linecolor,delete r.linewidth);var h=v(i,l.bgColor,l.blend||w.lightFraction).toRgbString(),y=s("gridcolor",h),m=s("gridwidth"),E=s("griddash"),c=a("showgrid",l.showGrid||!!y||!!m||!!E);if(c||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),l.hasMinor){var _=v(r.gridcolor,l.bgColor,67).toRgbString(),T=s("minor.gridcolor",_),M=s("minor.gridwidth",r.gridwidth||1),k=s("minor.griddash",r.griddash||"solid"),b=a("minor.showgrid",!!T||!!M||!!k);b||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!l.noZeroLine){s("zerolinelayer");var A=s("zerolinecolor",i),g=s("zerolinewidth"),f=a("zeroline",l.showGrid||!!A||!!g);f||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}}}),Om=Ne({"src/plots/cartesian/axis_defaults.js"(te,Z){var v=la(),w=Xo(),C=In(),P=Tu(),t=zd(),r=wd(),a=Tg(),l=B0(),i=Em(),s=fp(),o=Gf(),u=Ku(),d=rM(),h=qp(),y=xh().WEEKDAY_PATTERN,m=xh().HOUR_PATTERN;Z.exports=function(M,k,b,A,g){var f=A.letter,p=A.font||{},x=A.splomStash||{},N=b("visible",!A.visibleDflt),D=k._template||{},B=k.type||D.type||"-",U;if(B==="date"){var V=w.getComponentMethod("calendars","handleDefaults");V(M,k,"calendar",A.calendar),A.noTicklabelmode||(U=b("ticklabelmode"))}!A.noTicklabelindex&&(B==="date"||B==="linear")&&b("ticklabelindex");var q="";(!A.noTicklabelposition||B==="multicategory")&&(q=C.coerce(M,k,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:U==="period"?["outside","inside"]:f==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),A.noTicklabeloverflow||b("ticklabeloverflow",q.indexOf("inside")!==-1?"hide past domain":B==="category"||B==="multicategory"?"allow":"hide past div"),h(k,g),d(M,k,b,A),o(M,k,b,A),A.noHover||(B!=="category"&&b("hoverformat"),A.noUnifiedhovertitle||b("unifiedhovertitle.text"));var z=b("color"),H=z!==r.color.dflt?z:p.color,G=x.label||g._dfltTitle[f];if(s(M,k,b,B,A),!N)return k;b("title.text",G),C.coerceFont(b,"title.font",p,{overrideDflt:{size:C.bigFont(p.size),color:H}}),a(M,k,b,B);var J=A.hasMinor;if(J&&(P.newContainer(k,"minor"),a(M,k,b,B,{isMinor:!0})),i(M,k,b,B,A),l(M,k,b,A),J){var le=A.isMinor;A.isMinor=!0,l(M,k,b,A),A.isMinor=le}u(M,k,b,{dfltColor:z,bgColor:A.bgColor,showGrid:A.showGrid,hasMinor:J,attributes:r}),J&&!k.minor.ticks&&!k.minor.showgrid&&delete k.minor,(k.showline||k.ticks)&&b("mirror");var ye=B==="multicategory";if(!A.noTickson&&(B==="category"||ye)&&(k.ticks||k.showgrid)&&(ye?(b("tickson","boundaries"),delete k.ticklabelposition):b("tickson")),ye){var de=b("showdividers");de&&(b("dividercolor"),b("dividerwidth"))}if(B==="date")if(t(M,k,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:E}),!k.rangebreaks.length)delete k.rangebreaks;else{for(var me=0;me<k.rangebreaks.length;me++)if(k.rangebreaks[me].pattern===y){k._hasDayOfWeekBreaks=!0;break}if(h(k,g),g._has("scattergl")||g._has("splom"))for(var W=0;W<A.data.length;W++){var ie=A.data[W];(ie.type==="scattergl"||ie.type==="splom")&&(ie.visible=!1,C.warn(ie.type+" traces do not work on axes with rangebreaks. Setting trace "+ie.index+" to `visible: false`."))}}return k};function E(T,M,k){function b(U,V){return C.coerce(T,M,r.rangebreaks,U,V)}var A=b("enabled");if(A){var g=b("bounds");if(g&&g.length>=2){var f="",p,x;if(g.length===2){for(p=0;p<2;p++)if(x=_(g[p]),x){f=y;break}}var N=b("pattern",f);if(N===y)for(p=0;p<2;p++)x=_(g[p]),x&&(M.bounds[p]=g[p]=x-1);if(N)for(p=0;p<2;p++)switch(x=g[p],N){case y:if(!v(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[p]=g[p]=x;break;case m:if(!v(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[p]=g[p]=x;break}if(k.autorange===!1){var D=k.range;if(D[0]<D[1]){if(g[0]<D[0]&&g[1]>D[1]){M.enabled=!1;return}}else if(g[0]>D[0]&&g[1]<D[1]){M.enabled=!1;return}}}else{var B=b("values");if(B&&B.length)b("dvalue");else{M.enabled=!1;return}}}}var c={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function _(T){if(typeof T=="string")return c[T.substr(0,3).toLowerCase()]}}}),hp=Ne({"src/plots/cartesian/position_defaults.js"(te,Z){var v=la(),w=In();Z.exports=function(P,t,r,a){var l=a.counterAxes||[],i=a.overlayableAxes||[],s=a.letter,o=a.grid,u=a.overlayingDomain,d,h,y,m,E,c;o&&(h=o._domains[s][o._axisMap[t._id]],d=o._anchors[t._id],h&&(y=o[s+"side"].split(" ")[0],m=o.domain[s][y==="right"||y==="top"?1:0])),h=h||[0,1],d=d||(v(P.position)?"free":l[0]||"free"),y=y||(s==="x"?"bottom":"left"),m=m||0,E=0,c=!1;var _=w.coerce(P,t,{anchor:{valType:"enumerated",values:["free"].concat(l),dflt:d}},"anchor"),T=w.coerce(P,t,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:y}},"side");if(_==="free"){if(s==="y"){var M=r("autoshift");M&&(m=T==="left"?u[0]:u[1],c=t.automargin?t.automargin:!0,E=T==="left"?-3:3),r("shift",E)}r("position",m)}r("automargin",c);var k=!1;if(i.length&&(k=w.coerce(P,t,{overlaying:{valType:"enumerated",values:[!1].concat(i),dflt:!1}},"overlaying")),!k){var b=r("domain",h);b[0]>b[1]-1/4096&&(t.domain=h),w.noneOrAll(P.domain,t.domain,h),t.tickmode==="sync"&&(t.tickmode="auto")}return r("layer"),t}}}),gA=Ne({"src/plots/cartesian/layout_defaults.js"(te,Z){var v=In(),w=io(),C=_v().isUnifiedHover,P=cM(),t=Tu(),r=_x(),a=wd(),l=sv(),i=Om(),s=Mg(),o=hp(),u=Hf(),d=u.id2name,h=u.name2id,y=xh().AX_ID_PATTERN,m=Xo(),E=m.traceIs,c=m.getComponentMethod;function _(T,M,k){Array.isArray(T[M])?T[M].push(k):T[M]=[k]}Z.exports=function(M,k,b){var A=k.autotypenumbers,g={},f={},p={},x={},N={},D={},B={},U={},V={},q={},z,H;for(z=0;z<b.length;z++){var G=b[z];if(E(G,"cartesian")){var J;if(G.xaxis)J=d(G.xaxis),_(g,J,G);else if(G.xaxes)for(H=0;H<G.xaxes.length;H++)_(g,d(G.xaxes[H]),G);var le;if(G.yaxis)le=d(G.yaxis),_(g,le,G);else if(G.yaxes)for(H=0;H<G.yaxes.length;H++)_(g,d(G.yaxes[H]),G);if(G.type==="funnel"?G.orientation==="h"?(J&&(f[J]=!0),le&&(B[le]=!0)):le&&(p[le]=!0):G.type==="image"?(le&&(U[le]=!0),J&&(U[J]=!0)):(le&&(N[le]=!0,D[le]=!0),(!E(G,"carpet")||G.type==="carpet"&&!G._cheater)&&J&&(x[J]=!0)),G.type==="carpet"&&G._cheater&&J&&(f[J]=!0),E(G,"2dMap")&&(V[J]=!0,V[le]=!0),E(G,"oriented")){var ye=G.orientation==="h"?le:J;q[ye]=!0}}}var de=k._subplots,me=de.xaxis,W=de.yaxis,ie=v.simpleMap(me,d),se=v.simpleMap(W,d),ee=ie.concat(se),pe=w.background;me.length&&W.length&&(pe=v.coerce(M,k,r,"plot_bgcolor"));var oe=w.combine(pe,k.paper_bgcolor),Y,ce,ue,_e,Le;function ze(){var Ie=g[Y]||[];Le._traceIndices=Ie.map(function(tt){return tt.index}),Le._annIndices=[],Le._shapeIndices=[],Le._selectionIndices=[],Le._imgIndices=[],Le._subplotsWith=[],Le._counterAxes=[],Le._name=Le._attr=Y,Le._id=ce}function Ge(Ie,tt){return v.coerce(_e,Le,a,Ie,tt)}function Ve(Ie,tt){return v.coerce2(_e,Le,a,Ie,tt)}function rt(Ie){return Ie==="x"?W:me}function pt(Ie,tt){for(var st=Ie==="x"?ie:se,Ft=[],Nt=0;Nt<st.length;Nt++){var Xt=st[Nt];Xt!==tt&&!(M[Xt]||{}).overlaying&&Ft.push(h(Xt))}return Ft}var gt={x:rt("x"),y:rt("y")},ht=gt.x.concat(gt.y),lt={},Fe=[];function Pe(){var Ie=_e.matches;y.test(Ie)&&ht.indexOf(Ie)===-1&&(lt[Ie]=_e.type,Fe=Object.keys(lt))}var be=P(M,k),Ye=C(be);for(z=0;z<ee.length;z++){Y=ee[z],ce=h(Y),ue=Y.charAt(0),v.isPlainObject(M[Y])||(M[Y]={}),_e=M[Y],Le=t.newContainer(k,Y,ue+"axis"),ze();var mt=ue==="x"&&!x[Y]&&f[Y]||ue==="y"&&!N[Y]&&p[Y],bt=ue==="y"&&(!D[Y]&&B[Y]||U[Y]),ft={hasMinor:!0,letter:ue,font:k.font,outerTicks:V[Y],showGrid:!q[Y],data:g[Y]||[],bgColor:oe,calendar:k.calendar,automargin:!0,visibleDflt:mt,reverseDflt:bt,autotypenumbersDflt:A,splomStash:((k._splomAxes||{})[ue]||{})[ce],noAutotickangles:ue==="y"};Ge("uirevision",k.uirevision),l(_e,Le,Ge,ft),i(_e,Le,Ge,ft,k);var Wt=Ye&&ue===be.charAt(0),Zt=Ve("spikecolor",Ye?Le.color:void 0),cr=Ve("spikethickness",Ye?1.5:void 0),pr=Ve("spikedash",Ye?"dot":void 0),Br=Ve("spikemode",Ye?"across":void 0),Fr=Ve("spikesnap"),cn=Ge("showspikes",!!Wt||!!Zt||!!cr||!!pr||!!Br||!!Fr);cn||(delete Le.spikecolor,delete Le.spikethickness,delete Le.spikedash,delete Le.spikemode,delete Le.spikesnap);var Nr=d(_e.overlaying),Jr=[0,1];if(k[Nr]!==void 0){var Dt=d(k[Nr].anchor);k[Dt]!==void 0&&(Jr=k[Dt].domain)}o(_e,Le,Ge,{letter:ue,counterAxes:gt[ue],overlayableAxes:pt(ue,Y),grid:k.grid,overlayingDomain:Jr}),Ge("title.standoff"),Pe(),Le._input=_e}for(z=0;z<Fe.length;){ce=Fe[z++],Y=d(ce),ue=Y.charAt(0),v.isPlainObject(M[Y])||(M[Y]={}),_e=M[Y],Le=t.newContainer(k,Y,ue+"axis"),ze();var $e={letter:ue,font:k.font,outerTicks:V[Y],showGrid:!q[Y],data:[],bgColor:oe,calendar:k.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:A,splomStash:((k._splomAxes||{})[ue]||{})[ce]};Ge("uirevision",k.uirevision),Le.type=lt[ce]||"linear",i(_e,Le,Ge,$e,k),o(_e,Le,Ge,{letter:ue,counterAxes:gt[ue],overlayableAxes:pt(ue,Y),grid:k.grid}),Ge("fixedrange"),Ge("modebardisable"),Pe(),Le._input=_e}var ot=c("rangeslider","handleDefaults"),De=c("rangeselector","handleDefaults");for(z=0;z<ie.length;z++)Y=ie[z],_e=M[Y],Le=k[Y],ot(M,k,Y),Le.type==="date"&&De(_e,Le,k,se,Le.calendar),Ge("fixedrange"),Ge("modebardisable");for(z=0;z<se.length;z++){Y=se[z],_e=M[Y],Le=k[Y];var Ee=k[d(Le.anchor)],Ae=c("rangeslider","isVisible")(Ee);Ge("fixedrange",Ae),Ge("modebardisable")}s.handleDefaults(M,k,{axIds:ht.concat(Fe).sort(u.idSort),axHasImage:U})}}}),Cy=Ne({"src/plots/cartesian/transition_axes.js"(te,Z){var v=xn(),w=Xo(),C=In(),P=zs(),t=Os();Z.exports=function(a,l,i,s){var o=a._fullLayout;if(l.length===0){t.redrawComponents(a);return}function u(k){var b=k.xaxis,A=k.yaxis;o._defs.select("#"+k.clipId+"> rect").call(P.setTranslate,0,0).call(P.setScale,1,1),k.plot.call(P.setTranslate,b._offset,A._offset).call(P.setScale,1,1);var g=k.plot.selectAll(".scatterlayer .trace");g.selectAll(".point").call(P.setPointGroupScale,1,1),g.selectAll(".textpoint").call(P.setTextPointsScale,1,1),g.call(P.hideOutsideRangePoints,k)}function d(k,b){var A=k.plotinfo,g=A.xaxis,f=A.yaxis,p=g._length,x=f._length,N=!!k.xr1,D=!!k.yr1,B=[];if(N){var U=C.simpleMap(k.xr0,g.r2l),V=C.simpleMap(k.xr1,g.r2l),q=U[1]-U[0],z=V[1]-V[0];B[0]=(U[0]*(1-b)+b*V[0]-U[0])/(U[1]-U[0])*p,B[2]=p*(1-b+b*z/q),g.range[0]=g.l2r(U[0]*(1-b)+b*V[0]),g.range[1]=g.l2r(U[1]*(1-b)+b*V[1])}else B[0]=0,B[2]=p;if(D){var H=C.simpleMap(k.yr0,f.r2l),G=C.simpleMap(k.yr1,f.r2l),J=H[1]-H[0],le=G[1]-G[0];B[1]=(H[1]*(1-b)+b*G[1]-H[1])/(H[0]-H[1])*x,B[3]=x*(1-b+b*le/J),f.range[0]=g.l2r(H[0]*(1-b)+b*G[0]),f.range[1]=f.l2r(H[1]*(1-b)+b*G[1])}else B[1]=0,B[3]=x;t.drawOne(a,g,{skipTitle:!0}),t.drawOne(a,f,{skipTitle:!0}),t.redrawComponents(a,[g._id,f._id]);var ye=N?p/B[2]:1,de=D?x/B[3]:1,me=N?B[0]:0,W=D?B[1]:0,ie=N?B[0]/B[2]*p:0,se=D?B[1]/B[3]*x:0,ee=g._offset-ie,pe=f._offset-se;A.clipRect.call(P.setTranslate,me,W).call(P.setScale,1/ye,1/de),A.plot.call(P.setTranslate,ee,pe).call(P.setScale,ye,de),P.setPointGroupScale(A.zoomScalePts,1/ye,1/de),P.setTextPointsScale(A.zoomScaleTxt,1/ye,1/de)}var h;s&&(h=s());function y(){for(var k={},b=0;b<l.length;b++){var A=l[b],g=A.plotinfo.xaxis,f=A.plotinfo.yaxis;A.xr1&&(k[g._name+".range"]=A.xr1.slice()),A.yr1&&(k[f._name+".range"]=A.yr1.slice())}return h&&h(),w.call("relayout",a,k).then(function(){for(var p=0;p<l.length;p++)u(l[p].plotinfo)})}function m(){for(var k={},b=0;b<l.length;b++){var A=l[b],g=A.plotinfo.xaxis,f=A.plotinfo.yaxis;A.xr0&&(k[g._name+".range"]=A.xr0.slice()),A.yr0&&(k[f._name+".range"]=A.yr0.slice())}return w.call("relayout",a,k).then(function(){for(var p=0;p<l.length;p++)u(l[p].plotinfo)})}var E,c,_,T=v.ease(i.easing);a._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(_),_=null,m()});function M(){c=Date.now();for(var k=Math.min(1,(c-E)/i.duration),b=T(k),A=0;A<l.length;A++)d(l[A],b);c-E>i.duration?(y(),_=window.cancelAnimationFrame(M)):_=window.requestAnimationFrame(M)}return E=Date.now(),_=window.requestAnimationFrame(M),Promise.resolve()}}}),Lh=Ne({"src/plots/cartesian/index.js"(te){var Z=xn(),v=Xo(),w=In(),C=uf(),P=zs(),t=iv().getModuleCalcData,r=Hf(),a=xh(),l=cp(),i=w.ensureSingle;function s(E,c,_){return w.ensureSingle(E,c,_,function(T){T.datum(_)})}var o=a.zindexSeparator;te.name="cartesian",te.attr=["xaxis","yaxis"],te.idRoot=["x","y"],te.idRegex=a.idRegex,te.attrRegex=a.attrRegex,te.attributes=TM(),te.layoutAttributes=wd(),te.supplyLayoutDefaults=gA(),te.transitionAxes=Cy(),te.finalizeSubplots=function(E,c){var _=c._subplots,T=_.xaxis,M=_.yaxis,k=_.cartesian,b=k,A={},g={},f,p,x;for(f=0;f<b.length;f++){var N=b[f].split("y");A[N[0]]=1,g["y"+N[1]]=1}for(f=0;f<T.length;f++)p=T[f],A[p]||(x=(E[r.id2name(p)]||{}).anchor,a.idRegex.y.test(x)||(x="y"),k.push(p+x),b.push(p+x),g[x]||(g[x]=1,w.pushUnique(M,x)));for(f=0;f<M.length;f++)x=M[f],g[x]||(p=(E[r.id2name(x)]||{}).anchor,a.idRegex.x.test(p)||(p="x"),k.push(p+x),b.push(p+x),A[p]||(A[p]=1,w.pushUnique(T,p)));if(!b.length){p="",x="";for(var D in E)if(a.attrRegex.test(D)){var B=D.charAt(0);B==="x"?(!p||+D.substr(5)<+p.substr(5))&&(p=D):(!x||+D.substr(5)<+x.substr(5))&&(x=D)}p=p?r.name2id(p):"x",x=x?r.name2id(x):"y",T.push(p),M.push(x),k.push(p+x)}},te.plot=function(E,c,_,T){var M=E._fullLayout,k=M._subplots.cartesian,b=E.calcdata,A;if(!Array.isArray(c))for(c=[],A=0;A<b.length;A++)c.push(A);for(var g=M._zindices,f=0;f<g.length;f++){var p=g[f];for(A=0;A<k.length;A++){var x=k[A],N=M._plots[x];if(f>0){var D=N.id;if(D.indexOf(o)!==-1)continue;D+=o+(f+1),N=w.extendFlat({},N,{id:D,plot:M._cartesianlayer.selectAll(".subplot").select("."+D)})}for(var B=[],U,V=0;V<b.length;V++){var q=b[V],z=q[0].trace;p===(z.zorder||0)&&z.xaxis+z.yaxis===x&&((c.indexOf(z.index)!==-1||z.carpet)&&(U&&U[0].trace.xaxis+U[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(z.fill)!==-1&&B.indexOf(U)===-1&&B.push(U),B.push(q)),U=q)}u(E,N,B,_,T)}}};function u(E,c,_,T,M){for(var k=a.traceLayerClasses,b=E._fullLayout,A=b._zindices,g=b._modules,f,p,x,N=[],D=[],B=0;B<A.length;B++)for(var U=A[B],V=0;V<g.length;V++){f=g[V];var q=f.name,z=v.modules[q].categories;if(z.svg){var H=f.layerName||q+"layer",G=H+(B?Number(B)+1:""),J=f.plot;p=t(_,J,U),x=p[0],_=p[1],x.length&&N.push({i:k.indexOf(H),zindex:B,className:G,plotMethod:J,cdModule:x}),z.zoomScale&&D.push("."+G)}}N.sort(function(de,me){return(de.zindex||0)-(me.zindex||0)||de.i-me.i});var le=c.plot.selectAll("g.mlayer").data(N,function(de){return de.className});if(le.enter().append("g").attr("class",function(de){return de.className}).classed("mlayer",!0).classed("rangeplot",c.isRangePlot),le.exit().remove(),le.order(),le.each(function(de){var me=Z.select(this),W=de.className;de.plotMethod(E,c,de.cdModule,me,T,M),a.clipOnAxisFalseQuery.indexOf("."+W)===-1&&P.setClipUrl(me,c.layerClipId,E)}),b._has("scattergl")&&(f=v.getModule("scattergl"),x=t(_,f)[0],f.plot(E,c,x)),!E._context.staticPlot&&(c._hasClipOnAxisFalse&&(c.clipOnAxisFalseTraces=c.plot.selectAll(a.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),D.length)){var ye=c.plot.selectAll(D.join(",")).selectAll(".trace");c.zoomScalePts=ye.selectAll("path.point"),c.zoomScaleTxt=ye.selectAll(".textpoint")}}te.clean=function(E,c,_,T){var M=T._plots||{},k=c._plots||{},b=T._subplots||{},A,g,f;if(T._hasOnlyLargeSploms&&!c._hasOnlyLargeSploms)for(f in M)A=M[f],A.plotgroup&&A.plotgroup.remove();var p=T._has&&T._has("gl"),x=c._has&&c._has("gl");if(p&&!x)for(f in M)A=M[f],A._scene&&A._scene.destroy();if(b.xaxis&&b.yaxis){var N=r.listIds({_fullLayout:T});for(g=0;g<N.length;g++){var D=N[g];c[r.id2name(D)]||T._infolayer.selectAll(".g-"+D+"title").remove()}}var B=T._has&&T._has("cartesian"),U=c._has&&c._has("cartesian");if(B&&!U)y(T._cartesianlayer.selectAll(".subplot"),T),T._defs.selectAll(".axesclip").remove(),delete T._axisConstraintGroups,delete T._axisMatchGroups;else if(b.cartesian)for(g=0;g<b.cartesian.length;g++){var V=b.cartesian[g];if(V.indexOf(o)===-1&&!k[V]){var q="."+V+",."+V+"-x,."+V+"-y";T._cartesianlayer.selectAll(q).remove(),m(V,T)}}},te.drawFramework=function(E){var c=E._fullLayout,_=E.calcdata,T,M={};for(T=0;T<_.length;T++){var k=_[T][0],b=k.trace,A=b.zorder||0;M[A]||(M[A]=[]),M[A].push(k)}var g=Object.keys(M).map(Number).sort(w.sorterAsc);g.length||(g=[0]),c._zindices=g;var f=d(E),p=f.length,x=[];for(T=0;T<p;T++)x[T]=f[T].slice();for(var N=1;N<g.length;N++){var D=[];for(T=0;T<p;T++)D[T]=f[T].slice(),D[T][0]+=o+(N+1);x=x.concat(D)}var B=c._cartesianlayer.selectAll(".subplot").data(x,String);B.enter().append("g").attr("class",function(U){return"subplot "+U[0]}),B.order(),B.exit().call(y,c),B.each(function(U){var V=U[0],q=V.indexOf(o),z=q!==-1,H=z?V.slice(0,q):V,G=c._plots[V];G||(G=w.extendFlat({},c._plots[H]),G&&(G.id=V,c._plots[V]=G,c._subplots.cartesian.push(V))),G&&(G.plotgroup=Z.select(this),h(E,G),z||(G.draglayer=i(c._draggers,"g",V)))})},te.rangePlot=function(E,c,_){h(E,c),u(E,c,_),C.style(E)};function d(E){var c=E._fullLayout,_=c._zindices.length,T=c._subplots.cartesian,M=T.length,k,b,A,g,f,p,x=[],N=[];for(k=0;k<M;k++){A=T[k],g=c._plots[A],f=g.xaxis,p=g.yaxis;var D=f._mainAxis,B=p._mainAxis,U=D._id+B._id,V=c._plots[U];g.overlays=[],U!==A&&V?(g.mainplot=U,g.mainplotinfo=V,N.push(A)):(g.mainplot=void 0,g.mainplotinfo=void 0,x.push(A))}for(k=0;k<N.length;k++)A=N[k],g=c._plots[A],g.mainplotinfo.overlays.push(g);var q=x.concat(N),z=[];for(k=0;k<M;k++){A=q[k],g=c._plots[A],f=g.xaxis,p=g.yaxis;for(var H=[],G=1;G<=_;G++){var J="";for(G>1&&(J+=o+G),H.push(A+J),b=0;b<g.overlays.length;b++)H.push(g.overlays[b].id+J)}H=H.concat([f.layer,p.layer,f.overlaying||"",p.overlaying||""]),z.push(H)}return z}function h(E,c){var _=E._fullLayout,T=c.plotgroup,M=c.id,k=M.indexOf(o),b=k!==-1,A=a.layerValue2layerClass[c.xaxis.layer],g=a.layerValue2layerClass[c.yaxis.layer],f=_._hasOnlyLargeSploms,p=_._zindices.length>1,x=c.mainplotinfo;if(!c.mainplot||p)if(f)c.xlines=i(T,"path","xlines-above"),c.ylines=i(T,"path","ylines-above"),c.xaxislayer=i(T,"g","xaxislayer-above"),c.yaxislayer=i(T,"g","yaxislayer-above");else{if(!b){var N=i(T,"g","layer-subplot");c.shapelayer=i(N,"g","shapelayer"),c.imagelayer=i(N,"g","imagelayer"),x&&p?(c.minorGridlayer=x.minorGridlayer,c.gridlayer=x.gridlayer,c.zerolinelayer=x.zerolinelayer):(c.minorGridlayer=i(T,"g","minor-gridlayer"),c.gridlayer=i(T,"g","gridlayer"),c.zerolinelayer=i(T,"g","zerolinelayer"));var D=i(T,"g","layer-between");c.shapelayerBetween=i(D,"g","shapelayer"),c.imagelayerBetween=i(D,"g","imagelayer"),i(T,"path","xlines-below"),i(T,"path","ylines-below"),c.overlinesBelow=i(T,"g","overlines-below"),i(T,"g","xaxislayer-below"),i(T,"g","yaxislayer-below"),c.overaxesBelow=i(T,"g","overaxes-below")}c.overplot=i(T,"g","overplot"),c.plot=i(c.overplot,"g",M),x&&p?c.zerolinelayerAbove=x.zerolinelayerAbove:c.zerolinelayerAbove=i(T,"g","zerolinelayer-above"),b||(c.xlines=i(T,"path","xlines-above"),c.ylines=i(T,"path","ylines-above"),c.overlinesAbove=i(T,"g","overlines-above"),i(T,"g","xaxislayer-above"),i(T,"g","yaxislayer-above"),c.overaxesAbove=i(T,"g","overaxes-above"),c.xlines=T.select(".xlines-"+A),c.ylines=T.select(".ylines-"+g),c.xaxislayer=T.select(".xaxislayer-"+A),c.yaxislayer=T.select(".yaxislayer-"+g))}else{var B=x.plotgroup,U=M+"-x",V=M+"-y";c.minorGridlayer=x.minorGridlayer,c.gridlayer=x.gridlayer,c.zerolinelayer=x.zerolinelayer,c.zerolinelayerAbove=x.zerolinelayerAbove,i(x.overlinesBelow,"path",U),i(x.overlinesBelow,"path",V),i(x.overaxesBelow,"g",U),i(x.overaxesBelow,"g",V),c.plot=i(x.overplot,"g",M),i(x.overlinesAbove,"path",U),i(x.overlinesAbove,"path",V),i(x.overaxesAbove,"g",U),i(x.overaxesAbove,"g",V),c.xlines=B.select(".overlines-"+A).select("."+U),c.ylines=B.select(".overlines-"+g).select("."+V),c.xaxislayer=B.select(".overaxes-"+A).select("."+U),c.yaxislayer=B.select(".overaxes-"+g).select("."+V)}b||(f||(s(c.minorGridlayer,"g",c.xaxis._id),s(c.minorGridlayer,"g",c.yaxis._id),c.minorGridlayer.selectAll("g").map(function(q){return q[0]}).sort(r.idSort),s(c.gridlayer,"g",c.xaxis._id),s(c.gridlayer,"g",c.yaxis._id),c.gridlayer.selectAll("g").map(function(q){return q[0]}).sort(r.idSort)),c.xlines.style("fill","none").classed("crisp",!0),c.ylines.style("fill","none").classed("crisp",!0))}function y(E,c){if(E){var _={};E.each(function(g){var f=g[0],p=Z.select(this);p.remove(),m(f,c),_[f]=!0});for(var T in c._plots)for(var M=c._plots[T],k=M.overlays||[],b=0;b<k.length;b++){var A=k[b];_[A.id]&&A.plot.selectAll(".trace").remove()}}}function m(E,c){c._draggers.selectAll("g."+E).remove(),c._defs.select("#clip"+c._uid+E+"plot").remove()}te.toSVG=function(E){var c=E._fullLayout._glimages,_=Z.select(E).selectAll(".svg-container"),T=_.filter(function(k,b){return b===_.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function M(){var k=this,b=k.toDataURL("image/png"),A=c.append("svg:image");A.attr({xmlns:l.svg,"xlink:href":b,preserveAspectRatio:"none",x:0,y:0,width:k.style.width,height:k.style.height})}T.each(M)},te.updateFx=xM().updateFx}}),AM=Ne({"src/traces/scatter/index.js"(te,Z){var v=vu();Z.exports={hasLines:v.hasLines,hasMarkers:v.hasMarkers,hasText:v.hasText,isBubble:v.isBubble,attributes:Jc(),layoutAttributes:xy(),supplyDefaults:wM(),crossTraceDefaults:My(),supplyLayoutDefaults:yA(),calc:Uv().calc,crossTraceCalc:Px(),arraysToCalcdata:o0(),plot:om(),colorbar:ah(),formatLabels:sm(),style:Hh().style,styleOnSelect:Hh().styleOnSelect,hoverPoints:kg(),selectPoints:Pg(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Lh(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}}}),X1=Ne({"src/components/annotations/draw_arrow_head.js"(te,Z){var v=xn(),w=io(),C=Bw(),P=In(),t=P.strScale,r=P.strRotate,a=P.strTranslate;Z.exports=function(i,s,o){var u=i.node(),d=C[o.arrowhead||0],h=C[o.startarrowhead||0],y=(o.arrowwidth||1)*(o.arrowsize||1),m=(o.arrowwidth||1)*(o.startarrowsize||1),E=s.indexOf("start")>=0,c=s.indexOf("end")>=0,_=d.backoff*y+o.standoff,T=h.backoff*m+o.startstandoff,M,k,b,A;if(u.nodeName==="line"){M={x:+i.attr("x1"),y:+i.attr("y1")},k={x:+i.attr("x2"),y:+i.attr("y2")};var g=M.x-k.x,f=M.y-k.y;if(b=Math.atan2(f,g),A=b+Math.PI,_&&T&&_+T>Math.sqrt(g*g+f*f)){J();return}if(_){if(_*_>g*g+f*f){J();return}var p=_*Math.cos(b),x=_*Math.sin(b);k.x+=p,k.y+=x,i.attr({x2:k.x,y2:k.y})}if(T){if(T*T>g*g+f*f){J();return}var N=T*Math.cos(b),D=T*Math.sin(b);M.x-=N,M.y-=D,i.attr({x1:M.x,y1:M.y})}}else if(u.nodeName==="path"){var B=u.getTotalLength(),U="";if(B<_+T){J();return}var V=u.getPointAtLength(0),q=u.getPointAtLength(.1);b=Math.atan2(V.y-q.y,V.x-q.x),M=u.getPointAtLength(Math.min(T,B)),U="0px,"+T+"px,";var z=u.getPointAtLength(B),H=u.getPointAtLength(B-.1);A=Math.atan2(z.y-H.y,z.x-H.x),k=u.getPointAtLength(Math.max(0,B-_));var G=U?T+_:_;U+=B-G+"px,"+B+"px",i.style("stroke-dasharray",U)}function J(){i.style("stroke-dasharray","0px,100px")}function le(ye,de,me,W){ye.path&&(ye.noRotate&&(me=0),v.select(u.parentNode).append("path").attr({class:i.attr("class"),d:ye.path,transform:a(de.x,de.y)+r(me*180/Math.PI)+t(W)}).style({fill:w.rgb(o.arrowcolor),"stroke-width":0}))}E&&le(h,M,b,m),c&&le(d,k,A,y)}}}),q0=Ne({"src/components/annotations/draw.js"(te,Z){var v=xn(),w=Xo(),C=uf(),P=In(),t=P.strTranslate,r=Os(),a=io(),l=zs(),i=nh(),s=uc(),o=km(),u=Bv(),d=Tu().arrayEditor,h=X1();Z.exports={draw:y,drawOne:m,drawRaw:c};function y(_){var T=_._fullLayout;T._infolayer.selectAll(".annotation").remove();for(var M=0;M<T.annotations.length;M++)T.annotations[M].visible&&m(_,M);return C.previousPromises(_)}function m(_,T){var M=_._fullLayout,k=M.annotations[T]||{},b=r.getFromId(_,k.xref),A=r.getFromId(_,k.yref);b&&b.setScale(),A&&A.setScale(),c(_,k,T,!1,b,A)}function E(_,T,M,k,b){var A=b[M],g=b[M+"ref"],f=M.indexOf("y")!==-1,p=r.getRefType(g)==="domain",x=f?k.h:k.w;return _?p?A+(f?-T:T)/_._length:_.p2r(_.r2p(A)+T):A+(f?-T:T)/x}function c(_,T,M,k,b,A){var g=_._fullLayout,f=_._fullLayout._size,p=_._context.edits,x,N;k?(x="annotation-"+k,N=k+".annotations"):(x="annotation",N="annotations");var D=d(_.layout,N,T),B=D.modifyBase,U=D.modifyItem,V=D.getUpdateObj;g._infolayer.selectAll("."+x+'[data-index="'+M+'"]').remove();var q="clip"+g._uid+"_ann"+M;if(!T._input||T.visible===!1){v.selectAll("#"+q).remove();return}var z={x:{},y:{}},H=+T.textangle||0,G=g._infolayer.append("g").classed(x,!0).attr("data-index",String(M)).style("opacity",T.opacity),J=G.append("g").classed("annotation-text-g",!0),le=p[T.showarrow?"annotationTail":"annotationPosition"],ye=T.captureevents||p.annotationText||le;function de(ze){var Ge={index:M,annotation:T._input,fullAnnotation:T,event:ze};return k&&(Ge.subplotId=k),Ge}var me=J.append("g").style("pointer-events",ye?"all":null).call(o,"pointer").on("click",function(){_._dragging=!1,_.emit("plotly_clickannotation",de(v.event))});T.hovertext&&me.on("mouseover",function(){var ze=T.hoverlabel,Ge=ze.font,Ve=this.getBoundingClientRect(),rt=_.getBoundingClientRect();i.loneHover({x0:Ve.left-rt.left,x1:Ve.right-rt.left,y:(Ve.top+Ve.bottom)/2-rt.top,text:T.hovertext,color:ze.bgcolor,borderColor:ze.bordercolor,fontFamily:Ge.family,fontSize:Ge.size,fontColor:Ge.color,fontWeight:Ge.weight,fontStyle:Ge.style,fontVariant:Ge.variant,fontShadow:Ge.fontShadow,fontLineposition:Ge.fontLineposition,fontTextcase:Ge.fontTextcase},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:_})}).on("mouseout",function(){i.loneUnhover(g._hoverlayer.node())});var W=T.borderwidth,ie=T.borderpad,se=W+ie,ee=me.append("rect").attr("class","bg").style("stroke-width",W+"px").call(a.stroke,T.bordercolor).call(a.fill,T.bgcolor),pe=T.width||T.height,oe=g._topclips.selectAll("#"+q).data(pe?[0]:[]);oe.enter().append("clipPath").classed("annclip",!0).attr("id",q).append("rect"),oe.exit().remove();var Y=T.font,ce=g._meta?P.templateString(T.text,g._meta):T.text,ue=me.append("text").classed("annotation-text",!0).text(ce);function _e(ze){return ze.call(l.font,Y).attr({"text-anchor":{left:"start",right:"end"}[T.align]||"middle"}),s.convertToTspans(ze,_,Le),ze}function Le(){var ze=ue.selectAll("a");if(ze.size()===1&&ze.text()===ue.text()){var Ge=me.insert("a",":first-child").attr({"xlink:xlink:href":ze.attr("xlink:href"),"xlink:xlink:show":ze.attr("xlink:show")}).style({cursor:"pointer"});Ge.node().appendChild(ee.node())}var Ve=me.select(".annotation-text-math-group"),rt=!Ve.empty(),pt=l.bBox((rt?Ve:ue).node()),gt=pt.width,ht=pt.height,lt=T.width||gt,Fe=T.height||ht,Pe=Math.round(lt+2*se),be=Math.round(Fe+2*se);function Ye(ba,ea){return ea==="auto"&&(ba<1/3?ea="left":ba>2/3?ea="right":ea="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ea]}for(var mt=!1,bt=["x","y"],ft=0;ft<bt.length;ft++){var Wt=bt[ft],Zt=T[Wt+"ref"]||Wt,cr=T["a"+Wt+"ref"],pr={x:b,y:A}[Wt],Br=(H+(Wt==="x"?0:-90))*Math.PI/180,Fr=Pe*Math.cos(Br),cn=be*Math.sin(Br),Nr=Math.abs(Fr)+Math.abs(cn),Jr=T[Wt+"anchor"],Dt=T[Wt+"shift"]*(Wt==="x"?1:-1),$e=z[Wt],ot,De,Ee,Ae,Ie,tt=r.getRefType(Zt);if(pr&&tt!=="domain"){var st=pr.r2fraction(T[Wt]);(st<0||st>1)&&(cr===Zt?(st=pr.r2fraction(T["a"+Wt]),(st<0||st>1)&&(mt=!0)):mt=!0),ot=pr._offset+pr.r2p(T[Wt]),Ae=.5}else{var Ft=tt==="domain";Wt==="x"?(Ee=T[Wt],ot=Ft?pr._offset+pr._length*Ee:ot=f.l+f.w*Ee):(Ee=1-T[Wt],ot=Ft?pr._offset+pr._length*Ee:ot=f.t+f.h*Ee),Ae=T.showarrow?.5:Ee}if(T.showarrow){$e.head=ot;var Nt=T["a"+Wt];if(Ie=Fr*Ye(.5,T.xanchor)-cn*Ye(.5,T.yanchor),cr===Zt){var Xt=r.getRefType(cr);Xt==="domain"?(Wt==="y"&&(Nt=1-Nt),$e.tail=pr._offset+pr._length*Nt):Xt==="paper"?Wt==="y"?(Nt=1-Nt,$e.tail=f.t+f.h*Nt):$e.tail=f.l+f.w*Nt:$e.tail=pr._offset+pr.r2p(Nt),De=Ie}else $e.tail=ot+Nt,De=Ie+Nt;$e.text=$e.tail+Ie;var lr=g[Wt==="x"?"width":"height"];if(Zt==="paper"&&($e.head=P.constrain($e.head,1,lr-1)),cr==="pixel"){var Rr=-Math.max($e.tail-3,$e.text),Mr=Math.min($e.tail+3,$e.text)-lr;Rr>0?($e.tail+=Rr,$e.text+=Rr):Mr>0&&($e.tail-=Mr,$e.text-=Mr)}$e.tail+=Dt,$e.head+=Dt}else Ie=Nr*Ye(Ae,Jr),De=Ie,$e.text=ot+Ie;$e.text+=Dt,Ie+=Dt,De+=Dt,T["_"+Wt+"padplus"]=Nr/2+De,T["_"+Wt+"padminus"]=Nr/2-De,T["_"+Wt+"size"]=Nr,T["_"+Wt+"shift"]=Ie}if(mt){me.remove();return}var Sr=0,Kr=0;if(T.align!=="left"&&(Sr=(lt-gt)*(T.align==="center"?.5:1)),T.valign!=="top"&&(Kr=(Fe-ht)*(T.valign==="middle"?.5:1)),rt)Ve.select("svg").attr({x:se+Sr-1,y:se+Kr}).call(l.setClipUrl,pe?q:null,_);else{var qn=se+Kr-pt.top,ha=se+Sr-pt.left;ue.call(s.positionText,ha,qn).call(l.setClipUrl,pe?q:null,_)}oe.select("rect").call(l.setRect,se,se,lt,Fe),ee.call(l.setRect,W/2,W/2,Pe-W,be-W),me.call(l.setTranslate,Math.round(z.x.text-Pe/2),Math.round(z.y.text-be/2)),J.attr({transform:"rotate("+H+","+z.x.text+","+z.y.text+")"});var ia=function(ba,ea){G.selectAll(".annotation-arrow-g").remove();var Za=z.x.head,ui=z.y.head,_r=z.x.tail+ba,Qt=z.y.tail+ea,yr=z.x.text+ba,br=z.y.text+ea,nn=P.rotationXYMatrix(H,yr,br),wn=P.apply2DTransform(nn),Ln=P.apply2DTransform2(nn),Fn=+ee.attr("width"),va=+ee.attr("height"),Da=yr-.5*Fn,Pa=Da+Fn,Fa=br-.5*va,$a=Fa+va,oa=[[Da,Fa,Da,$a],[Da,$a,Pa,$a],[Pa,$a,Pa,Fa],[Pa,Fa,Da,Fa]].map(Ln);if(!oa.reduce(function(Rt,xr){return Rt^!!P.segmentsIntersect(Za,ui,Za+1e6,ui+1e6,xr[0],xr[1],xr[2],xr[3])},!1)){oa.forEach(function(Rt){var xr=P.segmentsIntersect(_r,Qt,Za,ui,Rt[0],Rt[1],Rt[2],Rt[3]);xr&&(_r=xr.x,Qt=xr.y)});var zi=T.arrowwidth,Gi=T.arrowcolor,qt=T.arrowside,Ct=G.append("g").style({opacity:a.opacity(Gi)}).classed("annotation-arrow-g",!0),Ur=Ct.append("path").attr("d","M"+_r+","+Qt+"L"+Za+","+ui).style("stroke-width",zi+"px").call(a.stroke,a.rgb(Gi));if(h(Ur,qt,T),p.annotationPosition&&Ur.node().parentNode&&!k){var Qr=Za,tn=ui;if(T.standoff){var Xr=Math.sqrt(Math.pow(Za-_r,2)+Math.pow(ui-Qt,2));Qr+=T.standoff*(_r-Za)/Xr,tn+=T.standoff*(Qt-ui)/Xr}var en=Ct.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(_r-Qr)+","+(Qt-tn),transform:t(Qr,tn)}).style("stroke-width",zi+6+"px").call(a.stroke,"rgba(0,0,0,0)").call(a.fill,"rgba(0,0,0,0)"),Tn,hn;u.init({element:en.node(),gd:_,prepFn:function(){var Rt=l.getTranslate(me);Tn=Rt.x,hn=Rt.y,b&&b.autorange&&B(b._name+".autorange",!0),A&&A.autorange&&B(A._name+".autorange",!0)},moveFn:function(Rt,xr){var Wr=wn(Tn,hn),An=Wr[0]+Rt,Xn=Wr[1]+xr;me.call(l.setTranslate,An,Xn),U("x",E(b,Rt,"x",f,T)),U("y",E(A,xr,"y",f,T)),T.axref===T.xref&&U("ax",E(b,Rt,"ax",f,T)),T.ayref===T.yref&&U("ay",E(A,xr,"ay",f,T)),Ct.attr("transform",t(Rt,xr)),J.attr({transform:"rotate("+H+","+An+","+Xn+")"})},doneFn:function(){w.call("_guiRelayout",_,V());var Rt=document.querySelector(".js-notes-box-panel");Rt&&Rt.redraw(Rt.selectedObj)}})}}};if(T.showarrow&&ia(0,0),le){var xa;u.init({element:me.node(),gd:_,prepFn:function(){xa=J.attr("transform")},moveFn:function(ba,ea){var Za="pointer";if(T.showarrow)T.axref===T.xref?U("ax",E(b,ba,"ax",f,T)):U("ax",T.ax+ba),T.ayref===T.yref?U("ay",E(A,ea,"ay",f.w,T)):U("ay",T.ay+ea),ia(ba,ea);else{if(k)return;var ui,_r;if(b)ui=E(b,ba,"x",f,T);else{var Qt=T._xsize/f.w,yr=T.x+(T._xshift-T.xshift)/f.w-Qt/2;ui=u.align(yr+ba/f.w,Qt,0,1,T.xanchor)}if(A)_r=E(A,ea,"y",f,T);else{var br=T._ysize/f.h,nn=T.y-(T._yshift+T.yshift)/f.h-br/2;_r=u.align(nn-ea/f.h,br,0,1,T.yanchor)}U("x",ui),U("y",_r),(!b||!A)&&(Za=u.getCursor(b?.5:ui,A?.5:_r,T.xanchor,T.yanchor))}J.attr({transform:t(ba,ea)+xa}),o(me,Za)},clickFn:function(ba,ea){T.captureevents&&_.emit("plotly_clickannotation",de(ea))},doneFn:function(){o(me),w.call("_guiRelayout",_,V());var ba=document.querySelector(".js-notes-box-panel");ba&&ba.redraw(ba.selectedObj)}})}}p.annotationText?ue.call(s.makeEditable,{delegate:me,gd:_}).call(_e).on("edit",function(ze){T.text=ze,this.call(_e),U("text",ze),b&&b.autorange&&B(b._name+".autorange",!0),A&&A.autorange&&B(A._name+".autorange",!0),w.call("_guiRelayout",_,V())}):ue.call(_e)}}}),_A=Ne({"src/components/annotations/click.js"(te,Z){var v=In(),w=Xo(),C=Tu().arrayEditor;Z.exports={hasClickToShow:P,onClick:t};function P(l,i){var s=r(l,i);return s.on.length>0||s.explicitOff.length>0}function t(l,i){var s=r(l,i),o=s.on,u=s.off.concat(s.explicitOff),d={},h=l._fullLayout.annotations,y,m;if(o.length||u.length){for(y=0;y<o.length;y++)m=C(l.layout,"annotations",h[o[y]]),m.modifyItem("visible",!0),v.extendFlat(d,m.getUpdateObj());for(y=0;y<u.length;y++)m=C(l.layout,"annotations",h[u[y]]),m.modifyItem("visible",!1),v.extendFlat(d,m.getUpdateObj());return w.call("update",l,{},d)}}function r(l,i){var s=l._fullLayout.annotations,o=[],u=[],d=[],h=(i||[]).length,y,m,E,c,_,T,M,k;for(y=0;y<s.length;y++)if(E=s[y],c=E.clicktoshow,c){for(m=0;m<h;m++)if(_=i[m],T=_.xaxis,M=_.yaxis,T._id===E.xref&&M._id===E.yref&&T.d2r(_.x)===a(E._xclick,T)&&M.d2r(_.y)===a(E._yclick,M)){E.visible?c==="onout"?k=u:k=d:k=o,k.push(y);break}m===h&&E.visible&&c==="onout"&&u.push(y)}return{on:o,off:u,explicitOff:d}}function a(l,i){return i.type==="log"?i.l2r(l):i.d2r(l)}}}),W1=Ne({"src/components/annotations/common_defaults.js"(te,Z){var v=In(),w=io();Z.exports=function(P,t,r,a){a("opacity");var l=a("bgcolor"),i=a("bordercolor"),s=w.opacity(i);a("borderpad");var o=a("borderwidth"),u=a("showarrow");a("text",u?" ":r._dfltTitle.annotation),a("textangle"),v.coerceFont(a,"font",r.font),a("width"),a("align");var d=a("height");if(d&&a("valign"),u){var h=a("arrowside"),y,m;h.indexOf("end")!==-1&&(y=a("arrowhead"),m=a("arrowsize")),h.indexOf("start")!==-1&&(a("startarrowhead",y),a("startarrowsize",m)),a("arrowcolor",s?t.bordercolor:w.defaultLine),a("arrowwidth",(s&&o||1)*2),a("standoff"),a("startstandoff")}var E=a("hovertext"),c=r.hoverlabel||{};if(E){var _=a("hoverlabel.bgcolor",c.bgcolor||(w.opacity(l)?w.rgb(l):w.defaultLine)),T=a("hoverlabel.bordercolor",c.bordercolor||w.contrast(_)),M=v.extendFlat({},c.font);M.color||(M.color=T),v.coerceFont(a,"hoverlabel.font",M)}a("captureevents",!!E)}}}),xA=Ne({"src/components/annotations/defaults.js"(te,Z){var v=In(),w=Os(),C=zd(),P=W1(),t=Ey();Z.exports=function(l,i){C(l,i,{name:"annotations",handleItemDefaults:r})};function r(a,l,i){function s(f,p){return v.coerce(a,l,t,f,p)}var o=s("visible"),u=s("clicktoshow");if(o||u){P(a,l,i,s);for(var d=l.showarrow,h=["x","y"],y=[-10,-30],m={_fullLayout:i},E=0;E<2;E++){var c=h[E],_=w.coerceRef(a,l,m,c,"","paper");if(_!=="paper"){var T=w.getFromId(m,_);T._annIndices.push(l._index)}if(w.coercePosition(l,m,s,_,c,.5),d){var M="a"+c,k=w.coerceRef(a,l,m,M,"pixel",["pixel","paper"]);k!=="pixel"&&k!==_&&(k=l[M]="pixel");var b=k==="pixel"?y[E]:.4;w.coercePosition(l,m,s,k,M,b)}s(c+"anchor"),s(c+"shift")}if(v.noneOrAll(a,l,["x","y"]),d&&v.noneOrAll(a,l,["ax","ay"]),u){var A=s("xclick"),g=s("yclick");l._xclick=A===void 0?l.x:w.cleanPosition(A,m,l.xref),l._yclick=g===void 0?l.y:w.cleanPosition(g,m,l.yref)}}}}}),Lg=Ne({"src/components/annotations/calc_autorange.js"(te,Z){var v=In(),w=Os(),C=q0().draw;Z.exports=function(a){var l=a._fullLayout,i=v.filterVisible(l.annotations);if(i.length&&a._fullData.length)return v.syncOrAsync([C,P],a)};function P(r){var a=r._fullLayout;v.filterVisible(a.annotations).forEach(function(l){var i=w.getFromId(r,l.xref),s=w.getFromId(r,l.yref),o=w.getRefType(l.xref),u=w.getRefType(l.yref);l._extremes={},o==="range"&&t(l,i),u==="range"&&t(l,s)})}function t(r,a){var l=a._id,i=l.charAt(0),s=r[i],o=r["a"+i],u=r[i+"ref"],d=r["a"+i+"ref"],h=r["_"+i+"padplus"],y=r["_"+i+"padminus"],m={x:1,y:-1}[i]*r[i+"shift"],E=3*r.arrowsize*r.arrowwidth||0,c=E+m,_=E-m,T=3*r.startarrowsize*r.arrowwidth||0,M=T+m,k=T-m,b;if(d===u){var A=w.findExtremes(a,[a.r2c(s)],{ppadplus:c,ppadminus:_}),g=w.findExtremes(a,[a.r2c(o)],{ppadplus:Math.max(h,M),ppadminus:Math.max(y,k)});b={min:[A.min[0],g.min[0]],max:[A.max[0],g.max[0]]}}else M=o?M+o:M,k=o?k-o:k,b=w.findExtremes(a,[a.r2c(s)],{ppadplus:Math.max(h,c,M),ppadminus:Math.max(y,_,k)});r._extremes[l]=b}}}),V0=Ne({"src/components/annotations/convert_coords.js"(te,Z){var v=la(),w=_a();Z.exports=function(P,t,r,a){t=t||{};var l=r==="log"&&t.type==="linear",i=r==="linear"&&t.type==="log";if(!(l||i))return;var s=P._fullLayout.annotations,o=t._id.charAt(0),u,d;function h(m){var E=u[m],c=null;l?c=w(E,t.range):c=Math.pow(10,E),v(c)||(c=null),a(d+m,c)}for(var y=0;y<s.length;y++)u=s[y],d="annotations["+y+"].",u[o+"ref"]===t._id&&h(o),u["a"+o+"ref"]===t._id&&h("a"+o)}}}),ky=Ne({"src/components/annotations/index.js"(te,Z){var v=q0(),w=_A();Z.exports={moduleType:"component",name:"annotations",layoutAttributes:Ey(),supplyLayoutDefaults:xA(),includeBasePlot:Cx()("annotations"),calcAutorange:Lg(),draw:v.draw,drawOne:v.drawOne,drawRaw:v.drawRaw,hasClickToShow:w.hasClickToShow,onClick:w.onClick,convertCoords:V0()}}}),zm=Ne({"src/components/annotations3d/attributes.js"(te,Z){var v=Ey(),w=Kc().overrideAll,C=Tu().templatedArray;Z.exports=w(C("annotation",{visible:v.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:v.xanchor,xshift:v.xshift,yanchor:v.yanchor,yshift:v.yshift,text:v.text,textangle:v.textangle,font:v.font,width:v.width,height:v.height,opacity:v.opacity,align:v.align,valign:v.valign,bgcolor:v.bgcolor,bordercolor:v.bordercolor,borderpad:v.borderpad,borderwidth:v.borderwidth,showarrow:v.showarrow,arrowcolor:v.arrowcolor,arrowhead:v.arrowhead,startarrowhead:v.startarrowhead,arrowside:v.arrowside,arrowsize:v.arrowsize,startarrowsize:v.startarrowsize,arrowwidth:v.arrowwidth,standoff:v.standoff,startstandoff:v.startstandoff,hovertext:v.hovertext,hoverlabel:v.hoverlabel,captureevents:v.captureevents}),"calc","from-root")}}),bA=Ne({"src/components/annotations3d/defaults.js"(te,Z){var v=In(),w=Os(),C=zd(),P=W1(),t=zm();Z.exports=function(l,i,s){C(l,i,{name:"annotations",handleItemDefaults:r,fullLayout:s.fullLayout})};function r(a,l,i,s){function o(h,y){return v.coerce(a,l,t,h,y)}function u(h){var y=h+"axis",m={_fullLayout:{}};return m._fullLayout[y]=i[y],w.coercePosition(l,m,o,h,h,.5)}var d=o("visible");d&&(P(a,l,s.fullLayout,o),u("x"),u("y"),u("z"),v.noneOrAll(a,l,["x","y","z"]),l.xref="x",l.yref="y",l.zref="z",o("xanchor"),o("yanchor"),o("xshift"),o("yshift"),l.showarrow&&(l.axref="pixel",l.ayref="pixel",o("ax",-10),o("ay",-30),v.noneOrAll(a,l,["ax","ay"])))}}}),wA=Ne({"src/components/annotations3d/convert.js"(te,Z){var v=In(),w=Os();Z.exports=function(t){for(var r=t.fullSceneLayout,a=r.annotations,l=0;l<a.length;l++)C(a[l],t);t.fullLayout._infolayer.selectAll(".annotation-"+t.id).remove()};function C(P,t){var r=t.fullSceneLayout,a=r.domain,l=t.fullLayout._size,i={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};P._xa={},v.extendFlat(P._xa,i),w.setConvert(P._xa),P._xa._offset=l.l+a.x[0]*l.w,P._xa.l2p=function(){return .5*(1+P._pdata[0]/P._pdata[3])*l.w*(a.x[1]-a.x[0])},P._ya={},v.extendFlat(P._ya,i),w.setConvert(P._ya),P._ya._offset=l.t+(1-a.y[1])*l.h,P._ya.l2p=function(){return .5*(1-P._pdata[1]/P._pdata[3])*l.h*(a.y[1]-a.y[0])}}}}),Rg=Ne({"src/plots/gl3d/project.js"(te,Z){function v(C,P){var t=[0,0,0,0],r,a;for(r=0;r<4;++r)for(a=0;a<4;++a)t[a]+=C[4*r+a]*P[r];return t}function w(C,P){var t=v(C.projection,v(C.view,v(C.model,[P[0],P[1],P[2],1])));return t}Z.exports=w}}),Hw=Ne({"src/components/annotations3d/draw.js"(te,Z){var v=q0().drawRaw,w=Rg(),C=["x","y","z"];Z.exports=function(t){for(var r=t.fullSceneLayout,a=t.dataScale,l=r.annotations,i=0;i<l.length;i++){for(var s=l[i],o=!1,u=0;u<3;u++){var d=C[u],h=s[d],y=r[d+"axis"],m=y.r2fraction(h);if(m<0||m>1){o=!0;break}}o?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(s._pdata=w(t.glplot.cameraParams,[r.xaxis.r2l(s.x)*a[0],r.yaxis.r2l(s.y)*a[1],r.zaxis.r2l(s.z)*a[2]]),v(t.graphDiv,s,i,t.id,s._xa,s._ya))}}}}),Ig=Ne({"src/components/annotations3d/index.js"(te,Z){var v=Xo(),w=In();Z.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:zm()}}},layoutAttributes:zm(),handleDefaults:bA(),includeBasePlot:C,convert:wA(),draw:Hw()};function C(P,t){var r=v.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,l=Object.keys(P),i=0;i<l.length;i++){var s=l[i];a.test(s)&&(P[s].annotations||[]).length&&(w.pushUnique(t._basePlotModules,r),w.pushUnique(t._subplots.gl3d,s))}}}}),lv=Ne({"src/components/shapes/attributes.js"(te,Z){var v=Ey(),w=$o(),C=Jc().line,P=Dd().dash,t=co().extendFlat,r=Tu().templatedArray;Sy();var a=ns(),{shapeTexttemplateAttrs:l,templatefallbackAttrs:i}=Il(),s=Fv();Z.exports=r("shape",{visible:t({},a.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:t({},a.legend,{editType:"calc+arraydraw"}),legendgroup:t({},a.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:t({},a.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:w({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:t({},a.legendrank,{editType:"calc+arraydraw"}),legendwidth:t({},a.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:t({},v.xref,{}),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:t({},v.yref,{}),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:t({},C.color,{editType:"arraydraw"}),width:t({},C.width,{editType:"calc+arraydraw"}),dash:t({},P,{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:l({},{keys:Object.keys(s)}),texttemplatefallback:i({editType:"arraydraw"}),font:w({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"})}}),Gw=Ne({"src/components/shapes/defaults.js"(te,Z){var v=In(),w=Os(),C=zd(),P=lv(),t=Ay();Z.exports=function(i,s){C(i,s,{name:"shapes",handleItemDefaults:a})};function r(l,i){return l?"bottom":i.indexOf("top")!==-1?"top":i.indexOf("bottom")!==-1?"bottom":"middle"}function a(l,i,s){function o(W,ie){return v.coerce(l,i,P,W,ie)}i._isShape=!0;var u=o("visible");if(u){var d=o("showlegend");d&&(o("legend"),o("legendwidth"),o("legendgroup"),o("legendgrouptitle.text"),v.coerceFont(o,"legendgrouptitle.font"),o("legendrank"));var h=o("path"),y=h?"path":"rect",m=o("type",y),E=m!=="path";E&&delete i.path,o("editable"),o("layer"),o("opacity"),o("fillcolor"),o("fillrule");var c=o("line.width");c&&(o("line.color"),o("line.dash"));for(var _=o("xsizemode"),T=o("ysizemode"),M=["x","y"],k=0;k<2;k++){var b=M[k],A=b+"anchor",g=b==="x"?_:T,f={_fullLayout:s},p,x,N,D=w.coerceRef(l,i,f,b,void 0,"paper"),B=w.getRefType(D);if(B==="range"?(p=w.getFromId(f,D),p._shapeIndices.push(i._index),N=t.rangeToShapePosition(p),x=t.shapePositionToRange(p),(p.type==="category"||p.type==="multicategory")&&(o(b+"0shift"),o(b+"1shift"))):x=N=v.identity,E){var U=.25,V=.75,q=b+"0",z=b+"1",H=l[q],G=l[z];l[q]=x(l[q],!0),l[z]=x(l[z],!0),g==="pixel"?(o(q,0),o(z,10)):(w.coercePosition(i,f,o,D,q,U),w.coercePosition(i,f,o,D,z,V)),i[q]=N(i[q]),i[z]=N(i[z]),l[q]=H,l[z]=G}if(g==="pixel"){var J=l[A];l[A]=x(l[A],!0),w.coercePosition(i,f,o,D,A,.25),i[A]=N(i[A]),l[A]=J}}E&&v.noneOrAll(l,i,["x0","x1","y0","y1"]);var le=m==="line",ye,de;if(E&&(ye=o("label.texttemplate"),o("label.texttemplatefallback")),ye||(de=o("label.text")),de||ye){o("label.textangle");var me=o("label.textposition",le?"middle":"middle center");o("label.xanchor"),o("label.yanchor",r(le,me)),o("label.padding"),v.coerceFont(o,"label.font",s.font)}}}}}),SM=Ne({"src/components/shapes/draw_newshape/defaults.js"(te,Z){var v=io(),w=In();function C(P,t){return P?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Z.exports=function(t,r,a){a("newshape.visible"),a("newshape.name"),a("newshape.showlegend"),a("newshape.legend"),a("newshape.legendwidth"),a("newshape.legendgroup"),a("newshape.legendgrouptitle.text"),w.coerceFont(a,"newshape.legendgrouptitle.font"),a("newshape.legendrank"),a("newshape.drawdirection"),a("newshape.layer"),a("newshape.fillcolor"),a("newshape.fillrule"),a("newshape.opacity");var l=a("newshape.line.width");if(l){var i=(t||{}).plot_bgcolor||"#FFF";a("newshape.line.color",v.contrast(i)),a("newshape.line.dash")}var s=t.dragmode==="drawline",o=a("newshape.label.text"),u=a("newshape.label.texttemplate");if(a("newshape.label.texttemplatefallback"),o||u){a("newshape.label.textangle");var d=a("newshape.label.textposition",s?"middle":"middle center");a("newshape.label.xanchor"),a("newshape.label.yanchor",C(s,d)),a("newshape.label.padding"),w.coerceFont(a,"newshape.label.font",r.font)}a("activeshape.fillcolor"),a("activeshape.opacity")}}}),OL=Ne({"src/components/shapes/calc_autorange.js"(te,Z){var v=In(),w=Os(),C=Nw(),P=Ay();Z.exports=function(s){var o=s._fullLayout,u=v.filterVisible(o.shapes);if(!(!u.length||!s._fullData.length))for(var d=0;d<u.length;d++){var h=u[d];h._extremes={};var y,m,E=w.getRefType(h.xref),c=w.getRefType(h.yref);h.xref!=="paper"&&E!=="domain"&&(y=w.getFromId(s,h.xref),m=l(y,h,C.paramIsX),m&&(h._extremes[y._id]=w.findExtremes(y,m,t(h)))),h.yref!=="paper"&&c!=="domain"&&(y=w.getFromId(s,h.yref),m=l(y,h,C.paramIsY),m&&(h._extremes[y._id]=w.findExtremes(y,m,r(h))))}};function t(i){return a(i.line.width,i.xsizemode,i.x0,i.x1,i.path,!1)}function r(i){return a(i.line.width,i.ysizemode,i.y0,i.y1,i.path,!0)}function a(i,s,o,u,d,h){var y=i/2,m=h;if(s==="pixel"){var E=d?P.extractPathCoords(d,h?C.paramIsY:C.paramIsX):[o,u],c=v.aggNums(Math.max,null,E),_=v.aggNums(Math.min,null,E),T=_<0?Math.abs(_)+y:y,M=c>0?c+y:y;return{ppad:y,ppadplus:m?T:M,ppadminus:m?M:T}}else return{ppad:y}}function l(i,s,o){var u=i._id.charAt(0)==="x"?"x":"y",d=i.type==="category"||i.type==="multicategory",h,y,m=0,E=0,c=d?i.r2c:i.d2c,_=s[u+"sizemode"]==="scaled";if(_?(h=s[u+"0"],y=s[u+"1"],d&&(m=s[u+"0shift"],E=s[u+"1shift"])):(h=s[u+"anchor"],y=s[u+"anchor"]),h!==void 0)return[c(h)+m,c(y)+E];if(s.path){var T=1/0,M=-1/0,k=s.path.match(C.segmentRE),b,A,g,f,p;for(i.type==="date"&&(c=P.decodeDate(c)),b=0;b<k.length;b++)A=k[b],g=o[A.charAt(0)].drawn,g!==void 0&&(f=k[b].substr(1).match(C.paramRE),!(!f||f.length<g)&&(p=c(f[g]),p<T&&(T=p),p>M&&(M=p)));if(M>=T)return[T,M]}}}}),zL=Ne({"src/components/shapes/index.js"(te,Z){var v=Eg();Z.exports={moduleType:"component",name:"shapes",layoutAttributes:lv(),supplyLayoutDefaults:Gw(),supplyDrawNewShapeDefaults:SM(),includeBasePlot:Cx()("shapes"),calcAutorange:OL(),draw:v.draw,drawOne:v.drawOne}}}),EM=Ne({"src/components/images/attributes.js"(te,Z){var v=xh(),w=Tu().templatedArray;Sy(),Z.exports=w("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),Td=Ne({"src/components/images/defaults.js"(te,Z){var v=In(),w=Os(),C=zd(),P=EM(),t="images";Z.exports=function(l,i){var s={name:t,handleItemDefaults:r};C(l,i,s)};function r(a,l,i){function s(_,T){return v.coerce(a,l,P,_,T)}var o=s("source"),u=s("visible",!!o);if(!u)return l;s("layer"),s("xanchor"),s("yanchor"),s("sizex"),s("sizey"),s("sizing"),s("opacity");for(var d={_fullLayout:i},h=["x","y"],y=0;y<2;y++){var m=h[y],E=w.coerceRef(a,l,d,m,"paper",void 0);if(E!=="paper"){var c=w.getFromId(d,E);c._imgIndices.push(l._index)}w.coercePosition(l,d,s,E,m,0)}return l}}}),TA=Ne({"src/components/images/draw.js"(te,Z){var v=xn(),w=zs(),C=Os(),P=Hf(),t=cp();Z.exports=function(a){var l=a._fullLayout,i=[],s={},o=[],u,d;for(d=0;d<l.images.length;d++){var h=l.images[d];if(h.visible)if(h.layer==="below"&&h.xref!=="paper"&&h.yref!=="paper"){u=P.ref2id(h.xref)+P.ref2id(h.yref);var y=l._plots[u];if(!y){o.push(h);continue}y.mainplot&&(u=y.mainplot.id),s[u]||(s[u]=[]),s[u].push(h)}else h.layer==="above"?i.push(h):o.push(h)}var m={x:{left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-1/2},right:{sizing:"xMax",offset:-1}},y:{top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-1/2},bottom:{sizing:"YMax",offset:-1}}};function E(f){var p=v.select(this);if(this._imgSrc!==f.source)if(p.attr("xmlns",t.svg),!a._context.staticPlot||f.source&&f.source.slice(0,5)==="data:")p.attr("xlink:href",f.source),this._imgSrc=f.source;else{var x=new Promise((function(N){var D=new Image;this.img=D,D.setAttribute("crossOrigin","anonymous"),D.onerror=B,D.onload=function(){var U=document.createElement("canvas");U.width=this.width,U.height=this.height;var V=U.getContext("2d",{willReadFrequently:!0});V.drawImage(this,0,0);var q=U.toDataURL("image/png");p.attr("xlink:href",q),N()},p.on("error",B),D.src=f.source,this._imgSrc=f.source;function B(){p.remove(),N()}}).bind(this));a._promises.push(x)}}function c(f){var p=v.select(this),x=C.getFromId(a,f.xref),N=C.getFromId(a,f.yref),D=C.getRefType(f.xref)==="domain",B=C.getRefType(f.yref)==="domain",U=l._size,V,q;x!==void 0?V=typeof f.xref=="string"&&D?x._length*f.sizex:Math.abs(x.l2p(f.sizex)-x.l2p(0)):V=f.sizex*U.w,N!==void 0?q=typeof f.yref=="string"&&B?N._length*f.sizey:Math.abs(N.l2p(f.sizey)-N.l2p(0)):q=f.sizey*U.h;var z=V*m.x[f.xanchor].offset,H=q*m.y[f.yanchor].offset,G=m.x[f.xanchor].sizing+m.y[f.yanchor].sizing,J,le;switch(x!==void 0?J=typeof f.xref=="string"&&D?x._length*f.x+x._offset:x.r2p(f.x)+x._offset:J=f.x*U.w+U.l,J+=z,N!==void 0?le=typeof f.yref=="string"&&B?N._length*(1-f.y)+N._offset:N.r2p(f.y)+N._offset:le=U.h-f.y*U.h+U.t,le+=H,f.sizing){case"fill":G+=" slice";break;case"stretch":G="none";break}p.attr({x:J,y:le,width:V,height:q,preserveAspectRatio:G,opacity:f.opacity});var ye=x&&C.getRefType(f.xref)!=="domain"?x._id:"",de=N&&C.getRefType(f.yref)!=="domain"?N._id:"",me=ye+de;w.setClipUrl(p,me?"clip"+l._uid+me:null,a)}function _(f){return[f.xref,f.x,f.sizex,f.yref,f.y,f.sizey].join("_")}function T(f,p){return f._index-p._index}var M=l._imageLowerLayer.selectAll("image").data(o,_),k=l._imageUpperLayer.selectAll("image").data(i,_);M.enter().append("image"),k.enter().append("image"),M.exit().remove(),k.exit().remove(),M.each(function(f){E.bind(this)(f),c.bind(this)(f)}),k.each(function(f){E.bind(this)(f),c.bind(this)(f)}),M.sort(T),k.sort(T);var b=Object.keys(l._plots);for(d=0;d<b.length;d++){u=b[d];var A=l._plots[u];if(A.imagelayer){var g=A.imagelayer.selectAll("image").data(s[u]||[],_);g.enter().append("image"),g.exit().remove(),g.each(function(f){E.bind(this)(f),c.bind(this)(f)}),g.sort(T)}}}}}),Lx=Ne({"src/components/images/convert_coords.js"(te,Z){var v=la(),w=_a();Z.exports=function(P,t,r,a){t=t||{};var l=r==="log"&&t.type==="linear",i=r==="linear"&&t.type==="log";if(l||i){for(var s=P._fullLayout.images,o=t._id.charAt(0),u,d,h=0;h<s.length;h++)if(u=s[h],d="images["+h+"].",u[o+"ref"]===t._id){var y=u[o],m=u["size"+o],E=null,c=null;if(l){E=w(y,t.range);var _=m/Math.pow(10,E)/2;c=2*Math.log(_+Math.sqrt(1+_*_))/Math.LN10}else E=Math.pow(10,y),c=E*(Math.pow(10,m/2)-Math.pow(10,-m/2));v(E)?v(c)||(c=null):(E=null,c=null),a(d+o,E),a(d+"size"+o,c)}}}}}),Rx=Ne({"src/components/images/index.js"(te,Z){Z.exports={moduleType:"component",name:"images",layoutAttributes:EM(),supplyLayoutDefaults:Td(),includeBasePlot:Cx()("images"),draw:TA(),convertCoords:Lx()}}}),Ix=Ne({"src/components/updatemenus/constants.js"(te,Z){Z.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:"◄",right:"►",up:"▲",down:"▼"}}}}),Dg=Ne({"src/components/updatemenus/attributes.js"(te,Z){var v=$o(),w=lu(),C=co().extendFlat,P=Kc().overrideAll,t=JT(),r=Tu().templatedArray,a=r("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}});Z.exports=P(r("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:a,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:C(t({editType:"arraydraw"}),{}),font:v({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:w.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")}}),Y1=Ne({"src/components/updatemenus/defaults.js"(te,Z){var v=In(),w=zd(),C=Dg(),P=Ix(),t=P.name,r=C.buttons;Z.exports=function(s,o){var u={name:t,handleItemDefaults:a};w(s,o,u)};function a(i,s,o){function u(y,m){return v.coerce(i,s,C,y,m)}var d=w(i,s,{name:"buttons",handleItemDefaults:l}),h=u("visible",d.length>0);h&&(u("active"),u("direction"),u("type"),u("showactive"),u("x"),u("y"),v.noneOrAll(i,s,["x","y"]),u("xanchor"),u("yanchor"),u("pad.t"),u("pad.r"),u("pad.b"),u("pad.l"),v.coerceFont(u,"font",o.font),u("bgcolor",o.paper_bgcolor),u("bordercolor"),u("borderwidth"))}function l(i,s){function o(d,h){return v.coerce(i,s,r,d,h)}var u=o("visible",i.method==="skip"||Array.isArray(i.args));u&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),NL=Ne({"src/components/updatemenus/scrollbox.js"(te,Z){Z.exports=t;var v=xn(),w=io(),C=zs(),P=In();function t(r,a,l){this.gd=r,this.container=a,this.id=l,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})}t.barWidth=2,t.barLength=20,t.barRadius=2,t.barPad=1,t.barColor="#808BA4",t.prototype.enable=function(a,l,i){var s=this.gd._fullLayout,o=s.width,u=s.height;this.position=a;var d=this.position.l,h=this.position.w,y=this.position.t,m=this.position.h,E=this.position.direction,c=E==="down",_=E==="left",T=E==="right",M=E==="up",k=h,b=m,A,g,f,p;!c&&!_&&!T&&!M&&(this.position.direction="down",c=!0);var x=c||M;x?(A=d,g=A+k,c?(f=y,p=Math.min(f+b,u),b=p-f):(p=y+b,f=Math.max(p-b,0),b=p-f)):(f=y,p=f+b,_?(g=d+k,A=Math.max(g-k,0),k=g-A):(A=d,g=Math.min(A+k,o),k=g-A)),this._box={l:A,t:f,w:k,h:b};var N=h>k,D=t.barLength+2*t.barPad,B=t.barWidth+2*t.barPad,U=d,V=y+m;V+B>u&&(V=u-B);var q=this.container.selectAll("rect.scrollbar-horizontal").data(N?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-horizontal",!0).call(w.fill,t.barColor),N?(this.hbar=q.attr({rx:t.barRadius,ry:t.barRadius,x:U,y:V,width:D,height:B}),this._hbarXMin=U+D/2,this._hbarTranslateMax=k-D):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var z=m>b,H=t.barWidth+2*t.barPad,G=t.barLength+2*t.barPad,J=d+h,le=y;J+H>o&&(J=o-H);var ye=this.container.selectAll("rect.scrollbar-vertical").data(z?[0]:[]);ye.exit().on(".drag",null).remove(),ye.enter().append("rect").classed("scrollbar-vertical",!0).call(w.fill,t.barColor),z?(this.vbar=ye.attr({rx:t.barRadius,ry:t.barRadius,x:J,y:le,width:H,height:G}),this._vbarYMin=le+G/2,this._vbarTranslateMax=b-G):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var de=this.id,me=A-.5,W=z?g+H+.5:g+.5,ie=f-.5,se=N?p+B+.5:p+.5,ee=s._topdefs.selectAll("#"+de).data(N||z?[0]:[]);if(ee.exit().remove(),ee.enter().append("clipPath").attr("id",de).append("rect"),N||z?(this._clipRect=ee.select("rect").attr({x:Math.floor(me),y:Math.floor(ie),width:Math.ceil(W)-Math.floor(me),height:Math.ceil(se)-Math.floor(ie)}),this.container.call(C.setClipUrl,de,this.gd),this.bg.attr({x:d,y,width:h,height:m})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(C.setClipUrl,null),delete this._clipRect),N||z){var pe=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(pe);var oe=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));N&&this.hbar.on(".drag",null).call(oe),z&&this.vbar.on(".drag",null).call(oe)}this.setTranslate(l,i)},t.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(C.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)},t.prototype._onBoxDrag=function(){var a=this.translateX,l=this.translateY;this.hbar&&(a-=v.event.dx),this.vbar&&(l-=v.event.dy),this.setTranslate(a,l)},t.prototype._onBoxWheel=function(){var a=this.translateX,l=this.translateY;this.hbar&&(a+=v.event.deltaY),this.vbar&&(l+=v.event.deltaY),this.setTranslate(a,l)},t.prototype._onBarDrag=function(){var a=this.translateX,l=this.translateY;if(this.hbar){var i=a+this._hbarXMin,s=i+this._hbarTranslateMax,o=P.constrain(v.event.x,i,s),u=(o-i)/(s-i),d=this.position.w-this._box.w;a=u*d}if(this.vbar){var h=l+this._vbarYMin,y=h+this._vbarTranslateMax,m=P.constrain(v.event.y,h,y),E=(m-h)/(y-h),c=this.position.h-this._box.h;l=E*c}this.setTranslate(a,l)},t.prototype.setTranslate=function(a,l){var i=this.position.w-this._box.w,s=this.position.h-this._box.h;if(a=P.constrain(a||0,0,i),l=P.constrain(l||0,0,s),this.translateX=a,this.translateY=l,this.container.call(C.setTranslate,this._box.l-this.position.l-a,this._box.t-this.position.t-l),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+a-.5),y:Math.floor(this.position.t+l-.5)}),this.hbar){var o=a/i;this.hbar.call(C.setTranslate,a+o*this._hbarTranslateMax,l)}if(this.vbar){var u=l/s;this.vbar.call(C.setTranslate,a,l+u*this._vbarTranslateMax)}}}}),MM=Ne({"src/components/updatemenus/draw.js"(te,Z){var v=xn(),w=uf(),C=io(),P=zs(),t=In(),r=uc(),a=Tu().arrayEditor,l=bd().LINE_SPACING,i=Ix(),s=NL();Z.exports=function(D){var B=D._fullLayout,U=t.filterVisible(B[i.name]);function V(de){w.autoMargin(D,f(de))}var q=B._menulayer.selectAll("g."+i.containerClassName).data(U.length>0?[0]:[]);if(q.enter().append("g").classed(i.containerClassName,!0).style("cursor","pointer"),q.exit().each(function(){v.select(this).selectAll("g."+i.headerGroupClassName).each(V)}).remove(),U.length!==0){var z=q.selectAll("g."+i.headerGroupClassName).data(U,o);z.enter().append("g").classed(i.headerGroupClassName,!0);for(var H=t.ensureSingle(q,"g",i.dropdownButtonGroupClassName,function(de){de.style("pointer-events","all")}),G=0;G<U.length;G++){var J=U[G];g(D,J)}var le="updatemenus"+B._uid,ye=new s(D,H,le);z.enter().size()&&(H.node().parentNode.appendChild(H.node()),H.call(x)),z.exit().each(function(de){H.call(x),V(de)}).remove(),z.each(function(de){var me=v.select(this),W=de.type==="dropdown"?H:null;w.manageCommandObserver(D,de,de.buttons,function(ie){h(D,de,de.buttons[ie.index],me,W,ye,ie.index,!0)}),de.type==="dropdown"?(y(D,me,H,ye,de),d(H,de)&&m(D,me,H,ye,de)):m(D,me,null,null,de)})}};function o(N){return N._index}function u(N){return+N.attr(i.menuIndexAttrName)==-1}function d(N,D){return+N.attr(i.menuIndexAttrName)===D._index}function h(N,D,B,U,V,q,z,H){D.active=z,a(N.layout,i.name,D).applyUpdate("active",z),D.type==="buttons"?m(N,U,null,null,D):D.type==="dropdown"&&(V.attr(i.menuIndexAttrName,"-1"),y(N,U,V,q,D),H||m(N,U,V,q,D))}function y(N,D,B,U,V){var q=t.ensureSingle(D,"g",i.headerClassName,function(de){de.style("pointer-events","all")}),z=V._dims,H=V.active,G=V.buttons[H]||i.blankHeaderOpts,J={y:V.pad.t,yPad:0,x:V.pad.l,xPad:0,index:0},le={width:z.headerWidth,height:z.headerHeight};q.call(_,V,G,N).call(p,V,J,le);var ye=t.ensureSingle(D,"text",i.headerArrowClassName,function(de){de.attr("text-anchor","end").call(P.font,V.font).text(i.arrowSymbol[V.direction])});ye.attr({x:z.headerWidth-i.arrowOffsetX+V.pad.l,y:z.headerHeight/2+i.textOffsetY+V.pad.t}),q.on("click",function(){B.call(x,String(d(B,V)?-1:V._index)),m(N,D,B,U,V)}),q.on("mouseover",function(){q.call(b)}),q.on("mouseout",function(){q.call(A,V)}),P.setTranslate(D,z.lx,z.ly)}function m(N,D,B,U,V){B||(B=D,B.attr("pointer-events","all"));var q=!u(B)||V.type==="buttons"?V.buttons:[],z=V.type==="dropdown"?i.dropdownButtonClassName:i.buttonClassName,H=B.selectAll("g."+z).data(t.filterVisible(q)),G=H.enter().append("g").classed(z,!0),J=H.exit();V.type==="dropdown"?(G.attr("opacity","0").transition().attr("opacity","1"),J.transition().attr("opacity","0").remove()):J.remove();var le=0,ye=0,de=V._dims,me=["up","down"].indexOf(V.direction)!==-1;V.type==="dropdown"&&(me?ye=de.headerHeight+i.gapButtonHeader:le=de.headerWidth+i.gapButtonHeader),V.type==="dropdown"&&V.direction==="up"&&(ye=-i.gapButtonHeader+i.gapButton-de.openHeight),V.type==="dropdown"&&V.direction==="left"&&(le=-i.gapButtonHeader+i.gapButton-de.openWidth);var W={x:de.lx+le+V.pad.l,y:de.ly+ye+V.pad.t,yPad:i.gapButton,xPad:i.gapButton,index:0},ie={l:W.x+V.borderwidth,t:W.y+V.borderwidth};H.each(function(se,ee){var pe=v.select(this);pe.call(_,V,se,N).call(p,V,W),pe.on("click",function(){v.event.defaultPrevented||(se.execute&&(se.args2&&V.active===ee?(h(N,V,se,D,B,U,-1),w.executeAPICommand(N,se.method,se.args2)):(h(N,V,se,D,B,U,ee),w.executeAPICommand(N,se.method,se.args))),N.emit("plotly_buttonclicked",{menu:V,button:se,active:V.active}))}),pe.on("mouseover",function(){pe.call(b)}),pe.on("mouseout",function(){pe.call(A,V),H.call(k,V)})}),H.call(k,V),me?(ie.w=Math.max(de.openWidth,de.headerWidth),ie.h=W.y-ie.t):(ie.w=W.x-ie.l,ie.h=Math.max(de.openHeight,de.headerHeight)),ie.direction=V.direction,U&&(H.size()?E(N,D,B,U,V,ie):c(U))}function E(N,D,B,U,V,q){var z=V.direction,H=z==="up"||z==="down",G=V._dims,J=V.active,le,ye,de;if(H)for(ye=0,de=0;de<J;de++)ye+=G.heights[de]+i.gapButton;else for(le=0,de=0;de<J;de++)le+=G.widths[de]+i.gapButton;U.enable(q,le,ye),U.hbar&&U.hbar.attr("opacity","0").transition().attr("opacity","1"),U.vbar&&U.vbar.attr("opacity","0").transition().attr("opacity","1")}function c(N){var D=!!N.hbar,B=!!N.vbar;D&&N.hbar.transition().attr("opacity","0").each("end",function(){D=!1,B||N.disable()}),B&&N.vbar.transition().attr("opacity","0").each("end",function(){B=!1,D||N.disable()})}function _(N,D,B,U){N.call(T,D).call(M,D,B,U)}function T(N,D){var B=t.ensureSingle(N,"rect",i.itemRectClassName,function(U){U.attr({rx:i.rx,ry:i.ry,"shape-rendering":"crispEdges"})});B.call(C.stroke,D.bordercolor).call(C.fill,D.bgcolor).style("stroke-width",D.borderwidth+"px")}function M(N,D,B,U){var V=t.ensureSingle(N,"text",i.itemTextClassName,function(H){H.attr({"text-anchor":"start","data-notex":1})}),q=B.label,z=U._fullLayout._meta;z&&(q=t.templateString(q,z)),V.call(P.font,D.font).text(q).call(r.convertToTspans,U)}function k(N,D){var B=D.active;N.each(function(U,V){var q=v.select(this);V===B&&D.showactive&&q.select("rect."+i.itemRectClassName).call(C.fill,i.activeColor)})}function b(N){N.select("rect."+i.itemRectClassName).call(C.fill,i.hoverColor)}function A(N,D){N.select("rect."+i.itemRectClassName).call(C.fill,D.bgcolor)}function g(N,D){var B=D._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},U=P.tester.selectAll("g."+i.dropdownButtonClassName).data(t.filterVisible(D.buttons));U.enter().append("g").classed(i.dropdownButtonClassName,!0);var V=["up","down"].indexOf(D.direction)!==-1;U.each(function(le,ye){var de=v.select(this);de.call(_,D,le,N);var me=de.select("."+i.itemTextClassName),W=me.node()&&P.bBox(me.node()).width,ie=Math.max(W+i.textPadX,i.minWidth),se=D.font.size*l,ee=r.lineCount(me),pe=Math.max(se*ee,i.minHeight)+i.textOffsetY;pe=Math.ceil(pe),ie=Math.ceil(ie),B.widths[ye]=ie,B.heights[ye]=pe,B.height1=Math.max(B.height1,pe),B.width1=Math.max(B.width1,ie),V?(B.totalWidth=Math.max(B.totalWidth,ie),B.openWidth=B.totalWidth,B.totalHeight+=pe+i.gapButton,B.openHeight+=pe+i.gapButton):(B.totalWidth+=ie+i.gapButton,B.openWidth+=ie+i.gapButton,B.totalHeight=Math.max(B.totalHeight,pe),B.openHeight=B.totalHeight)}),V?B.totalHeight-=i.gapButton:B.totalWidth-=i.gapButton,B.headerWidth=B.width1+i.arrowPadX,B.headerHeight=B.height1,D.type==="dropdown"&&(V?(B.width1+=i.arrowPadX,B.totalHeight=B.height1):B.totalWidth=B.width1,B.totalWidth+=i.arrowPadX),U.remove();var q=B.totalWidth+D.pad.l+D.pad.r,z=B.totalHeight+D.pad.t+D.pad.b,H=N._fullLayout._size;B.lx=H.l+H.w*D.x,B.ly=H.t+H.h*(1-D.y);var G="left";t.isRightAnchor(D)&&(B.lx-=q,G="right"),t.isCenterAnchor(D)&&(B.lx-=q/2,G="center");var J="top";t.isBottomAnchor(D)&&(B.ly-=z,J="bottom"),t.isMiddleAnchor(D)&&(B.ly-=z/2,J="middle"),B.totalWidth=Math.ceil(B.totalWidth),B.totalHeight=Math.ceil(B.totalHeight),B.lx=Math.round(B.lx),B.ly=Math.round(B.ly),w.autoMargin(N,f(D),{x:D.x,y:D.y,l:q*({right:1,center:.5}[G]||0),r:q*({left:1,center:.5}[G]||0),b:z*({top:1,middle:.5}[J]||0),t:z*({bottom:1,middle:.5}[J]||0)})}function f(N){return i.autoMarginIdRoot+N._index}function p(N,D,B,U){U=U||{};var V=N.select("."+i.itemRectClassName),q=N.select("."+i.itemTextClassName),z=D.borderwidth,H=B.index,G=D._dims;P.setTranslate(N,z+B.x,z+B.y);var J=["up","down"].indexOf(D.direction)!==-1,le=U.height||(J?G.heights[H]:G.height1);V.attr({x:0,y:0,width:U.width||(J?G.width1:G.widths[H]),height:le});var ye=D.font.size*l,de=r.lineCount(q),me=(de-1)*ye/2;r.positionText(q,i.textOffsetX,le/2-me+i.textOffsetY),J?B.y+=G.heights[H]+B.yPad:B.x+=G.widths[H]+B.xPad,B.index++}function x(N,D){N.attr(i.menuIndexAttrName,D||"-1").selectAll("g."+i.dropdownButtonClassName).remove()}}}),FL=Ne({"src/components/updatemenus/index.js"(te,Z){var v=Ix();Z.exports={moduleType:"component",name:v.name,layoutAttributes:Dg(),supplyLayoutDefaults:Y1(),draw:MM()}}}),Dx=Ne({"src/components/sliders/constants.js"(te,Z){Z.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}}}),Py=Ne({"src/components/sliders/attributes.js"(te,Z){var v=$o(),w=JT(),C=co().extendDeepAll,P=Kc().overrideAll,t=O1(),r=Tu().templatedArray,a=Dx(),l=r("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}});Z.exports=P(r("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:l,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:C(w({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:t.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:v({})},font:v({}),activebgcolor:{valType:"color",dflt:a.gripBgActiveColor},bgcolor:{valType:"color",dflt:a.railBgColor},bordercolor:{valType:"color",dflt:a.railBorderColor},borderwidth:{valType:"number",min:0,dflt:a.railBorderWidth},ticklen:{valType:"number",min:0,dflt:a.tickLength},tickcolor:{valType:"color",dflt:a.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:a.minorTickLength}}),"arraydraw","from-root")}}),AA=Ne({"src/components/sliders/defaults.js"(te,Z){var v=In(),w=zd(),C=Py(),P=Dx(),t=P.name,r=C.steps;Z.exports=function(s,o){w(s,o,{name:t,handleItemDefaults:a})};function a(i,s,o){function u(T,M){return v.coerce(i,s,C,T,M)}for(var d=w(i,s,{name:"steps",handleItemDefaults:l}),h=0,y=0;y<d.length;y++)d[y].visible&&h++;var m;if(h<2?m=s.visible=!1:m=u("visible"),!!m){s._stepCount=h;var E=s._visibleSteps=v.filterVisible(d),c=u("active");(d[c]||{}).visible||(s.active=E[0]._index),u("x"),u("y"),v.noneOrAll(i,s,["x","y"]),u("xanchor"),u("yanchor"),u("len"),u("lenmode"),u("pad.t"),u("pad.r"),u("pad.b"),u("pad.l"),v.coerceFont(u,"font",o.font);var _=u("currentvalue.visible");_&&(u("currentvalue.xanchor"),u("currentvalue.prefix"),u("currentvalue.suffix"),u("currentvalue.offset"),v.coerceFont(u,"currentvalue.font",s.font)),u("transition.duration"),u("transition.easing"),u("bgcolor"),u("activebgcolor"),u("bordercolor"),u("borderwidth"),u("ticklen"),u("tickwidth"),u("tickcolor"),u("minorticklen")}}function l(i,s){function o(h,y){return v.coerce(i,s,r,h,y)}var u;if(i.method!=="skip"&&!Array.isArray(i.args)?u=s.visible=!1:u=o("visible"),u){o("method"),o("args");var d=o("label","step-"+s._index);o("value",d),o("execute")}}}}),Xw=Ne({"src/components/sliders/draw.js"(te,Z){var v=xn(),w=uf(),C=io(),P=zs(),t=In(),r=t.strTranslate,a=uc(),l=Tu().arrayEditor,i=Dx(),s=bd(),o=s.LINE_SPACING,u=s.FROM_TL,d=s.FROM_BR;Z.exports=function(q){var z=q._context.staticPlot,H=q._fullLayout,G=y(H,q),J=H._infolayer.selectAll("g."+i.containerClassName).data(G.length>0?[0]:[]);J.enter().append("g").classed(i.containerClassName,!0).style("cursor",z?null:"ew-resize");function le(W){W._commandObserver&&(W._commandObserver.remove(),delete W._commandObserver),w.autoMargin(q,h(W))}if(J.exit().each(function(){v.select(this).selectAll("g."+i.groupClassName).each(le)}).remove(),G.length!==0){var ye=J.selectAll("g."+i.groupClassName).data(G,m);ye.enter().append("g").classed(i.groupClassName,!0),ye.exit().each(le).remove();for(var de=0;de<G.length;de++){var me=G[de];E(q,me)}ye.each(function(W){var ie=v.select(this);p(W),w.manageCommandObserver(q,W,W._visibleSteps,function(se){var ee=ie.data()[0];ee.active!==se.index&&(ee._dragging||A(q,ie,ee,se.index,!1,!0))}),c(q,v.select(this),W)})}};function h(V){return i.autoMarginIdRoot+V._index}function y(V,q){for(var z=V[i.name],H=[],G=0;G<z.length;G++){var J=z[G];J.visible&&(J._gd=q,H.push(J))}return H}function m(V){return V._index}function E(V,q){var z=P.tester.selectAll("g."+i.labelGroupClass).data(q._visibleSteps);z.enter().append("g").classed(i.labelGroupClass,!0);var H=0,G=0;z.each(function(pe){var oe=v.select(this),Y=M(oe,{step:pe},q),ce=Y.node();if(ce){var ue=P.bBox(ce);G=Math.max(G,ue.height),H=Math.max(H,ue.width)}}),z.remove();var J=q._dims={};J.inputAreaWidth=Math.max(i.railWidth,i.gripHeight);var le=V._fullLayout._size;J.lx=le.l+le.w*q.x,J.ly=le.t+le.h*(1-q.y),q.lenmode==="fraction"?J.outerLength=Math.round(le.w*q.len):J.outerLength=q.len,J.inputAreaStart=0,J.inputAreaLength=Math.round(J.outerLength-q.pad.l-q.pad.r);var ye=J.inputAreaLength-2*i.stepInset,de=ye/(q._stepCount-1),me=H+i.labelPadding;if(J.labelStride=Math.max(1,Math.ceil(me/de)),J.labelHeight=G,J.currentValueMaxWidth=0,J.currentValueHeight=0,J.currentValueTotalHeight=0,J.currentValueMaxLines=1,q.currentvalue.visible){var W=P.tester.append("g");z.each(function(pe){var oe=_(W,q,pe.label),Y=oe.node()&&P.bBox(oe.node())||{width:0,height:0},ce=a.lineCount(oe);J.currentValueMaxWidth=Math.max(J.currentValueMaxWidth,Math.ceil(Y.width)),J.currentValueHeight=Math.max(J.currentValueHeight,Math.ceil(Y.height)),J.currentValueMaxLines=Math.max(J.currentValueMaxLines,ce)}),J.currentValueTotalHeight=J.currentValueHeight+q.currentvalue.offset,W.remove()}J.height=J.currentValueTotalHeight+i.tickOffset+q.ticklen+i.labelOffset+J.labelHeight+q.pad.t+q.pad.b;var ie="left";t.isRightAnchor(q)&&(J.lx-=J.outerLength,ie="right"),t.isCenterAnchor(q)&&(J.lx-=J.outerLength/2,ie="center");var se="top";t.isBottomAnchor(q)&&(J.ly-=J.height,se="bottom"),t.isMiddleAnchor(q)&&(J.ly-=J.height/2,se="middle"),J.outerLength=Math.ceil(J.outerLength),J.height=Math.ceil(J.height),J.lx=Math.round(J.lx),J.ly=Math.round(J.ly);var ee={y:q.y,b:J.height*d[se],t:J.height*u[se]};q.lenmode==="fraction"?(ee.l=0,ee.xl=q.x-q.len*u[ie],ee.r=0,ee.xr=q.x+q.len*d[ie]):(ee.x=q.x,ee.l=J.outerLength*u[ie],ee.r=J.outerLength*d[ie]),w.autoMargin(V,h(q),ee)}function c(V,q,z){(z.steps[z.active]||{}).visible||(z.active=z._visibleSteps[0]._index),q.call(_,z).call(U,z).call(k,z).call(f,z).call(B,V,z).call(T,V,z);var H=z._dims;P.setTranslate(q,H.lx+z.pad.l,H.ly+z.pad.t),q.call(x,z,!1),q.call(_,z)}function _(V,q,z){if(q.currentvalue.visible){var H=q._dims,G,J;switch(q.currentvalue.xanchor){case"right":G=H.inputAreaLength-i.currentValueInset-H.currentValueMaxWidth,J="left";break;case"center":G=H.inputAreaLength*.5,J="middle";break;default:G=i.currentValueInset,J="left"}var le=t.ensureSingle(V,"text",i.labelClass,function(se){se.attr({"text-anchor":J,"data-notex":1})}),ye=q.currentvalue.prefix?q.currentvalue.prefix:"";if(typeof z=="string")ye+=z;else{var de=q.steps[q.active].label,me=q._gd._fullLayout._meta;me&&(de=t.templateString(de,me)),ye+=de}q.currentvalue.suffix&&(ye+=q.currentvalue.suffix),le.call(P.font,q.currentvalue.font).text(ye).call(a.convertToTspans,q._gd);var W=a.lineCount(le),ie=(H.currentValueMaxLines+1-W)*q.currentvalue.font.size*o;return a.positionText(le,G,ie),le}}function T(V,q,z){var H=t.ensureSingle(V,"rect",i.gripRectClass,function(G){G.call(g,q,V,z).style("pointer-events","all")});H.attr({width:i.gripWidth,height:i.gripHeight,rx:i.gripRadius,ry:i.gripRadius}).call(C.stroke,z.bordercolor).call(C.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px")}function M(V,q,z){var H=t.ensureSingle(V,"text",i.labelClass,function(le){le.attr({"text-anchor":"middle","data-notex":1})}),G=q.step.label,J=z._gd._fullLayout._meta;return J&&(G=t.templateString(G,J)),H.call(P.font,z.font).text(G).call(a.convertToTspans,z._gd),H}function k(V,q){var z=t.ensureSingle(V,"g",i.labelsClass),H=q._dims,G=z.selectAll("g."+i.labelGroupClass).data(H.labelSteps);G.enter().append("g").classed(i.labelGroupClass,!0),G.exit().remove(),G.each(function(J){var le=v.select(this);le.call(M,J,q),P.setTranslate(le,N(q,J.fraction),i.tickOffset+q.ticklen+q.font.size*o+i.labelOffset+H.currentValueTotalHeight)})}function b(V,q,z,H,G){var J=Math.round(H*(z._stepCount-1)),le=z._visibleSteps[J]._index;le!==z.active&&A(V,q,z,le,!0,G)}function A(V,q,z,H,G,J){var le=z.active;z.active=H,l(V.layout,i.name,z).applyUpdate("active",H);var ye=z.steps[z.active];q.call(x,z,J),q.call(_,z),V.emit("plotly_sliderchange",{slider:z,step:z.steps[z.active],interaction:G,previousActive:le}),ye&&ye.method&&G&&(q._nextMethod?(q._nextMethod.step=ye,q._nextMethod.doCallback=G,q._nextMethod.doTransition=J):(q._nextMethod={step:ye,doCallback:G,doTransition:J},q._nextMethodRaf=window.requestAnimationFrame(function(){var de=q._nextMethod.step;de.method&&(de.execute&&w.executeAPICommand(V,de.method,de.args),q._nextMethod=null,q._nextMethodRaf=null)})))}function g(V,q,z){if(q._context.staticPlot)return;var H=z.node(),G=v.select(q);function J(){return z.data()[0]}function le(){var ye=J();q.emit("plotly_sliderstart",{slider:ye});var de=z.select("."+i.gripRectClass);v.event.stopPropagation(),v.event.preventDefault(),de.call(C.fill,ye.activebgcolor);var me=D(ye,v.mouse(H)[0]);b(q,z,ye,me,!0),ye._dragging=!0;function W(){var se=J(),ee=D(se,v.mouse(H)[0]);b(q,z,se,ee,!1)}G.on("mousemove",W),G.on("touchmove",W);function ie(){var se=J();se._dragging=!1,de.call(C.fill,se.bgcolor),G.on("mouseup",null),G.on("mousemove",null),G.on("touchend",null),G.on("touchmove",null),q.emit("plotly_sliderend",{slider:se,step:se.steps[se.active]})}G.on("mouseup",ie),G.on("touchend",ie)}V.on("mousedown",le),V.on("touchstart",le)}function f(V,q){var z=V.selectAll("rect."+i.tickRectClass).data(q._visibleSteps),H=q._dims;z.enter().append("rect").classed(i.tickRectClass,!0),z.exit().remove(),z.attr({width:q.tickwidth+"px","shape-rendering":"crispEdges"}),z.each(function(G,J){var le=J%H.labelStride===0,ye=v.select(this);ye.attr({height:le?q.ticklen:q.minorticklen}).call(C.fill,q.tickcolor),P.setTranslate(ye,N(q,J/(q._stepCount-1))-.5*q.tickwidth,(le?i.tickOffset:i.minorTickOffset)+H.currentValueTotalHeight)})}function p(V){var q=V._dims;q.labelSteps=[];for(var z=V._stepCount,H=0;H<z;H+=q.labelStride)q.labelSteps.push({fraction:H/(z-1),step:V._visibleSteps[H]})}function x(V,q,z){for(var H=V.select("rect."+i.gripRectClass),G=0,J=0;J<q._stepCount;J++)if(q._visibleSteps[J]._index===q.active){G=J;break}var le=N(q,G/(q._stepCount-1));if(!q._invokingCommand){var ye=H;z&&q.transition.duration>0&&(ye=ye.transition().duration(q.transition.duration).ease(q.transition.easing)),ye.attr("transform",r(le-i.gripWidth*.5,q._dims.currentValueTotalHeight))}}function N(V,q){var z=V._dims;return z.inputAreaStart+i.stepInset+(z.inputAreaLength-2*i.stepInset)*Math.min(1,Math.max(0,q))}function D(V,q){var z=V._dims;return Math.min(1,Math.max(0,(q-i.stepInset-z.inputAreaStart)/(z.inputAreaLength-2*i.stepInset-2*z.inputAreaStart)))}function B(V,q,z){var H=z._dims,G=t.ensureSingle(V,"rect",i.railTouchRectClass,function(J){J.call(g,q,V,z).style("pointer-events","all")});G.attr({width:H.inputAreaLength,height:Math.max(H.inputAreaWidth,i.tickOffset+z.ticklen+H.labelHeight)}).call(C.fill,z.bgcolor).attr("opacity",0),P.setTranslate(G,0,H.currentValueTotalHeight)}function U(V,q){var z=q._dims,H=z.inputAreaLength-i.railInset*2,G=t.ensureSingle(V,"rect",i.railRectClass);G.attr({width:H,height:i.railWidth,rx:i.railRadius,ry:i.railRadius,"shape-rendering":"crispEdges"}).call(C.stroke,q.bordercolor).call(C.fill,q.bgcolor).style("stroke-width",q.borderwidth+"px"),P.setTranslate(G,i.railInset,(z.inputAreaWidth-i.railWidth)*.5+z.currentValueTotalHeight)}}}),CM=Ne({"src/components/sliders/index.js"(te,Z){var v=Dx();Z.exports={moduleType:"component",name:v.name,layoutAttributes:Py(),supplyLayoutDefaults:AA(),draw:Xw()}}}),Ly=Ne({"src/components/rangeslider/attributes.js"(te,Z){var v=lu();Z.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),Ww=Ne({"src/components/rangeslider/oppaxis_attributes.js"(te,Z){Z.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"}}}),Z1=Ne({"src/components/rangeslider/constants.js"(te,Z){Z.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}}}),Yw=Ne({"src/components/rangeslider/helpers.js"(te){var Z=Hf(),v=uc(),w=Z1(),C=bd().LINE_SPACING,P=w.name;function t(r){var a=r&&r[P];return a&&a.visible}te.isVisible=t,te.makeData=function(r){for(var a=Z.list({_fullLayout:r},"x",!0),l=r.margin,i=[],s=0;s<a.length;s++){var o=a[s];if(t(o)){i.push(o);var u=o[P];u._id=P+o._id,u._height=(r.height-l.b-l.t)*u.thickness,u._offsetShift=Math.floor(u.borderwidth/2)}}r._rangeSliderData=i},te.autoMarginOpts=function(r,a){var l=r._fullLayout,i=a[P],s=a._id.charAt(0),o=0,u=0;if(a.side==="bottom"&&(o=a._depth,a.title.text!==l._dfltTitle[s])){u=1.5*a.title.font.size+10+i._offsetShift;var d=(a.title.text.match(v.BR_TAG_ALL)||[]).length;u+=d*a.title.font.size*C}return{x:0,y:a._counterDomainMin,l:0,r:0,t:0,b:i._height+o+Math.max(l.margin.b,u),pad:w.extraPad+i._offsetShift*2}}}}),kM=Ne({"src/components/rangeslider/defaults.js"(te,Z){var v=In(),w=Tu(),C=Hf(),P=Ly(),t=Ww();Z.exports=function(a,l,i){var s=a[i],o=l[i];if(!(s.rangeslider||l._requestRangeslider[o._id]))return;v.isPlainObject(s.rangeslider)||(s.rangeslider={});var u=s.rangeslider,d=w.newContainer(o,"rangeslider");function h(p,x){return v.coerce(u,d,P,p,x)}var y,m;function E(p,x){return v.coerce(y,m,t,p,x)}var c=h("visible");if(c){h("bgcolor",l.plot_bgcolor),h("bordercolor"),h("borderwidth"),h("thickness"),h("autorange",!o.isValidRange(u.range)),h("range");var _=l._subplots;if(_)for(var T=_.cartesian.filter(function(p){return p.substr(0,p.indexOf("y"))===C.name2id(i)}).map(function(p){return p.substr(p.indexOf("y"),p.length)}),M=v.simpleMap(T,C.id2name),k=0;k<M.length;k++){var b=M[k];y=u[b]||{},m=w.newContainer(d,b,"yaxis");var A=l[b],g;y.range&&A.isValidRange(y.range)&&(g="fixed");var f=E("rangemode",g);f!=="match"&&E("range",A.range.slice())}d._input=u}}}}),PM=Ne({"src/components/rangeslider/calc_autorange.js"(te,Z){var v=Hf().list,w=Cm().getAutoRange,C=Z1();Z.exports=function(t){for(var r=v(t,"x",!0),a=0;a<r.length;a++){var l=r[a],i=l[C.name];i&&i.visible&&i.autorange&&(i._input.autorange=!0,i._input.range=i.range=w(t,l))}}}}),Og=Ne({"src/components/rangeslider/draw.js"(te,Z){var v=xn(),w=Xo(),C=uf(),P=In(),t=P.strTranslate,r=zs(),a=io(),l=wy(),i=Lh(),s=Hf(),o=Bv(),u=km(),d=Z1();Z.exports=function(g){for(var f=g._fullLayout,p=f._rangeSliderData,x=0;x<p.length;x++){var N=p[x][d.name];N._clipId=N._id+"-"+f._uid}function D(U){return U._name}var B=f._infolayer.selectAll("g."+d.containerClassName).data(p,D);B.exit().each(function(U){var V=U[d.name];f._topdefs.select("#"+V._clipId).remove()}).remove(),p.length!==0&&(B.enter().append("g").classed(d.containerClassName,!0).attr("pointer-events","all"),B.each(function(U){var V=v.select(this),q=U[d.name],z=f[s.id2name(U.anchor)],H=q[s.id2name(U.anchor)];if(q.range){var G=P.simpleMap(q.range,U.r2l),J=P.simpleMap(U.range,U.r2l),le;J[0]<J[1]?le=[Math.min(G[0],J[0]),Math.max(G[1],J[1])]:le=[Math.max(G[0],J[0]),Math.min(G[1],J[1])],q.range=q._input.range=P.simpleMap(le,U.l2r)}U.cleanRange("rangeslider.range");var ye=f._size,de=U.domain;q._width=ye.w*(de[1]-de[0]);var me=Math.round(ye.l+ye.w*de[0]),W=Math.round(ye.t+ye.h*(1-U._counterDomainMin)+(U.side==="bottom"?U._depth:0)+q._offsetShift+d.extraPad);V.attr("transform",t(me,W)),q._rl=P.simpleMap(q.range,U.r2l);var ie=q._rl[0],se=q._rl[1],ee=se-ie;if(q.p2d=function(Ve){return Ve/q._width*ee+ie},q.d2p=function(Ve){return(Ve-ie)/ee*q._width},U.rangebreaks){var pe=U.locateBreaks(ie,se);if(pe.length){var oe,Y,ce=0;for(oe=0;oe<pe.length;oe++)Y=pe[oe],ce+=Y.max-Y.min;var ue=q._width/(se-ie-ce),_e=[-ue*ie];for(oe=0;oe<pe.length;oe++)Y=pe[oe],_e.push(_e[_e.length-1]-ue*(Y.max-Y.min));for(q.d2p=function(Ve){for(var rt=_e[0],pt=0;pt<pe.length;pt++){var gt=pe[pt];if(Ve>=gt.max)rt=_e[pt+1];else if(Ve<gt.min)break}return rt+ue*Ve},oe=0;oe<pe.length;oe++)Y=pe[oe],Y.pmin=q.d2p(Y.min),Y.pmax=q.d2p(Y.max);q.p2d=function(Ve){for(var rt=_e[0],pt=0;pt<pe.length;pt++){var gt=pe[pt];if(Ve>=gt.pmax)rt=_e[pt+1];else if(Ve<gt.pmin)break}return(Ve-rt)/ue}}}if(H.rangemode!=="match"){var Le=z.r2l(H.range[0]),ze=z.r2l(H.range[1]),Ge=ze-Le;q.d2pOppAxis=function(Ve){return(Ve-Le)/Ge*q._height}}V.call(c,g,U,q).call(_,g,U,q).call(T,g,U,q).call(k,g,U,q,H).call(b,g,U,q).call(A,g,U,q),y(V,g,U,q),E(V,g,U,q,z,H),U.side==="bottom"&&l.draw(g,U._id+"title",{propContainer:U,propName:U._name+".title.text",placeholder:f._dfltTitle.x,attributes:{x:U._offset+U._length/2,y:W+q._height+q._offsetShift+10+1.5*U.title.font.size,"text-anchor":"middle"}})}))};function h(g){return typeof g.clientX=="number"?g.clientX:g.touches&&g.touches.length>0?g.touches[0].clientX:0}function y(g,f,p,x){if(f._context.staticPlot)return;var N=g.select("rect."+d.slideBoxClassName).node(),D=g.select("rect."+d.grabAreaMinClassName).node(),B=g.select("rect."+d.grabAreaMaxClassName).node();function U(){var V=v.event,q=V.target,z=h(V),H=z-g.node().getBoundingClientRect().left,G=x.d2p(p._rl[0]),J=x.d2p(p._rl[1]),le=o.coverSlip();this.addEventListener("touchmove",ye),this.addEventListener("touchend",de),le.addEventListener("mousemove",ye),le.addEventListener("mouseup",de);function ye(me){var W=h(me),ie=+W-z,se,ee,pe;switch(q){case N:if(pe="ew-resize",G+ie>p._length||J+ie<0)return;se=G+ie,ee=J+ie;break;case D:if(pe="col-resize",G+ie>p._length)return;se=G+ie,ee=J;break;case B:if(pe="col-resize",J+ie<0)return;se=G,ee=J+ie;break;default:pe="ew-resize",se=H,ee=H+ie;break}if(ee<se){var oe=ee;ee=se,se=oe}x._pixelMin=se,x._pixelMax=ee,u(v.select(le),pe),m(g,f,p,x)}function de(){le.removeEventListener("mousemove",ye),le.removeEventListener("mouseup",de),this.removeEventListener("touchmove",ye),this.removeEventListener("touchend",de),P.removeElement(le)}}g.on("mousedown",U),g.on("touchstart",U)}function m(g,f,p,x){function N(U){return p.l2r(P.constrain(U,x._rl[0],x._rl[1]))}var D=N(x.p2d(x._pixelMin)),B=N(x.p2d(x._pixelMax));window.requestAnimationFrame(function(){w.call("_guiRelayout",f,p._name+".range",[D,B])})}function E(g,f,p,x,N,D){var B=d.handleWidth/2;function U(me){return P.constrain(me,0,x._width)}function V(me){return P.constrain(me,0,x._height)}function q(me){return P.constrain(me,-B,x._width+B)}var z=U(x.d2p(p._rl[0])),H=U(x.d2p(p._rl[1]));if(g.select("rect."+d.slideBoxClassName).attr("x",z).attr("width",H-z),g.select("rect."+d.maskMinClassName).attr("width",z),g.select("rect."+d.maskMaxClassName).attr("x",H).attr("width",x._width-H),D.rangemode!=="match"){var G=x._height-V(x.d2pOppAxis(N._rl[1])),J=x._height-V(x.d2pOppAxis(N._rl[0]));g.select("rect."+d.maskMinOppAxisClassName).attr("x",z).attr("height",G).attr("width",H-z),g.select("rect."+d.maskMaxOppAxisClassName).attr("x",z).attr("y",J).attr("height",x._height-J).attr("width",H-z),g.select("rect."+d.slideBoxClassName).attr("y",G).attr("height",J-G)}var le=.5,ye=Math.round(q(z-B))-le,de=Math.round(q(H-B))+le;g.select("g."+d.grabberMinClassName).attr("transform",t(ye,le)),g.select("g."+d.grabberMaxClassName).attr("transform",t(de,le))}function c(g,f,p,x){var N=P.ensureSingle(g,"rect",d.bgClassName,function(V){V.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),D=x.borderwidth%2===0?x.borderwidth:x.borderwidth-1,B=-x._offsetShift,U=r.crispRound(f,x.borderwidth);N.attr({width:x._width+D,height:x._height+D,transform:t(B,B),"stroke-width":U}).call(a.stroke,x.bordercolor).call(a.fill,x.bgcolor)}function _(g,f,p,x){var N=f._fullLayout,D=P.ensureSingleById(N._topdefs,"clipPath",x._clipId,function(B){B.append("rect").attr({x:0,y:0})});D.select("rect").attr({width:x._width,height:x._height})}function T(g,f,p,x){var N=f.calcdata,D=g.selectAll("g."+d.rangePlotClassName).data(p._subplotsWith,P.identity);D.enter().append("g").attr("class",function(U){return d.rangePlotClassName+" "+U}).call(r.setClipUrl,x._clipId,f),D.order(),D.exit().remove();var B;D.each(function(U,V){var q=v.select(this),z=V===0,H=s.getFromId(f,U,"y"),G=H._name,J=x[G],le={data:[],layout:{xaxis:{type:p.type,domain:[0,1],range:x.range.slice(),calendar:p.calendar},width:x._width,height:x._height,margin:{t:0,b:0,l:0,r:0}},_context:f._context};p.rangebreaks&&(le.layout.xaxis.rangebreaks=p.rangebreaks),le.layout[G]={type:H.type,domain:[0,1],range:J.rangemode!=="match"?J.range.slice():H.range.slice(),calendar:H.calendar},H.rangebreaks&&(le.layout[G].rangebreaks=H.rangebreaks),C.supplyDefaults(le);var ye=le._fullLayout.xaxis,de=le._fullLayout[G];ye.clearCalc(),ye.setScale(),de.clearCalc(),de.setScale();var me={id:U,plotgroup:q,xaxis:ye,yaxis:de,isRangePlot:!0};z?B=me:(me.mainplot="xy",me.mainplotinfo=B),i.rangePlot(f,me,M(N,U))})}function M(g,f){for(var p=[],x=0;x<g.length;x++){var N=g[x],D=N[0].trace;D.xaxis+D.yaxis===f&&p.push(N)}return p}function k(g,f,p,x,N){var D=P.ensureSingle(g,"rect",d.maskMinClassName,function(q){q.attr({x:0,y:0,"shape-rendering":"crispEdges"})});D.attr("height",x._height).call(a.fill,d.maskColor);var B=P.ensureSingle(g,"rect",d.maskMaxClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});if(B.attr("height",x._height).call(a.fill,d.maskColor),N.rangemode!=="match"){var U=P.ensureSingle(g,"rect",d.maskMinOppAxisClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});U.attr("width",x._width).call(a.fill,d.maskOppAxisColor);var V=P.ensureSingle(g,"rect",d.maskMaxOppAxisClassName,function(q){q.attr({y:0,"shape-rendering":"crispEdges"})});V.attr("width",x._width).style("border-top",d.maskOppBorder).call(a.fill,d.maskOppAxisColor)}}function b(g,f,p,x){if(!f._context.staticPlot){var N=P.ensureSingle(g,"rect",d.slideBoxClassName,function(D){D.attr({y:0,cursor:d.slideBoxCursor,"shape-rendering":"crispEdges"})});N.attr({height:x._height,fill:d.slideBoxFill})}}function A(g,f,p,x){var N=P.ensureSingle(g,"g",d.grabberMinClassName),D=P.ensureSingle(g,"g",d.grabberMaxClassName),B={x:0,width:d.handleWidth,rx:d.handleRadius,fill:a.background,stroke:a.defaultLine,"stroke-width":d.handleStrokeWidth,"shape-rendering":"crispEdges"},U={y:Math.round(x._height/4),height:Math.round(x._height/2)},V=P.ensureSingle(N,"rect",d.handleMinClassName,function(J){J.attr(B)});V.attr(U);var q=P.ensureSingle(D,"rect",d.handleMaxClassName,function(J){J.attr(B)});q.attr(U);var z={width:d.grabAreaWidth,x:0,y:0,fill:d.grabAreaFill,cursor:f._context.staticPlot?void 0:d.grabAreaCursor},H=P.ensureSingle(N,"rect",d.grabAreaMinClassName,function(J){J.attr(z)});H.attr("height",x._height);var G=P.ensureSingle(D,"rect",d.grabAreaMaxClassName,function(J){J.attr(z)});G.attr("height",x._height)}}}),zg=Ne({"src/components/rangeslider/index.js"(te,Z){var v=In(),w=Ly(),C=Ww(),P=Yw();Z.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:v.extendFlat({},w,{yaxis:C})}}},layoutAttributes:Ly(),handleDefaults:kM(),calcAutorange:PM(),draw:Og(),isVisible:P.isVisible,makeData:P.makeData,autoMarginOpts:P.autoMarginOpts}}}),Zw=Ne({"src/components/rangeselector/attributes.js"(te,Z){var v=$o(),w=lu(),C=Tu().templatedArray,P=C("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"});Z.exports={visible:{valType:"boolean",editType:"plot"},buttons:P,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:v({editType:"plot"}),bgcolor:{valType:"color",dflt:w.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:w.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}}}),SA=Ne({"src/components/rangeselector/constants.js"(te,Z){Z.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}}}),$1=Ne({"src/components/rangeselector/defaults.js"(te,Z){var v=In(),w=io(),C=Tu(),P=zd(),t=Zw(),r=SA();Z.exports=function(s,o,u,d,h){var y=s.rangeselector||{},m=C.newContainer(o,"rangeselector");function E(k,b){return v.coerce(y,m,t,k,b)}var c=P(y,m,{name:"buttons",handleItemDefaults:a,calendar:h}),_=E("visible",c.length>0);if(_){var T=l(o,u,d);E("x",T[0]),E("y",T[1]),v.noneOrAll(s,o,["x","y"]),E("xanchor"),E("yanchor"),v.coerceFont(E,"font",u.font);var M=E("bgcolor");E("activecolor",w.contrast(M,r.lightAmount,r.darkAmount)),E("bordercolor"),E("borderwidth")}};function a(i,s,o,u){var d=u.calendar;function h(E,c){return v.coerce(i,s,t.buttons,E,c)}var y=h("visible");if(y){var m=h("step");m!=="all"&&(d&&d!=="gregorian"&&(m==="month"||m==="year")?s.stepmode="backward":h("stepmode"),h("count")),h("label")}}function l(i,s,o){for(var u=o.filter(function(m){return s[m].anchor===i._id}),d=0,h=0;h<u.length;h++){var y=s[u[h]].domain;y&&(d=Math.max(y[1],d))}return[i.domain[0],d+r.yPad]}}}),Ox=Ne({"src/components/rangeselector/get_update_object.js"(te,Z){var v=Na(),w=In().titleCase;Z.exports=function(t,r){var a=t._name,l={};if(r.step==="all")l[a+".autorange"]=!0;else{var i=C(t,r);l[a+".range[0]"]=i[0],l[a+".range[1]"]=i[1]}return l};function C(P,t){var r=P.range,a=new Date(P.r2l(r[1])),l=t.step,i=v["utc"+w(l)],s=t.count,o;switch(t.stepmode){case"backward":o=P.l2r(+i.offset(a,-s));break;case"todate":var u=i.offset(a,-s);o=P.l2r(+i.ceil(u));break}var d=r[1];return[o,d]}}}),$w=Ne({"src/components/rangeselector/draw.js"(te,Z){var v=xn(),w=Xo(),C=uf(),P=io(),t=zs(),r=In(),a=r.strTranslate,l=uc(),i=Hf(),s=bd(),o=s.LINE_SPACING,u=s.FROM_TL,d=s.FROM_BR,h=SA(),y=Ox();Z.exports=function(g){var f=g._fullLayout,p=f._infolayer.selectAll(".rangeselector").data(m(g),E);p.enter().append("g").classed("rangeselector",!0),p.exit().remove(),p.style({cursor:"pointer","pointer-events":"all"}),p.each(function(x){var N=v.select(this),D=x,B=D.rangeselector,U=N.selectAll("g.button").data(r.filterVisible(B.buttons));U.enter().append("g").classed("button",!0),U.exit().remove(),U.each(function(V){var q=v.select(this),z=y(D,V);V._isActive=c(D,V,z),q.call(_,B,V),q.call(M,B,V,g),q.on("click",function(){g._dragged||w.call("_guiRelayout",g,z)}),q.on("mouseover",function(){V._isHovered=!0,q.call(_,B,V)}),q.on("mouseout",function(){V._isHovered=!1,q.call(_,B,V)})}),b(g,U,B,D._name,N)})};function m(A){for(var g=i.list(A,"x",!0),f=[],p=0;p<g.length;p++){var x=g[p];x.rangeselector&&x.rangeselector.visible&&f.push(x)}return f}function E(A){return A._id}function c(A,g,f){if(g.step==="all")return A.autorange===!0;var p=Object.keys(f);return A.range[0]===f[p[0]]&&A.range[1]===f[p[1]]}function _(A,g,f){var p=r.ensureSingle(A,"rect","selector-rect",function(x){x.attr("shape-rendering","crispEdges")});p.attr({rx:h.rx,ry:h.ry}),p.call(P.stroke,g.bordercolor).call(P.fill,T(g,f)).style("stroke-width",g.borderwidth+"px")}function T(A,g){return g._isActive||g._isHovered?A.activecolor:A.bgcolor}function M(A,g,f,p){function x(D){l.convertToTspans(D,p)}var N=r.ensureSingle(A,"text","selector-text",function(D){D.attr("text-anchor","middle")});N.call(t.font,g.font).text(k(f,p._fullLayout._meta)).call(x)}function k(A,g){return A.label?g?r.templateString(A.label,g):A.label:A.step==="all"?"all":A.count+A.step.charAt(0)}function b(A,g,f,p,x){var N=0,D=0,B=f.borderwidth;g.each(function(){var G=v.select(this),J=G.select(".selector-text"),le=f.font.size*o,ye=Math.max(le*l.lineCount(J),16)+3;D=Math.max(D,ye)}),g.each(function(){var G=v.select(this),J=G.select(".selector-rect"),le=G.select(".selector-text"),ye=le.node()&&t.bBox(le.node()).width,de=f.font.size*o,me=l.lineCount(le),W=Math.max(ye+10,h.minButtonWidth);G.attr("transform",a(B+N,B)),J.attr({x:0,y:0,width:W,height:D}),l.positionText(le,W/2,D/2-(me-1)*de/2+3),N+=W+5});var U=A._fullLayout._size,V=U.l+U.w*f.x,q=U.t+U.h*(1-f.y),z="left";r.isRightAnchor(f)&&(V-=N,z="right"),r.isCenterAnchor(f)&&(V-=N/2,z="center");var H="top";r.isBottomAnchor(f)&&(q-=D,H="bottom"),r.isMiddleAnchor(f)&&(q-=D/2,H="middle"),N=Math.ceil(N),D=Math.ceil(D),V=Math.round(V),q=Math.round(q),C.autoMargin(A,p+"-range-selector",{x:f.x,y:f.y,l:N*u[z],r:N*d[z],b:D*d[H],t:D*u[H]}),x.attr("transform",a(V,q))}}}),zx=Ne({"src/components/rangeselector/index.js"(te,Z){Z.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Zw()}}},layoutAttributes:Zw(),handleDefaults:$1(),draw:$w()}}}),Oc=Ne({"src/plots/domain.js"(te){var Z=co().extendFlat;te.attributes=function(v,w){v=v||{},w=w||{};var C={valType:"info_array",editType:v.editType,items:[{valType:"number",min:0,max:1,editType:v.editType},{valType:"number",min:0,max:1,editType:v.editType}],dflt:[0,1]};v.name&&v.name+"",v.trace,w.description&&""+w.description;var P={x:Z({},C,{}),y:Z({},C,{}),editType:v.editType};return v.noGridCell||(P.row={valType:"integer",min:0,dflt:0,editType:v.editType},P.column={valType:"integer",min:0,dflt:0,editType:v.editType}),P},te.defaults=function(v,w,C,P){var t=P&&P.x||[0,1],r=P&&P.y||[0,1],a=w.grid;if(a){var l=C("domain.column");l!==void 0&&(l<a.columns?t=a._domains.x[l]:delete v.domain.column);var i=C("domain.row");i!==void 0&&(i<a.rows?r=a._domains.y[i]:delete v.domain.row)}var s=C("domain.x",t),o=C("domain.y",r);s[0]<s[1]||(v.domain.x=t.slice()),o[0]<o[1]||(v.domain.y=r.slice())}}}),EA=Ne({"src/components/grid/index.js"(te,Z){var v=In(),w=sf().counter,C=Oc().attributes,P=xh().idRegex,t=Tu(),r={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:[w("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[P.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[P.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:C({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 a(u,d,h){var y=d[h+"axes"],m=Object.keys((u._splomAxes||{})[h]||{});if(Array.isArray(y))return y;if(m.length)return m}function l(u,d){var h=u.grid||{},y=a(d,h,"x"),m=a(d,h,"y");if(!u.grid&&!y&&!m)return;var E=Array.isArray(h.subplots)&&Array.isArray(h.subplots[0]),c=Array.isArray(y),_=Array.isArray(m),T=c&&y!==h.xaxes&&_&&m!==h.yaxes,M,k;E?(M=h.subplots.length,k=h.subplots[0].length):(_&&(M=m.length),c&&(k=y.length));var b=t.newContainer(d,"grid");function A(q,z){return v.coerce(h,b,r,q,z)}var g=A("rows",M),f=A("columns",k);if(!(g*f>1)){delete d.grid;return}if(!E&&!c&&!_){var p=A("pattern")==="independent";p&&(E=!0)}b._hasSubplotGrid=E;var x=A("roworder"),N=x==="top to bottom",D=E?.2:.1,B=E?.3:.1,U,V;T&&d._splomGridDflt&&(U=d._splomGridDflt.xside,V=d._splomGridDflt.yside),b._domains={x:i("x",A,D,U,f),y:i("y",A,B,V,g,N)}}function i(u,d,h,y,m,E){var c=d(u+"gap",h),_=d("domain."+u);d(u+"side",y);for(var T=new Array(m),M=_[0],k=(_[1]-M)/(m-c),b=k*(1-c),A=0;A<m;A++){var g=M+k*A;T[E?m-1-A:A]=[g,g+b]}return T}function s(u,d){var h=d.grid;if(!(!h||!h._domains)){var y=u.grid||{},m=d._subplots,E=h._hasSubplotGrid,c=h.rows,_=h.columns,T=h.pattern==="independent",M,k,b,A,g,f,p,x=h._axisMap={};if(E){var N=y.subplots||[];f=h.subplots=new Array(c);var D=1;for(M=0;M<c;M++){var B=f[M]=new Array(_),U=N[M]||[];for(k=0;k<_;k++)if(T?(g=D===1?"xy":"x"+D+"y"+D,D++):g=U[k],B[k]="",m.cartesian.indexOf(g)!==-1){if(p=g.indexOf("y"),b=g.slice(0,p),A=g.slice(p),x[b]!==void 0&&x[b]!==k||x[A]!==void 0&&x[A]!==M)continue;B[k]=g,x[b]=k,x[A]=M}}}else{var V=a(d,y,"x"),q=a(d,y,"y");h.xaxes=o(V,m.xaxis,_,x,"x"),h.yaxes=o(q,m.yaxis,c,x,"y")}var z=h._anchors={},H=h.roworder==="top to bottom";for(var G in x){var J=G.charAt(0),le=h[J+"side"],ye,de,me;if(le.length<8)z[G]="free";else if(J==="x"){if(le.charAt(0)==="t"===H?(ye=0,de=1,me=c):(ye=c-1,de=-1,me=-1),E){var W=x[G];for(M=ye;M!==me;M+=de)if(g=f[M][W],!!g&&(p=g.indexOf("y"),g.slice(0,p)===G)){z[G]=g.slice(p);break}}else for(M=ye;M!==me;M+=de)if(A=h.yaxes[M],m.cartesian.indexOf(G+A)!==-1){z[G]=A;break}}else if(le.charAt(0)==="l"?(ye=0,de=1,me=_):(ye=_-1,de=-1,me=-1),E){var ie=x[G];for(M=ye;M!==me;M+=de)if(g=f[ie][M],!!g&&(p=g.indexOf("y"),g.slice(p)===G)){z[G]=g.slice(0,p);break}}else for(M=ye;M!==me;M+=de)if(b=h.xaxes[M],m.cartesian.indexOf(b+G)!==-1){z[G]=b;break}}}}function o(u,d,h,y,m){var E=new Array(h),c;function _(T,M){d.indexOf(M)!==-1&&y[M]===void 0?(E[T]=M,y[M]=T):E[T]=""}if(Array.isArray(u))for(c=0;c<h;c++)_(c,u[c]);else for(_(0,m),c=1;c<h;c++)_(c,m+(c+1));return E}Z.exports={moduleType:"component",name:"grid",schema:{layout:{grid:r}},layoutAttributes:r,sizeDefaults:l,contentDefaults:s}}}),Ry=Ne({"src/components/errorbars/attributes.js"(te,Z){Z.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"}}}),LM=Ne({"src/components/errorbars/defaults.js"(te,Z){var v=la(),w=Xo(),C=In(),P=Tu(),t=Ry();Z.exports=function(r,a,l,i){var s="error_"+i.axis,o=P.newContainer(a,s),u=r[s]||{};function d(T,M){return C.coerce(u,o,t,T,M)}var h=u.array!==void 0||u.value!==void 0||u.type==="sqrt",y=d("visible",h);if(y!==!1){var m=d("type","array"in u?"data":"percent"),E=!0;m!=="sqrt"&&(E=d("symmetric",!((m==="data"?"arrayminus":"valueminus")in u))),m==="data"?(d("array"),d("traceref"),E||(d("arrayminus"),d("tracerefminus"))):(m==="percent"||m==="constant")&&(d("value"),E||d("valueminus"));var c="copy_"+i.inherit+"style";if(i.inherit){var _=a["error_"+i.inherit];(_||{}).visible&&d(c,!(u.color||v(u.thickness)||v(u.width)))}(!i.inherit||!o[c])&&(d("color",l),d("thickness"),d("width",w.traceIs(a,"gl3d")?0:4))}}}}),H0=Ne({"src/components/errorbars/compute_error.js"(te,Z){Z.exports=function(C){var P=C.type,t=C.symmetric;if(P==="data"){var r=C.array||[];if(t)return function(o,u){var d=+r[u];return[d,d]};var a=C.arrayminus||[];return function(o,u){var d=+r[u],h=+a[u];return!isNaN(d)||!isNaN(h)?[h||0,d||0]:[NaN,NaN]}}else{var l=v(P,C.value),i=v(P,C.valueminus);return t||C.valueminus===void 0?function(o){var u=l(o);return[u,u]}:function(o){return[i(o),l(o)]}}};function v(w,C){if(w==="percent")return function(P){return Math.abs(P*C/100)};if(w==="constant")return function(){return Math.abs(C)};if(w==="sqrt")return function(P){return Math.sqrt(Math.abs(P))}}}}),MA=Ne({"src/components/errorbars/calc.js"(te,Z){var v=la(),w=Xo(),C=Os(),P=In(),t=H0();Z.exports=function(l){for(var i=l.calcdata,s=0;s<i.length;s++){var o=i[s],u=o[0].trace;if(u.visible===!0&&w.traceIs(u,"errorBarsOK")){var d=C.getFromId(l,u.xaxis),h=C.getFromId(l,u.yaxis);r(o,u,d,"x"),r(o,u,h,"y")}}};function r(a,l,i,s){var o=l["error_"+s]||{},u=o.visible&&["linear","log"].indexOf(i.type)!==-1,d=[];if(u){for(var h=t(o),y=0;y<a.length;y++){var m=a[y],E=m.i;if(E===void 0)E=y;else if(E===null)continue;var c=m[s];if(v(i.c2l(c))){var _=h(c,E);if(v(_[0])&&v(_[1])){var T=m[s+"s"]=c-_[0],M=m[s+"h"]=c+_[1];d.push(T,M)}}}var k=i._id,b=l._extremes[k],A=C.findExtremes(i,d,P.extendFlat({tozero:b.opts.tozero},{padded:!0}));b.min=b.min.concat(A.min),b.max=b.max.concat(A.max)}}}}),CA=Ne({"src/components/errorbars/plot.js"(te,Z){var v=xn(),w=la(),C=zs(),P=vu();Z.exports=function(a,l,i,s){var o,u=i.xaxis,d=i.yaxis,h=s&&s.duration>0,y=a._context.staticPlot;l.each(function(m){var E=m[0].trace,c=E.error_x||{},_=E.error_y||{},T;E.ids&&(T=function(A){return A.id});var M=P.hasMarkers(E)&&E.marker.maxdisplayed>0;!_.visible&&!c.visible&&(m=[]);var k=v.select(this).selectAll("g.errorbar").data(m,T);if(k.exit().remove(),!!m.length){c.visible||k.selectAll("path.xerror").remove(),_.visible||k.selectAll("path.yerror").remove(),k.style("opacity",1);var b=k.enter().append("g").classed("errorbar",!0);h&&b.style("opacity",0).transition().duration(s.duration).style("opacity",1),C.setClipUrl(k,i.layerClipId,a),k.each(function(A){var g=v.select(this),f=t(A,u,d);if(!(M&&!A.vis)){var p,x=g.select("path.yerror");if(_.visible&&w(f.x)&&w(f.yh)&&w(f.ys)){var N=_.width;p="M"+(f.x-N)+","+f.yh+"h"+2*N+"m-"+N+",0V"+f.ys,f.noYS||(p+="m-"+N+",0h"+2*N),o=!x.size(),o?x=g.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("yerror",!0):h&&(x=x.transition().duration(s.duration).ease(s.easing)),x.attr("d",p)}else x.remove();var D=g.select("path.xerror");if(c.visible&&w(f.y)&&w(f.xh)&&w(f.xs)){var B=(c.copy_ystyle?_:c).width;p="M"+f.xh+","+(f.y-B)+"v"+2*B+"m0,-"+B+"H"+f.xs,f.noXS||(p+="m0,-"+B+"v"+2*B),o=!D.size(),o?D=g.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("xerror",!0):h&&(D=D.transition().duration(s.duration).ease(s.easing)),D.attr("d",p)}else D.remove()}})}})};function t(r,a,l){var i={x:a.c2p(r.x),y:l.c2p(r.y)};return r.yh!==void 0&&(i.yh=l.c2p(r.yh),i.ys=l.c2p(r.ys),w(i.ys)||(i.noYS=!0,i.ys=l.c2p(r.ys,!0))),r.xh!==void 0&&(i.xh=a.c2p(r.xh),i.xs=a.c2p(r.xs),w(i.xs)||(i.noXS=!0,i.xs=a.c2p(r.xs,!0))),i}}}),Iy=Ne({"src/components/errorbars/style.js"(te,Z){var v=xn(),w=io();Z.exports=function(P){P.each(function(t){var r=t[0].trace,a=r.error_y||{},l=r.error_x||{},i=v.select(this);i.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(w.stroke,a.color),l.copy_ystyle&&(l=a),i.selectAll("path.xerror").style("stroke-width",l.thickness+"px").call(w.stroke,l.color)})}}}),Dy=Ne({"src/components/errorbars/index.js"(te,Z){var v=In(),w=Kc().overrideAll,C=Ry(),P={error_x:v.extendFlat({},C),error_y:v.extendFlat({},C)};delete P.error_x.copy_zstyle,delete P.error_y.copy_zstyle,delete P.error_y.copy_ystyle;var t={error_x:v.extendFlat({},C),error_y:v.extendFlat({},C),error_z:v.extendFlat({},C)};delete t.error_x.copy_ystyle,delete t.error_y.copy_ystyle,delete t.error_z.copy_ystyle,delete t.error_z.copy_zstyle,Z.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:P,bar:P,histogram:P,scatter3d:w(t,"calc","nested"),scattergl:w(P,"calc","nested")}},supplyDefaults:LM(),calc:MA(),makeComputeError:H0(),plot:CA(),style:Iy(),hoverInfo:r};function r(a,l,i){(l.error_y||{}).visible&&(i.yerr=a.yh-a.y,l.error_y.symmetric||(i.yerrneg=a.y-a.ys)),(l.error_x||{}).visible&&(i.xerr=a.xh-a.x,l.error_x.symmetric||(i.xerrneg=a.x-a.xs))}}}),Nx=Ne({"src/components/colorbar/constants.js"(te,Z){Z.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"}}}}),kA=Ne({"src/components/colorbar/draw.js"(te,Z){var v=xn(),w=Ro(),C=uf(),P=Xo(),t=Os(),r=Bv(),a=In(),l=a.strTranslate,i=co().extendFlat,s=km(),o=zs(),u=io(),d=wy(),h=uc(),y=Od().flipScale,m=Om(),E=hp(),c=wd(),_=bd(),T=_.LINE_SPACING,M=_.FROM_TL,k=_.FROM_BR,b=Nx().cn;function A(D){var B=D._fullLayout,U=B._infolayer.selectAll("g."+b.colorbar).data(g(D),function(V){return V._id});U.enter().append("g").attr("class",function(V){return V._id}).classed(b.colorbar,!0),U.each(function(V){var q=v.select(this);a.ensureSingle(q,"rect",b.cbbg),a.ensureSingle(q,"g",b.cbfills),a.ensureSingle(q,"g",b.cblines),a.ensureSingle(q,"g",b.cbaxis,function(H){H.classed(b.crisp,!0)}),a.ensureSingle(q,"g",b.cbtitleunshift,function(H){H.append("g").classed(b.cbtitle,!0)}),a.ensureSingle(q,"rect",b.cboutline);var z=f(q,V,D);z&&z.then&&(D._promises||[]).push(z),D._context.edits.colorbarPosition&&p(q,V,D)}),U.exit().each(function(V){C.autoMargin(D,V._id)}).remove(),U.order()}function g(D){var B=D._fullLayout,U=D.calcdata,V=[],q,z,H,G;function J(Y){return i(Y,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function le(){typeof G.calc=="function"?G.calc(D,H,q):(q._fillgradient=z.reversescale?y(z.colorscale):z.colorscale,q._zrange=[z[G.min],z[G.max]])}for(var ye=0;ye<U.length;ye++){var de=U[ye];if(H=de[0].trace,!!H._module){var me=H._module.colorbar;if(H.visible===!0&&me)for(var W=Array.isArray(me),ie=W?me:[me],se=0;se<ie.length;se++){G=ie[se];var ee=G.container;z=ee?H[ee]:H,z&&z.showscale&&(q=J(z.colorbar),q._id="cb"+H.uid+(W&&ee?"-"+ee:""),q._traceIndex=H.index,q._propPrefix=(ee?ee+".":"")+"colorbar.",q._meta=H._meta,le(),V.push(q))}}}for(var pe in B._colorAxes)if(z=B[pe],z.showscale){var oe=B._colorAxes[pe];q=J(z.colorbar),q._id="cb"+pe,q._propPrefix=pe+".colorbar.",q._meta=B._meta,G={min:"cmin",max:"cmax"},oe[0]!=="heatmap"&&(H=oe[1],G.calc=H._module.colorbar.calc),le(),V.push(q)}return V}function f(D,B,U){var V=B.orientation==="v",q=B.len,z=B.lenmode,H=B.thickness,G=B.thicknessmode,J=B.outlinewidth,le=B.borderwidth,ye=B.bgcolor,de=B.xanchor,me=B.yanchor,W=B.xpad,ie=B.ypad,se=B.x,ee=V?B.y:1-B.y,pe=B.yref==="paper",oe=B.xref==="paper",Y=U._fullLayout,ce=Y._size,ue=B._fillcolor,_e=B._line,Le=B.title,ze=Le.side,Ge=B._zrange||v.extent((typeof ue=="function"?ue:_e.color).domain()),Ve=typeof _e.color=="function"?_e.color:function(){return _e.color},rt=typeof ue=="function"?ue:function(){return ue},pt=B._levels,gt=x(U,B,Ge),ht=gt.fill,lt=gt.line,Fe=Math.round(H*(G==="fraction"?V?ce.w:ce.h:1)),Pe=Fe/(V?ce.w:ce.h),be=Math.round(q*(z==="fraction"?V?ce.h:ce.w:1)),Ye=be/(V?ce.h:ce.w),mt=oe?ce.w:U._fullLayout.width,bt=pe?ce.h:U._fullLayout.height,ft=Math.round(V?se*mt+W:ee*bt+ie),Wt={center:.5,right:1}[de]||0,Zt={top:1,middle:.5}[me]||0,cr=V?se-Wt*Pe:ee-Zt*Pe,pr=V?ee-Zt*Ye:se-Wt*Ye,Br=Math.round(V?bt*(1-pr):mt*pr);B._lenFrac=Ye,B._thickFrac=Pe,B._uFrac=cr,B._vFrac=pr;var Fr=B._axis=N(U,B,Ge);Fr.position=Pe+(V?se+W/ce.w:ee+ie/ce.h);var cn=["top","bottom"].indexOf(ze)!==-1;if(V&&cn&&(Fr.title.side=ze,Fr.titlex=se+W/ce.w,Fr.titley=pr+(Le.side==="top"?Ye-ie/ce.h:ie/ce.h)),!V&&!cn&&(Fr.title.side=ze,Fr.titley=ee+ie/ce.h,Fr.titlex=pr+W/ce.w),_e.color&&B.tickmode==="auto"){Fr.tickmode="linear",Fr.tick0=pt.start;var Nr=pt.size,Jr=a.constrain(be/50,4,15)+1,Dt=(Ge[1]-Ge[0])/((B.nticks||Jr)*Nr);if(Dt>1){var $e=Math.pow(10,Math.floor(Math.log(Dt)/Math.LN10));Nr*=$e*a.roundUp(Dt/$e,[2,5,10]),(Math.abs(pt.start)/pt.size+1e-6)%1<2e-6&&(Fr.tick0=0)}Fr.dtick=Nr}Fr.domain=V?[pr+ie/ce.h,pr+Ye-ie/ce.h]:[pr+W/ce.w,pr+Ye-W/ce.w],Fr.setScale(),D.attr("transform",l(Math.round(ce.l),Math.round(ce.t)));var ot=D.select("."+b.cbtitleunshift).attr("transform",l(-Math.round(ce.l),-Math.round(ce.t))),De=Fr.ticklabelposition,Ee=Fr.title.font.size,Ae=D.select("."+b.cbaxis),Ie,tt=0,st=0;function Ft(Mr,Sr){var Kr={propContainer:Fr,propName:B._propPrefix+"title.text",traceIndex:B._traceIndex,_meta:B._meta,placeholder:Y._dfltTitle.colorbar,containerGroup:D.select("."+b.cbtitle)},qn=Mr.charAt(0)==="h"?Mr.substr(1):"h"+Mr;D.selectAll("."+qn+",."+qn+"-math-group").remove(),d.draw(U,Mr,i(Kr,Sr||{}))}function Nt(){if(V&&cn||!V&&!cn){var Mr,Sr;ze==="top"&&(Mr=W+ce.l+mt*se,Sr=ie+ce.t+bt*(1-pr-Ye)+3+Ee*.75),ze==="bottom"&&(Mr=W+ce.l+mt*se,Sr=ie+ce.t+bt*(1-pr)-3-Ee*.25),ze==="right"&&(Sr=ie+ce.t+bt*ee+3+Ee*.75,Mr=W+ce.l+mt*pr),Ft(Fr._id+"title",{attributes:{x:Mr,y:Sr,"text-anchor":V?"start":"middle"}})}}function Xt(){if(V&&!cn||!V&&cn){var Mr=Fr.position||0,Sr=Fr._offset+Fr._length/2,Kr,qn;if(ze==="right")qn=Sr,Kr=ce.l+mt*Mr+10+Ee*(Fr.showticklabels?1:.5);else if(Kr=Sr,ze==="bottom"&&(qn=ce.t+bt*Mr+10+(De.indexOf("inside")===-1?Fr.tickfont.size:0)+(Fr.ticks!=="inside"&&B.ticklen||0)),ze==="top"){var ha=Le.text.split("<br>").length;qn=ce.t+bt*Mr+10-Fe-T*Ee*ha}Ft((V?"h":"v")+Fr._id+"title",{avoid:{selection:v.select(U).selectAll("g."+Fr._id+"tick"),side:ze,offsetTop:V?0:ce.t,offsetLeft:V?ce.l:0,maxShift:V?Y.width:Y.height},attributes:{x:Kr,y:qn,"text-anchor":"middle"},transform:{rotate:V?-90:0,offset:0}})}}function lr(){if(!V&&!cn||V&&cn){var Mr=D.select("."+b.cbtitle),Sr=Mr.select("text"),Kr=[-J/2,J/2],qn=Mr.select(".h"+Fr._id+"title-math-group").node(),ha=15.6;Sr.node()&&(ha=parseInt(Sr.node().style.fontSize,10)*T);var ia;if(qn?(ia=o.bBox(qn),st=ia.width,tt=ia.height,tt>ha&&(Kr[1]-=(tt-ha)/2)):Sr.node()&&!Sr.classed(b.jsPlaceholder)&&(ia=o.bBox(Sr.node()),st=ia.width,tt=ia.height),V){if(tt){if(tt+=5,ze==="top")Fr.domain[1]-=tt/ce.h,Kr[1]*=-1;else{Fr.domain[0]+=tt/ce.h;var xa=h.lineCount(Sr);Kr[1]+=(1-xa)*ha}Mr.attr("transform",l(Kr[0],Kr[1])),Fr.setScale()}}else st&&(ze==="right"&&(Fr.domain[0]+=(st+Ee/2)/ce.w),Mr.attr("transform",l(Kr[0],Kr[1])),Fr.setScale())}D.selectAll("."+b.cbfills+",."+b.cblines).attr("transform",V?l(0,Math.round(ce.h*(1-Fr.domain[1]))):l(Math.round(ce.w*Fr.domain[0]),0)),Ae.attr("transform",V?l(0,Math.round(-ce.t)):l(Math.round(-ce.l),0));var ba=D.select("."+b.cbfills).selectAll("rect."+b.cbfill).attr("style","").data(ht);ba.enter().append("rect").classed(b.cbfill,!0).attr("style",""),ba.exit().remove();var ea=Ge.map(Fr.c2p).map(Math.round).sort(function(yr,br){return yr-br});ba.each(function(yr,br){var nn=[br===0?Ge[0]:(ht[br]+ht[br-1])/2,br===ht.length-1?Ge[1]:(ht[br]+ht[br+1])/2].map(Fr.c2p).map(Math.round);V&&(nn[1]=a.constrain(nn[1]+(nn[1]>nn[0])?1:-1,ea[0],ea[1]));var wn=v.select(this).attr(V?"x":"y",ft).attr(V?"y":"x",v.min(nn)).attr(V?"width":"height",Math.max(Fe,2)).attr(V?"height":"width",Math.max(v.max(nn)-v.min(nn),2));if(B._fillgradient)o.gradient(wn,U,B._id,V?"vertical":"horizontalreversed",B._fillgradient,"fill");else{var Ln=rt(yr).replace("e-","");wn.attr("fill",w(Ln).toHexString())}});var Za=D.select("."+b.cblines).selectAll("path."+b.cbline).data(_e.color&&_e.width?lt:[]);Za.enter().append("path").classed(b.cbline,!0),Za.exit().remove(),Za.each(function(yr){var br=ft,nn=Math.round(Fr.c2p(yr))+_e.width/2%1;v.select(this).attr("d","M"+(V?br+","+nn:nn+","+br)+(V?"h":"v")+Fe).call(o.lineGroupStyle,_e.width,Ve(yr),_e.dash)}),Ae.selectAll("g."+Fr._id+"tick,path").remove();var ui=ft+Fe+(J||0)/2-(B.ticks==="outside"?1:0),_r=t.calcTicks(Fr),Qt=t.getTickSigns(Fr)[2];return t.drawTicks(U,Fr,{vals:Fr.ticks==="inside"?t.clipEnds(Fr,_r):_r,layer:Ae,path:t.makeTickPath(Fr,ui,Qt),transFn:t.makeTransTickFn(Fr)}),t.drawLabels(U,Fr,{vals:_r,layer:Ae,transFn:t.makeTransTickLabelFn(Fr),labelFns:t.makeLabelFns(Fr,ui)})}function Rr(){var Mr,Sr=Fe+J/2;De.indexOf("inside")===-1&&(Mr=o.bBox(Ae.node()),Sr+=V?Mr.width:Mr.height),Ie=ot.select("text");var Kr=0,qn=V&&ze==="top",ha=!V&&ze==="right",ia=0;if(Ie.node()&&!Ie.classed(b.jsPlaceholder)){var xa,ba=ot.select(".h"+Fr._id+"title-math-group").node();ba&&(V&&cn||!V&&!cn)?(Mr=o.bBox(ba),Kr=Mr.width,xa=Mr.height):(Mr=o.bBox(ot.node()),Kr=Mr.right-ce.l-(V?ft:Br),xa=Mr.bottom-ce.t-(V?Br:ft),!V&&ze==="top"&&(Sr+=Mr.height,ia=Mr.height)),ha&&(Ie.attr("transform",l(Kr/2+Ee/2,0)),Kr*=2),Sr=Math.max(Sr,V?Kr:xa)}var ea=(V?W:ie)*2+Sr+le+J/2,Za=0;!V&&Le.text&&me==="bottom"&&ee<=0&&(Za=ea/2,ea+=Za,ia+=Za),Y._hColorbarMoveTitle=Za,Y._hColorbarMoveCBTitle=ia;var ui=le+J,_r=(V?ft:Br)-ui/2-(V?W:0),Qt=(V?Br:ft)-(V?be:ie+ia-Za);D.select("."+b.cbbg).attr("x",_r).attr("y",Qt).attr(V?"width":"height",Math.max(ea-Za,2)).attr(V?"height":"width",Math.max(be+ui,2)).call(u.fill,ye).call(u.stroke,B.bordercolor).style("stroke-width",le);var yr=ha?Math.max(Kr-10,0):0;D.selectAll("."+b.cboutline).attr("x",(V?ft:Br+W)+yr).attr("y",(V?Br+ie-be:ft)+(qn?tt:0)).attr(V?"width":"height",Math.max(Fe,2)).attr(V?"height":"width",Math.max(be-(V?2*ie+tt:2*W+yr),2)).call(u.stroke,B.outlinecolor).style({fill:"none","stroke-width":J});var br=V?Wt*ea:0,nn=V?0:(1-Zt)*ea-ia;if(br=oe?ce.l-br:-br,nn=pe?ce.t-nn:-nn,D.attr("transform",l(br,nn)),!V&&(le||w(ye).getAlpha()&&!w.equals(Y.paper_bgcolor,ye))){var wn=Ae.selectAll("text"),Ln=wn[0].length,Fn=D.select("."+b.cbbg).node(),va=o.bBox(Fn),Da=o.getTranslate(D),Pa=2;wn.each(function(tn,Xr){var en=0,Tn=Ln-1;if(Xr===en||Xr===Tn){var hn=o.bBox(this),Rt=o.getTranslate(this),xr;if(Xr===Tn){var Wr=hn.right+Rt.x,An=va.right+Da.x+Br-le-Pa+se;xr=An-Wr,xr>0&&(xr=0)}else if(Xr===en){var Xn=hn.left+Rt.x,na=va.left+Da.x+Br+le+Pa;xr=na-Xn,xr<0&&(xr=0)}xr&&(Ln<3?this.setAttribute("transform","translate("+xr+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Fa={},$a=M[de],oa=k[de],zi=M[me],Gi=k[me],qt=ea-Fe;V?(z==="pixels"?(Fa.y=ee,Fa.t=be*zi,Fa.b=be*Gi):(Fa.t=Fa.b=0,Fa.yt=ee+q*zi,Fa.yb=ee-q*Gi),G==="pixels"?(Fa.x=se,Fa.l=ea*$a,Fa.r=ea*oa):(Fa.l=qt*$a,Fa.r=qt*oa,Fa.xl=se-H*$a,Fa.xr=se+H*oa)):(z==="pixels"?(Fa.x=se,Fa.l=be*$a,Fa.r=be*oa):(Fa.l=Fa.r=0,Fa.xl=se+q*$a,Fa.xr=se-q*oa),G==="pixels"?(Fa.y=1-ee,Fa.t=ea*zi,Fa.b=ea*Gi):(Fa.t=qt*zi,Fa.b=qt*Gi,Fa.yt=ee-H*zi,Fa.yb=ee+H*Gi));var Ct=B.y<.5?"b":"t",Ur=B.x<.5?"l":"r";U._fullLayout._reservedMargin[B._id]={};var Qr={r:Y.width-_r-br,l:_r+Fa.r,b:Y.height-Qt-nn,t:Qt+Fa.b};oe&&pe?C.autoMargin(U,B._id,Fa):oe?U._fullLayout._reservedMargin[B._id][Ct]=Qr[Ct]:pe||V?U._fullLayout._reservedMargin[B._id][Ur]=Qr[Ur]:U._fullLayout._reservedMargin[B._id][Ct]=Qr[Ct]}return a.syncOrAsync([C.previousPromises,Nt,lr,Xt,C.previousPromises,Rr],U)}function p(D,B,U){var V=B.orientation==="v",q=U._fullLayout,z=q._size,H,G,J;r.init({element:D.node(),gd:U,prepFn:function(){H=D.attr("transform"),s(D)},moveFn:function(le,ye){D.attr("transform",H+l(le,ye)),G=r.align((V?B._uFrac:B._vFrac)+le/z.w,V?B._thickFrac:B._lenFrac,0,1,B.xanchor),J=r.align((V?B._vFrac:1-B._uFrac)-ye/z.h,V?B._lenFrac:B._thickFrac,0,1,B.yanchor);var de=r.getCursor(G,J,B.xanchor,B.yanchor);s(D,de)},doneFn:function(){if(s(D),G!==void 0&&J!==void 0){var le={};le[B._propPrefix+"x"]=G,le[B._propPrefix+"y"]=J,B._traceIndex!==void 0?P.call("_guiRestyle",U,le,B._traceIndex):P.call("_guiRelayout",U,le)}}})}function x(D,B,U){var V=B._levels,q=[],z=[],H,G,J=V.end+V.size/100,le=V.size,ye=1.001*U[0]-.001*U[1],de=1.001*U[1]-.001*U[0];for(G=0;G<1e5&&(H=V.start+G*le,!(le>0?H>=J:H<=J));G++)H>ye&&H<de&&q.push(H);if(B._fillgradient)z=[0];else if(typeof B._fillcolor=="function"){var me=B._filllevels;if(me)for(J=me.end+me.size/100,le=me.size,G=0;G<1e5&&(H=me.start+G*le,!(le>0?H>=J:H<=J));G++)H>U[0]&&H<U[1]&&z.push(H);else z=q.map(function(W){return W-V.size/2}),z.push(z[z.length-1]+V.size)}else B._fillcolor&&typeof B._fillcolor=="string"&&(z=[0]);return V.size<0&&(q.reverse(),z.reverse()),{line:q,fill:z}}function N(D,B,U){var V=D._fullLayout,q=B.orientation==="v",z={type:"linear",range:U,tickmode:B.tickmode,nticks:B.nticks,tick0:B.tick0,dtick:B.dtick,tickvals:B.tickvals,ticktext:B.ticktext,ticks:B.ticks,ticklen:B.ticklen,tickwidth:B.tickwidth,tickcolor:B.tickcolor,showticklabels:B.showticklabels,labelalias:B.labelalias,ticklabelposition:B.ticklabelposition,ticklabeloverflow:B.ticklabeloverflow,ticklabelstep:B.ticklabelstep,tickfont:B.tickfont,tickangle:B.tickangle,tickformat:B.tickformat,exponentformat:B.exponentformat,minexponent:B.minexponent,separatethousands:B.separatethousands,showexponent:B.showexponent,showtickprefix:B.showtickprefix,tickprefix:B.tickprefix,showticksuffix:B.showticksuffix,ticksuffix:B.ticksuffix,title:B.title,showline:!0,anchor:"free",side:q?"right":"bottom",position:1},H=q?"y":"x",G={type:"linear",_id:H+B._id},J={letter:H,font:V.font,noAutotickangles:H==="y",noHover:!0,noTickson:!0,noTicklabelmode:!0,noInsideRange:!0,calendar:V.calendar};function le(ye,de){return a.coerce(z,G,c,ye,de)}return m(z,G,le,J,V),E(z,G,le,J),G}Z.exports={draw:A}}}),PA=Ne({"src/components/colorbar/index.js"(te,Z){Z.exports={moduleType:"component",name:"colorbar",attributes:wx(),supplyDefaults:Lw(),draw:kA().draw,hasColorbar:tA()}}}),Fx=Ne({"src/components/legend/index.js"(te,Z){Z.exports={moduleType:"component",name:"legend",layoutAttributes:nM(),supplyLayoutDefaults:aM(),draw:lM(),style:sM()}}}),Bx=Ne({"src/locale-en.js"(te,Z){Z.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"}}}}),RM=Ne({"src/locale-en-us.js"(te,Z){Z.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),LA=Ne({"src/snapshot/cloneplot.js"(te,Z){var v=Xo(),w=In(),C=w.extendFlat,P=w.extendDeep;function t(a){var l;switch(a){case"themes__thumb":l={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":l={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:l={}}return l}function r(a){var l=["xaxis","yaxis","zaxis"];return l.indexOf(a.slice(0,5))>-1}Z.exports=function(l,i){var s,o=l.data,u=l.layout,d=P([],o),h=P({},u,t(i.tileClass)),y=l._context||{};if(i.width&&(h.width=i.width),i.height&&(h.height=i.height),i.tileClass==="thumbnail"||i.tileClass==="themes__thumb"){h.annotations=[];var m=Object.keys(h);for(s=0;s<m.length;s++)r(m[s])&&(h[m[s]].title={text:""});for(s=0;s<d.length;s++){var E=d[s];E.showscale=!1,E.marker&&(E.marker.showscale=!1),v.traceIs(E,"pie-like")&&(E.textposition="none")}}if(Array.isArray(i.annotations))for(s=0;s<i.annotations.length;s++)h.annotations.push(i.annotations[s]);var c=Object.keys(h).filter(function(b){return b.match(/^scene\d*$/)});if(c.length){var _={};for(i.tileClass==="thumbnail"&&(_={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),s=0;s<c.length;s++){var T=h[c[s]];T.xaxis||(T.xaxis={}),T.yaxis||(T.yaxis={}),T.zaxis||(T.zaxis={}),C(T.xaxis,_),C(T.yaxis,_),C(T.zaxis,_),T._scene=null}}var M=document.createElement("div");i.tileClass&&(M.className=i.tileClass);var k={gd:M,td:M,layout:h,data:d,config:{staticPlot:i.staticPlot===void 0?!0:i.staticPlot,plotGlPixelRatio:i.plotGlPixelRatio===void 0?2:i.plotGlPixelRatio,displaylogo:i.displaylogo||!1,showLink:i.showLink||!1,showTips:i.showTips||!1,mapboxAccessToken:y.mapboxAccessToken}};return i.setBackground!=="transparent"&&(k.config.setBackground=i.setBackground||"opaque"),k.gd.defaultLayout=t(i.tileClass),k}}}),K1=Ne({"src/snapshot/toimage.js"(te,Z){var v=F0().EventEmitter,w=Xo(),C=In(),P=i0(),t=LA(),r=Hp(),a=q1();function l(i,s){var o=new v,u=t(i,{format:"png"}),d=u.gd;d.style.position="absolute",d.style.left="-5000px",document.body.appendChild(d);function h(){var m=P.getDelay(d._fullLayout);setTimeout(function(){var E=r(d),c=document.createElement("canvas");c.id=C.randstr(),o=a({format:s.format,width:d._fullLayout.width,height:d._fullLayout.height,canvas:c,emitter:o,svg:E}),o.clean=function(){d&&document.body.removeChild(d)}},m)}var y=P.getRedrawFunc(d);return w.call("_doPlot",d,u.data,u.layout,u.config).then(y).then(h).catch(function(m){o.emit("error",m)}),o}Z.exports=l}}),Kw=Ne({"src/snapshot/index.js"(te,Z){var v=i0(),w={getDelay:v.getDelay,getRedrawFunc:v.getRedrawFunc,clone:LA(),toSVG:Hp(),svgToImg:q1(),toImage:K1(),downloadImage:kx()};Z.exports=w}}),IM=Ne({"src/core.js"(te){te.version=dn().version,Jn(),_L();var Z=Xo(),v=te.register=Z.register,w=mA(),C=Object.keys(w);for(t=0;t<C.length;t++)P=C[t],P.charAt(0)!=="_"&&(te[P]=w[P]),v({moduleType:"apiMethod",name:P,fn:w[P]});var P,t;v(AM()),v([ky(),Ig(),fh(),zL(),Rx(),FL(),CM(),zg(),zx(),EA(),Dy(),Dc(),PA(),Fx(),nh(),hA()]),v([Bx(),RM()]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(v(window.PlotlyLocales),delete window.PlotlyLocales),te.Icons=Dw();var r=nh(),a=uf();te.Plots={resize:a.resize,graphJson:a.graphJson,sendDataToCloud:a.sendDataToCloud},te.Fx={hover:r.hover,unhover:r.unhover,loneHover:r.loneHover,loneUnhover:r.loneUnhover},te.Snapshot=Kw(),te.PlotSchema=B1()}}),RA=Ne({"lib/core.js"(te,Z){Z.exports=IM()}}),Oy=Ne({"src/traces/bar/constants.js"(te,Z){Z.exports={TEXTPAD:3,eventDataKeys:["value","label"]}}}),rd=Ne({"src/traces/bar/attributes.js"(te,Z){var v=Jc(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,texttemplateAttrs:P,templatefallbackAttrs:t}=Il(),r=Vu(),a=$o(),l=Oy(),i=Dd().pattern,s=co().extendFlat,o=a({editType:"calc",arrayOk:!0,colorEditType:"style"}),u=v.marker,d=u.line,h=s({},d.width,{dflt:0}),y=s({width:h,editType:"calc"},r("marker.line")),m=s({line:y,editType:"calc"},r("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:i,cornerradius:{valType:"any",editType:"calc"}});Z.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:w("x"),yhoverformat:w("y"),text:v.text,texttemplate:P({editType:"plot"},{keys:l.eventDataKeys}),texttemplatefallback:t({editType:"plot"}),hovertext:v.hovertext,hovertemplate:C({},{keys:l.eventDataKeys}),hovertemplatefallback:t(),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:s({},o,{}),insidetextfont:s({},o,{}),outsidetextfont:s({},o,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:s({},v.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:m,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:{marker:{opacity:v.selected.marker.opacity,color:v.selected.marker.color,editType:"style"},textfont:v.selected.textfont,editType:"style"},unselected:{marker:{opacity:v.unselected.marker.opacity,color:v.unselected.marker.color,editType:"style"},textfont:v.unselected.textfont,editType:"style"},zorder:v.zorder}}}),dp=Ne({"src/traces/bar/layout_attributes.js"(te,Z){Z.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"}}}}),s0=Ne({"src/traces/bar/style_defaults.js"(te,Z){var v=io(),w=Od().hasColorscale,C=Ph(),P=In().coercePattern;Z.exports=function(r,a,l,i,s){var o=l("marker.color",i),u=w(r,"marker");u&&C(r,a,s,l,{prefix:"marker.",cLetter:"c"}),l("marker.line.color",v.defaultLine),w(r,"marker.line")&&C(r,a,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width"),l("marker.opacity"),P(l,"marker.pattern",o,u),l("selected.marker.color"),l("unselected.marker.color")}}}),vp=Ne({"src/traces/bar/defaults.js"(te,Z){var v=la(),w=In(),C=io(),P=Xo(),t=Lm(),r=Rm(),a=s0(),l=j0(),i=rd(),s=w.coerceFont;function o(y,m,E,c){function _(A,g){return w.coerce(y,m,i,A,g)}var T=t(y,m,c,_);if(!T){m.visible=!1;return}r(y,m,c,_),_("xhoverformat"),_("yhoverformat"),_("zorder"),_("orientation",m.x&&!m.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var M=_("textposition");h(y,m,c,_,M,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),a(y,m,_,E,c);var k=(m.marker.line||{}).color,b=P.getComponentMethod("errorbars","supplyDefaults");b(y,m,k||C.defaultLine,{axis:"y"}),b(y,m,k||C.defaultLine,{axis:"x",inherit:"y"}),w.coerceSelectionMarkerOpacity(m,_)}function u(y,m){var E,c;function _(k,b){return w.coerce(c._input,c,i,k,b)}for(var T=0;T<y.length;T++)if(c=y[T],c.type==="bar"){E=c._input;var M=_("marker.cornerradius",m.barcornerradius);c.marker&&(c.marker.cornerradius=d(M)),l(E,c,m,_,m.barmode)}}function d(y){if(v(y)){if(y=+y,y>=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&v(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function h(y,m,E,c,_,T){T=T||{};var M=T.moduleHasSelected!==!1,k=T.moduleHasUnselected!==!1,b=T.moduleHasConstrain!==!1,A=T.moduleHasCliponaxis!==!1,g=T.moduleHasTextangle!==!1,f=T.moduleHasInsideanchor!==!1,p=!!T.hasPathbar,x=Array.isArray(_)||_==="auto",N=x||_==="inside",D=x||_==="outside";if(N||D){var B=s(c,"textfont",E.font),U=w.extendFlat({},B),V=y.textfont&&y.textfont.color,q=!V;if(q&&delete U.color,s(c,"insidetextfont",U),p){var z=w.extendFlat({},B);q&&delete z.color,s(c,"pathbar.textfont",z)}D&&s(c,"outsidetextfont",B),M&&c("selected.textfont.color"),k&&c("unselected.textfont.color"),b&&c("constraintext"),A&&c("cliponaxis"),g&&c("textangle"),c("texttemplate"),c("texttemplatefallback")}N&&f&&c("insidetextanchor")}Z.exports={supplyDefaults:o,crossTraceDefaults:u,handleText:h,validateCornerradius:d}}}),IA=Ne({"src/traces/bar/layout_defaults.js"(te,Z){var v=Xo(),w=Os(),C=In(),P=dp(),t=vp().validateCornerradius;Z.exports=function(r,a,l){function i(M,k){return C.coerce(r,a,P,M,k)}for(var s=!1,o=!1,u=!1,d={},h=i("barmode"),y=h==="group",m=0;m<l.length;m++){var E=l[m];if(v.traceIs(E,"bar")&&E.visible)s=!0;else continue;var c=E.xaxis+E.yaxis;if(y?(d[c]&&(u=!0),d[c]=!0):(c+=E._input.offsetgroup,d.length>0&&!d[c]&&(u=!0),d[c]=!0),E.visible&&E.type==="histogram"){var _=w.getFromId({_fullLayout:a},E[E.orientation==="v"?"xaxis":"yaxis"]);_.type!=="category"&&(o=!0)}}if(!s){delete a.barmode;return}h!=="overlay"&&i("barnorm"),i("bargap",o&&!u?0:.2),i("bargroupgap");var T=i("barcornerradius");a.barcornerradius=t(T)}}}),Nm=Ne({"src/traces/bar/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.hovertext,C,"htx");var r=P.marker;if(r){v.mergeArray(r.opacity,C,"mo",!0),v.mergeArray(r.color,C,"mc");var a=r.line;a&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"))}}}}),$p=Ne({"src/traces/bar/calc.js"(te,Z){var v=Os(),w=Dm(),C=Od().hasColorscale,P=Nd(),t=Nm(),r=Vh();Z.exports=function(l,i){var s=v.getFromId(l,i.xaxis||"x"),o=v.getFromId(l,i.yaxis||"y"),u,d,h,y,m,E,c={msUTC:!!(i.base||i.base===0)};i.orientation==="h"?(u=s.makeCalcdata(i,"x",c),h=o.makeCalcdata(i,"y"),y=w(i,o,"y",h),m=!!i.yperiodalignment,E="y"):(u=o.makeCalcdata(i,"y",c),h=s.makeCalcdata(i,"x"),y=w(i,s,"x",h),m=!!i.xperiodalignment,E="x"),d=y.vals;for(var _=Math.min(d.length,u.length),T=new Array(_),M=0;M<_;M++)T[M]={p:d[M],s:u[M]},m&&(T[M].orig_p=h[M],T[M][E+"End"]=y.ends[M],T[M][E+"Start"]=y.starts[M]),i.ids&&(T[M].id=String(i.ids[M]));return C(i,"marker")&&P(l,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),C(i,"marker.line")&&P(l,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(T,i),r(T,i),T}}}),mc=Ne({"src/traces/bar/uniform_text.js"(te,Z){var v=xn(),w=In();function C(a,l,i){var s=a._fullLayout,o=s["_"+i+"Text_minsize"];if(o){var u=s.uniformtext.mode==="hide",d;switch(i){case"funnelarea":case"pie":case"sunburst":d="g.slice";break;case"treemap":case"icicle":d="g.slice, g.pathbar";break;default:d="g.points > g.point"}l.selectAll(d).each(function(h){var y=h.transform;if(y){y.scale=u&&y.hide?0:o/y.fontSize;var m=v.select(this).select("text");w.setTransormAndDisplay(m,y)}})}}function P(a,l,i){if(i.uniformtext.mode){var s=r(a),o=i.uniformtext.minsize,u=l.scale*l.fontSize;l.hide=u<o,i[s]=i[s]||1/0,l.hide||(i[s]=Math.min(i[s],Math.max(u,o)))}}function t(a,l){var i=r(a);l[i]=void 0}function r(a){return"_"+a+"Text_minsize"}Z.exports={recordMinTextSize:P,clearMinTextSize:t,resizeText:C}}}),J1=Ne({"src/traces/bar/helpers.js"(te){var Z=la(),v=Ro(),w=In().isArrayOrTypedArray;te.coerceString=function(C,P,t){if(typeof P=="string"){if(P||!C.noBlank)return P}else if((typeof P=="number"||P===!0)&&!C.strict)return String(P);return t!==void 0?t:C.dflt},te.coerceNumber=function(C,P,t){if(Z(P)){P=+P;var r=C.min,a=C.max,l=r!==void 0&&P<r||a!==void 0&&P>a;if(!l)return P}return t!==void 0?t:C.dflt},te.coerceColor=function(C,P,t){return v(P).isValid()?P:t!==void 0?t:C.dflt},te.coerceEnumerated=function(C,P,t){return C.coerceNumber&&(P=+P),C.values.indexOf(P)!==-1?P:t!==void 0?t:C.dflt},te.getValue=function(C,P){var t;return w(C)?P<C.length&&(t=C[P]):t=C,t},te.getLineWidth=function(C,P){var t=0<P.mlw?P.mlw:w(C.marker.line.width)?0:C.marker.line.width;return t}}}),Fd=Ne({"src/traces/bar/style.js"(te,Z){var v=xn(),w=io(),C=zs(),P=In(),t=Xo(),r=mc().resizeText,a=rd(),l=a.textfont,i=a.insidetextfont,s=a.outsidetextfont,o=J1();function u(A){var g=v.select(A).selectAll('g[class^="barlayer"]').selectAll("g.trace");r(A,g,"bar");var f=g.size(),p=A._fullLayout;g.style("opacity",function(x){return x[0].trace.opacity}).each(function(x){(p.barmode==="stack"&&f>1||p.bargap===0&&p.bargroupgap===0&&!x[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),g.selectAll("g.points").each(function(x){var N=v.select(this),D=x[0].trace;d(N,D,A)}),t.getComponentMethod("errorbars","style")(g)}function d(A,g,f){C.pointStyle(A.selectAll("path"),g,f),h(A,g,f)}function h(A,g,f){A.selectAll("text").each(function(p){var x=v.select(this),N=P.ensureUniformFontSize(f,c(x,p,g,f));C.font(x,N)})}function y(A,g,f){var p=g[0].trace;p.selectedpoints?m(f,p,A):(d(f,p,A),t.getComponentMethod("errorbars","style")(f))}function m(A,g,f){C.selectedPointStyle(A.selectAll("path"),g),E(A.selectAll("text"),g,f)}function E(A,g,f){A.each(function(p){var x=v.select(this),N;if(p.selected){N=P.ensureUniformFontSize(f,c(x,p,g,f));var D=g.selected.textfont&&g.selected.textfont.color;D&&(N.color=D),C.font(x,N)}else C.selectedTextStyle(x,g)})}function c(A,g,f,p){var x=p._fullLayout.font,N=f.textfont;if(A.classed("bartext-inside")){var D=b(g,f);N=T(f,g.i,x,D)}else A.classed("bartext-outside")&&(N=M(f,g.i,x));return N}function _(A,g,f){return k(l,A.textfont,g,f)}function T(A,g,f,p){var x=_(A,g,f),N=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[g]===void 0;return N&&(x={color:w.contrast(p),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),k(i,A.insidetextfont,g,x)}function M(A,g,f){var p=_(A,g,f);return k(s,A.outsidetextfont,g,p)}function k(A,g,f,p){g=g||{};var x=o.getValue(g.family,f),N=o.getValue(g.size,f),D=o.getValue(g.color,f),B=o.getValue(g.weight,f),U=o.getValue(g.style,f),V=o.getValue(g.variant,f),q=o.getValue(g.textcase,f),z=o.getValue(g.lineposition,f),H=o.getValue(g.shadow,f);return{family:o.coerceString(A.family,x,p.family),size:o.coerceNumber(A.size,N,p.size),color:o.coerceColor(A.color,D,p.color),weight:o.coerceString(A.weight,B,p.weight),style:o.coerceString(A.style,U,p.style),variant:o.coerceString(A.variant,V,p.variant),textcase:o.coerceString(A.variant,q,p.textcase),lineposition:o.coerceString(A.variant,z,p.lineposition),shadow:o.coerceString(A.variant,H,p.shadow)}}function b(A,g){return g.type==="waterfall"?g[A.dir].marker.color:A.mcc||A.mc||g.marker.color}Z.exports={style:u,styleTextPoints:h,styleOnSelect:y,getInsideTextFont:T,getOutsideTextFont:M,getBarColor:b,resizeText:r}}}),hu=Ne({"src/traces/bar/plot.js"(te,Z){var v=xn(),w=la(),C=In(),P=uc(),t=io(),r=zs(),a=Xo(),l=Os().tickText,i=mc(),s=i.recordMinTextSize,o=i.clearMinTextSize,u=Fd(),d=J1(),h=Oy(),y=rd(),m=y.text,E=y.textposition,c=_v().appendArrayPointValue,_=h.TEXTPAD;function T(le){return le.id}function M(le){if(le.ids)return T}function k(le){return(le>0)-(le<0)}function b(le,ye){return le<ye?1:-1}function A(le,ye,de,me){var W=[],ie=[],se=me?ye:de,ee=me?de:ye;return W[0]=se.c2p(le.s0,!0),ie[0]=ee.c2p(le.p0,!0),W[1]=se.c2p(le.s1,!0),ie[1]=ee.c2p(le.p1,!0),me?[W,ie]:[ie,W]}function g(le,ye,de,me){if(!ye.uniformtext.mode&&f(de)){var W;return me&&(W=me()),le.transition().duration(de.duration).ease(de.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()})}else return le}function f(le){return le&&le.duration>0}function p(le,ye,de,me,W,ie){var se=ye.xaxis,ee=ye.yaxis,pe=le._fullLayout,oe=le._context.staticPlot;W||(W={mode:pe.barmode,norm:pe.barmode,gap:pe.bargap,groupgap:pe.bargroupgap},o("bar",pe));var Y=C.makeTraceGroups(me,de,"trace bars").each(function(ce){var ue=v.select(this),_e=ce[0].trace,Le=ce[0].t,ze=_e.type==="waterfall",Ge=_e.type==="funnel",Ve=_e.type==="histogram",rt=_e.type==="bar",pt=rt||Ge,gt=0;ze&&_e.connector.visible&&_e.connector.mode==="between"&&(gt=_e.connector.line.width/2);var ht=_e.orientation==="h",lt=f(W),Fe=C.ensureSingle(ue,"g","points"),Pe=M(_e),be=Fe.selectAll("g.point").data(C.identity,Pe);be.enter().append("g").classed("point",!0),be.exit().remove(),be.each(function(mt,bt){var ft=v.select(this),Wt=A(mt,se,ee,ht),Zt=Wt[0][0],cr=Wt[0][1],pr=Wt[1][0],Br=Wt[1][1],Fr=(ht?cr-Zt:Br-pr)===0;Fr&&pt&&d.getLineWidth(_e,mt)&&(Fr=!1),Fr||(Fr=!w(Zt)||!w(cr)||!w(pr)||!w(Br)),mt.isBlank=Fr,Fr&&(ht?cr=Zt:Br=pr),gt&&!Fr&&(ht?(Zt-=b(Zt,cr)*gt,cr+=b(Zt,cr)*gt):(pr-=b(pr,Br)*gt,Br+=b(pr,Br)*gt));var cn,Nr;if(_e.type==="waterfall"){if(!Fr){var Jr=_e[mt.dir].marker;cn=Jr.line.width,Nr=Jr.color}}else cn=d.getLineWidth(_e,mt),Nr=mt.mc||_e.marker.color;function Dt(ui){var _r=v.round(cn/2%1,2);return W.gap===0&&W.groupgap===0?v.round(Math.round(ui)-_r,2):ui}function $e(ui,_r,Qt){return Qt&&ui===_r?ui:Math.abs(ui-_r)>=2?Dt(ui):ui>_r?Math.ceil(ui):Math.floor(ui)}var ot=t.opacity(Nr),De=ot<1||cn>.01?Dt:$e;le._context.staticPlot||(Zt=De(Zt,cr,ht),cr=De(cr,Zt,ht),pr=De(pr,Br,!ht),Br=De(Br,pr,!ht));var Ee=ht?se.c2p:ee.c2p,Ae;mt.s0>0?Ae=mt._sMax:mt.s0<0?Ae=mt._sMin:Ae=mt.s1>0?mt._sMax:mt._sMin;function Ie(ui,_r){if(!ui)return 0;var Qt=Math.abs(ht?Br-pr:cr-Zt),yr=Math.abs(ht?cr-Zt:Br-pr),br=De(Math.abs(Ee(Ae,!0)-Ee(0,!0))),nn=mt.hasB?Math.min(Qt/2,yr/2):Math.min(Qt/2,br),wn;if(_r==="%"){var Ln=Math.min(50,ui);wn=Qt*(Ln/100)}else wn=ui;return De(Math.max(Math.min(wn,nn),0))}var tt=rt||Ve?Ie(Le.cornerradiusvalue,Le.cornerradiusform):0,st,Ft,Nt="M"+Zt+","+pr+"V"+Br+"H"+cr+"V"+pr+"Z",Xt=0;if(tt&&mt.s){var lr=k(mt.s0)===0||k(mt.s)===k(mt.s0)?mt.s1:mt.s0;if(Xt=De(mt.hasB?0:Math.abs(Ee(Ae,!0)-Ee(lr,!0))),Xt<tt){var Rr=b(Zt,cr),Mr=b(pr,Br),Sr=Rr===-Mr?1:0;if(ht)if(mt.hasB)st="M"+(Zt+tt*Rr)+","+pr+"A "+tt+","+tt+" 0 0 "+Sr+" "+Zt+","+(pr+tt*Mr)+"V"+(Br-tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(Zt+tt*Rr)+","+Br+"H"+(cr-tt*Rr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+cr+","+(Br-tt*Mr)+"V"+(pr+tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(cr-tt*Rr)+","+pr+"Z";else{Ft=Math.abs(cr-Zt)+Xt;var Kr=Ft<tt?tt-Math.sqrt(Ft*(2*tt-Ft)):0,qn=Xt>0?Math.sqrt(Xt*(2*tt-Xt)):0,ha=Rr>0?Math.max:Math.min;st="M"+Zt+","+pr+"V"+(Br-Kr*Mr)+"H"+ha(cr-(tt-Xt)*Rr,Zt)+"A "+tt+","+tt+" 0 0 "+Sr+" "+cr+","+(Br-tt*Mr-qn)+"V"+(pr+tt*Mr+qn)+"A "+tt+","+tt+" 0 0 "+Sr+" "+ha(cr-(tt-Xt)*Rr,Zt)+","+(pr+Kr*Mr)+"Z"}else if(mt.hasB)st="M"+(Zt+tt*Rr)+","+pr+"A "+tt+","+tt+" 0 0 "+Sr+" "+Zt+","+(pr+tt*Mr)+"V"+(Br-tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(Zt+tt*Rr)+","+Br+"H"+(cr-tt*Rr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+cr+","+(Br-tt*Mr)+"V"+(pr+tt*Mr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(cr-tt*Rr)+","+pr+"Z";else{Ft=Math.abs(Br-pr)+Xt;var ia=Ft<tt?tt-Math.sqrt(Ft*(2*tt-Ft)):0,xa=Xt>0?Math.sqrt(Xt*(2*tt-Xt)):0,ba=Mr>0?Math.max:Math.min;st="M"+(Zt+ia*Rr)+","+pr+"V"+ba(Br-(tt-Xt)*Mr,pr)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(Zt+tt*Rr-xa)+","+Br+"H"+(cr-tt*Rr+xa)+"A "+tt+","+tt+" 0 0 "+Sr+" "+(cr-ia*Rr)+","+ba(Br-(tt-Xt)*Mr,pr)+"V"+pr+"Z"}}else st=Nt}else st=Nt;var ea=g(C.ensureSingle(ft,"path"),pe,W,ie);if(ea.style("vector-effect",oe?"none":"non-scaling-stroke").attr("d",isNaN((cr-Zt)*(Br-pr))||Fr&&le._context.staticPlot?"M0,0Z":st).call(r.setClipUrl,ye.layerClipId,le),!pe.uniformtext.mode&&lt){var Za=r.makePointStyleFns(_e);r.singlePointStyle(mt,ea,_e,Za,le)}x(le,ye,ft,ce,bt,Zt,cr,pr,Br,tt,Xt,W,ie),ye.layerClipId&&r.hideOutsideRangePoint(mt,ft.select("text"),se,ee,_e.xcalendar,_e.ycalendar)});var Ye=_e.cliponaxis===!1;r.setClipUrl(ue,Ye?null:ye.layerClipId,le)});a.getComponentMethod("errorbars","plot")(le,Y,ye,W)}function x(le,ye,de,me,W,ie,se,ee,pe,oe,Y,ce,ue){var _e=ye.xaxis,Le=ye.yaxis,ze=le._fullLayout,Ge;function Ve(Ft,Nt,Xt){var lr=C.ensureSingle(Ft,"text").text(Nt).attr({class:"bartext bartext-"+Ge,"text-anchor":"middle","data-notex":1}).call(r.font,Xt).call(P.convertToTspans,le);return lr}var rt=me[0].trace,pt=rt.orientation==="h",gt=z(ze,me,W,_e,Le);Ge=H(rt,W);var ht=ce.mode==="stack"||ce.mode==="relative",lt=me[W],Fe=!ht||lt._outmost,Pe=lt.hasB,be=oe&&oe-Y>_;if(!gt||Ge==="none"||(lt.isBlank||ie===se||ee===pe)&&(Ge==="auto"||Ge==="inside")){de.select("text").remove();return}var Ye=ze.font,mt=u.getBarColor(me[W],rt),bt=u.getInsideTextFont(rt,W,Ye,mt),ft=u.getOutsideTextFont(rt,W,Ye),Wt=rt.insidetextanchor||"end",Zt=de.datum();pt?_e.type==="log"&&Zt.s0<=0&&(_e.range[0]<_e.range[1]?ie=0:ie=_e._length):Le.type==="log"&&Zt.s0<=0&&(Le.range[0]<Le.range[1]?ee=Le._length:ee=0);var cr=Math.abs(se-ie),pr=Math.abs(pe-ee),Br=cr-2*_,Fr=pr-2*_,cn,Nr,Jr,Dt,$e;if(Ge==="outside"&&!Fe&&!lt.hasB&&(Ge="inside"),Ge==="auto")if(Fe){Ge="inside",$e=C.ensureUniformFontSize(le,bt),cn=Ve(de,gt,$e),Nr=r.bBox(cn.node()),Jr=Nr.width,Dt=Nr.height;var ot=Jr>0&&Dt>0,De;be?Pe?De=N(Br-2*oe,Fr,Jr,Dt,pt)||N(Br,Fr-2*oe,Jr,Dt,pt):pt?De=N(Br-(oe-Y),Fr,Jr,Dt,pt)||N(Br,Fr-2*(oe-Y),Jr,Dt,pt):De=N(Br,Fr-(oe-Y),Jr,Dt,pt)||N(Br-2*(oe-Y),Fr,Jr,Dt,pt):De=N(Br,Fr,Jr,Dt,pt),ot&&De?Ge="inside":(Ge="outside",cn.remove(),cn=null)}else Ge="inside";if(!cn){$e=C.ensureUniformFontSize(le,Ge==="outside"?ft:bt),cn=Ve(de,gt,$e);var Ee=cn.attr("transform");if(cn.attr("transform",""),Nr=r.bBox(cn.node()),Jr=Nr.width,Dt=Nr.height,cn.attr("transform",Ee),Jr<=0||Dt<=0){cn.remove();return}}var Ae=rt.textangle,Ie,tt;Ge==="outside"?(tt=rt.constraintext==="both"||rt.constraintext==="outside",Ie=q(ie,se,ee,pe,Nr,{isHorizontal:pt,constrained:tt,angle:Ae})):(tt=rt.constraintext==="both"||rt.constraintext==="inside",Ie=U(ie,se,ee,pe,Nr,{isHorizontal:pt,constrained:tt,angle:Ae,anchor:Wt,hasB:Pe,r:oe,overhead:Y})),Ie.fontSize=$e.size,s(rt.type==="histogram"?"bar":rt.type,Ie,ze),lt.transform=Ie;var st=g(cn,ze,ce,ue);C.setTransormAndDisplay(st,Ie)}function N(le,ye,de,me,W){if(le<0||ye<0)return!1;var ie=de<=le&&me<=ye,se=de<=ye&&me<=le,ee=W?le>=de*(ye/me):ye>=me*(le/de);return ie||se||ee}function D(le){return le==="auto"?0:le}function B(le,ye){var de=Math.PI/180*ye,me=Math.abs(Math.sin(de)),W=Math.abs(Math.cos(de));return{x:le.width*W+le.height*me,y:le.width*me+le.height*W}}function U(le,ye,de,me,W,ie){var se=!!ie.isHorizontal,ee=!!ie.constrained,pe=ie.angle||0,oe=ie.anchor,Y=oe==="end",ce=oe==="start",ue=ie.leftToRight||0,_e=(ue+1)/2,Le=1-_e,ze=ie.hasB,Ge=ie.r,Ve=ie.overhead,rt=W.width,pt=W.height,gt=Math.abs(ye-le),ht=Math.abs(me-de),lt=gt>2*_&&ht>2*_?_:0;gt-=2*lt,ht-=2*lt;var Fe=D(pe);pe==="auto"&&!(rt<=gt&&pt<=ht)&&(rt>gt||pt>ht)&&(!(rt>ht||pt>gt)||rt<pt!=gt<ht)&&(Fe+=90);var Pe=B(W,Fe),be,Ye;if(Ge&&Ge-Ve>_){var mt=V(le,ye,de,me,Pe,Ge,Ve,se,ze);be=mt.scale,Ye=mt.pad}else be=1,ee&&(be=Math.min(1,gt/Pe.x,ht/Pe.y)),Ye=0;var bt=W.left*Le+W.right*_e,ft=(W.top+W.bottom)/2,Wt=(le+_)*Le+(ye-_)*_e,Zt=(de+me)/2,cr=0,pr=0;if(ce||Y){var Br=(se?Pe.x:Pe.y)/2;Ge&&(Y||ze)&&(lt+=Ye);var Fr=se?b(le,ye):b(de,me);se?ce?(Wt=le+Fr*lt,cr=-Fr*Br):(Wt=ye-Fr*lt,cr=Fr*Br):ce?(Zt=de+Fr*lt,pr=-Fr*Br):(Zt=me-Fr*lt,pr=Fr*Br)}return{textX:bt,textY:ft,targetX:Wt,targetY:Zt,anchorX:cr,anchorY:pr,scale:be,rotate:Fe}}function V(le,ye,de,me,W,ie,se,ee,pe){var oe=Math.max(0,Math.abs(ye-le)-2*_),Y=Math.max(0,Math.abs(me-de)-2*_),ce=ie-_,ue=se?ce-Math.sqrt(ce*ce-(ce-se)*(ce-se)):ce,_e=pe?ce*2:ee?ce-se:2*ue,Le=pe?ce*2:ee?2*ue:ce-se,ze,Ge,Ve,rt,pt;return W.y/W.x>=Y/(oe-_e)?rt=Y/W.y:W.y/W.x<=(Y-Le)/oe?rt=oe/W.x:!pe&&ee?(ze=W.x*W.x+W.y*W.y/4,Ge=-2*W.x*(oe-ce)-W.y*(Y/2-ce),Ve=(oe-ce)*(oe-ce)+(Y/2-ce)*(Y/2-ce)-ce*ce,rt=(-Ge+Math.sqrt(Ge*Ge-4*ze*Ve))/(2*ze)):pe?(ze=(W.x*W.x+W.y*W.y)/4,Ge=-W.x*(oe/2-ce)-W.y*(Y/2-ce),Ve=(oe/2-ce)*(oe/2-ce)+(Y/2-ce)*(Y/2-ce)-ce*ce,rt=(-Ge+Math.sqrt(Ge*Ge-4*ze*Ve))/(2*ze)):(ze=W.x*W.x/4+W.y*W.y,Ge=-W.x*(oe/2-ce)-2*W.y*(Y-ce),Ve=(oe/2-ce)*(oe/2-ce)+(Y-ce)*(Y-ce)-ce*ce,rt=(-Ge+Math.sqrt(Ge*Ge-4*ze*Ve))/(2*ze)),rt=Math.min(1,rt),ee?pt=Math.max(0,ce-Math.sqrt(Math.max(0,ce*ce-(ce-(Y-W.y*rt)/2)*(ce-(Y-W.y*rt)/2)))-se):pt=Math.max(0,ce-Math.sqrt(Math.max(0,ce*ce-(ce-(oe-W.x*rt)/2)*(ce-(oe-W.x*rt)/2)))-se),{scale:rt,pad:pt}}function q(le,ye,de,me,W,ie){var se=!!ie.isHorizontal,ee=!!ie.constrained,pe=ie.angle||0,oe=W.width,Y=W.height,ce=Math.abs(ye-le),ue=Math.abs(me-de),_e;se?_e=ue>2*_?_:0:_e=ce>2*_?_:0;var Le=1;ee&&(Le=se?Math.min(1,ue/Y):Math.min(1,ce/oe));var ze=D(pe),Ge=B(W,ze),Ve=(se?Ge.x:Ge.y)/2,rt=(W.left+W.right)/2,pt=(W.top+W.bottom)/2,gt=(le+ye)/2,ht=(de+me)/2,lt=0,Fe=0,Pe=se?b(ye,le):b(de,me);return se?(gt=ye-Pe*_e,lt=Pe*Ve):(ht=me+Pe*_e,Fe=-Pe*Ve),{textX:rt,textY:pt,targetX:gt,targetY:ht,anchorX:lt,anchorY:Fe,scale:Le,rotate:ze}}function z(le,ye,de,me,W){var ie=ye[0].trace,se=ie.texttemplate,ee;return se?ee=G(le,ye,de,me,W):ie.textinfo?ee=J(ye,de,me,W):ee=d.getValue(ie.text,de),d.coerceString(m,ee)}function H(le,ye){var de=d.getValue(le.textposition,ye);return d.coerceEnumerated(E,de)}function G(le,ye,de,me,W){var ie=ye[0].trace,se=C.castOption(ie,de,"texttemplate");if(!se)return"";var ee=ie.type==="histogram",pe=ie.type==="waterfall",oe=ie.type==="funnel",Y=ie.orientation==="h",ce,ue,_e,Le;Y?(ce="y",ue=W,_e="x",Le=me):(ce="x",ue=me,_e="y",Le=W);function ze(lt){return l(ue,ue.c2l(lt),!0).text}function Ge(lt){return l(Le,Le.c2l(lt),!0).text}var Ve=ye[de],rt={};rt.label=Ve.p,rt.labelLabel=rt[ce+"Label"]=ze(Ve.p);var pt=C.castOption(ie,Ve.i,"text");(pt===0||pt)&&(rt.text=pt),rt.value=Ve.s,rt.valueLabel=rt[_e+"Label"]=Ge(Ve.s);var gt={};c(gt,ie,Ve.i),(ee||gt.x===void 0)&&(gt.x=Y?rt.value:rt.label),(ee||gt.y===void 0)&&(gt.y=Y?rt.label:rt.value),(ee||gt.xLabel===void 0)&&(gt.xLabel=Y?rt.valueLabel:rt.labelLabel),(ee||gt.yLabel===void 0)&&(gt.yLabel=Y?rt.labelLabel:rt.valueLabel),pe&&(rt.delta=+Ve.rawS||Ve.s,rt.deltaLabel=Ge(rt.delta),rt.final=Ve.v,rt.finalLabel=Ge(rt.final),rt.initial=rt.final-rt.delta,rt.initialLabel=Ge(rt.initial)),oe&&(rt.value=Ve.s,rt.valueLabel=Ge(rt.value),rt.percentInitial=Ve.begR,rt.percentInitialLabel=C.formatPercent(Ve.begR),rt.percentPrevious=Ve.difR,rt.percentPreviousLabel=C.formatPercent(Ve.difR),rt.percentTotal=Ve.sumR,rt.percenTotalLabel=C.formatPercent(Ve.sumR));var ht=C.castOption(ie,Ve.i,"customdata");return ht&&(rt.customdata=ht),C.texttemplateString({data:[gt,rt,ie._meta],fallback:ie.texttemplatefallback,labels:rt,locale:le._d3locale,template:se})}function J(le,ye,de,me){var W=le[0].trace,ie=W.orientation==="h",se=W.type==="waterfall",ee=W.type==="funnel";function pe(ht){var lt=ie?me:de;return l(lt,ht,!0).text}function oe(ht){var lt=ie?de:me;return l(lt,+ht,!0).text}var Y=W.textinfo,ce=le[ye],ue=Y.split("+"),_e=[],Le,ze=function(ht){return ue.indexOf(ht)!==-1};if(ze("label")&&_e.push(pe(le[ye].p)),ze("text")&&(Le=C.castOption(W,ce.i,"text"),(Le===0||Le)&&_e.push(Le)),se){var Ge=+ce.rawS||ce.s,Ve=ce.v,rt=Ve-Ge;ze("initial")&&_e.push(oe(rt)),ze("delta")&&_e.push(oe(Ge)),ze("final")&&_e.push(oe(Ve))}if(ee){ze("value")&&_e.push(oe(ce.s));var pt=0;ze("percent initial")&&pt++,ze("percent previous")&&pt++,ze("percent total")&&pt++;var gt=pt>1;ze("percent initial")&&(Le=C.formatPercent(ce.begR),gt&&(Le+=" of initial"),_e.push(Le)),ze("percent previous")&&(Le=C.formatPercent(ce.difR),gt&&(Le+=" of previous"),_e.push(Le)),ze("percent total")&&(Le=C.formatPercent(ce.sumR),gt&&(Le+=" of total"),_e.push(Le))}return _e.join("<br>")}Z.exports={plot:p,toMoveInsideBar:U}}}),zc=Ne({"src/traces/bar/hover.js"(te,Z){var v=nh(),w=Xo(),C=io(),P=In().fillText,t=J1().getLineWidth,r=Os().hoverLabelText,a=ja().BADNUM;function l(o,u,d,h,y){var m=i(o,u,d,h,y);if(m){var E=m.cd,c=E[0].trace,_=E[m.index];return m.color=s(c,_),w.getComponentMethod("errorbars","hoverInfo")(_,c,m),[m]}}function i(o,u,d,h,y){var m=o.cd,E=m[0].trace,c=m[0].t,_=h==="closest",T=E.type==="waterfall",M=o.maxHoverDistance,k=o.maxSpikeDistance,b,A,g,f,p,x,N;E.orientation==="h"?(b=d,A=u,g="y",f="x",p=me,x=le):(b=u,A=d,g="x",f="y",x=me,p=le);var D=E[g+"period"],B=_||D;function U(Le){return q(Le,-1)}function V(Le){return q(Le,1)}function q(Le,ze){var Ge=Le.w;return Le[g]+ze*Ge/2}function z(Le){return Le[g+"End"]-Le[g+"Start"]}var H=_?U:D?function(Le){return Le.p-z(Le)/2}:function(Le){return Math.min(U(Le),Le.p-c.bardelta/2)},G=_?V:D?function(Le){return Le.p+z(Le)/2}:function(Le){return Math.max(V(Le),Le.p+c.bardelta/2)};function J(Le,ze,Ge){return y.finiteRange&&(Ge=0),v.inbox(Le-b,ze-b,Ge+Math.min(1,Math.abs(ze-Le)/N)-1)}function le(Le){return J(H(Le),G(Le),M)}function ye(Le){return J(U(Le),V(Le),k)}function de(Le){var ze=Le[f];if(T){var Ge=Math.abs(Le.rawS)||0;A>0?ze+=Ge:A<0&&(ze-=Ge)}return ze}function me(Le){var ze=A,Ge=Le.b,Ve=de(Le);return v.inbox(Ge-ze,Ve-ze,M+(Ve-ze)/(Ve-Ge)-1)}function W(Le){var ze=A,Ge=Le.b,Ve=de(Le);return v.inbox(Ge-ze,Ve-ze,k+(Ve-ze)/(Ve-Ge)-1)}var ie=o[g+"a"],se=o[f+"a"];N=Math.abs(ie.r2c(ie.range[1])-ie.r2c(ie.range[0]));function ee(Le){return(p(Le)+x(Le))/2}var pe=v.getDistanceFunction(h,p,x,ee);if(v.getClosest(m,pe,o),o.index!==!1&&m[o.index].p!==a){B||(H=function(Le){return Math.min(U(Le),Le.p-c.bargroupwidth/2)},G=function(Le){return Math.max(V(Le),Le.p+c.bargroupwidth/2)});var oe=o.index,Y=m[oe],ce=E.base?Y.b+Y.s:Y.s;o[f+"0"]=o[f+"1"]=se.c2p(Y[f],!0),o[f+"LabelVal"]=ce;var ue=c.extents[c.extents.round(Y.p)];o[g+"0"]=ie.c2p(_?H(Y):ue[0],!0),o[g+"1"]=ie.c2p(_?G(Y):ue[1],!0);var _e=Y.orig_p!==void 0;return o[g+"LabelVal"]=_e?Y.orig_p:Y.p,o.labelLabel=r(ie,o[g+"LabelVal"],E[g+"hoverformat"]),o.valueLabel=r(se,o[f+"LabelVal"],E[f+"hoverformat"]),o.baseLabel=r(se,Y.b,E[f+"hoverformat"]),o.spikeDistance=(W(Y)+ye(Y))/2,o[g+"Spike"]=ie.c2p(Y.p,!0),P(Y,E,o),o.hovertemplate=E.hovertemplate,o}}function s(o,u){var d=u.mcc||o.marker.color,h=u.mlcc||o.marker.line.color,y=t(o,u);if(C.opacity(d))return d;if(C.opacity(h)&&y)return h}Z.exports={hoverPoints:l,hoverOnBars:i,getTraceColor:s}}}),Ad=Ne({"src/traces/bar/event_data.js"(te,Z){Z.exports=function(w,C,P){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),P.orientation==="h"?(w.label=w.y,w.value=w.x):(w.label=w.x,w.value=w.y),w}}}),zy=Ne({"src/traces/bar/select.js"(te,Z){Z.exports=function(C,P){var t=C.cd,r=C.xaxis,a=C.yaxis,l=t[0].trace,i=l.type==="funnel",s=l.orientation==="h",o=[],u;if(P===!1)for(u=0;u<t.length;u++)t[u].selected=0;else for(u=0;u<t.length;u++){var d=t[u],h="ct"in d?d.ct:v(d,r,a,s,i);P.contains(h,!1,u,C)?(o.push({pointNumber:u,x:r.c2d(d.x),y:a.c2d(d.y)}),d.selected=1):d.selected=0}return o};function v(w,C,P,t,r){var a=C.c2p(t?w.s0:w.p0,!0),l=C.c2p(t?w.s1:w.p1,!0),i=P.c2p(t?w.p0:w.s0,!0),s=P.c2p(t?w.p1:w.s1,!0);return r?[(a+l)/2,(i+s)/2]:t?[l,(i+s)/2]:[(a+l)/2,s]}}}),Q1=Ne({"src/traces/bar/index.js"(te,Z){Z.exports={attributes:rd(),layoutAttributes:dp(),supplyDefaults:vp().supplyDefaults,crossTraceDefaults:vp().crossTraceDefaults,supplyLayoutDefaults:IA(),calc:$p(),crossTraceCalc:U0().crossTraceCalc,colorbar:ah(),arraysToCalcdata:Nm(),plot:hu().plot,style:Fd().style,styleOnSelect:Fd().styleOnSelect,hoverPoints:zc().hoverPoints,eventData:Ad(),selectPoints:zy(),moduleType:"trace",name:"bar",basePlotModule:Lh(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}}}),Ng=Ne({"lib/bar.js"(te,Z){Z.exports=Q1()}}),Fg=Ne({"src/traces/box/attributes.js"(te,Z){var v=jv(),w=Jc(),C=rd(),P=lu(),t=bc().axisHoverFormat,{hovertemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=co().extendFlat,i=w.marker,s=i.line;Z.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:w.xperiod,yperiod:w.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:w.xperiodalignment,yperiodalignment:w.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("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:l({},i.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},i.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},i.angle,{arrayOk:!1,editType:"calc"}),size:l({},i.size,{arrayOk:!1,editType:"calc"}),color:l({},i.color,{arrayOk:!1,editType:"style"}),line:{color:l({},s.color,{arrayOk:!1,dflt:P.defaultLine,editType:"style"}),width:l({},s.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:v(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:C.offsetgroup,alignmentgroup:C.alignmentgroup,selected:{marker:w.selected.marker,editType:"style"},unselected:{marker:w.unselected.marker,editType:"style"},text:l({},w.text,{}),hovertext:l({},w.hovertext,{}),hovertemplate:r({}),hovertemplatefallback:a(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:w.zorder}}}),Ny=Ne({"src/traces/box/layout_attributes.js"(te,Z){Z.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"}}}}),G0=Ne({"src/traces/box/defaults.js"(te,Z){var v=In(),w=Xo(),C=io(),P=Rm(),t=j0(),r=Ty(),a=Fg();function l(u,d,h,y){function m(f,p){return v.coerce(u,d,a,f,p)}if(i(u,d,m,y),d.visible!==!1){P(u,d,y,m),m("xhoverformat"),m("yhoverformat");var E=d._hasPreCompStats;E&&(m("lowerfence"),m("upperfence")),m("line.color",(u.marker||{}).color||h),m("line.width"),m("fillcolor",C.addOpacity(d.line.color,.5));var c=!1;if(E){var _=m("mean"),T=m("sd");_&&_.length&&(c=!0,T&&T.length&&(c="sd"))}m("whiskerwidth");var M=m("sizemode"),k;M==="quartiles"&&(k=m("boxmean",c)),m("showwhiskers",M==="quartiles"),(M==="sd"||k==="sd")&&m("sdmultiple"),m("width"),m("quartilemethod");var b=!1;if(E){var A=m("notchspan");A&&A.length&&(b=!0)}else v.validate(u.notchwidth,a.notchwidth)&&(b=!0);var g=m("notched",b);g&&m("notchwidth"),s(u,d,m,{prefix:"box"}),m("zorder")}}function i(u,d,h,y){function m(J){var le=0;return J&&J.length&&(le+=1,v.isArrayOrTypedArray(J[0])&&J[0].length&&(le+=1)),le}function E(J){return v.validate(u[J],a[J])}var c=h("y"),_=h("x"),T;if(d.type==="box"){var M=h("q1"),k=h("median"),b=h("q3");d._hasPreCompStats=M&&M.length&&k&&k.length&&b&&b.length,T=Math.min(v.minRowLength(M),v.minRowLength(k),v.minRowLength(b))}var A=m(c),g=m(_),f=A&&v.minRowLength(c),p=g&&v.minRowLength(_),x=y.calendar,N={autotypenumbers:y.autotypenumbers},D,B;if(d._hasPreCompStats)switch(String(g)+String(A)){case"00":var U=E("x0")||E("dx"),V=E("y0")||E("dy");V&&!U?D="h":D="v",B=T;break;case"10":D="v",B=Math.min(T,p);break;case"20":D="h",B=Math.min(T,_.length);break;case"01":D="h",B=Math.min(T,f);break;case"02":D="v",B=Math.min(T,c.length);break;case"12":D="v",B=Math.min(T,p,c.length);break;case"21":D="h",B=Math.min(T,_.length,f);break;case"11":B=0;break;case"22":var q=!1,z;for(z=0;z<_.length;z++)if(r(_[z],x,N)==="category"){q=!0;break}if(q)D="v",B=Math.min(T,p,c.length);else{for(z=0;z<c.length;z++)if(r(c[z],x,N)==="category"){q=!0;break}q?(D="h",B=Math.min(T,_.length,f)):(D="v",B=Math.min(T,p,c.length))}break}else A>0?(D="v",g>0?B=Math.min(p,f):B=Math.min(f)):g>0?(D="h",B=Math.min(p)):B=0;if(!B){d.visible=!1;return}d._length=B;var H=h("orientation",D);d._hasPreCompStats?H==="v"&&g===0?(h("x0",0),h("dx",1)):H==="h"&&A===0&&(h("y0",0),h("dy",1)):H==="v"&&g===0?h("x0"):H==="h"&&A===0&&h("y0");var G=w.getComponentMethod("calendars","handleTraceDefaults");G(u,d,["x","y"],y)}function s(u,d,h,y){var m=y.prefix,E=v.coerce2(u,d,a,"marker.outliercolor"),c=h("marker.line.outliercolor"),_="outliers";d._hasPreCompStats?_="all":(E||c)&&(_="suspectedoutliers");var T=h(m+"points",_);T?(h("jitter",T==="all"?.3:0),h("pointpos",T==="all"?-1.5:0),h("marker.symbol"),h("marker.opacity"),h("marker.size"),h("marker.angle"),h("marker.color",d.line.color),h("marker.line.color"),h("marker.line.width"),T==="suspectedoutliers"&&(h("marker.line.outliercolor",d.marker.color),h("marker.line.outlierwidth")),h("selected.marker.color"),h("unselected.marker.color"),h("selected.marker.size"),h("unselected.marker.size"),h("text"),h("hovertext")):delete d.marker;var M=h("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(h("hovertemplate"),h("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(d,h)}function o(u,d){var h,y;function m(T){return v.coerce(y._input,y,a,T)}for(var E=0;E<u.length;E++){y=u[E];var c=y.type;if(c==="box"||c==="violin"){h=y._input;var _=d[c+"mode"];_==="group"&&t(h,y,d,m,_)}}}Z.exports={supplyDefaults:l,crossTraceDefaults:o,handleSampleDefaults:i,handlePointsDefaults:s}}}),DA=Ne({"src/traces/box/layout_defaults.js"(te,Z){var v=Xo(),w=In(),C=Ny();function P(r,a,l,i,s){for(var o=s+"Layout",u=!1,d=0;d<l.length;d++){var h=l[d];if(v.traceIs(h,o)){u=!0;break}}u&&(i(s+"mode"),i(s+"gap"),i(s+"groupgap"))}function t(r,a,l){function i(s,o){return w.coerce(r,a,C,s,o)}P(r,a,l,i,"box")}Z.exports={supplyLayoutDefaults:t,_supply:P}}}),Rh=Ne({"src/traces/box/calc.js"(te,Z){var v=la(),w=Os(),C=Dm(),P=In(),t=ja().BADNUM,r=P._;Z.exports=function(M,k){var b=M._fullLayout,A=w.getFromId(M,k.xaxis||"x"),g=w.getFromId(M,k.yaxis||"y"),f=[],p=k.type==="violin"?"_numViolins":"_numBoxes",x,N,D,B,U,V,q;k.orientation==="h"?(D=A,B="x",U=g,V="y",q=!!k.yperiodalignment):(D=g,B="y",U=A,V="x",q=!!k.xperiodalignment);var z=a(k,V,U,b[p]),H=z[0],G=z[1],J=P.distinctVals(H,U),le=J.vals,ye=J.minDiff/2,de,me,W,ie,se,ee,pe=(k.boxpoints||k.points)==="all"?P.identity:function(Fr){return Fr.v<de.lf||Fr.v>de.uf};if(k._hasPreCompStats){var oe=k[B],Y=function(Fr){return D.d2c((k[Fr]||[])[x])},ce=1/0,ue=-1/0;for(x=0;x<k._length;x++){var _e=H[x];if(v(_e)){if(de={},de.pos=de[V]=_e,q&&G&&(de.orig_p=G[x]),de.q1=Y("q1"),de.med=Y("median"),de.q3=Y("q3"),me=[],oe&&P.isArrayOrTypedArray(oe[x]))for(N=0;N<oe[x].length;N++)ee=D.d2c(oe[x][N]),ee!==t&&(se={v:ee,i:[x,N]},o(se,k,[x,N]),me.push(se));if(de.pts=me.sort(d),W=de[B]=me.map(h),ie=W.length,de.med!==t&&de.q1!==t&&de.q3!==t&&de.med>=de.q1&&de.q3>=de.med){var Le=Y("lowerfence");de.lf=Le!==t&&Le<=de.q1?Le:y(de,W,ie);var ze=Y("upperfence");de.uf=ze!==t&&ze>=de.q3?ze:m(de,W,ie);var Ge=Y("mean");de.mean=Ge!==t?Ge:ie?P.mean(W,ie):(de.q1+de.q3)/2;var Ve=Y("sd");de.sd=Ge!==t&&Ve>=0?Ve:ie?P.stdev(W,ie,de.mean):de.q3-de.q1,de.lo=E(de),de.uo=c(de);var rt=Y("notchspan");rt=rt!==t&&rt>0?rt:_(de,ie),de.ln=de.med-rt,de.un=de.med+rt;var pt=de.lf,gt=de.uf;k.boxpoints&&W.length&&(pt=Math.min(pt,W[0]),gt=Math.max(gt,W[ie-1])),k.notched&&(pt=Math.min(pt,de.ln),gt=Math.max(gt,de.un)),de.min=pt,de.max=gt}else{P.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+de.q1,"median = "+de.med,"q3 = "+de.q3].join(`
`));var ht;de.med!==t?ht=de.med:de.q1!==t?de.q3!==t?ht=(de.q1+de.q3)/2:ht=de.q1:de.q3!==t?ht=de.q3:ht=0,de.med=ht,de.q1=de.q3=ht,de.lf=de.uf=ht,de.mean=de.sd=ht,de.ln=de.un=ht,de.min=de.max=ht}ce=Math.min(ce,de.min),ue=Math.max(ue,de.max),de.pts2=me.filter(pe),f.push(de)}}k._extremes[D._id]=w.findExtremes(D,[ce,ue],{padded:!0})}else{var lt=D.makeCalcdata(k,B),Fe=l(le,ye),Pe=le.length,be=i(Pe);for(x=0;x<k._length;x++)if(ee=lt[x],!!v(ee)){var Ye=P.findBin(H[x],Fe);Ye>=0&&Ye<Pe&&(se={v:ee,i:x},o(se,k,x),be[Ye].push(se))}var mt=1/0,bt=-1/0,ft=k.quartilemethod,Wt=ft==="exclusive",Zt=ft==="inclusive";for(x=0;x<Pe;x++)if(be[x].length>0){if(de={},de.pos=de[V]=le[x],me=de.pts=be[x].sort(d),W=de[B]=me.map(h),ie=W.length,de.min=W[0],de.max=W[ie-1],de.mean=P.mean(W,ie),de.sd=P.stdev(W,ie,de.mean)*k.sdmultiple,de.med=P.interp(W,.5),ie%2&&(Wt||Zt)){var cr,pr;Wt?(cr=W.slice(0,ie/2),pr=W.slice(ie/2+1)):Zt&&(cr=W.slice(0,ie/2+1),pr=W.slice(ie/2)),de.q1=P.interp(cr,.5),de.q3=P.interp(pr,.5)}else de.q1=P.interp(W,.25),de.q3=P.interp(W,.75);de.lf=y(de,W,ie),de.uf=m(de,W,ie),de.lo=E(de),de.uo=c(de);var Br=_(de,ie);de.ln=de.med-Br,de.un=de.med+Br,mt=Math.min(mt,de.ln),bt=Math.max(bt,de.un),de.pts2=me.filter(pe),f.push(de)}k.notched&&P.isTypedArray(lt)&&(lt=Array.from(lt)),k._extremes[D._id]=w.findExtremes(D,k.notched?lt.concat([mt,bt]):lt,{padded:!0})}return u(f,k),f.length>0?(f[0].t={num:b[p],dPos:ye,posLetter:V,valLetter:B,labels:{med:r(M,"median:"),min:r(M,"min:"),q1:r(M,"q1:"),q3:r(M,"q3:"),max:r(M,"max:"),mean:k.boxmean==="sd"||k.sizemode==="sd"?r(M,"mean ± σ:").replace("σ",k.sdmultiple===1?"σ":k.sdmultiple+"σ"):r(M,"mean:"),lf:r(M,"lower fence:"),uf:r(M,"upper fence:")}},b[p]++,f):[{t:{empty:!0}}]};function a(T,M,k,b){var A=M in T,g=M+"0"in T,f="d"+M in T;if(A||g&&f){var p=k.makeCalcdata(T,M),x=C(T,k,M,p).vals;return[x,p]}var N;g?N=T[M+"0"]:"name"in T&&(k.type==="category"||v(T.name)&&["linear","log"].indexOf(k.type)!==-1||P.isDateTime(T.name)&&k.type==="date")?N=T.name:N=b;for(var D=k.type==="multicategory"?k.r2c_just_indices(N):k.d2c(N,0,T[M+"calendar"]),B=T._length,U=new Array(B),V=0;V<B;V++)U[V]=D;return[U]}function l(T,M){for(var k=T.length,b=new Array(k+1),A=0;A<k;A++)b[A]=T[A]-M;return b[k]=T[k-1]+M,b}function i(T){for(var M=new Array(T),k=0;k<T;k++)M[k]=[];return M}var s={text:"tx",hovertext:"htx"};function o(T,M,k){for(var b in s)P.isArrayOrTypedArray(M[b])&&(Array.isArray(k)?P.isArrayOrTypedArray(M[b][k[0]])&&(T[s[b]]=M[b][k[0]][k[1]]):T[s[b]]=M[b][k])}function u(T,M){if(P.isArrayOrTypedArray(M.selectedpoints))for(var k=0;k<T.length;k++){for(var b=T[k].pts||[],A={},g=0;g<b.length;g++)A[b[g].i]=g;P.tagSelected(b,M,A)}}function d(T,M){return T.v-M.v}function h(T){return T.v}function y(T,M,k){return k===0?T.q1:Math.min(T.q1,M[Math.min(P.findBin(2.5*T.q1-1.5*T.q3,M,!0)+1,k-1)])}function m(T,M,k){return k===0?T.q3:Math.max(T.q3,M[Math.max(P.findBin(2.5*T.q3-1.5*T.q1,M),0)])}function E(T){return 4*T.q1-3*T.q3}function c(T){return 4*T.q3-3*T.q1}function _(T,M){return M===0?0:1.57*(T.q3-T.q1)/Math.sqrt(M)}}}),jx=Ne({"src/traces/box/cross_trace_calc.js"(te,Z){var v=Os(),w=In(),C=Mg().getAxisGroup,P=["v","h"];function t(a,l){for(var i=a.calcdata,s=l.xaxis,o=l.yaxis,u=0;u<P.length;u++){for(var d=P[u],h=d==="h"?o:s,y=[],m=0;m<i.length;m++){var E=i[m],c=E[0].t,_=E[0].trace;_.visible===!0&&(_.type==="box"||_.type==="candlestick")&&!c.empty&&(_.orientation||"v")===d&&_.xaxis===s._id&&_.yaxis===o._id&&y.push(m)}r("box",a,y,h)}}function r(a,l,i,s){var o=l.calcdata,u=l._fullLayout,d=s._id,h=d.charAt(0),y,m,E,c=[],_=0;for(y=0;y<i.length;y++)for(E=o[i[y]],m=0;m<E.length;m++)c.push(s.c2l(E[m].pos,!0)),_+=(E[m].pts2||[]).length;if(c.length){var T=w.distinctVals(c);(s.type==="category"||s.type==="multicategory")&&(T.minDiff=1);var M=T.minDiff/2;v.minDtick(s,T.minDiff,T.vals[0],!0);var k=a==="violin"?"_numViolins":"_numBoxes",b=u[k],A=u[a+"mode"]==="group"&&b>1,g=1-u[a+"gap"],f=1-u[a+"groupgap"];for(y=0;y<i.length;y++){E=o[i[y]];var p=E[0].trace,x=E[0].t,N=p.width,D=p.side,B,U,V,q;if(N)B=U=q=N/2,V=0;else if(B=M,A){var z=C(u,s._id)+p.orientation,H=u._alignmentOpts[z]||{},G=H[p.alignmentgroup]||{},J=Object.keys(G.offsetGroups||{}).length,le=J||b,ye=J?p._offsetIndex:x.num;U=B*g*f/le,V=2*B*(-.5+(ye+.5)/le)*g,q=B*g/le}else U=B*g*f,V=0,q=B;x.dPos=B,x.bPos=V,x.bdPos=U,x.wHover=q;var de,me,W=V+U,ie,se,ee,pe,oe,Y,ce=!!N,ue=(p.boxpoints||p.points)&&_>0;if(D==="positive"?(de=B*(N?1:.5),ie=W,me=ie=V):D==="negative"?(de=ie=V,me=B*(N?1:.5),se=W):(de=me=B,ie=se=W),ue){var _e=p.pointpos,Le=p.jitter,ze=p.marker.size/2,Ge=0;_e+Le>=0&&(Ge=W*(_e+Le),Ge>de?(ce=!0,oe=ze,ee=Ge):Ge>ie&&(oe=ze,ee=de)),Ge<=de&&(ee=de);var Ve=0;_e-Le<=0&&(Ve=-W*(_e-Le),Ve>me?(ce=!0,Y=ze,pe=Ve):Ve>se&&(Y=ze,pe=me)),Ve<=me&&(pe=me)}else ee=de,pe=me;var rt=new Array(E.length);for(m=0;m<E.length;m++)rt[m]=E[m].pos;p._extremes[d]=v.findExtremes(s,rt,{padded:ce,vpadminus:pe,vpadplus:ee,vpadLinearized:!0,ppadminus:{x:Y,y:oe}[h],ppadplus:{x:oe,y:Y}[h]})}}}Z.exports={crossTraceCalc:t,setPositionOffset:r}}}),Ux=Ne({"src/traces/box/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=5,t=.01;function r(s,o,u,d){var h=s._context.staticPlot,y=o.xaxis,m=o.yaxis;w.makeTraceGroups(d,u,"trace boxes").each(function(E){var c=v.select(this),_=E[0],T=_.t,M=_.trace;if(T.wdPos=T.bdPos*M.whiskerwidth,M.visible!==!0||T.empty){c.remove();return}var k,b;M.orientation==="h"?(k=m,b=y):(k=y,b=m),a(c,{pos:k,val:b},M,T,h),l(c,{x:y,y:m},M,T),i(c,{pos:k,val:b},M,T)})}function a(s,o,u,d,h){var y=u.orientation==="h",m=o.val,E=o.pos,c=!!E.rangebreaks,_=d.bPos,T=d.wdPos||0,M=d.bPosPxOffset||0,k=u.whiskerwidth||0,b=u.showwhiskers!==!1,A=u.notched||!1,g=A?1-2*u.notchwidth:1,f,p;Array.isArray(d.bdPos)?(f=d.bdPos[0],p=d.bdPos[1]):(f=d.bdPos,p=d.bdPos);var x=s.selectAll("path.box").data(u.type!=="violin"||u.box.visible?w.identity:[]);x.enter().append("path").style("vector-effect",h?"none":"non-scaling-stroke").attr("class","box"),x.exit().remove(),x.each(function(N){if(N.empty)return v.select(this).attr("d","M0,0Z");var D=E.c2l(N.pos+_,!0),B=E.l2p(D-f)+M,U=E.l2p(D+p)+M,V=c?(B+U)/2:E.l2p(D)+M,q=u.whiskerwidth,z=c?B*q+(1-q)*V:E.l2p(D-T)+M,H=c?U*q+(1-q)*V:E.l2p(D+T)+M,G=E.l2p(D-f*g)+M,J=E.l2p(D+p*g)+M,le=u.sizemode==="sd",ye=m.c2p(le?N.mean-N.sd:N.q1,!0),de=le?m.c2p(N.mean+N.sd,!0):m.c2p(N.q3,!0),me=w.constrain(le?m.c2p(N.mean,!0):m.c2p(N.med,!0),Math.min(ye,de)+1,Math.max(ye,de)-1),W=N.lf===void 0||u.boxpoints===!1||le,ie=m.c2p(W?N.min:N.lf,!0),se=m.c2p(W?N.max:N.uf,!0),ee=m.c2p(N.ln,!0),pe=m.c2p(N.un,!0);y?v.select(this).attr("d","M"+me+","+G+"V"+J+"M"+ye+","+B+"V"+U+(A?"H"+ee+"L"+me+","+J+"L"+pe+","+U:"")+"H"+de+"V"+B+(A?"H"+pe+"L"+me+","+G+"L"+ee+","+B:"")+"Z"+(b?"M"+ye+","+V+"H"+ie+"M"+de+","+V+"H"+se+(k===0?"":"M"+ie+","+z+"V"+H+"M"+se+","+z+"V"+H):"")):v.select(this).attr("d","M"+G+","+me+"H"+J+"M"+B+","+ye+"H"+U+(A?"V"+ee+"L"+J+","+me+"L"+U+","+pe:"")+"V"+de+"H"+B+(A?"V"+pe+"L"+G+","+me+"L"+B+","+ee:"")+"Z"+(b?"M"+V+","+ye+"V"+ie+"M"+V+","+de+"V"+se+(k===0?"":"M"+z+","+ie+"H"+H+"M"+z+","+se+"H"+H):""))})}function l(s,o,u,d){var h=o.x,y=o.y,m=d.bdPos,E=d.bPos,c=u.boxpoints||u.points;w.seedPseudoRandom();var _=function(k){return k.forEach(function(b){b.t=d,b.trace=u}),k},T=s.selectAll("g.points").data(c?_:[]);T.enter().append("g").attr("class","points"),T.exit().remove();var M=T.selectAll("path").data(function(k){var b,A=k.pts2,g=Math.max((k.max-k.min)/10,k.q3-k.q1),f=g*1e-9,p=g*t,x=[],N=0,D;if(u.jitter){if(g===0)for(N=1,x=new Array(A.length),b=0;b<A.length;b++)x[b]=1;else for(b=0;b<A.length;b++){var B=Math.max(0,b-P),U=A[B].v,V=Math.min(A.length-1,b+P),q=A[V].v;c!=="all"&&(A[b].v<k.lf?q=Math.min(q,k.lf):U=Math.max(U,k.uf));var z=Math.sqrt(p*(V-B)/(q-U+f))||0;z=w.constrain(Math.abs(z),0,1),x.push(z),N=Math.max(z,N)}D=u.jitter*2/(N||1)}for(b=0;b<A.length;b++){var H=A[b],G=H.v,J=u.jitter?D*x[b]*(w.pseudoRandom()-.5):0,le=k.pos+E+m*(u.pointpos+J);u.orientation==="h"?(H.y=le,H.x=G):(H.x=le,H.y=G),c==="suspectedoutliers"&&G<k.uo&&G>k.lo&&(H.so=!0)}return A});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(C.translatePoints,h,y)}function i(s,o,u,d){var h=o.val,y=o.pos,m=!!y.rangebreaks,E=d.bPos,c=d.bPosPxOffset||0,_=u.boxmean||(u.meanline||{}).visible,T,M;Array.isArray(d.bdPos)?(T=d.bdPos[0],M=d.bdPos[1]):(T=d.bdPos,M=d.bdPos);var k=s.selectAll("path.mean").data(u.type==="box"&&u.boxmean||u.type==="violin"&&u.box.visible&&u.meanline.visible?w.identity:[]);k.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),k.exit().remove(),k.each(function(b){var A=y.c2l(b.pos+E,!0),g=y.l2p(A-T)+c,f=y.l2p(A+M)+c,p=m?(g+f)/2:y.l2p(A)+c,x=h.c2p(b.mean,!0),N=h.c2p(b.mean-b.sd,!0),D=h.c2p(b.mean+b.sd,!0);u.orientation==="h"?v.select(this).attr("d","M"+x+","+g+"V"+f+(_==="sd"?"m0,0L"+N+","+p+"L"+x+","+g+"L"+D+","+p+"Z":"")):v.select(this).attr("d","M"+g+","+x+"H"+f+(_==="sd"?"m0,0L"+p+","+N+"L"+g+","+x+"L"+p+","+D+"Z":""))})}Z.exports={plot:r,plotBoxAndWhiskers:a,plotPoints:l,plotBoxMean:i}}}),Jw=Ne({"src/traces/box/style.js"(te,Z){var v=xn(),w=io(),C=zs();function P(r,a,l){var i=l||v.select(r).selectAll("g.trace.boxes");i.style("opacity",function(s){return s[0].trace.opacity}),i.each(function(s){var o=v.select(this),u=s[0].trace,d=u.line.width;function h(E,c,_,T){E.style("stroke-width",c+"px").call(w.stroke,_).call(w.fill,T)}var y=o.selectAll("path.box");if(u.type==="candlestick")y.each(function(E){if(!E.empty){var c=v.select(this),_=u[E.dir];h(c,_.line.width,_.line.color,_.fillcolor),c.style("opacity",u.selectedpoints&&!E.selected?.3:1)}});else{h(y,d,u.line.color,u.fillcolor),o.selectAll("path.mean").style({"stroke-width":d,"stroke-dasharray":2*d+"px,"+d+"px"}).call(w.stroke,u.line.color);var m=o.selectAll("path.point");C.pointStyle(m,u,r)}})}function t(r,a,l){var i=a[0].trace,s=l.selectAll("path.point");i.selectedpoints?C.selectedPointStyle(s,i):C.pointStyle(s,i,r)}Z.exports={style:P,styleOnSelect:t}}}),OA=Ne({"src/traces/box/hover.js"(te,Z){var v=Os(),w=In(),C=nh(),P=io(),t=w.fillText;function r(i,s,o,u){var d=i.cd,h=d[0].trace,y=h.hoveron,m=[],E;return y.indexOf("boxes")!==-1&&(m=m.concat(a(i,s,o,u))),y.indexOf("points")!==-1&&(E=l(i,s,o)),u==="closest"?E?[E]:m:(E&&m.push(E),m)}function a(i,s,o,u){var d=i.cd,h=i.xa,y=i.ya,m=d[0].trace,E=d[0].t,c=m.type==="violin",_,T,M,k,b,A,g,f,p,x,N,D=E.bdPos,B,U,V=E.wHover,q=function(Ve){return M.c2l(Ve.pos)+E.bPos-M.c2l(A)};c&&m.side!=="both"?(m.side==="positive"&&(p=function(Ve){var rt=q(Ve);return C.inbox(rt,rt+V,x)},B=D,U=0),m.side==="negative"&&(p=function(Ve){var rt=q(Ve);return C.inbox(rt-V,rt,x)},B=0,U=D)):(p=function(Ve){var rt=q(Ve);return C.inbox(rt-V,rt+V,x)},B=U=D);var z;c?z=function(Ve){return C.inbox(Ve.span[0]-b,Ve.span[1]-b,x)}:z=function(Ve){return C.inbox(Ve.min-b,Ve.max-b,x)},m.orientation==="h"?(b=s,A=o,g=z,f=p,_="y",M=y,T="x",k=h):(b=o,A=s,g=p,f=z,_="x",M=h,T="y",k=y);var H=Math.min(1,D/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=i.maxHoverDistance-H,N=i.maxSpikeDistance-H;function G(Ve){return(g(Ve)+f(Ve))/2}var J=C.getDistanceFunction(u,g,f,G);if(C.getClosest(d,J,i),i.index===!1)return[];var le=d[i.index],ye=m.line.color,de=(m.marker||{}).color;P.opacity(ye)&&m.line.width?i.color=ye:P.opacity(de)&&m.boxpoints?i.color=de:i.color=m.fillcolor,i[_+"0"]=M.c2p(le.pos+E.bPos-U,!0),i[_+"1"]=M.c2p(le.pos+E.bPos+B,!0),i[_+"LabelVal"]=le.orig_p!==void 0?le.orig_p:le.pos;var me=_+"Spike";i.spikeDistance=G(le)*N/x,i[me]=M.c2p(le.pos,!0);var W=m.boxmean||m.sizemode==="sd"||(m.meanline||{}).visible,ie=m.boxpoints||m.points,se=ie&&W?["max","uf","q3","med","mean","q1","lf","min"]:ie&&!W?["max","uf","q3","med","q1","lf","min"]:!ie&&W?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=k.range[1]<k.range[0];m.orientation===(ee?"v":"h")&&se.reverse();for(var pe=i.spikeDistance,oe=i[me],Y=[],ce=0;ce<se.length;ce++){var ue=se[ce];if(ue in le){var _e=le[ue],Le=k.c2p(_e,!0),ze=w.extendFlat({},i);ze.attr=ue,ze[T+"0"]=ze[T+"1"]=Le,ze[T+"LabelVal"]=_e,ze[T+"Label"]=(E.labels?E.labels[ue]+" ":"")+v.hoverLabelText(k,_e,m[T+"hoverformat"]),ze.hoverOnBox=!0,ue==="mean"&&"sd"in le&&(m.boxmean==="sd"||m.sizemode==="sd")&&(ze[T+"err"]=le.sd),ze.hovertemplate=!1,Y.push(ze)}}i.name="",i.spikeDistance=void 0,i[me]=void 0;for(var Ge=0;Ge<Y.length;Ge++)Y[Ge].attr!=="med"?(Y[Ge].name="",Y[Ge].spikeDistance=void 0,Y[Ge][me]=void 0):(Y[Ge].spikeDistance=pe,Y[Ge][me]=oe);return Y}function l(i,s,o){for(var u=i.cd,d=i.xa,h=i.ya,y=u[0].trace,m=d.c2p(s),E=h.c2p(o),c,_=function(z){var H=Math.max(3,z.mrc||0);return Math.max(Math.abs(d.c2p(z.x)-m)-H,1-3/H)},T=function(z){var H=Math.max(3,z.mrc||0);return Math.max(Math.abs(h.c2p(z.y)-E)-H,1-3/H)},M=C.quadrature(_,T),k=!1,b,A,g=0;g<u.length;g++){b=u[g];for(var f=0;f<(b.pts||[]).length;f++){A=b.pts[f];var p=M(A);p<=i.distance&&(i.distance=p,k=[g,f])}}if(!k)return!1;b=u[k[0]],A=b.pts[k[1]];var x=d.c2p(A.x,!0),N=h.c2p(A.y,!0),D=A.mrc||1;c=w.extendFlat({},i,{index:A.i,color:(y.marker||{}).color,name:y.name,x0:x-D,x1:x+D,y0:N-D,y1:N+D,spikeDistance:i.distance,hovertemplate:y.hovertemplate});var B=b.orig_p,U=B!==void 0?B:b.pos,V;y.orientation==="h"?(V=h,c.xLabelVal=A.x,c.yLabelVal=U):(V=d,c.xLabelVal=U,c.yLabelVal=A.y);var q=V._id.charAt(0);return c[q+"Spike"]=V.c2p(b.pos,!0),t(A,y,c),c}Z.exports={hoverPoints:r,hoverOnBoxes:a,hoverOnPoints:l}}}),BL=Ne({"src/traces/box/event_data.js"(te,Z){Z.exports=function(w,C){return C.hoverOnBox&&(w.hoverOnBox=C.hoverOnBox),"xVal"in C&&(w.x=C.xVal),"yVal"in C&&(w.y=C.yVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),Qw=Ne({"src/traces/box/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i;if(C===!1)for(l=0;l<P.length;l++)for(i=0;i<(P[l].pts||[]).length;i++)P[l].pts[i].selected=0;else for(l=0;l<P.length;l++)for(i=0;i<(P[l].pts||[]).length;i++){var s=P[l].pts[i],o=t.c2p(s.x),u=r.c2p(s.y);C.contains([o,u],null,s.i,w)?(a.push({pointNumber:s.i,x:t.c2d(s.x),y:r.c2d(s.y)}),s.selected=1):s.selected=0}return a}}}),zA=Ne({"src/traces/box/index.js"(te,Z){Z.exports={attributes:Fg(),layoutAttributes:Ny(),supplyDefaults:G0().supplyDefaults,crossTraceDefaults:G0().crossTraceDefaults,supplyLayoutDefaults:DA().supplyLayoutDefaults,calc:Rh(),crossTraceCalc:jx().crossTraceCalc,plot:Ux().plot,style:Jw().style,styleOnSelect:Jw().styleOnSelect,hoverPoints:OA().hoverPoints,eventData:BL(),selectPoints:Qw(),moduleType:"trace",name:"box",basePlotModule:Lh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}}}),NA=Ne({"lib/box.js"(te,Z){Z.exports=zA()}}),Bd=Ne({"src/traces/heatmap/attributes.js"(te,Z){var v=Vu(),{extendFlat:w}=co(),C=ns(),{axisHoverFormat:P}=bc(),t=$o(),{hovertemplateAttrs:r,templatefallbackAttrs:a,texttemplateAttrs:l}=Il(),i=Jc();Z.exports=w({z:{valType:"data_array",editType:"calc"},x:w({},i.x,{impliedEdits:{xtype:"array"}}),x0:w({},i.x0,{impliedEdits:{xtype:"scaled"}}),dx:w({},i.dx,{impliedEdits:{xtype:"scaled"}}),y:w({},i.y,{impliedEdits:{ytype:"array"}}),y0:w({},i.y0,{impliedEdits:{ytype:"scaled"}}),dy:w({},i.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:w({},i.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:w({},i.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:w({},i.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:w({},i.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:w({},i.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:w({},i.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:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:r(),hovertemplatefallback:a(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:a({editType:"plot"}),textfont:t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:w({},C.showlegend,{dflt:!1}),zorder:i.zorder},v("",{cLetter:"z",autoColorDflt:!1}))}}),Ih=Ne({"src/traces/heatmap/xyz_defaults.js"(te,Z){var v=la(),w=In(),C=Xo();Z.exports=function(a,l,i,s,o,u){var d=i("z");o=o||"x",u=u||"y";var h,y;if(d===void 0||!d.length)return 0;if(w.isArray1D(d)){h=i(o),y=i(u);var m=w.minRowLength(h),E=w.minRowLength(y);if(m===0||E===0)return 0;l._length=Math.min(m,E,d.length)}else{if(h=P(o,i),y=P(u,i),!t(d))return 0;i("transpose"),l._length=null}var c=C.getComponentMethod("calendars","handleTraceDefaults");return c(a,l,[o,u],s),!0};function P(r,a){var l=a(r),i=l?a(r+"type","array"):"scaled";return i==="scaled"&&(a(r+"0"),a("d"+r)),l}function t(r){for(var a=!0,l=!1,i=!1,s,o=0;o<r.length;o++){if(s=r[o],!w.isArrayOrTypedArray(s)){a=!1;break}s.length>0&&(l=!0);for(var u=0;u<s.length;u++)if(v(s[u])){i=!0;break}}return a&&l&&i}}}),Bg=Ne({"src/traces/heatmap/label_defaults.js"(te,Z){var v=In();Z.exports=function(C,P){C("texttemplate"),C("texttemplatefallback");var t=v.extendFlat({},P.font,{color:"auto",size:"auto"});v.coerceFont(C,"textfont",t)}}}),e_=Ne({"src/traces/heatmap/style_defaults.js"(te,Z){Z.exports=function(w,C,P){var t=P("zsmooth");t===!1&&(P("xgap"),P("ygap")),P("zhoverformat")}}}),e2=Ne({"src/traces/heatmap/defaults.js"(te,Z){var v=In(),w=Ih(),C=Bg(),P=Rm(),t=e_(),r=Ph(),a=Bd();Z.exports=function(i,s,o,u){function d(y,m){return v.coerce(i,s,a,y,m)}var h=w(i,s,d,u);if(!h){s.visible=!1;return}P(i,s,u,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),C(d,u),t(i,s,d,u),d("hoverongaps"),d("connectgaps",v.isArray1D(s.z)&&s.zsmooth!==!1),r(i,s,u,d,{prefix:"",cLetter:"z"}),d("zorder")}}}),t2=Ne({"src/traces/histogram/bin_functions.js"(te,Z){var v=la();Z.exports={count:function(w,C,P){return P[w]++,1},sum:function(w,C,P,t){var r=t[C];return v(r)?(r=Number(r),P[w]+=r,r):0},avg:function(w,C,P,t,r){var a=t[C];return v(a)&&(a=Number(a),P[w]+=a,r[w]++),0},min:function(w,C,P,t){var r=t[C];if(v(r))if(r=Number(r),v(P[w])){if(P[w]>r){var a=r-P[w];return P[w]=r,a}}else return P[w]=r,r;return 0},max:function(w,C,P,t){var r=t[C];if(v(r))if(r=Number(r),v(P[w])){if(P[w]<r){var a=r-P[w];return P[w]=r,a}}else return P[w]=r,r;return 0}}}}),l0=Ne({"src/traces/histogram/norm_functions.js"(te,Z){Z.exports={percent:function(v,w){for(var C=v.length,P=100/w,t=0;t<C;t++)v[t]*=P},probability:function(v,w){for(var C=v.length,P=0;P<C;P++)v[P]/=w},density:function(v,w,C,P){var t=v.length;P=P||1;for(var r=0;r<t;r++)v[r]*=C[r]*P},"probability density":function(v,w,C,P){var t=v.length;P&&(w/=P);for(var r=0;r<t;r++)v[r]*=C[r]/w}}}}),qx=Ne({"src/traces/histogram/average.js"(te,Z){Z.exports=function(w,C){for(var P=w.length,t=0,r=0;r<P;r++)C[r]?(w[r]/=C[r],t+=w[r]):w[r]=null;return t}}}),r2=Ne({"src/traces/histogram/bin_label_vals.js"(te,Z){var v=ja(),w=v.ONEAVGYEAR,C=v.ONEAVGMONTH,P=v.ONEDAY,t=v.ONEHOUR,r=v.ONEMIN,a=v.ONESEC,l=Os().tickIncrement;Z.exports=function(h,y,m,E,c){var _=-1.1*y,T=-.1*y,M=h-T,k=m[0],b=m[1],A=Math.min(i(k+T,k+M,E,c),i(b+T,b+M,E,c)),g=Math.min(i(k+_,k+T,E,c),i(b+_,b+T,E,c)),f,p;if(A>g&&g<Math.abs(b-k)/4e3?(f=A,p=!1):(f=Math.min(A,g),p=!0),E.type==="date"&&f>P){var x=f===w?1:6,N=f===w?"M12":"M1";return function(D,B){var U=E.c2d(D,w,c),V=U.indexOf("-",x);V>0&&(U=U.substr(0,V));var q=E.d2c(U,0,c);if(q<D){var z=l(q,N,!1,c);(q+z)/2<D+h&&(q=z)}return B&&p?l(q,N,!0,c):q}}return function(D,B){var U=f*Math.round(D/f);return U+f/10<D&&U+f*.9<D+h&&(U+=f),B&&p&&(U-=f),U}};function i(d,h,y,m){if(d*h<=0)return 1/0;for(var E=Math.abs(h-d),c=y.type==="date",_=s(E,c),T=0;T<10;T++){var M=s(_*80,c);if(_===M)break;if(o(M,d,h,c,y,m))_=M;else break}return _}function s(d,h){return h&&d>a?d>P?d>w*1.1?w:d>C*1.1?C:P:d>t?t:d>r?r:a:Math.pow(10,Math.floor(Math.log(d)/Math.LN10))}function o(d,h,y,m,E,c){if(m&&d>P){var _=u(h,E,c),T=u(y,E,c),M=d===w?0:1;return _[M]!==T[M]}return Math.floor(y/d)-Math.floor(h/d)>.1}function u(d,h,y){var m=h.c2d(d,w,y).split("-");return m[0]===""&&(m.unshift(),m[0]="-"+m[0]),m}}}),n2=Ne({"src/traces/histogram/calc.js"(te,Z){var v=la(),w=In(),C=Xo(),P=Os(),{hasColorscale:t}=Od(),r=Nd(),a=Nm(),l=t2(),i=l0(),s=qx(),o=r2();function u(E,c){var _=[],T=[],M=c.orientation==="h",k=P.getFromId(E,M?c.yaxis:c.xaxis),b=M?"y":"x",A={x:"y",y:"x"}[b],g=c[b+"calendar"],f=c.cumulative,p,x=d(E,c,k,b),N=x[0],D=x[1],B=typeof N.size=="string",U=[],V=B?U:N,q=[],z=[],H=[],G=0,J=c.histnorm,le=c.histfunc,ye=J.indexOf("density")!==-1,de,me,W;f.enabled&&ye&&(J=J.replace(/ ?density$/,""),ye=!1);var ie=le==="max"||le==="min",se=ie?null:0,ee=l.count,pe=i[J],oe=!1,Y=function(Ye){return k.r2c(Ye,0,g)},ce;for(w.isArrayOrTypedArray(c[A])&&le!=="count"&&(ce=c[A],oe=le==="avg",ee=l[le]),p=Y(N.start),me=Y(N.end)+(p-P.tickIncrement(p,N.size,!1,g))/1e6;p<me&&_.length<1e6&&(de=P.tickIncrement(p,N.size,!1,g),_.push((p+de)/2),T.push(se),H.push([]),U.push(p),ye&&q.push(1/(de-p)),oe&&z.push(0),!(de<=p));)p=de;U.push(p),!B&&k.type==="date"&&(V={start:Y(V.start),end:Y(V.end),size:V.size}),E._fullLayout._roundFnOpts||(E._fullLayout._roundFnOpts={});var ue=c["_"+b+"bingroup"],_e={leftGap:1/0,rightGap:1/0};ue&&(E._fullLayout._roundFnOpts[ue]||(E._fullLayout._roundFnOpts[ue]=_e),_e=E._fullLayout._roundFnOpts[ue]);var Le=T.length,ze=!0,Ge=_e.leftGap,Ve=_e.rightGap,rt={};for(p=0;p<D.length;p++){var pt=D[p];W=w.findBin(pt,V),W>=0&&W<Le&&(G+=ee(W,p,T,ce,z),ze&&H[W].length&&pt!==D[H[W][0]]&&(ze=!1),H[W].push(p),rt[p]=W,Ge=Math.min(Ge,pt-U[W]),Ve=Math.min(Ve,U[W+1]-pt))}_e.leftGap=Ge,_e.rightGap=Ve;var gt;ze||(gt=function(Ye,mt){return function(){var bt=E._fullLayout._roundFnOpts[ue];return o(bt.leftGap,bt.rightGap,U,k,g)(Ye,mt)}}),oe&&(G=s(T,z)),pe&&pe(T,G,q),f.enabled&&m(T,f.direction,f.currentbin);var ht=Math.min(_.length,T.length),lt=[],Fe=0,Pe=ht-1;for(p=0;p<ht;p++)if(T[p]){Fe=p;break}for(p=ht-1;p>=Fe;p--)if(T[p]){Pe=p;break}for(p=Fe;p<=Pe;p++)if(v(_[p])&&v(T[p])){var be={p:_[p],s:T[p],b:0};f.enabled||(be.pts=H[p],ze?be.ph0=be.ph1=H[p].length?D[H[p][0]]:_[p]:(c._computePh=!0,be.ph0=gt(U[p]),be.ph1=gt(U[p+1],!0))),lt.push(be)}return lt.length===1&&(lt[0].width1=P.tickIncrement(lt[0].p,N.size,!1,g)-lt[0].p),t(c,"marker")&&r(E,c,{vals:c.marker.color,containerStr:"marker",cLetter:"c"}),t(c,"marker.line")&&r(E,c,{vals:c.marker.line.color,containerStr:"marker.line",cLetter:"c"}),a(lt,c),w.isArrayOrTypedArray(c.selectedpoints)&&w.tagSelected(lt,c,rt),lt}function d(E,c,_,T,M){var k=T+"bins",b=E._fullLayout,A=c["_"+T+"bingroup"],g=b._histogramBinOpts[A],f=b.barmode==="overlay",p,x,N,D,B,U,V,q=function(pt){return _.r2c(pt,0,D)},z=function(pt){return _.c2r(pt,0,D)},H=_.type==="date"?function(pt){return pt||pt===0?w.cleanDate(pt,null,D):null}:function(pt){return v(pt)?Number(pt):null};function G(pt,gt,ht){gt[pt+"Found"]?(gt[pt]=H(gt[pt]),gt[pt]===null&&(gt[pt]=ht[pt])):(U[pt]=gt[pt]=ht[pt],w.nestedProperty(x[0],k+"."+pt).set(ht[pt]))}if(c["_"+T+"autoBinFinished"])delete c["_"+T+"autoBinFinished"];else{x=g.traces;var J=[],le=!0,ye=!1,de=!1;for(p=0;p<x.length;p++)if(N=x[p],N.visible){var me=g.dirs[p];B=N["_"+me+"pos0"]=_.makeCalcdata(N,me),J=w.concat(J,B),delete N["_"+T+"autoBinFinished"],c.visible===!0&&(le?le=!1:(delete N._autoBin,N["_"+T+"autoBinFinished"]=1),C.traceIs(N,"2dMap")&&(ye=!0),N.type==="histogram2dcontour"&&(de=!0))}D=x[0][T+"calendar"];var W=P.autoBin(J,_,g.nbins,ye,D,g.sizeFound&&g.size),ie=x[0]._autoBin={};if(U=ie[g.dirs[0]]={},de&&(g.size||(W.start=z(P.tickIncrement(q(W.start),W.size,!0,D))),g.end===void 0&&(W.end=z(P.tickIncrement(q(W.end),W.size,!1,D)))),f&&!C.traceIs(c,"2dMap")&&W._dataSpan===0&&_.type!=="category"&&_.type!=="multicategory"&&c.bingroup===""&&typeof c.xbins>"u"){if(M)return[W,B,!0];W=h(E,c,_,T,k)}V=N.cumulative||{},V.enabled&&V.currentbin!=="include"&&(V.direction==="decreasing"?W.start=z(P.tickIncrement(q(W.start),W.size,!0,D)):W.end=z(P.tickIncrement(q(W.end),W.size,!1,D))),g.size=W.size,g.sizeFound||(U.size=W.size,w.nestedProperty(x[0],k+".size").set(W.size)),G("start",g,W),G("end",g,W)}B=c["_"+T+"pos0"],delete c["_"+T+"pos0"];var se=c._input[k]||{},ee=w.extendFlat({},g),pe=g.start,oe=_.r2l(se.start),Y=oe!==void 0;if((g.startFound||Y)&&oe!==_.r2l(pe)){var ce=Y?oe:w.aggNums(Math.min,null,B),ue={type:_.type==="category"||_.type==="multicategory"?"linear":_.type,r2l:_.r2l,dtick:g.size,tick0:pe,calendar:D,range:[ce,P.tickIncrement(ce,g.size,!1,D)].map(_.l2r)},_e=P.tickFirst(ue);_e>_.r2l(ce)&&(_e=P.tickIncrement(_e,g.size,!0,D)),ee.start=_.l2r(_e),Y||w.nestedProperty(c,k+".start").set(ee.start)}var Le=g.end,ze=_.r2l(se.end),Ge=ze!==void 0;if((g.endFound||Ge)&&ze!==_.r2l(Le)){var Ve=Ge?ze:w.aggNums(Math.max,null,B);ee.end=_.l2r(Ve),Ge||w.nestedProperty(c,k+".start").set(ee.end)}var rt="autobin"+T;return c._input[rt]===!1&&(c._input[k]=w.extendFlat({},c[k]||{}),delete c._input[rt],delete c[rt]),[ee,B]}function h(E,c,_,T,M){var k=E._fullLayout,b=y(E,c),A=!1,g=1/0,f=[c],p,x,N;for(p=0;p<b.length;p++)if(x=b[p],x===c)A=!0;else if(!A)N=k._histogramBinOpts[x["_"+T+"bingroup"]],g=Math.min(g,N.size||x[M].size);else{var D=d(E,x,_,T,!0),B=D[0],U=D[2];x["_"+T+"autoBinFinished"]=1,x["_"+T+"pos0"]=D[1],U?f.push(x):g=Math.min(g,B.size)}var V=new Array(f.length);for(p=0;p<f.length;p++)for(var q=f[p]["_"+T+"pos0"],z=0;z<q.length;z++)if(q[z]!==void 0){V[p]=q[z];break}for(isFinite(g)||(g=w.distinctVals(V).minDiff),p=0;p<f.length;p++){x=f[p];var H=x[T+"calendar"],G={start:_.c2r(V[p]-g/2,0,H),end:_.c2r(V[p]+g/2,0,H),size:g};x._input[M]=x[M]=G,N=k._histogramBinOpts[x["_"+T+"bingroup"]],N&&w.extendFlat(N,G)}return c[M]}function y(E,c){for(var _=c.xaxis,T=c.yaxis,M=c.orientation,k=[],b=E._fullData,A=0;A<b.length;A++){var g=b[A];g.type==="histogram"&&g.visible===!0&&g.orientation===M&&g.xaxis===_&&g.yaxis===T&&k.push(g)}return k}function m(E,c,_){var T,M,k;function b(g){k=E[g],E[g]/=2}function A(g){M=E[g],E[g]=k+M/2,k+=M}if(_==="half")if(c==="increasing")for(b(0),T=1;T<E.length;T++)A(T);else for(b(E.length-1),T=E.length-2;T>=0;T--)A(T);else if(c==="increasing"){for(T=1;T<E.length;T++)E[T]+=E[T-1];_==="exclude"&&(E.unshift(0),E.pop())}else{for(T=E.length-2;T>=0;T--)E[T]+=E[T+1];_==="exclude"&&(E.push(0),E.shift())}}Z.exports={calc:u,calcAllAutoBins:d}}}),DM=Ne({"src/traces/histogram2d/calc.js"(te,Z){var v=In(),w=Os(),C=t2(),P=l0(),t=qx(),r=r2(),a=n2().calcAllAutoBins;Z.exports=function(u,d){var h=w.getFromId(u,d.xaxis),y=w.getFromId(u,d.yaxis),m=d.xcalendar,E=d.ycalendar,c=function($e){return h.r2c($e,0,m)},_=function($e){return y.r2c($e,0,E)},T=function($e){return h.c2r($e,0,m)},M=function($e){return y.c2r($e,0,E)},k,b,A,g,f=a(u,d,h,"x"),p=f[0],x=f[1],N=a(u,d,y,"y"),D=N[0],B=N[1],U=d._length;x.length>U&&x.splice(U,x.length-U),B.length>U&&B.splice(U,B.length-U);var V=[],q=[],z=[],H=typeof p.size=="string",G=typeof D.size=="string",J=[],le=[],ye=H?J:p,de=G?le:D,me=0,W=[],ie=[],se=d.histnorm,ee=d.histfunc,pe=se.indexOf("density")!==-1,oe=ee==="max"||ee==="min",Y=oe?null:0,ce=C.count,ue=P[se],_e=!1,Le=[],ze=[],Ge="z"in d?d.z:"marker"in d&&Array.isArray(d.marker.color)?d.marker.color:"";Ge&&ee!=="count"&&(_e=ee==="avg",ce=C[ee]);var Ve=p.size,rt=c(p.start),pt=c(p.end)+(rt-w.tickIncrement(rt,Ve,!1,m))/1e6;for(k=rt;k<pt;k=w.tickIncrement(k,Ve,!1,m))q.push(Y),J.push(k),_e&&z.push(0);J.push(k);var gt=q.length,ht=(k-rt)/gt,lt=T(rt+ht/2),Fe=D.size,Pe=_(D.start),be=_(D.end)+(Pe-w.tickIncrement(Pe,Fe,!1,E))/1e6;for(k=Pe;k<be;k=w.tickIncrement(k,Fe,!1,E)){V.push(q.slice()),le.push(k);var Ye=new Array(gt);for(b=0;b<gt;b++)Ye[b]=[];ie.push(Ye),_e&&W.push(z.slice())}le.push(k);var mt=V.length,bt=(k-Pe)/mt,ft=M(Pe+bt/2);pe&&(Le=l(q.length,ye,ht,H),ze=l(V.length,de,bt,G)),!H&&h.type==="date"&&(ye=i(c,ye)),!G&&y.type==="date"&&(de=i(_,de));var Wt=!0,Zt=!0,cr=new Array(gt),pr=new Array(mt),Br=1/0,Fr=1/0,cn=1/0,Nr=1/0;for(k=0;k<U;k++){var Jr=x[k],Dt=B[k];A=v.findBin(Jr,ye),g=v.findBin(Dt,de),A>=0&&A<gt&&g>=0&&g<mt&&(me+=ce(A,k,V[g],Ge,W[g]),ie[g][A].push(k),Wt&&(cr[A]===void 0?cr[A]=Jr:cr[A]!==Jr&&(Wt=!1)),Zt&&(pr[g]===void 0?pr[g]=Dt:pr[g]!==Dt&&(Zt=!1)),Br=Math.min(Br,Jr-J[A]),Fr=Math.min(Fr,J[A+1]-Jr),cn=Math.min(cn,Dt-le[g]),Nr=Math.min(Nr,le[g+1]-Dt))}if(_e)for(g=0;g<mt;g++)me+=t(V[g],W[g]);if(ue)for(g=0;g<mt;g++)ue(V[g],me,Le,ze[g]);return{x,xRanges:s(J,Wt&&cr,Br,Fr,h,m),x0:lt,dx:ht,y:B,yRanges:s(le,Zt&&pr,cn,Nr,y,E),y0:ft,dy:bt,z:V,pts:ie}};function l(o,u,d,h){var y=new Array(o),m;if(h)for(m=0;m<o;m++)y[m]=1/(u[m+1]-u[m]);else{var E=1/d;for(m=0;m<o;m++)y[m]=E}return y}function i(o,u){return{start:o(u.start),end:o(u.end),size:u.size}}function s(o,u,d,h,y,m){var E,c=o.length-1,_=new Array(c),T=r(d,h,o,y,m);for(E=0;E<c;E++){var M=(u||[])[E];_[E]=M===void 0?[T(o[E]),T(o[E+1],!0)]:[M,M]}return _}}}),a2=Ne({"src/traces/heatmap/convert_column_xyz.js"(te,Z){var v=In(),w=ja().BADNUM,C=Dm();Z.exports=function(t,r,a,l,i,s){var o=t._length,u=r.makeCalcdata(t,l),d=a.makeCalcdata(t,i);u=C(t,r,l,u).vals,d=C(t,a,i,d).vals;var h=t.text,y=h!==void 0&&v.isArray1D(h),m=t.hovertext,E=m!==void 0&&v.isArray1D(m),c,_,T=v.distinctVals(u),M=T.vals,k=v.distinctVals(d),b=k.vals,A=[],g,f,p=b.length,x=M.length;for(c=0;c<s.length;c++)A[c]=v.init2dArray(p,x);y&&(g=v.init2dArray(p,x)),E&&(f=v.init2dArray(p,x));var N=v.init2dArray(p,x);for(c=0;c<o;c++)if(u[c]!==w&&d[c]!==w){var D=v.findBin(u[c]+T.minDiff/2,M),B=v.findBin(d[c]+k.minDiff/2,b);for(_=0;_<s.length;_++){var U=s[_],V=t[U],q=A[_];q[B][D]=V[c],N[B][D]=c}y&&(g[B][D]=h[c]),E&&(f[B][D]=m[c])}for(t["_"+l]=M,t["_"+i]=b,_=0;_<s.length;_++)t["_"+s[_]]=A[_];y&&(t._text=g),E&&(t._hovertext=f),r&&r.type==="category"&&(t["_"+l+"CategoryMap"]=M.map(function(z){return r._categories[z]})),a&&a.type==="category"&&(t["_"+i+"CategoryMap"]=b.map(function(z){return a._categories[z]})),t._after2before=N}}}),i2=Ne({"src/traces/heatmap/clean_2d_array.js"(te,Z){var v=la(),w=In(),C=ja().BADNUM;Z.exports=function(t,r,a,l){var i,s,o,u,d,h;function y(M){if(v(M))return+M}if(r&&r.transpose){for(i=0,d=0;d<t.length;d++)i=Math.max(i,t[d].length);if(i===0)return!1;o=function(M){return M.length},u=function(M,k,b){return(M[b]||[])[k]}}else i=t.length,o=function(M,k){return M[k].length},u=function(M,k,b){return(M[k]||[])[b]};var m=function(M,k,b){return k===C||b===C?C:u(M,k,b)};function E(M){if(r&&r.type!=="carpet"&&r.type!=="contourcarpet"&&M&&M.type==="category"&&r["_"+M._id.charAt(0)].length){var k=M._id.charAt(0),b={},A=r["_"+k+"CategoryMap"]||r[k];for(d=0;d<A.length;d++)b[A[d]]=d;return function(g){var f=b[M._categories[g]];return f+1?f:C}}else return w.identity}var c=E(a),_=E(l);l&&l.type==="category"&&(i=l._categories.length);var T=new Array(i);for(d=0;d<i;d++)for(a&&a.type==="category"?s=a._categories.length:s=o(t,d),T[d]=new Array(s),h=0;h<s;h++)T[d][h]=y(m(t,_(d),c(h)));return T}}}),o2=Ne({"src/traces/heatmap/interp2d.js"(te,Z){var v=In(),w=.01,C=[[-1,0],[1,0],[0,-1],[0,1]];function P(r){return .5-.25*Math.min(1,r*.5)}Z.exports=function(a,l){var i=1,s;for(t(a,l),s=0;s<l.length&&!(l[s][2]<4);s++);for(l=l.slice(s),s=0;s<100&&i>w;s++)i=t(a,l,P(i));return i>w&&v.log("interp2d didn't converge quickly",i),a};function t(r,a,l){var i=0,s,o,u,d,h,y,m,E,c,_,T,M,k;for(d=0;d<a.length;d++){for(s=a[d],o=s[0],u=s[1],T=r[o][u],_=0,c=0,h=0;h<4;h++)y=C[h],m=r[o+y[0]],m&&(E=m[u+y[1]],E!==void 0&&(_===0?M=k=E:(M=Math.min(M,E),k=Math.max(k,E)),c++,_+=E));if(c===0)throw"iterateInterp2d order is wrong: no defined neighbors";r[o][u]=_/c,T===void 0?c<4&&(i=1):(r[o][u]=(1+l)*r[o][u]-l*T,k>M&&(i=Math.max(i,Math.abs(r[o][u]-T)/(k-M))))}return i}}}),s2=Ne({"src/traces/heatmap/find_empties.js"(te,Z){var v=In().maxRowLength;Z.exports=function(C){var P=[],t={},r=[],a=C[0],l=[],i=[0,0,0],s=v(C),o,u,d,h,y,m,E,c;for(u=0;u<C.length;u++)for(o=l,l=a,a=C[u+1]||[],d=0;d<s;d++)l[d]===void 0&&(m=(l[d-1]!==void 0?1:0)+(l[d+1]!==void 0?1:0)+(o[d]!==void 0?1:0)+(a[d]!==void 0?1:0),m?(u===0&&m++,d===0&&m++,u===C.length-1&&m++,d===l.length-1&&m++,m<4&&(t[[u,d]]=[u,d,m]),P.push([u,d,m])):r.push([u,d]));for(;r.length;){for(E={},c=!1,y=r.length-1;y>=0;y--)h=r[y],u=h[0],d=h[1],m=((t[[u-1,d]]||i)[2]+(t[[u+1,d]]||i)[2]+(t[[u,d-1]]||i)[2]+(t[[u,d+1]]||i)[2])/20,m&&(E[h]=[u,d,m],r.splice(y,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(h in E)t[h]=E[h],P.push(E[h])}return P.sort(function(_,T){return T[2]-_[2]})}}}),FA=Ne({"src/traces/heatmap/make_bound_array.js"(te,Z){var v=Xo(),w=In().isArrayOrTypedArray;Z.exports=function(P,t,r,a,l,i){var s=[],o=v.traceIs(P,"contour"),u=v.traceIs(P,"histogram"),d,h,y,m=w(t)&&t.length>1;if(m&&!u&&i.type!=="category"){var E=t.length;if(E<=l){if(o)s=Array.from(t).slice(0,l);else if(l===1)i.type==="log"?s=[.5*t[0],2*t[0]]:s=[t[0]-.5,t[0]+.5];else if(i.type==="log"){for(s=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],y=1;y<E;y++)s.push(Math.sqrt(t[y-1]*t[y]));s.push(Math.pow(t[E-1],1.5)/Math.pow(t[E-2],.5))}else{for(s=[1.5*t[0]-.5*t[1]],y=1;y<E;y++)s.push((t[y-1]+t[y])*.5);s.push(1.5*t[E-1]-.5*t[E-2])}if(E<l){var c=s[s.length-1],_;if(i.type==="log")for(_=c/s[s.length-2],y=E;y<l;y++)c*=_,s.push(c);else for(_=c-s[s.length-2],y=E;y<l;y++)c+=_,s.push(c)}}else return o?t.slice(0,l):t.slice(0,l+1)}else{var T=P[i._id.charAt(0)+"calendar"];if(u)d=i.r2c(r,0,T);else if(w(t)&&t.length===1)d=t[0];else if(r===void 0)d=0;else{var M=i.type==="log"?i.d2c:i.r2c;d=M(r,0,T)}for(h=a||1,y=o?0:-.5;y<l;y++)s.push(d+h*y)}return s}}}),Vx=Ne({"src/traces/heatmap/calc.js"(te,Z){var v=Xo(),w=In(),C=Os(),P=Dm(),t=DM(),r=Nd(),a=a2(),l=i2(),i=o2(),s=s2(),o=FA(),u=ja().BADNUM;Z.exports=function(m,E){var c=C.getFromId(m,E.xaxis||"x"),_=C.getFromId(m,E.yaxis||"y"),T=v.traceIs(E,"contour"),M=v.traceIs(E,"histogram"),k=T?"best":E.zsmooth,b,A,g,f,p,x,N,D,B,U,V;if(c._minDtick=0,_._minDtick=0,M)V=t(m,E),f=V.orig_x,b=V.x,A=V.x0,g=V.dx,D=V.orig_y,p=V.y,x=V.y0,N=V.dy,B=V.z;else{var q=E.z;w.isArray1D(q)?(a(E,c,_,"x","y",["z"]),b=E._x,p=E._y,q=E._z):(f=E.x?c.makeCalcdata(E,"x"):[],D=E.y?_.makeCalcdata(E,"y"):[],b=P(E,c,"x",f).vals,p=P(E,_,"y",D).vals,E._x=b,E._y=p),A=E.x0,g=E.dx,x=E.y0,N=E.dy,B=l(q,E,c,_)}(c.rangebreaks||_.rangebreaks)&&(B=h(b,p,B),M||(b=d(b),p=d(p),E._x=b,E._y=p)),!M&&(T||E.connectgaps)&&(E._emptypoints=s(B),i(B,E._emptypoints));function z(ie){k=E._input.zsmooth=E.zsmooth=!1,w.warn('cannot use zsmooth: "fast": '+ie)}function H(ie){if(ie.length>1){var se=(ie[ie.length-1]-ie[0])/(ie.length-1),ee=Math.abs(se/100);for(U=0;U<ie.length-1;U++)if(Math.abs(ie[U+1]-ie[U]-se)>ee)return!1}return!0}E._islinear=!1,c.type==="log"||_.type==="log"?k==="fast"&&z("log axis found"):H(b)?H(p)?E._islinear=!0:k==="fast"&&z("y scale is not linear"):k==="fast"&&z("x scale is not linear");var G=w.maxRowLength(B),J=E.xtype==="scaled"?"":b,le=o(E,J,A,g,G,c),ye=E.ytype==="scaled"?"":p,de=o(E,ye,x,N,B.length,_);E._extremes[c._id]=C.findExtremes(c,le),E._extremes[_._id]=C.findExtremes(_,de);var me={x:le,y:de,z:B,text:E._text||E.text,hovertext:E._hovertext||E.hovertext};if(E.xperiodalignment&&f&&(me.orig_x=f),E.yperiodalignment&&D&&(me.orig_y=D),J&&J.length===le.length-1&&(me.xCenter=J),ye&&ye.length===de.length-1&&(me.yCenter=ye),M&&(me.xRanges=V.xRanges,me.yRanges=V.yRanges,me.pts=V.pts),T||r(m,E,{vals:B,cLetter:"z"}),T&&E.contours&&E.contours.coloring==="heatmap"){var W={type:E.type==="contour"?"heatmap":"histogram2d",xcalendar:E.xcalendar,ycalendar:E.ycalendar};me.xfill=o(W,J,A,g,G,c),me.yfill=o(W,ye,x,N,B.length,_)}return[me]};function d(y){for(var m=[],E=y.length,c=0;c<E;c++){var _=y[c];_!==u&&m.push(_)}return m}function h(y,m,E){for(var c=[],_=-1,T=0;T<E.length;T++)if(m[T]!==u){_++,c[_]=[];for(var M=0;M<E[T].length;M++)y[M]!==u&&c[_].push(E[T][M])}return c}}}),l2=Ne({"src/constants/pixelated_image.js"(te){te.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"]],te.STYLE=te.CSS_DECLARATIONS.map(function(Z){return Z.join(": ")+"; "}).join("")}}),OM=Ne({"src/lib/supports_pixelated_image.js"(te,Z){var v=l2(),w=zs(),C=In(),P=null;function t(){if(P!==null)return P;P=!1;var r=C.isSafari()||C.isMacWKWebView()||C.isIOS();if(window.navigator.userAgent&&!r){var a=Array.from(v.CSS_DECLARATIONS).reverse(),l=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof l=="function")P=a.some(function(u){return l.apply(null,u)});else{var i=w.tester.append("image").attr("style",v.STYLE),s=window.getComputedStyle(i.node()),o=s.imageRendering;P=a.some(function(u){var d=u[1];return o===d||o===d.toLowerCase()}),i.remove()}}return P}Z.exports=t}}),u2=Ne({"src/traces/heatmap/plot.js"(te,Z){var v=xn(),w=Ro(),C=Xo(),P=zs(),t=Os(),r=In(),a=uc(),l=sm(),i=io(),s=Dc().extractOpts,o=Dc().makeColorScaleFuncFromTrace,u=cp(),d=bd(),h=d.LINE_SPACING,y=OM(),m=l2().STYLE,E="heatmap-label";function c(b){return b.selectAll("g."+E)}function _(b){c(b).remove()}Z.exports=function(b,A,g,f){var p=A.xaxis,x=A.yaxis;r.makeTraceGroups(f,g,"hm").each(function(N){var D=v.select(this),B=N[0],U=B.trace,V=U.xgap||0,q=U.ygap||0,z=B.z,H=B.x,G=B.y,J=B.xCenter,le=B.yCenter,ye=C.traceIs(U,"contour"),de=ye?"best":U.zsmooth,me=z.length,W=r.maxRowLength(z),ie=!1,se=!1,ee,pe,oe,Y,ce,ue,_e,Le;for(ue=0;ee===void 0&&ue<H.length-1;)ee=p.c2p(H[ue]),ue++;for(ue=H.length-1;pe===void 0&&ue>0;)pe=p.c2p(H[ue]),ue--;for(pe<ee&&(oe=pe,pe=ee,ee=oe,ie=!0),ue=0;Y===void 0&&ue<G.length-1;)Y=x.c2p(G[ue]),ue++;for(ue=G.length-1;ce===void 0&&ue>0;)ce=x.c2p(G[ue]),ue--;ce<Y&&(oe=Y,Y=ce,ce=oe,se=!0),ye&&(J=H,le=G,H=B.xfill,G=B.yfill);var ze="default";if(de?ze=de==="best"?"smooth":"fast":U._islinear&&V===0&&q===0&&y()&&(ze="fast"),ze!=="fast"){var Ge=de==="best"?0:.5;ee=Math.max(-Ge*p._length,ee),pe=Math.min((1+Ge)*p._length,pe),Y=Math.max(-Ge*x._length,Y),ce=Math.min((1+Ge)*x._length,ce)}var Ve=Math.round(pe-ee),rt=Math.round(ce-Y),pt=ee>=p._length||pe<=0||Y>=x._length||ce<=0;if(pt){var gt=D.selectAll("image").data([]);gt.exit().remove(),_(D);return}var ht,lt;ze==="fast"?(ht=W,lt=me):(ht=Ve,lt=rt);var Fe=document.createElement("canvas");Fe.width=ht,Fe.height=lt;var Pe=Fe.getContext("2d",{willReadFrequently:!0}),be=o(U,{noNumericCheck:!0,returnArray:!0}),Ye,mt;ze==="fast"?(Ye=ie?function(Wn){return W-1-Wn}:r.identity,mt=se?function(Wn){return me-1-Wn}:r.identity):(Ye=function(Wn){return r.constrain(Math.round(p.c2p(H[Wn])-ee),0,Ve)},mt=function(Wn){return r.constrain(Math.round(x.c2p(G[Wn])-Y),0,rt)});var bt=mt(0),ft=[bt,bt],Wt=ie?0:1,Zt=se?0:1,cr=0,pr=0,Br=0,Fr=0,cn,Nr,Jr,Dt,$e;function ot(Wn,Fi){if(Wn!==void 0){var Ya=be(Wn);return Ya[0]=Math.round(Ya[0]),Ya[1]=Math.round(Ya[1]),Ya[2]=Math.round(Ya[2]),cr+=Fi,pr+=Ya[0]*Fi,Br+=Ya[1]*Fi,Fr+=Ya[2]*Fi,Ya}return[0,0,0,0]}function De(Wn,Fi,Ya,Wi){var uo=Wn[Ya.bin0];if(uo===void 0)return ot(void 0,1);var Ao=Wn[Ya.bin1],wo=Fi[Ya.bin0],Uo=Fi[Ya.bin1],Ri=Ao-uo||0,ps=wo-uo||0,as;return Ao===void 0?Uo===void 0?as=0:wo===void 0?as=2*(Uo-uo):as=(2*Uo-wo-uo)*2/3:Uo===void 0?wo===void 0?as=0:as=(2*uo-Ao-wo)*2/3:wo===void 0?as=(2*Uo-Ao-uo)*2/3:as=Uo+uo-Ao-wo,ot(uo+Ya.frac*Ri+Wi.frac*(ps+Ya.frac*as))}if(ze!=="default"){var Ee=0,Ae;try{Ae=new Uint8Array(ht*lt*4)}catch{Ae=new Array(ht*lt*4)}if(ze==="smooth"){var Ie=J||H,tt=le||G,st=new Array(Ie.length),Ft=new Array(tt.length),Nt=new Array(Ve),Xt=J?M:T,lr=le?M:T,Rr,Mr,Sr;for(ue=0;ue<Ie.length;ue++)st[ue]=Math.round(p.c2p(Ie[ue])-ee);for(ue=0;ue<tt.length;ue++)Ft[ue]=Math.round(x.c2p(tt[ue])-Y);for(ue=0;ue<Ve;ue++)Nt[ue]=Xt(ue,st);for(_e=0;_e<rt;_e++)for(Rr=lr(_e,Ft),Mr=z[Rr.bin0],Sr=z[Rr.bin1],ue=0;ue<Ve;ue++,Ee+=4)$e=De(Mr,Sr,Nt[ue],Rr),k(Ae,Ee,$e)}else for(_e=0;_e<me;_e++)for(Dt=z[_e],ft=mt(_e),ue=0;ue<W;ue++)$e=ot(Dt[ue],1),Ee=(ft*W+Ye(ue))*4,k(Ae,Ee,$e);var Kr=Pe.createImageData(ht,lt);try{Kr.data.set(Ae)}catch{var qn=Kr.data,ha=qn.length;for(_e=0;_e<ha;_e++)qn[_e]=Ae[_e]}Pe.putImageData(Kr,0,0)}else{var ia=Math.floor(V/2),xa=Math.floor(q/2);for(_e=0;_e<me;_e++)if(Dt=z[_e],ft.reverse(),ft[Zt]=mt(_e+1),!(ft[0]===ft[1]||ft[0]===void 0||ft[1]===void 0))for(Nr=Ye(0),cn=[Nr,Nr],ue=0;ue<W;ue++)cn.reverse(),cn[Wt]=Ye(ue+1),!(cn[0]===cn[1]||cn[0]===void 0||cn[1]===void 0)&&(Jr=Dt[ue],$e=ot(Jr,(cn[1]-cn[0])*(ft[1]-ft[0])),Pe.fillStyle="rgba("+$e.join(",")+")",Pe.fillRect(cn[0]+ia,ft[0]+xa,cn[1]-cn[0]-V,ft[1]-ft[0]-q))}pr=Math.round(pr/cr),Br=Math.round(Br/cr),Fr=Math.round(Fr/cr);var ba=w("rgb("+pr+","+Br+","+Fr+")");b._hmpixcount=(b._hmpixcount||0)+cr,b._hmlumcount=(b._hmlumcount||0)+cr*ba.getLuminance();var ea=D.selectAll("image").data(N);ea.enter().append("svg:image").attr({xmlns:u.svg,preserveAspectRatio:"none"}),ea.attr({height:rt,width:Ve,x:ee,y:Y,"xlink:href":Fe.toDataURL("image/png")}),ze==="fast"&&!de&&ea.attr("style",m),_(D);var Za=U.texttemplate;if(Za){var ui=s(U),_r={type:"linear",range:[ui.min,ui.max],_separators:p._separators,_numFormat:p._numFormat},Qt=U.type==="histogram2dcontour",yr=U.type==="contour",br=yr?1:0,nn=yr?me-1:me,wn=yr?1:0,Ln=yr?W-1:W,Fn=[];for(ue=br;ue<nn;ue++){var va;if(yr)va=B.y[ue];else if(Qt){if(ue===0||ue===me-1)continue;va=B.y[ue]}else if(B.yCenter)va=B.yCenter[ue];else{if(ue+1===me&&B.y[ue+1]===void 0)continue;va=(B.y[ue]+B.y[ue+1])/2}var Da=Math.round(x.c2p(va));if(!(0>Da||Da>x._length))for(_e=wn;_e<Ln;_e++){var Pa;if(yr)Pa=B.x[_e];else if(Qt){if(_e===0||_e===W-1)continue;Pa=B.x[_e]}else if(B.xCenter)Pa=B.xCenter[_e];else{if(_e+1===W&&B.x[_e+1]===void 0)continue;Pa=(B.x[_e]+B.x[_e+1])/2}var Fa=Math.round(p.c2p(Pa));if(!(0>Fa||Fa>p._length)){var $a=l({x:Pa,y:va},U,b._fullLayout);$a.x=Pa,$a.y=va;var oa=B.z[ue][_e];oa===void 0?($a.z="",$a.zLabel=""):($a.z=oa,$a.zLabel=t.tickText(_r,oa,"hover").text);var zi=B.text&&B.text[ue]&&B.text[ue][_e];(zi===void 0||zi===!1)&&(zi=""),$a.text=zi;var Gi=r.texttemplateString({data:[$a,U._meta],fallback:U.texttemplatefallback,labels:$a,locale:b._fullLayout._d3locale,template:Za});if(Gi){var qt=Gi.split("<br>"),Ct=qt.length,Ur=0;for(Le=0;Le<Ct;Le++)Ur=Math.max(Ur,qt[Le].length);Fn.push({l:Ct,c:Ur,t:Gi,x:Fa,y:Da,z:oa})}}}}var Qr=U.textfont,tn=Qr.size,Xr=b._fullLayout.font.size;if(!tn||tn==="auto"){var en=1/0,Tn=1/0,hn=0,Rt=0;for(Le=0;Le<Fn.length;Le++){var xr=Fn[Le];if(hn=Math.max(hn,xr.l),Rt=Math.max(Rt,xr.c),Le<Fn.length-1){var Wr=Fn[Le+1],An=Math.abs(Wr.x-xr.x),Xn=Math.abs(Wr.y-xr.y);An&&(en=Math.min(en,An)),Xn&&(Tn=Math.min(Tn,Xn))}}!isFinite(en)||!isFinite(Tn)?tn=Xr:(en-=V,Tn-=q,en/=Rt,Tn/=hn,en/=h/2,Tn/=h,tn=Math.min(Math.floor(en),Math.floor(Tn),Xr))}if(tn<=0||!isFinite(tn))return;var na=function(Wn){return Wn.x},ra=function(Wn){return Wn.y-tn*(Wn.l*h/2-1)},Sn=c(D).data(Fn);Sn.enter().append("g").classed(E,1).append("text").attr("text-anchor","middle").each(function(Wn){var Fi=v.select(this),Ya=Qr.color;(!Ya||Ya==="auto")&&(Ya=i.contrast(Wn.z===void 0?b._fullLayout.plot_bgcolor:"rgba("+be(Wn.z).join()+")")),Fi.attr("data-notex",1).call(a.positionText,na(Wn),ra(Wn)).call(P.font,{family:Qr.family,size:tn,color:Ya,weight:Qr.weight,style:Qr.style,variant:Qr.variant,textcase:Qr.textcase,lineposition:Qr.lineposition,shadow:Qr.shadow}).text(Wn.t).call(a.convertToTspans,b)})}})};function T(b,A){var g=A.length-2,f=r.constrain(r.findBin(b,A),0,g),p=A[f],x=A[f+1],N=r.constrain(f+(b-p)/(x-p)-.5,0,g),D=Math.round(N),B=Math.abs(N-D);return!N||N===g||!B?{bin0:D,bin1:D,frac:0}:{bin0:D,frac:B,bin1:Math.round(D+B/(N-D))}}function M(b,A){var g=A.length-1,f=r.constrain(r.findBin(b,A),0,g),p=A[f],x=A[f+1],N=(b-p)/(x-p)||0;return N<=0?{bin0:f,bin1:f,frac:0}:N<.5?{bin0:f,bin1:f+1,frac:N}:{bin0:f+1,bin1:f,frac:1-N}}function k(b,A,g){b[A]=g[0],b[A+1]=g[1],b[A+2]=g[2],b[A+3]=Math.round(g[3]*255)}}}),Fy=Ne({"src/traces/heatmap/colorbar.js"(te,Z){Z.exports={min:"zmin",max:"zmax"}}}),c2=Ne({"src/traces/heatmap/style.js"(te,Z){var v=xn();Z.exports=function(C){v.select(C).selectAll(".hm image").style("opacity",function(P){return P.trace.opacity})}}}),Hx=Ne({"src/traces/heatmap/hover.js"(te,Z){var v=nh(),w=In(),C=w.isArrayOrTypedArray,P=Os(),t=Dc().extractOpts;Z.exports=function(a,l,i,s,o){o||(o={});var u=o.isContour,d=a.cd[0],h=d.trace,y=a.xa,m=a.ya,E=d.x,c=d.y,_=d.z,T=d.xCenter,M=d.yCenter,k=d.zmask,b=h.zhoverformat,A=E,g=c,f,p,x,N;if(a.index!==!1){try{x=Math.round(a.index[1]),N=Math.round(a.index[0])}catch{w.error("Error hovering on heatmap, pointNumber must be [row,col], found:",a.index);return}if(x<0||x>=_[0].length||N<0||N>_.length)return}else{if(v.inbox(l-E[0],l-E[E.length-1],0)>0||v.inbox(i-c[0],i-c[c.length-1],0)>0)return;if(u){var D;for(A=[2*E[0]-E[1]],D=1;D<E.length;D++)A.push((E[D]+E[D-1])/2);for(A.push([2*E[E.length-1]-E[E.length-2]]),g=[2*c[0]-c[1]],D=1;D<c.length;D++)g.push((c[D]+c[D-1])/2);g.push([2*c[c.length-1]-c[c.length-2]])}x=Math.max(0,Math.min(A.length-2,w.findBin(l,A))),N=Math.max(0,Math.min(g.length-2,w.findBin(i,g)))}var B=y.c2p(E[x]),U=y.c2p(E[x+1]),V=m.c2p(c[N]),q=m.c2p(c[N+1]),z,H;u?(z=d.orig_x||E,H=d.orig_y||c,U=B,f=z[x],q=V,p=H[N]):(z=d.orig_x||T||E,H=d.orig_y||M||c,f=T?z[x]:(z[x]+z[x+1])/2,p=M?H[N]:(H[N]+H[N+1])/2,y&&y.type==="category"&&(f=E[x]),m&&m.type==="category"&&(p=c[N]),h.zsmooth&&(B=U=y.c2p(f),V=q=m.c2p(p)));var G=_[N][x];if(k&&!k[N][x]&&(G=void 0),!(G===void 0&&!h.hoverongaps)){var J;C(d.hovertext)&&C(d.hovertext[N])?J=d.hovertext[N][x]:C(d.text)&&C(d.text[N])&&(J=d.text[N][x]);var le=t(h),ye={type:"linear",range:[le.min,le.max],hoverformat:b,_separators:y._separators,_numFormat:y._numFormat},de=P.tickText(ye,G,"hover").text;return[w.extendFlat(a,{index:h._after2before?h._after2before[N][x]:[N,x],distance:a.maxHoverDistance,spikeDistance:a.maxSpikeDistance,x0:B,x1:U,y0:V,y1:q,xLabelVal:f,yLabelVal:p,zLabelVal:G,zLabel:de,text:J})]}}}}),zM=Ne({"src/traces/heatmap/index.js"(te,Z){Z.exports={attributes:Bd(),supplyDefaults:e2(),calc:Vx(),plot:u2(),colorbar:Fy(),style:c2(),hoverPoints:Hx(),moduleType:"trace",name:"heatmap",basePlotModule:Lh(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}}}),NM=Ne({"lib/heatmap.js"(te,Z){Z.exports=zM()}}),BA=Ne({"src/traces/histogram/bin_attributes.js"(te,Z){Z.exports=function(w,C){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}}}),FM=Ne({"src/traces/histogram/constants.js"(te,Z){Z.exports={eventDataKeys:["binNumber"]}}}),f2=Ne({"src/traces/histogram/attributes.js"(te,Z){var v=rd(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,texttemplateAttrs:P,templatefallbackAttrs:t}=Il(),r=$o(),a=BA(),l=FM(),i=co().extendFlat;Z.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:w("x"),yhoverformat:w("y"),text:i({},v.text,{}),hovertext:i({},v.hovertext,{}),orientation:v.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:a("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:a("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:C({},{keys:l.eventDataKeys}),hovertemplatefallback:t(),texttemplate:P({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:t({editType:"plot"}),textposition:i({},v.textposition,{arrayOk:!1}),textfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:r({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:v.insidetextanchor,textangle:v.textangle,cliponaxis:v.cliponaxis,constraintext:v.constraintext,marker:v.marker,offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,zorder:v.zorder}}}),jL=Ne({"src/traces/histogram/defaults.js"(te,Z){var v=Xo(),w=In(),C=io(),P=vp().handleText,t=s0(),r=f2();Z.exports=function(l,i,s,o){function u(g,f){return w.coerce(l,i,r,g,f)}var d=u("x"),h=u("y"),y=u("cumulative.enabled");y&&(u("cumulative.direction"),u("cumulative.currentbin")),u("text");var m=u("textposition");P(l,i,o,u,m,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),u("xhoverformat"),u("yhoverformat");var E=u("orientation",h&&!d?"h":"v"),c=E==="v"?"x":"y",_=E==="v"?"y":"x",T=d&&h?Math.min(w.minRowLength(d)&&w.minRowLength(h)):w.minRowLength(i[c]||[]);if(!T){i.visible=!1;return}i._length=T;var M=v.getComponentMethod("calendars","handleTraceDefaults");M(l,i,["x","y"],o);var k=i[_];k&&u("histfunc"),u("histnorm"),u("autobin"+c),t(l,i,u,s,o),w.coerceSelectionMarkerOpacity(i,u);var b=(i.marker.line||{}).color,A=v.getComponentMethod("errorbars","supplyDefaults");A(l,i,b||C.defaultLine,{axis:"y"}),A(l,i,b||C.defaultLine,{axis:"x",inherit:"y"}),u("zorder")}}}),h2=Ne({"src/traces/histogram/cross_trace_defaults.js"(te,Z){var v=In(),w=Hf(),C=Xo().traceIs,P=j0(),t=vp().validateCornerradius,r=v.nestedProperty,a=Mg().getAxisGroup,l=[{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"}],i=["x","y"];Z.exports=function(o,u){var d=u._histogramBinOpts={},h=[],y={},m=[],E,c,_,T,M,k,b;function A(de,me){return v.coerce(E._input,E,E._module.attributes,de,me)}function g(de){return de.orientation==="v"?"x":"y"}function f(de,me){var W=w.getFromTrace({_fullLayout:u},de,me);return W.type}function p(de,me,W){var ie=de.uid+"__"+W;me||(me=ie);var se=f(de,W),ee=de[W+"calendar"]||"",pe=d[me],oe=!0;pe&&(se===pe.axType&&ee===pe.calendar?(oe=!1,pe.traces.push(de),pe.dirs.push(W)):(me=ie,se!==pe.axType&&v.warn(["Attempted to group the bins of trace",de.index,"set on a","type:"+se,"axis","with bins on","type:"+pe.axType,"axis."].join(" ")),ee!==pe.calendar&&v.warn(["Attempted to group the bins of trace",de.index,"set with a",ee,"calendar","with bins",pe.calendar?"on a "+pe.calendar+" calendar":"w/o a set calendar"].join(" ")))),oe&&(d[me]={traces:[de],dirs:[W],axType:se,calendar:de[W+"calendar"]||""}),de["_"+W+"bingroup"]=me}for(M=0;M<o.length;M++)if(E=o[M],C(E,"histogram")){if(h.push(E),delete E._xautoBinFinished,delete E._yautoBinFinished,E.type==="histogram"){var x=A("marker.cornerradius",u.barcornerradius);E.marker&&(E.marker.cornerradius=t(x))}C(E,"2dMap")||P(E._input,E,u,A,u.barmode)}var N=u._alignmentOpts||{};for(M=0;M<h.length;M++){if(E=h[M],_="",!C(E,"2dMap")){if(T=g(E),u.barmode==="group"&&E.alignmentgroup){var D=E[T+"axis"],B=a(u,D)+E.orientation;(N[B]||{})[E.alignmentgroup]&&(_=B)}!_&&u.barmode!=="overlay"&&(_=a(u,E.xaxis)+a(u,E.yaxis)+g(E))}_?(y[_]||(y[_]=[]),y[_].push(E)):m.push(E)}for(_ in y){if(c=y[_],c.length===1){m.push(c[0]);continue}var U=!1;for(c.length&&(E=c[0],U=A("bingroup")),_=U||_,M=0;M<c.length;M++){E=c[M];var V=E._input.bingroup;V&&V!==_&&v.warn(["Trace",E.index,"must match","within bingroup",_+".","Ignoring its bingroup:",V,"setting."].join(" ")),E.bingroup=_,p(E,_,g(E))}}for(M=0;M<m.length;M++){E=m[M];var q=A("bingroup");if(C(E,"2dMap"))for(b=0;b<2;b++){T=i[b];var z=A(T+"bingroup",q?q+"__"+T:null);p(E,z,T)}else p(E,q,g(E))}for(_ in d){var H=d[_];for(c=H.traces,k=0;k<l.length;k++){var G=l[k],J=G.name,le,ye;if(!(J==="nbins"&&H.sizeFound)){for(M=0;M<c.length;M++){if(E=c[M],T=H.dirs[M],le=G.aStr[T],r(E._input,le).get()!==void 0){H[J]=A(le),H[J+"Found"]=!0;break}ye=(E._autoBin||{})[T]||{},ye[J]&&r(E,le).set(ye[J])}if(J==="start"||J==="end")for(;M<c.length;M++)E=c[M],E["_"+T+"bingroup"]&&(ye=(E._autoBin||{})[T]||{},A(le,ye[J]));J==="nbins"&&!H.sizeFound&&!H.nbinsFound&&(E=c[0],H[J]=A(le))}}}}}}),t_=Ne({"src/traces/histogram/hover.js"(te,Z){var v=zc().hoverPoints,w=Os().hoverLabelText;Z.exports=function(P,t,r,a,l){var i=v(P,t,r,a,l);if(i){P=i[0];var s=P.cd[P.index],o=P.cd[0].trace;if(!o.cumulative.enabled){var u=o.orientation==="h"?"y":"x";P[u+"Label"]=w(P[u+"a"],[s.ph0,s.ph1],o[u+"hoverformat"])}return i}}}}),jA=Ne({"src/traces/histogram/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){if(w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"zLabelVal"in C&&(w.z=C.zLabelVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),!(P.cumulative||{}).enabled){var a=Array.isArray(r)?t[0].pts[r[0]][r[1]]:t[r].pts;w.pointNumbers=a,w.binNumber=w.pointNumber,delete w.pointNumber,delete w.pointIndex;var l;if(P._indexToPoints){l=[];for(var i=0;i<a.length;i++)l=l.concat(P._indexToPoints[a[i]])}else l=a;w.pointIndices=l}return w}}}),d2=Ne({"src/traces/histogram/index.js"(te,Z){Z.exports={attributes:f2(),layoutAttributes:dp(),supplyDefaults:jL(),crossTraceDefaults:h2(),supplyLayoutDefaults:IA(),calc:n2().calc,crossTraceCalc:U0().crossTraceCalc,plot:hu().plot,layerName:"barlayer",style:Fd().style,styleOnSelect:Fd().styleOnSelect,colorbar:ah(),hoverPoints:t_(),selectPoints:zy(),eventData:jA(),moduleType:"trace",name:"histogram",basePlotModule:Lh(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}}}),v2=Ne({"lib/histogram.js"(te,Z){Z.exports=d2()}}),p2=Ne({"src/traces/histogram2d/attributes.js"(te,Z){var v=f2(),w=BA(),C=Bd(),P=ns(),t=bc().axisHoverFormat,{hovertemplateAttrs:r,texttemplateAttrs:a,templatefallbackAttrs:l}=Il(),i=Vu(),s=co().extendFlat;Z.exports=s({x:v.x,y:v.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:w("x"),nbinsy:v.nbinsy,ybins:w("y"),autobinx:v.autobinx,autobiny:v.autobiny,bingroup:s({},v.bingroup,{}),xbingroup:s({},v.bingroup,{}),ybingroup:s({},v.bingroup,{}),xgap:C.xgap,ygap:C.ygap,zsmooth:C.zsmooth,xhoverformat:t("x"),yhoverformat:t("y"),zhoverformat:t("z",1),hovertemplate:r({},{keys:["z"]}),hovertemplatefallback:l(),texttemplate:a({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:l({editType:"plot"}),textfont:C.textfont,showlegend:s({},P.showlegend,{dflt:!1})},i("",{cLetter:"z",autoColorDflt:!1}))}}),m2=Ne({"src/traces/histogram2d/sample_defaults.js"(te,Z){var v=Xo(),w=In();Z.exports=function(P,t,r,a){var l=r("x"),i=r("y"),s=w.minRowLength(l),o=w.minRowLength(i);if(!s||!o){t.visible=!1;return}t._length=Math.min(s,o);var u=v.getComponentMethod("calendars","handleTraceDefaults");u(P,t,["x","y"],a);var d=r("z")||r("marker.color");d&&r("histfunc"),r("histnorm"),r("autobinx"),r("autobiny")}}}),UL=Ne({"src/traces/histogram2d/defaults.js"(te,Z){var v=In(),w=m2(),C=e_(),P=Ph(),t=Bg(),r=p2();Z.exports=function(l,i,s,o){function u(d,h){return v.coerce(l,i,r,d,h)}w(l,i,u,o),i.visible!==!1&&(C(l,i,u,o),P(l,i,o,u,{prefix:"",cLetter:"z"}),u("hovertemplate"),u("hovertemplatefallback"),t(u,o),u("xhoverformat"),u("yhoverformat"))}}}),BM=Ne({"src/traces/histogram2d/hover.js"(te,Z){var v=Hx(),w=Os().hoverLabelText;Z.exports=function(P,t,r,a,l){var i=v(P,t,r,a,l);if(i){P=i[0];var s=P.index,o=s[0],u=s[1],d=P.cd[0],h=d.trace,y=d.xRanges[u],m=d.yRanges[o];return P.xLabel=w(P.xa,[y[0],y[1]],h.xhoverformat),P.yLabel=w(P.ya,[m[0],m[1]],h.yhoverformat),i}}}}),jM=Ne({"src/traces/histogram2d/index.js"(te,Z){Z.exports={attributes:p2(),supplyDefaults:UL(),crossTraceDefaults:h2(),calc:Vx(),plot:u2(),layerName:"heatmaplayer",colorbar:Fy(),style:c2(),hoverPoints:BM(),eventData:jA(),moduleType:"trace",name:"histogram2d",basePlotModule:Lh(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}}}),UM=Ne({"lib/histogram2d.js"(te,Z){Z.exports=jM()}}),y2=Ne({"src/constants/filter_ops.js"(te,Z){Z.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),Gx=Ne({"src/traces/contour/attributes.js"(te,Z){var v=Bd(),w=Jc(),C=bc(),P=C.axisHoverFormat,t=C.descriptionOnlyNumbers,r=Vu(),a=Dd().dash,l=$o(),i=co().extendFlat,s=y2(),o=s.COMPARISON_OPS2,u=s.INTERVAL_OPS,d=w.line;Z.exports=i({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:w.xperiod0,yperiod0:w.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:i({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:i({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:i({},v.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:l({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:t("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(u),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i({},d.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:a,smoothing:i({},d.smoothing,{}),editType:"plot"},zorder:w.zorder},r("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),g2=Ne({"src/traces/histogram2dcontour/attributes.js"(te,Z){var v=p2(),w=Gx(),C=Vu(),P=bc().axisHoverFormat,t=co().extendFlat;Z.exports=t({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:w.autocontour,ncontours:w.ncontours,contours:w.contours,line:{color:w.line.color,width:t({},w.line.width,{dflt:.5}),dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:w.texttemplate,texttemplatefallback:w.texttemplatefallback,textfont:w.textfont},C("",{cLetter:"z",editTypeOverride:"calc"}))}}),_2=Ne({"src/traces/contour/contours_defaults.js"(te,Z){Z.exports=function(w,C,P,t){var r=t("contours.start"),a=t("contours.end"),l=r===!1||a===!1,i=P("contours.size"),s;l?s=C.autocontour=!0:s=P("autocontour",!1),(s||!i)&&P("ncontours")}}}),UA=Ne({"src/traces/contour/label_defaults.js"(te,Z){var v=In();Z.exports=function(C,P,t,r){r||(r={});var a=C("contours.showlabels");if(a){var l=P.font;v.coerceFont(C,"contours.labelfont",l,{overrideDflt:{color:t}}),C("contours.labelformat")}r.hasHover!==!1&&C("zhoverformat")}}}),Xx=Ne({"src/traces/contour/style_defaults.js"(te,Z){var v=Ph(),w=UA();Z.exports=function(P,t,r,a,l){var i=r("contours.coloring"),s,o="";i==="fill"&&(s=r("contours.showlines")),s!==!1&&(i!=="lines"&&(o=r("line.color","#000")),r("line.width",.5),r("line.dash")),i!=="none"&&(P.showlegend!==!0&&(t.showlegend=!1),t._dfltShowLegend=!1,v(P,t,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),w(r,a,o,l)}}}),qM=Ne({"src/traces/histogram2dcontour/defaults.js"(te,Z){var v=In(),w=m2(),C=_2(),P=Xx(),t=Bg(),r=g2();Z.exports=function(l,i,s,o){function u(h,y){return v.coerce(l,i,r,h,y)}function d(h){return v.coerce2(l,i,r,h)}w(l,i,u,o),i.visible!==!1&&(C(l,i,u,d),P(l,i,u,o),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),i.contours&&i.contours.coloring==="heatmap"&&t(u,o))}}}),qA=Ne({"src/traces/contour/set_contours.js"(te,Z){var v=Os(),w=In();Z.exports=function(t,r){var a=t.contours;if(t.autocontour){var l=t.zmin,i=t.zmax;(t.zauto||l===void 0)&&(l=w.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=w.aggNums(Math.max,null,r));var s=C(l,i,t.ncontours);a.size=s.dtick,a.start=v.tickFirst(s),s.range.reverse(),a.end=v.tickFirst(s),a.start===l&&(a.start+=a.size),a.end===i&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),t._input.contours||(t._input.contours={}),w.extendFlat(t._input.contours,{start:a.start,end:a.end,size:a.size}),t._input.autocontour=!0}else if(a.type!=="constraint"){var o=a.start,u=a.end,d=t._input.contours;if(o>u&&(a.start=d.start=u,u=a.end=d.end=o,o=a.start),!(a.size>0)){var h;o===u?h=1:h=C(o,u,t.ncontours).dtick,d.size=a.size=h}}};function C(P,t,r){var a={type:"linear",range:[P,t]};return v.autoTicks(a,(t-P)/(r||15)),a}}}),x2=Ne({"src/traces/contour/end_plus.js"(te,Z){Z.exports=function(w){return w.end+w.size/1e6}}}),b2=Ne({"src/traces/contour/calc.js"(te,Z){var v=Dc(),w=Vx(),C=qA(),P=x2();Z.exports=function(r,a){var l=w(r,a),i=l[0].z;C(a,i);var s=a.contours,o=v.extractOpts(a),u;if(s.coloring==="heatmap"&&o.auto&&a.autocontour===!1){var d=s.start,h=P(s),y=s.size||1,m=Math.floor((h-d)/y)+1;isFinite(y)||(y=1,m=1);var E=d-y/2,c=E+m*y;u=[E,c]}else u=i;return v.calc(r,a,{vals:u,cLetter:"z"}),l}}}),Wx=Ne({"src/traces/contour/constants.js"(te,Z){Z.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}}}}),VA=Ne({"src/traces/contour/make_crossings.js"(te,Z){var v=Wx();Z.exports=function(P){var t=P[0].z,r=t.length,a=t[0].length,l=r===2||a===2,i,s,o,u,d,h,y,m,E;for(s=0;s<r-1;s++)for(u=[],s===0&&(u=u.concat(v.BOTTOMSTART)),s===r-2&&(u=u.concat(v.TOPSTART)),i=0;i<a-1;i++)for(o=u.slice(),i===0&&(o=o.concat(v.LEFTSTART)),i===a-2&&(o=o.concat(v.RIGHTSTART)),d=i+","+s,h=[[t[s][i],t[s][i+1]],[t[s+1][i],t[s+1][i+1]]],E=0;E<P.length;E++)m=P[E],y=w(m.level,h),y&&(m.crossings[d]=y,o.indexOf(y)!==-1&&(m.starts.push([i,s]),l&&o.indexOf(y,o.indexOf(y)+1)!==-1&&m.starts.push([i,s])))};function w(C,P){var t=(P[0][0]>C?0:1)+(P[0][1]>C?0:2)+(P[1][1]>C?0:4)+(P[1][0]>C?0:8);if(t===5||t===10){var r=(P[0][0]+P[0][1]+P[1][0]+P[1][1])/4;return C>r?t===5?713:1114:t===5?104:208}return t===15?0:t}}}),w2=Ne({"src/traces/contour/find_all_paths.js"(te,Z){var v=In(),w=Wx();Z.exports=function(i,s,o){var u,d,h,y,m;for(s=s||.01,o=o||.01,h=0;h<i.length;h++){for(y=i[h],m=0;m<y.starts.length;m++)d=y.starts[m],t(y,d,"edge",s,o);for(u=0;Object.keys(y.crossings).length&&u<1e4;)u++,d=Object.keys(y.crossings)[0].split(",").map(Number),t(y,d,void 0,s,o);u===1e4&&v.log("Infinite loop in contour?")}};function C(l,i,s,o){return Math.abs(l[0]-i[0])<s&&Math.abs(l[1]-i[1])<o}function P(l,i){var s=l[2]-i[2],o=l[3]-i[3];return Math.sqrt(s*s+o*o)}function t(l,i,s,o,u){var d=i.join(","),h=l.crossings[d],y=r(h,s,i),m=[a(l,i,[-y[0],-y[1]])],E=l.z.length,c=l.z[0].length,_=i.slice(),T=y.slice(),M;for(M=0;M<1e4;M++){if(h>20?(h=w.CHOOSESADDLE[h][(y[0]||y[1])<0?0:1],l.crossings[d]=w.SADDLEREMAINDER[h]):delete l.crossings[d],y=w.NEWDELTA[h],!y){v.log("Found bad marching index:",h,i,l.level);break}m.push(a(l,i,y)),i[0]+=y[0],i[1]+=y[1],d=i.join(","),C(m[m.length-1],m[m.length-2],o,u)&&m.pop();var k=y[0]&&(i[0]<0||i[0]>c-2)||y[1]&&(i[1]<0||i[1]>E-2),b=i[0]===_[0]&&i[1]===_[1]&&y[0]===T[0]&&y[1]===T[1];if(b||s&&k)break;h=l.crossings[d]}M===1e4&&v.log("Infinite loop in contour?");var A=C(m[0],m[m.length-1],o,u),g=0,f=.2*l.smoothing,p=[],x=0,N,D,B,U,V,q,z,H,G,J,le;for(M=1;M<m.length;M++)z=P(m[M],m[M-1]),g+=z,p.push(z);var ye=g/p.length*f;function de(ie){return m[ie%m.length]}for(M=m.length-2;M>=x;M--)if(N=p[M],N<ye){for(B=0,D=M-1;D>=x&&N+p[D]<ye;D--)N+=p[D];if(A&&M===m.length-2)for(B=0;B<D&&N+p[B]<ye;B++)N+=p[B];V=M-D+B+1,q=Math.floor((M+D+B+2)/2),!A&&M===m.length-2?U=m[m.length-1]:!A&&D===-1?U=m[0]:V%2?U=de(q):U=[(de(q)[0]+de(q+1)[0])/2,(de(q)[1]+de(q+1)[1])/2],m.splice(D+1,M-D+1,U),M=D+1,B&&(x=B),A&&(M===m.length-2?m[B]=m[m.length-1]:M===0&&(m[m.length-1]=m[0]))}for(m.splice(0,x),M=0;M<m.length;M++)m[M].length=2;if(!(m.length<2))if(A)m.pop(),l.paths.push(m);else{s||v.log("Unclosed interior contour?",l.level,_.join(","),m.join("L"));var me=!1;for(H=0;H<l.edgepaths.length;H++)if(J=l.edgepaths[H],!me&&C(J[0],m[m.length-1],o,u)){m.pop(),me=!0;var W=!1;for(G=0;G<l.edgepaths.length;G++)if(le=l.edgepaths[G],C(le[le.length-1],m[0],o,u)){W=!0,m.shift(),l.edgepaths.splice(H,1),G===H?l.paths.push(m.concat(le)):(G>H&&G--,l.edgepaths[G]=le.concat(m,J));break}W||(l.edgepaths[H]=m.concat(J))}for(H=0;H<l.edgepaths.length&&!me;H++)J=l.edgepaths[H],C(J[J.length-1],m[0],o,u)&&(m.shift(),l.edgepaths[H]=J.concat(m),me=!0);me||l.edgepaths.push(m)}}function r(l,i,s){var o=0,u=0;return l>20&&i?l===208||l===1114?o=s[0]===0?1:-1:u=s[1]===0?1:-1:w.BOTTOMSTART.indexOf(l)!==-1?u=1:w.LEFTSTART.indexOf(l)!==-1?o=1:w.TOPSTART.indexOf(l)!==-1?u=-1:o=-1,[o,u]}function a(l,i,s){var o=i[0]+Math.max(s[0],0),u=i[1]+Math.max(s[1],0),d=l.z[u][o],h=l.xaxis,y=l.yaxis;if(s[1]){var m=(l.level-d)/(l.z[u][o+1]-d),E=(m!==1?(1-m)*h.c2l(l.x[o]):0)+(m!==0?m*h.c2l(l.x[o+1]):0);return[h.c2p(h.l2c(E),!0),y.c2p(l.y[u],!0),o+m,u]}else{var c=(l.level-d)/(l.z[u+1][o]-d),_=(c!==1?(1-c)*y.c2l(l.y[u]):0)+(c!==0?c*y.c2l(l.y[u+1]):0);return[h.c2p(l.x[o],!0),y.c2p(y.l2c(_),!0),o,u+c]}}}}),VM=Ne({"src/traces/contour/constraint_mapping.js"(te,Z){var v=y2(),w=la();Z.exports={"[]":P("[]"),"][":P("]["),">":t(">"),"<":t("<"),"=":t("=")};function C(r,a){var l=Array.isArray(a),i;function s(o){return w(o)?+o:null}return v.COMPARISON_OPS2.indexOf(r)!==-1?i=s(l?a[0]:a):v.INTERVAL_OPS.indexOf(r)!==-1?i=l?[s(a[0]),s(a[1])]:[s(a),s(a)]:v.SET_OPS.indexOf(r)!==-1&&(i=l?a.map(s):[s(a)]),i}function P(r){return function(a){a=C(r,a);var l=Math.min(a[0],a[1]),i=Math.max(a[0],a[1]);return{start:l,end:i,size:i-l}}}function t(r){return function(a){return a=C(r,a),{start:a,end:1/0,size:1/0}}}}}),HA=Ne({"src/traces/contour/empty_pathinfo.js"(te,Z){var v=In(),w=VM(),C=x2();Z.exports=function(t,r,a){for(var l=t.type==="constraint"?w[t._operation](t.value):t,i=l.size,s=[],o=C(l),u=a.trace._carpetTrace,d=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:a.x,y:a.y},h=l.start;h<o;h+=i)if(s.push(v.extendFlat({level:h,crossings:{},starts:[],edgepaths:[],paths:[],z:a.z,smoothing:a.trace.line.smoothing},d)),s.length>1e3){v.warn("Too many contours, clipping at 1000",t);break}return s}}}),HM=Ne({"src/traces/contour/convert_to_constraints.js"(te,Z){var v=In();Z.exports=function(C,P){var t,r,a,l=function(o){return o.reverse()},i=function(o){return o};switch(P){case"=":case"<":return C;case">":for(C.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),r=C[0],t=0;t<r.edgepaths.length;t++)r.edgepaths[t]=l(r.edgepaths[t]);for(t=0;t<r.paths.length;t++)r.paths[t]=l(r.paths[t]);for(t=0;t<r.starts.length;t++)r.starts[t]=l(r.starts[t]);return C;case"][":var s=l;l=i,i=s;case"[]":for(C.length!==2&&v.warn("Contour data invalid for the specified inequality range operation."),r=w(C[0]),a=w(C[1]),t=0;t<r.edgepaths.length;t++)r.edgepaths[t]=l(r.edgepaths[t]);for(t=0;t<r.paths.length;t++)r.paths[t]=l(r.paths[t]);for(t=0;t<r.starts.length;t++)r.starts[t]=l(r.starts[t]);for(;a.edgepaths.length;)r.edgepaths.push(i(a.edgepaths.shift()));for(;a.paths.length;)r.paths.push(i(a.paths.shift()));for(;a.starts.length;)r.starts.push(i(a.starts.shift()));return[r]}};function w(C){return v.extendFlat({},C,{edgepaths:v.extendDeep([],C.edgepaths),paths:v.extendDeep([],C.paths),starts:v.extendDeep([],C.starts)})}}}),GM=Ne({"src/traces/contour/close_boundaries.js"(te,Z){Z.exports=function(v,w){var C=v[0],P=C.z,t;switch(w.type){case"levels":var r=Math.min(P[0][0],P[0][1]);for(t=0;t<v.length;t++){var a=v[t];a.prefixBoundary=!a.edgepaths.length&&(r>a.level||a.starts.length&&r===a.level)}break;case"constraint":if(C.prefixBoundary=!1,C.edgepaths.length)return;var l=C.x.length,i=C.y.length,s=-1/0,o=1/0;for(t=0;t<i;t++)o=Math.min(o,P[t][0]),o=Math.min(o,P[t][l-1]),s=Math.max(s,P[t][0]),s=Math.max(s,P[t][l-1]);for(t=1;t<l-1;t++)o=Math.min(o,P[0][t]),o=Math.min(o,P[i-1][t]),s=Math.max(s,P[0][t]),s=Math.max(s,P[i-1][t]);var u=w.value,d,h;switch(w._operation){case">":u>s&&(C.prefixBoundary=!0);break;case"<":(u<o||C.starts.length&&u===o)&&(C.prefixBoundary=!0);break;case"[]":d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),(h<o||d>s||C.starts.length&&h===o)&&(C.prefixBoundary=!0);break;case"][":d=Math.min(u[0],u[1]),h=Math.max(u[0],u[1]),d<o&&h>s&&(C.prefixBoundary=!0);break}break}}}}),T2=Ne({"src/traces/contour/plot.js"(te){var Z=xn(),v=In(),w=zs(),C=Dc(),P=uc(),t=Os(),r=qp(),a=u2(),l=VA(),i=w2(),s=HA(),o=HM(),u=GM(),d=Wx(),h=d.LABELOPTIMIZER;te.plot=function(b,A,g,f){var p=A.xaxis,x=A.yaxis;v.makeTraceGroups(f,g,"contour").each(function(N){var D=Z.select(this),B=N[0],U=B.trace,V=B.x,q=B.y,z=U.contours,H=s(z,A,B),G=v.ensureSingle(D,"g","heatmapcoloring"),J=[];z.coloring==="heatmap"&&(J=[N]),a(b,A,J,G),l(H),i(H);var le=p.c2p(V[0],!0),ye=p.c2p(V[V.length-1],!0),de=x.c2p(q[0],!0),me=x.c2p(q[q.length-1],!0),W=[[le,me],[ye,me],[ye,de],[le,de]],ie=H;z.type==="constraint"&&(ie=o(H,z._operation)),y(D,W,z),m(D,ie,W,z),c(D,H,b,B,z),T(D,A,b,B,W)})};function y(k,b,A){var g=v.ensureSingle(k,"g","contourbg"),f=g.selectAll("path").data(A.coloring==="fill"?[0]:[]);f.enter().append("path"),f.exit().remove(),f.attr("d","M"+b.join("L")+"Z").style("stroke","none")}function m(k,b,A,g){var f=g.coloring==="fill"||g.type==="constraint"&&g._operation!=="=",p="M"+A.join("L")+"Z";f&&u(b,g);var x=v.ensureSingle(k,"g","contourfill"),N=x.selectAll("path").data(f?b:[]);N.enter().append("path"),N.exit().remove(),N.each(function(D){var B=(D.prefixBoundary?p:"")+E(D,A);B?Z.select(this).attr("d",B).style("stroke","none"):Z.select(this).remove()})}function E(k,b){var A="",g=0,f=k.edgepaths.map(function(le,ye){return ye}),p=!0,x,N,D,B,U,V;function q(le){return Math.abs(le[1]-b[0][1])<.01}function z(le){return Math.abs(le[1]-b[2][1])<.01}function H(le){return Math.abs(le[0]-b[0][0])<.01}function G(le){return Math.abs(le[0]-b[2][0])<.01}for(;f.length;){for(V=w.smoothopen(k.edgepaths[g],k.smoothing),A+=p?V:V.replace(/^M/,"L"),f.splice(f.indexOf(g),1),x=k.edgepaths[g][k.edgepaths[g].length-1],B=-1,D=0;D<4;D++){if(!x){v.log("Missing end?",g,k);break}for(q(x)&&!G(x)?N=b[1]:H(x)?N=b[0]:z(x)?N=b[3]:G(x)&&(N=b[2]),U=0;U<k.edgepaths.length;U++){var J=k.edgepaths[U][0];Math.abs(x[0]-N[0])<.01?Math.abs(x[0]-J[0])<.01&&(J[1]-x[1])*(N[1]-J[1])>=0&&(N=J,B=U):Math.abs(x[1]-N[1])<.01?Math.abs(x[1]-J[1])<.01&&(J[0]-x[0])*(N[0]-J[0])>=0&&(N=J,B=U):v.log("endpt to newendpt is not vert. or horz.",x,N,J)}if(x=N,B>=0)break;A+="L"+N}if(B===k.edgepaths.length){v.log("unclosed perimeter path");break}g=B,p=f.indexOf(g)===-1,p&&(g=f[0],A+="Z")}for(g=0;g<k.paths.length;g++)A+=w.smoothclosed(k.paths[g],k.smoothing);return A}function c(k,b,A,g,f){var p=A._context.staticPlot,x=v.ensureSingle(k,"g","contourlines"),N=f.showlines!==!1,D=f.showlabels,B=N&&D,U=te.createLines(x,N||D,b,p),V=te.createLineClip(x,B,A,g.trace.uid),q=k.selectAll("g.contourlabels").data(D?[0]:[]);if(q.exit().remove(),q.enter().append("g").classed("contourlabels",!0),D){var z=[],H=[];v.clearLocationCache();var G=te.labelFormatter(A,g),J=w.tester.append("text").attr("data-notex",1).call(w.font,f.labelfont),le=b[0].xaxis,ye=b[0].yaxis,de=le._length,me=ye._length,W=le.range,ie=ye.range,se=v.aggNums(Math.min,null,g.x),ee=v.aggNums(Math.max,null,g.x),pe=v.aggNums(Math.min,null,g.y),oe=v.aggNums(Math.max,null,g.y),Y=Math.max(le.c2p(se,!0),0),ce=Math.min(le.c2p(ee,!0),de),ue=Math.max(ye.c2p(oe,!0),0),_e=Math.min(ye.c2p(pe,!0),me),Le={};W[0]<W[1]?(Le.left=Y,Le.right=ce):(Le.left=ce,Le.right=Y),ie[0]<ie[1]?(Le.top=ue,Le.bottom=_e):(Le.top=_e,Le.bottom=ue),Le.middle=(Le.top+Le.bottom)/2,Le.center=(Le.left+Le.right)/2,z.push([[Le.left,Le.top],[Le.right,Le.top],[Le.right,Le.bottom],[Le.left,Le.bottom]]);var ze=Math.sqrt(de*de+me*me),Ge=d.LABELDISTANCE*ze/Math.max(1,b.length/d.LABELINCREASE);U.each(function(Ve){var rt=te.calcTextOpts(Ve.level,G,J,A);Z.select(this).selectAll("path").each(function(){var pt=this,gt=v.getVisibleSegment(pt,Le,rt.height/2);if(gt&&!(gt.len<(rt.width+rt.height)*d.LABELMIN))for(var ht=Math.min(Math.ceil(gt.len/Ge),d.LABELMAX),lt=0;lt<ht;lt++){var Fe=te.findBestTextLocation(pt,gt,rt,H,Le);if(!Fe)break;te.addLabelData(Fe,rt,H,z)}})}),J.remove(),te.drawLabels(q,H,A,V,B?z:null)}D&&!N&&U.remove()}te.createLines=function(k,b,A,g){var f=A[0].smoothing,p=k.selectAll("g.contourlevel").data(b?A:[]);if(p.exit().remove(),p.enter().append("g").classed("contourlevel",!0),b){var x=p.selectAll("path.openline").data(function(D){return D.pedgepaths||D.edgepaths});x.exit().remove(),x.enter().append("path").classed("openline",!0),x.attr("d",function(D){return w.smoothopen(D,f)}).style("stroke-miterlimit",1).style("vector-effect",g?"none":"non-scaling-stroke");var N=p.selectAll("path.closedline").data(function(D){return D.ppaths||D.paths});N.exit().remove(),N.enter().append("path").classed("closedline",!0),N.attr("d",function(D){return w.smoothclosed(D,f)}).style("stroke-miterlimit",1).style("vector-effect",g?"none":"non-scaling-stroke")}return p},te.createLineClip=function(k,b,A,g){var f=A._fullLayout._clips,p=b?"clipline"+g:null,x=f.selectAll("#"+p).data(b?[0]:[]);return x.exit().remove(),x.enter().append("clipPath").classed("contourlineclip",!0).attr("id",p),w.setClipUrl(k,p,A),x},te.labelFormatter=function(k,b){var A=k._fullLayout,g=b.trace,f=g.contours,p={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(f.labelformat)p.tickformat=f.labelformat,r(p,A);else{var x=C.extractOpts(g);if(x&&x.colorbar&&x.colorbar._axis)p=x.colorbar._axis;else{if(f.type==="constraint"){var N=f.value;v.isArrayOrTypedArray(N)?p.range=[N[0],N[N.length-1]]:p.range=[N,N]}else p.range=[f.start,f.end],p.nticks=(f.end-f.start)/f.size;p.range[0]===p.range[1]&&(p.range[1]+=p.range[0]||1),p.nticks||(p.nticks=1e3),r(p,A),t.prepTicks(p),p._tmin=null,p._tmax=null}}return function(D){return t.tickText(p,D).text}},te.calcTextOpts=function(k,b,A,g){var f=b(k);A.text(f).call(P.convertToTspans,g);var p=A.node(),x=w.bBox(p,!0);return{text:f,width:x.width,height:x.height,fontSize:+p.style["font-size"].replace("px",""),level:k,dy:(x.top+x.bottom)/2}},te.findBestTextLocation=function(k,b,A,g,f){var p=A.width,x,N,D,B,U;b.isClosed?(N=b.len/h.INITIALSEARCHPOINTS,x=b.min+N/2,D=b.max):(N=(b.len-p)/(h.INITIALSEARCHPOINTS+1),x=b.min+N+p/2,D=b.max-(N+p)/2);for(var V=1/0,q=0;q<h.ITERATIONS;q++){for(var z=x;z<D;z+=N){var H=v.getTextLocation(k,b.total,z,p),G=_(H,A,g,f);G<V&&(V=G,U=H,B=z)}if(V>h.MAXCOST*2)break;q&&(N/=2),x=B-N/2,D=x+N*1.5}if(V<=h.MAXCOST)return U};function _(k,b,A,g){var f=b.width/2,p=b.height/2,x=k.x,N=k.y,D=k.theta,B=Math.cos(D)*f,U=Math.sin(D)*f,V=(x>g.center?g.right-x:x-g.left)/(B+Math.abs(Math.sin(D)*p)),q=(N>g.middle?g.bottom-N:N-g.top)/(Math.abs(U)+Math.cos(D)*p);if(V<1||q<1)return 1/0;var z=h.EDGECOST*(1/(V-1)+1/(q-1));z+=h.ANGLECOST*D*D;for(var H=x-B,G=N-U,J=x+B,le=N+U,ye=0;ye<A.length;ye++){var de=A[ye],me=Math.cos(de.theta)*de.width/2,W=Math.sin(de.theta)*de.width/2,ie=v.segmentDistance(H,G,J,le,de.x-me,de.y-W,de.x+me,de.y+W)*2/(b.height+de.height),se=de.level===b.level,ee=se?h.SAMELEVELDISTANCE:1;if(ie<=ee)return 1/0;var pe=h.NEIGHBORCOST*(se?h.SAMELEVELFACTOR:1);z+=pe/(ie-ee)}return z}te.addLabelData=function(k,b,A,g){var f=b.fontSize,p=b.width+f/3,x=Math.max(0,b.height-f/3),N=k.x,D=k.y,B=k.theta,U=Math.sin(B),V=Math.cos(B),q=function(H,G){return[N+H*V-G*U,D+H*U+G*V]},z=[q(-p/2,-x/2),q(-p/2,x/2),q(p/2,x/2),q(p/2,-x/2)];A.push({text:b.text,x:N,y:D,dy:b.dy,theta:B,level:b.level,width:p,height:x}),g.push(z)},te.drawLabels=function(k,b,A,g,f){var p=k.selectAll("text").data(b,function(B){return B.text+","+B.x+","+B.y+","+B.theta});if(p.exit().remove(),p.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(B){var U=B.x+Math.sin(B.theta)*B.dy,V=B.y-Math.cos(B.theta)*B.dy;Z.select(this).text(B.text).attr({x:U,y:V,transform:"rotate("+180*B.theta/Math.PI+" "+U+" "+V+")"}).call(P.convertToTspans,A)}),f){for(var x="",N=0;N<f.length;N++)x+="M"+f[N].join("L")+"Z";var D=v.ensureSingle(g,"path","");D.attr("d",x)}};function T(k,b,A,g,f){var p=g.trace,x=A._fullLayout._clips,N="clip"+p.uid,D=x.selectAll("#"+N).data(p.connectgaps?[]:[0]);if(D.enter().append("clipPath").classed("contourclip",!0).attr("id",N),D.exit().remove(),p.connectgaps===!1){var B={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:b.xaxis,yaxis:b.yaxis,x:g.x,y:g.y,z:M(g),smoothing:0};l([B]),i([B]),u([B],{type:"levels"});var U=v.ensureSingle(D,"path","");U.attr("d",(B.prefixBoundary?"M"+f.join("L")+"Z":"")+E(B,f))}else N=null;w.setClipUrl(k,N,A)}function M(k){var b=k.trace._emptypoints,A=[],g=k.z.length,f=k.z[0].length,p,x=[],N;for(p=0;p<f;p++)x.push(1);for(p=0;p<g;p++)A.push(x.slice());for(p=0;p<b.length;p++)N=b[p],A[N[0]][N[1]]=0;return k.zmask=A,A}}}),r_=Ne({"src/traces/contour/make_color_map.js"(te,Z){var v=xn(),w=Dc(),C=x2();Z.exports=function(t){var r=t.contours,a=r.start,l=C(r),i=r.size||1,s=Math.floor((l-a)/i)+1,o=r.coloring==="lines"?0:1,u=w.extractOpts(t);isFinite(i)||(i=1,s=1);var d=u.reversescale?w.flipScale(u.colorscale):u.colorscale,h=d.length,y=new Array(h),m=new Array(h),E,c,_=u.min,T=u.max;if(r.coloring==="heatmap"){for(c=0;c<h;c++)E=d[c],y[c]=E[0]*(T-_)+_,m[c]=E[1];var M=v.extent([_,T,r.start,r.start+i*(s-1)]),k=M[_<T?0:1],b=M[_<T?1:0];k!==_&&(y.splice(0,0,k),m.splice(0,0,m[0])),b!==T&&(y.push(b),m.push(m[m.length-1]))}else{var A=t._input&&typeof t._input.zmin=="number"&&typeof t._input.zmax=="number";for(A&&(a<=_||l>=T)&&(a<=_&&(a=_),l>=T&&(l=T),s=Math.floor((l-a)/i)+1,o=0),c=0;c<h;c++)E=d[c],y[c]=(E[0]*(s+o-1)-o/2)*i+a,m[c]=E[1];(A||t.autocontour)&&(y[0]>_&&(y.unshift(_),m.unshift(m[0])),y[y.length-1]<T&&(y.push(T),m.push(m[m.length-1])))}return w.makeColorScaleFunc({domain:y,range:m},{noNumericCheck:!0})}}}),Yx=Ne({"src/traces/contour/style.js"(te,Z){var v=xn(),w=zs(),C=c2(),P=r_();Z.exports=function(r){var a=v.select(r).selectAll("g.contour");a.style("opacity",function(l){return l[0].trace.opacity}),a.each(function(l){var i=v.select(this),s=l[0].trace,o=s.contours,u=s.line,d=o.size||1,h=o.start,y=o.type==="constraint",m=!y&&o.coloring==="lines",E=!y&&o.coloring==="fill",c=m||E?P(s):null;i.selectAll("g.contourlevel").each(function(M){v.select(this).selectAll("path").call(w.lineGroupStyle,u.width,m?c(M.level):u.color,u.dash)});var _=o.labelfont;if(i.selectAll("g.contourlabels text").each(function(M){w.font(v.select(this),{weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow,family:_.family,size:_.size,color:_.color||(m?c(M.level):u.color)})}),y)i.selectAll("g.contourfill path").style("fill",s.fillcolor);else if(E){var T;i.selectAll("g.contourfill path").style("fill",function(M){return T===void 0&&(T=M.level),c(M.level+.5*d)}),T===void 0&&(T=h),i.selectAll("g.contourbg path").style("fill",c(T-.5*d))}}),C(r)}}}),n_=Ne({"src/traces/contour/colorbar.js"(te,Z){var v=Dc(),w=r_(),C=x2();function P(t,r,a){var l=r.contours,i=r.line,s=l.size||1,o=l.coloring,u=w(r,{isColorbar:!0});if(o==="heatmap"){var d=v.extractOpts(r);a._fillgradient=d.reversescale?v.flipScale(d.colorscale):d.colorscale,a._zrange=[d.min,d.max]}else o==="fill"&&(a._fillcolor=u);a._line={color:o==="lines"?u:i.color,width:l.showlines!==!1?i.width:0,dash:i.dash},a._levels={start:l.start,end:C(l),size:s}}Z.exports={min:"zmin",max:"zmax",calc:P}}}),GA=Ne({"src/traces/contour/hover.js"(te,Z){var v=io(),w=Hx();Z.exports=function(P,t,r,a,l){l||(l={}),l.isContour=!0;var i=w(P,t,r,a,l);return i&&i.forEach(function(s){var o=s.trace;o.contours.type==="constraint"&&(o.fillcolor&&v.opacity(o.fillcolor)?s.color=v.addOpacity(o.fillcolor,1):o.contours.showlines&&v.opacity(o.line.color)&&(s.color=v.addOpacity(o.line.color,1)))}),i}}}),XM=Ne({"src/traces/histogram2dcontour/index.js"(te,Z){Z.exports={attributes:g2(),supplyDefaults:qM(),crossTraceDefaults:h2(),calc:b2(),plot:T2().plot,layerName:"contourlayer",style:Yx(),colorbar:n_(),hoverPoints:GA(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Lh(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}}}),Zx=Ne({"lib/histogram2dcontour.js"(te,Z){Z.exports=XM()}}),XA=Ne({"src/traces/contour/constraint_defaults.js"(te,Z){var v=la(),w=UA(),C=io(),P=C.addOpacity,t=C.opacity,r=y2(),a=In().isArrayOrTypedArray,l=r.CONSTRAINT_REDUCTION,i=r.COMPARISON_OPS2;Z.exports=function(u,d,h,y,m,E){var c=d.contours,_,T,M,k=h("contours.operation");if(c._operation=l[k],s(h,c),k==="="?_=c.showlines=!0:(_=h("contours.showlines"),M=h("fillcolor",P((u.line||{}).color||m,.5))),_){var b=M&&t(M)?P(d.fillcolor,1):m;T=h("line.color",b),h("line.width",2),h("line.dash")}h("line.smoothing"),w(h,y,T,E)};function s(o,u){var d;i.indexOf(u.operation)===-1?(o("contours.value",[0,1]),a(u.value)?u.value.length>2?u.value=u.value.slice(2):u.length===0?u.value=[0,1]:u.length<2?(d=parseFloat(u.value[0]),u.value=[d,d+1]):u.value=[parseFloat(u.value[0]),parseFloat(u.value[1])]:v(u.value)&&(d=parseFloat(u.value),u.value=[d,d+1])):(o("contours.value",0),v(u.value)||(a(u.value)?u.value=parseFloat(u.value[0]):u.value=0))}}}),WA=Ne({"src/traces/contour/defaults.js"(te,Z){var v=In(),w=Ih(),C=Rm(),P=XA(),t=_2(),r=Xx(),a=Bg(),l=Gx();Z.exports=function(s,o,u,d){function h(c,_){return v.coerce(s,o,l,c,_)}function y(c){return v.coerce2(s,o,l,c)}var m=w(s,o,h,d);if(!m){o.visible=!1;return}C(s,o,d,h),h("xhoverformat"),h("yhoverformat"),h("text"),h("hovertext"),h("hoverongaps"),h("hovertemplate"),h("hovertemplatefallback");var E=h("contours.type")==="constraint";h("connectgaps",v.isArray1D(o.z)),E?P(s,o,h,d,u):(t(s,o,h,y),r(s,o,h,d)),o.contours&&o.contours.coloring==="heatmap"&&a(h,d),h("zorder")}}}),WM=Ne({"src/traces/contour/index.js"(te,Z){Z.exports={attributes:Gx(),supplyDefaults:WA(),calc:b2(),plot:T2().plot,style:Yx(),colorbar:n_(),hoverPoints:GA(),moduleType:"trace",name:"contour",basePlotModule:Lh(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),YA=Ne({"lib/contour.js"(te,Z){Z.exports=WM()}}),A2=Ne({"src/traces/scatterternary/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=jv(),t=Jc(),r=ns(),a=Vu(),l=Dd().dash,i=co().extendFlat,s=t.marker,o=t.line,u=s.line;Z.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:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:w({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:i({},t.hovertext,{}),line:{color:o.color,width:o.width,dash:l,backoff:o.backoff,shape:i({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:t.connectgaps,cliponaxis:t.cliponaxis,fill:i({},t.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:P(),marker:i({symbol:s.symbol,opacity:s.opacity,angle:s.angle,angleref:s.angleref,standoff:s.standoff,maxdisplayed:s.maxdisplayed,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,line:i({width:u.width,editType:"calc"},a("marker.line")),gradient:s.gradient,editType:"calc"},a("marker")),textfont:t.textfont,textposition:t.textposition,selected:t.selected,unselected:t.unselected,hoverinfo:i({},r.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:t.hoveron,hovertemplate:v(),hovertemplatefallback:C()}}}),YM=Ne({"src/traces/scatterternary/defaults.js"(te,Z){var v=In(),w=a0(),C=vu(),P=xv(),t=Im(),r=bv(),a=Xp(),l=ov(),i=A2();Z.exports=function(o,u,d,h){function y(k,b){return v.coerce(o,u,i,k,b)}var m=y("a"),E=y("b"),c=y("c"),_;if(m?(_=m.length,E?(_=Math.min(_,E.length),c&&(_=Math.min(_,c.length))):c?_=Math.min(_,c.length):_=0):E&&c&&(_=Math.min(E.length,c.length)),!_){u.visible=!1;return}u._length=_,y("sum"),y("text"),y("hovertext"),u.hoveron!=="fills"&&(y("hovertemplate"),y("hovertemplatefallback"));var T=_<w.PTS_LINESONLY?"lines+markers":"lines";y("mode",T),C.hasMarkers(u)&&P(o,u,d,h,y,{gradient:!0}),C.hasLines(u)&&(t(o,u,d,h,y,{backoff:!0}),r(o,u,y),y("connectgaps")),C.hasText(u)&&(y("texttemplate"),y("texttemplatefallback"),a(o,u,h,y));var M=[];(C.hasMarkers(u)||C.hasText(u))&&(y("cliponaxis"),y("marker.maxdisplayed"),M.push("points")),y("fill"),u.fill!=="none"&&(l(o,u,d,y),C.hasLines(u)||r(o,u,y)),(u.fill==="tonext"||u.fill==="toself")&&M.push("fills"),y("hoveron",M.join("+")||"points"),v.coerceSelectionMarkerOpacity(u,y)}}}),ZM=Ne({"src/traces/scatterternary/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot;return r.aLabel=v.tickText(a.aaxis,C.a,!0).text,r.bLabel=v.tickText(a.baxis,C.b,!0).text,r.cLabel=v.tickText(a.caxis,C.c,!0).text,r}}}),jg=Ne({"src/traces/scatterternary/calc.js"(te,Z){var v=la(),w=Wp(),C=o0(),P=Vh(),t=Uv().calcMarkerSize,r=["a","b","c"],a={a:["b","c"],b:["a","c"],c:["a","b"]};Z.exports=function(i,s){var o=i._fullLayout[s.subplot],u=o.sum,d=s.sum||u,h={a:s.a,b:s.b,c:s.c},y=s.ids,m,E,c,_,T,M;for(m=0;m<r.length;m++)if(c=r[m],!h[c]){for(T=h[a[c][0]],M=h[a[c][1]],_=new Array(T.length),E=0;E<T.length;E++)_[E]=d-T[E]-M[E];h[c]=_}var k=s._length,b=new Array(k),A,g,f,p,x,N;for(m=0;m<k;m++)A=h.a[m],g=h.b[m],f=h.c[m],v(A)&&v(g)&&v(f)?(A=+A,g=+g,f=+f,p=u/(A+g+f),p!==1&&(A*=p,g*=p,f*=p),N=A,x=f-g,b[m]={x,y:N,a:A,b:g,c:f},y&&(b[m].id=y[m])):b[m]={x:!1,y:!1};return t(s,k),w(i,s),C(b,s),P(b,s),b}}}),$M=Ne({"src/traces/scatterternary/plot.js"(te,Z){var v=om();Z.exports=function(C,P,t){var r=P.plotContainer;r.select(".scatterlayer").selectAll("*").remove();for(var a=P.xaxis,l=P.yaxis,i={xaxis:a,yaxis:l,plot:r,layerClipId:P._hasClipOnAxisFalse?P.clipIdRelative:null},s=P.layers.frontplot.select("g.scatterlayer"),o=0;o<t.length;o++){var u=t[o];u.length&&(u[0].trace._xA=a,u[0].trace._yA=l)}v(C,i,t,s)}}}),KM=Ne({"src/traces/scatterternary/hover.js"(te,Z){var v=kg();Z.exports=function(C,P,t,r){var a=v(C,P,t,r);if(!a||a[0].index===!1)return;var l=a[0];if(l.index===void 0){var i=1-l.y0/C.ya._length,s=C.xa._length,o=s*i/2,u=s-o;return l.x0=Math.max(Math.min(l.x0,u),o),l.x1=Math.max(Math.min(l.x1,u),o),a}var d=l.cd[l.index],h=l.trace,y=l.subplot;l.a=d.a,l.b=d.b,l.c=d.c,l.xLabelVal=void 0,l.yLabelVal=void 0;var m={};m[h.subplot]={_subplot:y};var E=h._module.formatLabels(d,h,m);l.aLabel=E.aLabel,l.bLabel=E.bLabel,l.cLabel=E.cLabel;var c=d.hi||h.hoverinfo,_=[];function T(k,b){_.push(k._hovertitle+": "+b)}if(!h.hovertemplate){var M=c.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&T(y.aaxis,l.aLabel),M.indexOf("b")!==-1&&T(y.baxis,l.bLabel),M.indexOf("c")!==-1&&T(y.caxis,l.cLabel)}return l.extraText=_.join("<br>"),l.hovertemplate=h.hovertemplate,a}}}),JM=Ne({"src/traces/scatterternary/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){if(C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),t[r]){var a=t[r];w.a=a.a,w.b=a.b,w.c=a.c}else w.a=C.a,w.b=C.b,w.c=C.c;return w}}}),S2=Ne({"src/plots/ternary/ternary.js"(te,Z){var v=xn(),w=Ro(),C=Xo(),P=In(),t=P.strTranslate,r=P._,a=io(),l=zs(),i=qp(),s=co().extendFlat,o=uf(),u=Os(),d=Bv(),h=nh(),y=Pm(),m=y.freeMode,E=y.rectMode,c=wy(),_=fh().prepSelect,T=fh().selectOnClick,M=fh().clearOutline,k=fh().clearSelectionsCache,b=xh();function A(z,H){this.id=z.id,this.graphDiv=z.graphDiv,this.init(H),this.makeFramework(H),this.updateFx(H),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Z.exports=A;var g=A.prototype;g.init=function(z){this.container=z._ternarylayer,this.defs=z._defs,this.layoutId=z._uid,this.traceHash={},this.layers={}},g.plot=function(z,H){var G=this,J=H[G.id],le=H._size;G._hasClipOnAxisFalse=!1;for(var ye=0;ye<z.length;ye++){var de=z[ye][0].trace;if(de.cliponaxis===!1){G._hasClipOnAxisFalse=!0;break}}G.updateLayers(J),G.adjustLayout(J,le),o.generalUpdatePerTraceModule(G.graphDiv,G,z,J),G.layers.plotbg.select("path").call(a.fill,J.bgcolor)},g.makeFramework=function(z){var H=this,G=H.graphDiv,J=z[H.id],le=H.clipId="clip"+H.layoutId+H.id,ye=H.clipIdRelative="clip-relative"+H.layoutId+H.id;H.clipDef=P.ensureSingleById(z._clips,"clipPath",le,function(de){de.append("path").attr("d","M0,0Z")}),H.clipDefRelative=P.ensureSingleById(z._clips,"clipPath",ye,function(de){de.append("path").attr("d","M0,0Z")}),H.plotContainer=P.ensureSingle(H.container,"g",H.id),H.updateLayers(J),l.setClipUrl(H.layers.backplot,le,G),l.setClipUrl(H.layers.grids,le,G)},g.updateFx=function(z){z._ternarylayer.selectAll("g.toplevel").style("cursor",z.dragmode==="pan"?"move":"crosshair")},g.updateLayers=function(z){var H=this,G=H.layers,J=["draglayer","plotbg","backplot","grids"];z.aaxis.layer==="below traces"&&J.push("aaxis","aline"),z.baxis.layer==="below traces"&&J.push("baxis","bline"),z.caxis.layer==="below traces"&&J.push("caxis","cline"),J.push("frontplot"),z.aaxis.layer==="above traces"&&J.push("aaxis","aline"),z.baxis.layer==="above traces"&&J.push("baxis","bline"),z.caxis.layer==="above traces"&&J.push("caxis","cline");var le=H.plotContainer.selectAll("g.toplevel").data(J,String),ye=["agrid","bgrid","cgrid"];le.enter().append("g").attr("class",function(de){return"toplevel "+de}).each(function(de){var me=v.select(this);G[de]=me,de==="frontplot"?me.append("g").classed("scatterlayer",!0):de==="backplot"?me.append("g").classed("maplayer",!0):de==="plotbg"?me.append("path").attr("d","M0,0Z"):de==="aline"||de==="bline"||de==="cline"?me.append("path"):de==="grids"&&ye.forEach(function(W){G[W]=me.append("g").classed("grid "+W,!0)})}),le.order()};var f=Math.sqrt(4/3);g.adjustLayout=function(z,H){var G=this,J=z.domain,le=(J.x[0]+J.x[1])/2,ye=(J.y[0]+J.y[1])/2,de=J.x[1]-J.x[0],me=J.y[1]-J.y[0],W=de*H.w,ie=me*H.h,se=z.sum,ee=z.aaxis.min,pe=z.baxis.min,oe=z.caxis.min,Y,ce,ue,_e,Le,ze;W>f*ie?(_e=ie,ue=_e*f):(ue=W,_e=ue/f),Le=de*ue/W,ze=me*_e/ie,Y=H.l+H.w*le-ue/2,ce=H.t+H.h*(1-ye)-_e/2,G.x0=Y,G.y0=ce,G.w=ue,G.h=_e,G.sum=se,G.xaxis={type:"linear",range:[ee+2*oe-se,se-ee-2*pe],domain:[le-Le/2,le+Le/2],_id:"x"},i(G.xaxis,G.graphDiv._fullLayout),G.xaxis.setScale(),G.xaxis.isPtWithinRange=function(Ye){return Ye.a>=G.aaxis.range[0]&&Ye.a<=G.aaxis.range[1]&&Ye.b>=G.baxis.range[1]&&Ye.b<=G.baxis.range[0]&&Ye.c>=G.caxis.range[1]&&Ye.c<=G.caxis.range[0]},G.yaxis={type:"linear",range:[ee,se-pe-oe],domain:[ye-ze/2,ye+ze/2],_id:"y"},i(G.yaxis,G.graphDiv._fullLayout),G.yaxis.setScale(),G.yaxis.isPtWithinRange=function(){return!0};var Ge=G.yaxis.domain[0],Ve=G.aaxis=s({},z.aaxis,{range:[ee,se-pe-oe],side:"left",tickangle:(+z.aaxis.tickangle||0)-30,domain:[Ge,Ge+ze*f],anchor:"free",position:0,_id:"y",_length:ue});i(Ve,G.graphDiv._fullLayout),Ve.setScale();var rt=G.baxis=s({},z.baxis,{range:[se-ee-oe,pe],side:"bottom",domain:G.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ue});i(rt,G.graphDiv._fullLayout),rt.setScale();var pt=G.caxis=s({},z.caxis,{range:[se-ee-pe,oe],side:"right",tickangle:(+z.caxis.tickangle||0)+30,domain:[Ge,Ge+ze*f],anchor:"free",position:0,_id:"y",_length:ue});i(pt,G.graphDiv._fullLayout),pt.setScale();var gt="M"+Y+","+(ce+_e)+"h"+ue+"l-"+ue/2+",-"+_e+"Z";G.clipDef.select("path").attr("d",gt),G.layers.plotbg.select("path").attr("d",gt);var ht="M0,"+_e+"h"+ue+"l-"+ue/2+",-"+_e+"Z";G.clipDefRelative.select("path").attr("d",ht);var lt=t(Y,ce);G.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",lt),G.clipDefRelative.select("path").attr("transform",null);var Fe=t(Y-rt._offset,ce+_e);G.layers.baxis.attr("transform",Fe),G.layers.bgrid.attr("transform",Fe);var Pe=t(Y+ue/2,ce)+"rotate(30)"+t(0,-Ve._offset);G.layers.aaxis.attr("transform",Pe),G.layers.agrid.attr("transform",Pe);var be=t(Y+ue/2,ce)+"rotate(-30)"+t(0,-pt._offset);G.layers.caxis.attr("transform",be),G.layers.cgrid.attr("transform",be),G.drawAxes(!0),G.layers.aline.select("path").attr("d",Ve.showline?"M"+Y+","+(ce+_e)+"l"+ue/2+",-"+_e:"M0,0").call(a.stroke,Ve.linecolor||"#000").style("stroke-width",(Ve.linewidth||0)+"px"),G.layers.bline.select("path").attr("d",rt.showline?"M"+Y+","+(ce+_e)+"h"+ue:"M0,0").call(a.stroke,rt.linecolor||"#000").style("stroke-width",(rt.linewidth||0)+"px"),G.layers.cline.select("path").attr("d",pt.showline?"M"+(Y+ue/2)+","+ce+"l"+ue/2+","+_e:"M0,0").call(a.stroke,pt.linecolor||"#000").style("stroke-width",(pt.linewidth||0)+"px"),G.graphDiv._context.staticPlot||G.initInteractions(),l.setClipUrl(G.layers.frontplot,G._hasClipOnAxisFalse?null:G.clipId,G.graphDiv)},g.drawAxes=function(z){var H=this,G=H.graphDiv,J=H.id.substr(7)+"title",le=H.layers,ye=H.aaxis,de=H.baxis,me=H.caxis;if(H.drawAx(ye),H.drawAx(de),H.drawAx(me),z){var W=Math.max(ye.showticklabels?ye.tickfont.size/2:0,(me.showticklabels?me.tickfont.size*.75:0)+(me.ticks==="outside"?me.ticklen*.87:0)),ie=(de.showticklabels?de.tickfont.size:0)+(de.ticks==="outside"?de.ticklen:0)+3;le["a-title"]=c.draw(G,"a"+J,{propContainer:ye,propName:H.id+".aaxis.title.text",placeholder:r(G,"Click to enter Component A title"),attributes:{x:H.x0+H.w/2,y:H.y0-ye.title.font.size/3-W,"text-anchor":"middle"}}),le["b-title"]=c.draw(G,"b"+J,{propContainer:de,propName:H.id+".baxis.title.text",placeholder:r(G,"Click to enter Component B title"),attributes:{x:H.x0-ie,y:H.y0+H.h+de.title.font.size*.83+ie,"text-anchor":"middle"}}),le["c-title"]=c.draw(G,"c"+J,{propContainer:me,propName:H.id+".caxis.title.text",placeholder:r(G,"Click to enter Component C title"),attributes:{x:H.x0+H.w+ie,y:H.y0+H.h+me.title.font.size*.83+ie,"text-anchor":"middle"}})}},g.drawAx=function(z){var H=this,G=H.graphDiv,J=z._name,le=J.charAt(0),ye=z._id,de=H.layers[J],me=30,W=le+"tickLayout",ie=p(z);H[W]!==ie&&(de.selectAll("."+ye+"tick").remove(),H[W]=ie),z.setScale();var se=u.calcTicks(z),ee=u.clipEnds(z,se),pe=u.makeTransTickFn(z),oe=u.getTickSigns(z)[2],Y=P.deg2rad(me),ce=oe*(z.linewidth||1)/2,ue=oe*z.ticklen,_e=H.w,Le=H.h,ze=le==="b"?"M0,"+ce+"l"+Math.sin(Y)*ue+","+Math.cos(Y)*ue:"M"+ce+",0l"+Math.cos(Y)*ue+","+-Math.sin(Y)*ue,Ge={a:"M0,0l"+Le+",-"+_e/2,b:"M0,0l-"+_e/2+",-"+Le,c:"M0,0l-"+Le+","+_e/2}[le];u.drawTicks(G,z,{vals:z.ticks==="inside"?ee:se,layer:de,path:ze,transFn:pe,crisp:!1}),u.drawGrid(G,z,{vals:ee,layer:H.layers[le+"grid"],path:Ge,transFn:pe,crisp:!1}),u.drawLabels(G,z,{vals:se,layer:de,transFn:pe,labelFns:u.makeLabelFns(z,0,me)})};function p(z){return z.ticks+String(z.ticklen)+String(z.showticklabels)}var x=b.MINZOOM/2+.87,N="m-0.87,.5h"+x+"v3h-"+(x+5.2)+"l"+(x/2+2.6)+",-"+(x*.87+4.5)+"l2.6,1.5l-"+x/2+","+x*.87+"Z",D="m0.87,.5h-"+x+"v3h"+(x+5.2)+"l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-2.6,1.5l"+x/2+","+x*.87+"Z",B="m0,1l"+x/2+","+x*.87+"l2.6,-1.5l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-"+(x/2+2.6)+","+(x*.87+4.5)+"l2.6,1.5l"+x/2+",-"+x*.87+"Z",U="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",V=!0;g.clearOutline=function(){k(this.dragOptions),M(this.dragOptions.gd)},g.initInteractions=function(){var z=this,H=z.layers.plotbg.select("path").node(),G=z.graphDiv,J=G._fullLayout._zoomlayer,le,ye;this.dragOptions={element:H,gd:G,plotinfo:{id:z.id,domain:G._fullLayout[z.id].domain,xaxis:z.xaxis,yaxis:z.yaxis},subplot:z.id,prepFn:function(Fe,Pe,be){z.dragOptions.xaxes=[z.xaxis],z.dragOptions.yaxes=[z.yaxis],le=G._fullLayout._invScaleX,ye=G._fullLayout._invScaleY;var Ye=z.dragOptions.dragmode=G._fullLayout.dragmode;m(Ye)?z.dragOptions.minDrag=1:z.dragOptions.minDrag=void 0,Ye==="zoom"?(z.dragOptions.moveFn=rt,z.dragOptions.clickFn=_e,z.dragOptions.doneFn=pt,Le(Fe,Pe,be)):Ye==="pan"?(z.dragOptions.moveFn=ht,z.dragOptions.clickFn=_e,z.dragOptions.doneFn=lt,gt(),z.clearOutline(G)):(E(Ye)||m(Ye))&&_(Fe,Pe,be,z.dragOptions,Ye)}};var de,me,W,ie,se,ee,pe,oe,Y,ce;function ue(Fe){var Pe={};return Pe[z.id+".aaxis.min"]=Fe.a,Pe[z.id+".baxis.min"]=Fe.b,Pe[z.id+".caxis.min"]=Fe.c,Pe}function _e(Fe,Pe){var be=G._fullLayout.clickmode;q(G),Fe===2&&(G.emit("plotly_doubleclick",null),C.call("_guiRelayout",G,ue({a:0,b:0,c:0}))),be.indexOf("select")>-1&&Fe===1&&T(Pe,G,[z.xaxis],[z.yaxis],z.id,z.dragOptions),be.indexOf("event")>-1&&h.click(G,Pe,z.id)}function Le(Fe,Pe,be){var Ye=H.getBoundingClientRect();de=Pe-Ye.left,me=be-Ye.top,G._fullLayout._calcInverseTransform(G);var mt=G._fullLayout._invTransform,bt=P.apply3DTransform(mt)(de,me);de=bt[0],me=bt[1],W={a:z.aaxis.range[0],b:z.baxis.range[1],c:z.caxis.range[1]},se=W,ie=z.aaxis.range[1]-W.a,ee=w(z.graphDiv._fullLayout[z.id].bgcolor).getLuminance(),pe="M0,"+z.h+"L"+z.w/2+", 0L"+z.w+","+z.h+"Z",oe=!1,Y=J.append("path").attr("class","zoombox").attr("transform",t(z.x0,z.y0)).style({fill:ee>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",pe),ce=J.append("path").attr("class","zoombox-corners").attr("transform",t(z.x0,z.y0)).style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),z.clearOutline(G)}function ze(Fe,Pe){return 1-Pe/z.h}function Ge(Fe,Pe){return 1-(Fe+(z.h-Pe)/Math.sqrt(3))/z.w}function Ve(Fe,Pe){return(Fe-(z.h-Pe)/Math.sqrt(3))/z.w}function rt(Fe,Pe){var be=de+Fe*le,Ye=me+Pe*ye,mt=Math.max(0,Math.min(1,ze(de,me),ze(be,Ye))),bt=Math.max(0,Math.min(1,Ge(de,me),Ge(be,Ye))),ft=Math.max(0,Math.min(1,Ve(de,me),Ve(be,Ye))),Wt=(mt/2+ft)*z.w,Zt=(1-mt/2-bt)*z.w,cr=(Wt+Zt)/2,pr=Zt-Wt,Br=(1-mt)*z.h,Fr=Br-pr/f;pr<b.MINZOOM?(se=W,Y.attr("d",pe),ce.attr("d","M0,0Z")):(se={a:W.a+mt*ie,b:W.b+bt*ie,c:W.c+ft*ie},Y.attr("d",pe+"M"+Wt+","+Br+"H"+Zt+"L"+cr+","+Fr+"L"+Wt+","+Br+"Z"),ce.attr("d","M"+de+","+me+U+"M"+Wt+","+Br+N+"M"+Zt+","+Br+D+"M"+cr+","+Fr+B)),oe||(Y.transition().style("fill",ee>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ce.transition().style("opacity",1).duration(200),oe=!0),G.emit("plotly_relayouting",ue(se))}function pt(){q(G),se!==W&&(C.call("_guiRelayout",G,ue(se)),V&&G.data&&G._context.showTips&&(P.notifier(r(G,"Double-click to zoom back out"),"long"),V=!1))}function gt(){W={a:z.aaxis.range[0],b:z.baxis.range[1],c:z.caxis.range[1]},se=W}function ht(Fe,Pe){var be=Fe/z.xaxis._m,Ye=Pe/z.yaxis._m;se={a:W.a-Ye,b:W.b+(be+Ye)/2,c:W.c-(be-Ye)/2};var mt=[se.a,se.b,se.c].sort(P.sorterAsc),bt={a:mt.indexOf(se.a),b:mt.indexOf(se.b),c:mt.indexOf(se.c)};mt[0]<0&&(mt[1]+mt[0]/2<0?(mt[2]+=mt[0]+mt[1],mt[0]=mt[1]=0):(mt[2]+=mt[0]/2,mt[1]+=mt[0]/2,mt[0]=0),se={a:mt[bt.a],b:mt[bt.b],c:mt[bt.c]},Pe=(W.a-se.a)*z.yaxis._m,Fe=(W.c-se.c-W.b+se.b)*z.xaxis._m);var ft=t(z.x0+Fe,z.y0+Pe);z.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ft);var Wt=t(-Fe,-Pe);z.clipDefRelative.select("path").attr("transform",Wt),z.aaxis.range=[se.a,z.sum-se.b-se.c],z.baxis.range=[z.sum-se.a-se.c,se.b],z.caxis.range=[z.sum-se.a-se.b,se.c],z.drawAxes(!1),z._hasClipOnAxisFalse&&z.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,z),G.emit("plotly_relayouting",ue(se))}function lt(){C.call("_guiRelayout",G,ue(se))}H.onmousemove=function(Fe){h.hover(G,Fe,z.id),G._fullLayout._lasthover=H,G._fullLayout._hoversubplot=z.id},H.onmouseout=function(Fe){G._dragging||d.unhover(G,Fe)},d.init(this.dragOptions)};function q(z){v.select(z).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),ZA=Ne({"src/plots/ternary/layout_attributes.js"(te,Z){var v=lu(),w=Oc().attributes,C=wd(),P=Kc().overrideAll,t=co().extendFlat,r={title:{text:C.title.text,font:C.title.font},color:C.color,tickmode:C.minor.tickmode,nticks:t({},C.nticks,{dflt:6,min:1}),tick0:C.tick0,dtick:C.dtick,tickvals:C.tickvals,ticktext:C.ticktext,ticks:C.ticks,ticklen:C.ticklen,tickwidth:C.tickwidth,tickcolor:C.tickcolor,ticklabelstep:C.ticklabelstep,showticklabels:C.showticklabels,labelalias:C.labelalias,showtickprefix:C.showtickprefix,tickprefix:C.tickprefix,showticksuffix:C.showticksuffix,ticksuffix:C.ticksuffix,showexponent:C.showexponent,exponentformat:C.exponentformat,minexponent:C.minexponent,separatethousands:C.separatethousands,tickfont:C.tickfont,tickangle:C.tickangle,tickformat:C.tickformat,tickformatstops:C.tickformatstops,hoverformat:C.hoverformat,showline:t({},C.showline,{dflt:!0}),linecolor:C.linecolor,linewidth:C.linewidth,showgrid:t({},C.showgrid,{dflt:!0}),gridcolor:C.gridcolor,gridwidth:C.gridwidth,griddash:C.griddash,layer:C.layer,min:{valType:"number",dflt:0,min:0}},a=Z.exports=P({domain:w({name:"ternary"}),bgcolor:{valType:"color",dflt:v.background},sum:{valType:"number",dflt:1,min:0},aaxis:r,baxis:r,caxis:r},"plot","from-root");a.uirevision={valType:"any",editType:"none"},a.aaxis.uirevision=a.baxis.uirevision=a.caxis.uirevision={valType:"any",editType:"none"}}}),X0=Ne({"src/plots/subplot_defaults.js"(te,Z){var v=In(),w=Tu(),C=Oc().defaults;Z.exports=function(t,r,a,l){var i=l.type,s=l.attributes,o=l.handleDefaults,u=l.partition||"x",d=r._subplots[i],h=d.length,y=h&&d[0].replace(/\d+$/,""),m,E;function c(k,b){return v.coerce(m,E,s,k,b)}for(var _=0;_<h;_++){var T=d[_];t[T]?m=t[T]:m=t[T]={},E=w.newContainer(r,T,y),l.noUirevision||c("uirevision",r.uirevision);var M={};M[u]=[_/h,(_+1)/h],C(E,r,c,M),l.id=T,o(m,E,c,l)}}}}),QM=Ne({"src/plots/ternary/layout_defaults.js"(te,Z){var v=io(),w=Tu(),C=In(),P=X0(),t=Em(),r=fp(),a=B0(),l=Tg(),i=Ku(),s=ZA(),o=["aaxis","baxis","caxis"];Z.exports=function(y,m,E){P(y,m,E,{type:"ternary",attributes:s,handleDefaults:u,font:m.font,paper_bgcolor:m.paper_bgcolor})};function u(h,y,m,E){var c=m("bgcolor"),_=m("sum");E.bgColor=v.combine(c,E.paper_bgcolor);for(var T,M,k,b=0;b<o.length;b++)T=o[b],M=h[T]||{},k=w.newContainer(y,T),k._name=T,d(M,k,E,y);var A=y.aaxis,g=y.baxis,f=y.caxis;A.min+g.min+f.min>=_&&(A.min=0,g.min=0,f.min=0,h.aaxis&&delete h.aaxis.min,h.baxis&&delete h.baxis.min,h.caxis&&delete h.caxis.min)}function d(h,y,m,E){var c=s[y._name];function _(p,x){return C.coerce(h,y,c,p,x)}_("uirevision",E.uirevision),y.type="linear";var T=_("color"),M=T!==c.color.dflt?T:m.font.color,k=y._name,b=k.charAt(0).toUpperCase(),A="Component "+b,g=_("title.text",A);y._hovertitle=g===A?g:b,C.coerceFont(_,"title.font",m.font,{overrideDflt:{size:C.bigFont(m.font.size),color:M}}),_("min"),l(h,y,_,"linear"),r(h,y,_,"linear"),t(h,y,_,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),a(h,y,_,{outerTicks:!0});var f=_("showticklabels");f&&(C.coerceFont(_,"tickfont",m.font,{overrideDflt:{color:M}}),_("tickangle"),_("tickformat")),i(h,y,_,{dfltColor:T,bgColor:m.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:c}),_("hoverformat"),_("layer")}}}),eC=Ne({"src/plots/ternary/index.js"(te){var Z=S2(),v=iv().getSubplotCalcData,w=In().counterRegex,C="ternary";te.name=C;var P=te.attr="subplot";te.idRoot=C,te.idRegex=te.attrRegex=w(C);var t=te.attributes={};t[P]={valType:"subplotid",dflt:"ternary",editType:"calc"},te.layoutAttributes=ZA(),te.supplyLayoutDefaults=QM(),te.plot=function(a){for(var l=a._fullLayout,i=a.calcdata,s=l._subplots[C],o=0;o<s.length;o++){var u=s[o],d=v(i,C,u),h=l[u]._subplot;h||(h=new Z({id:u,graphDiv:a,container:l._ternarylayer.node()},l),l[u]._subplot=h),h.plot(d,l,a._promises)}},te.clean=function(r,a,l,i){for(var s=i._subplots[C]||[],o=0;o<s.length;o++){var u=s[o],d=i[u]._subplot;!a[u]&&d&&(d.plotContainer.remove(),d.clipDef.remove(),d.clipDefRelative.remove(),d.layers["a-title"].remove(),d.layers["b-title"].remove(),d.layers["c-title"].remove())}},te.updateFx=function(r){var a=r._fullLayout;a._ternarylayer.selectAll("g.toplevel").style("cursor",a.dragmode==="pan"?"move":"crosshair")}}}),qL=Ne({"src/traces/scatterternary/index.js"(te,Z){Z.exports={attributes:A2(),supplyDefaults:YM(),colorbar:ah(),formatLabels:ZM(),calc:jg(),plot:$M(),style:Hh().style,styleOnSelect:Hh().styleOnSelect,hoverPoints:KM(),selectPoints:Pg(),eventData:JM(),moduleType:"trace",name:"scatterternary",basePlotModule:eC(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}}}),$A=Ne({"lib/scatterternary.js"(te,Z){Z.exports=qL()}}),nd=Ne({"src/traces/violin/attributes.js"(te,Z){var v=Fg(),w=co().extendFlat,C=bc().axisHoverFormat;Z.exports={y:v.y,x:v.x,x0:v.x0,y0:v.y0,xhoverformat:C("x"),yhoverformat:C("y"),name:w({},v.name,{}),orientation:w({},v.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:v.fillcolor,points:w({},v.boxpoints,{}),jitter:w({},v.jitter,{}),pointpos:w({},v.pointpos,{}),width:w({},v.width,{}),marker:v.marker,text:v.text,hovertext:v.hovertext,hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,quartilemethod:v.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:v.offsetgroup,alignmentgroup:v.alignmentgroup,selected:v.selected,unselected:v.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:v.zorder}}}),uv=Ne({"src/traces/violin/layout_attributes.js"(te,Z){var v=Ny(),w=In().extendFlat;Z.exports={violinmode:w({},v.boxmode,{}),violingap:w({},v.boxgap,{}),violingroupgap:w({},v.boxgroupgap,{})}}}),tC=Ne({"src/traces/violin/defaults.js"(te,Z){var v=In(),w=io(),C=G0(),P=nd();Z.exports=function(r,a,l,i){function s(f,p){return v.coerce(r,a,P,f,p)}function o(f,p){return v.coerce2(r,a,P,f,p)}if(C.handleSampleDefaults(r,a,s,i),a.visible!==!1){s("bandwidth"),s("side");var u=s("width");u||(s("scalegroup",a.name),s("scalemode"));var d=s("span"),h;Array.isArray(d)&&(h="manual"),s("spanmode",h);var y=s("line.color",(r.marker||{}).color||l),m=s("line.width"),E=s("fillcolor",w.addOpacity(a.line.color,.5));C.handlePointsDefaults(r,a,s,{prefix:""});var c=o("box.width"),_=o("box.fillcolor",E),T=o("box.line.color",y),M=o("box.line.width",m),k=s("box.visible",!!(c||_||T||M));k||(a.box={visible:!1});var b=o("meanline.color",y),A=o("meanline.width",m),g=s("meanline.visible",!!(b||A));g||(a.meanline={visible:!1}),s("quartilemethod"),s("zorder")}}}}),rC=Ne({"src/traces/violin/layout_defaults.js"(te,Z){var v=In(),w=uv(),C=DA();Z.exports=function(t,r,a){function l(i,s){return v.coerce(t,r,w,i,s)}C._supply(t,r,a,l,"violin")}}}),E2=Ne({"src/traces/violin/helpers.js"(te){var Z=In(),v={gaussian:function(w){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*w*w)}};te.makeKDE=function(w,C,P){var t=P.length,r=v.gaussian,a=w.bandwidth,l=1/(t*a);return function(i){for(var s=0,o=0;o<t;o++)s+=r((i-P[o])/a);return l*s}},te.getPositionOnKdePath=function(w,C,P){var t,r;C.orientation==="h"?(t="y",r="x"):(t="x",r="y");var a=Z.findPointOnPath(w.path,P,r,{pathLength:w.pathLength}),l=w.posCenterPx,i=a[t],s=C.side==="both"?2*l-i:l;return[i,s]},te.getKdeValue=function(w,C,P){var t=w.pts.map(te.extractVal),r=te.makeKDE(w,C,t);return r(P)/w.posDensityScale},te.extractVal=function(w){return w.v}}}),nC=Ne({"src/traces/violin/calc.js"(te,Z){var v=In(),w=Os(),C=Rh(),P=E2(),t=ja().BADNUM;Z.exports=function(s,o){var u=C(s,o);if(u[0].t.empty)return u;for(var d=s._fullLayout,h=w.getFromId(s,o[o.orientation==="h"?"xaxis":"yaxis"]),y=1/0,m=-1/0,E=0,c=0,_=0;_<u.length;_++){var T=u[_],M=T.pts.map(P.extractVal),k=T.bandwidth=a(o,T,M),b=T.span=l(o,T,h,k);if(T.min===T.max&&k===0)b=T.span=[T.min,T.max],T.density=[{v:1,t:b[0]}],T.bandwidth=k,E=Math.max(E,1);else{var A=b[1]-b[0],g=Math.ceil(A/(k/3)),f=A/g;if(!isFinite(f)||!isFinite(g))return v.error("Something went wrong with computing the violin span"),u[0].t.empty=!0,u;var p=P.makeKDE(T,o,M);T.density=new Array(g+1);for(var x=0;x<T.density.length;x++){var N=b[0]+x*f,D=p(N);T.density[x]={v:D,t:N},E=Math.max(E,D)}}c=Math.max(c,M.length),y=Math.min(y,b[0]),m=Math.max(m,b[1])}var B=w.findExtremes(h,[y,m],{padded:!0});if(o._extremes[h._id]=B,o.width)u[0].t.maxKDE=E;else{var U=d._violinScaleGroupStats,V=o.scalegroup,q=U[V];q?(q.maxKDE=Math.max(q.maxKDE,E),q.maxCount=Math.max(q.maxCount,c)):U[V]={maxKDE:E,maxCount:c}}return u[0].t.labels.kde=v._(s,"kde:"),u};function r(i,s,o){var u=Math.min(s,o/1.349);return 1.059*u*Math.pow(i,-.2)}function a(i,s,o){var u=s.max-s.min;if(!u)return i.bandwidth?i.bandwidth:0;if(i.bandwidth)return Math.max(i.bandwidth,u/1e4);var d=o.length,h=v.stdev(o,d-1,s.mean);return Math.max(r(d,h,s.q3-s.q1),u/100)}function l(i,s,o,u){var d=i.spanmode,h=i.span||[],y=[s.min,s.max],m=[s.min-2*u,s.max+2*u],E;function c(T){var M=h[T],k=o.type==="multicategory"?o.r2c(M):o.d2c(M,0,i[s.valLetter+"calendar"]);return k===t?m[T]:k}d==="soft"?E=m:d==="hard"?E=y:E=[c(0),c(1)];var _={type:"linear",range:E};return w.setConvert(_),_.cleanRange(),E}}}),$x=Ne({"src/traces/violin/cross_trace_calc.js"(te,Z){var v=jx().setPositionOffset,w=["v","h"];Z.exports=function(P,t){for(var r=P.calcdata,a=t.xaxis,l=t.yaxis,i=0;i<w.length;i++){for(var s=w[i],o=s==="h"?l:a,u=[],d=0;d<r.length;d++){var h=r[d],y=h[0].t,m=h[0].trace;m.visible===!0&&m.type==="violin"&&!y.empty&&m.orientation===s&&m.xaxis===a._id&&m.yaxis===l._id&&u.push(d)}v("violin",P,u,o)}}}}),aC=Ne({"src/traces/violin/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=Ux(),t=Yp(),r=E2();Z.exports=function(l,i,s,o){var u=l._context.staticPlot,d=l._fullLayout,h=i.xaxis,y=i.yaxis;function m(E,c){var _=t(E,{xaxis:h,yaxis:y,trace:c,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return C.smoothopen(_[0],1)}w.makeTraceGroups(o,s,"trace violins").each(function(E){var c=v.select(this),_=E[0],T=_.t,M=_.trace;if(M.visible!==!0||T.empty){c.remove();return}var k=T.bPos,b=T.bdPos,A=i[T.valLetter+"axis"],g=i[T.posLetter+"axis"],f=M.side==="both",p=f||M.side==="positive",x=f||M.side==="negative",N=c.selectAll("path.violin").data(w.identity);N.enter().append("path").style("vector-effect",u?"none":"non-scaling-stroke").attr("class","violin"),N.exit().remove(),N.each(function(G){var J=v.select(this),le=G.density,ye=le.length,de=g.c2l(G.pos+k,!0),me=g.l2p(de),W;if(M.width)W=T.maxKDE/b;else{var ie=d._violinScaleGroupStats[M.scalegroup];W=M.scalemode==="count"?ie.maxKDE/b*(ie.maxCount/G.pts.length):ie.maxKDE/b}var se,ee,pe,oe,Y,ce,ue;if(p){for(ce=new Array(ye),oe=0;oe<ye;oe++)ue=ce[oe]={},ue[T.posLetter]=de+le[oe].v/W,ue[T.valLetter]=A.c2l(le[oe].t,!0);se=m(ce,M)}if(x){for(ce=new Array(ye),Y=0,oe=ye-1;Y<ye;Y++,oe--)ue=ce[Y]={},ue[T.posLetter]=de-le[oe].v/W,ue[T.valLetter]=A.c2l(le[oe].t,!0);ee=m(ce,M)}if(f)pe=se+"L"+ee.substr(1)+"Z";else{var _e=[me,A.c2p(le[0].t)],Le=[me,A.c2p(le[ye-1].t)];M.orientation==="h"&&(_e.reverse(),Le.reverse()),p?pe="M"+_e+"L"+se.substr(1)+"L"+Le:pe="M"+Le+"L"+ee.substr(1)+"L"+_e}J.attr("d",pe),G.posCenterPx=me,G.posDensityScale=W*b,G.path=J.node(),G.pathLength=G.path.getTotalLength()/(f?2:1)});var D=M.box,B=D.width,U=(D.line||{}).width,V,q;f?(V=b*B,q=0):p?(V=[0,b*B/2],q=U*{x:1,y:-1}[T.posLetter]):(V=[b*B/2,0],q=U*{x:-1,y:1}[T.posLetter]),P.plotBoxAndWhiskers(c,{pos:g,val:A},M,{bPos:k,bdPos:V,bPosPxOffset:q}),P.plotBoxMean(c,{pos:g,val:A},M,{bPos:k,bdPos:V,bPosPxOffset:q});var z;!M.box.visible&&M.meanline.visible&&(z=w.identity);var H=c.selectAll("path.meanline").data(z||[]);H.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect",u?"none":"non-scaling-stroke"),H.exit().remove(),H.each(function(G){var J=A.c2p(G.mean,!0),le=r.getPositionOnKdePath(G,M,J);v.select(this).attr("d",M.orientation==="h"?"M"+J+","+le[0]+"V"+le[1]:"M"+le[0]+","+J+"H"+le[1])}),P.plotPoints(c,{x:h,y},M,T)})}}}),M2=Ne({"src/traces/violin/style.js"(te,Z){var v=xn(),w=io(),C=Hh().stylePoints;Z.exports=function(t){var r=v.select(t).selectAll("g.trace.violins");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var l=a[0].trace,i=v.select(this),s=l.box||{},o=s.line||{},u=l.meanline||{},d=u.width;i.selectAll("path.violin").style("stroke-width",l.line.width+"px").call(w.stroke,l.line.color).call(w.fill,l.fillcolor),i.selectAll("path.box").style("stroke-width",o.width+"px").call(w.stroke,o.color).call(w.fill,s.fillcolor);var h={"stroke-width":d+"px","stroke-dasharray":2*d+"px,"+d+"px"};i.selectAll("path.mean").style(h).call(w.stroke,u.color),i.selectAll("path.meanline").style(h).call(w.stroke,u.color),C(i,l,t)})}}}),iC=Ne({"src/traces/violin/hover.js"(te,Z){var v=io(),w=In(),C=Os(),P=OA(),t=E2();Z.exports=function(a,l,i,s,o){o||(o={});var u=o.hoverLayer,d=a.cd,h=d[0].trace,y=h.hoveron,m=y.indexOf("violins")!==-1,E=y.indexOf("kde")!==-1,c=[],_,T;if(m||E){var M=P.hoverOnBoxes(a,l,i,s);if(E&&M.length>0){var k=a.xa,b=a.ya,A,g,f,p,x;h.orientation==="h"?(x=l,A="y",f=b,g="x",p=k):(x=i,A="x",f=k,g="y",p=b);var N=d[a.index];if(x>=N.span[0]&&x<=N.span[1]){var D=w.extendFlat({},a),B=p.c2p(x,!0),U=t.getKdeValue(N,h,x),V=t.getPositionOnKdePath(N,h,B),q=f._offset,z=f._length;D[A+"0"]=V[0],D[A+"1"]=V[1],D[g+"0"]=D[g+"1"]=B,D[g+"Label"]=g+": "+C.hoverLabelText(p,x,h[g+"hoverformat"])+", "+d[0].t.labels.kde+" "+U.toFixed(3);for(var H=0,G=0;G<M.length;G++)if(M[G].attr==="med"){H=G;break}D.spikeDistance=M[H].spikeDistance;var J=A+"Spike";D[J]=M[H][J],M[H].spikeDistance=void 0,M[H][J]=void 0,D.hovertemplate=!1,c.push(D),T={},T[A+"1"]=w.constrain(q+V[0],q,q+z),T[A+"2"]=w.constrain(q+V[1],q,q+z),T[g+"1"]=T[g+"2"]=p._offset+B}}m&&(c=c.concat(M))}y.indexOf("points")!==-1&&(_=P.hoverOnPoints(a,l,i));var le=u.selectAll(".violinline-"+h.uid).data(T?[0]:[]);return le.enter().append("line").classed("violinline-"+h.uid,!0).attr("stroke-width",1.5),le.exit().remove(),le.attr(T).call(v.stroke,a.color),s==="closest"?_?[_]:c:(_&&c.push(_),c)}}}),VL=Ne({"src/traces/violin/index.js"(te,Z){Z.exports={attributes:nd(),layoutAttributes:uv(),supplyDefaults:tC(),crossTraceDefaults:G0().crossTraceDefaults,supplyLayoutDefaults:rC(),calc:nC(),crossTraceCalc:$x(),plot:aC(),style:M2(),styleOnSelect:Hh().styleOnSelect,hoverPoints:iC(),selectPoints:Qw(),moduleType:"trace",name:"violin",basePlotModule:Lh(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}}}),C2=Ne({"lib/violin.js"(te,Z){Z.exports=VL()}}),KA=Ne({"src/traces/funnel/constants.js"(te,Z){Z.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}}}),JA=Ne({"src/traces/funnel/attributes.js"(te,Z){var v=rd(),w=Jc().line,C=ns(),P=bc().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=KA(),i=co().extendFlat,s=io();Z.exports={x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),hovertext:v.hovertext,hovertemplate:t({},{keys:l.eventDataKeys}),hovertemplatefallback:a(),hoverinfo:i({},C.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:r({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:i({},v.insidetextanchor,{dflt:"middle"}),textangle:i({},v.textangle,{dflt:0}),textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:i({},v.orientation,{}),offset:i({},v.offset,{arrayOk:!1}),width:i({},v.width,{arrayOk:!1}),marker:o(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:i({},w.color,{dflt:s.defaultLine}),width:i({},w.width,{dflt:0,editType:"plot"}),dash:w.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder};function o(){var u=i({},v.marker);return delete u.pattern,delete u.cornerradius,u}}}),QA=Ne({"src/traces/funnel/layout_attributes.js"(te,Z){Z.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"}}}}),eS=Ne({"src/traces/funnel/defaults.js"(te,Z){var v=In(),w=j0(),C=vp().handleText,P=Lm(),t=Rm(),r=JA(),a=io();function l(o,u,d,h){function y(k,b){return v.coerce(o,u,r,k,b)}var m=P(o,u,h,y);if(!m){u.visible=!1;return}t(o,u,h,y),y("xhoverformat"),y("yhoverformat"),y("orientation",u.y&&!u.x?"v":"h"),y("offset"),y("width");var E=y("text");y("hovertext"),y("hovertemplate"),y("hovertemplatefallback");var c=y("textposition");C(o,u,h,y,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),u.textposition!=="none"&&!u.texttemplate&&y("textinfo",v.isArrayOrTypedArray(E)?"text+value":"value");var _=y("marker.color",d);y("marker.line.color",a.defaultLine),y("marker.line.width");var T=y("connector.visible");if(T){y("connector.fillcolor",i(_));var M=y("connector.line.width");M&&(y("connector.line.color"),y("connector.line.dash"))}y("zorder")}function i(o){var u=v.isArrayOrTypedArray(o)?"#000":o;return a.addOpacity(u,.5*a.opacity(u))}function s(o,u){var d,h;function y(E){return v.coerce(h._input,h,r,E)}for(var m=0;m<o.length;m++)h=o[m],h.type==="funnel"&&(d=h._input,w(d,h,u,y,u.funnelmode))}Z.exports={supplyDefaults:l,crossTraceDefaults:s}}}),tS=Ne({"src/traces/funnel/layout_defaults.js"(te,Z){var v=In(),w=QA();Z.exports=function(C,P,t){var r=!1;function a(s,o){return v.coerce(C,P,w,s,o)}for(var l=0;l<t.length;l++){var i=t[l];if(i.visible&&i.type==="funnel"){r=!0;break}}r&&(a("funnelmode"),a("funnelgap",.2),a("funnelgroupgap"))}}}),rS=Ne({"src/traces/funnel/arrays_to_calcdata.js"(te,Z){var v=In();Z.exports=function(C,P){for(var t=0;t<C.length;t++)C[t].i=t;v.mergeArray(P.text,C,"tx"),v.mergeArray(P.hovertext,C,"htx");var r=P.marker;if(r){v.mergeArray(r.opacity,C,"mo"),v.mergeArray(r.color,C,"mc");var a=r.line;a&&(v.mergeArray(a.color,C,"mlc"),v.mergeArrayCastPositive(a.width,C,"mlw"))}}}}),nS=Ne({"src/traces/funnel/calc.js"(te,Z){var v=Os(),w=Dm(),C=rS(),P=Vh(),t=ja().BADNUM;Z.exports=function(l,i){var s=v.getFromId(l,i.xaxis||"x"),o=v.getFromId(l,i.yaxis||"y"),u,d,h,y,m,E,c,_;i.orientation==="h"?(u=s.makeCalcdata(i,"x"),h=o.makeCalcdata(i,"y"),y=w(i,o,"y",h),m=!!i.yperiodalignment,E="y"):(u=o.makeCalcdata(i,"y"),h=s.makeCalcdata(i,"x"),y=w(i,s,"x",h),m=!!i.xperiodalignment,E="x"),d=y.vals;var T=Math.min(d.length,u.length),M=new Array(T);for(i._base=[],c=0;c<T;c++){u[c]<0&&(u[c]=t);var k=!1;u[c]!==t&&c+1<T&&u[c+1]!==t&&(k=!0),_=M[c]={p:d[c],s:u[c],cNext:k},i._base[c]=-.5*_.s,m&&(M[c].orig_p=h[c],M[c][E+"End"]=y.ends[c],M[c][E+"Start"]=y.starts[c]),i.ids&&(_.id=String(i.ids[c])),c===0&&(M[0].vTotal=0),M[0].vTotal+=r(_.s),_.begR=r(_.s)/r(M[0].s)}var b;for(c=0;c<T;c++)_=M[c],_.s!==t&&(_.sumR=_.s/M[0].vTotal,_.difR=b!==void 0?_.s/b:1,b=_.s);return C(M,i),P(M,i),M};function r(a){return a===t?0:a}}}),oC=Ne({"src/traces/funnel/cross_trace_calc.js"(te,Z){var v=U0().setGroupPositions;Z.exports=function(C,P){var t=C._fullLayout,r=C._fullData,a=C.calcdata,l=P.xaxis,i=P.yaxis,s=[],o=[],u=[],d,h;for(h=0;h<r.length;h++){var y=r[h],m=y.orientation==="h";y.visible===!0&&y.xaxis===l._id&&y.yaxis===i._id&&y.type==="funnel"&&(d=a[h],m?u.push(d):o.push(d),s.push(d))}var E={mode:t.funnelmode,norm:t.funnelnorm,gap:t.funnelgap,groupgap:t.funnelgroupgap};for(v(C,l,i,o,E),v(C,i,l,u,E),h=0;h<s.length;h++){d=s[h];for(var c=0;c<d.length;c++)c+1<d.length&&(d[c].nextP0=d[c+1].p0,d[c].nextS0=d[c+1].s0,d[c].nextP1=d[c+1].p1,d[c].nextS1=d[c+1].s1)}}}}),aS=Ne({"src/traces/funnel/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=ja().BADNUM,t=hu(),r=mc().clearMinTextSize;Z.exports=function(o,u,d,h){var y=o._fullLayout;r("funnel",y),a(o,u,d,h),l(o,u,d,h),t.plot(o,u,d,h,{mode:y.funnelmode,norm:y.funnelmode,gap:y.funnelgap,groupgap:y.funnelgroupgap})};function a(s,o,u,d){var h=o.xaxis,y=o.yaxis;w.makeTraceGroups(d,u,"trace bars").each(function(m){var E=v.select(this),c=m[0].trace,_=w.ensureSingle(E,"g","regions");if(!c.connector||!c.connector.visible){_.remove();return}var T=c.orientation==="h",M=_.selectAll("g.region").data(w.identity);M.enter().append("g").classed("region",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var g=i(b,h,y,T),f=g[0],p=g[1],x="";f[0]!==P&&p[0]!==P&&f[1]!==P&&p[1]!==P&&f[2]!==P&&p[2]!==P&&f[3]!==P&&p[3]!==P&&(T?x+="M"+f[0]+","+p[1]+"L"+f[2]+","+p[2]+"H"+f[3]+"L"+f[1]+","+p[1]+"Z":x+="M"+f[1]+","+p[1]+"L"+f[2]+","+p[3]+"V"+p[2]+"L"+f[1]+","+p[0]+"Z"),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,o.layerClipId,s)}})})}function l(s,o,u,d){var h=o.xaxis,y=o.yaxis;w.makeTraceGroups(d,u,"trace bars").each(function(m){var E=v.select(this),c=m[0].trace,_=w.ensureSingle(E,"g","lines");if(!c.connector||!c.connector.visible||!c.connector.line.width){_.remove();return}var T=c.orientation==="h",M=_.selectAll("g.line").data(w.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var g=i(b,h,y,T),f=g[0],p=g[1],x="";f[3]!==void 0&&p[3]!==void 0&&(T?(x+="M"+f[0]+","+p[1]+"L"+f[2]+","+p[2],x+="M"+f[1]+","+p[1]+"L"+f[3]+","+p[2]):(x+="M"+f[1]+","+p[1]+"L"+f[2]+","+p[3],x+="M"+f[1]+","+p[0]+"L"+f[2]+","+p[2])),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,o.layerClipId,s)}})})}function i(s,o,u,d){var h=[],y=[],m=d?o:u,E=d?u:o;return h[0]=m.c2p(s.s0,!0),y[0]=E.c2p(s.p0,!0),h[1]=m.c2p(s.s1,!0),y[1]=E.c2p(s.p1,!0),h[2]=m.c2p(s.nextS0,!0),y[2]=E.c2p(s.nextP0,!0),h[3]=m.c2p(s.nextS1,!0),y[3]=E.c2p(s.nextP1,!0),d?[h,y]:[y,h]}}}),k2=Ne({"src/traces/funnel/style.js"(te,Z){var v=xn(),w=zs(),C=io(),P=$c().DESELECTDIM,t=Fd(),r=mc().resizeText,a=t.styleTextPoints;function l(i,s,o){var u=o||v.select(i).selectAll('g[class^="funnellayer"]').selectAll("g.trace");r(i,u,"funnel"),u.style("opacity",function(d){return d[0].trace.opacity}),u.each(function(d){var h=v.select(this),y=d[0].trace;h.selectAll(".point > path").each(function(m){if(!m.isBlank){var E=y.marker;v.select(this).call(C.fill,m.mc||E.color).call(C.stroke,m.mlc||E.line.color).call(w.dashLine,E.line.dash,m.mlw||E.line.width).style("opacity",y.selectedpoints&&!m.selected?P:1)}}),a(h,y,i),h.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(C.fill,y.connector.fillcolor)}),h.selectAll(".lines").each(function(){var m=y.connector.line;w.lineGroupStyle(v.select(this).selectAll("path"),m.width,m.color,m.dash)})})}Z.exports={style:l}}}),iS=Ne({"src/traces/funnel/hover.js"(te,Z){var v=io().opacity,w=zc().hoverOnBars,C=In().formatPercent;Z.exports=function(r,a,l,i,s){var o=w(r,a,l,i,s);if(o){var u=o.cd,d=u[0].trace,h=d.orientation==="h",y=o.index,m=u[y],E=h?"x":"y";o[E+"LabelVal"]=m.s,o.percentInitial=m.begR,o.percentInitialLabel=C(m.begR,1),o.percentPrevious=m.difR,o.percentPreviousLabel=C(m.difR,1),o.percentTotal=m.sumR,o.percentTotalLabel=C(m.sumR,1);var c=m.hi||d.hoverinfo,_=[];if(c&&c!=="none"&&c!=="skip"){var T=c==="all",M=c.split("+"),k=function(b){return T||M.indexOf(b)!==-1};k("percent initial")&&_.push(o.percentInitialLabel+" of initial"),k("percent previous")&&_.push(o.percentPreviousLabel+" of previous"),k("percent total")&&_.push(o.percentTotalLabel+" of total")}return o.extraText=_.join("<br>"),o.color=P(d,m),[o]}};function P(t,r){var a=t.marker,l=r.mc||a.color,i=r.mlc||a.line.color,s=r.mlw||a.line.width;if(v(l))return l;if(v(i)&&s)return i}}}),sC=Ne({"src/traces/funnel/event_data.js"(te,Z){Z.exports=function(w,C){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"percentInitial"in C&&(w.percentInitial=C.percentInitial),"percentPrevious"in C&&(w.percentPrevious=C.percentPrevious),"percentTotal"in C&&(w.percentTotal=C.percentTotal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),oS=Ne({"src/traces/funnel/index.js"(te,Z){Z.exports={attributes:JA(),layoutAttributes:QA(),supplyDefaults:eS().supplyDefaults,crossTraceDefaults:eS().crossTraceDefaults,supplyLayoutDefaults:tS(),calc:nS(),crossTraceCalc:oC(),plot:aS(),style:k2().style,hoverPoints:iS(),eventData:sC(),selectPoints:zy(),moduleType:"trace",name:"funnel",basePlotModule:Lh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),lC=Ne({"lib/funnel.js"(te,Z){Z.exports=oS()}}),W0=Ne({"src/traces/waterfall/constants.js"(te,Z){Z.exports={eventDataKeys:["initial","delta","final"]}}}),P2=Ne({"src/traces/waterfall/attributes.js"(te,Z){var v=rd(),w=Jc().line,C=ns(),P=bc().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=W0(),i=co().extendFlat,s=io();function o(u){return{marker:{color:i({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:i({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:i({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}Z.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:P("x"),yhoverformat:P("y"),hovertext:v.hovertext,hovertemplate:t({},{keys:l.eventDataKeys}),hovertemplatefallback:a(),hoverinfo:i({},C.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:r({editType:"plot"},{keys:l.eventDataKeys.concat(["label"])}),texttemplatefallback:a({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:o(),decreasing:o(),totals:o(),connector:{line:{color:i({},w.color,{dflt:s.defaultLine}),width:i({},w.width,{editType:"plot"}),dash:w.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),uC=Ne({"src/traces/waterfall/layout_attributes.js"(te,Z){Z.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"}}}}),a_=Ne({"src/constants/delta.js"(te,Z){Z.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),u0=Ne({"src/traces/waterfall/defaults.js"(te,Z){var v=In(),w=j0(),C=vp().handleText,P=Lm(),t=Rm(),r=P2(),a=io(),l=a_(),i=l.INCREASING.COLOR,s=l.DECREASING.COLOR,o="#4499FF";function u(y,m,E){y(m+".marker.color",E),y(m+".marker.line.color",a.defaultLine),y(m+".marker.line.width")}function d(y,m,E,c){function _(A,g){return v.coerce(y,m,r,A,g)}var T=P(y,m,c,_);if(!T){m.visible=!1;return}t(y,m,c,_),_("xhoverformat"),_("yhoverformat"),_("measure"),_("orientation",m.x&&!m.y?"h":"v"),_("base"),_("offset"),_("width"),_("text"),_("hovertext"),_("hovertemplate"),_("hovertemplatefallback");var M=_("textposition");C(y,m,c,_,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),m.textposition!=="none"&&(_("texttemplate"),_("texttemplatefallback"),m.texttemplate||_("textinfo")),u(_,"increasing",i),u(_,"decreasing",s),u(_,"totals",o);var k=_("connector.visible");if(k){_("connector.mode");var b=_("connector.line.width");b&&(_("connector.line.color"),_("connector.line.dash"))}_("zorder")}function h(y,m){var E,c;function _(M){return v.coerce(c._input,c,r,M)}if(m.waterfallmode==="group")for(var T=0;T<y.length;T++)c=y[T],E=c._input,w(E,c,m,_,m.waterfallmode)}Z.exports={supplyDefaults:d,crossTraceDefaults:h}}}),sS=Ne({"src/traces/waterfall/layout_defaults.js"(te,Z){var v=In(),w=uC();Z.exports=function(C,P,t){var r=!1;function a(s,o){return v.coerce(C,P,w,s,o)}for(var l=0;l<t.length;l++){var i=t[l];if(i.visible&&i.type==="waterfall"){r=!0;break}}r&&(a("waterfallmode"),a("waterfallgap",.2),a("waterfallgroupgap"))}}}),cC=Ne({"src/traces/waterfall/calc.js"(te,Z){var v=Os(),w=Dm(),C=In().mergeArray,P=Vh(),t=ja().BADNUM;function r(l){return l==="a"||l==="absolute"}function a(l){return l==="t"||l==="total"}Z.exports=function(i,s){var o=v.getFromId(i,s.xaxis||"x"),u=v.getFromId(i,s.yaxis||"y"),d,h,y,m,E,c;s.orientation==="h"?(d=o.makeCalcdata(s,"x"),y=u.makeCalcdata(s,"y"),m=w(s,u,"y",y),E=!!s.yperiodalignment,c="y"):(d=u.makeCalcdata(s,"y"),y=o.makeCalcdata(s,"x"),m=w(s,o,"x",y),E=!!s.xperiodalignment,c="x"),h=m.vals;for(var _=Math.min(h.length,d.length),T=new Array(_),M=0,k,b=!1,A=0;A<_;A++){var g=d[A]||0,f=!1;(d[A]!==t||a(s.measure[A])||r(s.measure[A]))&&A+1<_&&(d[A+1]!==t||a(s.measure[A+1])||r(s.measure[A+1]))&&(f=!0);var p=T[A]={i:A,p:h[A],s:g,rawS:g,cNext:f};r(s.measure[A])?(M=p.s,p.isSum=!0,p.dir="totals",p.s=M):a(s.measure[A])?(p.isSum=!0,p.dir="totals",p.s=M):(p.isSum=!1,p.dir=p.rawS<0?"decreasing":"increasing",k=p.s,p.s=M+k,M+=k),p.dir==="totals"&&(b=!0),E&&(T[A].orig_p=y[A],T[A][c+"End"]=m.ends[A],T[A][c+"Start"]=m.starts[A]),s.ids&&(p.id=String(s.ids[A])),p.v=(s.base||0)+M}return T.length&&(T[0].hasTotals=b),C(s.text,T,"tx"),C(s.hovertext,T,"htx"),P(T,s),T}}}),L2=Ne({"src/traces/waterfall/cross_trace_calc.js"(te,Z){var v=U0().setGroupPositions;Z.exports=function(C,P){var t=C._fullLayout,r=C._fullData,a=C.calcdata,l=P.xaxis,i=P.yaxis,s=[],o=[],u=[],d,h;for(h=0;h<r.length;h++){var y=r[h];y.visible===!0&&y.xaxis===l._id&&y.yaxis===i._id&&y.type==="waterfall"&&(d=a[h],y.orientation==="h"?u.push(d):o.push(d),s.push(d))}var m={mode:t.waterfallmode,norm:t.waterfallnorm,gap:t.waterfallgap,groupgap:t.waterfallgroupgap};for(v(C,l,i,o,m),v(C,i,l,u,m),h=0;h<s.length;h++){d=s[h];for(var E=0;E<d.length;E++){var c=d[E];c.isSum===!1&&(c.s0+=E===0?0:d[E-1].s),E+1<d.length&&(d[E].nextP0=d[E+1].p0,d[E].nextS0=d[E+1].s0)}}}}}),Kx=Ne({"src/traces/waterfall/plot.js"(te,Z){var v=xn(),w=In(),C=zs(),P=ja().BADNUM,t=hu(),r=mc().clearMinTextSize;Z.exports=function(s,o,u,d){var h=s._fullLayout;r("waterfall",h),t.plot(s,o,u,d,{mode:h.waterfallmode,norm:h.waterfallmode,gap:h.waterfallgap,groupgap:h.waterfallgroupgap}),a(s,o,u,d)};function a(i,s,o,u){var d=s.xaxis,h=s.yaxis;w.makeTraceGroups(u,o,"trace bars").each(function(y){var m=v.select(this),E=y[0].trace,c=w.ensureSingle(m,"g","lines");if(!E.connector||!E.connector.visible){c.remove();return}var _=E.orientation==="h",T=E.connector.mode,M=c.selectAll("g.line").data(w.identity);M.enter().append("g").classed("line",!0),M.exit().remove();var k=M.size();M.each(function(b,A){if(!(A!==k-1&&!b.cNext)){var g=l(b,d,h,_),f=g[0],p=g[1],x="";f[0]!==P&&p[0]!==P&&f[1]!==P&&p[1]!==P&&(T==="spanning"&&!b.isSum&&A>0&&(_?x+="M"+f[0]+","+p[1]+"V"+p[0]:x+="M"+f[1]+","+p[0]+"H"+f[0]),T!=="between"&&(b.isSum||A<k-1)&&(_?x+="M"+f[1]+","+p[0]+"V"+p[1]:x+="M"+f[0]+","+p[1]+"H"+f[1]),f[2]!==P&&p[2]!==P&&(_?x+="M"+f[1]+","+p[1]+"V"+p[2]:x+="M"+f[1]+","+p[1]+"H"+f[2])),x===""&&(x="M0,0Z"),w.ensureSingle(v.select(this),"path").attr("d",x).call(C.setClipUrl,s.layerClipId,i)}})})}function l(i,s,o,u){var d=[],h=[],y=u?s:o,m=u?o:s;return d[0]=y.c2p(i.s0,!0),h[0]=m.c2p(i.p0,!0),d[1]=y.c2p(i.s1,!0),h[1]=m.c2p(i.p1,!0),d[2]=y.c2p(i.nextS0,!0),h[2]=m.c2p(i.nextP0,!0),u?[d,h]:[h,d]}}}),hh=Ne({"src/traces/waterfall/style.js"(te,Z){var v=xn(),w=zs(),C=io(),P=$c().DESELECTDIM,t=Fd(),r=mc().resizeText,a=t.styleTextPoints;function l(i,s,o){var u=o||v.select(i).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");r(i,u,"waterfall"),u.style("opacity",function(d){return d[0].trace.opacity}),u.each(function(d){var h=v.select(this),y=d[0].trace;h.selectAll(".point > path").each(function(m){if(!m.isBlank){var E=y[m.dir].marker;v.select(this).call(C.fill,E.color).call(C.stroke,E.line.color).call(w.dashLine,E.line.dash,E.line.width).style("opacity",y.selectedpoints&&!m.selected?P:1)}}),a(h,y,i),h.selectAll(".lines").each(function(){var m=y.connector.line;w.lineGroupStyle(v.select(this).selectAll("path"),m.width,m.color,m.dash)})})}Z.exports={style:l}}}),HL=Ne({"src/traces/waterfall/hover.js"(te,Z){var v=Os().hoverLabelText,w=io().opacity,C=zc().hoverOnBars,P=a_(),t={increasing:P.INCREASING.SYMBOL,decreasing:P.DECREASING.SYMBOL};Z.exports=function(l,i,s,o,u){var d=C(l,i,s,o,u);if(!d)return;var h=d.cd,y=h[0].trace,m=y.orientation==="h",E=m?"x":"y",c=m?l.xa:l.ya;function _(N){return v(c,N,y[E+"hoverformat"])}var T=d.index,M=h[T],k=M.isSum?M.b+M.s:M.rawS;d.initial=M.b+M.s-k,d.delta=k,d.final=d.initial+d.delta;var b=_(Math.abs(d.delta));d.deltaLabel=k<0?"("+b+")":b,d.finalLabel=_(d.final),d.initialLabel=_(d.initial);var A=M.hi||y.hoverinfo,g=[];if(A&&A!=="none"&&A!=="skip"){var f=A==="all",p=A.split("+"),x=function(N){return f||p.indexOf(N)!==-1};M.isSum||(x("final")&&(m?!x("x"):!x("y"))&&g.push(d.finalLabel),x("delta")&&(k<0?g.push(d.deltaLabel+" "+t.decreasing):g.push(d.deltaLabel+" "+t.increasing)),x("initial")&&g.push("Initial: "+d.initialLabel))}return g.length&&(d.extraText=g.join("<br>")),d.color=r(y,M),[d]};function r(a,l){var i=a[l.dir].marker,s=i.color,o=i.line.color,u=i.line.width;if(w(s))return s;if(w(o)&&u)return o}}}),GL=Ne({"src/traces/waterfall/event_data.js"(te,Z){Z.exports=function(w,C){return w.x="xVal"in C?C.xVal:C.x,w.y="yVal"in C?C.yVal:C.y,"initial"in C&&(w.initial=C.initial),"delta"in C&&(w.delta=C.delta),"final"in C&&(w.final=C.final),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w}}}),fC=Ne({"src/traces/waterfall/index.js"(te,Z){Z.exports={attributes:P2(),layoutAttributes:uC(),supplyDefaults:u0().supplyDefaults,crossTraceDefaults:u0().crossTraceDefaults,supplyLayoutDefaults:sS(),calc:cC(),crossTraceCalc:L2(),plot:Kx(),style:hh().style,hoverPoints:HL(),eventData:GL(),selectPoints:zy(),moduleType:"trace",name:"waterfall",basePlotModule:Lh(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Jx=Ne({"lib/waterfall.js"(te,Z){Z.exports=fC()}}),lm=Ne({"src/traces/image/constants.js"(te,Z){Z.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var w=v.slice(0,3);return w[1]=w[1]+"%",w[2]=w[2]+"%",w},suffix:["°","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var w=v.slice(0,4);return w[1]=w[1]+"%",w[2]=w[2]+"%",w},suffix:["°","%","%",""]}}}}}),lS=Ne({"src/traces/image/attributes.js"(te,Z){var v=ns(),w=Jc().zorder,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=co().extendFlat,r=lm().colormodel,a=["rgb","rgba","rgba256","hsl","hsla"],l=[],i=[];for(o=0;o<a.length;o++)s=r[a[o]],l.push("For the `"+a[o]+"` colormodel, it is ["+(s.zminDflt||s.min).join(", ")+"]."),i.push("For the `"+a[o]+"` colormodel, it is ["+(s.zmaxDflt||s.max).join(", ")+"].");var s,o;Z.exports=t({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:a,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},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"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:t({},v.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:C({},{keys:["z","color","colormodel"]}),hovertemplatefallback:P(),zorder:w})}}),hC=Ne({"src/traces/image/defaults.js"(te,Z){var v=In(),w=lS(),C=lm(),P=i0().IMAGE_URL_PREFIX;Z.exports=function(r,a){function l(o,u){return v.coerce(r,a,w,o,u)}l("source"),a.source&&!a.source.match(P)&&delete a.source,a._hasSource=!!a.source;var i=l("z");if(a._hasZ=!(i===void 0||!i.length||!i[0]||!i[0].length),!a._hasZ&&!a._hasSource){a.visible=!1;return}l("x0"),l("y0"),l("dx"),l("dy");var s;a._hasZ?(l("colormodel","rgb"),s=C.colormodel[a.colormodel],l("zmin",s.zminDflt||s.min),l("zmax",s.zmaxDflt||s.max)):a._hasSource&&(a.colormodel="rgba256",s=C.colormodel[a.colormodel],a.zmin=s.zminDflt,a.zmax=s.zmaxDflt),l("zsmooth"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),a._length=null,l("zorder")}}}),um=Ne({"node_modules/inherits/inherits_browser.js"(te,Z){typeof Object.create=="function"?Z.exports=function(w,C){C&&(w.super_=C,w.prototype=Object.create(C.prototype,{constructor:{value:w,enumerable:!1,writable:!0,configurable:!0}}))}:Z.exports=function(w,C){if(C){w.super_=C;var P=function(){};P.prototype=C.prototype,w.prototype=new P,w.prototype.constructor=w}}}}),Fm=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(te,Z){Z.exports=F0().EventEmitter}}),dC=Ne({"node_modules/base64-js/index.js"(te){te.byteLength=a,te.toByteArray=i,te.fromByteArray=u;var Z=[],v=[],w=typeof Uint8Array<"u"?Uint8Array:Array,C="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(P=0,t=C.length;P<t;++P)Z[P]=C[P],v[C.charCodeAt(P)]=P;var P,t;v[45]=62,v[95]=63;function r(d){var h=d.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=d.indexOf("=");y===-1&&(y=h);var m=y===h?0:4-y%4;return[y,m]}function a(d){var h=r(d),y=h[0],m=h[1];return(y+m)*3/4-m}function l(d,h,y){return(h+y)*3/4-y}function i(d){var h,y=r(d),m=y[0],E=y[1],c=new w(l(d,m,E)),_=0,T=E>0?m-4:m,M;for(M=0;M<T;M+=4)h=v[d.charCodeAt(M)]<<18|v[d.charCodeAt(M+1)]<<12|v[d.charCodeAt(M+2)]<<6|v[d.charCodeAt(M+3)],c[_++]=h>>16&255,c[_++]=h>>8&255,c[_++]=h&255;return E===2&&(h=v[d.charCodeAt(M)]<<2|v[d.charCodeAt(M+1)]>>4,c[_++]=h&255),E===1&&(h=v[d.charCodeAt(M)]<<10|v[d.charCodeAt(M+1)]<<4|v[d.charCodeAt(M+2)]>>2,c[_++]=h>>8&255,c[_++]=h&255),c}function s(d){return Z[d>>18&63]+Z[d>>12&63]+Z[d>>6&63]+Z[d&63]}function o(d,h,y){for(var m,E=[],c=h;c<y;c+=3)m=(d[c]<<16&16711680)+(d[c+1]<<8&65280)+(d[c+2]&255),E.push(s(m));return E.join("")}function u(d){for(var h,y=d.length,m=y%3,E=[],c=16383,_=0,T=y-m;_<T;_+=c)E.push(o(d,_,_+c>T?T:_+c));return m===1?(h=d[y-1],E.push(Z[h>>2]+Z[h<<4&63]+"==")):m===2&&(h=(d[y-2]<<8)+d[y-1],E.push(Z[h>>10]+Z[h>>4&63]+Z[h<<2&63]+"=")),E.join("")}}}),uS=Ne({"node_modules/ieee754/index.js"(te){te.read=function(Z,v,w,C,P){var t,r,a=P*8-C-1,l=(1<<a)-1,i=l>>1,s=-7,o=w?P-1:0,u=w?-1:1,d=Z[v+o];for(o+=u,t=d&(1<<-s)-1,d>>=-s,s+=a;s>0;t=t*256+Z[v+o],o+=u,s-=8);for(r=t&(1<<-s)-1,t>>=-s,s+=C;s>0;r=r*256+Z[v+o],o+=u,s-=8);if(t===0)t=1-i;else{if(t===l)return r?NaN:(d?-1:1)*(1/0);r=r+Math.pow(2,C),t=t-i}return(d?-1:1)*r*Math.pow(2,t-C)},te.write=function(Z,v,w,C,P,t){var r,a,l,i=t*8-P-1,s=(1<<i)-1,o=s>>1,u=P===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=C?0:t-1,h=C?1:-1,y=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(a=isNaN(v)?1:0,r=s):(r=Math.floor(Math.log(v)/Math.LN2),v*(l=Math.pow(2,-r))<1&&(r--,l*=2),r+o>=1?v+=u/l:v+=u*Math.pow(2,1-o),v*l>=2&&(r++,l/=2),r+o>=s?(a=0,r=s):r+o>=1?(a=(v*l-1)*Math.pow(2,P),r=r+o):(a=v*Math.pow(2,o-1)*Math.pow(2,P),r=0));P>=8;Z[w+d]=a&255,d+=h,a/=256,P-=8);for(r=r<<P|a,i+=P;i>0;Z[w+d]=r&255,d+=h,r/=256,i-=8);Z[w+d-h]|=y*128}}}),Ug=Ne({"node_modules/buffer/index.js"(te){var Z=dC(),v=uS(),w=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;te.Buffer=r,te.SlowBuffer=E,te.INSPECT_MAX_BYTES=50;var C=2147483647;te.kMaxLength=C,r.TYPED_ARRAY_SUPPORT=P(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function P(){try{const Fe=new Uint8Array(1),Pe={foo:function(){return 42}};return Object.setPrototypeOf(Pe,Uint8Array.prototype),Object.setPrototypeOf(Fe,Pe),Fe.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function t(Fe){if(Fe>C)throw new RangeError('The value "'+Fe+'" is invalid for option "size"');const Pe=new Uint8Array(Fe);return Object.setPrototypeOf(Pe,r.prototype),Pe}function r(Fe,Pe,be){if(typeof Fe=="number"){if(typeof Pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return s(Fe)}return a(Fe,Pe,be)}r.poolSize=8192;function a(Fe,Pe,be){if(typeof Fe=="string")return o(Fe,Pe);if(ArrayBuffer.isView(Fe))return d(Fe);if(Fe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fe);if(rt(Fe,ArrayBuffer)||Fe&&rt(Fe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(rt(Fe,SharedArrayBuffer)||Fe&&rt(Fe.buffer,SharedArrayBuffer)))return h(Fe,Pe,be);if(typeof Fe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Ye=Fe.valueOf&&Fe.valueOf();if(Ye!=null&&Ye!==Fe)return r.from(Ye,Pe,be);const mt=y(Fe);if(mt)return mt;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Fe[Symbol.toPrimitive]=="function")return r.from(Fe[Symbol.toPrimitive]("string"),Pe,be);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Fe)}r.from=function(Fe,Pe,be){return a(Fe,Pe,be)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function l(Fe){if(typeof Fe!="number")throw new TypeError('"size" argument must be of type number');if(Fe<0)throw new RangeError('The value "'+Fe+'" is invalid for option "size"')}function i(Fe,Pe,be){return l(Fe),Fe<=0?t(Fe):Pe!==void 0?typeof be=="string"?t(Fe).fill(Pe,be):t(Fe).fill(Pe):t(Fe)}r.alloc=function(Fe,Pe,be){return i(Fe,Pe,be)};function s(Fe){return l(Fe),t(Fe<0?0:m(Fe)|0)}r.allocUnsafe=function(Fe){return s(Fe)},r.allocUnsafeSlow=function(Fe){return s(Fe)};function o(Fe,Pe){if((typeof Pe!="string"||Pe==="")&&(Pe="utf8"),!r.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);const be=c(Fe,Pe)|0;let Ye=t(be);const mt=Ye.write(Fe,Pe);return mt!==be&&(Ye=Ye.slice(0,mt)),Ye}function u(Fe){const Pe=Fe.length<0?0:m(Fe.length)|0,be=t(Pe);for(let Ye=0;Ye<Pe;Ye+=1)be[Ye]=Fe[Ye]&255;return be}function d(Fe){if(rt(Fe,Uint8Array)){const Pe=new Uint8Array(Fe);return h(Pe.buffer,Pe.byteOffset,Pe.byteLength)}return u(Fe)}function h(Fe,Pe,be){if(Pe<0||Fe.byteLength<Pe)throw new RangeError('"offset" is outside of buffer bounds');if(Fe.byteLength<Pe+(be||0))throw new RangeError('"length" is outside of buffer bounds');let Ye;return Pe===void 0&&be===void 0?Ye=new Uint8Array(Fe):be===void 0?Ye=new Uint8Array(Fe,Pe):Ye=new Uint8Array(Fe,Pe,be),Object.setPrototypeOf(Ye,r.prototype),Ye}function y(Fe){if(r.isBuffer(Fe)){const Pe=m(Fe.length)|0,be=t(Pe);return be.length===0||Fe.copy(be,0,0,Pe),be}if(Fe.length!==void 0)return typeof Fe.length!="number"||pt(Fe.length)?t(0):u(Fe);if(Fe.type==="Buffer"&&Array.isArray(Fe.data))return u(Fe.data)}function m(Fe){if(Fe>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return Fe|0}function E(Fe){return+Fe!=Fe&&(Fe=0),r.alloc(+Fe)}r.isBuffer=function(Pe){return Pe!=null&&Pe._isBuffer===!0&&Pe!==r.prototype},r.compare=function(Pe,be){if(rt(Pe,Uint8Array)&&(Pe=r.from(Pe,Pe.offset,Pe.byteLength)),rt(be,Uint8Array)&&(be=r.from(be,be.offset,be.byteLength)),!r.isBuffer(Pe)||!r.isBuffer(be))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Pe===be)return 0;let Ye=Pe.length,mt=be.length;for(let bt=0,ft=Math.min(Ye,mt);bt<ft;++bt)if(Pe[bt]!==be[bt]){Ye=Pe[bt],mt=be[bt];break}return Ye<mt?-1:mt<Ye?1:0},r.isEncoding=function(Pe){switch(String(Pe).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(Pe,be){if(!Array.isArray(Pe))throw new TypeError('"list" argument must be an Array of Buffers');if(Pe.length===0)return r.alloc(0);let Ye;if(be===void 0)for(be=0,Ye=0;Ye<Pe.length;++Ye)be+=Pe[Ye].length;const mt=r.allocUnsafe(be);let bt=0;for(Ye=0;Ye<Pe.length;++Ye){let ft=Pe[Ye];if(rt(ft,Uint8Array))bt+ft.length>mt.length?(r.isBuffer(ft)||(ft=r.from(ft)),ft.copy(mt,bt)):Uint8Array.prototype.set.call(mt,ft,bt);else if(r.isBuffer(ft))ft.copy(mt,bt);else throw new TypeError('"list" argument must be an Array of Buffers');bt+=ft.length}return mt};function c(Fe,Pe){if(r.isBuffer(Fe))return Fe.length;if(ArrayBuffer.isView(Fe)||rt(Fe,ArrayBuffer))return Fe.byteLength;if(typeof Fe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Fe);const be=Fe.length,Ye=arguments.length>2&&arguments[2]===!0;if(!Ye&&be===0)return 0;let mt=!1;for(;;)switch(Pe){case"ascii":case"latin1":case"binary":return be;case"utf8":case"utf-8":return _e(Fe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return be*2;case"hex":return be>>>1;case"base64":return Ge(Fe).length;default:if(mt)return Ye?-1:_e(Fe).length;Pe=(""+Pe).toLowerCase(),mt=!0}}r.byteLength=c;function _(Fe,Pe,be){let Ye=!1;if((Pe===void 0||Pe<0)&&(Pe=0),Pe>this.length||((be===void 0||be>this.length)&&(be=this.length),be<=0)||(be>>>=0,Pe>>>=0,be<=Pe))return"";for(Fe||(Fe="utf8");;)switch(Fe){case"hex":return q(this,Pe,be);case"utf8":case"utf-8":return N(this,Pe,be);case"ascii":return U(this,Pe,be);case"latin1":case"binary":return V(this,Pe,be);case"base64":return x(this,Pe,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,Pe,be);default:if(Ye)throw new TypeError("Unknown encoding: "+Fe);Fe=(Fe+"").toLowerCase(),Ye=!0}}r.prototype._isBuffer=!0;function T(Fe,Pe,be){const Ye=Fe[Pe];Fe[Pe]=Fe[be],Fe[be]=Ye}r.prototype.swap16=function(){const Pe=this.length;if(Pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let be=0;be<Pe;be+=2)T(this,be,be+1);return this},r.prototype.swap32=function(){const Pe=this.length;if(Pe%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let be=0;be<Pe;be+=4)T(this,be,be+3),T(this,be+1,be+2);return this},r.prototype.swap64=function(){const Pe=this.length;if(Pe%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let be=0;be<Pe;be+=8)T(this,be,be+7),T(this,be+1,be+6),T(this,be+2,be+5),T(this,be+3,be+4);return this},r.prototype.toString=function(){const Pe=this.length;return Pe===0?"":arguments.length===0?N(this,0,Pe):_.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(Pe){if(!r.isBuffer(Pe))throw new TypeError("Argument must be a Buffer");return this===Pe?!0:r.compare(this,Pe)===0},r.prototype.inspect=function(){let Pe="";const be=te.INSPECT_MAX_BYTES;return Pe=this.toString("hex",0,be).replace(/(.{2})/g,"$1 ").trim(),this.length>be&&(Pe+=" ... "),"<Buffer "+Pe+">"},w&&(r.prototype[w]=r.prototype.inspect),r.prototype.compare=function(Pe,be,Ye,mt,bt){if(rt(Pe,Uint8Array)&&(Pe=r.from(Pe,Pe.offset,Pe.byteLength)),!r.isBuffer(Pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Pe);if(be===void 0&&(be=0),Ye===void 0&&(Ye=Pe?Pe.length:0),mt===void 0&&(mt=0),bt===void 0&&(bt=this.length),be<0||Ye>Pe.length||mt<0||bt>this.length)throw new RangeError("out of range index");if(mt>=bt&&be>=Ye)return 0;if(mt>=bt)return-1;if(be>=Ye)return 1;if(be>>>=0,Ye>>>=0,mt>>>=0,bt>>>=0,this===Pe)return 0;let ft=bt-mt,Wt=Ye-be;const Zt=Math.min(ft,Wt),cr=this.slice(mt,bt),pr=Pe.slice(be,Ye);for(let Br=0;Br<Zt;++Br)if(cr[Br]!==pr[Br]){ft=cr[Br],Wt=pr[Br];break}return ft<Wt?-1:Wt<ft?1:0};function M(Fe,Pe,be,Ye,mt){if(Fe.length===0)return-1;if(typeof be=="string"?(Ye=be,be=0):be>2147483647?be=2147483647:be<-2147483648&&(be=-2147483648),be=+be,pt(be)&&(be=mt?0:Fe.length-1),be<0&&(be=Fe.length+be),be>=Fe.length){if(mt)return-1;be=Fe.length-1}else if(be<0)if(mt)be=0;else return-1;if(typeof Pe=="string"&&(Pe=r.from(Pe,Ye)),r.isBuffer(Pe))return Pe.length===0?-1:k(Fe,Pe,be,Ye,mt);if(typeof Pe=="number")return Pe=Pe&255,typeof Uint8Array.prototype.indexOf=="function"?mt?Uint8Array.prototype.indexOf.call(Fe,Pe,be):Uint8Array.prototype.lastIndexOf.call(Fe,Pe,be):k(Fe,[Pe],be,Ye,mt);throw new TypeError("val must be string, number or Buffer")}function k(Fe,Pe,be,Ye,mt){let bt=1,ft=Fe.length,Wt=Pe.length;if(Ye!==void 0&&(Ye=String(Ye).toLowerCase(),Ye==="ucs2"||Ye==="ucs-2"||Ye==="utf16le"||Ye==="utf-16le")){if(Fe.length<2||Pe.length<2)return-1;bt=2,ft/=2,Wt/=2,be/=2}function Zt(pr,Br){return bt===1?pr[Br]:pr.readUInt16BE(Br*bt)}let cr;if(mt){let pr=-1;for(cr=be;cr<ft;cr++)if(Zt(Fe,cr)===Zt(Pe,pr===-1?0:cr-pr)){if(pr===-1&&(pr=cr),cr-pr+1===Wt)return pr*bt}else pr!==-1&&(cr-=cr-pr),pr=-1}else for(be+Wt>ft&&(be=ft-Wt),cr=be;cr>=0;cr--){let pr=!0;for(let Br=0;Br<Wt;Br++)if(Zt(Fe,cr+Br)!==Zt(Pe,Br)){pr=!1;break}if(pr)return cr}return-1}r.prototype.includes=function(Pe,be,Ye){return this.indexOf(Pe,be,Ye)!==-1},r.prototype.indexOf=function(Pe,be,Ye){return M(this,Pe,be,Ye,!0)},r.prototype.lastIndexOf=function(Pe,be,Ye){return M(this,Pe,be,Ye,!1)};function b(Fe,Pe,be,Ye){be=Number(be)||0;const mt=Fe.length-be;Ye?(Ye=Number(Ye),Ye>mt&&(Ye=mt)):Ye=mt;const bt=Pe.length;Ye>bt/2&&(Ye=bt/2);let ft;for(ft=0;ft<Ye;++ft){const Wt=parseInt(Pe.substr(ft*2,2),16);if(pt(Wt))return ft;Fe[be+ft]=Wt}return ft}function A(Fe,Pe,be,Ye){return Ve(_e(Pe,Fe.length-be),Fe,be,Ye)}function g(Fe,Pe,be,Ye){return Ve(Le(Pe),Fe,be,Ye)}function f(Fe,Pe,be,Ye){return Ve(Ge(Pe),Fe,be,Ye)}function p(Fe,Pe,be,Ye){return Ve(ze(Pe,Fe.length-be),Fe,be,Ye)}r.prototype.write=function(Pe,be,Ye,mt){if(be===void 0)mt="utf8",Ye=this.length,be=0;else if(Ye===void 0&&typeof be=="string")mt=be,Ye=this.length,be=0;else if(isFinite(be))be=be>>>0,isFinite(Ye)?(Ye=Ye>>>0,mt===void 0&&(mt="utf8")):(mt=Ye,Ye=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const bt=this.length-be;if((Ye===void 0||Ye>bt)&&(Ye=bt),Pe.length>0&&(Ye<0||be<0)||be>this.length)throw new RangeError("Attempt to write outside buffer bounds");mt||(mt="utf8");let ft=!1;for(;;)switch(mt){case"hex":return b(this,Pe,be,Ye);case"utf8":case"utf-8":return A(this,Pe,be,Ye);case"ascii":case"latin1":case"binary":return g(this,Pe,be,Ye);case"base64":return f(this,Pe,be,Ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return p(this,Pe,be,Ye);default:if(ft)throw new TypeError("Unknown encoding: "+mt);mt=(""+mt).toLowerCase(),ft=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(Fe,Pe,be){return Pe===0&&be===Fe.length?Z.fromByteArray(Fe):Z.fromByteArray(Fe.slice(Pe,be))}function N(Fe,Pe,be){be=Math.min(Fe.length,be);const Ye=[];let mt=Pe;for(;mt<be;){const bt=Fe[mt];let ft=null,Wt=bt>239?4:bt>223?3:bt>191?2:1;if(mt+Wt<=be){let Zt,cr,pr,Br;switch(Wt){case 1:bt<128&&(ft=bt);break;case 2:Zt=Fe[mt+1],(Zt&192)===128&&(Br=(bt&31)<<6|Zt&63,Br>127&&(ft=Br));break;case 3:Zt=Fe[mt+1],cr=Fe[mt+2],(Zt&192)===128&&(cr&192)===128&&(Br=(bt&15)<<12|(Zt&63)<<6|cr&63,Br>2047&&(Br<55296||Br>57343)&&(ft=Br));break;case 4:Zt=Fe[mt+1],cr=Fe[mt+2],pr=Fe[mt+3],(Zt&192)===128&&(cr&192)===128&&(pr&192)===128&&(Br=(bt&15)<<18|(Zt&63)<<12|(cr&63)<<6|pr&63,Br>65535&&Br<1114112&&(ft=Br))}}ft===null?(ft=65533,Wt=1):ft>65535&&(ft-=65536,Ye.push(ft>>>10&1023|55296),ft=56320|ft&1023),Ye.push(ft),mt+=Wt}return B(Ye)}var D=4096;function B(Fe){const Pe=Fe.length;if(Pe<=D)return String.fromCharCode.apply(String,Fe);let be="",Ye=0;for(;Ye<Pe;)be+=String.fromCharCode.apply(String,Fe.slice(Ye,Ye+=D));return be}function U(Fe,Pe,be){let Ye="";be=Math.min(Fe.length,be);for(let mt=Pe;mt<be;++mt)Ye+=String.fromCharCode(Fe[mt]&127);return Ye}function V(Fe,Pe,be){let Ye="";be=Math.min(Fe.length,be);for(let mt=Pe;mt<be;++mt)Ye+=String.fromCharCode(Fe[mt]);return Ye}function q(Fe,Pe,be){const Ye=Fe.length;(!Pe||Pe<0)&&(Pe=0),(!be||be<0||be>Ye)&&(be=Ye);let mt="";for(let bt=Pe;bt<be;++bt)mt+=gt[Fe[bt]];return mt}function z(Fe,Pe,be){const Ye=Fe.slice(Pe,be);let mt="";for(let bt=0;bt<Ye.length-1;bt+=2)mt+=String.fromCharCode(Ye[bt]+Ye[bt+1]*256);return mt}r.prototype.slice=function(Pe,be){const Ye=this.length;Pe=~~Pe,be=be===void 0?Ye:~~be,Pe<0?(Pe+=Ye,Pe<0&&(Pe=0)):Pe>Ye&&(Pe=Ye),be<0?(be+=Ye,be<0&&(be=0)):be>Ye&&(be=Ye),be<Pe&&(be=Pe);const mt=this.subarray(Pe,be);return Object.setPrototypeOf(mt,r.prototype),mt};function H(Fe,Pe,be){if(Fe%1!==0||Fe<0)throw new RangeError("offset is not uint");if(Fe+Pe>be)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let mt=this[Pe],bt=1,ft=0;for(;++ft<be&&(bt*=256);)mt+=this[Pe+ft]*bt;return mt},r.prototype.readUintBE=r.prototype.readUIntBE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let mt=this[Pe+--be],bt=1;for(;be>0&&(bt*=256);)mt+=this[Pe+--be]*bt;return mt},r.prototype.readUint8=r.prototype.readUInt8=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,1,this.length),this[Pe]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,2,this.length),this[Pe]|this[Pe+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,2,this.length),this[Pe]<<8|this[Pe+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),(this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16)+this[Pe+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]*16777216+(this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3])},r.prototype.readBigUInt64LE=ht(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const mt=be+this[++Pe]*2**8+this[++Pe]*2**16+this[++Pe]*2**24,bt=this[++Pe]+this[++Pe]*2**8+this[++Pe]*2**16+Ye*2**24;return BigInt(mt)+(BigInt(bt)<<BigInt(32))}),r.prototype.readBigUInt64BE=ht(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const mt=be*2**24+this[++Pe]*2**16+this[++Pe]*2**8+this[++Pe],bt=this[++Pe]*2**24+this[++Pe]*2**16+this[++Pe]*2**8+Ye;return(BigInt(mt)<<BigInt(32))+BigInt(bt)}),r.prototype.readIntLE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let mt=this[Pe],bt=1,ft=0;for(;++ft<be&&(bt*=256);)mt+=this[Pe+ft]*bt;return bt*=128,mt>=bt&&(mt-=Math.pow(2,8*be)),mt},r.prototype.readIntBE=function(Pe,be,Ye){Pe=Pe>>>0,be=be>>>0,Ye||H(Pe,be,this.length);let mt=be,bt=1,ft=this[Pe+--mt];for(;mt>0&&(bt*=256);)ft+=this[Pe+--mt]*bt;return bt*=128,ft>=bt&&(ft-=Math.pow(2,8*be)),ft},r.prototype.readInt8=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,1,this.length),this[Pe]&128?(255-this[Pe]+1)*-1:this[Pe]},r.prototype.readInt16LE=function(Pe,be){Pe=Pe>>>0,be||H(Pe,2,this.length);const Ye=this[Pe]|this[Pe+1]<<8;return Ye&32768?Ye|4294901760:Ye},r.prototype.readInt16BE=function(Pe,be){Pe=Pe>>>0,be||H(Pe,2,this.length);const Ye=this[Pe+1]|this[Pe]<<8;return Ye&32768?Ye|4294901760:Ye},r.prototype.readInt32LE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16|this[Pe+3]<<24},r.prototype.readInt32BE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),this[Pe]<<24|this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3]},r.prototype.readBigInt64LE=ht(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const mt=this[Pe+4]+this[Pe+5]*2**8+this[Pe+6]*2**16+(Ye<<24);return(BigInt(mt)<<BigInt(32))+BigInt(be+this[++Pe]*2**8+this[++Pe]*2**16+this[++Pe]*2**24)}),r.prototype.readBigInt64BE=ht(function(Pe){Pe=Pe>>>0,oe(Pe,"offset");const be=this[Pe],Ye=this[Pe+7];(be===void 0||Ye===void 0)&&Y(Pe,this.length-8);const mt=(be<<24)+this[++Pe]*2**16+this[++Pe]*2**8+this[++Pe];return(BigInt(mt)<<BigInt(32))+BigInt(this[++Pe]*2**24+this[++Pe]*2**16+this[++Pe]*2**8+Ye)}),r.prototype.readFloatLE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),v.read(this,Pe,!0,23,4)},r.prototype.readFloatBE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,4,this.length),v.read(this,Pe,!1,23,4)},r.prototype.readDoubleLE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,8,this.length),v.read(this,Pe,!0,52,8)},r.prototype.readDoubleBE=function(Pe,be){return Pe=Pe>>>0,be||H(Pe,8,this.length),v.read(this,Pe,!1,52,8)};function G(Fe,Pe,be,Ye,mt,bt){if(!r.isBuffer(Fe))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pe>mt||Pe<bt)throw new RangeError('"value" argument is out of bounds');if(be+Ye>Fe.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(Pe,be,Ye,mt){if(Pe=+Pe,be=be>>>0,Ye=Ye>>>0,!mt){const Wt=Math.pow(2,8*Ye)-1;G(this,Pe,be,Ye,Wt,0)}let bt=1,ft=0;for(this[be]=Pe&255;++ft<Ye&&(bt*=256);)this[be+ft]=Pe/bt&255;return be+Ye},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(Pe,be,Ye,mt){if(Pe=+Pe,be=be>>>0,Ye=Ye>>>0,!mt){const Wt=Math.pow(2,8*Ye)-1;G(this,Pe,be,Ye,Wt,0)}let bt=Ye-1,ft=1;for(this[be+bt]=Pe&255;--bt>=0&&(ft*=256);)this[be+bt]=Pe/ft&255;return be+Ye},r.prototype.writeUint8=r.prototype.writeUInt8=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,1,255,0),this[be]=Pe&255,be+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,65535,0),this[be]=Pe&255,this[be+1]=Pe>>>8,be+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,65535,0),this[be]=Pe>>>8,this[be+1]=Pe&255,be+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,4294967295,0),this[be+3]=Pe>>>24,this[be+2]=Pe>>>16,this[be+1]=Pe>>>8,this[be]=Pe&255,be+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,4294967295,0),this[be]=Pe>>>24,this[be+1]=Pe>>>16,this[be+2]=Pe>>>8,this[be+3]=Pe&255,be+4};function J(Fe,Pe,be,Ye,mt){pe(Pe,Ye,mt,Fe,be,7);let bt=Number(Pe&BigInt(4294967295));Fe[be++]=bt,bt=bt>>8,Fe[be++]=bt,bt=bt>>8,Fe[be++]=bt,bt=bt>>8,Fe[be++]=bt;let ft=Number(Pe>>BigInt(32)&BigInt(4294967295));return Fe[be++]=ft,ft=ft>>8,Fe[be++]=ft,ft=ft>>8,Fe[be++]=ft,ft=ft>>8,Fe[be++]=ft,be}function le(Fe,Pe,be,Ye,mt){pe(Pe,Ye,mt,Fe,be,7);let bt=Number(Pe&BigInt(4294967295));Fe[be+7]=bt,bt=bt>>8,Fe[be+6]=bt,bt=bt>>8,Fe[be+5]=bt,bt=bt>>8,Fe[be+4]=bt;let ft=Number(Pe>>BigInt(32)&BigInt(4294967295));return Fe[be+3]=ft,ft=ft>>8,Fe[be+2]=ft,ft=ft>>8,Fe[be+1]=ft,ft=ft>>8,Fe[be]=ft,be+8}r.prototype.writeBigUInt64LE=ht(function(Pe,be=0){return J(this,Pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=ht(function(Pe,be=0){return le(this,Pe,be,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(Pe,be,Ye,mt){if(Pe=+Pe,be=be>>>0,!mt){const Zt=Math.pow(2,8*Ye-1);G(this,Pe,be,Ye,Zt-1,-Zt)}let bt=0,ft=1,Wt=0;for(this[be]=Pe&255;++bt<Ye&&(ft*=256);)Pe<0&&Wt===0&&this[be+bt-1]!==0&&(Wt=1),this[be+bt]=(Pe/ft>>0)-Wt&255;return be+Ye},r.prototype.writeIntBE=function(Pe,be,Ye,mt){if(Pe=+Pe,be=be>>>0,!mt){const Zt=Math.pow(2,8*Ye-1);G(this,Pe,be,Ye,Zt-1,-Zt)}let bt=Ye-1,ft=1,Wt=0;for(this[be+bt]=Pe&255;--bt>=0&&(ft*=256);)Pe<0&&Wt===0&&this[be+bt+1]!==0&&(Wt=1),this[be+bt]=(Pe/ft>>0)-Wt&255;return be+Ye},r.prototype.writeInt8=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,1,127,-128),Pe<0&&(Pe=255+Pe+1),this[be]=Pe&255,be+1},r.prototype.writeInt16LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,32767,-32768),this[be]=Pe&255,this[be+1]=Pe>>>8,be+2},r.prototype.writeInt16BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,2,32767,-32768),this[be]=Pe>>>8,this[be+1]=Pe&255,be+2},r.prototype.writeInt32LE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,2147483647,-2147483648),this[be]=Pe&255,this[be+1]=Pe>>>8,this[be+2]=Pe>>>16,this[be+3]=Pe>>>24,be+4},r.prototype.writeInt32BE=function(Pe,be,Ye){return Pe=+Pe,be=be>>>0,Ye||G(this,Pe,be,4,2147483647,-2147483648),Pe<0&&(Pe=4294967295+Pe+1),this[be]=Pe>>>24,this[be+1]=Pe>>>16,this[be+2]=Pe>>>8,this[be+3]=Pe&255,be+4},r.prototype.writeBigInt64LE=ht(function(Pe,be=0){return J(this,Pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=ht(function(Pe,be=0){return le(this,Pe,be,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ye(Fe,Pe,be,Ye,mt,bt){if(be+Ye>Fe.length)throw new RangeError("Index out of range");if(be<0)throw new RangeError("Index out of range")}function de(Fe,Pe,be,Ye,mt){return Pe=+Pe,be=be>>>0,mt||ye(Fe,Pe,be,4),v.write(Fe,Pe,be,Ye,23,4),be+4}r.prototype.writeFloatLE=function(Pe,be,Ye){return de(this,Pe,be,!0,Ye)},r.prototype.writeFloatBE=function(Pe,be,Ye){return de(this,Pe,be,!1,Ye)};function me(Fe,Pe,be,Ye,mt){return Pe=+Pe,be=be>>>0,mt||ye(Fe,Pe,be,8),v.write(Fe,Pe,be,Ye,52,8),be+8}r.prototype.writeDoubleLE=function(Pe,be,Ye){return me(this,Pe,be,!0,Ye)},r.prototype.writeDoubleBE=function(Pe,be,Ye){return me(this,Pe,be,!1,Ye)},r.prototype.copy=function(Pe,be,Ye,mt){if(!r.isBuffer(Pe))throw new TypeError("argument should be a Buffer");if(Ye||(Ye=0),!mt&&mt!==0&&(mt=this.length),be>=Pe.length&&(be=Pe.length),be||(be=0),mt>0&&mt<Ye&&(mt=Ye),mt===Ye||Pe.length===0||this.length===0)return 0;if(be<0)throw new RangeError("targetStart out of bounds");if(Ye<0||Ye>=this.length)throw new RangeError("Index out of range");if(mt<0)throw new RangeError("sourceEnd out of bounds");mt>this.length&&(mt=this.length),Pe.length-be<mt-Ye&&(mt=Pe.length-be+Ye);const bt=mt-Ye;return this===Pe&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(be,Ye,mt):Uint8Array.prototype.set.call(Pe,this.subarray(Ye,mt),be),bt},r.prototype.fill=function(Pe,be,Ye,mt){if(typeof Pe=="string"){if(typeof be=="string"?(mt=be,be=0,Ye=this.length):typeof Ye=="string"&&(mt=Ye,Ye=this.length),mt!==void 0&&typeof mt!="string")throw new TypeError("encoding must be a string");if(typeof mt=="string"&&!r.isEncoding(mt))throw new TypeError("Unknown encoding: "+mt);if(Pe.length===1){const ft=Pe.charCodeAt(0);(mt==="utf8"&&ft<128||mt==="latin1")&&(Pe=ft)}}else typeof Pe=="number"?Pe=Pe&255:typeof Pe=="boolean"&&(Pe=Number(Pe));if(be<0||this.length<be||this.length<Ye)throw new RangeError("Out of range index");if(Ye<=be)return this;be=be>>>0,Ye=Ye===void 0?this.length:Ye>>>0,Pe||(Pe=0);let bt;if(typeof Pe=="number")for(bt=be;bt<Ye;++bt)this[bt]=Pe;else{const ft=r.isBuffer(Pe)?Pe:r.from(Pe,mt),Wt=ft.length;if(Wt===0)throw new TypeError('The value "'+Pe+'" is invalid for argument "value"');for(bt=0;bt<Ye-be;++bt)this[bt+be]=ft[bt%Wt]}return this};var W={};function ie(Fe,Pe,be){W[Fe]=class extends be{constructor(){super(),Object.defineProperty(this,"message",{value:Pe.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${Fe}]`,this.stack,delete this.name}get code(){return Fe}set code(mt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:mt,writable:!0})}toString(){return`${this.name} [${Fe}]: ${this.message}`}}}ie("ERR_BUFFER_OUT_OF_BOUNDS",function(Fe){return Fe?`${Fe} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ie("ERR_INVALID_ARG_TYPE",function(Fe,Pe){return`The "${Fe}" argument must be of type number. Received type ${typeof Pe}`},TypeError),ie("ERR_OUT_OF_RANGE",function(Fe,Pe,be){let Ye=`The value of "${Fe}" is out of range.`,mt=be;return Number.isInteger(be)&&Math.abs(be)>2**32?mt=se(String(be)):typeof be=="bigint"&&(mt=String(be),(be>BigInt(2)**BigInt(32)||be<-(BigInt(2)**BigInt(32)))&&(mt=se(mt)),mt+="n"),Ye+=` It must be ${Pe}. Received ${mt}`,Ye},RangeError);function se(Fe){let Pe="",be=Fe.length;const Ye=Fe[0]==="-"?1:0;for(;be>=Ye+4;be-=3)Pe=`_${Fe.slice(be-3,be)}${Pe}`;return`${Fe.slice(0,be)}${Pe}`}function ee(Fe,Pe,be){oe(Pe,"offset"),(Fe[Pe]===void 0||Fe[Pe+be]===void 0)&&Y(Pe,Fe.length-(be+1))}function pe(Fe,Pe,be,Ye,mt,bt){if(Fe>be||Fe<Pe){const ft=typeof Pe=="bigint"?"n":"";let Wt;throw Pe===0||Pe===BigInt(0)?Wt=`>= 0${ft} and < 2${ft} ** ${(bt+1)*8}${ft}`:Wt=`>= -(2${ft} ** ${(bt+1)*8-1}${ft}) and < 2 ** ${(bt+1)*8-1}${ft}`,new W.ERR_OUT_OF_RANGE("value",Wt,Fe)}ee(Ye,mt,bt)}function oe(Fe,Pe){if(typeof Fe!="number")throw new W.ERR_INVALID_ARG_TYPE(Pe,"number",Fe)}function Y(Fe,Pe,be){throw Math.floor(Fe)!==Fe?(oe(Fe,be),new W.ERR_OUT_OF_RANGE("offset","an integer",Fe)):Pe<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${Pe}`,Fe)}var ce=/[^+/0-9A-Za-z-_]/g;function ue(Fe){if(Fe=Fe.split("=")[0],Fe=Fe.trim().replace(ce,""),Fe.length<2)return"";for(;Fe.length%4!==0;)Fe=Fe+"=";return Fe}function _e(Fe,Pe){Pe=Pe||1/0;let be;const Ye=Fe.length;let mt=null;const bt=[];for(let ft=0;ft<Ye;++ft){if(be=Fe.charCodeAt(ft),be>55295&&be<57344){if(!mt){if(be>56319){(Pe-=3)>-1&&bt.push(239,191,189);continue}else if(ft+1===Ye){(Pe-=3)>-1&&bt.push(239,191,189);continue}mt=be;continue}if(be<56320){(Pe-=3)>-1&&bt.push(239,191,189),mt=be;continue}be=(mt-55296<<10|be-56320)+65536}else mt&&(Pe-=3)>-1&&bt.push(239,191,189);if(mt=null,be<128){if((Pe-=1)<0)break;bt.push(be)}else if(be<2048){if((Pe-=2)<0)break;bt.push(be>>6|192,be&63|128)}else if(be<65536){if((Pe-=3)<0)break;bt.push(be>>12|224,be>>6&63|128,be&63|128)}else if(be<1114112){if((Pe-=4)<0)break;bt.push(be>>18|240,be>>12&63|128,be>>6&63|128,be&63|128)}else throw new Error("Invalid code point")}return bt}function Le(Fe){const Pe=[];for(let be=0;be<Fe.length;++be)Pe.push(Fe.charCodeAt(be)&255);return Pe}function ze(Fe,Pe){let be,Ye,mt;const bt=[];for(let ft=0;ft<Fe.length&&!((Pe-=2)<0);++ft)be=Fe.charCodeAt(ft),Ye=be>>8,mt=be%256,bt.push(mt),bt.push(Ye);return bt}function Ge(Fe){return Z.toByteArray(ue(Fe))}function Ve(Fe,Pe,be,Ye){let mt;for(mt=0;mt<Ye&&!(mt+be>=Pe.length||mt>=Fe.length);++mt)Pe[mt+be]=Fe[mt];return mt}function rt(Fe,Pe){return Fe instanceof Pe||Fe!=null&&Fe.constructor!=null&&Fe.constructor.name!=null&&Fe.constructor.name===Pe.name}function pt(Fe){return Fe!==Fe}var gt=(function(){const Fe="0123456789abcdef",Pe=new Array(256);for(let be=0;be<16;++be){const Ye=be*16;for(let mt=0;mt<16;++mt)Pe[Ye+mt]=Fe[be]+Fe[mt]}return Pe})();function ht(Fe){return typeof BigInt>"u"?lt:Fe}function lt(){throw new Error("BigInt not supported")}}}),Qx=Ne({"node_modules/has-symbols/shams.js"(te,Z){Z.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var w={},C=Symbol("test"),P=Object(C);if(typeof C=="string"||Object.prototype.toString.call(C)!=="[object Symbol]"||Object.prototype.toString.call(P)!=="[object Symbol]")return!1;var t=42;w[C]=t;for(var r in w)return!1;if(typeof Object.keys=="function"&&Object.keys(w).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(w).length!==0)return!1;var a=Object.getOwnPropertySymbols(w);if(a.length!==1||a[0]!==C||!Object.prototype.propertyIsEnumerable.call(w,C))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(w,C);if(l.value!==t||l.enumerable!==!0)return!1}return!0}}}),i_=Ne({"node_modules/has-tostringtag/shams.js"(te,Z){var v=Qx();Z.exports=function(){return v()&&!!Symbol.toStringTag}}}),eb=Ne({"node_modules/es-object-atoms/index.js"(te,Z){Z.exports=Object}}),vC=Ne({"node_modules/es-errors/index.js"(te,Z){Z.exports=Error}}),Y0=Ne({"node_modules/es-errors/eval.js"(te,Z){Z.exports=EvalError}}),Sd=Ne({"node_modules/es-errors/range.js"(te,Z){Z.exports=RangeError}}),cS=Ne({"node_modules/es-errors/ref.js"(te,Z){Z.exports=ReferenceError}}),fS=Ne({"node_modules/es-errors/syntax.js"(te,Z){Z.exports=SyntaxError}}),Gh=Ne({"node_modules/es-errors/type.js"(te,Z){Z.exports=TypeError}}),XL=Ne({"node_modules/es-errors/uri.js"(te,Z){Z.exports=URIError}}),pC=Ne({"node_modules/math-intrinsics/abs.js"(te,Z){Z.exports=Math.abs}}),mC=Ne({"node_modules/math-intrinsics/floor.js"(te,Z){Z.exports=Math.floor}}),bh=Ne({"node_modules/math-intrinsics/max.js"(te,Z){Z.exports=Math.max}}),pp=Ne({"node_modules/math-intrinsics/min.js"(te,Z){Z.exports=Math.min}}),Z0=Ne({"node_modules/math-intrinsics/pow.js"(te,Z){Z.exports=Math.pow}}),yC=Ne({"node_modules/math-intrinsics/round.js"(te,Z){Z.exports=Math.round}}),gC=Ne({"node_modules/math-intrinsics/isNaN.js"(te,Z){Z.exports=Number.isNaN||function(w){return w!==w}}}),_C=Ne({"node_modules/math-intrinsics/sign.js"(te,Z){var v=gC();Z.exports=function(C){return v(C)||C===0?C:C<0?-1:1}}}),WL=Ne({"node_modules/gopd/gOPD.js"(te,Z){Z.exports=Object.getOwnPropertyDescriptor}}),$0=Ne({"node_modules/gopd/index.js"(te,Z){var v=WL();if(v)try{v([],"length")}catch{v=null}Z.exports=v}}),wv=Ne({"node_modules/es-define-property/index.js"(te,Z){var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}Z.exports=v}}),Bm=Ne({"node_modules/has-symbols/index.js"(te,Z){var v=typeof Symbol<"u"&&Symbol,w=Qx();Z.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:w()}}}),hS=Ne({"node_modules/get-proto/Reflect.getPrototypeOf.js"(te,Z){Z.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),rp=Ne({"node_modules/get-proto/Object.getPrototypeOf.js"(te,Z){var v=eb();Z.exports=v.getPrototypeOf||null}}),xC=Ne({"node_modules/function-bind/implementation.js"(te,Z){var v="Function.prototype.bind called on incompatible ",w=Object.prototype.toString,C=Math.max,P="[object Function]",t=function(i,s){for(var o=[],u=0;u<i.length;u+=1)o[u]=i[u];for(var d=0;d<s.length;d+=1)o[d+i.length]=s[d];return o},r=function(i,s){for(var o=[],u=s,d=0;u<i.length;u+=1,d+=1)o[d]=i[u];return o},a=function(l,i){for(var s="",o=0;o<l.length;o+=1)s+=l[o],o+1<l.length&&(s+=i);return s};Z.exports=function(i){var s=this;if(typeof s!="function"||w.apply(s)!==P)throw new TypeError(v+s);for(var o=r(arguments,1),u,d=function(){if(this instanceof u){var c=s.apply(this,t(o,arguments));return Object(c)===c?c:this}return s.apply(i,t(o,arguments))},h=C(0,s.length-o.length),y=[],m=0;m<h;m++)y[m]="$"+m;if(u=Function("binder","return function ("+a(y,",")+"){ return binder.apply(this,arguments); }")(d),s.prototype){var E=function(){};E.prototype=s.prototype,u.prototype=new E,E.prototype=null}return u}}}),Kp=Ne({"node_modules/function-bind/index.js"(te,Z){var v=xC();Z.exports=Function.prototype.bind||v}}),K0=Ne({"node_modules/call-bind-apply-helpers/functionCall.js"(te,Z){Z.exports=Function.prototype.call}}),c0=Ne({"node_modules/call-bind-apply-helpers/functionApply.js"(te,Z){Z.exports=Function.prototype.apply}}),dS=Ne({"node_modules/call-bind-apply-helpers/reflectApply.js"(te,Z){Z.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}}),vS=Ne({"node_modules/call-bind-apply-helpers/actualApply.js"(te,Z){var v=Kp(),w=c0(),C=K0(),P=dS();Z.exports=P||v.call(C,w)}}),jm=Ne({"node_modules/call-bind-apply-helpers/index.js"(te,Z){var v=Kp(),w=Gh(),C=K0(),P=vS();Z.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new w("a function is required");return P(v,C,r)}}}),bC=Ne({"node_modules/dunder-proto/get.js"(te,Z){var v=jm(),w=$0(),C;try{C=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var P=!!C&&w&&w(Object.prototype,"__proto__"),t=Object,r=t.getPrototypeOf;Z.exports=P&&typeof P.get=="function"?v([P.get]):typeof r=="function"?(function(l){return r(l==null?l:t(l))}):!1}}),o_=Ne({"node_modules/get-proto/index.js"(te,Z){var v=hS(),w=rp(),C=bC();Z.exports=v?function(t){return v(t)}:w?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return w(t)}:C?function(t){return C(t)}:null}}),tb=Ne({"node_modules/hasown/index.js"(te,Z){var v=Function.prototype.call,w=Object.prototype.hasOwnProperty,C=Kp();Z.exports=C.call(v,w)}}),qg=Ne({"node_modules/get-intrinsic/index.js"(te,Z){var v,w=eb(),C=vC(),P=Y0(),t=Sd(),r=cS(),a=fS(),l=Gh(),i=XL(),s=pC(),o=mC(),u=bh(),d=pp(),h=Z0(),y=yC(),m=_C(),E=Function,c=function(ee){try{return E('"use strict"; return ('+ee+").constructor;")()}catch{}},_=$0(),T=wv(),M=function(){throw new l},k=_?(function(){try{return arguments.callee,M}catch{try{return _(arguments,"callee").get}catch{return M}}})():M,b=Bm()(),A=o_(),g=rp(),f=hS(),p=c0(),x=K0(),N={},D=typeof Uint8Array>"u"||!A?v:A(Uint8Array),B={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":b&&A?A([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":N,"%AsyncGenerator%":N,"%AsyncGeneratorFunction%":N,"%AsyncIteratorPrototype%":N,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":C,"%eval%":eval,"%EvalError%":P,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":E,"%GeneratorFunction%":N,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":b&&A?A(A([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!b||!A?v:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":w,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":t,"%ReferenceError%":r,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!b||!A?v:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":b&&A?A(""[Symbol.iterator]()):v,"%Symbol%":b?Symbol:v,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":D,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":i,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":p,"%Object.defineProperty%":T,"%Object.getPrototypeOf%":g,"%Math.abs%":s,"%Math.floor%":o,"%Math.max%":u,"%Math.min%":d,"%Math.pow%":h,"%Math.round%":y,"%Math.sign%":m,"%Reflect.getPrototypeOf%":f};if(A)try{null.error}catch(ee){U=A(A(ee)),B["%Error.prototype%"]=U}var U,V=function ee(pe){var oe;if(pe==="%AsyncFunction%")oe=c("async function () {}");else if(pe==="%GeneratorFunction%")oe=c("function* () {}");else if(pe==="%AsyncGeneratorFunction%")oe=c("async function* () {}");else if(pe==="%AsyncGenerator%"){var Y=ee("%AsyncGeneratorFunction%");Y&&(oe=Y.prototype)}else if(pe==="%AsyncIteratorPrototype%"){var ce=ee("%AsyncGenerator%");ce&&A&&(oe=A(ce.prototype))}return B[pe]=oe,oe},q={__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"]},z=Kp(),H=tb(),G=z.call(x,Array.prototype.concat),J=z.call(p,Array.prototype.splice),le=z.call(x,String.prototype.replace),ye=z.call(x,String.prototype.slice),de=z.call(x,RegExp.prototype.exec),me=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,ie=function(pe){var oe=ye(pe,0,1),Y=ye(pe,-1);if(oe==="%"&&Y!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(Y==="%"&&oe!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var ce=[];return le(pe,me,function(ue,_e,Le,ze){ce[ce.length]=Le?le(ze,W,"$1"):_e||ue}),ce},se=function(pe,oe){var Y=pe,ce;if(H(q,Y)&&(ce=q[Y],Y="%"+ce[0]+"%"),H(B,Y)){var ue=B[Y];if(ue===N&&(ue=V(Y)),typeof ue>"u"&&!oe)throw new l("intrinsic "+pe+" exists, but is not available. Please file an issue!");return{alias:ce,name:Y,value:ue}}throw new a("intrinsic "+pe+" does not exist!")};Z.exports=function(pe,oe){if(typeof pe!="string"||pe.length===0)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof oe!="boolean")throw new l('"allowMissing" argument must be a boolean');if(de(/^%?[^%]*%?$/,pe)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Y=ie(pe),ce=Y.length>0?Y[0]:"",ue=se("%"+ce+"%",oe),_e=ue.name,Le=ue.value,ze=!1,Ge=ue.alias;Ge&&(ce=Ge[0],J(Y,G([0,1],Ge)));for(var Ve=1,rt=!0;Ve<Y.length;Ve+=1){var pt=Y[Ve],gt=ye(pt,0,1),ht=ye(pt,-1);if((gt==='"'||gt==="'"||gt==="`"||ht==='"'||ht==="'"||ht==="`")&&gt!==ht)throw new a("property names with quotes must have matching quotes");if((pt==="constructor"||!rt)&&(ze=!0),ce+="."+pt,_e="%"+ce+"%",H(B,_e))Le=B[_e];else if(Le!=null){if(!(pt in Le)){if(!oe)throw new l("base intrinsic for "+pe+" exists, but the property is not available.");return}if(_&&Ve+1>=Y.length){var lt=_(Le,pt);rt=!!lt,rt&&"get"in lt&&!("originalValue"in lt.get)?Le=lt.get:Le=Le[pt]}else rt=H(Le,pt),Le=Le[pt];rt&&!ze&&(B[_e]=Le)}}return Le}}}),s_=Ne({"node_modules/define-data-property/index.js"(te,Z){var v=wv(),w=fS(),C=Gh(),P=$0();Z.exports=function(r,a,l){if(!r||typeof r!="object"&&typeof r!="function")throw new C("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new C("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new C("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new C("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new C("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new C("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,d=!!P&&P(r,a);if(v)v(r,a,{configurable:o===null&&d?d.configurable:!o,enumerable:i===null&&d?d.enumerable:!i,value:l,writable:s===null&&d?d.writable:!s});else if(u||!i&&!s&&!o)r[a]=l;else throw new w("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),pS=Ne({"node_modules/has-property-descriptors/index.js"(te,Z){var v=wv(),w=function(){return!!v};w.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},Z.exports=w}}),wC=Ne({"node_modules/set-function-length/index.js"(te,Z){var v=qg(),w=s_(),C=pS()(),P=$0(),t=Gh(),r=v("%Math.floor%");Z.exports=function(l,i){if(typeof l!="function")throw new t("`fn` is not a function");if(typeof i!="number"||i<0||i>4294967295||r(i)!==i)throw new t("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],o=!0,u=!0;if("length"in l&&P){var d=P(l,"length");d&&!d.configurable&&(o=!1),d&&!d.writable&&(u=!1)}return(o||u||!s)&&(C?w(l,"length",i,!0,!0):w(l,"length",i)),l}}}),By=Ne({"node_modules/call-bind/index.js"(te,Z){var v=Kp(),w=qg(),C=wC(),P=Gh(),t=w("%Function.prototype.apply%"),r=w("%Function.prototype.call%"),a=w("%Reflect.apply%",!0)||v.call(r,t),l=wv(),i=w("%Math.max%");Z.exports=function(u){if(typeof u!="function")throw new P("a function is required");var d=a(v,r,arguments);return C(d,1+i(0,u.length-(arguments.length-1)),!0)};var s=function(){return a(v,t,arguments)};l?l(Z.exports,"apply",{value:s}):Z.exports.apply=s}}),l_=Ne({"node_modules/call-bind/callBound.js"(te,Z){var v=qg(),w=By(),C=w(v("String.prototype.indexOf"));Z.exports=function(t,r){var a=v(t,!!r);return typeof a=="function"&&C(t,".prototype.")>-1?w(a):a}}}),R2=Ne({"node_modules/is-arguments/index.js"(te,Z){var v=i_()(),w=l_(),C=w("Object.prototype.toString"),P=function(l){return v&&l&&typeof l=="object"&&Symbol.toStringTag in l?!1:C(l)==="[object Arguments]"},t=function(l){return P(l)?!0:l!==null&&typeof l=="object"&&typeof l.length=="number"&&l.length>=0&&C(l)!=="[object Array]"&&C(l.callee)==="[object Function]"},r=(function(){return P(arguments)})();P.isLegacyArguments=t,Z.exports=r?P:t}}),TC=Ne({"node_modules/is-generator-function/index.js"(te,Z){var v=Object.prototype.toString,w=Function.prototype.toString,C=/^\s*(?:function)?\*/,P=i_()(),t=Object.getPrototypeOf,r=function(){if(!P)return!1;try{return Function("return function*() {}")()}catch{}},a;Z.exports=function(i){if(typeof i!="function")return!1;if(C.test(w.call(i)))return!0;if(!P){var s=v.call(i);return s==="[object GeneratorFunction]"}if(!t)return!1;if(typeof a>"u"){var o=r();a=o?t(o):!1}return t(i)===a}}}),YL=Ne({"node_modules/is-callable/index.js"(te,Z){var v=Function.prototype.toString,w=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,C,P;if(typeof w=="function"&&typeof Object.defineProperty=="function")try{C=Object.defineProperty({},"length",{get:function(){throw P}}),P={},w(function(){throw 42},null,C)}catch(_){_!==P&&(w=null)}else w=null;var t=/^\s*class\b/,r=function(T){try{var M=v.call(T);return t.test(M)}catch{return!1}},a=function(T){try{return r(T)?!1:(v.call(T),!0)}catch{return!1}},l=Object.prototype.toString,i="[object Object]",s="[object Function]",o="[object GeneratorFunction]",u="[object HTMLAllCollection]",d="[object HTML document.all class]",h="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),E=function(){return!1};typeof document=="object"&&(c=document.all,l.call(c)===l.call(document.all)&&(E=function(T){if((m||!T)&&(typeof T>"u"||typeof T=="object"))try{var M=l.call(T);return(M===u||M===d||M===h||M===i)&&T("")==null}catch{}return!1}));var c;Z.exports=w?function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;try{w(T,null,C)}catch(M){if(M!==P)return!1}return!r(T)&&a(T)}:function(T){if(E(T))return!0;if(!T||typeof T!="function"&&typeof T!="object")return!1;if(y)return a(T);if(r(T))return!1;var M=l.call(T);return M!==s&&M!==o&&!/^\[object HTML/.test(M)?!1:a(T)}}}),AC=Ne({"node_modules/for-each/index.js"(te,Z){var v=YL(),w=Object.prototype.toString,C=Object.prototype.hasOwnProperty,P=function(i,s,o){for(var u=0,d=i.length;u<d;u++)C.call(i,u)&&(o==null?s(i[u],u,i):s.call(o,i[u],u,i))},t=function(i,s,o){for(var u=0,d=i.length;u<d;u++)o==null?s(i.charAt(u),u,i):s.call(o,i.charAt(u),u,i)},r=function(i,s,o){for(var u in i)C.call(i,u)&&(o==null?s(i[u],u,i):s.call(o,i[u],u,i))},a=function(i,s,o){if(!v(s))throw new TypeError("iterator must be a function");var u;arguments.length>=3&&(u=o),w.call(i)==="[object Array]"?P(i,s,u):typeof i=="string"?t(i,s,u):r(i,s,u)};Z.exports=a}}),Nc=Ne({"node_modules/available-typed-arrays/index.js"(te,Z){var v=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],w=typeof globalThis>"u"?window:globalThis;Z.exports=function(){for(var P=[],t=0;t<v.length;t++)typeof w[v[t]]=="function"&&(P[P.length]=v[t]);return P}}}),Xf=Ne({"node_modules/which-typed-array/index.js"(te,Z){var v=AC(),w=Nc(),C=By(),P=l_(),t=$0(),r=P("Object.prototype.toString"),a=i_()(),l=typeof globalThis>"u"?window:globalThis,i=w(),s=P("String.prototype.slice"),o=Object.getPrototypeOf,u=P("Array.prototype.indexOf",!0)||function(E,c){for(var _=0;_<E.length;_+=1)if(E[_]===c)return _;return-1},d={__proto__:null};a&&t&&o?v(i,function(m){var E=new l[m];if(Symbol.toStringTag in E){var c=o(E),_=t(c,Symbol.toStringTag);if(!_){var T=o(c);_=t(T,Symbol.toStringTag)}d["$"+m]=C(_.get)}}):v(i,function(m){var E=new l[m],c=E.slice||E.set;c&&(d["$"+m]=C(c))});var h=function(E){var c=!1;return v(d,function(_,T){if(!c)try{"$"+_(E)===T&&(c=s(T,1))}catch{}}),c},y=function(E){var c=!1;return v(d,function(_,T){if(!c)try{_(E),c=s(T,1)}catch{}}),c};Z.exports=function(E){if(!E||typeof E!="object")return!1;if(!a){var c=s(r(E),8,-1);return u(i,c)>-1?c:c!=="Object"?!1:y(E)}return t?h(E):null}}}),cc=Ne({"node_modules/is-typed-array/index.js"(te,Z){var v=AC(),w=Nc(),C=l_(),P=C("Object.prototype.toString"),t=i_()(),r=$0(),a=typeof globalThis>"u"?window:globalThis,l=w(),i=C("Array.prototype.indexOf",!0)||function(y,m){for(var E=0;E<y.length;E+=1)if(y[E]===m)return E;return-1},s=C("String.prototype.slice"),o={},u=Object.getPrototypeOf;t&&r&&u&&v(l,function(h){var y=new a[h];if(Symbol.toStringTag in y){var m=u(y),E=r(m,Symbol.toStringTag);if(!E){var c=u(m);E=r(c,Symbol.toStringTag)}o[h]=E.get}});var d=function(y){var m=!1;return v(o,function(E,c){if(!m)try{m=E.call(y)===c}catch{}}),m};Z.exports=function(y){if(!y||typeof y!="object")return!1;if(!t||!(Symbol.toStringTag in y)){var m=s(P(y),8,-1);return i(l,m)>-1}return r?d(y):!1}}}),fc=Ne({"node_modules/util/support/types.js"(te){var Z=R2(),v=TC(),w=Xf(),C=cc();function P(ze){return ze.call.bind(ze)}var t=typeof BigInt<"u",r=typeof Symbol<"u",a=P(Object.prototype.toString),l=P(Number.prototype.valueOf),i=P(String.prototype.valueOf),s=P(Boolean.prototype.valueOf);t&&(o=P(BigInt.prototype.valueOf));var o;r&&(u=P(Symbol.prototype.valueOf));var u;function d(ze,Ge){if(typeof ze!="object")return!1;try{return Ge(ze),!0}catch{return!1}}te.isArgumentsObject=Z,te.isGeneratorFunction=v,te.isTypedArray=C;function h(ze){return typeof Promise<"u"&&ze instanceof Promise||ze!==null&&typeof ze=="object"&&typeof ze.then=="function"&&typeof ze.catch=="function"}te.isPromise=h;function y(ze){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ze):C(ze)||J(ze)}te.isArrayBufferView=y;function m(ze){return w(ze)==="Uint8Array"}te.isUint8Array=m;function E(ze){return w(ze)==="Uint8ClampedArray"}te.isUint8ClampedArray=E;function c(ze){return w(ze)==="Uint16Array"}te.isUint16Array=c;function _(ze){return w(ze)==="Uint32Array"}te.isUint32Array=_;function T(ze){return w(ze)==="Int8Array"}te.isInt8Array=T;function M(ze){return w(ze)==="Int16Array"}te.isInt16Array=M;function k(ze){return w(ze)==="Int32Array"}te.isInt32Array=k;function b(ze){return w(ze)==="Float32Array"}te.isFloat32Array=b;function A(ze){return w(ze)==="Float64Array"}te.isFloat64Array=A;function g(ze){return w(ze)==="BigInt64Array"}te.isBigInt64Array=g;function f(ze){return w(ze)==="BigUint64Array"}te.isBigUint64Array=f;function p(ze){return a(ze)==="[object Map]"}p.working=typeof Map<"u"&&p(new Map);function x(ze){return typeof Map>"u"?!1:p.working?p(ze):ze instanceof Map}te.isMap=x;function N(ze){return a(ze)==="[object Set]"}N.working=typeof Set<"u"&&N(new Set);function D(ze){return typeof Set>"u"?!1:N.working?N(ze):ze instanceof Set}te.isSet=D;function B(ze){return a(ze)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function U(ze){return typeof WeakMap>"u"?!1:B.working?B(ze):ze instanceof WeakMap}te.isWeakMap=U;function V(ze){return a(ze)==="[object WeakSet]"}V.working=typeof WeakSet<"u"&&V(new WeakSet);function q(ze){return V(ze)}te.isWeakSet=q;function z(ze){return a(ze)==="[object ArrayBuffer]"}z.working=typeof ArrayBuffer<"u"&&z(new ArrayBuffer);function H(ze){return typeof ArrayBuffer>"u"?!1:z.working?z(ze):ze instanceof ArrayBuffer}te.isArrayBuffer=H;function G(ze){return a(ze)==="[object DataView]"}G.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&G(new DataView(new ArrayBuffer(1),0,1));function J(ze){return typeof DataView>"u"?!1:G.working?G(ze):ze instanceof DataView}te.isDataView=J;var le=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ye(ze){return a(ze)==="[object SharedArrayBuffer]"}function de(ze){return typeof le>"u"?!1:(typeof ye.working>"u"&&(ye.working=ye(new le)),ye.working?ye(ze):ze instanceof le)}te.isSharedArrayBuffer=de;function me(ze){return a(ze)==="[object AsyncFunction]"}te.isAsyncFunction=me;function W(ze){return a(ze)==="[object Map Iterator]"}te.isMapIterator=W;function ie(ze){return a(ze)==="[object Set Iterator]"}te.isSetIterator=ie;function se(ze){return a(ze)==="[object Generator]"}te.isGeneratorObject=se;function ee(ze){return a(ze)==="[object WebAssembly.Module]"}te.isWebAssemblyCompiledModule=ee;function pe(ze){return d(ze,l)}te.isNumberObject=pe;function oe(ze){return d(ze,i)}te.isStringObject=oe;function Y(ze){return d(ze,s)}te.isBooleanObject=Y;function ce(ze){return t&&d(ze,o)}te.isBigIntObject=ce;function ue(ze){return r&&d(ze,u)}te.isSymbolObject=ue;function _e(ze){return pe(ze)||oe(ze)||Y(ze)||ce(ze)||ue(ze)}te.isBoxedPrimitive=_e;function Le(ze){return typeof Uint8Array<"u"&&(H(ze)||de(ze))}te.isAnyArrayBuffer=Le,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ze){Object.defineProperty(te,ze,{enumerable:!1,value:function(){throw new Error(ze+" is not supported in userland")}})})}}),cf=Ne({"node_modules/util/support/isBufferBrowser.js"(te,Z){Z.exports=function(w){return w&&typeof w=="object"&&typeof w.copy=="function"&&typeof w.fill=="function"&&typeof w.readUInt8=="function"}}}),mp=Ne({"(disabled):node_modules/util/util.js"(te){var Z=Object.getOwnPropertyDescriptors||function(J){for(var le=Object.keys(J),ye={},de=0;de<le.length;de++)ye[le[de]]=Object.getOwnPropertyDescriptor(J,le[de]);return ye},v=/%[sdj%]/g;te.format=function(G){if(!T(G)){for(var J=[],le=0;le<arguments.length;le++)J.push(t(arguments[le]));return J.join(" ")}for(var le=1,ye=arguments,de=ye.length,me=String(G).replace(v,function(ie){if(ie==="%%")return"%";if(le>=de)return ie;switch(ie){case"%s":return String(ye[le++]);case"%d":return Number(ye[le++]);case"%j":try{return JSON.stringify(ye[le++])}catch{return"[Circular]"}default:return ie}}),W=ye[le];le<de;W=ye[++le])E(W)||!A(W)?me+=" "+W:me+=" "+t(W);return me},te.deprecate=function(G,J){if(typeof process<"u"&&process.noDeprecation===!0)return G;if(typeof process>"u")return function(){return te.deprecate(G,J).apply(this,arguments)};var le=!1;function ye(){if(!le){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),le=!0}return G.apply(this,arguments)}return ye};var w={},C=/^$/;P="false",P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),C=new RegExp("^"+P+"$","i");var P;te.debuglog=function(G){if(G=G.toUpperCase(),!w[G])if(C.test(G)){var J=process.pid;w[G]=function(){var le=te.format.apply(te,arguments);console.error("%s %d: %s",G,J,le)}}else w[G]=function(){};return w[G]};function t(G,J){var le={seen:[],stylize:a};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),m(J)?le.showHidden=J:J&&te._extend(le,J),k(le.showHidden)&&(le.showHidden=!1),k(le.depth)&&(le.depth=2),k(le.colors)&&(le.colors=!1),k(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=r),i(le,G,le.depth)}te.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(G,J){var le=t.styles[J];return le?"\x1B["+t.colors[le][0]+"m"+G+"\x1B["+t.colors[le][1]+"m":G}function a(G,J){return G}function l(G){var J={};return G.forEach(function(le,ye){J[le]=!0}),J}function i(G,J,le){if(G.customInspect&&J&&p(J.inspect)&&J.inspect!==te.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ye=J.inspect(le,G);return T(ye)||(ye=i(G,ye,le)),ye}var de=s(G,J);if(de)return de;var me=Object.keys(J),W=l(me);if(G.showHidden&&(me=Object.getOwnPropertyNames(J)),f(J)&&(me.indexOf("message")>=0||me.indexOf("description")>=0))return o(J);if(me.length===0){if(p(J)){var ie=J.name?": "+J.name:"";return G.stylize("[Function"+ie+"]","special")}if(b(J))return G.stylize(RegExp.prototype.toString.call(J),"regexp");if(g(J))return G.stylize(Date.prototype.toString.call(J),"date");if(f(J))return o(J)}var se="",ee=!1,pe=["{","}"];if(y(J)&&(ee=!0,pe=["[","]"]),p(J)){var oe=J.name?": "+J.name:"";se=" [Function"+oe+"]"}if(b(J)&&(se=" "+RegExp.prototype.toString.call(J)),g(J)&&(se=" "+Date.prototype.toUTCString.call(J)),f(J)&&(se=" "+o(J)),me.length===0&&(!ee||J.length==0))return pe[0]+se+pe[1];if(le<0)return b(J)?G.stylize(RegExp.prototype.toString.call(J),"regexp"):G.stylize("[Object]","special");G.seen.push(J);var Y;return ee?Y=u(G,J,le,W,me):Y=me.map(function(ce){return d(G,J,le,W,ce,ee)}),G.seen.pop(),h(Y,se,pe)}function s(G,J){if(k(J))return G.stylize("undefined","undefined");if(T(J)){var le="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return G.stylize(le,"string")}if(_(J))return G.stylize(""+J,"number");if(m(J))return G.stylize(""+J,"boolean");if(E(J))return G.stylize("null","null")}function o(G){return"["+Error.prototype.toString.call(G)+"]"}function u(G,J,le,ye,de){for(var me=[],W=0,ie=J.length;W<ie;++W)V(J,String(W))?me.push(d(G,J,le,ye,String(W),!0)):me.push("");return de.forEach(function(se){se.match(/^\d+$/)||me.push(d(G,J,le,ye,se,!0))}),me}function d(G,J,le,ye,de,me){var W,ie,se;if(se=Object.getOwnPropertyDescriptor(J,de)||{value:J[de]},se.get?se.set?ie=G.stylize("[Getter/Setter]","special"):ie=G.stylize("[Getter]","special"):se.set&&(ie=G.stylize("[Setter]","special")),V(ye,de)||(W="["+de+"]"),ie||(G.seen.indexOf(se.value)<0?(E(le)?ie=i(G,se.value,null):ie=i(G,se.value,le-1),ie.indexOf(`
`)>-1&&(me?ie=ie.split(`
`).map(function(ee){return"  "+ee}).join(`
`).slice(2):ie=`
`+ie.split(`
`).map(function(ee){return"   "+ee}).join(`
`))):ie=G.stylize("[Circular]","special")),k(W)){if(me&&de.match(/^\d+$/))return ie;W=JSON.stringify(""+de),W.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.slice(1,-1),W=G.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=G.stylize(W,"string"))}return W+": "+ie}function h(G,J,le){var ye=G.reduce(function(de,me){return me.indexOf(`
`)>=0,de+me.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ye>60?le[0]+(J===""?"":J+`
 `)+" "+G.join(`,
  `)+" "+le[1]:le[0]+J+" "+G.join(", ")+" "+le[1]}te.types=fc();function y(G){return Array.isArray(G)}te.isArray=y;function m(G){return typeof G=="boolean"}te.isBoolean=m;function E(G){return G===null}te.isNull=E;function c(G){return G==null}te.isNullOrUndefined=c;function _(G){return typeof G=="number"}te.isNumber=_;function T(G){return typeof G=="string"}te.isString=T;function M(G){return typeof G=="symbol"}te.isSymbol=M;function k(G){return G===void 0}te.isUndefined=k;function b(G){return A(G)&&N(G)==="[object RegExp]"}te.isRegExp=b,te.types.isRegExp=b;function A(G){return typeof G=="object"&&G!==null}te.isObject=A;function g(G){return A(G)&&N(G)==="[object Date]"}te.isDate=g,te.types.isDate=g;function f(G){return A(G)&&(N(G)==="[object Error]"||G instanceof Error)}te.isError=f,te.types.isNativeError=f;function p(G){return typeof G=="function"}te.isFunction=p;function x(G){return G===null||typeof G=="boolean"||typeof G=="number"||typeof G=="string"||typeof G=="symbol"||typeof G>"u"}te.isPrimitive=x,te.isBuffer=cf();function N(G){return Object.prototype.toString.call(G)}function D(G){return G<10?"0"+G.toString(10):G.toString(10)}var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U(){var G=new Date,J=[D(G.getHours()),D(G.getMinutes()),D(G.getSeconds())].join(":");return[G.getDate(),B[G.getMonth()],J].join(" ")}te.log=function(){console.log("%s - %s",U(),te.format.apply(te,arguments))},te.inherits=um(),te._extend=function(G,J){if(!J||!A(J))return G;for(var le=Object.keys(J),ye=le.length;ye--;)G[le[ye]]=J[le[ye]];return G};function V(G,J){return Object.prototype.hasOwnProperty.call(G,J)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;te.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&J[q]){var le=J[q];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var ye,de,me=new Promise(function(se,ee){ye=se,de=ee}),W=[],ie=0;ie<arguments.length;ie++)W.push(arguments[ie]);W.push(function(se,ee){se?de(se):ye(ee)});try{J.apply(this,W)}catch(se){de(se)}return me}return Object.setPrototypeOf(le,Object.getPrototypeOf(J)),q&&Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(le,Z(J))},te.promisify.custom=q;function z(G,J){if(!G){var le=new Error("Promise was rejected with a falsy value");le.reason=G,G=le}return J(G)}function H(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var le=[],ye=0;ye<arguments.length;ye++)le.push(arguments[ye]);var de=le.pop();if(typeof de!="function")throw new TypeError("The last argument must be of type Function");var me=this,W=function(){return de.apply(me,arguments)};G.apply(this,le).then(function(ie){process.nextTick(W.bind(null,null,ie))},function(ie){process.nextTick(z.bind(null,ie,W))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(G)),Object.defineProperties(J,Z(G)),J}te.callbackify=H}}),jy=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/buffer_list.js"(te,Z){function v(d,h){var y=Object.keys(d);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(d);h&&(m=m.filter(function(E){return Object.getOwnPropertyDescriptor(d,E).enumerable})),y.push.apply(y,m)}return y}function w(d){for(var h=1;h<arguments.length;h++){var y=arguments[h]!=null?arguments[h]:{};h%2?v(Object(y),!0).forEach(function(m){C(d,m,y[m])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(y)):v(Object(y)).forEach(function(m){Object.defineProperty(d,m,Object.getOwnPropertyDescriptor(y,m))})}return d}function C(d,h,y){return h in d?Object.defineProperty(d,h,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[h]=y,d}function P(d,h){if(!(d instanceof h))throw new TypeError("Cannot call a class as a function")}function t(d,h){for(var y=0;y<h.length;y++){var m=h[y];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(d,m.key,m)}}function r(d,h,y){return h&&t(d.prototype,h),d}var a=Ug(),l=a.Buffer,i=mp(),s=i.inspect,o=s&&s.custom||"inspect";function u(d,h,y){l.prototype.copy.call(d,h,y)}Z.exports=(function(){function d(){P(this,d),this.head=null,this.tail=null,this.length=0}return r(d,[{key:"push",value:function(y){var m={data:y,next:null};this.length>0?this.tail.next=m:this.head=m,this.tail=m,++this.length}},{key:"unshift",value:function(y){var m={data:y,next:this.head};this.length===0&&(this.tail=m),this.head=m,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var m=this.head,E=""+m.data;m=m.next;)E+=y+m.data;return E}},{key:"concat",value:function(y){if(this.length===0)return l.alloc(0);for(var m=l.allocUnsafe(y>>>0),E=this.head,c=0;E;)u(E.data,m,c),c+=E.data.length,E=E.next;return m}},{key:"consume",value:function(y,m){var E;return y<this.head.data.length?(E=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?E=this.shift():E=m?this._getString(y):this._getBuffer(y),E}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var m=this.head,E=1,c=m.data;for(y-=c.length;m=m.next;){var _=m.data,T=y>_.length?_.length:y;if(T===_.length?c+=_:c+=_.slice(0,y),y-=T,y===0){T===_.length?(++E,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=_.slice(T));break}++E}return this.length-=E,c}},{key:"_getBuffer",value:function(y){var m=l.allocUnsafe(y),E=this.head,c=1;for(E.data.copy(m),y-=E.data.length;E=E.next;){var _=E.data,T=y>_.length?_.length:y;if(_.copy(m,m.length-y,0,T),y-=T,y===0){T===_.length?(++c,E.next?this.head=E.next:this.head=this.tail=null):(this.head=E,E.data=_.slice(T));break}++c}return this.length-=c,m}},{key:o,value:function(y,m){return s(this,w({},m,{depth:0,customInspect:!1}))}}]),d})()}}),Vg=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(te,Z){function v(a,l){var i=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(l?l(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(t,this,a)):process.nextTick(t,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(u){!l&&u?i._writableState?i._writableState.errorEmitted?process.nextTick(C,i):(i._writableState.errorEmitted=!0,process.nextTick(w,i,u)):process.nextTick(w,i,u):l?(process.nextTick(C,i),l(u)):process.nextTick(C,i)}),this)}function w(a,l){t(a,l),C(a)}function C(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function P(){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 t(a,l){a.emit("error",l)}function r(a,l){var i=a._readableState,s=a._writableState;i&&i.autoDestroy||s&&s.autoDestroy?a.destroy(l):a.emit("error",l)}Z.exports={destroy:v,undestroy:P,errorOrDestroy:r}}}),Uy=Ne({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(te,Z){function v(l,i){l.prototype=Object.create(i.prototype),l.prototype.constructor=l,l.__proto__=i}var w={};function C(l,i,s){s||(s=Error);function o(d,h,y){return typeof i=="string"?i:i(d,h,y)}var u=(function(d){v(h,d);function h(y,m,E){return d.call(this,o(y,m,E))||this}return h})(s);u.prototype.name=s.name,u.prototype.code=l,w[l]=u}function P(l,i){if(Array.isArray(l)){var s=l.length;return l=l.map(function(o){return String(o)}),s>2?"one of ".concat(i," ").concat(l.slice(0,s-1).join(", "),", or ")+l[s-1]:s===2?"one of ".concat(i," ").concat(l[0]," or ").concat(l[1]):"of ".concat(i," ").concat(l[0])}else return"of ".concat(i," ").concat(String(l))}function t(l,i,s){return l.substr(0,i.length)===i}function r(l,i,s){return(s===void 0||s>l.length)&&(s=l.length),l.substring(s-i.length,s)===i}function a(l,i,s){return typeof s!="number"&&(s=0),s+i.length>l.length?!1:l.indexOf(i,s)!==-1}C("ERR_INVALID_OPT_VALUE",function(l,i){return'The value "'+i+'" is invalid for option "'+l+'"'},TypeError),C("ERR_INVALID_ARG_TYPE",function(l,i,s){var o;typeof i=="string"&&t(i,"not ")?(o="must not be",i=i.replace(/^not /,"")):o="must be";var u;if(r(l," argument"))u="The ".concat(l," ").concat(o," ").concat(P(i,"type"));else{var d=a(l,".")?"property":"argument";u='The "'.concat(l,'" ').concat(d," ").concat(o," ").concat(P(i,"type"))}return u+=". Received type ".concat(typeof s),u},TypeError),C("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),C("ERR_METHOD_NOT_IMPLEMENTED",function(l){return"The "+l+" method is not implemented"}),C("ERR_STREAM_PREMATURE_CLOSE","Premature close"),C("ERR_STREAM_DESTROYED",function(l){return"Cannot call "+l+" after a stream was destroyed"}),C("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),C("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),C("ERR_STREAM_WRITE_AFTER_END","write after end"),C("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),C("ERR_UNKNOWN_ENCODING",function(l){return"Unknown encoding: "+l},TypeError),C("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Z.exports.codes=w}}),f0=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(te,Z){var v=Uy().codes.ERR_INVALID_OPT_VALUE;function w(P,t,r){return P.highWaterMark!=null?P.highWaterMark:t?P[r]:null}function C(P,t,r,a){var l=w(t,a,r);if(l!=null){if(!(isFinite(l)&&Math.floor(l)===l)||l<0){var i=a?r:"highWaterMark";throw new v(i,l)}return Math.floor(l)}return P.objectMode?16:16*1024}Z.exports={getHighWaterMark:C}}}),Xh=Ne({"node_modules/util-deprecate/browser.js"(te,Z){Z.exports=v;function v(C,P){if(w("noDeprecation"))return C;var t=!1;function r(){if(!t){if(w("throwDeprecation"))throw new Error(P);w("traceDeprecation")?console.trace(P):console.warn(P),t=!0}return C.apply(this,arguments)}return r}function w(C){try{if(!window.localStorage)return!1}catch{return!1}var P=window.localStorage[C];return P==null?!1:String(P).toLowerCase()==="true"}}}),J0=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(te,Z){Z.exports=g;function v(W){var ie=this;this.next=null,this.entry=null,this.finish=function(){me(ie,W)}}var w;g.WritableState=b;var C={deprecate:Xh()},P=Fm(),t=Ug().Buffer,r=window.Uint8Array||function(){};function a(W){return t.from(W)}function l(W){return t.isBuffer(W)||W instanceof r}var i=Vg(),s=f0(),o=s.getHighWaterMark,u=Uy().codes,d=u.ERR_INVALID_ARG_TYPE,h=u.ERR_METHOD_NOT_IMPLEMENTED,y=u.ERR_MULTIPLE_CALLBACK,m=u.ERR_STREAM_CANNOT_PIPE,E=u.ERR_STREAM_DESTROYED,c=u.ERR_STREAM_NULL_VALUES,_=u.ERR_STREAM_WRITE_AFTER_END,T=u.ERR_UNKNOWN_ENCODING,M=i.errorOrDestroy;um()(g,P);function k(){}function b(W,ie,se){w=w||cm(),W=W||{},typeof se!="boolean"&&(se=ie instanceof w),this.objectMode=!!W.objectMode,se&&(this.objectMode=this.objectMode||!!W.writableObjectMode),this.highWaterMark=o(this,W,"writableHighWaterMark",se),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ee=W.decodeStrings===!1;this.decodeStrings=!ee,this.defaultEncoding=W.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){V(ie,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=W.emitClose!==!1,this.autoDestroy=!!W.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}b.prototype.getBuffer=function(){for(var ie=this.bufferedRequest,se=[];ie;)se.push(ie),ie=ie.next;return se},(function(){try{Object.defineProperty(b.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(ie){return A.call(this,ie)?!0:this!==g?!1:ie&&ie._writableState instanceof b}})):A=function(ie){return ie instanceof this};function g(W){w=w||cm();var ie=this instanceof w;if(!ie&&!A.call(g,this))return new g(W);this._writableState=new b(W,this,ie),this.writable=!0,W&&(typeof W.write=="function"&&(this._write=W.write),typeof W.writev=="function"&&(this._writev=W.writev),typeof W.destroy=="function"&&(this._destroy=W.destroy),typeof W.final=="function"&&(this._final=W.final)),P.call(this)}g.prototype.pipe=function(){M(this,new m)};function f(W,ie){var se=new _;M(W,se),process.nextTick(ie,se)}function p(W,ie,se,ee){var pe;return se===null?pe=new c:typeof se!="string"&&!ie.objectMode&&(pe=new d("chunk",["string","Buffer"],se)),pe?(M(W,pe),process.nextTick(ee,pe),!1):!0}g.prototype.write=function(W,ie,se){var ee=this._writableState,pe=!1,oe=!ee.objectMode&&l(W);return oe&&!t.isBuffer(W)&&(W=a(W)),typeof ie=="function"&&(se=ie,ie=null),oe?ie="buffer":ie||(ie=ee.defaultEncoding),typeof se!="function"&&(se=k),ee.ending?f(this,se):(oe||p(this,ee,W,se))&&(ee.pendingcb++,pe=N(this,ee,oe,W,ie,se)),pe},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var W=this._writableState;W.corked&&(W.corked--,!W.writing&&!W.corked&&!W.bufferProcessing&&W.bufferedRequest&&H(this,W))},g.prototype.setDefaultEncoding=function(ie){if(typeof ie=="string"&&(ie=ie.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((ie+"").toLowerCase())>-1))throw new T(ie);return this._writableState.defaultEncoding=ie,this},Object.defineProperty(g.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(W,ie,se){return!W.objectMode&&W.decodeStrings!==!1&&typeof ie=="string"&&(ie=t.from(ie,se)),ie}Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(W,ie,se,ee,pe,oe){if(!se){var Y=x(ie,ee,pe);ee!==Y&&(se=!0,pe="buffer",ee=Y)}var ce=ie.objectMode?1:ee.length;ie.length+=ce;var ue=ie.length<ie.highWaterMark;if(ue||(ie.needDrain=!0),ie.writing||ie.corked){var _e=ie.lastBufferedRequest;ie.lastBufferedRequest={chunk:ee,encoding:pe,isBuf:se,callback:oe,next:null},_e?_e.next=ie.lastBufferedRequest:ie.bufferedRequest=ie.lastBufferedRequest,ie.bufferedRequestCount+=1}else D(W,ie,!1,ce,ee,pe,oe);return ue}function D(W,ie,se,ee,pe,oe,Y){ie.writelen=ee,ie.writecb=Y,ie.writing=!0,ie.sync=!0,ie.destroyed?ie.onwrite(new E("write")):se?W._writev(pe,ie.onwrite):W._write(pe,oe,ie.onwrite),ie.sync=!1}function B(W,ie,se,ee,pe){--ie.pendingcb,se?(process.nextTick(pe,ee),process.nextTick(ye,W,ie),W._writableState.errorEmitted=!0,M(W,ee)):(pe(ee),W._writableState.errorEmitted=!0,M(W,ee),ye(W,ie))}function U(W){W.writing=!1,W.writecb=null,W.length-=W.writelen,W.writelen=0}function V(W,ie){var se=W._writableState,ee=se.sync,pe=se.writecb;if(typeof pe!="function")throw new y;if(U(se),ie)B(W,se,ee,ie,pe);else{var oe=G(se)||W.destroyed;!oe&&!se.corked&&!se.bufferProcessing&&se.bufferedRequest&&H(W,se),ee?process.nextTick(q,W,se,oe,pe):q(W,se,oe,pe)}}function q(W,ie,se,ee){se||z(W,ie),ie.pendingcb--,ee(),ye(W,ie)}function z(W,ie){ie.length===0&&ie.needDrain&&(ie.needDrain=!1,W.emit("drain"))}function H(W,ie){ie.bufferProcessing=!0;var se=ie.bufferedRequest;if(W._writev&&se&&se.next){var ee=ie.bufferedRequestCount,pe=new Array(ee),oe=ie.corkedRequestsFree;oe.entry=se;for(var Y=0,ce=!0;se;)pe[Y]=se,se.isBuf||(ce=!1),se=se.next,Y+=1;pe.allBuffers=ce,D(W,ie,!0,ie.length,pe,"",oe.finish),ie.pendingcb++,ie.lastBufferedRequest=null,oe.next?(ie.corkedRequestsFree=oe.next,oe.next=null):ie.corkedRequestsFree=new v(ie),ie.bufferedRequestCount=0}else{for(;se;){var ue=se.chunk,_e=se.encoding,Le=se.callback,ze=ie.objectMode?1:ue.length;if(D(W,ie,!1,ze,ue,_e,Le),se=se.next,ie.bufferedRequestCount--,ie.writing)break}se===null&&(ie.lastBufferedRequest=null)}ie.bufferedRequest=se,ie.bufferProcessing=!1}g.prototype._write=function(W,ie,se){se(new h("_write()"))},g.prototype._writev=null,g.prototype.end=function(W,ie,se){var ee=this._writableState;return typeof W=="function"?(se=W,W=null,ie=null):typeof ie=="function"&&(se=ie,ie=null),W!=null&&this.write(W,ie),ee.corked&&(ee.corked=1,this.uncork()),ee.ending||de(this,ee,se),this},Object.defineProperty(g.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function G(W){return W.ending&&W.length===0&&W.bufferedRequest===null&&!W.finished&&!W.writing}function J(W,ie){W._final(function(se){ie.pendingcb--,se&&M(W,se),ie.prefinished=!0,W.emit("prefinish"),ye(W,ie)})}function le(W,ie){!ie.prefinished&&!ie.finalCalled&&(typeof W._final=="function"&&!ie.destroyed?(ie.pendingcb++,ie.finalCalled=!0,process.nextTick(J,W,ie)):(ie.prefinished=!0,W.emit("prefinish")))}function ye(W,ie){var se=G(ie);if(se&&(le(W,ie),ie.pendingcb===0&&(ie.finished=!0,W.emit("finish"),ie.autoDestroy))){var ee=W._readableState;(!ee||ee.autoDestroy&&ee.endEmitted)&&W.destroy()}return se}function de(W,ie,se){ie.ending=!0,ye(W,ie),se&&(ie.finished?process.nextTick(se):W.once("finish",se)),ie.ended=!0,W.writable=!1}function me(W,ie,se){var ee=W.entry;for(W.entry=null;ee;){var pe=ee.callback;ie.pendingcb--,pe(se),ee=ee.next}ie.corkedRequestsFree.next=W}Object.defineProperty(g.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(ie){this._writableState&&(this._writableState.destroyed=ie)}}),g.prototype.destroy=i.destroy,g.prototype._undestroy=i.undestroy,g.prototype._destroy=function(W,ie){ie(W)}}}),cm=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(te,Z){var v=Object.keys||function(s){var o=[];for(var u in s)o.push(u);return o};Z.exports=a;var w=I2(),C=J0();for(um()(a,w),P=v(C.prototype),r=0;r<P.length;r++)t=P[r],a.prototype[t]||(a.prototype[t]=C.prototype[t]);var P,t,r;function a(s){if(!(this instanceof a))return new a(s);w.call(this,s),C.call(this,s),this.allowHalfOpen=!0,s&&(s.readable===!1&&(this.readable=!1),s.writable===!1&&(this.writable=!1),s.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",l)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function l(){this._writableState.ended||process.nextTick(i,this)}function i(s){s.end()}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(o){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=o,this._writableState.destroyed=o)}})}}),mS=Ne({"node_modules/safe-buffer/index.js"(te,Z){var v=Ug(),w=v.Buffer;function C(t,r){for(var a in t)r[a]=t[a]}w.from&&w.alloc&&w.allocUnsafe&&w.allocUnsafeSlow?Z.exports=v:(C(v,te),te.Buffer=P);function P(t,r,a){return w(t,r,a)}P.prototype=Object.create(w.prototype),C(w,P),P.from=function(t,r,a){if(typeof t=="number")throw new TypeError("Argument must not be a number");return w(t,r,a)},P.alloc=function(t,r,a){if(typeof t!="number")throw new TypeError("Argument must be a number");var l=w(t);return r!==void 0?typeof a=="string"?l.fill(r,a):l.fill(r):l.fill(0),l},P.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return w(t)},P.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return v.SlowBuffer(t)}}}),yp=Ne({"node_modules/stream-browserify/node_modules/string_decoder/lib/string_decoder.js"(te){var Z=mS().Buffer,v=Z.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 w(E){if(!E)return"utf8";for(var c;;)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(c)return;E=(""+E).toLowerCase(),c=!0}}function C(E){var c=w(E);if(typeof c!="string"&&(Z.isEncoding===v||!v(E)))throw new Error("Unknown encoding: "+E);return c||E}te.StringDecoder=P;function P(E){this.encoding=C(E);var c;switch(this.encoding){case"utf16le":this.text=o,this.end=u,c=4;break;case"utf8":this.fillLast=l,c=4;break;case"base64":this.text=d,this.end=h,c=3;break;default:this.write=y,this.end=m;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Z.allocUnsafe(c)}P.prototype.write=function(E){if(E.length===0)return"";var c,_;if(this.lastNeed){if(c=this.fillLast(E),c===void 0)return"";_=this.lastNeed,this.lastNeed=0}else _=0;return _<E.length?c?c+this.text(E,_):this.text(E,_):c||""},P.prototype.end=s,P.prototype.text=i,P.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function t(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function r(E,c,_){var T=c.length-1;if(T<_)return 0;var M=t(c[T]);return M>=0?(M>0&&(E.lastNeed=M-1),M):--T<_||M===-2?0:(M=t(c[T]),M>=0?(M>0&&(E.lastNeed=M-2),M):--T<_||M===-2?0:(M=t(c[T]),M>=0?(M>0&&(M===2?M=0:E.lastNeed=M-3),M):0))}function a(E,c,_){if((c[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&c.length>1){if((c[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&c.length>2&&(c[2]&192)!==128)return E.lastNeed=2,"�"}}function l(E){var c=this.lastTotal-this.lastNeed,_=a(this,E);if(_!==void 0)return _;if(this.lastNeed<=E.length)return E.copy(this.lastChar,c,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,c,0,E.length),this.lastNeed-=E.length}function i(E,c){var _=r(this,E,c);if(!this.lastNeed)return E.toString("utf8",c);this.lastTotal=_;var T=E.length-(_-this.lastNeed);return E.copy(this.lastChar,0,T),E.toString("utf8",c,T)}function s(E){var c=E&&E.length?this.write(E):"";return this.lastNeed?c+"�":c}function o(E,c){if((E.length-c)%2===0){var _=E.toString("utf16le",c);if(_){var T=_.charCodeAt(_.length-1);if(T>=55296&&T<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],_.slice(0,-1)}return _}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",c,E.length-1)}function u(E){var c=E&&E.length?this.write(E):"";if(this.lastNeed){var _=this.lastTotal-this.lastNeed;return c+this.lastChar.toString("utf16le",0,_)}return c}function d(E,c){var _=(E.length-c)%3;return _===0?E.toString("base64",c):(this.lastNeed=3-_,this.lastTotal=3,_===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",c,E.length-_))}function h(E){var c=E&&E.length?this.write(E):"";return this.lastNeed?c+this.lastChar.toString("base64",0,3-this.lastNeed):c}function y(E){return E.toString(this.encoding)}function m(E){return E&&E.length?this.write(E):""}}}),qy=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(te,Z){var v=Uy().codes.ERR_STREAM_PREMATURE_CLOSE;function w(r){var a=!1;return function(){if(!a){a=!0;for(var l=arguments.length,i=new Array(l),s=0;s<l;s++)i[s]=arguments[s];r.apply(this,i)}}}function C(){}function P(r){return r.setHeader&&typeof r.abort=="function"}function t(r,a,l){if(typeof a=="function")return t(r,null,a);a||(a={}),l=w(l||C);var i=a.readable||a.readable!==!1&&r.readable,s=a.writable||a.writable!==!1&&r.writable,o=function(){r.writable||d()},u=r._writableState&&r._writableState.finished,d=function(){s=!1,u=!0,i||l.call(r)},h=r._readableState&&r._readableState.endEmitted,y=function(){i=!1,h=!0,s||l.call(r)},m=function(T){l.call(r,T)},E=function(){var T;if(i&&!h)return(!r._readableState||!r._readableState.ended)&&(T=new v),l.call(r,T);if(s&&!u)return(!r._writableState||!r._writableState.ended)&&(T=new v),l.call(r,T)},c=function(){r.req.on("finish",d)};return P(r)?(r.on("complete",d),r.on("abort",E),r.req?c():r.on("request",c)):s&&!r._writableState&&(r.on("end",o),r.on("close",o)),r.on("end",y),r.on("finish",d),a.error!==!1&&r.on("error",m),r.on("close",E),function(){r.removeListener("complete",d),r.removeListener("abort",E),r.removeListener("request",c),r.req&&r.req.removeListener("finish",d),r.removeListener("end",o),r.removeListener("close",o),r.removeListener("finish",d),r.removeListener("end",y),r.removeListener("error",m),r.removeListener("close",E)}}Z.exports=t}}),rb=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(te,Z){var v;function w(c,_,T){return _ in c?Object.defineProperty(c,_,{value:T,enumerable:!0,configurable:!0,writable:!0}):c[_]=T,c}var C=qy(),P=Symbol("lastResolve"),t=Symbol("lastReject"),r=Symbol("error"),a=Symbol("ended"),l=Symbol("lastPromise"),i=Symbol("handlePromise"),s=Symbol("stream");function o(c,_){return{value:c,done:_}}function u(c){var _=c[P];if(_!==null){var T=c[s].read();T!==null&&(c[l]=null,c[P]=null,c[t]=null,_(o(T,!1)))}}function d(c){process.nextTick(u,c)}function h(c,_){return function(T,M){c.then(function(){if(_[a]){T(o(void 0,!0));return}_[i](T,M)},M)}}var y=Object.getPrototypeOf(function(){}),m=Object.setPrototypeOf((v={get stream(){return this[s]},next:function(){var _=this,T=this[r];if(T!==null)return Promise.reject(T);if(this[a])return Promise.resolve(o(void 0,!0));if(this[s].destroyed)return new Promise(function(A,g){process.nextTick(function(){_[r]?g(_[r]):A(o(void 0,!0))})});var M=this[l],k;if(M)k=new Promise(h(M,this));else{var b=this[s].read();if(b!==null)return Promise.resolve(o(b,!1));k=new Promise(this[i])}return this[l]=k,k}},w(v,Symbol.asyncIterator,function(){return this}),w(v,"return",function(){var _=this;return new Promise(function(T,M){_[s].destroy(null,function(k){if(k){M(k);return}T(o(void 0,!0))})})}),v),y),E=function(_){var T,M=Object.create(m,(T={},w(T,s,{value:_,writable:!0}),w(T,P,{value:null,writable:!0}),w(T,t,{value:null,writable:!0}),w(T,r,{value:null,writable:!0}),w(T,a,{value:_._readableState.endEmitted,writable:!0}),w(T,i,{value:function(b,A){var g=M[s].read();g?(M[l]=null,M[P]=null,M[t]=null,b(o(g,!1))):(M[P]=b,M[t]=A)},writable:!0}),T));return M[l]=null,C(_,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var b=M[t];b!==null&&(M[l]=null,M[P]=null,M[t]=null,b(k)),M[r]=k;return}var A=M[P];A!==null&&(M[l]=null,M[P]=null,M[t]=null,A(o(void 0,!0))),M[a]=!0}),_.on("readable",d.bind(null,M)),M};Z.exports=E}}),gp=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/from-browser.js"(te,Z){Z.exports=function(){throw new Error("Readable.from is not available in the browser")}}}),I2=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_readable.js"(te,Z){Z.exports=f;var v;f.ReadableState=g,F0().EventEmitter;var w=function(Y,ce){return Y.listeners(ce).length},C=Fm(),P=Ug().Buffer,t=window.Uint8Array||function(){};function r(oe){return P.from(oe)}function a(oe){return P.isBuffer(oe)||oe instanceof t}var l=mp(),i;l&&l.debuglog?i=l.debuglog("stream"):i=function(){};var s=jy(),o=Vg(),u=f0(),d=u.getHighWaterMark,h=Uy().codes,y=h.ERR_INVALID_ARG_TYPE,m=h.ERR_STREAM_PUSH_AFTER_EOF,E=h.ERR_METHOD_NOT_IMPLEMENTED,c=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_,T,M;um()(f,C);var k=o.errorOrDestroy,b=["error","close","destroy","pause","resume"];function A(oe,Y,ce){if(typeof oe.prependListener=="function")return oe.prependListener(Y,ce);!oe._events||!oe._events[Y]?oe.on(Y,ce):Array.isArray(oe._events[Y])?oe._events[Y].unshift(ce):oe._events[Y]=[ce,oe._events[Y]]}function g(oe,Y,ce){v=v||cm(),oe=oe||{},typeof ce!="boolean"&&(ce=Y instanceof v),this.objectMode=!!oe.objectMode,ce&&(this.objectMode=this.objectMode||!!oe.readableObjectMode),this.highWaterMark=d(this,oe,"readableHighWaterMark",ce),this.buffer=new s,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=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,oe.encoding&&(_||(_=yp().StringDecoder),this.decoder=new _(oe.encoding),this.encoding=oe.encoding)}function f(oe){if(v=v||cm(),!(this instanceof f))return new f(oe);var Y=this instanceof v;this._readableState=new g(oe,this,Y),this.readable=!0,oe&&(typeof oe.read=="function"&&(this._read=oe.read),typeof oe.destroy=="function"&&(this._destroy=oe.destroy)),C.call(this)}Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(Y){this._readableState&&(this._readableState.destroyed=Y)}}),f.prototype.destroy=o.destroy,f.prototype._undestroy=o.undestroy,f.prototype._destroy=function(oe,Y){Y(oe)},f.prototype.push=function(oe,Y){var ce=this._readableState,ue;return ce.objectMode?ue=!0:typeof oe=="string"&&(Y=Y||ce.defaultEncoding,Y!==ce.encoding&&(oe=P.from(oe,Y),Y=""),ue=!0),p(this,oe,Y,!1,ue)},f.prototype.unshift=function(oe){return p(this,oe,null,!0,!1)};function p(oe,Y,ce,ue,_e){i("readableAddChunk",Y);var Le=oe._readableState;if(Y===null)Le.reading=!1,V(oe,Le);else{var ze;if(_e||(ze=N(Le,Y)),ze)k(oe,ze);else if(Le.objectMode||Y&&Y.length>0)if(typeof Y!="string"&&!Le.objectMode&&Object.getPrototypeOf(Y)!==P.prototype&&(Y=r(Y)),ue)Le.endEmitted?k(oe,new c):x(oe,Le,Y,!0);else if(Le.ended)k(oe,new m);else{if(Le.destroyed)return!1;Le.reading=!1,Le.decoder&&!ce?(Y=Le.decoder.write(Y),Le.objectMode||Y.length!==0?x(oe,Le,Y,!1):H(oe,Le)):x(oe,Le,Y,!1)}else ue||(Le.reading=!1,H(oe,Le))}return!Le.ended&&(Le.length<Le.highWaterMark||Le.length===0)}function x(oe,Y,ce,ue){Y.flowing&&Y.length===0&&!Y.sync?(Y.awaitDrain=0,oe.emit("data",ce)):(Y.length+=Y.objectMode?1:ce.length,ue?Y.buffer.unshift(ce):Y.buffer.push(ce),Y.needReadable&&q(oe)),H(oe,Y)}function N(oe,Y){var ce;return!a(Y)&&typeof Y!="string"&&Y!==void 0&&!oe.objectMode&&(ce=new y("chunk",["string","Buffer","Uint8Array"],Y)),ce}f.prototype.isPaused=function(){return this._readableState.flowing===!1},f.prototype.setEncoding=function(oe){_||(_=yp().StringDecoder);var Y=new _(oe);this._readableState.decoder=Y,this._readableState.encoding=this._readableState.decoder.encoding;for(var ce=this._readableState.buffer.head,ue="";ce!==null;)ue+=Y.write(ce.data),ce=ce.next;return this._readableState.buffer.clear(),ue!==""&&this._readableState.buffer.push(ue),this._readableState.length=ue.length,this};var D=1073741824;function B(oe){return oe>=D?oe=D:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function U(oe,Y){return oe<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:oe!==oe?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(oe>Y.highWaterMark&&(Y.highWaterMark=B(oe)),oe<=Y.length?oe:Y.ended?Y.length:(Y.needReadable=!0,0))}f.prototype.read=function(oe){i("read",oe),oe=parseInt(oe,10);var Y=this._readableState,ce=oe;if(oe!==0&&(Y.emittedReadable=!1),oe===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return i("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?se(this):q(this),null;if(oe=U(oe,Y),oe===0&&Y.ended)return Y.length===0&&se(this),null;var ue=Y.needReadable;i("need readable",ue),(Y.length===0||Y.length-oe<Y.highWaterMark)&&(ue=!0,i("length less than watermark",ue)),Y.ended||Y.reading?(ue=!1,i("reading or ended",ue)):ue&&(i("do read"),Y.reading=!0,Y.sync=!0,Y.length===0&&(Y.needReadable=!0),this._read(Y.highWaterMark),Y.sync=!1,Y.reading||(oe=U(ce,Y)));var _e;return oe>0?_e=ie(oe,Y):_e=null,_e===null?(Y.needReadable=Y.length<=Y.highWaterMark,oe=0):(Y.length-=oe,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ce!==oe&&Y.ended&&se(this)),_e!==null&&this.emit("data",_e),_e};function V(oe,Y){if(i("onEofChunk"),!Y.ended){if(Y.decoder){var ce=Y.decoder.end();ce&&ce.length&&(Y.buffer.push(ce),Y.length+=Y.objectMode?1:ce.length)}Y.ended=!0,Y.sync?q(oe):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,z(oe)))}}function q(oe){var Y=oe._readableState;i("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(i("emitReadable",Y.flowing),Y.emittedReadable=!0,process.nextTick(z,oe))}function z(oe){var Y=oe._readableState;i("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(oe.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,W(oe)}function H(oe,Y){Y.readingMore||(Y.readingMore=!0,process.nextTick(G,oe,Y))}function G(oe,Y){for(;!Y.reading&&!Y.ended&&(Y.length<Y.highWaterMark||Y.flowing&&Y.length===0);){var ce=Y.length;if(i("maybeReadMore read 0"),oe.read(0),ce===Y.length)break}Y.readingMore=!1}f.prototype._read=function(oe){k(this,new E("_read()"))},f.prototype.pipe=function(oe,Y){var ce=this,ue=this._readableState;switch(ue.pipesCount){case 0:ue.pipes=oe;break;case 1:ue.pipes=[ue.pipes,oe];break;default:ue.pipes.push(oe);break}ue.pipesCount+=1,i("pipe count=%d opts=%j",ue.pipesCount,Y);var _e=(!Y||Y.end!==!1)&&oe!==process.stdout&&oe!==process.stderr,Le=_e?Ge:Pe;ue.endEmitted?process.nextTick(Le):ce.once("end",Le),oe.on("unpipe",ze);function ze(be,Ye){i("onunpipe"),be===ce&&Ye&&Ye.hasUnpiped===!1&&(Ye.hasUnpiped=!0,pt())}function Ge(){i("onend"),oe.end()}var Ve=J(ce);oe.on("drain",Ve);var rt=!1;function pt(){i("cleanup"),oe.removeListener("close",lt),oe.removeListener("finish",Fe),oe.removeListener("drain",Ve),oe.removeListener("error",ht),oe.removeListener("unpipe",ze),ce.removeListener("end",Ge),ce.removeListener("end",Pe),ce.removeListener("data",gt),rt=!0,ue.awaitDrain&&(!oe._writableState||oe._writableState.needDrain)&&Ve()}ce.on("data",gt);function gt(be){i("ondata");var Ye=oe.write(be);i("dest.write",Ye),Ye===!1&&((ue.pipesCount===1&&ue.pipes===oe||ue.pipesCount>1&&pe(ue.pipes,oe)!==-1)&&!rt&&(i("false write response, pause",ue.awaitDrain),ue.awaitDrain++),ce.pause())}function ht(be){i("onerror",be),Pe(),oe.removeListener("error",ht),w(oe,"error")===0&&k(oe,be)}A(oe,"error",ht);function lt(){oe.removeListener("finish",Fe),Pe()}oe.once("close",lt);function Fe(){i("onfinish"),oe.removeListener("close",lt),Pe()}oe.once("finish",Fe);function Pe(){i("unpipe"),ce.unpipe(oe)}return oe.emit("pipe",ce),ue.flowing||(i("pipe resume"),ce.resume()),oe};function J(oe){return function(){var ce=oe._readableState;i("pipeOnDrain",ce.awaitDrain),ce.awaitDrain&&ce.awaitDrain--,ce.awaitDrain===0&&w(oe,"data")&&(ce.flowing=!0,W(oe))}}f.prototype.unpipe=function(oe){var Y=this._readableState,ce={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return oe&&oe!==Y.pipes?this:(oe||(oe=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,oe&&oe.emit("unpipe",this,ce),this);if(!oe){var ue=Y.pipes,_e=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var Le=0;Le<_e;Le++)ue[Le].emit("unpipe",this,{hasUnpiped:!1});return this}var ze=pe(Y.pipes,oe);return ze===-1?this:(Y.pipes.splice(ze,1),Y.pipesCount-=1,Y.pipesCount===1&&(Y.pipes=Y.pipes[0]),oe.emit("unpipe",this,ce),this)},f.prototype.on=function(oe,Y){var ce=C.prototype.on.call(this,oe,Y),ue=this._readableState;return oe==="data"?(ue.readableListening=this.listenerCount("readable")>0,ue.flowing!==!1&&this.resume()):oe==="readable"&&!ue.endEmitted&&!ue.readableListening&&(ue.readableListening=ue.needReadable=!0,ue.flowing=!1,ue.emittedReadable=!1,i("on readable",ue.length,ue.reading),ue.length?q(this):ue.reading||process.nextTick(ye,this)),ce},f.prototype.addListener=f.prototype.on,f.prototype.removeListener=function(oe,Y){var ce=C.prototype.removeListener.call(this,oe,Y);return oe==="readable"&&process.nextTick(le,this),ce},f.prototype.removeAllListeners=function(oe){var Y=C.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&process.nextTick(le,this),Y};function le(oe){var Y=oe._readableState;Y.readableListening=oe.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function ye(oe){i("readable nexttick read 0"),oe.read(0)}f.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(i("resume"),oe.flowing=!oe.readableListening,de(this,oe)),oe.paused=!1,this};function de(oe,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,process.nextTick(me,oe,Y))}function me(oe,Y){i("resume",Y.reading),Y.reading||oe.read(0),Y.resumeScheduled=!1,oe.emit("resume"),W(oe),Y.flowing&&!Y.reading&&oe.read(0)}f.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function W(oe){var Y=oe._readableState;for(i("flow",Y.flowing);Y.flowing&&oe.read()!==null;);}f.prototype.wrap=function(oe){var Y=this,ce=this._readableState,ue=!1;oe.on("end",function(){if(i("wrapped end"),ce.decoder&&!ce.ended){var ze=ce.decoder.end();ze&&ze.length&&Y.push(ze)}Y.push(null)}),oe.on("data",function(ze){if(i("wrapped data"),ce.decoder&&(ze=ce.decoder.write(ze)),!(ce.objectMode&&ze==null)&&!(!ce.objectMode&&(!ze||!ze.length))){var Ge=Y.push(ze);Ge||(ue=!0,oe.pause())}});for(var _e in oe)this[_e]===void 0&&typeof oe[_e]=="function"&&(this[_e]=(function(Ge){return function(){return oe[Ge].apply(oe,arguments)}})(_e));for(var Le=0;Le<b.length;Le++)oe.on(b[Le],this.emit.bind(this,b[Le]));return this._read=function(ze){i("wrapped _read",ze),ue&&(ue=!1,oe.resume())},this},typeof Symbol=="function"&&(f.prototype[Symbol.asyncIterator]=function(){return T===void 0&&(T=rb()),T(this)}),Object.defineProperty(f.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(f.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(f.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(Y){this._readableState&&(this._readableState.flowing=Y)}}),f._fromList=ie,Object.defineProperty(f.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ie(oe,Y){if(Y.length===0)return null;var ce;return Y.objectMode?ce=Y.buffer.shift():!oe||oe>=Y.length?(Y.decoder?ce=Y.buffer.join(""):Y.buffer.length===1?ce=Y.buffer.first():ce=Y.buffer.concat(Y.length),Y.buffer.clear()):ce=Y.buffer.consume(oe,Y.decoder),ce}function se(oe){var Y=oe._readableState;i("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,process.nextTick(ee,Y,oe))}function ee(oe,Y){if(i("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,Y.readable=!1,Y.emit("end"),oe.autoDestroy)){var ce=Y._writableState;(!ce||ce.autoDestroy&&ce.finished)&&Y.destroy()}}typeof Symbol=="function"&&(f.from=function(oe,Y){return M===void 0&&(M=gp()),M(f,oe,Y)});function pe(oe,Y){for(var ce=0,ue=oe.length;ce<ue;ce++)if(oe[ce]===Y)return ce;return-1}}}),nb=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(te,Z){Z.exports=l;var v=Uy().codes,w=v.ERR_METHOD_NOT_IMPLEMENTED,C=v.ERR_MULTIPLE_CALLBACK,P=v.ERR_TRANSFORM_ALREADY_TRANSFORMING,t=v.ERR_TRANSFORM_WITH_LENGTH_0,r=cm();um()(l,r);function a(o,u){var d=this._transformState;d.transforming=!1;var h=d.writecb;if(h===null)return this.emit("error",new C);d.writechunk=null,d.writecb=null,u!=null&&this.push(u),h(o);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function l(o){if(!(this instanceof l))return new l(o);r.call(this,o),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",i)}function i(){var o=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(u,d){s(o,u,d)}):s(this,null,null)}l.prototype.push=function(o,u){return this._transformState.needTransform=!1,r.prototype.push.call(this,o,u)},l.prototype._transform=function(o,u,d){d(new w("_transform()"))},l.prototype._write=function(o,u,d){var h=this._transformState;if(h.writecb=d,h.writechunk=o,h.writeencoding=u,!h.transforming){var y=this._readableState;(h.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},l.prototype._read=function(o){var u=this._transformState;u.writechunk!==null&&!u.transforming?(u.transforming=!0,this._transform(u.writechunk,u.writeencoding,u.afterTransform)):u.needTransform=!0},l.prototype._destroy=function(o,u){r.prototype._destroy.call(this,o,function(d){u(d)})};function s(o,u,d){if(u)return o.emit("error",u);if(d!=null&&o.push(d),o._writableState.length)throw new t;if(o._transformState.transforming)throw new P;return o.push(null)}}}),SC=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_passthrough.js"(te,Z){Z.exports=w;var v=nb();um()(w,v);function w(C){if(!(this instanceof w))return new w(C);v.call(this,C)}w.prototype._transform=function(C,P,t){t(null,C)}}}),D2=Ne({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/pipeline.js"(te,Z){var v;function w(d){var h=!1;return function(){h||(h=!0,d.apply(void 0,arguments))}}var C=Uy().codes,P=C.ERR_MISSING_ARGS,t=C.ERR_STREAM_DESTROYED;function r(d){if(d)throw d}function a(d){return d.setHeader&&typeof d.abort=="function"}function l(d,h,y,m){m=w(m);var E=!1;d.on("close",function(){E=!0}),v===void 0&&(v=qy()),v(d,{readable:h,writable:y},function(_){if(_)return m(_);E=!0,m()});var c=!1;return function(_){if(!E&&!c){if(c=!0,a(d))return d.abort();if(typeof d.destroy=="function")return d.destroy();m(_||new t("pipe"))}}}function i(d){d()}function s(d,h){return d.pipe(h)}function o(d){return!d.length||typeof d[d.length-1]!="function"?r:d.pop()}function u(){for(var d=arguments.length,h=new Array(d),y=0;y<d;y++)h[y]=arguments[y];var m=o(h);if(Array.isArray(h[0])&&(h=h[0]),h.length<2)throw new P("streams");var E,c=h.map(function(_,T){var M=T<h.length-1,k=T>0;return l(_,M,k,function(b){E||(E=b),b&&c.forEach(i),!M&&(c.forEach(i),m(E))})});return h.reduce(s)}Z.exports=u}}),O2=Ne({"node_modules/stream-browserify/index.js"(te,Z){Z.exports=C;var v=F0().EventEmitter,w=um();w(C,v),C.Readable=I2(),C.Writable=J0(),C.Duplex=cm(),C.Transform=nb(),C.PassThrough=SC(),C.finished=qy(),C.pipeline=D2(),C.Stream=C;function C(){v.call(this)}C.prototype.pipe=function(P,t){var r=this;function a(h){P.writable&&P.write(h)===!1&&r.pause&&r.pause()}r.on("data",a);function l(){r.readable&&r.resume&&r.resume()}P.on("drain",l),!P._isStdio&&(!t||t.end!==!1)&&(r.on("end",s),r.on("close",o));var i=!1;function s(){i||(i=!0,P.end())}function o(){i||(i=!0,typeof P.destroy=="function"&&P.destroy())}function u(h){if(d(),v.listenerCount(this,"error")===0)throw h}r.on("error",u),P.on("error",u);function d(){r.removeListener("data",a),P.removeListener("drain",l),r.removeListener("end",s),r.removeListener("close",o),r.removeListener("error",u),P.removeListener("error",u),r.removeListener("end",d),r.removeListener("close",d),P.removeListener("close",d)}return r.on("end",d),r.on("close",d),P.on("close",d),P.emit("pipe",r),P}}}),fm=Ne({"node_modules/util/util.js"(te){var Z=Object.getOwnPropertyDescriptors||function(J){for(var le=Object.keys(J),ye={},de=0;de<le.length;de++)ye[le[de]]=Object.getOwnPropertyDescriptor(J,le[de]);return ye},v=/%[sdj%]/g;te.format=function(G){if(!T(G)){for(var J=[],le=0;le<arguments.length;le++)J.push(t(arguments[le]));return J.join(" ")}for(var le=1,ye=arguments,de=ye.length,me=String(G).replace(v,function(ie){if(ie==="%%")return"%";if(le>=de)return ie;switch(ie){case"%s":return String(ye[le++]);case"%d":return Number(ye[le++]);case"%j":try{return JSON.stringify(ye[le++])}catch{return"[Circular]"}default:return ie}}),W=ye[le];le<de;W=ye[++le])E(W)||!A(W)?me+=" "+W:me+=" "+t(W);return me},te.deprecate=function(G,J){if(typeof process<"u"&&process.noDeprecation===!0)return G;if(typeof process>"u")return function(){return te.deprecate(G,J).apply(this,arguments)};var le=!1;function ye(){if(!le){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),le=!0}return G.apply(this,arguments)}return ye};var w={},C=/^$/;P="false",P=P.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),C=new RegExp("^"+P+"$","i");var P;te.debuglog=function(G){if(G=G.toUpperCase(),!w[G])if(C.test(G)){var J=process.pid;w[G]=function(){var le=te.format.apply(te,arguments);console.error("%s %d: %s",G,J,le)}}else w[G]=function(){};return w[G]};function t(G,J){var le={seen:[],stylize:a};return arguments.length>=3&&(le.depth=arguments[2]),arguments.length>=4&&(le.colors=arguments[3]),m(J)?le.showHidden=J:J&&te._extend(le,J),k(le.showHidden)&&(le.showHidden=!1),k(le.depth)&&(le.depth=2),k(le.colors)&&(le.colors=!1),k(le.customInspect)&&(le.customInspect=!0),le.colors&&(le.stylize=r),i(le,G,le.depth)}te.inspect=t,t.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]},t.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(G,J){var le=t.styles[J];return le?"\x1B["+t.colors[le][0]+"m"+G+"\x1B["+t.colors[le][1]+"m":G}function a(G,J){return G}function l(G){var J={};return G.forEach(function(le,ye){J[le]=!0}),J}function i(G,J,le){if(G.customInspect&&J&&p(J.inspect)&&J.inspect!==te.inspect&&!(J.constructor&&J.constructor.prototype===J)){var ye=J.inspect(le,G);return T(ye)||(ye=i(G,ye,le)),ye}var de=s(G,J);if(de)return de;var me=Object.keys(J),W=l(me);if(G.showHidden&&(me=Object.getOwnPropertyNames(J)),f(J)&&(me.indexOf("message")>=0||me.indexOf("description")>=0))return o(J);if(me.length===0){if(p(J)){var ie=J.name?": "+J.name:"";return G.stylize("[Function"+ie+"]","special")}if(b(J))return G.stylize(RegExp.prototype.toString.call(J),"regexp");if(g(J))return G.stylize(Date.prototype.toString.call(J),"date");if(f(J))return o(J)}var se="",ee=!1,pe=["{","}"];if(y(J)&&(ee=!0,pe=["[","]"]),p(J)){var oe=J.name?": "+J.name:"";se=" [Function"+oe+"]"}if(b(J)&&(se=" "+RegExp.prototype.toString.call(J)),g(J)&&(se=" "+Date.prototype.toUTCString.call(J)),f(J)&&(se=" "+o(J)),me.length===0&&(!ee||J.length==0))return pe[0]+se+pe[1];if(le<0)return b(J)?G.stylize(RegExp.prototype.toString.call(J),"regexp"):G.stylize("[Object]","special");G.seen.push(J);var Y;return ee?Y=u(G,J,le,W,me):Y=me.map(function(ce){return d(G,J,le,W,ce,ee)}),G.seen.pop(),h(Y,se,pe)}function s(G,J){if(k(J))return G.stylize("undefined","undefined");if(T(J)){var le="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return G.stylize(le,"string")}if(_(J))return G.stylize(""+J,"number");if(m(J))return G.stylize(""+J,"boolean");if(E(J))return G.stylize("null","null")}function o(G){return"["+Error.prototype.toString.call(G)+"]"}function u(G,J,le,ye,de){for(var me=[],W=0,ie=J.length;W<ie;++W)V(J,String(W))?me.push(d(G,J,le,ye,String(W),!0)):me.push("");return de.forEach(function(se){se.match(/^\d+$/)||me.push(d(G,J,le,ye,se,!0))}),me}function d(G,J,le,ye,de,me){var W,ie,se;if(se=Object.getOwnPropertyDescriptor(J,de)||{value:J[de]},se.get?se.set?ie=G.stylize("[Getter/Setter]","special"):ie=G.stylize("[Getter]","special"):se.set&&(ie=G.stylize("[Setter]","special")),V(ye,de)||(W="["+de+"]"),ie||(G.seen.indexOf(se.value)<0?(E(le)?ie=i(G,se.value,null):ie=i(G,se.value,le-1),ie.indexOf(`
`)>-1&&(me?ie=ie.split(`
`).map(function(ee){return"  "+ee}).join(`
`).slice(2):ie=`
`+ie.split(`
`).map(function(ee){return"   "+ee}).join(`
`))):ie=G.stylize("[Circular]","special")),k(W)){if(me&&de.match(/^\d+$/))return ie;W=JSON.stringify(""+de),W.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(W=W.slice(1,-1),W=G.stylize(W,"name")):(W=W.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),W=G.stylize(W,"string"))}return W+": "+ie}function h(G,J,le){var ye=G.reduce(function(de,me){return me.indexOf(`
`)>=0,de+me.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ye>60?le[0]+(J===""?"":J+`
 `)+" "+G.join(`,
  `)+" "+le[1]:le[0]+J+" "+G.join(", ")+" "+le[1]}te.types=fc();function y(G){return Array.isArray(G)}te.isArray=y;function m(G){return typeof G=="boolean"}te.isBoolean=m;function E(G){return G===null}te.isNull=E;function c(G){return G==null}te.isNullOrUndefined=c;function _(G){return typeof G=="number"}te.isNumber=_;function T(G){return typeof G=="string"}te.isString=T;function M(G){return typeof G=="symbol"}te.isSymbol=M;function k(G){return G===void 0}te.isUndefined=k;function b(G){return A(G)&&N(G)==="[object RegExp]"}te.isRegExp=b,te.types.isRegExp=b;function A(G){return typeof G=="object"&&G!==null}te.isObject=A;function g(G){return A(G)&&N(G)==="[object Date]"}te.isDate=g,te.types.isDate=g;function f(G){return A(G)&&(N(G)==="[object Error]"||G instanceof Error)}te.isError=f,te.types.isNativeError=f;function p(G){return typeof G=="function"}te.isFunction=p;function x(G){return G===null||typeof G=="boolean"||typeof G=="number"||typeof G=="string"||typeof G=="symbol"||typeof G>"u"}te.isPrimitive=x,te.isBuffer=cf();function N(G){return Object.prototype.toString.call(G)}function D(G){return G<10?"0"+G.toString(10):G.toString(10)}var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function U(){var G=new Date,J=[D(G.getHours()),D(G.getMinutes()),D(G.getSeconds())].join(":");return[G.getDate(),B[G.getMonth()],J].join(" ")}te.log=function(){console.log("%s - %s",U(),te.format.apply(te,arguments))},te.inherits=um(),te._extend=function(G,J){if(!J||!A(J))return G;for(var le=Object.keys(J),ye=le.length;ye--;)G[le[ye]]=J[le[ye]];return G};function V(G,J){return Object.prototype.hasOwnProperty.call(G,J)}var q=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;te.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(q&&J[q]){var le=J[q];if(typeof le!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),le}function le(){for(var ye,de,me=new Promise(function(se,ee){ye=se,de=ee}),W=[],ie=0;ie<arguments.length;ie++)W.push(arguments[ie]);W.push(function(se,ee){se?de(se):ye(ee)});try{J.apply(this,W)}catch(se){de(se)}return me}return Object.setPrototypeOf(le,Object.getPrototypeOf(J)),q&&Object.defineProperty(le,q,{value:le,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(le,Z(J))},te.promisify.custom=q;function z(G,J){if(!G){var le=new Error("Promise was rejected with a falsy value");le.reason=G,G=le}return J(G)}function H(G){if(typeof G!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var le=[],ye=0;ye<arguments.length;ye++)le.push(arguments[ye]);var de=le.pop();if(typeof de!="function")throw new TypeError("The last argument must be of type Function");var me=this,W=function(){return de.apply(me,arguments)};G.apply(this,le).then(function(ie){process.nextTick(W.bind(null,null,ie))},function(ie){process.nextTick(z.bind(null,ie,W))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(G)),Object.defineProperties(J,Z(G)),J}te.callbackify=H}}),Ed=Ne({"node_modules/assert/build/internal/errors.js"(te,Z){function v(_){"@babel/helpers - typeof";return v=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},v(_)}function w(_,T,M){return Object.defineProperty(_,"prototype",{writable:!1}),_}function C(_,T){if(!(_ instanceof T))throw new TypeError("Cannot call a class as a function")}function P(_,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(T&&T.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),T&&t(_,T)}function t(_,T){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(k,b){return k.__proto__=b,k},t(_,T)}function r(_){var T=i();return function(){var k=s(_),b;if(T){var A=s(this).constructor;b=Reflect.construct(k,arguments,A)}else b=k.apply(this,arguments);return a(this,b)}}function a(_,T){if(T&&(v(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l(_)}function l(_){if(_===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return _}function i(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s(_){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},s(_)}var o={},u,d;function h(_,T,M){M||(M=Error);function k(A,g,f){return typeof T=="string"?T:T(A,g,f)}var b=(function(A){P(f,A);var g=r(f);function f(p,x,N){var D;return C(this,f),D=g.call(this,k(p,x,N)),D.code=_,D}return w(f)})(M);o[_]=b}function y(_,T){if(Array.isArray(_)){var M=_.length;return _=_.map(function(k){return String(k)}),M>2?"one of ".concat(T," ").concat(_.slice(0,M-1).join(", "),", or ")+_[M-1]:M===2?"one of ".concat(T," ").concat(_[0]," or ").concat(_[1]):"of ".concat(T," ").concat(_[0])}else return"of ".concat(T," ").concat(String(_))}function m(_,T,M){return _.substr(0,T.length)===T}function E(_,T,M){return(M===void 0||M>_.length)&&(M=_.length),_.substring(M-T.length,M)===T}function c(_,T,M){return typeof M!="number"&&(M=0),M+T.length>_.length?!1:_.indexOf(T,M)!==-1}h("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),h("ERR_INVALID_ARG_TYPE",function(_,T,M){u===void 0&&(u=c_()),u(typeof _=="string","'name' must be a string");var k;typeof T=="string"&&m(T,"not ")?(k="must not be",T=T.replace(/^not /,"")):k="must be";var b;if(E(_," argument"))b="The ".concat(_," ").concat(k," ").concat(y(T,"type"));else{var A=c(_,".")?"property":"argument";b='The "'.concat(_,'" ').concat(A," ").concat(k," ").concat(y(T,"type"))}return b+=". Received type ".concat(v(M)),b},TypeError),h("ERR_INVALID_ARG_VALUE",function(_,T){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=fm());var k=d.inspect(T);return k.length>128&&(k="".concat(k.slice(0,128),"...")),"The argument '".concat(_,"' ").concat(M,". Received ").concat(k)},TypeError),h("ERR_INVALID_RETURN_VALUE",function(_,T,M){var k;return M&&M.constructor&&M.constructor.name?k="instance of ".concat(M.constructor.name):k="type ".concat(v(M)),"Expected ".concat(_,' to be returned from the "').concat(T,'"')+" function but got ".concat(k,".")},TypeError),h("ERR_MISSING_ARGS",function(){for(var _=arguments.length,T=new Array(_),M=0;M<_;M++)T[M]=arguments[M];u===void 0&&(u=c_()),u(T.length>0,"At least one arg needs to be specified");var k="The ",b=T.length;switch(T=T.map(function(A){return'"'.concat(A,'"')}),b){case 1:k+="".concat(T[0]," argument");break;case 2:k+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:k+=T.slice(0,b-1).join(", "),k+=", and ".concat(T[b-1]," arguments");break}return"".concat(k," must be specified")},TypeError),Z.exports.codes=o}}),Vy=Ne({"node_modules/assert/build/internal/assert/assertion_error.js"(te,Z){function v(H,G){var J=Object.keys(H);if(Object.getOwnPropertySymbols){var le=Object.getOwnPropertySymbols(H);G&&(le=le.filter(function(ye){return Object.getOwnPropertyDescriptor(H,ye).enumerable})),J.push.apply(J,le)}return J}function w(H){for(var G=1;G<arguments.length;G++){var J=arguments[G]!=null?arguments[G]:{};G%2?v(Object(J),!0).forEach(function(le){C(H,le,J[le])}):Object.getOwnPropertyDescriptors?Object.defineProperties(H,Object.getOwnPropertyDescriptors(J)):v(Object(J)).forEach(function(le){Object.defineProperty(H,le,Object.getOwnPropertyDescriptor(J,le))})}return H}function C(H,G,J){return G=a(G),G in H?Object.defineProperty(H,G,{value:J,enumerable:!0,configurable:!0,writable:!0}):H[G]=J,H}function P(H,G){if(!(H instanceof G))throw new TypeError("Cannot call a class as a function")}function t(H,G){for(var J=0;J<G.length;J++){var le=G[J];le.enumerable=le.enumerable||!1,le.configurable=!0,"value"in le&&(le.writable=!0),Object.defineProperty(H,a(le.key),le)}}function r(H,G,J){return G&&t(H.prototype,G),Object.defineProperty(H,"prototype",{writable:!1}),H}function a(H){var G=l(H,"string");return _(G)==="symbol"?G:String(G)}function l(H,G){if(_(H)!=="object"||H===null)return H;var J=H[Symbol.toPrimitive];if(J!==void 0){var le=J.call(H,G);if(_(le)!=="object")return le;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(H)}function i(H,G){if(typeof G!="function"&&G!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(G&&G.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),G&&E(H,G)}function s(H){var G=y();return function(){var le=c(H),ye;if(G){var de=c(this).constructor;ye=Reflect.construct(le,arguments,de)}else ye=le.apply(this,arguments);return o(this,ye)}}function o(H,G){if(G&&(_(G)==="object"||typeof G=="function"))return G;if(G!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return u(H)}function u(H){if(H===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return H}function d(H){var G=typeof Map=="function"?new Map:void 0;return d=function(le){if(le===null||!m(le))return le;if(typeof le!="function")throw new TypeError("Super expression must either be null or a function");if(typeof G<"u"){if(G.has(le))return G.get(le);G.set(le,ye)}function ye(){return h(le,arguments,c(this).constructor)}return ye.prototype=Object.create(le.prototype,{constructor:{value:ye,enumerable:!1,writable:!0,configurable:!0}}),E(ye,le)},d(H)}function h(H,G,J){return y()?h=Reflect.construct.bind():h=function(ye,de,me){var W=[null];W.push.apply(W,de);var ie=Function.bind.apply(ye,W),se=new ie;return me&&E(se,me.prototype),se},h.apply(null,arguments)}function y(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function m(H){return Function.toString.call(H).indexOf("[native code]")!==-1}function E(H,G){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(le,ye){return le.__proto__=ye,le},E(H,G)}function c(H){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},c(H)}function _(H){"@babel/helpers - typeof";return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},_(H)}var T=fm(),M=T.inspect,k=Ed(),b=k.codes.ERR_INVALID_ARG_TYPE;function A(H,G,J){return(J===void 0||J>H.length)&&(J=H.length),H.substring(J-G.length,J)===G}function g(H,G){if(G=Math.floor(G),H.length==0||G==0)return"";var J=H.length*G;for(G=Math.floor(Math.log(G)/Math.log(2));G;)H+=H,G--;return H+=H.substring(0,J-H.length),H}var f="",p="",x="",N="",D={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},B=10;function U(H){var G=Object.keys(H),J=Object.create(Object.getPrototypeOf(H));return G.forEach(function(le){J[le]=H[le]}),Object.defineProperty(J,"message",{value:H.message}),J}function V(H){return M(H,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function q(H,G,J){var le="",ye="",de=0,me="",W=!1,ie=V(H),se=ie.split(`
`),ee=V(G).split(`
`),pe=0,oe="";if(J==="strictEqual"&&_(H)==="object"&&_(G)==="object"&&H!==null&&G!==null&&(J="strictEqualObject"),se.length===1&&ee.length===1&&se[0]!==ee[0]){var Y=se[0].length+ee[0].length;if(Y<=B){if((_(H)!=="object"||H===null)&&(_(G)!=="object"||G===null)&&(H!==0||G!==0))return"".concat(D[J],`

`)+"".concat(se[0]," !== ").concat(ee[0],`
`)}else if(J!=="strictEqualObject"){var ce=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Y<ce){for(;se[0][pe]===ee[0][pe];)pe++;pe>2&&(oe=`
  `.concat(g(" ",pe),"^"),pe=0)}}}for(var ue=se[se.length-1],_e=ee[ee.length-1];ue===_e&&(pe++<2?me=`
  `.concat(ue).concat(me):le=ue,se.pop(),ee.pop(),!(se.length===0||ee.length===0));)ue=se[se.length-1],_e=ee[ee.length-1];var Le=Math.max(se.length,ee.length);if(Le===0){var ze=ie.split(`
`);if(ze.length>30)for(ze[26]="".concat(f,"...").concat(N);ze.length>27;)ze.pop();return"".concat(D.notIdentical,`

`).concat(ze.join(`
`),`
`)}pe>3&&(me=`
`.concat(f,"...").concat(N).concat(me),W=!0),le!==""&&(me=`
  `.concat(le).concat(me),le="");var Ge=0,Ve=D[J]+`
`.concat(p,"+ actual").concat(N," ").concat(x,"- expected").concat(N),rt=" ".concat(f,"...").concat(N," Lines skipped");for(pe=0;pe<Le;pe++){var pt=pe-de;if(se.length<pe+1)pt>1&&pe>2&&(pt>4?(ye+=`
`.concat(f,"...").concat(N),W=!0):pt>3&&(ye+=`
  `.concat(ee[pe-2]),Ge++),ye+=`
  `.concat(ee[pe-1]),Ge++),de=pe,le+=`
`.concat(x,"-").concat(N," ").concat(ee[pe]),Ge++;else if(ee.length<pe+1)pt>1&&pe>2&&(pt>4?(ye+=`
`.concat(f,"...").concat(N),W=!0):pt>3&&(ye+=`
  `.concat(se[pe-2]),Ge++),ye+=`
  `.concat(se[pe-1]),Ge++),de=pe,ye+=`
`.concat(p,"+").concat(N," ").concat(se[pe]),Ge++;else{var gt=ee[pe],ht=se[pe],lt=ht!==gt&&(!A(ht,",")||ht.slice(0,-1)!==gt);lt&&A(gt,",")&&gt.slice(0,-1)===ht&&(lt=!1,ht+=","),lt?(pt>1&&pe>2&&(pt>4?(ye+=`
`.concat(f,"...").concat(N),W=!0):pt>3&&(ye+=`
  `.concat(se[pe-2]),Ge++),ye+=`
  `.concat(se[pe-1]),Ge++),de=pe,ye+=`
`.concat(p,"+").concat(N," ").concat(ht),le+=`
`.concat(x,"-").concat(N," ").concat(gt),Ge+=2):(ye+=le,le="",(pt===1||pe===0)&&(ye+=`
  `.concat(ht),Ge++))}if(Ge>20&&pe<Le-2)return"".concat(Ve).concat(rt,`
`).concat(ye,`
`).concat(f,"...").concat(N).concat(le,`
`)+"".concat(f,"...").concat(N)}return"".concat(Ve).concat(W?rt:"",`
`).concat(ye).concat(le).concat(me).concat(oe)}var z=(function(H,G){i(le,H);var J=s(le);function le(ye){var de;if(P(this,le),_(ye)!=="object"||ye===null)throw new b("options","Object",ye);var me=ye.message,W=ye.operator,ie=ye.stackStartFn,se=ye.actual,ee=ye.expected,pe=Error.stackTraceLimit;if(Error.stackTraceLimit=0,me!=null)de=J.call(this,String(me));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(f="\x1B[34m",p="\x1B[32m",N="\x1B[39m",x="\x1B[31m"):(f="",p="",N="",x="")),_(se)==="object"&&se!==null&&_(ee)==="object"&&ee!==null&&"stack"in se&&se instanceof Error&&"stack"in ee&&ee instanceof Error&&(se=U(se),ee=U(ee)),W==="deepStrictEqual"||W==="strictEqual")de=J.call(this,q(se,ee,W));else if(W==="notDeepStrictEqual"||W==="notStrictEqual"){var oe=D[W],Y=V(se).split(`
`);if(W==="notStrictEqual"&&_(se)==="object"&&se!==null&&(oe=D.notStrictEqualObject),Y.length>30)for(Y[26]="".concat(f,"...").concat(N);Y.length>27;)Y.pop();Y.length===1?de=J.call(this,"".concat(oe," ").concat(Y[0])):de=J.call(this,"".concat(oe,`

`).concat(Y.join(`
`),`
`))}else{var ce=V(se),ue="",_e=D[W];W==="notDeepEqual"||W==="notEqual"?(ce="".concat(D[W],`

`).concat(ce),ce.length>1024&&(ce="".concat(ce.slice(0,1021),"..."))):(ue="".concat(V(ee)),ce.length>512&&(ce="".concat(ce.slice(0,509),"...")),ue.length>512&&(ue="".concat(ue.slice(0,509),"...")),W==="deepEqual"||W==="equal"?ce="".concat(_e,`

`).concat(ce,`

should equal

`):ue=" ".concat(W," ").concat(ue)),de=J.call(this,"".concat(ce).concat(ue))}return Error.stackTraceLimit=pe,de.generatedMessage=!me,Object.defineProperty(u(de),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),de.code="ERR_ASSERTION",de.actual=se,de.expected=ee,de.operator=W,Error.captureStackTrace&&Error.captureStackTrace(u(de),ie),de.stack,de.name="AssertionError",o(de)}return r(le,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:G,value:function(de,me){return M(this,w(w({},me),{},{customInspect:!1,depth:0}))}}]),le})(d(Error),M.custom);Z.exports=z}}),Hg=Ne({"node_modules/object-keys/isArguments.js"(te,Z){var v=Object.prototype.toString;Z.exports=function(C){var P=v.call(C),t=P==="[object Arguments]";return t||(t=P!=="[object Array]"&&C!==null&&typeof C=="object"&&typeof C.length=="number"&&C.length>=0&&v.call(C.callee)==="[object Function]"),t}}}),Q0=Ne({"node_modules/object-keys/implementation.js"(te,Z){var v;Object.keys||(w=Object.prototype.hasOwnProperty,C=Object.prototype.toString,P=Hg(),t=Object.prototype.propertyIsEnumerable,r=!t.call({toString:null},"toString"),a=t.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],i=function(d){var h=d.constructor;return h&&h.prototype===d},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=(function(){if(typeof window>"u")return!1;for(var d in window)try{if(!s["$"+d]&&w.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{i(window[d])}catch{return!0}}catch{return!0}return!1})(),u=function(d){if(typeof window>"u"||!o)return i(d);try{return i(d)}catch{return!1}},v=function(h){var y=h!==null&&typeof h=="object",m=C.call(h)==="[object Function]",E=P(h),c=y&&C.call(h)==="[object String]",_=[];if(!y&&!m&&!E)throw new TypeError("Object.keys called on a non-object");var T=a&&m;if(c&&h.length>0&&!w.call(h,0))for(var M=0;M<h.length;++M)_.push(String(M));if(E&&h.length>0)for(var k=0;k<h.length;++k)_.push(String(k));else for(var b in h)!(T&&b==="prototype")&&w.call(h,b)&&_.push(String(b));if(r)for(var A=u(h),g=0;g<l.length;++g)!(A&&l[g]==="constructor")&&w.call(h,l[g])&&_.push(l[g]);return _});var w,C,P,t,r,a,l,i,s,o,u;Z.exports=v}}),z2=Ne({"node_modules/object-keys/index.js"(te,Z){var v=Array.prototype.slice,w=Hg(),C=Object.keys,P=C?function(a){return C(a)}:Q0(),t=Object.keys;P.shim=function(){if(Object.keys){var a=(function(){var l=Object.keys(arguments);return l&&l.length===arguments.length})(1,2);a||(Object.keys=function(i){return w(i)?t(v.call(i)):t(i)})}else Object.keys=P;return Object.keys||P},Z.exports=P}}),yS=Ne({"node_modules/object.assign/implementation.js"(te,Z){var v=z2(),w=Qx()(),C=l_(),P=Object,t=C("Array.prototype.push"),r=C("Object.prototype.propertyIsEnumerable"),a=w?Object.getOwnPropertySymbols:null;Z.exports=function(i,s){if(i==null)throw new TypeError("target must be an object");var o=P(i);if(arguments.length===1)return o;for(var u=1;u<arguments.length;++u){var d=P(arguments[u]),h=v(d),y=w&&(Object.getOwnPropertySymbols||a);if(y)for(var m=y(d),E=0;E<m.length;++E){var c=m[E];r(d,c)&&t(h,c)}for(var _=0;_<h.length;++_){var T=h[_];if(r(d,T)){var M=d[T];o[T]=M}}}return o}}}),EC=Ne({"node_modules/object.assign/polyfill.js"(te,Z){var v=yS(),w=function(){if(!Object.assign)return!1;for(var P="abcdefghijklmnopqrst",t=P.split(""),r={},a=0;a<t.length;++a)r[t[a]]=t[a];var l=Object.assign({},r),i="";for(var s in l)i+=s;return P!==i},C=function(){if(!Object.assign||!Object.preventExtensions)return!1;var P=Object.preventExtensions({1:2});try{Object.assign(P,"xy")}catch{return P[1]==="y"}return!1};Z.exports=function(){return!Object.assign||w()||C()?v:Object.assign}}}),u_=Ne({"node_modules/object-is/implementation.js"(te,Z){var v=function(w){return w!==w};Z.exports=function(C,P){return C===0&&P===0?1/C===1/P:!!(C===P||v(C)&&v(P))}}}),ab=Ne({"node_modules/object-is/polyfill.js"(te,Z){var v=u_();Z.exports=function(){return typeof Object.is=="function"?Object.is:v}}}),qv=Ne({"node_modules/define-properties/index.js"(te,Z){var v=z2(),w=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",C=Object.prototype.toString,P=Array.prototype.concat,t=Object.defineProperty,r=function(o){return typeof o=="function"&&C.call(o)==="[object Function]"},a=pS()(),l=t&&a,i=function(o,u,d,h){if(u in o){if(h===!0){if(o[u]===d)return}else if(!r(h)||!h())return}l?t(o,u,{configurable:!0,enumerable:!1,value:d,writable:!0}):o[u]=d},s=function(o,u){var d=arguments.length>2?arguments[2]:{},h=v(u);w&&(h=P.call(h,Object.getOwnPropertySymbols(u)));for(var y=0;y<h.length;y+=1)i(o,h[y],u[h[y]],d[h[y]])};s.supportsDescriptors=!!l,Z.exports=s}}),MC=Ne({"node_modules/object-is/shim.js"(te,Z){var v=ab(),w=qv();Z.exports=function(){var P=v();return w(Object,{is:P},{is:function(){return Object.is!==P}}),P}}}),_p=Ne({"node_modules/object-is/index.js"(te,Z){var v=qv(),w=By(),C=u_(),P=ab(),t=MC(),r=w(P(),Object);v(r,{getPolyfill:P,implementation:C,shim:t}),Z.exports=r}}),gS=Ne({"node_modules/is-nan/implementation.js"(te,Z){Z.exports=function(w){return w!==w}}}),_S=Ne({"node_modules/is-nan/polyfill.js"(te,Z){var v=gS();Z.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:v}}}),ZL=Ne({"node_modules/is-nan/shim.js"(te,Z){var v=qv(),w=_S();Z.exports=function(){var P=w();return v(Number,{isNaN:P},{isNaN:function(){return Number.isNaN!==P}}),P}}}),Hy=Ne({"node_modules/is-nan/index.js"(te,Z){var v=By(),w=qv(),C=gS(),P=_S(),t=ZL(),r=v(P(),Number);w(r,{getPolyfill:P,implementation:C,shim:t}),Z.exports=r}}),N2=Ne({"node_modules/assert/build/internal/util/comparisons.js"(te,Z){function v(lt,Fe){return r(lt)||t(lt,Fe)||C(lt,Fe)||w()}function w(){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 C(lt,Fe){if(lt){if(typeof lt=="string")return P(lt,Fe);var Pe=Object.prototype.toString.call(lt).slice(8,-1);if(Pe==="Object"&&lt.constructor&&(Pe=lt.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(lt);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return P(lt,Fe)}}function P(lt,Fe){(Fe==null||Fe>lt.length)&&(Fe=lt.length);for(var Pe=0,be=new Array(Fe);Pe<Fe;Pe++)be[Pe]=lt[Pe];return be}function t(lt,Fe){var Pe=lt==null?null:typeof Symbol<"u"&&lt[Symbol.iterator]||lt["@@iterator"];if(Pe!=null){var be,Ye,mt,bt,ft=[],Wt=!0,Zt=!1;try{if(mt=(Pe=Pe.call(lt)).next,Fe!==0)for(;!(Wt=(be=mt.call(Pe)).done)&&(ft.push(be.value),ft.length!==Fe);Wt=!0);}catch(cr){Zt=!0,Ye=cr}finally{try{if(!Wt&&Pe.return!=null&&(bt=Pe.return(),Object(bt)!==bt))return}finally{if(Zt)throw Ye}}return ft}}function r(lt){if(Array.isArray(lt))return lt}function a(lt){"@babel/helpers - typeof";return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Fe){return typeof Fe}:function(Fe){return Fe&&typeof Symbol=="function"&&Fe.constructor===Symbol&&Fe!==Symbol.prototype?"symbol":typeof Fe},a(lt)}var l=/a/g.flags!==void 0,i=function(Fe){var Pe=[];return Fe.forEach(function(be){return Pe.push(be)}),Pe},s=function(Fe){var Pe=[];return Fe.forEach(function(be,Ye){return Pe.push([Ye,be])}),Pe},o=Object.is?Object.is:_p(),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},d=Number.isNaN?Number.isNaN:Hy();function h(lt){return lt.call.bind(lt)}var y=h(Object.prototype.hasOwnProperty),m=h(Object.prototype.propertyIsEnumerable),E=h(Object.prototype.toString),c=fm().types,_=c.isAnyArrayBuffer,T=c.isArrayBufferView,M=c.isDate,k=c.isMap,b=c.isRegExp,A=c.isSet,g=c.isNativeError,f=c.isBoxedPrimitive,p=c.isNumberObject,x=c.isStringObject,N=c.isBooleanObject,D=c.isBigIntObject,B=c.isSymbolObject,U=c.isFloat32Array,V=c.isFloat64Array;function q(lt){if(lt.length===0||lt.length>10)return!0;for(var Fe=0;Fe<lt.length;Fe++){var Pe=lt.charCodeAt(Fe);if(Pe<48||Pe>57)return!0}return lt.length===10&&lt>=Math.pow(2,32)}function z(lt){return Object.keys(lt).filter(q).concat(u(lt).filter(Object.prototype.propertyIsEnumerable.bind(lt)))}function H(lt,Fe){if(lt===Fe)return 0;for(var Pe=lt.length,be=Fe.length,Ye=0,mt=Math.min(Pe,be);Ye<mt;++Ye)if(lt[Ye]!==Fe[Ye]){Pe=lt[Ye],be=Fe[Ye];break}return Pe<be?-1:be<Pe?1:0}var G=!0,J=!1,le=0,ye=1,de=2,me=3;function W(lt,Fe){return l?lt.source===Fe.source&&lt.flags===Fe.flags:RegExp.prototype.toString.call(lt)===RegExp.prototype.toString.call(Fe)}function ie(lt,Fe){if(lt.byteLength!==Fe.byteLength)return!1;for(var Pe=0;Pe<lt.byteLength;Pe++)if(lt[Pe]!==Fe[Pe])return!1;return!0}function se(lt,Fe){return lt.byteLength!==Fe.byteLength?!1:H(new Uint8Array(lt.buffer,lt.byteOffset,lt.byteLength),new Uint8Array(Fe.buffer,Fe.byteOffset,Fe.byteLength))===0}function ee(lt,Fe){return lt.byteLength===Fe.byteLength&&H(new Uint8Array(lt),new Uint8Array(Fe))===0}function pe(lt,Fe){return p(lt)?p(Fe)&&o(Number.prototype.valueOf.call(lt),Number.prototype.valueOf.call(Fe)):x(lt)?x(Fe)&&String.prototype.valueOf.call(lt)===String.prototype.valueOf.call(Fe):N(lt)?N(Fe)&&Boolean.prototype.valueOf.call(lt)===Boolean.prototype.valueOf.call(Fe):D(lt)?D(Fe)&&BigInt.prototype.valueOf.call(lt)===BigInt.prototype.valueOf.call(Fe):B(Fe)&&Symbol.prototype.valueOf.call(lt)===Symbol.prototype.valueOf.call(Fe)}function oe(lt,Fe,Pe,be){if(lt===Fe)return lt!==0?!0:Pe?o(lt,Fe):!0;if(Pe){if(a(lt)!=="object")return typeof lt=="number"&&d(lt)&&d(Fe);if(a(Fe)!=="object"||lt===null||Fe===null||Object.getPrototypeOf(lt)!==Object.getPrototypeOf(Fe))return!1}else{if(lt===null||a(lt)!=="object")return Fe===null||a(Fe)!=="object"?lt==Fe:!1;if(Fe===null||a(Fe)!=="object")return!1}var Ye=E(lt),mt=E(Fe);if(Ye!==mt)return!1;if(Array.isArray(lt)){if(lt.length!==Fe.length)return!1;var bt=z(lt),ft=z(Fe);return bt.length!==ft.length?!1:ce(lt,Fe,Pe,be,ye,bt)}if(Ye==="[object Object]"&&(!k(lt)&&k(Fe)||!A(lt)&&A(Fe)))return!1;if(M(lt)){if(!M(Fe)||Date.prototype.getTime.call(lt)!==Date.prototype.getTime.call(Fe))return!1}else if(b(lt)){if(!b(Fe)||!W(lt,Fe))return!1}else if(g(lt)||lt instanceof Error){if(lt.message!==Fe.message||lt.name!==Fe.name)return!1}else if(T(lt)){if(!Pe&&(U(lt)||V(lt))){if(!ie(lt,Fe))return!1}else if(!se(lt,Fe))return!1;var Wt=z(lt),Zt=z(Fe);return Wt.length!==Zt.length?!1:ce(lt,Fe,Pe,be,le,Wt)}else{if(A(lt))return!A(Fe)||lt.size!==Fe.size?!1:ce(lt,Fe,Pe,be,de);if(k(lt))return!k(Fe)||lt.size!==Fe.size?!1:ce(lt,Fe,Pe,be,me);if(_(lt)){if(!ee(lt,Fe))return!1}else if(f(lt)&&!pe(lt,Fe))return!1}return ce(lt,Fe,Pe,be,le)}function Y(lt,Fe){return Fe.filter(function(Pe){return m(lt,Pe)})}function ce(lt,Fe,Pe,be,Ye,mt){if(arguments.length===5){mt=Object.keys(lt);var bt=Object.keys(Fe);if(mt.length!==bt.length)return!1}for(var ft=0;ft<mt.length;ft++)if(!y(Fe,mt[ft]))return!1;if(Pe&&arguments.length===5){var Wt=u(lt);if(Wt.length!==0){var Zt=0;for(ft=0;ft<Wt.length;ft++){var cr=Wt[ft];if(m(lt,cr)){if(!m(Fe,cr))return!1;mt.push(cr),Zt++}else if(m(Fe,cr))return!1}var pr=u(Fe);if(Wt.length!==pr.length&&Y(Fe,pr).length!==Zt)return!1}else{var Br=u(Fe);if(Br.length!==0&&Y(Fe,Br).length!==0)return!1}}if(mt.length===0&&(Ye===le||Ye===ye&&lt.length===0||lt.size===0))return!0;if(be===void 0)be={val1:new Map,val2:new Map,position:0};else{var Fr=be.val1.get(lt);if(Fr!==void 0){var cn=be.val2.get(Fe);if(cn!==void 0)return Fr===cn}be.position++}be.val1.set(lt,be.position),be.val2.set(Fe,be.position);var Nr=pt(lt,Fe,Pe,mt,be,Ye);return be.val1.delete(lt),be.val2.delete(Fe),Nr}function ue(lt,Fe,Pe,be){for(var Ye=i(lt),mt=0;mt<Ye.length;mt++){var bt=Ye[mt];if(oe(Fe,bt,Pe,be))return lt.delete(bt),!0}return!1}function _e(lt){switch(a(lt)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":lt=+lt;case"number":if(d(lt))return!1}return!0}function Le(lt,Fe,Pe){var be=_e(Pe);return be??(Fe.has(be)&&!lt.has(be))}function ze(lt,Fe,Pe,be,Ye){var mt=_e(Pe);if(mt!=null)return mt;var bt=Fe.get(mt);return bt===void 0&&!Fe.has(mt)||!oe(be,bt,!1,Ye)?!1:!lt.has(mt)&&oe(be,bt,!1,Ye)}function Ge(lt,Fe,Pe,be){for(var Ye=null,mt=i(lt),bt=0;bt<mt.length;bt++){var ft=mt[bt];if(a(ft)==="object"&&ft!==null)Ye===null&&(Ye=new Set),Ye.add(ft);else if(!Fe.has(ft)){if(Pe||!Le(lt,Fe,ft))return!1;Ye===null&&(Ye=new Set),Ye.add(ft)}}if(Ye!==null){for(var Wt=i(Fe),Zt=0;Zt<Wt.length;Zt++){var cr=Wt[Zt];if(a(cr)==="object"&&cr!==null){if(!ue(Ye,cr,Pe,be))return!1}else if(!Pe&&!lt.has(cr)&&!ue(Ye,cr,Pe,be))return!1}return Ye.size===0}return!0}function Ve(lt,Fe,Pe,be,Ye,mt){for(var bt=i(lt),ft=0;ft<bt.length;ft++){var Wt=bt[ft];if(oe(Pe,Wt,Ye,mt)&&oe(be,Fe.get(Wt),Ye,mt))return lt.delete(Wt),!0}return!1}function rt(lt,Fe,Pe,be){for(var Ye=null,mt=s(lt),bt=0;bt<mt.length;bt++){var ft=v(mt[bt],2),Wt=ft[0],Zt=ft[1];if(a(Wt)==="object"&&Wt!==null)Ye===null&&(Ye=new Set),Ye.add(Wt);else{var cr=Fe.get(Wt);if(cr===void 0&&!Fe.has(Wt)||!oe(Zt,cr,Pe,be)){if(Pe||!ze(lt,Fe,Wt,Zt,be))return!1;Ye===null&&(Ye=new Set),Ye.add(Wt)}}}if(Ye!==null){for(var pr=s(Fe),Br=0;Br<pr.length;Br++){var Fr=v(pr[Br],2),cn=Fr[0],Nr=Fr[1];if(a(cn)==="object"&&cn!==null){if(!Ve(Ye,lt,cn,Nr,Pe,be))return!1}else if(!Pe&&(!lt.has(cn)||!oe(lt.get(cn),Nr,!1,be))&&!Ve(Ye,lt,cn,Nr,!1,be))return!1}return Ye.size===0}return!0}function pt(lt,Fe,Pe,be,Ye,mt){var bt=0;if(mt===de){if(!Ge(lt,Fe,Pe,Ye))return!1}else if(mt===me){if(!rt(lt,Fe,Pe,Ye))return!1}else if(mt===ye)for(;bt<lt.length;bt++)if(y(lt,bt)){if(!y(Fe,bt)||!oe(lt[bt],Fe[bt],Pe,Ye))return!1}else{if(y(Fe,bt))return!1;for(var ft=Object.keys(lt);bt<ft.length;bt++){var Wt=ft[bt];if(!y(Fe,Wt)||!oe(lt[Wt],Fe[Wt],Pe,Ye))return!1}return ft.length===Object.keys(Fe).length}for(bt=0;bt<be.length;bt++){var Zt=be[bt];if(!oe(lt[Zt],Fe[Zt],Pe,Ye))return!1}return!0}function gt(lt,Fe){return oe(lt,Fe,J)}function ht(lt,Fe){return oe(lt,Fe,G)}Z.exports={isDeepEqual:gt,isDeepStrictEqual:ht}}}),c_=Ne({"node_modules/assert/build/assert.js"(te,Z){function v(de){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me},v(de)}function w(de,me,W){return Object.defineProperty(de,"prototype",{writable:!1}),de}function C(de,me){if(!(de instanceof me))throw new TypeError("Cannot call a class as a function")}var P=Ed(),t=P.codes,r=t.ERR_AMBIGUOUS_ARGUMENT,a=t.ERR_INVALID_ARG_TYPE,l=t.ERR_INVALID_ARG_VALUE,i=t.ERR_INVALID_RETURN_VALUE,s=t.ERR_MISSING_ARGS,o=Vy(),u=fm(),d=u.inspect,h=fm().types,y=h.isPromise,m=h.isRegExp,E=EC()(),c=ab()(),_=l_()("RegExp.prototype.test"),T,M;function k(){var de=N2();T=de.isDeepEqual,M=de.isDeepStrictEqual}var b=!1,A=Z.exports=N,g={};function f(de){throw de.message instanceof Error?de.message:new o(de)}function p(de,me,W,ie,se){var ee=arguments.length,pe;if(ee===0)pe="Failed";else if(ee===1)W=de,de=void 0;else{if(b===!1){b=!0;var oe=process.emitWarning?process.emitWarning:console.warn.bind(console);oe("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}ee===2&&(ie="!=")}if(W instanceof Error)throw W;var Y={actual:de,expected:me,operator:ie===void 0?"fail":ie,stackStartFn:se||p};W!==void 0&&(Y.message=W);var ce=new o(Y);throw pe&&(ce.message=pe,ce.generatedMessage=!0),ce}A.fail=p,A.AssertionError=o;function x(de,me,W,ie){if(!W){var se=!1;if(me===0)se=!0,ie="No value argument passed to `assert.ok()`";else if(ie instanceof Error)throw ie;var ee=new o({actual:W,expected:!0,message:ie,operator:"==",stackStartFn:de});throw ee.generatedMessage=se,ee}}function N(){for(var de=arguments.length,me=new Array(de),W=0;W<de;W++)me[W]=arguments[W];x.apply(void 0,[N,me.length].concat(me))}A.ok=N,A.equal=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");me!=W&&f({actual:me,expected:W,message:ie,operator:"==",stackStartFn:de})},A.notEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");me==W&&f({actual:me,expected:W,message:ie,operator:"!=",stackStartFn:de})},A.deepEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),T(me,W)||f({actual:me,expected:W,message:ie,operator:"deepEqual",stackStartFn:de})},A.notDeepEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),T(me,W)&&f({actual:me,expected:W,message:ie,operator:"notDeepEqual",stackStartFn:de})},A.deepStrictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),M(me,W)||f({actual:me,expected:W,message:ie,operator:"deepStrictEqual",stackStartFn:de})},A.notDeepStrictEqual=D;function D(de,me,W){if(arguments.length<2)throw new s("actual","expected");T===void 0&&k(),M(de,me)&&f({actual:de,expected:me,message:W,operator:"notDeepStrictEqual",stackStartFn:D})}A.strictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");c(me,W)||f({actual:me,expected:W,message:ie,operator:"strictEqual",stackStartFn:de})},A.notStrictEqual=function de(me,W,ie){if(arguments.length<2)throw new s("actual","expected");c(me,W)&&f({actual:me,expected:W,message:ie,operator:"notStrictEqual",stackStartFn:de})};var B=w(function de(me,W,ie){var se=this;C(this,de),W.forEach(function(ee){ee in me&&(ie!==void 0&&typeof ie[ee]=="string"&&m(me[ee])&&_(me[ee],ie[ee])?se[ee]=ie[ee]:se[ee]=me[ee])})});function U(de,me,W,ie,se,ee){if(!(W in de)||!M(de[W],me[W])){if(!ie){var pe=new B(de,se),oe=new B(me,se,de),Y=new o({actual:pe,expected:oe,operator:"deepStrictEqual",stackStartFn:ee});throw Y.actual=de,Y.expected=me,Y.operator=ee.name,Y}f({actual:de,expected:me,message:ie,operator:ee.name,stackStartFn:ee})}}function V(de,me,W,ie){if(typeof me!="function"){if(m(me))return _(me,de);if(arguments.length===2)throw new a("expected",["Function","RegExp"],me);if(v(de)!=="object"||de===null){var se=new o({actual:de,expected:me,message:W,operator:"deepStrictEqual",stackStartFn:ie});throw se.operator=ie.name,se}var ee=Object.keys(me);if(me instanceof Error)ee.push("name","message");else if(ee.length===0)throw new l("error",me,"may not be an empty object");return T===void 0&&k(),ee.forEach(function(pe){typeof de[pe]=="string"&&m(me[pe])&&_(me[pe],de[pe])||U(de,me,pe,W,ee,ie)}),!0}return me.prototype!==void 0&&de instanceof me?!0:Error.isPrototypeOf(me)?!1:me.call({},de)===!0}function q(de){if(typeof de!="function")throw new a("fn","Function",de);try{de()}catch(me){return me}return g}function z(de){return y(de)||de!==null&&v(de)==="object"&&typeof de.then=="function"&&typeof de.catch=="function"}function H(de){return Promise.resolve().then(function(){var me;if(typeof de=="function"){if(me=de(),!z(me))throw new i("instance of Promise","promiseFn",me)}else if(z(de))me=de;else throw new a("promiseFn",["Function","Promise"],de);return Promise.resolve().then(function(){return me}).then(function(){return g}).catch(function(W){return W})})}function G(de,me,W,ie){if(typeof W=="string"){if(arguments.length===4)throw new a("error",["Object","Error","Function","RegExp"],W);if(v(me)==="object"&&me!==null){if(me.message===W)throw new r("error/message",'The error message "'.concat(me.message,'" is identical to the message.'))}else if(me===W)throw new r("error/message",'The error "'.concat(me,'" is identical to the message.'));ie=W,W=void 0}else if(W!=null&&v(W)!=="object"&&typeof W!="function")throw new a("error",["Object","Error","Function","RegExp"],W);if(me===g){var se="";W&&W.name&&(se+=" (".concat(W.name,")")),se+=ie?": ".concat(ie):".";var ee=de.name==="rejects"?"rejection":"exception";f({actual:void 0,expected:W,operator:de.name,message:"Missing expected ".concat(ee).concat(se),stackStartFn:de})}if(W&&!V(me,W,ie,de))throw me}function J(de,me,W,ie){if(me!==g){if(typeof W=="string"&&(ie=W,W=void 0),!W||V(me,W)){var se=ie?": ".concat(ie):".",ee=de.name==="doesNotReject"?"rejection":"exception";f({actual:me,expected:W,operator:de.name,message:"Got unwanted ".concat(ee).concat(se,`
`)+'Actual message: "'.concat(me&&me.message,'"'),stackStartFn:de})}throw me}}A.throws=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];G.apply(void 0,[de,q(me)].concat(ie))},A.rejects=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];return H(me).then(function(ee){return G.apply(void 0,[de,ee].concat(ie))})},A.doesNotThrow=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];J.apply(void 0,[de,q(me)].concat(ie))},A.doesNotReject=function de(me){for(var W=arguments.length,ie=new Array(W>1?W-1:0),se=1;se<W;se++)ie[se-1]=arguments[se];return H(me).then(function(ee){return J.apply(void 0,[de,ee].concat(ie))})},A.ifError=function de(me){if(me!=null){var W="ifError got unwanted exception: ";v(me)==="object"&&typeof me.message=="string"?me.message.length===0&&me.constructor?W+=me.constructor.name:W+=me.message:W+=d(me);var ie=new o({actual:me,expected:null,operator:"ifError",message:W,stackStartFn:de}),se=me.stack;if(typeof se=="string"){var ee=se.split(`
`);ee.shift();for(var pe=ie.stack.split(`
`),oe=0;oe<ee.length;oe++){var Y=pe.indexOf(ee[oe]);if(Y!==-1){pe=pe.slice(0,Y);break}}ie.stack="".concat(pe.join(`
`),`
`).concat(ee.join(`
`))}throw ie}};function le(de,me,W,ie,se){if(!m(me))throw new a("regexp","RegExp",me);var ee=se==="match";if(typeof de!="string"||_(me,de)!==ee){if(W instanceof Error)throw W;var pe=!W;W=W||(typeof de!="string"?'The "string" argument must be of type string. Received type '+"".concat(v(de)," (").concat(d(de),")"):(ee?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(d(me),`. Input:

`).concat(d(de),`
`));var oe=new o({actual:de,expected:me,message:W,operator:se,stackStartFn:ie});throw oe.generatedMessage=pe,oe}}A.match=function de(me,W,ie){le(me,W,ie,de,"match")},A.doesNotMatch=function de(me,W,ie){le(me,W,ie,de,"doesNotMatch")};function ye(){for(var de=arguments.length,me=new Array(de),W=0;W<de;W++)me[W]=arguments[W];x.apply(void 0,[ye,me.length].concat(me))}A.strict=E(ye,A,{equal:A.strictEqual,deepEqual:A.deepStrictEqual,notEqual:A.notStrictEqual,notDeepEqual:A.notDeepStrictEqual}),A.strict.strict=A.strict}}),f_=Ne({"node_modules/stream-parser/node_modules/ms/index.js"(te,Z){var v=1e3,w=v*60,C=w*60,P=C*24,t=P*365.25;Z.exports=function(s,o){o=o||{};var u=typeof s;if(u==="string"&&s.length>0)return r(s);if(u==="number"&&isNaN(s)===!1)return o.long?l(s):a(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function r(s){if(s=String(s),!(s.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(s);if(o){var u=parseFloat(o[1]),d=(o[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return u*t;case"days":case"day":case"d":return u*P;case"hours":case"hour":case"hrs":case"hr":case"h":return u*C;case"minutes":case"minute":case"mins":case"min":case"m":return u*w;case"seconds":case"second":case"secs":case"sec":case"s":return u*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}}}function a(s){return s>=P?Math.round(s/P)+"d":s>=C?Math.round(s/C)+"h":s>=w?Math.round(s/w)+"m":s>=v?Math.round(s/v)+"s":s+"ms"}function l(s){return i(s,P,"day")||i(s,C,"hour")||i(s,w,"minute")||i(s,v,"second")||s+" ms"}function i(s,o,u){if(!(s<o))return s<o*1.5?Math.floor(s/o)+" "+u:Math.ceil(s/o)+" "+u+"s"}}}),CC=Ne({"node_modules/stream-parser/node_modules/debug/src/debug.js"(te,Z){te=Z.exports=C.debug=C.default=C,te.coerce=a,te.disable=t,te.enable=P,te.enabled=r,te.humanize=f_(),te.names=[],te.skips=[],te.formatters={};var v;function w(l){var i=0,s;for(s in l)i=(i<<5)-i+l.charCodeAt(s),i|=0;return te.colors[Math.abs(i)%te.colors.length]}function C(l){function i(){if(i.enabled){var s=i,o=+new Date,u=o-(v||o);s.diff=u,s.prev=v,s.curr=o,v=o;for(var d=new Array(arguments.length),h=0;h<d.length;h++)d[h]=arguments[h];d[0]=te.coerce(d[0]),typeof d[0]!="string"&&d.unshift("%O");var y=0;d[0]=d[0].replace(/%([a-zA-Z%])/g,function(E,c){if(E==="%%")return E;y++;var _=te.formatters[c];if(typeof _=="function"){var T=d[y];E=_.call(s,T),d.splice(y,1),y--}return E}),te.formatArgs.call(s,d);var m=i.log||te.log||console.log.bind(console);m.apply(s,d)}}return i.namespace=l,i.enabled=te.enabled(l),i.useColors=te.useColors(),i.color=w(l),typeof te.init=="function"&&te.init(i),i}function P(l){te.save(l),te.names=[],te.skips=[];for(var i=(typeof l=="string"?l:"").split(/[\s,]+/),s=i.length,o=0;o<s;o++)i[o]&&(l=i[o].replace(/\*/g,".*?"),l[0]==="-"?te.skips.push(new RegExp("^"+l.substr(1)+"$")):te.names.push(new RegExp("^"+l+"$")))}function t(){te.enable("")}function r(l){var i,s;for(i=0,s=te.skips.length;i<s;i++)if(te.skips[i].test(l))return!1;for(i=0,s=te.names.length;i<s;i++)if(te.names[i].test(l))return!0;return!1}function a(l){return l instanceof Error?l.stack||l.message:l}}}),kC=Ne({"node_modules/stream-parser/node_modules/debug/src/browser.js"(te,Z){te=Z.exports=CC(),te.log=C,te.formatArgs=w,te.save=P,te.load=t,te.useColors=v,te.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:r(),te.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function v(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}te.formatters.j=function(a){try{return JSON.stringify(a)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}};function w(a){var l=this.useColors;if(a[0]=(l?"%c":"")+this.namespace+(l?" %c":" ")+a[0]+(l?"%c ":" ")+"+"+te.humanize(this.diff),!!l){var i="color: "+this.color;a.splice(1,0,i,"color: inherit");var s=0,o=0;a[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(s++,u==="%c"&&(o=s))}),a.splice(o,0,i)}}function C(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function P(a){try{a==null?te.storage.removeItem("debug"):te.storage.debug=a}catch{}}function t(){var a;try{a=te.storage.debug}catch{}return!a&&typeof process<"u"&&"env"in process&&(a=n.DEBUG),a}te.enable(t());function r(){try{return window.localStorage}catch{}}}}),PC=Ne({"node_modules/stream-parser/index.js"(te,Z){var v=c_(),w=kC()("stream-parser");Z.exports=a;var C=-1,P=0,t=1,r=2;function a(c){var _=c&&typeof c._transform=="function",T=c&&typeof c._write=="function";if(!_&&!T)throw new Error("must pass a Writable or Transform stream in");w("extending Parser into stream"),c._bytes=i,c._skipBytes=s,_&&(c._passthrough=o),_?c._transform=d:c._write=u}function l(c){w("initializing parser stream"),c._parserBytesLeft=0,c._parserBuffers=[],c._parserBuffered=0,c._parserState=C,c._parserCallback=null,typeof c.push=="function"&&(c._parserOutput=c.push.bind(c)),c._parserInit=!0}function i(c,_){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(c)&&c>0,'can only buffer a finite number of bytes > 0, got "'+c+'"'),this._parserInit||l(this),w("buffering %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=P}function s(c,_){v(!this._parserCallback,'there is already a "callback" set!'),v(c>0,'can only skip > 0 bytes, got "'+c+'"'),this._parserInit||l(this),w("skipping %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=t}function o(c,_){v(!this._parserCallback,'There is already a "callback" set!'),v(c>0,'can only pass through > 0 bytes, got "'+c+'"'),this._parserInit||l(this),w("passing through %o bytes",c),this._parserBytesLeft=c,this._parserCallback=_,this._parserState=r}function u(c,_,T){this._parserInit||l(this),w("write(%o bytes)",c.length),typeof _=="function"&&(T=_),m(this,c,null,T)}function d(c,_,T){this._parserInit||l(this),w("transform(%o bytes)",c.length),typeof _!="function"&&(_=this._parserOutput),m(this,c,_,T)}function h(c,_,T,M){return c._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):_.length<=c._parserBytesLeft?function(){return y(c,_,T,M)}:function(){var k=_.slice(0,c._parserBytesLeft);return y(c,k,T,function(b){if(b)return M(b);if(_.length>k.length)return function(){return h(c,_.slice(k.length),T,M)}})}}function y(c,_,T,M){if(c._parserBytesLeft-=_.length,w("%o bytes left for stream piece",c._parserBytesLeft),c._parserState===P?(c._parserBuffers.push(_),c._parserBuffered+=_.length):c._parserState===r&&T(_),c._parserBytesLeft===0){var k=c._parserCallback;if(k&&c._parserState===P&&c._parserBuffers.length>1&&(_=Buffer.concat(c._parserBuffers,c._parserBuffered)),c._parserState!==P&&(_=null),c._parserCallback=null,c._parserBuffered=0,c._parserState=C,c._parserBuffers.splice(0),k){var b=[];_&&b.push(_),T&&b.push(T);var A=k.length>b.length;A&&b.push(E(M));var g=k.apply(c,b);if(!A||M===g)return M}}else return M}var m=E(h);function E(c){return function(){for(var _=c.apply(this,arguments);typeof _=="function";)_=_();return _}}}}),Fc=Ne({"node_modules/probe-image-size/lib/common.js"(te){var Z=O2().Transform,v=PC();function w(){Z.call(this,{readableObjectMode:!0})}w.prototype=Object.create(Z.prototype),w.prototype.constructor=w,v(w.prototype),te.ParserStream=w,te.sliceEq=function(P,t,r){for(var a=t,l=0;l<r.length;)if(P[a++]!==r[l++])return!1;return!0},te.str2arr=function(P,t){var r=[],a=0;if(t&&t==="hex")for(;a<P.length;)r.push(parseInt(P.slice(a,a+2),16)),a+=2;else for(;a<P.length;a++)r.push(P.charCodeAt(a)&255);return r},te.readUInt16LE=function(P,t){return P[t]|P[t+1]<<8},te.readUInt16BE=function(P,t){return P[t+1]|P[t]<<8},te.readUInt32LE=function(P,t){return P[t]|P[t+1]<<8|P[t+2]<<16|P[t+3]*16777216},te.readUInt32BE=function(P,t){return P[t+3]|P[t+2]<<8|P[t+1]<<16|P[t]*16777216};function C(P,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=P,t&&(this.code=t),r&&(this.statusCode=r)}C.prototype=Object.create(Error.prototype),C.prototype.constructor=C,te.ProbeError=C}}),F2=Ne({"node_modules/probe-image-size/lib/miaf_utils.js"(te,Z){var v=Fc().readUInt16BE,w=Fc().readUInt32BE;function C(o,u){if(o.length<4+u)return null;var d=w(o,u);return o.length<d+u||d<8?null:{boxtype:String.fromCharCode.apply(null,o.slice(u+4,u+8)),data:o.slice(u+8,u+d),end:u+d}}Z.exports.unbox=C;function P(o,u){for(var d=0;;){var h=C(o,d);if(!h)break;switch(h.boxtype){case"ispe":u.sizes.push({width:w(h.data,4),height:w(h.data,8)});break;case"irot":u.transforms.push({type:"irot",value:h.data[0]&3});break;case"imir":u.transforms.push({type:"imir",value:h.data[0]&1});break}d=h.end}}function t(o,u,d){for(var h=0,y=0;y<d;y++)h=h*256+(o[u+y]||0);return h}function r(o,u){for(var d=o[4]>>4&15,h=o[4]&15,y=o[5]>>4&15,m=v(o,6),E=8,c=0;c<m;c++){var _=v(o,E);E+=2;var T=v(o,E);E+=2;var M=t(o,E,y);E+=y;var k=v(o,E);if(E+=2,T===0&&k===1){var b=t(o,E,d),A=t(o,E+d,h);u.item_loc[_]={length:A,offset:b+M}}E+=k*(d+h)}}function a(o,u){for(var d=v(o,4),h=6,y=0;y<d;y++){var m=C(o,h);if(!m)break;if(m.boxtype==="infe"){for(var E=v(m.data,4),c="",_=8;_<m.data.length&&m.data[_];_++)c+=String.fromCharCode(m.data[_]);u.item_inf[c]=E}h=m.end}}function l(o,u){for(var d=0;;){var h=C(o,d);if(!h)break;h.boxtype==="ipco"&&P(h.data,u),d=h.end}}function i(o,u){for(var d=4;;){var h=C(o,d);if(!h)break;h.boxtype==="iprp"&&l(h.data,u),h.boxtype==="iloc"&&r(h.data,u),h.boxtype==="iinf"&&a(h.data,u),d=h.end}}function s(o){var u=o.reduce(function(y,m){return y.width>m.width||y.width===m.width&&y.height>m.height?y:m}),d=o.reduce(function(y,m){return y.height>m.height||y.height===m.height&&y.width>m.width?y:m}),h;return u.width>d.height||u.width===d.height&&u.height>d.width?h=u:h=d,h}Z.exports.readSizeFromMeta=function(o){var u={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(i(o,u),!!u.sizes.length){var d=s(u.sizes),h=1;u.transforms.forEach(function(m){var E={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},c={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(m.type==="imir"&&(m.value===0?h=c[h]:(h=c[h],h=E[h],h=E[h])),m.type==="irot")for(var _=0;_<m.value;_++)h=E[h]});var y=null;return u.item_inf.Exif&&(y=u.item_loc[u.item_inf.Exif]),{width:d.width,height:d.height,orientation:u.transforms.length?h:null,variants:u.sizes,exif_location:y}}},Z.exports.getMimeType=function(o){var u=String.fromCharCode.apply(null,o.slice(0,4)),d={};d[u]=!0;for(var h=8;h<o.length;h+=4)d[String.fromCharCode.apply(null,o.slice(h,h+4))]=!0;if(!(!d.mif1&&!d.msf1&&!d.miaf))return u==="avif"||u==="avis"||u==="avio"?{type:"avif",mime:"image/avif"}:u==="heic"||u==="heix"?{type:"heic",mime:"image/heic"}:u==="hevc"||u==="hevx"?{type:"heic",mime:"image/heic-sequence"}:d.avif||d.avis?{type:"avif",mime:"image/avif"}:d.heic||d.heix||d.hevc||d.hevx||d.heis?d.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}}}),ib=Ne({"node_modules/probe-image-size/lib/exif_utils.js"(te,Z){function v(P,t){var r=new Error(P);return r.code=t,r}function w(P){try{return decodeURIComponent(escape(P))}catch{return P}}function C(P,t,r){this.input=P.subarray(t,r),this.start=t;var a=String.fromCharCode.apply(null,this.input.subarray(0,4));if(a!=="II*\0"&&a!=="MM\0*")throw v("invalid TIFF signature","EBADDATA");this.big_endian=a[0]==="M"}C.prototype.each=function(P){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,P)}},C.prototype.read_uint16=function(P){var t=this.input;if(P+2>t.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?t[P]*256+t[P+1]:t[P]+t[P+1]*256},C.prototype.read_uint32=function(P){var t=this.input;if(P+4>t.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?t[P]*16777216+t[P+1]*65536+t[P+2]*256+t[P+3]:t[P]+t[P+1]*256+t[P+2]*65536+t[P+3]*16777216},C.prototype.is_subifd_link=function(P,t){return P===0&&t===34665||P===0&&t===34853||P===34665&&t===40965},C.prototype.exif_format_length=function(P){switch(P){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}},C.prototype.exif_format_read=function(P,t){var r;switch(P){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}},C.prototype.scan_ifd=function(P,t,r){var a=this.read_uint16(t);t+=2;for(var l=0;l<a;l++){var i=this.read_uint16(t),s=this.read_uint16(t+2),o=this.read_uint32(t+4),u=this.exif_format_length(s),d=o*u,h=d<=4?t+8:this.read_uint32(t+8),y=!1;if(h+d>this.input.length)throw v("unexpected EOF","EBADDATA");for(var m=[],E=h,c=0;c<o;c++,E+=u){var _=this.exif_format_read(s,E);if(_===null){m=null;break}m.push(_)}Array.isArray(m)&&s===2&&(m=w(String.fromCharCode.apply(null,m)),m&&m[m.length-1]==="\0"&&(m=m.slice(0,-1))),this.is_subifd_link(P,i)&&Array.isArray(m)&&Number.isInteger(m[0])&&m[0]>0&&(this.ifds_to_read.push({id:i,offset:m[0]}),y=!0);var T={is_big_endian:this.big_endian,ifd:P,tag:i,format:s,count:o,entry_offset:t+this.start,data_length:d,data_offset:h+this.start,value:m,is_subifd_link:y};if(r(T)===!1){this.aborted=!0;return}t+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},Z.exports.ExifParser=C,Z.exports.get_orientation=function(P){var t=0;try{return new C(P,0,P.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch{return-1}}}}),$L=Ne({"node_modules/probe-image-size/lib/parse_sync/avif.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt32BE,P=F2(),t=ib(),r=v("ftyp");Z.exports=function(a){if(w(a,4,r)){var l=P.unbox(a,0);if(l){var i=P.getMimeType(l.data);if(i){for(var s,o=l.end;;){var u=P.unbox(a,o);if(!u)break;if(o=u.end,u.boxtype==="mdat")return;if(u.boxtype==="meta"){s=u.data;break}}if(s){var d=P.readSizeFromMeta(s);if(d){var h={width:d.width,height:d.height,type:i.type,mime:i.mime,wUnits:"px",hUnits:"px"};if(d.variants.length>1&&(h.variants=d.variants),d.orientation&&(h.orientation=d.orientation),d.exif_location&&d.exif_location.offset+d.exif_location.length<=a.length){var y=C(a,d.exif_location.offset),m=a.slice(d.exif_location.offset+y+4,d.exif_location.offset+d.exif_location.length),E=t.get_orientation(m);E>0&&(h.orientation=E)}return h}}}}}}}}),KL=Ne({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt16LE,P=v("BM");Z.exports=function(t){if(!(t.length<26)&&w(t,0,P))return{width:C(t,18),height:C(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),JL=Ne({"node_modules/probe-image-size/lib/parse_sync/gif.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt16LE,P=v("GIF87a"),t=v("GIF89a");Z.exports=function(r){if(!(r.length<10)&&!(!w(r,0,P)&&!w(r,0,t)))return{width:C(r,6),height:C(r,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),LC=Ne({"node_modules/probe-image-size/lib/parse_sync/ico.js"(te,Z){var v=Fc().readUInt16LE,w=0,C=1,P=16;Z.exports=function(t){var r=v(t,0),a=v(t,2),l=v(t,4);if(!(r!==w||a!==C||!l)){for(var i=[],s={width:0,height:0},o=0;o<l;o++){var u=t[6+P*o]||256,d=t[6+P*o+1]||256,h={width:u,height:d};i.push(h),(u>s.width||d>s.height)&&(s=h)}return{width:s.width,height:s.height,variants:i,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),RC=Ne({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(te,Z){var v=Fc().readUInt16BE,w=Fc().str2arr,C=Fc().sliceEq,P=ib(),t=w("Exif\0\0");Z.exports=function(r){if(!(r.length<2)&&!(r[0]!==255||r[1]!==216||r[2]!==255))for(var a=2;;){for(;;){if(r.length-a<2)return;if(r[a++]===255)break}for(var l=r[a++],i;l===255;)l=r[a++];if(208<=l&&l<=217||l===1)i=0;else if(192<=l&&l<=254){if(r.length-a<2)return;i=v(r,a)-2,a+=2}else return;if(l===217||l===218)return;var s;if(l===225&&i>=10&&C(r,a,t)&&(s=P.get_orientation(r.slice(a+6,a+i))),i>=5&&192<=l&&l<=207&&l!==196&&l!==200&&l!==204){if(r.length-a<i)return;var o={width:v(r,a+3),height:v(r,a+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return s>0&&(o.orientation=s),o}a+=i}}}}),h_=Ne({"node_modules/probe-image-size/lib/parse_sync/png.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt32BE,P=v(`PNG\r

`),t=v("IHDR");Z.exports=function(r){if(!(r.length<24)&&w(r,0,P)&&w(r,12,t))return{width:C(r,16),height:C(r,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),B2=Ne({"node_modules/probe-image-size/lib/parse_sync/psd.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt32BE,P=v("8BPS\0");Z.exports=function(t){if(!(t.length<22)&&w(t,0,P))return{width:C(t,18),height:C(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),IC=Ne({"node_modules/probe-image-size/lib/parse_sync/svg.js"(te,Z){function v(u){return u===32||u===9||u===13||u===10}function w(u){return typeof u=="number"&&isFinite(u)&&u>0}function C(u){var d=0,h=u.length;for(u[0]===239&&u[1]===187&&u[2]===191&&(d=3);d<h&&v(u[d]);)d++;return d===h?!1:u[d]===60}var P=/<[-_.:a-zA-Z0-9][^>]*>/,t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,r=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,i=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function s(u){var d=u.match(r),h=u.match(a),y=u.match(l);return{width:d&&(d[1]||d[2]),height:h&&(h[1]||h[2]),viewbox:y&&(y[1]||y[2])}}function o(u){return i.test(u)?u.match(i)[0]:"px"}Z.exports=function(u){if(C(u)){for(var d="",h=0;h<u.length;h++)d+=String.fromCharCode(u[h]);var y=(d.match(P)||[""])[0];if(t.test(y)){var m=s(y),E=parseFloat(m.width),c=parseFloat(m.height);if(m.width&&m.height)return!w(E)||!w(c)?void 0:{width:E,height:c,type:"svg",mime:"image/svg+xml",wUnits:o(m.width),hUnits:o(m.height)};var _=(m.viewbox||"").split(" "),T={width:_[2],height:_[3]},M=parseFloat(T.width),k=parseFloat(T.height);if(!(!w(M)||!w(k))&&o(T.width)===o(T.height)){var b=M/k;return m.width?w(E)?{width:E,height:E/b,type:"svg",mime:"image/svg+xml",wUnits:o(m.width),hUnits:o(m.width)}:void 0:m.height?w(c)?{width:c*b,height:c,type:"svg",mime:"image/svg+xml",wUnits:o(m.height),hUnits:o(m.height)}:void 0:{width:M,height:k,type:"svg",mime:"image/svg+xml",wUnits:o(T.width),hUnits:o(T.height)}}}}}}}),DC=Ne({"node_modules/probe-image-size/lib/parse_sync/tiff.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt16LE,P=Fc().readUInt16BE,t=Fc().readUInt32LE,r=Fc().readUInt32BE,a=v("II*\0"),l=v("MM\0*");function i(u,d,h){return h?P(u,d):C(u,d)}function s(u,d,h){return h?r(u,d):t(u,d)}function o(u,d,h){var y=i(u,d+2,h),m=s(u,d+4,h);return m!==1||y!==3&&y!==4?null:y===3?i(u,d+8,h):s(u,d+8,h)}Z.exports=function(u){if(!(u.length<8)&&!(!w(u,0,a)&&!w(u,0,l))){var d=u[0]===77,h=s(u,4,d)-8;if(!(h<0)){var y=h+8;if(!(u.length-y<2)){var m=i(u,y+0,d)*12;if(!(m<=0)&&(y+=2,!(u.length-y<m))){var E,c,_,T;for(E=0;E<m;E+=12)T=i(u,y+E,d),T===256?c=o(u,y+E,d):T===257&&(_=o(u,y+E,d));if(c&&_)return{width:c,height:_,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}}}}}}}}),OC=Ne({"node_modules/probe-image-size/lib/parse_sync/webp.js"(te,Z){var v=Fc().str2arr,w=Fc().sliceEq,C=Fc().readUInt16LE,P=Fc().readUInt32LE,t=ib(),r=v("RIFF"),a=v("WEBP");function l(o,u){if(!(o[u+3]!==157||o[u+4]!==1||o[u+5]!==42))return{width:C(o,u+6)&16383,height:C(o,u+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function i(o,u){if(o[u]===47){var d=P(o,u+1);return{width:(d&16383)+1,height:(d>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function s(o,u){return{width:(o[u+6]<<16|o[u+5]<<8|o[u+4])+1,height:(o[u+9]<<u|o[u+8]<<8|o[u+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}Z.exports=function(o){if(!(o.length<16)&&!(!w(o,0,r)&&!w(o,8,a))){var u=12,d=null,h=0,y=P(o,4)+8;if(!(y>o.length)){for(;u+8<y;){if(o[u]===0){u++;continue}var m=String.fromCharCode.apply(null,o.slice(u,u+4)),E=P(o,u+4);m==="VP8 "&&E>=10?d=d||l(o,u+8):m==="VP8L"&&E>=9?d=d||i(o,u+8):m==="VP8X"&&E>=10?d=d||s(o,u+8):m==="EXIF"&&(h=t.get_orientation(o.slice(u+8,u+8+E)),u=1/0),u+=8+E}if(d)return h>0&&(d.orientation=h),d}}}}}),zC=Ne({"node_modules/probe-image-size/lib/parsers_sync.js"(te,Z){Z.exports={avif:$L(),bmp:KL(),gif:JL(),ico:LC(),jpeg:RC(),png:h_(),psd:B2(),svg:IC(),tiff:DC(),webp:OC()}}}),NC=Ne({"node_modules/probe-image-size/sync.js"(te,Z){var v=zC();function w(C){for(var P=Object.keys(v),t=0;t<P.length;t++){var r=v[P[t]](C);if(r)return r}return null}Z.exports=function(P){return w(P)},Z.exports.parsers=v}}),FC=Ne({"src/traces/image/helpers.js"(te){var Z=NC(),v=i0().IMAGE_URL_PREFIX,w=Ug().Buffer;te.getImageSize=function(C){var P=C.replace(v,""),t=new w(P,"base64");return Z(t)}}}),j2=Ne({"src/traces/image/calc.js"(te,Z){var v=In(),w=lm(),C=la(),P=Os(),t=In().maxRowLength,r=FC().getImageSize;Z.exports=function(o,u){var d,h;if(u._hasZ)d=u.z.length,h=t(u.z);else if(u._hasSource){var y=r(u.source);d=y.height,h=y.width}var m=P.getFromId(o,u.xaxis||"x"),E=P.getFromId(o,u.yaxis||"y"),c=m.d2c(u.x0)-u.dx/2,_=E.d2c(u.y0)-u.dy/2,T,M=[c,c+h*u.dx],k=[_,_+d*u.dy];if(m&&m.type==="log")for(T=0;T<h;T++)M.push(c+T*u.dx);if(E&&E.type==="log")for(T=0;T<d;T++)k.push(_+T*u.dy);u._extremes[m._id]=P.findExtremes(m,M),u._extremes[E._id]=P.findExtremes(E,k),u._scaler=i(u);var b={x0:c,y0:_,z:u.z,w:h,h:d};return[b]};function a(s,o,u,d){return function(h){return v.constrain((h-s)*o,u,d)}}function l(s,o){return function(u){return v.constrain(u,s,o)}}function i(s){var o=w.colormodel[s.colormodel],u=o.colormodel||s.colormodel,d=u.length;s._sArray=[];for(var h=0;h<d;h++)o.min[h]!==s.zmin[h]||o.max[h]!==s.zmax[h]?s._sArray.push(a(s.zmin[h],(o.max[h]-o.min[h])/(s.zmax[h]-s.zmin[h]),o.min[h],o.max[h])):s._sArray.push(l(o.min[h],o.max[h]));return function(y){for(var m=y.slice(0,d),E=0;E<d;E++){var c=m[E];if(!C(c))return!1;m[E]=s._sArray[E](c)}return m}}}}),BC=Ne({"src/traces/image/plot.js"(te,Z){var v=xn(),w=In(),C=w.strTranslate,P=cp(),t=lm(),r=OM(),a=l2().STYLE;Z.exports=function(i,s,o,u){var d=s.xaxis,h=s.yaxis,y=!i._context._exportedPlot&&r();w.makeTraceGroups(u,o,"im").each(function(m){var E=v.select(this),c=m[0],_=c.trace,T=(_.zsmooth==="fast"||_.zsmooth===!1&&y)&&!_._hasZ&&_._hasSource&&d.type==="linear"&&h.type==="linear";_._realImage=T;var M=c.z,k=c.x0,b=c.y0,A=c.w,g=c.h,f=_.dx,p=_.dy,x,N,D,B,U,V;for(V=0;x===void 0&&V<A;)x=d.c2p(k+V*f),V++;for(V=A;N===void 0&&V>0;)N=d.c2p(k+V*f),V--;for(V=0;B===void 0&&V<g;)B=h.c2p(b+V*p),V++;for(V=g;U===void 0&&V>0;)U=h.c2p(b+V*p),V--;if(N<x&&(D=N,N=x,x=D),U<B&&(D=B,B=U,U=D),!T){var q=.5;x=Math.max(-q*d._length,x),N=Math.min((1+q)*d._length,N),B=Math.max(-q*h._length,B),U=Math.min((1+q)*h._length,U)}var z=Math.round(N-x),H=Math.round(U-B),G=z<=0||H<=0;if(G){var J=E.selectAll("image").data([]);J.exit().remove();return}function le(Y){var ce=document.createElement("canvas");ce.width=z,ce.height=H;var ue=ce.getContext("2d",{willReadFrequently:!0}),_e=function(Pe){return w.constrain(Math.round(d.c2p(k+Pe*f)-x),0,z)},Le=function(Pe){return w.constrain(Math.round(h.c2p(b+Pe*p)-B),0,H)},ze=t.colormodel[_.colormodel],Ge=ze.colormodel||_.colormodel,Ve=ze.fmt,rt;for(V=0;V<c.w;V++){var pt=_e(V),gt=_e(V+1);if(!(gt===pt||isNaN(gt)||isNaN(pt)))for(var ht=0;ht<c.h;ht++){var lt=Le(ht),Fe=Le(ht+1);Fe===lt||isNaN(Fe)||isNaN(lt)||!Y(V,ht)||(rt=_._scaler(Y(V,ht)),rt?ue.fillStyle=Ge+"("+Ve(rt).join(",")+")":ue.fillStyle="rgba(0,0,0,0)",ue.fillRect(pt,lt,gt-pt,Fe-lt))}}return ce}var ye=E.selectAll("image").data([m]);ye.enter().append("svg:image").attr({xmlns:P.svg,preserveAspectRatio:"none"}),ye.exit().remove();var de=_.zsmooth===!1?a:"";if(T){var me=w.simpleMap(d.range,d.r2l),W=w.simpleMap(h.range,h.r2l),ie=me[1]<me[0],se=W[1]>W[0];if(ie||se){var ee=x+z/2,pe=B+H/2;de+="transform:"+C(ee+"px",pe+"px")+"scale("+(ie?-1:1)+","+(se?-1:1)+")"+C(-ee+"px",-pe+"px")+";"}}ye.attr("style",de);var oe=new Promise(function(Y){if(_._hasZ)Y();else if(_._hasSource)if(_._canvas&&_._canvas.el.width===A&&_._canvas.el.height===g&&_._canvas.source===_.source)Y();else{var ce=document.createElement("canvas");ce.width=A,ce.height=g;var ue=ce.getContext("2d",{willReadFrequently:!0});_._image=_._image||new Image;var _e=_._image;_e.onload=function(){ue.drawImage(_e,0,0),_._canvas={el:ce,source:_.source},Y()},_e.setAttribute("src",_.source)}}).then(function(){var Y,ce;if(_._hasZ)ce=le(function(Le,ze){var Ge=M[ze][Le];return w.isTypedArray(Ge)&&(Ge=Array.from(Ge)),Ge}),Y=ce.toDataURL("image/png");else if(_._hasSource)if(T)Y=_.source;else{var ue=_._canvas.el.getContext("2d",{willReadFrequently:!0}),_e=ue.getImageData(0,0,A,g).data;ce=le(function(Le,ze){var Ge=4*(ze*A+Le);return[_e[Ge],_e[Ge+1],_e[Ge+2],_e[Ge+3]]}),Y=ce.toDataURL("image/png")}ye.attr({"xlink:href":Y,height:H,width:z,x,y:B})});i._promises.push(oe)})}}}),jC=Ne({"src/traces/image/style.js"(te,Z){var v=xn();Z.exports=function(C){v.select(C).selectAll(".im image").style("opacity",function(P){return P[0].trace.opacity})}}}),xf=Ne({"src/traces/image/hover.js"(te,Z){var v=nh(),w=In(),C=w.isArrayOrTypedArray,P=lm();Z.exports=function(r,a,l){var i=r.cd[0],s=i.trace,o=r.xa,u=r.ya;if(!(v.inbox(a-i.x0,a-(i.x0+i.w*s.dx),0)>0||v.inbox(l-i.y0,l-(i.y0+i.h*s.dy),0)>0)){var d=Math.floor((a-i.x0)/s.dx),h=Math.floor(Math.abs(l-i.y0)/s.dy),y;if(s._hasZ?y=i.z[h][d]:s._hasSource&&(y=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,h,1,1).data),!!y){var m=i.hi||s.hoverinfo,E;if(m){var c=m.split("+");c.indexOf("all")!==-1&&(c=["color"]),c.indexOf("color")!==-1&&(E=!0)}var _=P.colormodel[s.colormodel],T=_.colormodel||s.colormodel,M=T.length,k=s._scaler(y),b=_.suffix,A=[];(s.hovertemplate||E)&&(A.push("["+[k[0]+b[0],k[1]+b[1],k[2]+b[2]].join(", ")),M===4&&A.push(", "+k[3]+b[3]),A.push("]"),A=A.join(""),r.extraText=T.toUpperCase()+": "+A);var g;C(s.hovertext)&&C(s.hovertext[h])?g=s.hovertext[h][d]:C(s.text)&&C(s.text[h])&&(g=s.text[h][d]);var f=u.c2p(i.y0+(h+.5)*s.dy),p=i.x0+(d+.5)*s.dx,x=i.y0+(h+.5)*s.dy,N="["+y.slice(0,s.colormodel.length).join(", ")+"]";return[w.extendFlat(r,{index:[h,d],x0:o.c2p(i.x0+d*s.dx),x1:o.c2p(i.x0+(d+1)*s.dx),y0:f,y1:f,color:k,xVal:p,xLabelVal:p,yVal:x,yLabelVal:x,zLabelVal:N,text:g,hovertemplateLabels:{zLabel:N,colorLabel:A,"color[0]Label":k[0]+b[0],"color[1]Label":k[1]+b[1],"color[2]Label":k[2]+b[2],"color[3]Label":k[3]+b[3]}})]}}}}}),xS=Ne({"src/traces/image/event_data.js"(te,Z){Z.exports=function(w,C){return"xVal"in C&&(w.x=C.xVal),"yVal"in C&&(w.y=C.yVal),C.xa&&(w.xaxis=C.xa),C.ya&&(w.yaxis=C.ya),w.color=C.color,w.colormodel=C.trace.colormodel,w.z||(w.z=C.color),w}}}),QL=Ne({"src/traces/image/index.js"(te,Z){Z.exports={attributes:lS(),supplyDefaults:hC(),calc:j2(),plot:BC(),style:jC(),hoverPoints:xf(),eventData:xS(),moduleType:"trace",name:"image",basePlotModule:Lh(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),UC=Ne({"lib/image.js"(te,Z){Z.exports=QL()}}),d_=Ne({"src/traces/pie/attributes.js"(te,Z){var v=ns(),w=Oc().attributes,C=$o(),P=lu(),{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=co().extendFlat,i=Dd().pattern,s=C({editType:"plot",arrayOk:!0,colorEditType:"plot"});Z.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:P.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:i,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:l({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:a(),texttemplate:r({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:a({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:l({},s,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:l({},s,{}),outsidetextfont:l({},s,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:l({},s,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:w({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"}}}}),v_=Ne({"src/traces/pie/defaults.js"(te,Z){var v=la(),w=In(),C=d_(),P=Oc().defaults,t=vp().handleText,r=In().coercePattern;function a(s,o){var u=w.isArrayOrTypedArray(s),d=w.isArrayOrTypedArray(o),h=Math.min(u?s.length:1/0,d?o.length:1/0);if(isFinite(h)||(h=0),h&&d){for(var y,m=0;m<h;m++){var E=o[m];if(v(E)&&E>0){y=!0;break}}y||(h=0)}return{hasLabels:u,hasValues:d,len:h}}function l(s,o,u,d,h){var y=d("marker.line.width");y&&d("marker.line.color",h?void 0:u.paper_bgcolor);var m=d("marker.colors");r(d,"marker.pattern",m),s.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=s.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=u.paper_bgcolor)}function i(s,o,u,d){function h(x,N){return w.coerce(s,o,C,x,N)}var y=h("labels"),m=h("values"),E=a(y,m),c=E.len;if(o._hasLabels=E.hasLabels,o._hasValues=E.hasValues,!o._hasLabels&&o._hasValues&&(h("label0"),h("dlabel")),!c){o.visible=!1;return}o._length=c,l(s,o,d,h,!0),h("scalegroup");var _=h("text"),T=h("texttemplate");h("texttemplatefallback");var M;if(T||(M=h("textinfo",w.isArrayOrTypedArray(_)?"text+percent":"percent")),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),T||M&&M!=="none"){var k=h("textposition");t(s,o,d,h,k,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var b=Array.isArray(k)||k==="auto",A=b||k==="outside";A&&h("automargin"),(k==="inside"||k==="auto"||Array.isArray(k))&&h("insidetextorientation")}else M==="none"&&h("textposition","none");P(o,d,h);var g=h("hole"),f=h("title.text");if(f){var p=h("title.position",g?"middle center":"top center");!g&&p==="middle center"&&(o.title.position="top center"),w.coerceFont(h,"title.font",d.font)}h("sort"),h("direction"),h("rotation"),h("pull")}Z.exports={handleLabelsAndValues:a,handleMarkerDefaults:l,supplyDefaults:i}}}),bS=Ne({"src/traces/pie/layout_attributes.js"(te,Z){Z.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),U2=Ne({"src/traces/pie/layout_defaults.js"(te,Z){var v=In(),w=bS();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("hiddenlabels"),r("piecolorway",t.colorway),r("extendpiecolors")}}}),h0=Ne({"src/traces/pie/calc.js"(te,Z){var v=la(),w=Ro(),C=io(),P={};function t(i,s){var o=[],u=i._fullLayout,d=u.hiddenlabels||[],h=s.labels,y=s.marker.colors||[],m=s.values,E=s._length,c=s._hasValues&&E,_,T;if(s.dlabel)for(h=new Array(E),_=0;_<E;_++)h[_]=String(s.label0+_*s.dlabel);var M={},k=r(u["_"+s.type+"colormap"]),b=0,A=!1;for(_=0;_<E;_++){var g,f,p;if(c){if(g=m[_],!v(g))continue;g=+g}else g=1;f=h[_],(f===void 0||f==="")&&(f=_),f=String(f);var x=M[f];x===void 0?(M[f]=o.length,p=d.indexOf(f)!==-1,p||(b+=g),o.push({v:g,label:f,color:k(y[_],f),i:_,pts:[_],hidden:p})):(A=!0,T=o[x],T.v+=g,T.pts.push(_),T.hidden||(b+=g),T.color===!1&&y[_]&&(T.color=k(y[_],f)))}o=o.filter(function(D){return D.v>=0});var N=s.type==="funnelarea"?A:s.sort;return N&&o.sort(function(D,B){return B.v-D.v}),o[0]&&(o[0].vTotal=b),o}function r(i){return function(o,u){return!o||(o=w(o),!o.isValid())?!1:(o=C.addOpacity(o,o.getAlpha()),i[u]||(i[u]=o),o)}}function a(i,s){var o=(s||{}).type;o||(o="pie");var u=i._fullLayout,d=i.calcdata,h=u[o+"colorway"],y=u["_"+o+"colormap"];u["extend"+o+"colors"]&&(h=l(h,P));for(var m=0,E=0;E<d.length;E++){var c=d[E],_=c[0].trace.type;if(_===o)for(var T=0;T<c.length;T++){var M=c[T];M.color===!1&&(y[M.label]?M.color=y[M.label]:(y[M.label]=M.color=h[m%h.length],m++))}}}function l(i,s){var o,u=JSON.stringify(i),d=s[u];if(!d){for(d=i.slice(),o=0;o<i.length;o++)d.push(w(i[o]).lighten(20).toHexString());for(o=0;o<i.length;o++)d.push(w(i[o]).darken(20).toHexString());s[u]=d}return d}Z.exports={calc:t,crossTraceCalc:a,makePullColorFn:r,generateExtendedColors:l}}}),wS=Ne({"src/traces/pie/event_data.js"(te,Z){var v=_v().appendArrayMultiPointValues;Z.exports=function(C,P){var t={curveNumber:P.index,pointNumbers:C.pts,data:P._input,fullData:P,label:C.label,color:C.color,value:C.v,percent:C.percent,text:C.text,bbox:C.bbox,v:C.v};return C.pts.length===1&&(t.pointNumber=t.i=C.pts[0]),v(t,P,C.pts),P.type==="funnelarea"&&(delete t.v,delete t.i),t}}}),p_=Ne({"src/traces/pie/plot.js"(te,Z){var v=xn(),w=uf(),C=nh(),P=io(),t=zs(),r=In(),a=r.strScale,l=r.strTranslate,i=uc(),s=mc(),o=s.recordMinTextSize,u=s.clearMinTextSize,d=Oy().TEXTPAD,h=Ag(),y=wS(),m=In().isValidTextValue;function E(ie,se){var ee=ie._context.staticPlot,pe=ie._fullLayout,oe=pe._size;u("pie",pe),k(se,ie),J(se,oe);var Y=r.makeTraceGroups(pe._pielayer,se,"trace").each(function(ce){var ue=v.select(this),_e=ce[0],Le=_e.trace;ye(ce),ue.attr("stroke-linejoin","round"),ue.each(function(){var ze=v.select(this).selectAll("g.slice").data(ce);ze.enter().append("g").classed("slice",!0),ze.exit().remove();var Ge=[[[],[]],[[],[]]],Ve=!1;ze.each(function(be,Ye){if(be.hidden){v.select(this).selectAll("path,g").remove();return}be.pointNumber=be.i,be.curveNumber=Le.index,Ge[be.pxmid[1]<0?0:1][be.pxmid[0]<0?0:1].push(be);var mt=_e.cx,bt=_e.cy,ft=v.select(this),Wt=ft.selectAll("path.surface").data([be]);if(Wt.enter().append("path").classed("surface",!0).style({"pointer-events":ee?"none":"all"}),ft.call(_,ie,ce),Le.pull){var Zt=+h.castOption(Le.pull,be.pts)||0;Zt>0&&(mt+=Zt*be.pxmid[0],bt+=Zt*be.pxmid[1])}be.cxFinal=mt,be.cyFinal=bt;function cr(Dt,$e,ot,De){var Ee=De*($e[0]-Dt[0]),Ae=De*($e[1]-Dt[1]);return"a"+De*_e.r+","+De*_e.r+" 0 "+be.largeArc+(ot?" 1 ":" 0 ")+Ee+","+Ae}var pr=Le.hole;if(be.v===_e.vTotal){var Br="M"+(mt+be.px0[0])+","+(bt+be.px0[1])+cr(be.px0,be.pxmid,!0,1)+cr(be.pxmid,be.px0,!0,1)+"Z";pr?Wt.attr("d","M"+(mt+pr*be.px0[0])+","+(bt+pr*be.px0[1])+cr(be.px0,be.pxmid,!1,pr)+cr(be.pxmid,be.px0,!1,pr)+"Z"+Br):Wt.attr("d",Br)}else{var Fr=cr(be.px0,be.px1,!0,1);if(pr){var cn=1-pr;Wt.attr("d","M"+(mt+pr*be.px1[0])+","+(bt+pr*be.px1[1])+cr(be.px1,be.px0,!1,pr)+"l"+cn*be.px0[0]+","+cn*be.px0[1]+Fr+"Z")}else Wt.attr("d","M"+mt+","+bt+"l"+be.px0[0]+","+be.px0[1]+Fr+"Z")}me(ie,be,_e);var Nr=h.castOption(Le.textposition,be.pts),Jr=ft.selectAll("g.slicetext").data(be.text&&Nr!=="none"?[0]:[]);Jr.enter().append("g").classed("slicetext",!0),Jr.exit().remove(),Jr.each(function(){var Dt=r.ensureSingle(v.select(this),"text","",function(st){st.attr("data-notex",1)}),$e=r.ensureUniformFontSize(ie,Nr==="outside"?T(Le,be,pe.font):M(Le,be,pe.font));Dt.text(be.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(t.font,$e).call(i.convertToTspans,ie);var ot=t.bBox(Dt.node()),De;if(Nr==="outside")De=B(ot,be);else if(De=b(ot,be,_e),Nr==="auto"&&De.scale<1){var Ee=r.ensureUniformFontSize(ie,Le.outsidetextfont);Dt.call(t.font,Ee),ot=t.bBox(Dt.node()),De=B(ot,be)}var Ae=De.textPosAngle,Ie=Ae===void 0?be.pxmid:de(_e.r,Ae);if(De.targetX=mt+Ie[0]*De.rCenter+(De.x||0),De.targetY=bt+Ie[1]*De.rCenter+(De.y||0),W(De,ot),De.outside){var tt=De.targetY;be.yLabelMin=tt-ot.height/2,be.yLabelMid=tt,be.yLabelMax=tt+ot.height/2,be.labelExtraX=0,be.labelExtraY=0,Ve=!0}De.fontSize=$e.size,o(Le.type,De,pe),ce[Ye].transform=De,r.setTransormAndDisplay(Dt,De)})});var rt=v.select(this).selectAll("g.titletext").data(Le.title.text?[0]:[]);if(rt.enter().append("g").classed("titletext",!0),rt.exit().remove(),rt.each(function(){var be=r.ensureSingle(v.select(this),"text","",function(bt){bt.attr("data-notex",1)}),Ye=Le.title.text;Le._meta&&(Ye=r.templateString(Ye,Le._meta)),be.text(Ye).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(t.font,Le.title.font).call(i.convertToTspans,ie);var mt;Le.title.position==="middle center"?mt=U(_e):mt=V(_e,oe),be.attr("transform",l(mt.x,mt.y)+a(Math.min(1,mt.scale))+l(mt.tx,mt.ty))}),Ve&&G(Ge,Le),c(ze,Le),Ve&&Le.automargin){var pt=t.bBox(ue.node()),gt=Le.domain,ht=oe.w*(gt.x[1]-gt.x[0]),lt=oe.h*(gt.y[1]-gt.y[0]),Fe=(.5*ht-_e.r)/oe.w,Pe=(.5*lt-_e.r)/oe.h;w.autoMargin(ie,"pie."+Le.uid+".automargin",{xl:gt.x[0]-Fe,xr:gt.x[1]+Fe,yb:gt.y[0]-Pe,yt:gt.y[1]+Pe,l:Math.max(_e.cx-_e.r-pt.left,0),r:Math.max(pt.right-(_e.cx+_e.r),0),b:Math.max(pt.bottom-(_e.cy+_e.r),0),t:Math.max(_e.cy-_e.r-pt.top,0),pad:5})}})});setTimeout(function(){Y.selectAll("tspan").each(function(){var ce=v.select(this);ce.attr("dy")&&ce.attr("dy",ce.attr("dy"))})},0)}function c(ie,se){ie.each(function(ee){var pe=v.select(this);if(!ee.labelExtraX&&!ee.labelExtraY){pe.select("path.textline").remove();return}var oe=pe.select("g.slicetext text");ee.transform.targetX+=ee.labelExtraX,ee.transform.targetY+=ee.labelExtraY,r.setTransormAndDisplay(oe,ee.transform);var Y=ee.cxFinal+ee.pxmid[0],ce=ee.cyFinal+ee.pxmid[1],ue="M"+Y+","+ce,_e=(ee.yLabelMax-ee.yLabelMin)*(ee.pxmid[0]<0?-1:1)/4;if(ee.labelExtraX){var Le=ee.labelExtraX*ee.pxmid[1]/ee.pxmid[0],ze=ee.yLabelMid+ee.labelExtraY-(ee.cyFinal+ee.pxmid[1]);Math.abs(Le)>Math.abs(ze)?ue+="l"+ze*ee.pxmid[0]/ee.pxmid[1]+","+ze+"H"+(Y+ee.labelExtraX+_e):ue+="l"+ee.labelExtraX+","+Le+"v"+(ze-Le)+"h"+_e}else ue+="V"+(ee.yLabelMid+ee.labelExtraY)+"h"+_e;r.ensureSingle(pe,"path","textline").call(P.stroke,se.outsidetextfont.color).attr({"stroke-width":Math.min(2,se.outsidetextfont.size/8),d:ue,fill:"none"})})}function _(ie,se,ee){var pe=ee[0],oe=pe.cx,Y=pe.cy,ce=pe.trace,ue=ce.type==="funnelarea";"_hasHoverLabel"in ce||(ce._hasHoverLabel=!1),"_hasHoverEvent"in ce||(ce._hasHoverEvent=!1),ie.on("mouseover",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index];if(!(se._dragging||Le.hovermode===!1)){var Ge=ze.hoverinfo;if(Array.isArray(Ge)&&(Ge=C.castHoverinfo({hoverinfo:[h.castOption(Ge,_e.pts)],_module:ce._module},Le,0)),Ge==="all"&&(Ge="label+text+value+percent+name"),ze.hovertemplate||Ge!=="none"&&Ge!=="skip"&&Ge){var Ve=_e.rInscribed||0,rt=oe+_e.pxmid[0]*(1-Ve),pt=Y+_e.pxmid[1]*(1-Ve),gt=Le.separators,ht=[];if(Ge&&Ge.indexOf("label")!==-1&&ht.push(_e.label),_e.text=h.castOption(ze.hovertext||ze.text,_e.pts),Ge&&Ge.indexOf("text")!==-1){var lt=_e.text;r.isValidTextValue(lt)&&ht.push(lt)}_e.value=_e.v,_e.valueLabel=h.formatPieValue(_e.v,gt),Ge&&Ge.indexOf("value")!==-1&&ht.push(_e.valueLabel),_e.percent=_e.v/pe.vTotal,_e.percentLabel=h.formatPiePercent(_e.percent,gt),Ge&&Ge.indexOf("percent")!==-1&&ht.push(_e.percentLabel);var Fe=ze.hoverlabel,Pe=Fe.font,be=[];C.loneHover({trace:ce,x0:rt-Ve*pe.r,x1:rt+Ve*pe.r,y:pt,_x0:ue?oe+_e.TL[0]:rt-Ve*pe.r,_x1:ue?oe+_e.TR[0]:rt+Ve*pe.r,_y0:ue?Y+_e.TL[1]:pt-Ve*pe.r,_y1:ue?Y+_e.BL[1]:pt+Ve*pe.r,text:ht.join("<br>"),name:ze.hovertemplate||Ge.indexOf("name")!==-1?ze.name:void 0,idealAlign:_e.pxmid[0]<0?"left":"right",color:h.castOption(Fe.bgcolor,_e.pts)||_e.color,borderColor:h.castOption(Fe.bordercolor,_e.pts),fontFamily:h.castOption(Pe.family,_e.pts),fontSize:h.castOption(Pe.size,_e.pts),fontColor:h.castOption(Pe.color,_e.pts),nameLength:h.castOption(Fe.namelength,_e.pts),textAlign:h.castOption(Fe.align,_e.pts),hovertemplate:h.castOption(ze.hovertemplate,_e.pts),hovertemplateLabels:_e,eventData:[y(_e,ze)]},{container:Le._hoverlayer.node(),outerContainer:Le._paper.node(),gd:se,inOut_bbox:be}),_e.bbox=be[0],ce._hasHoverLabel=!0}ce._hasHoverEvent=!0,se.emit("plotly_hover",{points:[y(_e,ze)],event:v.event})}}),ie.on("mouseout",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index],Ge=v.select(this).datum();ce._hasHoverEvent&&(_e.originalEvent=v.event,se.emit("plotly_unhover",{points:[y(Ge,ze)],event:v.event}),ce._hasHoverEvent=!1),ce._hasHoverLabel&&(C.loneUnhover(Le._hoverlayer.node()),ce._hasHoverLabel=!1)}),ie.on("click",function(_e){var Le=se._fullLayout,ze=se._fullData[ce.index];se._dragging||Le.hovermode===!1||(se._hoverdata=[y(_e,ze)],C.click(se,v.event))})}function T(ie,se,ee){var pe=h.castOption(ie.outsidetextfont.color,se.pts)||h.castOption(ie.textfont.color,se.pts)||ee.color,oe=h.castOption(ie.outsidetextfont.family,se.pts)||h.castOption(ie.textfont.family,se.pts)||ee.family,Y=h.castOption(ie.outsidetextfont.size,se.pts)||h.castOption(ie.textfont.size,se.pts)||ee.size,ce=h.castOption(ie.outsidetextfont.weight,se.pts)||h.castOption(ie.textfont.weight,se.pts)||ee.weight,ue=h.castOption(ie.outsidetextfont.style,se.pts)||h.castOption(ie.textfont.style,se.pts)||ee.style,_e=h.castOption(ie.outsidetextfont.variant,se.pts)||h.castOption(ie.textfont.variant,se.pts)||ee.variant,Le=h.castOption(ie.outsidetextfont.textcase,se.pts)||h.castOption(ie.textfont.textcase,se.pts)||ee.textcase,ze=h.castOption(ie.outsidetextfont.lineposition,se.pts)||h.castOption(ie.textfont.lineposition,se.pts)||ee.lineposition,Ge=h.castOption(ie.outsidetextfont.shadow,se.pts)||h.castOption(ie.textfont.shadow,se.pts)||ee.shadow;return{color:pe,family:oe,size:Y,weight:ce,style:ue,variant:_e,textcase:Le,lineposition:ze,shadow:Ge}}function M(ie,se,ee){var pe=h.castOption(ie.insidetextfont.color,se.pts);!pe&&ie._input.textfont&&(pe=h.castOption(ie._input.textfont.color,se.pts));var oe=h.castOption(ie.insidetextfont.family,se.pts)||h.castOption(ie.textfont.family,se.pts)||ee.family,Y=h.castOption(ie.insidetextfont.size,se.pts)||h.castOption(ie.textfont.size,se.pts)||ee.size,ce=h.castOption(ie.insidetextfont.weight,se.pts)||h.castOption(ie.textfont.weight,se.pts)||ee.weight,ue=h.castOption(ie.insidetextfont.style,se.pts)||h.castOption(ie.textfont.style,se.pts)||ee.style,_e=h.castOption(ie.insidetextfont.variant,se.pts)||h.castOption(ie.textfont.variant,se.pts)||ee.variant,Le=h.castOption(ie.insidetextfont.textcase,se.pts)||h.castOption(ie.textfont.textcase,se.pts)||ee.textcase,ze=h.castOption(ie.insidetextfont.lineposition,se.pts)||h.castOption(ie.textfont.lineposition,se.pts)||ee.lineposition,Ge=h.castOption(ie.insidetextfont.shadow,se.pts)||h.castOption(ie.textfont.shadow,se.pts)||ee.shadow;return{color:pe||P.contrast(se.color),family:oe,size:Y,weight:ce,style:ue,variant:_e,textcase:Le,lineposition:ze,shadow:Ge}}function k(ie,se){for(var ee,pe,oe=0;oe<ie.length;oe++)if(ee=ie[oe][0],pe=ee.trace,pe.title.text){var Y=pe.title.text;pe._meta&&(Y=r.templateString(Y,pe._meta));var ce=t.tester.append("text").attr("data-notex",1).text(Y).call(t.font,pe.title.font).call(i.convertToTspans,se),ue=t.bBox(ce.node(),!0);ee.titleBox={width:ue.width,height:ue.height},ce.remove()}}function b(ie,se,ee){var pe=ee.r||se.rpx1,oe=se.rInscribed,Y=se.startangle===se.stopangle;if(Y)return{rCenter:1-oe,scale:0,rotate:0,textPosAngle:0};var ce=se.ring,ue=ce===1&&Math.abs(se.startangle-se.stopangle)===Math.PI*2,_e=se.halfangle,Le=se.midangle,ze=ee.trace.insidetextorientation,Ge=ze==="horizontal",Ve=ze==="tangential",rt=ze==="radial",pt=ze==="auto",gt=[],ht;if(!pt){var lt=function(ft,Wt){if(A(se,ft)){var Zt=Math.abs(ft-se.startangle),cr=Math.abs(ft-se.stopangle),pr=Zt<cr?Zt:cr;Wt==="tan"?ht=f(ie,pe,ce,pr,0):ht=g(ie,pe,ce,pr,Math.PI/2),ht.textPosAngle=ft,gt.push(ht)}},Fe;if(Ge||Ve){for(Fe=4;Fe>=-4;Fe-=2)lt(Math.PI*Fe,"tan");for(Fe=4;Fe>=-4;Fe-=2)lt(Math.PI*(Fe+1),"tan")}if(Ge||rt){for(Fe=4;Fe>=-4;Fe-=2)lt(Math.PI*(Fe+1.5),"rad");for(Fe=4;Fe>=-4;Fe-=2)lt(Math.PI*(Fe+.5),"rad")}}if(ue||pt||Ge){var Pe=Math.sqrt(ie.width*ie.width+ie.height*ie.height);if(ht={scale:oe*pe*2/Pe,rCenter:1-oe,rotate:0},ht.textPosAngle=(se.startangle+se.stopangle)/2,ht.scale>=1)return ht;gt.push(ht)}(pt||rt)&&(ht=g(ie,pe,ce,_e,Le),ht.textPosAngle=(se.startangle+se.stopangle)/2,gt.push(ht)),(pt||Ve)&&(ht=f(ie,pe,ce,_e,Le),ht.textPosAngle=(se.startangle+se.stopangle)/2,gt.push(ht));for(var be=0,Ye=0,mt=0;mt<gt.length;mt++){var bt=gt[mt].scale;if(Ye<bt&&(Ye=bt,be=mt),!pt&&Ye>=1)break}return gt[be]}function A(ie,se){var ee=ie.startangle,pe=ie.stopangle;return ee>se&&se>pe||ee<se&&se<pe}function g(ie,se,ee,pe,oe){se=Math.max(0,se-2*d);var Y=ie.width/ie.height,ce=N(Y,pe,se,ee);return{scale:ce*2/ie.height,rCenter:p(Y,ce/se),rotate:x(oe)}}function f(ie,se,ee,pe,oe){se=Math.max(0,se-2*d);var Y=ie.height/ie.width,ce=N(Y,pe,se,ee);return{scale:ce*2/ie.width,rCenter:p(Y,ce/se),rotate:x(oe+Math.PI/2)}}function p(ie,se){return Math.cos(se)-ie*se}function x(ie){return(180/Math.PI*ie+720)%180-90}function N(ie,se,ee,pe){var oe=ie+1/(2*Math.tan(se));return ee*Math.min(1/(Math.sqrt(oe*oe+.5)+oe),pe/(Math.sqrt(ie*ie+pe/2)+ie))}function D(ie,se){return ie.v===se.vTotal&&!se.trace.hole?1:Math.min(1/(1+1/Math.sin(ie.halfangle)),ie.ring/2)}function B(ie,se){var ee=se.pxmid[0],pe=se.pxmid[1],oe=ie.width/2,Y=ie.height/2;return ee<0&&(oe*=-1),pe<0&&(Y*=-1),{scale:1,rCenter:1,rotate:0,x:oe+Math.abs(Y)*(oe>0?1:-1)/2,y:Y/(1+ee*ee/(pe*pe)),outside:!0}}function U(ie){var se=Math.sqrt(ie.titleBox.width*ie.titleBox.width+ie.titleBox.height*ie.titleBox.height);return{x:ie.cx,y:ie.cy,scale:ie.trace.hole*ie.r*2/se,tx:0,ty:-ie.titleBox.height/2+ie.trace.title.font.size}}function V(ie,se){var ee=1,pe=1,oe,Y=ie.trace,ce={x:ie.cx,y:ie.cy},ue={tx:0,ty:0};ue.ty+=Y.title.font.size,oe=H(Y),Y.title.position.indexOf("top")!==-1?(ce.y-=(1+oe)*ie.r,ue.ty-=ie.titleBox.height):Y.title.position.indexOf("bottom")!==-1&&(ce.y+=(1+oe)*ie.r);var _e=q(ie.r,ie.trace.aspectratio),Le=se.w*(Y.domain.x[1]-Y.domain.x[0])/2;return Y.title.position.indexOf("left")!==-1?(Le=Le+_e,ce.x-=(1+oe)*_e,ue.tx+=ie.titleBox.width/2):Y.title.position.indexOf("center")!==-1?Le*=2:Y.title.position.indexOf("right")!==-1&&(Le=Le+_e,ce.x+=(1+oe)*_e,ue.tx-=ie.titleBox.width/2),ee=Le/ie.titleBox.width,pe=z(ie,se)/ie.titleBox.height,{x:ce.x,y:ce.y,scale:Math.min(ee,pe),tx:ue.tx,ty:ue.ty}}function q(ie,se){return ie/(se===void 0?1:se)}function z(ie,se){var ee=ie.trace,pe=se.h*(ee.domain.y[1]-ee.domain.y[0]);return Math.min(ie.titleBox.height,pe/2)}function H(ie){var se=ie.pull;if(!se)return 0;var ee;if(r.isArrayOrTypedArray(se))for(se=0,ee=0;ee<ie.pull.length;ee++)ie.pull[ee]>se&&(se=ie.pull[ee]);return se}function G(ie,se){var ee,pe,oe,Y,ce,ue,_e,Le,ze,Ge,Ve,rt,pt;function gt(Pe,be){return Pe.pxmid[1]-be.pxmid[1]}function ht(Pe,be){return be.pxmid[1]-Pe.pxmid[1]}function lt(Pe,be){be||(be={});var Ye=be.labelExtraY+(pe?be.yLabelMax:be.yLabelMin),mt=pe?Pe.yLabelMin:Pe.yLabelMax,bt=pe?Pe.yLabelMax:Pe.yLabelMin,ft=Pe.cyFinal+ce(Pe.px0[1],Pe.px1[1]),Wt=Ye-mt,Zt,cr,pr,Br,Fr,cn;if(Wt*_e>0&&(Pe.labelExtraY=Wt),!!r.isArrayOrTypedArray(se.pull))for(cr=0;cr<Ge.length;cr++)pr=Ge[cr],!(pr===Pe||(h.castOption(se.pull,Pe.pts)||0)>=(h.castOption(se.pull,pr.pts)||0))&&((Pe.pxmid[1]-pr.pxmid[1])*_e>0?(Br=pr.cyFinal+ce(pr.px0[1],pr.px1[1]),Wt=Br-mt-Pe.labelExtraY,Wt*_e>0&&(Pe.labelExtraY+=Wt)):(bt+Pe.labelExtraY-ft)*_e>0&&(Zt=3*ue*Math.abs(cr-Ge.indexOf(Pe)),Fr=pr.cxFinal+Y(pr.px0[0],pr.px1[0]),cn=Fr+Zt-(Pe.cxFinal+Pe.pxmid[0])-Pe.labelExtraX,cn*ue>0&&(Pe.labelExtraX+=cn)))}for(pe=0;pe<2;pe++)for(oe=pe?gt:ht,ce=pe?Math.max:Math.min,_e=pe?1:-1,ee=0;ee<2;ee++){for(Y=ee?Math.max:Math.min,ue=ee?1:-1,Le=ie[pe][ee],Le.sort(oe),ze=ie[1-pe][ee],Ge=ze.concat(Le),rt=[],Ve=0;Ve<Le.length;Ve++)Le[Ve].yLabelMid!==void 0&&rt.push(Le[Ve]);for(pt=!1,Ve=0;pe&&Ve<ze.length;Ve++)if(ze[Ve].yLabelMid!==void 0){pt=ze[Ve];break}for(Ve=0;Ve<rt.length;Ve++){var Fe=Ve&&rt[Ve-1];pt&&!Ve&&(Fe=pt),lt(rt[Ve],Fe)}}}function J(ie,se){for(var ee=[],pe=0;pe<ie.length;pe++){var oe=ie[pe][0],Y=oe.trace,ce=Y.domain,ue=se.w*(ce.x[1]-ce.x[0]),_e=se.h*(ce.y[1]-ce.y[0]);Y.title.text&&Y.title.position!=="middle center"&&(_e-=z(oe,se));var Le=ue/2,ze=_e/2;Y.type==="funnelarea"&&!Y.scalegroup&&(ze/=Y.aspectratio),oe.r=Math.min(Le,ze)/(1+H(Y)),oe.cx=se.l+se.w*(Y.domain.x[1]+Y.domain.x[0])/2,oe.cy=se.t+se.h*(1-Y.domain.y[0])-_e/2,Y.title.text&&Y.title.position.indexOf("bottom")!==-1&&(oe.cy-=z(oe,se)),Y.scalegroup&&ee.indexOf(Y.scalegroup)===-1&&ee.push(Y.scalegroup)}le(ie,ee)}function le(ie,se){for(var ee,pe,oe,Y=0;Y<se.length;Y++){var ce=1/0,ue=se[Y];for(pe=0;pe<ie.length;pe++)if(ee=ie[pe][0],oe=ee.trace,oe.scalegroup===ue){var _e;if(oe.type==="pie")_e=ee.r*ee.r;else if(oe.type==="funnelarea"){var Le,ze;oe.aspectratio>1?(Le=ee.r,ze=Le/oe.aspectratio):(ze=ee.r,Le=ze*oe.aspectratio),Le*=(1+oe.baseratio)/2,_e=Le*ze}ce=Math.min(ce,_e/ee.vTotal)}for(pe=0;pe<ie.length;pe++)if(ee=ie[pe][0],oe=ee.trace,oe.scalegroup===ue){var Ge=ce*ee.vTotal;oe.type==="funnelarea"&&(Ge/=(1+oe.baseratio)/2,Ge/=oe.aspectratio),ee.r=Math.sqrt(Ge)}}}function ye(ie){var se=ie[0],ee=se.r,pe=se.trace,oe=h.getRotationAngle(pe.rotation),Y=2*Math.PI/se.vTotal,ce="px0",ue="px1",_e,Le,ze;if(pe.direction==="counterclockwise"){for(_e=0;_e<ie.length&&ie[_e].hidden;_e++);if(_e===ie.length)return;oe+=Y*ie[_e].v,Y*=-1,ce="px1",ue="px0"}for(ze=de(ee,oe),_e=0;_e<ie.length;_e++)Le=ie[_e],!Le.hidden&&(Le[ce]=ze,Le.startangle=oe,oe+=Y*Le.v/2,Le.pxmid=de(ee,oe),Le.midangle=oe,oe+=Y*Le.v/2,ze=de(ee,oe),Le.stopangle=oe,Le[ue]=ze,Le.largeArc=Le.v>se.vTotal/2?1:0,Le.halfangle=Math.PI*Math.min(Le.v/se.vTotal,.5),Le.ring=1-pe.hole,Le.rInscribed=D(Le,se))}function de(ie,se){return[ie*Math.sin(se),-ie*Math.cos(se)]}function me(ie,se,ee){var pe=ie._fullLayout,oe=ee.trace,Y=oe.texttemplate,ce=oe.textinfo;if(!Y&&ce&&ce!=="none"){var ue=ce.split("+"),_e=function(be){return ue.indexOf(be)!==-1},Le=_e("label"),ze=_e("text"),Ge=_e("value"),Ve=_e("percent"),rt=pe.separators,pt;if(pt=Le?[se.label]:[],ze){var gt=h.getFirstFilled(oe.text,se.pts);m(gt)&&pt.push(gt)}Ge&&pt.push(h.formatPieValue(se.v,rt)),Ve&&pt.push(h.formatPiePercent(se.v/ee.vTotal,rt)),se.text=pt.join("<br>")}function ht(be){return{label:be.label,value:be.v,valueLabel:h.formatPieValue(be.v,pe.separators),percent:be.v/ee.vTotal,percentLabel:h.formatPiePercent(be.v/ee.vTotal,pe.separators),color:be.color,text:be.text,customdata:r.castOption(oe,be.i,"customdata")}}if(Y){var lt=r.castOption(oe,se.i,"texttemplate");if(!lt)se.text="";else{var Fe=ht(se),Pe=h.getFirstFilled(oe.text,se.pts);(m(Pe)||Pe==="")&&(Fe.text=Pe),se.text=r.texttemplateString({data:[Fe,oe._meta],fallback:oe.texttemplatefallback,labels:Fe,locale:ie._fullLayout._d3locale,template:lt})}}}function W(ie,se){var ee=ie.rotate*Math.PI/180,pe=Math.cos(ee),oe=Math.sin(ee),Y=(se.left+se.right)/2,ce=(se.top+se.bottom)/2;ie.textX=Y*pe-ce*oe,ie.textY=Y*oe+ce*pe,ie.noCenter=!0}Z.exports={plot:E,formatSliceLabel:me,transformInsideText:b,determineInsideTextFont:M,positionTitleOutside:V,prerenderTitles:k,layoutAreas:J,attachFxHandlers:_,computeTransform:W}}}),TS=Ne({"src/traces/pie/style.js"(te,Z){var v=xn(),w=Tx(),C=mc().resizeText;Z.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");C(t,r,"pie"),r.each(function(a){var l=a[0],i=l.trace,s=v.select(this);s.style({opacity:i.opacity}),s.selectAll("path.surface").each(function(o){v.select(this).call(w,o,i,t)})})}}}),Gy=Ne({"src/traces/pie/base_plot.js"(te){var Z=uf();te.name="pie",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),d0=Ne({"src/traces/pie/index.js"(te,Z){Z.exports={attributes:d_(),supplyDefaults:v_().supplyDefaults,supplyLayoutDefaults:U2(),layoutAttributes:bS(),calc:h0().calc,crossTraceCalc:h0().crossTraceCalc,plot:p_().plot,style:TS(),styleOne:Tx(),moduleType:"trace",name:"pie",basePlotModule:Gy(),categories:["pie-like","pie","showLegend"],meta:{}}}}),ob=Ne({"lib/pie.js"(te,Z){Z.exports=d0()}}),eR=Ne({"src/traces/sunburst/base_plot.js"(te){var Z=uf();te.name="sunburst",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),AS=Ne({"src/traces/sunburst/constants.js"(te,Z){Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),sb=Ne({"src/traces/sunburst/attributes.js"(te,Z){var v=ns(),{hovertemplateAttrs:w,texttemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=Vu(),r=Oc().attributes,a=d_(),l=AS(),i=co().extendFlat,s=Dd().pattern;Z.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:i({colors:{valType:"data_array",editType:"calc"},line:{color:i({},a.marker.line.color,{dflt:null}),width:i({},a.marker.line.width,{dflt:1}),editType:"calc"},pattern:s,editType:"calc"},t("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:a.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:C({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:P({editType:"plot"}),hovertext:a.hovertext,hoverinfo:i({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:w({},{keys:l.eventDataKeys}),hovertemplatefallback:P(),textfont:a.textfont,insidetextorientation:a.insidetextorientation,insidetextfont:a.insidetextfont,outsidetextfont:i({},a.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:a.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:r({name:"sunburst",trace:!0,editType:"calc"})}}}),SS=Ne({"src/traces/sunburst/layout_attributes.js"(te,Z){Z.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),qC=Ne({"src/traces/sunburst/defaults.js"(te,Z){var v=In(),w=sb(),C=Oc().defaults,P=vp().handleText,t=v_().handleMarkerDefaults,r=Dc(),a=r.hasColorscale,l=r.handleDefaults;Z.exports=function(s,o,u,d){function h(M,k){return v.coerce(s,o,w,M,k)}var y=h("labels"),m=h("parents");if(!y||!y.length||!m||!m.length){o.visible=!1;return}var E=h("values");E&&E.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),t(s,o,d,h);var c=o._hasColorscale=a(s,"marker","colors")||(s.marker||{}).coloraxis;c&&l(s,o,d,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",c?1:.7);var _=h("text");h("texttemplate"),h("texttemplatefallback"),o.texttemplate||h("textinfo",v.isArrayOrTypedArray(_)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var T="auto";P(s,o,d,h,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),C(o,d,h),o._length=null}}}),tR=Ne({"src/traces/sunburst/layout_defaults.js"(te,Z){var v=In(),w=SS();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("sunburstcolorway",t.colorway),r("extendsunburstcolors")}}}),m_=Ne({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(De,Ee){return De.parent===Ee.parent?1:2}function C(De){return De.reduce(P,0)/De.length}function P(De,Ee){return De+Ee.x}function t(De){return 1+De.reduce(r,0)}function r(De,Ee){return Math.max(De,Ee.y)}function a(De){for(var Ee;Ee=De.children;)De=Ee[0];return De}function l(De){for(var Ee;Ee=De.children;)De=Ee[Ee.length-1];return De}function i(){var De=w,Ee=1,Ae=1,Ie=!1;function tt(st){var Ft,Nt=0;st.eachAfter(function(Sr){var Kr=Sr.children;Kr?(Sr.x=C(Kr),Sr.y=t(Kr)):(Sr.x=Ft?Nt+=De(Sr,Ft):0,Sr.y=0,Ft=Sr)});var Xt=a(st),lr=l(st),Rr=Xt.x-De(Xt,lr)/2,Mr=lr.x+De(lr,Xt)/2;return st.eachAfter(Ie?function(Sr){Sr.x=(Sr.x-st.x)*Ee,Sr.y=(st.y-Sr.y)*Ae}:function(Sr){Sr.x=(Sr.x-Rr)/(Mr-Rr)*Ee,Sr.y=(1-(st.y?Sr.y/st.y:1))*Ae})}return tt.separation=function(st){return arguments.length?(De=st,tt):De},tt.size=function(st){return arguments.length?(Ie=!1,Ee=+st[0],Ae=+st[1],tt):Ie?null:[Ee,Ae]},tt.nodeSize=function(st){return arguments.length?(Ie=!0,Ee=+st[0],Ae=+st[1],tt):Ie?[Ee,Ae]:null},tt}function s(De){var Ee=0,Ae=De.children,Ie=Ae&&Ae.length;if(!Ie)Ee=1;else for(;--Ie>=0;)Ee+=Ae[Ie].value;De.value=Ee}function o(){return this.eachAfter(s)}function u(De){var Ee=this,Ae,Ie=[Ee],tt,st,Ft;do for(Ae=Ie.reverse(),Ie=[];Ee=Ae.pop();)if(De(Ee),tt=Ee.children,tt)for(st=0,Ft=tt.length;st<Ft;++st)Ie.push(tt[st]);while(Ie.length);return this}function d(De){for(var Ee=this,Ae=[Ee],Ie,tt;Ee=Ae.pop();)if(De(Ee),Ie=Ee.children,Ie)for(tt=Ie.length-1;tt>=0;--tt)Ae.push(Ie[tt]);return this}function h(De){for(var Ee=this,Ae=[Ee],Ie=[],tt,st,Ft;Ee=Ae.pop();)if(Ie.push(Ee),tt=Ee.children,tt)for(st=0,Ft=tt.length;st<Ft;++st)Ae.push(tt[st]);for(;Ee=Ie.pop();)De(Ee);return this}function y(De){return this.eachAfter(function(Ee){for(var Ae=+De(Ee.data)||0,Ie=Ee.children,tt=Ie&&Ie.length;--tt>=0;)Ae+=Ie[tt].value;Ee.value=Ae})}function m(De){return this.eachBefore(function(Ee){Ee.children&&Ee.children.sort(De)})}function E(De){for(var Ee=this,Ae=c(Ee,De),Ie=[Ee];Ee!==Ae;)Ee=Ee.parent,Ie.push(Ee);for(var tt=Ie.length;De!==Ae;)Ie.splice(tt,0,De),De=De.parent;return Ie}function c(De,Ee){if(De===Ee)return De;var Ae=De.ancestors(),Ie=Ee.ancestors(),tt=null;for(De=Ae.pop(),Ee=Ie.pop();De===Ee;)tt=De,De=Ae.pop(),Ee=Ie.pop();return tt}function _(){for(var De=this,Ee=[De];De=De.parent;)Ee.push(De);return Ee}function T(){var De=[];return this.each(function(Ee){De.push(Ee)}),De}function M(){var De=[];return this.eachBefore(function(Ee){Ee.children||De.push(Ee)}),De}function k(){var De=this,Ee=[];return De.each(function(Ae){Ae!==De&&Ee.push({source:Ae.parent,target:Ae})}),Ee}function b(De,Ee){var Ae=new x(De),Ie=+De.value&&(Ae.value=De.value),tt,st=[Ae],Ft,Nt,Xt,lr;for(Ee==null&&(Ee=g);tt=st.pop();)if(Ie&&(tt.value=+tt.data.value),(Nt=Ee(tt.data))&&(lr=Nt.length))for(tt.children=new Array(lr),Xt=lr-1;Xt>=0;--Xt)st.push(Ft=tt.children[Xt]=new x(Nt[Xt])),Ft.parent=tt,Ft.depth=tt.depth+1;return Ae.eachBefore(p)}function A(){return b(this).eachBefore(f)}function g(De){return De.children}function f(De){De.data=De.data.data}function p(De){var Ee=0;do De.height=Ee;while((De=De.parent)&&De.height<++Ee)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=b.prototype={constructor:x,count:o,each:u,eachAfter:h,eachBefore:d,sum:y,sort:m,path:E,ancestors:_,descendants:T,leaves:M,links:k,copy:A};var N=Array.prototype.slice;function D(De){for(var Ee=De.length,Ae,Ie;Ee;)Ie=Math.random()*Ee--|0,Ae=De[Ee],De[Ee]=De[Ie],De[Ie]=Ae;return De}function B(De){for(var Ee=0,Ae=(De=D(N.call(De))).length,Ie=[],tt,st;Ee<Ae;)tt=De[Ee],st&&q(st,tt)?++Ee:(st=H(Ie=U(Ie,tt)),Ee=0);return st}function U(De,Ee){var Ae,Ie;if(z(Ee,De))return[Ee];for(Ae=0;Ae<De.length;++Ae)if(V(Ee,De[Ae])&&z(J(De[Ae],Ee),De))return[De[Ae],Ee];for(Ae=0;Ae<De.length-1;++Ae)for(Ie=Ae+1;Ie<De.length;++Ie)if(V(J(De[Ae],De[Ie]),Ee)&&V(J(De[Ae],Ee),De[Ie])&&V(J(De[Ie],Ee),De[Ae])&&z(le(De[Ae],De[Ie],Ee),De))return[De[Ae],De[Ie],Ee];throw new Error}function V(De,Ee){var Ae=De.r-Ee.r,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae<0||Ae*Ae<Ie*Ie+tt*tt}function q(De,Ee){var Ae=De.r-Ee.r+1e-6,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae>0&&Ae*Ae>Ie*Ie+tt*tt}function z(De,Ee){for(var Ae=0;Ae<Ee.length;++Ae)if(!q(De,Ee[Ae]))return!1;return!0}function H(De){switch(De.length){case 1:return G(De[0]);case 2:return J(De[0],De[1]);case 3:return le(De[0],De[1],De[2])}}function G(De){return{x:De.x,y:De.y,r:De.r}}function J(De,Ee){var Ae=De.x,Ie=De.y,tt=De.r,st=Ee.x,Ft=Ee.y,Nt=Ee.r,Xt=st-Ae,lr=Ft-Ie,Rr=Nt-tt,Mr=Math.sqrt(Xt*Xt+lr*lr);return{x:(Ae+st+Xt/Mr*Rr)/2,y:(Ie+Ft+lr/Mr*Rr)/2,r:(Mr+tt+Nt)/2}}function le(De,Ee,Ae){var Ie=De.x,tt=De.y,st=De.r,Ft=Ee.x,Nt=Ee.y,Xt=Ee.r,lr=Ae.x,Rr=Ae.y,Mr=Ae.r,Sr=Ie-Ft,Kr=Ie-lr,qn=tt-Nt,ha=tt-Rr,ia=Xt-st,xa=Mr-st,ba=Ie*Ie+tt*tt-st*st,ea=ba-Ft*Ft-Nt*Nt+Xt*Xt,Za=ba-lr*lr-Rr*Rr+Mr*Mr,ui=Kr*qn-Sr*ha,_r=(qn*Za-ha*ea)/(ui*2)-Ie,Qt=(ha*ia-qn*xa)/ui,yr=(Kr*ea-Sr*Za)/(ui*2)-tt,br=(Sr*xa-Kr*ia)/ui,nn=Qt*Qt+br*br-1,wn=2*(st+_r*Qt+yr*br),Ln=_r*_r+yr*yr-st*st,Fn=-(nn?(wn+Math.sqrt(wn*wn-4*nn*Ln))/(2*nn):Ln/wn);return{x:Ie+_r+Qt*Fn,y:tt+yr+br*Fn,r:Fn}}function ye(De,Ee,Ae){var Ie=De.x-Ee.x,tt,st,Ft=De.y-Ee.y,Nt,Xt,lr=Ie*Ie+Ft*Ft;lr?(st=Ee.r+Ae.r,st*=st,Xt=De.r+Ae.r,Xt*=Xt,st>Xt?(tt=(lr+Xt-st)/(2*lr),Nt=Math.sqrt(Math.max(0,Xt/lr-tt*tt)),Ae.x=De.x-tt*Ie-Nt*Ft,Ae.y=De.y-tt*Ft+Nt*Ie):(tt=(lr+st-Xt)/(2*lr),Nt=Math.sqrt(Math.max(0,st/lr-tt*tt)),Ae.x=Ee.x+tt*Ie-Nt*Ft,Ae.y=Ee.y+tt*Ft+Nt*Ie)):(Ae.x=Ee.x+Ae.r,Ae.y=Ee.y)}function de(De,Ee){var Ae=De.r+Ee.r-1e-6,Ie=Ee.x-De.x,tt=Ee.y-De.y;return Ae>0&&Ae*Ae>Ie*Ie+tt*tt}function me(De){var Ee=De._,Ae=De.next._,Ie=Ee.r+Ae.r,tt=(Ee.x*Ae.r+Ae.x*Ee.r)/Ie,st=(Ee.y*Ae.r+Ae.y*Ee.r)/Ie;return tt*tt+st*st}function W(De){this._=De,this.next=null,this.previous=null}function ie(De){if(!(tt=De.length))return 0;var Ee,Ae,Ie,tt,st,Ft,Nt,Xt,lr,Rr,Mr;if(Ee=De[0],Ee.x=0,Ee.y=0,!(tt>1))return Ee.r;if(Ae=De[1],Ee.x=-Ae.r,Ae.x=Ee.r,Ae.y=0,!(tt>2))return Ee.r+Ae.r;ye(Ae,Ee,Ie=De[2]),Ee=new W(Ee),Ae=new W(Ae),Ie=new W(Ie),Ee.next=Ie.previous=Ae,Ae.next=Ee.previous=Ie,Ie.next=Ae.previous=Ee;e:for(Nt=3;Nt<tt;++Nt){ye(Ee._,Ae._,Ie=De[Nt]),Ie=new W(Ie),Xt=Ae.next,lr=Ee.previous,Rr=Ae._.r,Mr=Ee._.r;do if(Rr<=Mr){if(de(Xt._,Ie._)){Ae=Xt,Ee.next=Ae,Ae.previous=Ee,--Nt;continue e}Rr+=Xt._.r,Xt=Xt.next}else{if(de(lr._,Ie._)){Ee=lr,Ee.next=Ae,Ae.previous=Ee,--Nt;continue e}Mr+=lr._.r,lr=lr.previous}while(Xt!==lr.next);for(Ie.previous=Ee,Ie.next=Ae,Ee.next=Ae.previous=Ae=Ie,st=me(Ee);(Ie=Ie.next)!==Ae;)(Ft=me(Ie))<st&&(Ee=Ie,st=Ft);Ae=Ee.next}for(Ee=[Ae._],Ie=Ae;(Ie=Ie.next)!==Ae;)Ee.push(Ie._);for(Ie=B(Ee),Nt=0;Nt<tt;++Nt)Ee=De[Nt],Ee.x-=Ie.x,Ee.y-=Ie.y;return Ie.r}function se(De){return ie(De),De}function ee(De){return De==null?null:pe(De)}function pe(De){if(typeof De!="function")throw new Error;return De}function oe(){return 0}function Y(De){return function(){return De}}function ce(De){return Math.sqrt(De.value)}function ue(){var De=null,Ee=1,Ae=1,Ie=oe;function tt(st){return st.x=Ee/2,st.y=Ae/2,De?st.eachBefore(_e(De)).eachAfter(Le(Ie,.5)).eachBefore(ze(1)):st.eachBefore(_e(ce)).eachAfter(Le(oe,1)).eachAfter(Le(Ie,st.r/Math.min(Ee,Ae))).eachBefore(ze(Math.min(Ee,Ae)/(2*st.r))),st}return tt.radius=function(st){return arguments.length?(De=ee(st),tt):De},tt.size=function(st){return arguments.length?(Ee=+st[0],Ae=+st[1],tt):[Ee,Ae]},tt.padding=function(st){return arguments.length?(Ie=typeof st=="function"?st:Y(+st),tt):Ie},tt}function _e(De){return function(Ee){Ee.children||(Ee.r=Math.max(0,+De(Ee)||0))}}function Le(De,Ee){return function(Ae){if(Ie=Ae.children){var Ie,tt,st=Ie.length,Ft=De(Ae)*Ee||0,Nt;if(Ft)for(tt=0;tt<st;++tt)Ie[tt].r+=Ft;if(Nt=ie(Ie),Ft)for(tt=0;tt<st;++tt)Ie[tt].r-=Ft;Ae.r=Nt+Ft}}}function ze(De){return function(Ee){var Ae=Ee.parent;Ee.r*=De,Ae&&(Ee.x=Ae.x+De*Ee.x,Ee.y=Ae.y+De*Ee.y)}}function Ge(De){De.x0=Math.round(De.x0),De.y0=Math.round(De.y0),De.x1=Math.round(De.x1),De.y1=Math.round(De.y1)}function Ve(De,Ee,Ae,Ie,tt){for(var st=De.children,Ft,Nt=-1,Xt=st.length,lr=De.value&&(Ie-Ee)/De.value;++Nt<Xt;)Ft=st[Nt],Ft.y0=Ae,Ft.y1=tt,Ft.x0=Ee,Ft.x1=Ee+=Ft.value*lr}function rt(){var De=1,Ee=1,Ae=0,Ie=!1;function tt(Ft){var Nt=Ft.height+1;return Ft.x0=Ft.y0=Ae,Ft.x1=De,Ft.y1=Ee/Nt,Ft.eachBefore(st(Ee,Nt)),Ie&&Ft.eachBefore(Ge),Ft}function st(Ft,Nt){return function(Xt){Xt.children&&Ve(Xt,Xt.x0,Ft*(Xt.depth+1)/Nt,Xt.x1,Ft*(Xt.depth+2)/Nt);var lr=Xt.x0,Rr=Xt.y0,Mr=Xt.x1-Ae,Sr=Xt.y1-Ae;Mr<lr&&(lr=Mr=(lr+Mr)/2),Sr<Rr&&(Rr=Sr=(Rr+Sr)/2),Xt.x0=lr,Xt.y0=Rr,Xt.x1=Mr,Xt.y1=Sr}}return tt.round=function(Ft){return arguments.length?(Ie=!!Ft,tt):Ie},tt.size=function(Ft){return arguments.length?(De=+Ft[0],Ee=+Ft[1],tt):[De,Ee]},tt.padding=function(Ft){return arguments.length?(Ae=+Ft,tt):Ae},tt}var pt="$",gt={depth:-1},ht={};function lt(De){return De.id}function Fe(De){return De.parentId}function Pe(){var De=lt,Ee=Fe;function Ae(Ie){var tt,st,Ft=Ie.length,Nt,Xt,lr,Rr=new Array(Ft),Mr,Sr,Kr={};for(st=0;st<Ft;++st)tt=Ie[st],lr=Rr[st]=new x(tt),(Mr=De(tt,st,Ie))!=null&&(Mr+="")&&(Sr=pt+(lr.id=Mr),Kr[Sr]=Sr in Kr?ht:lr);for(st=0;st<Ft;++st)if(lr=Rr[st],Mr=Ee(Ie[st],st,Ie),Mr==null||!(Mr+="")){if(Nt)throw new Error("multiple roots");Nt=lr}else{if(Xt=Kr[pt+Mr],!Xt)throw new Error("missing: "+Mr);if(Xt===ht)throw new Error("ambiguous: "+Mr);Xt.children?Xt.children.push(lr):Xt.children=[lr],lr.parent=Xt}if(!Nt)throw new Error("no root");if(Nt.parent=gt,Nt.eachBefore(function(qn){qn.depth=qn.parent.depth+1,--Ft}).eachBefore(p),Nt.parent=null,Ft>0)throw new Error("cycle");return Nt}return Ae.id=function(Ie){return arguments.length?(De=pe(Ie),Ae):De},Ae.parentId=function(Ie){return arguments.length?(Ee=pe(Ie),Ae):Ee},Ae}function be(De,Ee){return De.parent===Ee.parent?1:2}function Ye(De){var Ee=De.children;return Ee?Ee[0]:De.t}function mt(De){var Ee=De.children;return Ee?Ee[Ee.length-1]:De.t}function bt(De,Ee,Ae){var Ie=Ae/(Ee.i-De.i);Ee.c-=Ie,Ee.s+=Ae,De.c+=Ie,Ee.z+=Ae,Ee.m+=Ae}function ft(De){for(var Ee=0,Ae=0,Ie=De.children,tt=Ie.length,st;--tt>=0;)st=Ie[tt],st.z+=Ee,st.m+=Ee,Ee+=st.s+(Ae+=st.c)}function Wt(De,Ee,Ae){return De.a.parent===Ee.parent?De.a:Ae}function Zt(De,Ee){this._=De,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ee}Zt.prototype=Object.create(x.prototype);function cr(De){for(var Ee=new Zt(De,0),Ae,Ie=[Ee],tt,st,Ft,Nt;Ae=Ie.pop();)if(st=Ae._.children)for(Ae.children=new Array(Nt=st.length),Ft=Nt-1;Ft>=0;--Ft)Ie.push(tt=Ae.children[Ft]=new Zt(st[Ft],Ft)),tt.parent=Ae;return(Ee.parent=new Zt(null,0)).children=[Ee],Ee}function pr(){var De=be,Ee=1,Ae=1,Ie=null;function tt(lr){var Rr=cr(lr);if(Rr.eachAfter(st),Rr.parent.m=-Rr.z,Rr.eachBefore(Ft),Ie)lr.eachBefore(Xt);else{var Mr=lr,Sr=lr,Kr=lr;lr.eachBefore(function(ba){ba.x<Mr.x&&(Mr=ba),ba.x>Sr.x&&(Sr=ba),ba.depth>Kr.depth&&(Kr=ba)});var qn=Mr===Sr?1:De(Mr,Sr)/2,ha=qn-Mr.x,ia=Ee/(Sr.x+qn+ha),xa=Ae/(Kr.depth||1);lr.eachBefore(function(ba){ba.x=(ba.x+ha)*ia,ba.y=ba.depth*xa})}return lr}function st(lr){var Rr=lr.children,Mr=lr.parent.children,Sr=lr.i?Mr[lr.i-1]:null;if(Rr){ft(lr);var Kr=(Rr[0].z+Rr[Rr.length-1].z)/2;Sr?(lr.z=Sr.z+De(lr._,Sr._),lr.m=lr.z-Kr):lr.z=Kr}else Sr&&(lr.z=Sr.z+De(lr._,Sr._));lr.parent.A=Nt(lr,Sr,lr.parent.A||Mr[0])}function Ft(lr){lr._.x=lr.z+lr.parent.m,lr.m+=lr.parent.m}function Nt(lr,Rr,Mr){if(Rr){for(var Sr=lr,Kr=lr,qn=Rr,ha=Sr.parent.children[0],ia=Sr.m,xa=Kr.m,ba=qn.m,ea=ha.m,Za;qn=mt(qn),Sr=Ye(Sr),qn&&Sr;)ha=Ye(ha),Kr=mt(Kr),Kr.a=lr,Za=qn.z+ba-Sr.z-ia+De(qn._,Sr._),Za>0&&(bt(Wt(qn,lr,Mr),lr,Za),ia+=Za,xa+=Za),ba+=qn.m,ia+=Sr.m,ea+=ha.m,xa+=Kr.m;qn&&!mt(Kr)&&(Kr.t=qn,Kr.m+=ba-xa),Sr&&!Ye(ha)&&(ha.t=Sr,ha.m+=ia-ea,Mr=lr)}return Mr}function Xt(lr){lr.x*=Ee,lr.y=lr.depth*Ae}return tt.separation=function(lr){return arguments.length?(De=lr,tt):De},tt.size=function(lr){return arguments.length?(Ie=!1,Ee=+lr[0],Ae=+lr[1],tt):Ie?null:[Ee,Ae]},tt.nodeSize=function(lr){return arguments.length?(Ie=!0,Ee=+lr[0],Ae=+lr[1],tt):Ie?[Ee,Ae]:null},tt}function Br(De,Ee,Ae,Ie,tt){for(var st=De.children,Ft,Nt=-1,Xt=st.length,lr=De.value&&(tt-Ae)/De.value;++Nt<Xt;)Ft=st[Nt],Ft.x0=Ee,Ft.x1=Ie,Ft.y0=Ae,Ft.y1=Ae+=Ft.value*lr}var Fr=(1+Math.sqrt(5))/2;function cn(De,Ee,Ae,Ie,tt,st){for(var Ft=[],Nt=Ee.children,Xt,lr,Rr=0,Mr=0,Sr=Nt.length,Kr,qn,ha=Ee.value,ia,xa,ba,ea,Za,ui,_r;Rr<Sr;){Kr=tt-Ae,qn=st-Ie;do ia=Nt[Mr++].value;while(!ia&&Mr<Sr);for(xa=ba=ia,ui=Math.max(qn/Kr,Kr/qn)/(ha*De),_r=ia*ia*ui,Za=Math.max(ba/_r,_r/xa);Mr<Sr;++Mr){if(ia+=lr=Nt[Mr].value,lr<xa&&(xa=lr),lr>ba&&(ba=lr),_r=ia*ia*ui,ea=Math.max(ba/_r,_r/xa),ea>Za){ia-=lr;break}Za=ea}Ft.push(Xt={value:ia,dice:Kr<qn,children:Nt.slice(Rr,Mr)}),Xt.dice?Ve(Xt,Ae,Ie,tt,ha?Ie+=qn*ia/ha:st):Br(Xt,Ae,Ie,ha?Ae+=Kr*ia/ha:tt,st),ha-=ia,Rr=Mr}return Ft}var Nr=(function De(Ee){function Ae(Ie,tt,st,Ft,Nt){cn(Ee,Ie,tt,st,Ft,Nt)}return Ae.ratio=function(Ie){return De((Ie=+Ie)>1?Ie:1)},Ae})(Fr);function Jr(){var De=Nr,Ee=!1,Ae=1,Ie=1,tt=[0],st=oe,Ft=oe,Nt=oe,Xt=oe,lr=oe;function Rr(Sr){return Sr.x0=Sr.y0=0,Sr.x1=Ae,Sr.y1=Ie,Sr.eachBefore(Mr),tt=[0],Ee&&Sr.eachBefore(Ge),Sr}function Mr(Sr){var Kr=tt[Sr.depth],qn=Sr.x0+Kr,ha=Sr.y0+Kr,ia=Sr.x1-Kr,xa=Sr.y1-Kr;ia<qn&&(qn=ia=(qn+ia)/2),xa<ha&&(ha=xa=(ha+xa)/2),Sr.x0=qn,Sr.y0=ha,Sr.x1=ia,Sr.y1=xa,Sr.children&&(Kr=tt[Sr.depth+1]=st(Sr)/2,qn+=lr(Sr)-Kr,ha+=Ft(Sr)-Kr,ia-=Nt(Sr)-Kr,xa-=Xt(Sr)-Kr,ia<qn&&(qn=ia=(qn+ia)/2),xa<ha&&(ha=xa=(ha+xa)/2),De(Sr,qn,ha,ia,xa))}return Rr.round=function(Sr){return arguments.length?(Ee=!!Sr,Rr):Ee},Rr.size=function(Sr){return arguments.length?(Ae=+Sr[0],Ie=+Sr[1],Rr):[Ae,Ie]},Rr.tile=function(Sr){return arguments.length?(De=pe(Sr),Rr):De},Rr.padding=function(Sr){return arguments.length?Rr.paddingInner(Sr).paddingOuter(Sr):Rr.paddingInner()},Rr.paddingInner=function(Sr){return arguments.length?(st=typeof Sr=="function"?Sr:Y(+Sr),Rr):st},Rr.paddingOuter=function(Sr){return arguments.length?Rr.paddingTop(Sr).paddingRight(Sr).paddingBottom(Sr).paddingLeft(Sr):Rr.paddingTop()},Rr.paddingTop=function(Sr){return arguments.length?(Ft=typeof Sr=="function"?Sr:Y(+Sr),Rr):Ft},Rr.paddingRight=function(Sr){return arguments.length?(Nt=typeof Sr=="function"?Sr:Y(+Sr),Rr):Nt},Rr.paddingBottom=function(Sr){return arguments.length?(Xt=typeof Sr=="function"?Sr:Y(+Sr),Rr):Xt},Rr.paddingLeft=function(Sr){return arguments.length?(lr=typeof Sr=="function"?Sr:Y(+Sr),Rr):lr},Rr}function Dt(De,Ee,Ae,Ie,tt){var st=De.children,Ft,Nt=st.length,Xt,lr=new Array(Nt+1);for(lr[0]=Xt=Ft=0;Ft<Nt;++Ft)lr[Ft+1]=Xt+=st[Ft].value;Rr(0,Nt,De.value,Ee,Ae,Ie,tt);function Rr(Mr,Sr,Kr,qn,ha,ia,xa){if(Mr>=Sr-1){var ba=st[Mr];ba.x0=qn,ba.y0=ha,ba.x1=ia,ba.y1=xa;return}for(var ea=lr[Mr],Za=Kr/2+ea,ui=Mr+1,_r=Sr-1;ui<_r;){var Qt=ui+_r>>>1;lr[Qt]<Za?ui=Qt+1:_r=Qt}Za-lr[ui-1]<lr[ui]-Za&&Mr+1<ui&&--ui;var yr=lr[ui]-ea,br=Kr-yr;if(ia-qn>xa-ha){var nn=(qn*br+ia*yr)/Kr;Rr(Mr,ui,yr,qn,ha,nn,xa),Rr(ui,Sr,br,nn,ha,ia,xa)}else{var wn=(ha*br+xa*yr)/Kr;Rr(Mr,ui,yr,qn,ha,ia,wn),Rr(ui,Sr,br,qn,wn,ia,xa)}}}function $e(De,Ee,Ae,Ie,tt){(De.depth&1?Br:Ve)(De,Ee,Ae,Ie,tt)}var ot=(function De(Ee){function Ae(Ie,tt,st,Ft,Nt){if((Xt=Ie._squarify)&&Xt.ratio===Ee)for(var Xt,lr,Rr,Mr,Sr=-1,Kr,qn=Xt.length,ha=Ie.value;++Sr<qn;){for(lr=Xt[Sr],Rr=lr.children,Mr=lr.value=0,Kr=Rr.length;Mr<Kr;++Mr)lr.value+=Rr[Mr].value;lr.dice?Ve(lr,tt,st,Ft,st+=(Nt-st)*lr.value/ha):Br(lr,tt,st,tt+=(Ft-tt)*lr.value/ha,Nt),ha-=lr.value}else Ie._squarify=Xt=cn(Ee,Ie,tt,st,Ft,Nt),Xt.ratio=Ee}return Ae.ratio=function(Ie){return De((Ie=+Ie)>1?Ie:1)},Ae})(Fr);v.cluster=i,v.hierarchy=b,v.pack=ue,v.packEnclose=B,v.packSiblings=se,v.partition=rt,v.stratify=Pe,v.tree=pr,v.treemap=Jr,v.treemapBinary=Dt,v.treemapDice=Ve,v.treemapResquarify=ot,v.treemapSlice=Br,v.treemapSliceDice=$e,v.treemapSquarify=Nr,Object.defineProperty(v,"__esModule",{value:!0})})}}),lb=Ne({"src/traces/sunburst/calc.js"(te){var Z=m_(),v=la(),w=In(),C=Dc().makeColorScaleFuncFromTrace,P=h0().makePullColorFn,t=h0().generateExtendedColors,r=Dc().calc,a=ja().ALMOST_EQUAL,l={},i={},s={};te.calc=function(u,d){var h=u._fullLayout,y=d.ids,m=w.isArrayOrTypedArray(y),E=d.labels,c=d.parents,_=d.values,T=w.isArrayOrTypedArray(_),M=[],k={},b={},A=function(se,ee){k[se]?k[se].push(ee):k[se]=[ee],b[ee]=1},g=function(se){return se||typeof se=="number"},f=function(se){return!T||v(_[se])&&_[se]>=0},p,x,N;m?(p=Math.min(y.length,c.length),x=function(se){return g(y[se])&&f(se)},N=function(se){return String(y[se])}):(p=Math.min(E.length,c.length),x=function(se){return g(E[se])&&f(se)},N=function(se){return String(E[se])}),T&&(p=Math.min(p,_.length));for(var D=0;D<p;D++)if(x(D)){var B=N(D),U=g(c[D])?String(c[D]):"",V={i:D,id:B,pid:U,label:g(E[D])?String(E[D]):""};T&&(V.v=+_[D]),M.push(V),A(U,B)}if(k[""]){if(k[""].length>1){for(var H=w.randstr(),G=0;G<M.length;G++)M[G].pid===""&&(M[G].pid=H);M.unshift({hasMultipleRoots:!0,id:H,pid:"",label:""})}}else{var q=[],z;for(z in k)b[z]||q.push(z);if(q.length===1)z=q[0],M.unshift({hasImpliedRoot:!0,id:z,pid:"",label:z});else return w.warn(["Multiple implied roots, cannot build",d.type,"hierarchy of",d.name+".","These roots include:",q.join(", ")].join(" "))}var J;try{J=Z.stratify().id(function(se){return se.id}).parentId(function(se){return se.pid})(M)}catch(se){return w.warn(["Failed to build",d.type,"hierarchy of",d.name+".","Error:",se.message].join(" "))}var le=Z.hierarchy(J),ye=!1;if(T)switch(d.branchvalues){case"remainder":le.sum(function(se){return se.data.v});break;case"total":le.each(function(se){var ee=se.data.data,pe=ee.v;if(se.children){var oe=se.children.reduce(function(Y,ce){return Y+ce.data.data.v},0);if((ee.hasImpliedRoot||ee.hasMultipleRoots)&&(pe=oe),pe<oe*a)return ye=!0,w.warn(["Total value for node",se.data.data.id,"of",d.name,"is smaller than the sum of its children.",`
parent value =`,pe,`
children sum =`,oe].join(" "))}se.value=pe});break}else o(le,d,{branches:d.count.indexOf("branches")!==-1,leaves:d.count.indexOf("leaves")!==-1});if(!ye){d.sort&&le.sort(function(se,ee){return ee.value-se.value});var de,me,W=d.marker.colors||[],ie=!!W.length;return d._hasColorscale?(ie||(W=T?d.values:d._values),r(u,d,{vals:W,containerStr:"marker",cLetter:"c"}),me=C(d.marker)):de=P(h["_"+d.type+"colormap"]),le.each(function(se){var ee=se.data.data;ee.color=d._hasColorscale?me(W[ee.i]):de(W[ee.i],ee.id)}),M[0].hierarchy=le,M}},te._runCrossTraceCalc=function(u,d){var h=d._fullLayout,y=d.calcdata,m=h[u+"colorway"],E=h["_"+u+"colormap"];h["extend"+u+"colors"]&&(m=t(m,u==="icicle"?s:u==="treemap"?i:l));var c=0,_;function T(A){var g=A.data.data,f=g.id;g.color===!1&&(E[f]?g.color=E[f]:A.parent?A.parent.parent?g.color=A.parent.data.data.color:(E[f]=g.color=m[c%m.length],c++):g.color=_)}for(var M=0;M<y.length;M++){var k=y[M],b=k[0];b.trace.type===u&&b.hierarchy&&(_=b.trace.root.color,b.hierarchy.each(T))}},te.crossTraceCalc=function(u){return te._runCrossTraceCalc("sunburst",u)};function o(u,d,h){var y=0,m=u.children;if(m){for(var E=m.length,c=0;c<E;c++)y+=o(m[c],d,h);h.branches&&y++}else h.leaves&&y++;return u.value=u.data.data.value=y,d._values||(d._values=[]),d._values[u.data.data.i]=y,y}}});function Gg(te,Z,v){te.prototype=Z.prototype=v,v.constructor=te}function ub(te,Z){var v=Object.create(te.prototype);for(var w in Z)v[w]=Z[w];return v}var cb=jr({"node_modules/d3-color/src/define.js"(){}});function v0(){}function VC(){return this.rgb().formatHex()}function rR(){return this.rgb().formatHex8()}function fb(){return ES(this).formatHsl()}function HC(){return this.rgb().formatRgb()}function y_(te){var Z,v;return te=(te+"").trim().toLowerCase(),(Z=CS.exec(te))?(v=Z[1].length,Z=parseInt(Z[1],16),v===6?Ju(Z):v===3?new jd(Z>>8&15|Z>>4&240,Z>>4&15|Z&240,(Z&15)<<4|Z&15,1):v===8?g_(Z>>24&255,Z>>16&255,Z>>8&255,(Z&255)/255):v===4?g_(Z>>12&15|Z>>8&240,Z>>8&15|Z>>4&240,Z>>4&15|Z&240,((Z&15)<<4|Z&15)/255):null):(Z=kS.exec(te))?new jd(Z[1],Z[2],Z[3],1):(Z=X2.exec(te))?new jd(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,1):(Z=W2.exec(te))?g_(Z[1],Z[2],Z[3],Z[4]):(Z=XC.exec(te))?g_(Z[1]*255/100,Z[2]*255/100,Z[3]*255/100,Z[4]):(Z=PS.exec(te))?GC(Z[1],Z[2]/100,Z[3]/100,1):(Z=WC.exec(te))?GC(Z[1],Z[2]/100,Z[3]/100,Z[4]):Y2.hasOwnProperty(te)?Ju(Y2[te]):te==="transparent"?new jd(NaN,NaN,NaN,0):null}function Ju(te){return new jd(te>>16&255,te>>8&255,te&255,1)}function g_(te,Z,v,w){return w<=0&&(te=Z=v=NaN),new jd(te,Z,v,w)}function __(te){return te instanceof v0||(te=y_(te)),te?(te=te.rgb(),new jd(te.r,te.g,te.b,te.opacity)):new jd}function x_(te,Z,v,w){return arguments.length===1?__(te):new jd(te,Z,v,w??1)}function jd(te,Z,v,w){this.r=+te,this.g=+Z,this.b=+v,this.opacity=+w}function q2(){return`#${Xg(this.r)}${Xg(this.g)}${Xg(this.b)}`}function hb(){return`#${Xg(this.r)}${Xg(this.g)}${Xg(this.b)}${Xg((isNaN(this.opacity)?1:this.opacity)*255)}`}function db(){const te=V2(this.opacity);return`${te===1?"rgb(":"rgba("}${Xy(this.r)}, ${Xy(this.g)}, ${Xy(this.b)}${te===1?")":`, ${te})`}`}function V2(te){return isNaN(te)?1:Math.max(0,Math.min(1,te))}function Xy(te){return Math.max(0,Math.min(255,Math.round(te)||0))}function Xg(te){return te=Xy(te),(te<16?"0":"")+te.toString(16)}function GC(te,Z,v,w){return w<=0?te=Z=v=NaN:v<=0||v>=1?te=Z=NaN:Z<=0&&(te=NaN),new Qu(te,Z,v,w)}function ES(te){if(te instanceof Qu)return new Qu(te.h,te.s,te.l,te.opacity);if(te instanceof v0||(te=y_(te)),!te)return new Qu;if(te instanceof Qu)return te;te=te.rgb();var Z=te.r/255,v=te.g/255,w=te.b/255,C=Math.min(Z,v,w),P=Math.max(Z,v,w),t=NaN,r=P-C,a=(P+C)/2;return r?(Z===P?t=(v-w)/r+(v<w)*6:v===P?t=(w-Z)/r+2:t=(Z-v)/r+4,r/=a<.5?P+C:2-P-C,t*=60):r=a>0&&a<1?0:t,new Qu(t,r,a,te.opacity)}function H2(te,Z,v,w){return arguments.length===1?ES(te):new Qu(te,Z,v,w??1)}function Qu(te,Z,v,w){this.h=+te,this.s=+Z,this.l=+v,this.opacity=+w}function G2(te){return te=(te||0)%360,te<0?te+360:te}function Md(te){return Math.max(0,Math.min(1,te||0))}function MS(te,Z,v){return(te<60?Z+(v-Z)*te/60:te<180?v:te<240?Z+(v-Z)*(240-te)/60:Z)*255}var ey,Wg,ty,Wy,xp,CS,kS,X2,W2,XC,PS,WC,Y2,LS=jr({"node_modules/d3-color/src/color.js"(){cb(),ey=.7,Wg=1/ey,ty="\\s*([+-]?\\d+)\\s*",Wy="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CS=/^#([0-9a-f]{3,8})$/,kS=new RegExp(`^rgb\\(${ty},${ty},${ty}\\)$`),X2=new RegExp(`^rgb\\(${xp},${xp},${xp}\\)$`),W2=new RegExp(`^rgba\\(${ty},${ty},${ty},${Wy}\\)$`),XC=new RegExp(`^rgba\\(${xp},${xp},${xp},${Wy}\\)$`),PS=new RegExp(`^hsl\\(${Wy},${xp},${xp}\\)$`),WC=new RegExp(`^hsla\\(${Wy},${xp},${xp},${Wy}\\)$`),Y2={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},Gg(v0,y_,{copy(te){return Object.assign(new this.constructor,this,te)},displayable(){return this.rgb().displayable()},hex:VC,formatHex:VC,formatHex8:rR,formatHsl:fb,formatRgb:HC,toString:HC}),Gg(jd,x_,ub(v0,{brighter(te){return te=te==null?Wg:Math.pow(Wg,te),new jd(this.r*te,this.g*te,this.b*te,this.opacity)},darker(te){return te=te==null?ey:Math.pow(ey,te),new jd(this.r*te,this.g*te,this.b*te,this.opacity)},rgb(){return this},clamp(){return new jd(Xy(this.r),Xy(this.g),Xy(this.b),V2(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:q2,formatHex:q2,formatHex8:hb,formatRgb:db,toString:db})),Gg(Qu,H2,ub(v0,{brighter(te){return te=te==null?Wg:Math.pow(Wg,te),new Qu(this.h,this.s,this.l*te,this.opacity)},darker(te){return te=te==null?ey:Math.pow(ey,te),new Qu(this.h,this.s,this.l*te,this.opacity)},rgb(){var te=this.h%360+(this.h<0)*360,Z=isNaN(te)||isNaN(this.s)?0:this.s,v=this.l,w=v+(v<.5?v:1-v)*Z,C=2*v-w;return new jd(MS(te>=240?te-240:te+120,C,w),MS(te,C,w),MS(te<120?te+240:te-120,C,w),this.opacity)},clamp(){return new Qu(G2(this.h),Md(this.s),Md(this.l),V2(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(){const te=V2(this.opacity);return`${te===1?"hsl(":"hsla("}${G2(this.h)}, ${Md(this.s)*100}%, ${Md(this.l)*100}%${te===1?")":`, ${te})`}`}}))}}),RS,p0,IS=jr({"node_modules/d3-color/src/math.js"(){RS=Math.PI/180,p0=180/Math.PI}});function DS(te){if(te instanceof m0)return new m0(te.l,te.a,te.b,te.opacity);if(te instanceof Um)return zS(te);te instanceof jd||(te=__(te));var Z=mb(te.r),v=mb(te.g),w=mb(te.b),C=OS((.2225045*Z+.7168786*v+.0606169*w)/Yg),P,t;return Z===v&&v===w?P=t=C:(P=OS((.4360747*Z+.3850649*v+.1430804*w)/$2),t=OS((.0139322*Z+.0971045*v+.7141733*w)/wp)),new m0(116*C-16,500*(P-C),200*(C-t),te.opacity)}function vb(te,Z,v,w){return arguments.length===1?DS(te):new m0(te,Z,v,w??1)}function m0(te,Z,v,w){this.l=+te,this.a=+Z,this.b=+v,this.opacity=+w}function OS(te){return te>YC?Math.pow(te,.3333333333333333):te/qm+K2}function Z2(te){return te>y0?te*te*te:qm*(te-K2)}function pb(te){return 255*(te<=.0031308?12.92*te:1.055*Math.pow(te,.4166666666666667)-.055)}function mb(te){return(te/=255)<=.04045?te/12.92:Math.pow((te+.055)/1.055,2.4)}function nR(te){if(te instanceof Um)return new Um(te.h,te.c,te.l,te.opacity);if(te instanceof m0||(te=DS(te)),te.a===0&&te.b===0)return new Um(NaN,0<te.l&&te.l<100?0:NaN,te.l,te.opacity);var Z=Math.atan2(te.b,te.a)*p0;return new Um(Z<0?Z+360:Z,Math.sqrt(te.a*te.a+te.b*te.b),te.l,te.opacity)}function bp(te,Z,v,w){return arguments.length===1?nR(te):new Um(te,Z,v,w??1)}function Um(te,Z,v,w){this.h=+te,this.c=+Z,this.l=+v,this.opacity=+w}function zS(te){if(isNaN(te.h))return new m0(te.l,0,0,te.opacity);var Z=te.h*RS;return new m0(te.l,Math.cos(Z)*te.c,Math.sin(Z)*te.c,te.opacity)}var b_,$2,Yg,wp,K2,y0,qm,YC,aR=jr({"node_modules/d3-color/src/lab.js"(){cb(),LS(),IS(),b_=18,$2=.96422,Yg=1,wp=.82521,K2=4/29,y0=6/29,qm=3*y0*y0,YC=y0*y0*y0,Gg(m0,vb,ub(v0,{brighter(te){return new m0(this.l+b_*(te??1),this.a,this.b,this.opacity)},darker(te){return new m0(this.l-b_*(te??1),this.a,this.b,this.opacity)},rgb(){var te=(this.l+16)/116,Z=isNaN(this.a)?te:te+this.a/500,v=isNaN(this.b)?te:te-this.b/200;return Z=$2*Z2(Z),te=Yg*Z2(te),v=wp*Z2(v),new jd(pb(3.1338561*Z-1.6168667*te-.4906146*v),pb(-.9787684*Z+1.9161415*te+.033454*v),pb(.0719453*Z-.2289914*te+1.4052427*v),this.opacity)}})),Gg(Um,bp,ub(v0,{brighter(te){return new Um(this.h,this.c,this.l+b_*(te??1),this.opacity)},darker(te){return new Um(this.h,this.c,this.l-b_*(te??1),this.opacity)},rgb(){return zS(this).rgb()}}))}});function w_(te){if(te instanceof Zg)return new Zg(te.h,te.s,te.l,te.opacity);te instanceof jd||(te=__(te));var Z=te.r/255,v=te.g/255,w=te.b/255,C=(Yy*w+FS*Z-t3*v)/(Yy+FS-t3),P=w-C,t=(T_*(v-C)-e3*P)/yb,r=Math.sqrt(t*t+P*P)/(T_*C*(1-C)),a=r?Math.atan2(t,P)*p0-120:NaN;return new Zg(a<0?a+360:a,r,C,te.opacity)}function J2(te,Z,v,w){return arguments.length===1?w_(te):new Zg(te,Z,v,w??1)}function Zg(te,Z,v,w){this.h=+te,this.s=+Z,this.l=+v,this.opacity=+w}var NS,Q2,e3,yb,T_,FS,t3,Yy,gb=jr({"node_modules/d3-color/src/cubehelix.js"(){cb(),LS(),IS(),NS=-.14861,Q2=1.78277,e3=-.29227,yb=-.90649,T_=1.97294,FS=T_*yb,t3=T_*Q2,Yy=Q2*e3-yb*NS,Gg(Zg,J2,ub(v0,{brighter(te){return te=te==null?Wg:Math.pow(Wg,te),new Zg(this.h,this.s,this.l*te,this.opacity)},darker(te){return te=te==null?ey:Math.pow(ey,te),new Zg(this.h,this.s,this.l*te,this.opacity)},rgb(){var te=isNaN(this.h)?0:(this.h+120)*RS,Z=+this.l,v=isNaN(this.s)?0:this.s*Z*(1-Z),w=Math.cos(te),C=Math.sin(te);return new jd(255*(Z+v*(NS*w+Q2*C)),255*(Z+v*(e3*w+yb*C)),255*(Z+v*(T_*w)),this.opacity)}}))}}),$g=jr({"node_modules/d3-color/src/index.js"(){LS(),aR(),gb()}});function ZC(te,Z,v,w,C){var P=te*te,t=P*te;return((1-3*te+3*P-t)*Z+(4-6*P+3*t)*v+(1+3*te+3*P-3*t)*w+t*C)/6}function Kg(te){var Z=te.length-1;return function(v){var w=v<=0?v=0:v>=1?(v=1,Z-1):Math.floor(v*Z),C=te[w],P=te[w+1],t=w>0?te[w-1]:2*C-P,r=w<Z-1?te[w+2]:2*P-C;return ZC((v-w/Z)*Z,t,C,P,r)}}var Jg=jr({"node_modules/d3-interpolate/src/basis.js"(){}});function BS(te){var Z=te.length;return function(v){var w=Math.floor(((v%=1)<0?++v:v)*Z),C=te[(w+Z-1)%Z],P=te[w%Z],t=te[(w+1)%Z],r=te[(w+2)%Z];return ZC((v-w/Z)*Z,C,P,t,r)}}var _b=jr({"node_modules/d3-interpolate/src/basisClosed.js"(){Jg()}}),Qg,r3=jr({"node_modules/d3-interpolate/src/constant.js"(){Qg=te=>()=>te}});function xb(te,Z){return function(v){return te+v*Z}}function $C(te,Z,v){return te=Math.pow(te,v),Z=Math.pow(Z,v)-te,v=1/v,function(w){return Math.pow(te+w*Z,v)}}function bb(te,Z){var v=Z-te;return v?xb(te,v>180||v<-180?v-360*Math.round(v/360):v):Qg(isNaN(te)?Z:te)}function iR(te){return(te=+te)==1?Ud:function(Z,v){return v-Z?$C(Z,v,te):Qg(isNaN(Z)?v:Z)}}function Ud(te,Z){var v=Z-te;return v?xb(te,v):Qg(isNaN(te)?Z:te)}var A_=jr({"node_modules/d3-interpolate/src/color.js"(){r3()}});function n3(te){return function(Z){var v=Z.length,w=new Array(v),C=new Array(v),P=new Array(v),t,r;for(t=0;t<v;++t)r=x_(Z[t]),w[t]=r.r||0,C[t]=r.g||0,P[t]=r.b||0;return w=te(w),C=te(C),P=te(P),r.opacity=1,function(a){return r.r=w(a),r.g=C(a),r.b=P(a),r+""}}}var a3,wb,Tb,Ab=jr({"node_modules/d3-interpolate/src/rgb.js"(){$g(),Jg(),_b(),A_(),a3=(function te(Z){var v=iR(Z);function w(C,P){var t=v((C=x_(C)).r,(P=x_(P)).r),r=v(C.g,P.g),a=v(C.b,P.b),l=Ud(C.opacity,P.opacity);return function(i){return C.r=t(i),C.g=r(i),C.b=a(i),C.opacity=l(i),C+""}}return w.gamma=te,w})(1),wb=n3(Kg),Tb=n3(BS)}});function jS(te,Z){Z||(Z=[]);var v=te?Math.min(Z.length,te.length):0,w=Z.slice(),C;return function(P){for(C=0;C<v;++C)w[C]=te[C]*(1-P)+Z[C]*P;return w}}function S_(te){return ArrayBuffer.isView(te)&&!(te instanceof DataView)}var US=jr({"node_modules/d3-interpolate/src/numberArray.js"(){}});function KC(te,Z){return(S_(Z)?jS:qS)(te,Z)}function qS(te,Z){var v=Z?Z.length:0,w=te?Math.min(v,te.length):0,C=new Array(w),P=new Array(v),t;for(t=0;t<w;++t)C[t]=M_(te[t],Z[t]);for(;t<v;++t)P[t]=Z[t];return function(r){for(t=0;t<w;++t)P[t]=C[t](r);return P}}var VS=jr({"node_modules/d3-interpolate/src/array.js"(){Hm(),US()}});function HS(te,Z){var v=new Date;return te=+te,Z=+Z,function(w){return v.setTime(te*(1-w)+Z*w),v}}var i3=jr({"node_modules/d3-interpolate/src/date.js"(){}});function Vm(te,Z){return te=+te,Z=+Z,function(v){return te*(1-v)+Z*v}}var Sb=jr({"node_modules/d3-interpolate/src/number.js"(){}});function Eb(te,Z){var v={},w={},C;(te===null||typeof te!="object")&&(te={}),(Z===null||typeof Z!="object")&&(Z={});for(C in Z)C in te?v[C]=M_(te[C],Z[C]):w[C]=Z[C];return function(P){for(C in v)w[C]=v[C](P);return w}}var JC=jr({"node_modules/d3-interpolate/src/object.js"(){Hm()}});function oR(te){return function(){return te}}function GS(te){return function(Z){return te(Z)+""}}function o3(te,Z){var v=e1.lastIndex=E_.lastIndex=0,w,C,P,t=-1,r=[],a=[];for(te=te+"",Z=Z+"";(w=e1.exec(te))&&(C=E_.exec(Z));)(P=C.index)>v&&(P=Z.slice(v,P),r[t]?r[t]+=P:r[++t]=P),(w=w[0])===(C=C[0])?r[t]?r[t]+=C:r[++t]=C:(r[++t]=null,a.push({i:t,x:Vm(w,C)})),v=E_.lastIndex;return v<Z.length&&(P=Z.slice(v),r[t]?r[t]+=P:r[++t]=P),r.length<2?a[0]?GS(a[0].x):oR(Z):(Z=a.length,function(l){for(var i=0,s;i<Z;++i)r[(s=a[i]).i]=s.x(l);return r.join("")})}var e1,E_,XS=jr({"node_modules/d3-interpolate/src/string.js"(){Sb(),e1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,E_=new RegExp(e1.source,"g")}});function M_(te,Z){var v=typeof Z,w;return Z==null||v==="boolean"?Qg(Z):(v==="number"?Vm:v==="string"?(w=y_(Z))?(Z=w,a3):o3:Z instanceof y_?a3:Z instanceof Date?HS:S_(Z)?jS:Array.isArray(Z)?qS:typeof Z.valueOf!="function"&&typeof Z.toString!="function"||isNaN(Z)?Eb:Vm)(te,Z)}var Hm=jr({"node_modules/d3-interpolate/src/value.js"(){$g(),Ab(),VS(),i3(),Sb(),JC(),XS(),r3(),US()}});function Zy(te){var Z=te.length;return function(v){return te[Math.max(0,Math.min(Z-1,Math.floor(v*Z)))]}}var $y=jr({"node_modules/d3-interpolate/src/discrete.js"(){}});function Mb(te,Z){var v=bb(+te,+Z);return function(w){var C=v(w);return C-360*Math.floor(C/360)}}var Cb=jr({"node_modules/d3-interpolate/src/hue.js"(){A_()}});function Ky(te,Z){return te=+te,Z=+Z,function(v){return Math.round(te*(1-v)+Z*v)}}var sR=jr({"node_modules/d3-interpolate/src/round.js"(){}});function WS(te,Z,v,w,C,P){var t,r,a;return(t=Math.sqrt(te*te+Z*Z))&&(te/=t,Z/=t),(a=te*v+Z*w)&&(v-=te*a,w-=Z*a),(r=Math.sqrt(v*v+w*w))&&(v/=r,w/=r,a/=r),te*w<Z*v&&(te=-te,Z=-Z,a=-a,t=-t),{translateX:C,translateY:P,rotate:Math.atan2(Z,te)*t1,skewX:Math.atan(a)*t1,scaleX:t,scaleY:r}}var t1,s3,QC=jr({"node_modules/d3-interpolate/src/transform/decompose.js"(){t1=180/Math.PI,s3={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}});function l3(te){const Z=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(te+"");return Z.isIdentity?s3:WS(Z.a,Z.b,Z.c,Z.d,Z.e,Z.f)}function e6(te){return te==null||(u3||(u3=document.createElementNS("http://www.w3.org/2000/svg","g")),u3.setAttribute("transform",te),!(te=u3.transform.baseVal.consolidate()))?s3:(te=te.matrix,WS(te.a,te.b,te.c,te.d,te.e,te.f))}var u3,c3=jr({"node_modules/d3-interpolate/src/transform/parse.js"(){QC()}});function kb(te,Z,v,w){function C(l){return l.length?l.pop()+" ":""}function P(l,i,s,o,u,d){if(l!==s||i!==o){var h=u.push("translate(",null,Z,null,v);d.push({i:h-4,x:Vm(l,s)},{i:h-2,x:Vm(i,o)})}else(s||o)&&u.push("translate("+s+Z+o+v)}function t(l,i,s,o){l!==i?(l-i>180?i+=360:i-l>180&&(l+=360),o.push({i:s.push(C(s)+"rotate(",null,w)-2,x:Vm(l,i)})):i&&s.push(C(s)+"rotate("+i+w)}function r(l,i,s,o){l!==i?o.push({i:s.push(C(s)+"skewX(",null,w)-2,x:Vm(l,i)}):i&&s.push(C(s)+"skewX("+i+w)}function a(l,i,s,o,u,d){if(l!==s||i!==o){var h=u.push(C(u)+"scale(",null,",",null,")");d.push({i:h-4,x:Vm(l,s)},{i:h-2,x:Vm(i,o)})}else(s!==1||o!==1)&&u.push(C(u)+"scale("+s+","+o+")")}return function(l,i){var s=[],o=[];return l=te(l),i=te(i),P(l.translateX,l.translateY,i.translateX,i.translateY,s,o),t(l.rotate,i.rotate,s,o),r(l.skewX,i.skewX,s,o),a(l.scaleX,l.scaleY,i.scaleX,i.scaleY,s,o),l=i=null,function(u){for(var d=-1,h=o.length,y;++d<h;)s[(y=o[d]).i]=y.x(u);return s.join("")}}}var YS,r1,t6=jr({"node_modules/d3-interpolate/src/transform/index.js"(){Sb(),c3(),YS=kb(l3,"px, ","px)","deg)"),r1=kb(e6,", ",")",")")}});function f3(te){return((te=Math.exp(te))+1/te)/2}function h3(te){return((te=Math.exp(te))-1/te)/2}function r6(te){return((te=Math.exp(2*te))-1)/(te+1)}var n6,Pb,j=jr({"node_modules/d3-interpolate/src/zoom.js"(){n6=1e-12,Pb=(function te(Z,v,w){function C(P,t){var r=P[0],a=P[1],l=P[2],i=t[0],s=t[1],o=t[2],u=i-r,d=s-a,h=u*u+d*d,y,m;if(h<n6)m=Math.log(o/l)/Z,y=function(k){return[r+k*u,a+k*d,l*Math.exp(Z*k*m)]};else{var E=Math.sqrt(h),c=(o*o-l*l+w*h)/(2*l*v*E),_=(o*o-l*l-w*h)/(2*o*v*E),T=Math.log(Math.sqrt(c*c+1)-c),M=Math.log(Math.sqrt(_*_+1)-_);m=(M-T)/Z,y=function(k){var b=k*m,A=f3(T),g=l/(v*E)*(A*r6(Z*b+T)-h3(T));return[r+g*u,a+g*d,l*A/f3(Z*b+T)]}}return y.duration=m*1e3*Z/Math.SQRT2,y}return C.rho=function(P){var t=Math.max(.001,+P),r=t*t,a=r*r;return te(t,r,a)},C})(Math.SQRT2,2,4)}});function Q(te){return function(Z,v){var w=te((Z=H2(Z)).h,(v=H2(v)).h),C=Ud(Z.s,v.s),P=Ud(Z.l,v.l),t=Ud(Z.opacity,v.opacity);return function(r){return Z.h=w(r),Z.s=C(r),Z.l=P(r),Z.opacity=t(r),Z+""}}}var xe,Ue,xt=jr({"node_modules/d3-interpolate/src/hsl.js"(){$g(),A_(),xe=Q(bb),Ue=Q(Ud)}});function Bt(te,Z){var v=Ud((te=vb(te)).l,(Z=vb(Z)).l),w=Ud(te.a,Z.a),C=Ud(te.b,Z.b),P=Ud(te.opacity,Z.opacity);return function(t){return te.l=v(t),te.a=w(t),te.b=C(t),te.opacity=P(t),te+""}}var Gr=jr({"node_modules/d3-interpolate/src/lab.js"(){$g(),A_()}});function Nn(te){return function(Z,v){var w=te((Z=bp(Z)).h,(v=bp(v)).h),C=Ud(Z.c,v.c),P=Ud(Z.l,v.l),t=Ud(Z.opacity,v.opacity);return function(r){return Z.h=w(r),Z.c=C(r),Z.l=P(r),Z.opacity=t(r),Z+""}}}var Wa,Hi,xo=jr({"node_modules/d3-interpolate/src/hcl.js"(){$g(),A_(),Wa=Nn(bb),Hi=Nn(Ud)}});function Mo(te){return(function Z(v){v=+v;function w(C,P){var t=te((C=J2(C)).h,(P=J2(P)).h),r=Ud(C.s,P.s),a=Ud(C.l,P.l),l=Ud(C.opacity,P.opacity);return function(i){return C.h=t(i),C.s=r(i),C.l=a(Math.pow(i,v)),C.opacity=l(i),C+""}}return w.gamma=Z,w})(1)}var Zi,ro,al=jr({"node_modules/d3-interpolate/src/cubehelix.js"(){$g(),A_(),Zi=Mo(bb),ro=Mo(Ud)}});function Wl(te,Z){Z===void 0&&(Z=te,te=M_);for(var v=0,w=Z.length-1,C=Z[0],P=new Array(w<0?0:w);v<w;)P[v]=te(C,C=Z[++v]);return function(t){var r=Math.max(0,Math.min(w-1,Math.floor(t*=w)));return P[r](t-r)}}var If=jr({"node_modules/d3-interpolate/src/piecewise.js"(){Hm()}});function Ci(te,Z){for(var v=new Array(Z),w=0;w<Z;++w)v[w]=te(w/(Z-1));return v}var hi=jr({"node_modules/d3-interpolate/src/quantize.js"(){}}),Ui={};an(Ui,{interpolate:()=>M_,interpolateArray:()=>KC,interpolateBasis:()=>Kg,interpolateBasisClosed:()=>BS,interpolateCubehelix:()=>Zi,interpolateCubehelixLong:()=>ro,interpolateDate:()=>HS,interpolateDiscrete:()=>Zy,interpolateHcl:()=>Wa,interpolateHclLong:()=>Hi,interpolateHsl:()=>xe,interpolateHslLong:()=>Ue,interpolateHue:()=>Mb,interpolateLab:()=>Bt,interpolateNumber:()=>Vm,interpolateNumberArray:()=>jS,interpolateObject:()=>Eb,interpolateRgb:()=>a3,interpolateRgbBasis:()=>wb,interpolateRgbBasisClosed:()=>Tb,interpolateRound:()=>Ky,interpolateString:()=>o3,interpolateTransformCss:()=>YS,interpolateTransformSvg:()=>r1,interpolateZoom:()=>Pb,piecewise:()=>Wl,quantize:()=>Ci});var bo=jr({"node_modules/d3-interpolate/src/index.js"(){Hm(),VS(),Jg(),_b(),i3(),$y(),Cb(),Sb(),US(),JC(),sR(),XS(),t6(),j(),Ab(),xt(),Gr(),xo(),al(),If(),hi()}}),kl=Ne({"src/traces/sunburst/fill_one.js"(te,Z){var v=zs(),w=io();Z.exports=function(P,t,r,a,l){var i=t.data.data,s=i.i,o=l||i.color;if(s>=0){t.i=i.i;var u=r.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=o,t.color=o):(u.color=o,t.color=o),v.pointStyle(P,r,a,t)}else w.fill(P,o)}}}),Mc=Ne({"src/traces/sunburst/style.js"(te,Z){var v=xn(),w=io(),C=In(),P=mc().resizeText,t=kl();function r(l){var i=l._fullLayout._sunburstlayer.selectAll(".trace");P(l,i,"sunburst"),i.each(function(s){var o=v.select(this),u=s[0],d=u.trace;o.style("opacity",d.opacity),o.selectAll("path.surface").each(function(h){v.select(this).call(a,h,d,l)})})}function a(l,i,s,o){var u=i.data.data,d=!i.children,h=u.i,y=C.castOption(s,h,"marker.line.color")||w.defaultLine,m=C.castOption(s,h,"marker.line.width")||0;l.call(t,i,s,o).style("stroke-width",m).call(w.stroke,y).style("opacity",d?s.leaf.opacity:null)}Z.exports={style:r,styleOne:a}}}),Zs=Ne({"src/traces/sunburst/helpers.js"(te){var Z=In(),v=io(),w=km(),C=Ag();te.findEntryWithLevel=function(a,l){var i;return l&&a.eachAfter(function(s){if(te.getPtId(s)===l)return i=s.copy()}),i||a},te.findEntryWithChild=function(a,l){var i;return a.eachAfter(function(s){for(var o=s.children||[],u=0;u<o.length;u++){var d=o[u];if(te.getPtId(d)===l)return i=s.copy()}}),i||a},te.isEntry=function(a){return!a.parent},te.isLeaf=function(a){return!a.children},te.getPtId=function(a){return a.data.data.id},te.getPtLabel=function(a){return a.data.data.label},te.getValue=function(a){return a.value},te.isHierarchyRoot=function(a){return r(a)===""},te.setSliceCursor=function(a,l,i){var s=i.isTransitioning;if(!s){var o=a.datum();s=i.hideOnRoot&&te.isHierarchyRoot(o)||i.hideOnLeaves&&te.isLeaf(o)}w(a,s?null:"pointer")};function P(a,l,i){return{color:te.getOutsideTextFontKey("color",a,l,i),family:te.getOutsideTextFontKey("family",a,l,i),size:te.getOutsideTextFontKey("size",a,l,i),weight:te.getOutsideTextFontKey("weight",a,l,i),style:te.getOutsideTextFontKey("style",a,l,i),variant:te.getOutsideTextFontKey("variant",a,l,i),textcase:te.getOutsideTextFontKey("textcase",a,l,i),lineposition:te.getOutsideTextFontKey("lineposition",a,l,i),shadow:te.getOutsideTextFontKey("shadow",a,l,i)}}function t(a,l,i,s){var o=(s||{}).onPathbar,u=l.data.data,d=u.i,h=Z.castOption(a,d,(o?"pathbar.textfont":"insidetextfont")+".color");return!h&&a._input.textfont&&(h=Z.castOption(a._input,d,"textfont.color")),{color:h||v.contrast(u.color),family:te.getInsideTextFontKey("family",a,l,i,s),size:te.getInsideTextFontKey("size",a,l,i,s),weight:te.getInsideTextFontKey("weight",a,l,i,s),style:te.getInsideTextFontKey("style",a,l,i,s),variant:te.getInsideTextFontKey("variant",a,l,i,s),textcase:te.getInsideTextFontKey("textcase",a,l,i,s),lineposition:te.getInsideTextFontKey("lineposition",a,l,i,s),shadow:te.getInsideTextFontKey("shadow",a,l,i,s)}}te.getInsideTextFontKey=function(a,l,i,s,o){var u=(o||{}).onPathbar,d=u?"pathbar.textfont":"insidetextfont",h=i.data.data.i;return Z.castOption(l,h,d+"."+a)||Z.castOption(l,h,"textfont."+a)||s.size},te.getOutsideTextFontKey=function(a,l,i,s){var o=i.data.data.i;return Z.castOption(l,o,"outsidetextfont."+a)||Z.castOption(l,o,"textfont."+a)||s.size},te.isOutsideText=function(a,l){return!a._hasColorscale&&te.isHierarchyRoot(l)},te.determineTextFont=function(a,l,i,s){return te.isOutsideText(a,l)?P(a,l,i):t(a,l,i,s)},te.hasTransition=function(a){return!!(a&&a.duration>0)},te.getMaxDepth=function(a){return a.maxdepth>=0?a.maxdepth:1/0},te.isHeader=function(a,l){return!(te.isLeaf(a)||a.depth===l._maxDepth-1)};function r(a){return a.data.data.pid}te.getParent=function(a,l){return te.findEntryWithLevel(a,r(l))},te.listPath=function(a,l){var i=a.parent;if(!i)return[];var s=l?[i.data[l]]:[i];return te.listPath(i,l).concat(s)},te.getPath=function(a){return te.listPath(a,"label").join("/")+"/"},te.formatValue=C.formatPieValue,te.formatPercent=function(a,l){var i=Z.formatPercent(a,0);return i==="0%"&&(i=C.formatPiePercent(a,l)),i}}}),Au=Ne({"src/traces/sunburst/fx.js"(te,Z){var v=xn(),w=Xo(),C=_v().appendArrayPointValue,P=nh(),t=In(),r=bx(),a=Zs(),l=Ag(),i=l.formatPieValue;Z.exports=function(u,d,h,y,m){var E=y[0],c=E.trace,_=E.hierarchy,T=c.type==="sunburst",M=c.type==="treemap"||c.type==="icicle";"_hasHoverLabel"in c||(c._hasHoverLabel=!1),"_hasHoverEvent"in c||(c._hasHoverEvent=!1);var k=function(g){var f=h._fullLayout;if(!(h._dragging||f.hovermode===!1)){var p=h._fullData[c.index],x=g.data.data,N=x.i,D=a.isHierarchyRoot(g),B=a.getParent(_,g),U=a.getValue(g),V=function(ce){return t.castOption(p,N,ce)},q=V("hovertemplate"),z=P.castHoverinfo(p,f,N),H=f.separators,G;if(q||z&&z!=="none"&&z!=="skip"){var J,le;T&&(J=E.cx+g.pxmid[0]*(1-g.rInscribed),le=E.cy+g.pxmid[1]*(1-g.rInscribed)),M&&(J=g._hoverX,le=g._hoverY);var ye={},de=[],me=[],W=function(ce){return de.indexOf(ce)!==-1};z&&(de=z==="all"?p._module.attributes.hoverinfo.flags:z.split("+")),ye.label=x.label,W("label")&&ye.label&&me.push(ye.label),x.hasOwnProperty("v")&&(ye.value=x.v,ye.valueLabel=i(ye.value,H),W("value")&&me.push(ye.valueLabel)),ye.currentPath=g.currentPath=a.getPath(g.data),W("current path")&&!D&&me.push(ye.currentPath);var ie,se=[],ee=function(){se.indexOf(ie)===-1&&(me.push(ie),se.push(ie))};ye.percentParent=g.percentParent=U/a.getValue(B),ye.parent=g.parentString=a.getPtLabel(B),W("percent parent")&&(ie=a.formatPercent(ye.percentParent,H)+" of "+ye.parent,ee()),ye.percentEntry=g.percentEntry=U/a.getValue(d),ye.entry=g.entry=a.getPtLabel(d),W("percent entry")&&!D&&!g.onPathbar&&(ie=a.formatPercent(ye.percentEntry,H)+" of "+ye.entry,ee()),ye.percentRoot=g.percentRoot=U/a.getValue(_),ye.root=g.root=a.getPtLabel(_),W("percent root")&&!D&&(ie=a.formatPercent(ye.percentRoot,H)+" of "+ye.root,ee()),ye.text=V("hovertext")||V("text"),W("text")&&(ie=ye.text,t.isValidTextValue(ie)&&me.push(ie)),G=[s(g,p,m.eventDataKeys)];var pe={trace:p,y:le,_x0:g._x0,_x1:g._x1,_y0:g._y0,_y1:g._y1,text:me.join("<br>"),name:q||W("name")?p.name:void 0,color:V("hoverlabel.bgcolor")||x.color,borderColor:V("hoverlabel.bordercolor"),fontFamily:V("hoverlabel.font.family"),fontSize:V("hoverlabel.font.size"),fontColor:V("hoverlabel.font.color"),fontWeight:V("hoverlabel.font.weight"),fontStyle:V("hoverlabel.font.style"),fontVariant:V("hoverlabel.font.variant"),nameLength:V("hoverlabel.namelength"),textAlign:V("hoverlabel.align"),hovertemplate:q,hovertemplateLabels:ye,eventData:G};T&&(pe.x0=J-g.rInscribed*g.rpx1,pe.x1=J+g.rInscribed*g.rpx1,pe.idealAlign=g.pxmid[0]<0?"left":"right"),M&&(pe.x=J,pe.idealAlign=J<0?"left":"right");var oe=[];P.loneHover(pe,{container:f._hoverlayer.node(),outerContainer:f._paper.node(),gd:h,inOut_bbox:oe}),G[0].bbox=oe[0],c._hasHoverLabel=!0}if(M){var Y=u.select("path.surface");m.styleOne(Y,g,p,h,{hovered:!0})}c._hasHoverEvent=!0,h.emit("plotly_hover",{points:G||[s(g,p,m.eventDataKeys)],event:v.event})}},b=function(g){var f=h._fullLayout,p=h._fullData[c.index],x=v.select(this).datum();if(c._hasHoverEvent&&(g.originalEvent=v.event,h.emit("plotly_unhover",{points:[s(x,p,m.eventDataKeys)],event:v.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(P.loneUnhover(f._hoverlayer.node()),c._hasHoverLabel=!1),M){var N=u.select("path.surface");m.styleOne(N,x,p,h,{hovered:!1})}},A=function(g){var f=h._fullLayout,p=h._fullData[c.index],x=T&&(a.isHierarchyRoot(g)||a.isLeaf(g)),N=a.getPtId(g),D=a.isEntry(g)?a.findEntryWithChild(_,N):a.findEntryWithLevel(_,N),B=a.getPtId(D),U={points:[s(g,p,m.eventDataKeys)],event:v.event};x||(U.nextLevel=B);var V=r.triggerHandler(h,"plotly_"+c.type+"click",U);if(V!==!1&&f.hovermode&&(h._hoverdata=[s(g,p,m.eventDataKeys)],P.click(h,v.event)),!x&&V!==!1&&!h._dragging&&!h._transitioning){w.call("_storeDirectGUIEdit",p,f._tracePreGUI[p.uid],{level:p.level});var q={data:[{level:B}],traces:[c.index]},z={frame:{redraw:!1,duration:m.transitionTime},transition:{duration:m.transitionTime,easing:m.transitionEasing},mode:"immediate",fromcurrent:!0};P.loneUnhover(f._hoverlayer.node()),w.call("animate",h,q,z)}};u.on("mouseover",k),u.on("mouseout",b),u.on("click",A)};function s(o,u,d){for(var h=o.data.data,y={curveNumber:u.index,pointNumber:h.i,data:u._input,fullData:u},m=0;m<d.length;m++){var E=d[m];E in o&&(y[E]=o[E])}return"parentString"in o&&!a.isHierarchyRoot(o)&&(y.parent=o.parentString),C(y,u,h.i),y}}}),ec=Ne({"src/traces/sunburst/plot.js"(te){var Z=xn(),v=m_(),w=(bo(),$r(Ui)).interpolate,C=zs(),P=In(),t=uc(),r=mc(),a=r.recordMinTextSize,l=r.clearMinTextSize,i=p_(),s=Ag().getRotationAngle,o=i.computeTransform,u=i.transformInsideText,d=Mc().styleOne,h=Fd().resizeText,y=Au(),m=AS(),E=Zs();te.plot=function(b,A,g,f){var p=b._fullLayout,x=p._sunburstlayer,N,D,B=!g,U=!p.uniformtext.mode&&E.hasTransition(g);if(l("sunburst",p),N=x.selectAll("g.trace.sunburst").data(A,function(q){return q[0].trace.uid}),N.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),N.order(),U){f&&(D=f());var V=Z.transition().duration(g.duration).ease(g.easing).each("end",function(){D&&D()}).each("interrupt",function(){D&&D()});V.each(function(){x.selectAll("g.trace").each(function(q){c(b,q,this,g)})})}else N.each(function(q){c(b,q,this,g)}),p.uniformtext.mode&&h(b,p._sunburstlayer.selectAll(".trace"),"sunburst");B&&N.exit().remove()};function c(b,A,g,f){var p=b._context.staticPlot,x=b._fullLayout,N=!x.uniformtext.mode&&E.hasTransition(f),D=Z.select(g),B=D.selectAll("g.slice"),U=A[0],V=U.trace,q=U.hierarchy,z=E.findEntryWithLevel(q,V.level),H=E.getMaxDepth(V),G=x._size,J=V.domain,le=G.w*(J.x[1]-J.x[0]),ye=G.h*(J.y[1]-J.y[0]),de=.5*Math.min(le,ye),me=U.cx=G.l+G.w*(J.x[1]+J.x[0])/2,W=U.cy=G.t+G.h*(1-J.y[0])-ye/2;if(!z)return B.remove();var ie=null,se={};N&&B.each(function(be){se[E.getPtId(be)]={rpx0:be.rpx0,rpx1:be.rpx1,x0:be.x0,x1:be.x1,transform:be.transform},!ie&&E.isEntry(be)&&(ie=be)});var ee=_(z).descendants(),pe=z.height+1,oe=0,Y=H;U.hasMultipleRoots&&E.isHierarchyRoot(z)&&(ee=ee.slice(1),pe-=1,oe=1,Y+=1),ee=ee.filter(function(be){return be.y1<=Y});var ce=s(V.rotation);ce&&ee.forEach(function(be){be.x0+=ce,be.x1+=ce});var ue=Math.min(pe,H),_e=function(be){return(be-oe)/ue*de},Le=function(be,Ye){return[be*Math.cos(Ye),-be*Math.sin(Ye)]},ze=function(be){return P.pathAnnulus(be.rpx0,be.rpx1,be.x0,be.x1,me,W)},Ge=function(be){return me+M(be)[0]*(be.transform.rCenter||0)+(be.transform.x||0)},Ve=function(be){return W+M(be)[1]*(be.transform.rCenter||0)+(be.transform.y||0)};B=B.data(ee,E.getPtId),B.enter().append("g").classed("slice",!0),N?B.exit().transition().each(function(){var be=Z.select(this),Ye=be.select("path.surface");Ye.transition().attrTween("d",function(bt){var ft=ht(bt);return function(Wt){return ze(ft(Wt))}});var mt=be.select("g.slicetext");mt.attr("opacity",0)}).remove():B.exit().remove(),B.order();var rt=null;if(N&&ie){var pt=E.getPtId(ie);B.each(function(be){rt===null&&E.getPtId(be)===pt&&(rt=be.x1)})}var gt=B;N&&(gt=gt.transition().each("end",function(){var be=Z.select(this);E.setSliceCursor(be,b,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),gt.each(function(be){var Ye=Z.select(this),mt=P.ensureSingle(Ye,"path","surface",function(pr){pr.style("pointer-events",p?"none":"all")});be.rpx0=_e(be.y0),be.rpx1=_e(be.y1),be.xmid=(be.x0+be.x1)/2,be.pxmid=Le(be.rpx1,be.xmid),be.midangle=-(be.xmid-Math.PI/2),be.startangle=-(be.x0-Math.PI/2),be.stopangle=-(be.x1-Math.PI/2),be.halfangle=.5*Math.min(P.angleDelta(be.x0,be.x1)||Math.PI,Math.PI),be.ring=1-be.rpx0/be.rpx1,be.rInscribed=T(be),N?mt.transition().attrTween("d",function(pr){var Br=lt(pr);return function(Fr){return ze(Br(Fr))}}):mt.attr("d",ze),Ye.call(y,z,b,A,{eventDataKeys:m.eventDataKeys,transitionTime:m.CLICK_TRANSITION_TIME,transitionEasing:m.CLICK_TRANSITION_EASING}).call(E.setSliceCursor,b,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:b._transitioning}),mt.call(d,be,V,b);var bt=P.ensureSingle(Ye,"g","slicetext"),ft=P.ensureSingle(bt,"text","",function(pr){pr.attr("data-notex",1)}),Wt=P.ensureUniformFontSize(b,E.determineTextFont(V,be,x.font));ft.text(te.formatSliceLabel(be,z,V,A,x)).classed("slicetext",!0).attr("text-anchor","middle").call(C.font,Wt).call(t.convertToTspans,b);var Zt=C.bBox(ft.node());be.transform=u(Zt,be,U),be.transform.targetX=Ge(be),be.transform.targetY=Ve(be);var cr=function(pr,Br){var Fr=pr.transform;return o(Fr,Br),Fr.fontSize=Wt.size,a(V.type,Fr,x),P.getTextTransform(Fr)};N?ft.transition().attrTween("transform",function(pr){var Br=Fe(pr);return function(Fr){return cr(Br(Fr),Zt)}}):ft.attr("transform",cr(be,Zt))});function ht(be){var Ye=E.getPtId(be),mt=se[Ye],bt=se[E.getPtId(z)],ft;if(bt){var Wt=(be.x1>bt.x1?2*Math.PI:0)+ce;ft=be.rpx1<bt.rpx1?{x0:be.x0,x1:be.x1,rpx0:0,rpx1:0}:{x0:Wt,x1:Wt,rpx0:be.rpx0,rpx1:be.rpx1}}else{var Zt,cr=E.getPtId(be.parent);B.each(function(Nr){if(E.getPtId(Nr)===cr)return Zt=Nr});var pr=Zt.children,Br;pr.forEach(function(Nr,Jr){if(E.getPtId(Nr)===Ye)return Br=Jr});var Fr=pr.length,cn=w(Zt.x0,Zt.x1);ft={rpx0:de,rpx1:de,x0:cn(Br/Fr),x1:cn((Br+1)/Fr)}}return w(mt,ft)}function lt(be){var Ye=se[E.getPtId(be)],mt,bt={x0:be.x0,x1:be.x1,rpx0:be.rpx0,rpx1:be.rpx1};if(Ye)mt=Ye;else if(ie)if(be.parent)if(rt){var ft=(be.x1>rt?2*Math.PI:0)+ce;mt={x0:ft,x1:ft}}else mt={rpx0:de,rpx1:de},P.extendFlat(mt,Pe(be));else mt={rpx0:0,rpx1:0};else mt={x0:ce,x1:ce};return w(mt,bt)}function Fe(be){var Ye=se[E.getPtId(be)],mt,bt=be.transform;if(Ye)mt=Ye;else if(mt={rpx1:be.rpx1,transform:{textPosAngle:bt.textPosAngle,scale:0,rotate:bt.rotate,rCenter:bt.rCenter,x:bt.x,y:bt.y}},ie)if(be.parent)if(rt){var ft=be.x1>rt?2*Math.PI:0;mt.x0=mt.x1=ft}else P.extendFlat(mt,Pe(be));else mt.x0=mt.x1=ce;else mt.x0=mt.x1=ce;var Wt=w(mt.transform.textPosAngle,be.transform.textPosAngle),Zt=w(mt.rpx1,be.rpx1),cr=w(mt.x0,be.x0),pr=w(mt.x1,be.x1),Br=w(mt.transform.scale,bt.scale),Fr=w(mt.transform.rotate,bt.rotate),cn=bt.rCenter===0?3:mt.transform.rCenter===0?1/3:1,Nr=w(mt.transform.rCenter,bt.rCenter),Jr=function(Dt){return Nr(Math.pow(Dt,cn))};return function(Dt){var $e=Zt(Dt);cr(Dt),pr(Dt);var ot=Jr(Dt),De=Wt(Dt),Ee={rpx1:$e,transform:{textPosAngle:De,rCenter:ot,x:bt.x,y:bt.y}};return a(V.type,bt,x),{transform:{targetX:Ge(Ee),targetY:Ve(Ee),scale:Br(Dt),rotate:Fr(Dt),rCenter:ot}}}}function Pe(be){var Ye=be.parent,mt=se[E.getPtId(Ye)],bt={};if(mt){var ft=Ye.children,Wt=ft.indexOf(be),Zt=ft.length,cr=w(mt.x0,mt.x1);bt.x0=cr(Wt/Zt),bt.x1=cr(Wt/Zt)}else bt.x0=bt.x1=0;return bt}}function _(b){return v.partition().size([2*Math.PI,b.height+1])(b)}te.formatSliceLabel=function(b,A,g,f,p){var x=g.texttemplate,N=g.textinfo;if(!x&&(!N||N==="none"))return"";var D=p.separators,B=f[0],U=b.data.data,V=B.hierarchy,q=E.isHierarchyRoot(b),z=E.getParent(V,b),H=E.getValue(b);if(!x){var G=N.split("+"),J=function(oe){return G.indexOf(oe)!==-1},le=[],ye;if(J("label")&&U.label&&le.push(U.label),U.hasOwnProperty("v")&&J("value")&&le.push(E.formatValue(U.v,D)),!q){J("current path")&&le.push(E.getPath(b.data));var de=0;J("percent parent")&&de++,J("percent entry")&&de++,J("percent root")&&de++;var me=de>1;if(de){var W,ie=function(oe){ye=E.formatPercent(W,D),me&&(ye+=" of "+oe),le.push(ye)};J("percent parent")&&!q&&(W=H/E.getValue(z),ie("parent")),J("percent entry")&&(W=H/E.getValue(A),ie("entry")),J("percent root")&&(W=H/E.getValue(V),ie("root"))}}return J("text")&&(ye=P.castOption(g,U.i,"text"),P.isValidTextValue(ye)&&le.push(ye)),le.join("<br>")}var se=P.castOption(g,U.i,"texttemplate");if(!se)return"";var ee={};U.label&&(ee.label=U.label),U.hasOwnProperty("v")&&(ee.value=U.v,ee.valueLabel=E.formatValue(U.v,D)),ee.currentPath=E.getPath(b.data),q||(ee.percentParent=H/E.getValue(z),ee.percentParentLabel=E.formatPercent(ee.percentParent,D),ee.parent=E.getPtLabel(z)),ee.percentEntry=H/E.getValue(A),ee.percentEntryLabel=E.formatPercent(ee.percentEntry,D),ee.entry=E.getPtLabel(A),ee.percentRoot=H/E.getValue(V),ee.percentRootLabel=E.formatPercent(ee.percentRoot,D),ee.root=E.getPtLabel(V),U.hasOwnProperty("color")&&(ee.color=U.color);var pe=P.castOption(g,U.i,"text");return(P.isValidTextValue(pe)||pe==="")&&(ee.text=pe),ee.customdata=P.castOption(g,U.i,"customdata"),P.texttemplateString({data:[ee,g._meta],fallback:g.texttemplatefallback,labels:ee,locale:p._d3locale,template:se})};function T(b){return b.rpx0===0&&P.isFullCircle([b.x0,b.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(b.halfangle)),b.ring/2))}function M(b){return k(b.rpx1,b.transform.textPosAngle)}function k(b,A){return[b*Math.sin(A),-b*Math.cos(A)]}}}),Bc=Ne({"src/traces/sunburst/index.js"(te,Z){Z.exports={moduleType:"trace",name:"sunburst",basePlotModule:eR(),categories:[],animatable:!0,attributes:sb(),layoutAttributes:SS(),supplyDefaults:qC(),supplyLayoutDefaults:tR(),calc:lb().calc,crossTraceCalc:lb().crossTraceCalc,plot:ec().plot,style:Mc().style,colorbar:ah(),meta:{}}}}),Jy=Ne({"lib/sunburst.js"(te,Z){Z.exports=Bc()}}),lR=Ne({"src/traces/treemap/base_plot.js"(te){var Z=uf();te.name="treemap",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),d3=Ne({"src/traces/treemap/constants.js"(te,Z){Z.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),uR=Ne({"src/traces/treemap/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=Vu(),t=Oc().attributes,r=d_(),a=sb(),l=d3(),i=co().extendFlat,s=Dd().pattern;Z.exports={labels:a.labels,parents:a.parents,values:a.values,branchvalues:a.branchvalues,count:a.count,level:a.level,maxdepth:a.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:i({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:a.marker.colors,pattern:s,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:a.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},P("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:i({},r.textfont,{}),editType:"calc"},text:r.text,textinfo:a.textinfo,texttemplate:w({editType:"plot"},{keys:l.eventDataKeys.concat(["label","value"])}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a.hoverinfo,hovertemplate:v({},{keys:l.eventDataKeys}),hovertemplatefallback:C(),textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:i({},r.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:r.sort,root:a.root,domain:t({name:"treemap",trace:!0,editType:"calc"})}}}),B9=Ne({"src/traces/treemap/layout_attributes.js"(te,Z){Z.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),lK=Ne({"src/traces/treemap/defaults.js"(te,Z){var v=In(),w=uR(),C=io(),P=Oc().defaults,t=vp().handleText,r=Oy().TEXTPAD,a=v_().handleMarkerDefaults,l=Dc(),i=l.hasColorscale,s=l.handleDefaults;Z.exports=function(u,d,h,y){function m(p,x){return v.coerce(u,d,w,p,x)}var E=m("labels"),c=m("parents");if(!E||!E.length||!c||!c.length){d.visible=!1;return}var _=m("values");_&&_.length?m("branchvalues"):m("count"),m("level"),m("maxdepth");var T=m("tiling.packing");T==="squarify"&&m("tiling.squarifyratio"),m("tiling.flip"),m("tiling.pad");var M=m("text");m("texttemplate"),m("texttemplatefallback"),d.texttemplate||m("textinfo",v.isArrayOrTypedArray(M)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var k=m("pathbar.visible"),b="auto";t(u,d,y,m,b,{hasPathbar:k,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("textposition");var A=d.textposition.indexOf("bottom")!==-1;a(u,d,y,m);var g=d._hasColorscale=i(u,"marker","colors")||(u.marker||{}).coloraxis;g?s(u,d,y,m,{prefix:"marker.",cLetter:"c"}):m("marker.depthfade",!(d.marker.colors||[]).length);var f=d.textfont.size*2;m("marker.pad.t",A?f/4:f),m("marker.pad.l",f/4),m("marker.pad.r",f/4),m("marker.pad.b",A?f:f/4),m("marker.cornerradius"),d._hovered={marker:{line:{width:2,color:C.contrast(y.paper_bgcolor)}}},k&&(m("pathbar.thickness",d.pathbar.textfont.size+2*r),m("pathbar.side"),m("pathbar.edgeshape")),m("sort"),m("root.color"),P(d,y,m),d._length=null}}}),uK=Ne({"src/traces/treemap/layout_defaults.js"(te,Z){var v=In(),w=B9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("treemapcolorway",t.colorway),r("extendtreemapcolors")}}}),j9=Ne({"src/traces/treemap/calc.js"(te){var Z=lb();te.calc=function(v,w){return Z.calc(v,w)},te.crossTraceCalc=function(v){return Z._runCrossTraceCalc("treemap",v)}}}),U9=Ne({"src/traces/treemap/flip_tree.js"(te,Z){Z.exports=function v(w,C,P){var t;P.swapXY&&(t=w.x0,w.x0=w.y0,w.y0=t,t=w.x1,w.x1=w.y1,w.y1=t),P.flipX&&(t=w.x0,w.x0=C[0]-w.x1,w.x1=C[0]-t),P.flipY&&(t=w.y0,w.y0=C[1]-w.y1,w.y1=C[1]-t);var r=w.children;if(r)for(var a=0;a<r.length;a++)v(r[a],C,P)}}}),q9=Ne({"src/traces/treemap/partition.js"(te,Z){var v=m_(),w=U9();Z.exports=function(t,r,a){var l=a.flipX,i=a.flipY,s=a.packing==="dice-slice",o=a.pad[i?"bottom":"top"],u=a.pad[l?"right":"left"],d=a.pad[l?"left":"right"],h=a.pad[i?"top":"bottom"],y;s&&(y=u,u=o,o=y,y=d,d=h,h=y);var m=v.treemap().tile(C(a.packing,a.squarifyratio)).paddingInner(a.pad.inner).paddingLeft(u).paddingRight(d).paddingTop(o).paddingBottom(h).size(s?[r[1],r[0]]:r)(t);return(s||l||i)&&w(m,r,{swapXY:s,flipX:l,flipY:i}),m};function C(P,t){switch(P){case"squarify":return v.treemapSquarify.ratio(t);case"binary":return v.treemapBinary;case"dice":return v.treemapDice;case"slice":return v.treemapSlice;default:return v.treemapSliceDice}}}}),cR=Ne({"src/traces/treemap/style.js"(te,Z){var v=xn(),w=io(),C=In(),P=Zs(),t=mc().resizeText,r=kl();function a(i){var s=i._fullLayout._treemaplayer.selectAll(".trace");t(i,s,"treemap"),s.each(function(o){var u=v.select(this),d=o[0],h=d.trace;u.style("opacity",h.opacity),u.selectAll("path.surface").each(function(y){v.select(this).call(l,y,h,i,{hovered:!1})})})}function l(i,s,o,u,d){var h=(d||{}).hovered,y=s.data.data,m=y.i,E,c,_=y.color,T=P.isHierarchyRoot(s),M=1;if(h)E=o._hovered.marker.line.color,c=o._hovered.marker.line.width;else if(T&&_===o.root.color)M=100,E="rgba(0,0,0,0)",c=0;else if(E=C.castOption(o,m,"marker.line.color")||w.defaultLine,c=C.castOption(o,m,"marker.line.width")||0,!o._hasColorscale&&!s.onPathbar){var k=o.marker.depthfade;if(k){var b=w.combine(w.addOpacity(o._backgroundColor,.75),_),A;if(k===!0){var g=P.getMaxDepth(o);isFinite(g)?P.isLeaf(s)?A=0:A=o._maxVisibleLayers-(s.data.depth-o._entryDepth):A=s.data.height+1}else A=s.data.depth-o._entryDepth,o._atRootLevel||A++;if(A>0)for(var f=0;f<A;f++){var p=.5*f/A;_=w.combine(w.addOpacity(b,p),_)}}}i.call(r,s,o,u,_).style("stroke-width",c).call(w.stroke,E).style("opacity",M)}Z.exports={style:a,styleOne:l}}}),cK=Ne({"src/traces/treemap/draw_ancestors.js"(te,Z){var v=xn(),w=In(),C=zs(),P=uc(),t=q9(),r=cR().styleOne,a=d3(),l=Zs(),i=Au(),s=!0;Z.exports=function(u,d,h,y,m){var E=m.barDifY,c=m.width,_=m.height,T=m.viewX,M=m.viewY,k=m.pathSlice,b=m.toMoveInsideSlice,A=m.strTransform,g=m.hasTransition,f=m.handleSlicesExit,p=m.makeUpdateSliceInterpolator,x=m.makeUpdateTextInterpolator,N={},D=u._context.staticPlot,B=u._fullLayout,U=d[0],V=U.trace,q=U.hierarchy,z=c/V._entryDepth,H=l.listPath(h.data,"id"),G=t(q.copy(),[c,_],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();G=G.filter(function(le){var ye=H.indexOf(le.data.id);return ye===-1?!1:(le.x0=z*ye,le.x1=z*(ye+1),le.y0=E,le.y1=E+_,le.onPathbar=!0,!0)}),G.reverse(),y=y.data(G,l.getPtId),y.enter().append("g").classed("pathbar",!0),f(y,s,N,[c,_],k),y.order();var J=y;g&&(J=J.transition().each("end",function(){var le=v.select(this);l.setSliceCursor(le,u,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),J.each(function(le){le._x0=T(le.x0),le._x1=T(le.x1),le._y0=M(le.y0),le._y1=M(le.y1),le._hoverX=T(le.x1-Math.min(c,_)/2),le._hoverY=M(le.y1-_/2);var ye=v.select(this),de=w.ensureSingle(ye,"path","surface",function(se){se.style("pointer-events",D?"none":"all")});g?de.transition().attrTween("d",function(se){var ee=p(se,s,N,[c,_]);return function(pe){return k(ee(pe))}}):de.attr("d",k),ye.call(i,h,u,d,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,u,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:u._transitioning}),de.call(r,le,V,u,{hovered:!1}),le._text=(l.getPtLabel(le)||"").split("<br>").join(" ")||"";var me=w.ensureSingle(ye,"g","slicetext"),W=w.ensureSingle(me,"text","",function(se){se.attr("data-notex",1)}),ie=w.ensureUniformFontSize(u,l.determineTextFont(V,le,B.font,{onPathbar:!0}));W.text(le._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(C.font,ie).call(P.convertToTspans,u),le.textBB=C.bBox(W.node()),le.transform=b(le,{fontSize:ie.size,onPathbar:!0}),le.transform.fontSize=ie.size,g?W.transition().attrTween("transform",function(se){var ee=x(se,s,N,[c,_]);return function(pe){return A(ee(pe))}}):W.attr("transform",A(le))})}}}),fK=Ne({"src/traces/treemap/plot_one.js"(te,Z){var v=xn(),w=(bo(),$r(Ui)).interpolate,C=Zs(),P=In(),t=Oy().TEXTPAD,r=hu(),a=r.toMoveInsideBar,l=mc(),i=l.recordMinTextSize,s=d3(),o=cK();function u(d){return C.isHierarchyRoot(d)?"":C.getPtId(d)}Z.exports=function(h,y,m,E,c){var _=h._fullLayout,T=y[0],M=T.trace,k=M.type,b=k==="icicle",A=T.hierarchy,g=C.findEntryWithLevel(A,M.level),f=v.select(m),p=f.selectAll("g.pathbar"),x=f.selectAll("g.slice");if(!g){p.remove(),x.remove();return}var N=C.isHierarchyRoot(g),D=!_.uniformtext.mode&&C.hasTransition(E),B=C.getMaxDepth(M),U=function(Nr){return Nr.data.depth-g.data.depth<B},V=_._size,q=M.domain,z=V.w*(q.x[1]-q.x[0]),H=V.h*(q.y[1]-q.y[0]),G=z,J=M.pathbar.thickness,le=M.marker.line.width+s.gapWithPathbar,ye=M.pathbar.visible?M.pathbar.side.indexOf("bottom")>-1?H+le:-(J+le):0,de={x0:G,x1:G,y0:ye,y1:ye+J},me=function(Nr,Jr,Dt){var $e=M.tiling.pad,ot=function(Ie){return Ie-$e<=Jr.x0},De=function(Ie){return Ie+$e>=Jr.x1},Ee=function(Ie){return Ie-$e<=Jr.y0},Ae=function(Ie){return Ie+$e>=Jr.y1};return Nr.x0===Jr.x0&&Nr.x1===Jr.x1&&Nr.y0===Jr.y0&&Nr.y1===Jr.y1?{x0:Nr.x0,x1:Nr.x1,y0:Nr.y0,y1:Nr.y1}:{x0:ot(Nr.x0-$e)?0:De(Nr.x0-$e)?Dt[0]:Nr.x0,x1:ot(Nr.x1+$e)?0:De(Nr.x1+$e)?Dt[0]:Nr.x1,y0:Ee(Nr.y0-$e)?0:Ae(Nr.y0-$e)?Dt[1]:Nr.y0,y1:Ee(Nr.y1+$e)?0:Ae(Nr.y1+$e)?Dt[1]:Nr.y1}},W=null,ie={},se={},ee=null,pe=function(Nr,Jr){return Jr?ie[u(Nr)]:se[u(Nr)]},oe=function(Nr,Jr,Dt,$e){if(Jr)return ie[u(A)]||de;var ot=se[M.level]||Dt;return U(Nr)?me(Nr,ot,$e):{}};T.hasMultipleRoots&&N&&B++,M._maxDepth=B,M._backgroundColor=_.paper_bgcolor,M._entryDepth=g.data.depth,M._atRootLevel=N;var Y=-z/2+V.l+V.w*(q.x[1]+q.x[0])/2,ce=-H/2+V.t+V.h*(1-(q.y[1]+q.y[0])/2),ue=function(Nr){return Y+Nr},_e=function(Nr){return ce+Nr},Le=_e(0),ze=ue(0),Ge=function(Nr){return ze+Nr},Ve=function(Nr){return Le+Nr};function rt(Nr,Jr){return Nr+","+Jr}var pt=Ge(0),gt=function(Nr){Nr.x=Math.max(pt,Nr.x)},ht=M.pathbar.edgeshape,lt=function(Nr){var Jr=Ge(Math.max(Math.min(Nr.x0,Nr.x0),0)),Dt=Ge(Math.min(Math.max(Nr.x1,Nr.x1),G)),$e=Ve(Nr.y0),ot=Ve(Nr.y1),De=J/2,Ee={},Ae={};Ee.x=Jr,Ae.x=Dt,Ee.y=Ae.y=($e+ot)/2;var Ie={x:Jr,y:$e},tt={x:Dt,y:$e},st={x:Dt,y:ot},Ft={x:Jr,y:ot};return ht===">"?(Ie.x-=De,tt.x-=De,st.x-=De,Ft.x-=De):ht==="/"?(st.x-=De,Ft.x-=De,Ee.x-=De/2,Ae.x-=De/2):ht==="\\"?(Ie.x-=De,tt.x-=De,Ee.x-=De/2,Ae.x-=De/2):ht==="<"&&(Ee.x-=De,Ae.x-=De),gt(Ie),gt(Ft),gt(Ee),gt(tt),gt(st),gt(Ae),"M"+rt(Ie.x,Ie.y)+"L"+rt(tt.x,tt.y)+"L"+rt(Ae.x,Ae.y)+"L"+rt(st.x,st.y)+"L"+rt(Ft.x,Ft.y)+"L"+rt(Ee.x,Ee.y)+"Z"},Fe=M[b?"tiling":"marker"].pad,Pe=function(Nr){return M.textposition.indexOf(Nr)!==-1},be=Pe("top"),Ye=Pe("left"),mt=Pe("right"),bt=Pe("bottom"),ft=function(Nr){var Jr=ue(Nr.x0),Dt=ue(Nr.x1),$e=_e(Nr.y0),ot=_e(Nr.y1),De=Dt-Jr,Ee=ot-$e;if(!De||!Ee)return"";var Ae=M.marker.cornerradius||0,Ie=Math.min(Ae,De/2,Ee/2);Ie&&Nr.data&&Nr.data.data&&Nr.data.data.label&&(be&&(Ie=Math.min(Ie,Fe.t)),Ye&&(Ie=Math.min(Ie,Fe.l)),mt&&(Ie=Math.min(Ie,Fe.r)),bt&&(Ie=Math.min(Ie,Fe.b)));var tt=function(st,Ft){return Ie?"a"+rt(Ie,Ie)+" 0 0 1 "+rt(st,Ft):""};return"M"+rt(Jr,$e+Ie)+tt(Ie,-Ie)+"L"+rt(Dt-Ie,$e)+tt(Ie,Ie)+"L"+rt(Dt,ot-Ie)+tt(-Ie,Ie)+"L"+rt(Jr+Ie,ot)+tt(-Ie,-Ie)+"Z"},Wt=function(Nr,Jr){var Dt=Nr.x0,$e=Nr.x1,ot=Nr.y0,De=Nr.y1,Ee=Nr.textBB,Ae=be||Jr.isHeader&&!bt,Ie=Ae?"start":bt?"end":"middle",tt=Pe("right"),st=Pe("left")||Jr.onPathbar,Ft=st?-1:tt?1:0;if(Jr.isHeader){if(Dt+=(b?Fe:Fe.l)-t,$e-=(b?Fe:Fe.r)-t,Dt>=$e){var Nt=(Dt+$e)/2;Dt=Nt,$e=Nt}var Xt;bt?(Xt=De-(b?Fe:Fe.b),ot<Xt&&Xt<De&&(ot=Xt)):(Xt=ot+(b?Fe:Fe.t),ot<Xt&&Xt<De&&(De=Xt))}var lr=a(Dt,$e,ot,De,Ee,{isHorizontal:!1,constrained:!0,angle:0,anchor:Ie,leftToRight:Ft});return lr.fontSize=Jr.fontSize,lr.targetX=ue(lr.targetX),lr.targetY=_e(lr.targetY),isNaN(lr.targetX)||isNaN(lr.targetY)?{}:(Dt!==$e&&ot!==De&&i(M.type,lr,_),{scale:lr.scale,rotate:lr.rotate,textX:lr.textX,textY:lr.textY,anchorX:lr.anchorX,anchorY:lr.anchorY,targetX:lr.targetX,targetY:lr.targetY})},Zt=function(Nr,Jr){for(var Dt,$e=0,ot=Nr;!Dt&&$e<B;)$e++,ot=ot.parent,ot?Dt=pe(ot,Jr):$e=B;return Dt||{}},cr=function(Nr,Jr,Dt,$e){var ot=pe(Nr,Jr),De;if(Jr)De=de;else{var Ee=pe(g,Jr);Ee?De=me(Nr,Ee,$e):De={}}return w(ot,De)},pr=function(Nr,Jr,Dt,$e,ot){var De=pe(Nr,Jr),Ee;if(De)Ee=De;else if(Jr)Ee=de;else if(W)if(Nr.parent){var Ae=ee||Dt;Ae&&!Jr?Ee=me(Nr,Ae,$e):(Ee={},P.extendFlat(Ee,Zt(Nr,Jr)))}else Ee=P.extendFlat({},Nr),b&&(ot.orientation==="h"?ot.flipX?Ee.x0=Nr.x1:Ee.x1=0:ot.flipY?Ee.y0=Nr.y1:Ee.y1=0);else Ee={};return w(Ee,{x0:Nr.x0,x1:Nr.x1,y0:Nr.y0,y1:Nr.y1})},Br=function(Nr,Jr,Dt,$e){var ot=pe(Nr,Jr),De={},Ee=oe(Nr,Jr,Dt,$e);P.extendFlat(De,{transform:Wt({x0:Ee.x0,x1:Ee.x1,y0:Ee.y0,y1:Ee.y1,textBB:Nr.textBB,_text:Nr._text},{isHeader:C.isHeader(Nr,M)})}),ot?De=ot:Nr.parent&&P.extendFlat(De,Zt(Nr,Jr));var Ae=Nr.transform;return Nr.x0!==Nr.x1&&Nr.y0!==Nr.y1&&i(M.type,Ae,_),w(De,{transform:{scale:Ae.scale,rotate:Ae.rotate,textX:Ae.textX,textY:Ae.textY,anchorX:Ae.anchorX,anchorY:Ae.anchorY,targetX:Ae.targetX,targetY:Ae.targetY}})},Fr=function(Nr,Jr,Dt,$e,ot){var De=$e[0],Ee=$e[1];D?Nr.exit().transition().each(function(){var Ae=v.select(this),Ie=Ae.select("path.surface");Ie.transition().attrTween("d",function(st){var Ft=cr(st,Jr,Dt,[De,Ee]);return function(Nt){return ot(Ft(Nt))}});var tt=Ae.select("g.slicetext");tt.attr("opacity",0)}).remove():Nr.exit().remove()},cn=function(Nr){var Jr=Nr.transform;return Nr.x0!==Nr.x1&&Nr.y0!==Nr.y1&&i(M.type,Jr,_),P.getTextTransform({textX:Jr.textX,textY:Jr.textY,anchorX:Jr.anchorX,anchorY:Jr.anchorY,targetX:Jr.targetX,targetY:Jr.targetY,scale:Jr.scale,rotate:Jr.rotate})};D&&(p.each(function(Nr){ie[u(Nr)]={x0:Nr.x0,x1:Nr.x1,y0:Nr.y0,y1:Nr.y1},Nr.transform&&(ie[u(Nr)].transform={textX:Nr.transform.textX,textY:Nr.transform.textY,anchorX:Nr.transform.anchorX,anchorY:Nr.transform.anchorY,targetX:Nr.transform.targetX,targetY:Nr.transform.targetY,scale:Nr.transform.scale,rotate:Nr.transform.rotate})}),x.each(function(Nr){se[u(Nr)]={x0:Nr.x0,x1:Nr.x1,y0:Nr.y0,y1:Nr.y1},Nr.transform&&(se[u(Nr)].transform={textX:Nr.transform.textX,textY:Nr.transform.textY,anchorX:Nr.transform.anchorX,anchorY:Nr.transform.anchorY,targetX:Nr.transform.targetX,targetY:Nr.transform.targetY,scale:Nr.transform.scale,rotate:Nr.transform.rotate}),!W&&C.isEntry(Nr)&&(W=Nr)})),ee=c(h,y,g,x,{width:z,height:H,viewX:ue,viewY:_e,pathSlice:ft,toMoveInsideSlice:Wt,prevEntry:W,makeUpdateSliceInterpolator:pr,makeUpdateTextInterpolator:Br,handleSlicesExit:Fr,hasTransition:D,strTransform:cn}),M.pathbar.visible?o(h,y,g,p,{barDifY:ye,width:G,height:J,viewX:Ge,viewY:Ve,pathSlice:lt,toMoveInsideSlice:Wt,makeUpdateSliceInterpolator:pr,makeUpdateTextInterpolator:Br,handleSlicesExit:Fr,hasTransition:D,strTransform:cn}):p.remove()}}}),V9=Ne({"src/traces/treemap/draw.js"(te,Z){var v=xn(),w=Zs(),C=mc(),P=C.clearMinTextSize,t=Fd().resizeText,r=fK();Z.exports=function(l,i,s,o,u){var d=u.type,h=u.drawDescendants,y=l._fullLayout,m=y["_"+d+"layer"],E,c,_=!s;if(P(d,y),E=m.selectAll("g.trace."+d).data(i,function(M){return M[0].trace.uid}),E.enter().append("g").classed("trace",!0).classed(d,!0),E.order(),!y.uniformtext.mode&&w.hasTransition(s)){o&&(c=o());var T=v.transition().duration(s.duration).ease(s.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()});T.each(function(){m.selectAll("g.trace").each(function(M){r(l,M,this,s,h)})})}else E.each(function(M){r(l,M,this,s,h)}),y.uniformtext.mode&&t(l,m.selectAll(".trace"),d);_&&E.exit().remove()}}}),hK=Ne({"src/traces/treemap/draw_descendants.js"(te,Z){var v=xn(),w=In(),C=zs(),P=uc(),t=q9(),r=cR().styleOne,a=d3(),l=Zs(),i=Au(),s=ec().formatSliceLabel,o=!1;Z.exports=function(d,h,y,m,E){var c=E.width,_=E.height,T=E.viewX,M=E.viewY,k=E.pathSlice,b=E.toMoveInsideSlice,A=E.strTransform,g=E.hasTransition,f=E.handleSlicesExit,p=E.makeUpdateSliceInterpolator,x=E.makeUpdateTextInterpolator,N=E.prevEntry,D={},B=d._context.staticPlot,U=d._fullLayout,V=h[0],q=V.trace,z=q.textposition.indexOf("left")!==-1,H=q.textposition.indexOf("right")!==-1,G=q.textposition.indexOf("bottom")!==-1,J=!G&&!q.marker.pad.t||G&&!q.marker.pad.b,le=t(y,[c,_],{packing:q.tiling.packing,squarifyratio:q.tiling.squarifyratio,flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1,pad:{inner:q.tiling.pad,top:q.marker.pad.t,left:q.marker.pad.l,right:q.marker.pad.r,bottom:q.marker.pad.b}}),ye=le.descendants(),de=1/0,me=-1/0;ye.forEach(function(pe){var oe=pe.depth;oe>=q._maxDepth?(pe.x0=pe.x1=(pe.x0+pe.x1)/2,pe.y0=pe.y1=(pe.y0+pe.y1)/2):(de=Math.min(de,oe),me=Math.max(me,oe))}),m=m.data(ye,l.getPtId),q._maxVisibleLayers=isFinite(me)?me-de+1:0,m.enter().append("g").classed("slice",!0),f(m,o,D,[c,_],k),m.order();var W=null;if(g&&N){var ie=l.getPtId(N);m.each(function(pe){W===null&&l.getPtId(pe)===ie&&(W={x0:pe.x0,x1:pe.x1,y0:pe.y0,y1:pe.y1})})}var se=function(){return W||{x0:0,x1:c,y0:0,y1:_}},ee=m;return g&&(ee=ee.transition().each("end",function(){var pe=v.select(this);l.setSliceCursor(pe,d,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),ee.each(function(pe){var oe=l.isHeader(pe,q);pe._x0=T(pe.x0),pe._x1=T(pe.x1),pe._y0=M(pe.y0),pe._y1=M(pe.y1),pe._hoverX=T(pe.x1-q.marker.pad.r),pe._hoverY=M(G?pe.y1-q.marker.pad.b/2:pe.y0+q.marker.pad.t/2);var Y=v.select(this),ce=w.ensureSingle(Y,"path","surface",function(Ve){Ve.style("pointer-events",B?"none":"all")});g?ce.transition().attrTween("d",function(Ve){var rt=p(Ve,o,se(),[c,_]);return function(pt){return k(rt(pt))}}):ce.attr("d",k),Y.call(i,y,d,h,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,d,{isTransitioning:d._transitioning}),ce.call(r,pe,q,d,{hovered:!1}),pe.x0===pe.x1||pe.y0===pe.y1?pe._text="":oe?pe._text=J?"":l.getPtLabel(pe)||"":pe._text=s(pe,y,q,h,U)||"";var ue=w.ensureSingle(Y,"g","slicetext"),_e=w.ensureSingle(ue,"text","",function(Ve){Ve.attr("data-notex",1)}),Le=w.ensureUniformFontSize(d,l.determineTextFont(q,pe,U.font)),ze=pe._text||" ",Ge=oe&&ze.indexOf("<br>")===-1;_e.text(ze).classed("slicetext",!0).attr("text-anchor",H?"end":z||Ge?"start":"middle").call(C.font,Le).call(P.convertToTspans,d),pe.textBB=C.bBox(_e.node()),pe.transform=b(pe,{fontSize:Le.size,isHeader:oe}),pe.transform.fontSize=Le.size,g?_e.transition().attrTween("transform",function(Ve){var rt=x(Ve,o,se(),[c,_]);return function(pt){return A(rt(pt))}}):_e.attr("transform",A(pe))}),W}}}),dK=Ne({"src/traces/treemap/plot.js"(te,Z){var v=V9(),w=hK();Z.exports=function(P,t,r,a){return v(P,t,r,a,{type:"treemap",drawDescendants:w})}}}),vK=Ne({"src/traces/treemap/index.js"(te,Z){Z.exports={moduleType:"trace",name:"treemap",basePlotModule:lR(),categories:[],animatable:!0,attributes:uR(),layoutAttributes:B9(),supplyDefaults:lK(),supplyLayoutDefaults:uK(),calc:j9().calc,crossTraceCalc:j9().crossTraceCalc,plot:dK(),style:cR().style,colorbar:ah(),meta:{}}}}),pK=Ne({"lib/treemap.js"(te,Z){Z.exports=vK()}}),mK=Ne({"src/traces/icicle/base_plot.js"(te){var Z=uf();te.name="icicle",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),H9=Ne({"src/traces/icicle/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=Vu(),t=Oc().attributes,r=d_(),a=sb(),l=uR(),i=d3(),s=co().extendFlat,o=Dd().pattern;Z.exports={labels:a.labels,parents:a.parents,values:a.values,branchvalues:a.branchvalues,count:a.count,level:a.level,maxdepth:a.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:l.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:s({colors:a.marker.colors,line:a.marker.line,pattern:o,editType:"calc"},P("marker",{colorAttr:"colors",anim:!1})),leaf:a.leaf,pathbar:l.pathbar,text:r.text,textinfo:a.textinfo,texttemplate:w({editType:"plot"},{keys:i.eventDataKeys.concat(["label","value"])}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,hoverinfo:a.hoverinfo,hovertemplate:v({},{keys:i.eventDataKeys}),hovertemplatefallback:C(),textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:l.outsidetextfont,textposition:l.textposition,sort:r.sort,root:a.root,domain:t({name:"icicle",trace:!0,editType:"calc"})}}}),G9=Ne({"src/traces/icicle/layout_attributes.js"(te,Z){Z.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),yK=Ne({"src/traces/icicle/defaults.js"(te,Z){var v=In(),w=H9(),C=io(),P=Oc().defaults,t=vp().handleText,r=Oy().TEXTPAD,a=v_().handleMarkerDefaults,l=Dc(),i=l.hasColorscale,s=l.handleDefaults;Z.exports=function(u,d,h,y){function m(A,g){return v.coerce(u,d,w,A,g)}var E=m("labels"),c=m("parents");if(!E||!E.length||!c||!c.length){d.visible=!1;return}var _=m("values");_&&_.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),m("tiling.orientation"),m("tiling.flip"),m("tiling.pad");var T=m("text");m("texttemplate"),m("texttemplatefallback"),d.texttemplate||m("textinfo",v.isArrayOrTypedArray(T)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var M=m("pathbar.visible"),k="auto";t(u,d,y,m,k,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("textposition"),a(u,d,y,m);var b=d._hasColorscale=i(u,"marker","colors")||(u.marker||{}).coloraxis;b&&s(u,d,y,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",b?1:.7),d._hovered={marker:{line:{width:2,color:C.contrast(y.paper_bgcolor)}}},M&&(m("pathbar.thickness",d.pathbar.textfont.size+2*r),m("pathbar.side"),m("pathbar.edgeshape")),m("sort"),m("root.color"),P(d,y,m),d._length=null}}}),gK=Ne({"src/traces/icicle/layout_defaults.js"(te,Z){var v=In(),w=G9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("iciclecolorway",t.colorway),r("extendiciclecolors")}}}),X9=Ne({"src/traces/icicle/calc.js"(te){var Z=lb();te.calc=function(v,w){return Z.calc(v,w)},te.crossTraceCalc=function(v){return Z._runCrossTraceCalc("icicle",v)}}}),_K=Ne({"src/traces/icicle/partition.js"(te,Z){var v=m_(),w=U9();Z.exports=function(P,t,r){var a=r.flipX,l=r.flipY,i=r.orientation==="h",s=r.maxDepth,o=t[0],u=t[1];s&&(o=(P.height+1)*t[0]/Math.min(P.height+1,s),u=(P.height+1)*t[1]/Math.min(P.height+1,s));var d=v.partition().padding(r.pad.inner).size(i?[t[1],o]:[t[0],u])(P);return(i||a||l)&&w(d,t,{swapXY:i,flipX:a,flipY:l}),d}}}),W9=Ne({"src/traces/icicle/style.js"(te,Z){var v=xn(),w=io(),C=In(),P=mc().resizeText,t=kl();function r(l){var i=l._fullLayout._iciclelayer.selectAll(".trace");P(l,i,"icicle"),i.each(function(s){var o=v.select(this),u=s[0],d=u.trace;o.style("opacity",d.opacity),o.selectAll("path.surface").each(function(h){v.select(this).call(a,h,d,l)})})}function a(l,i,s,o){var u=i.data.data,d=!i.children,h=u.i,y=C.castOption(s,h,"marker.line.color")||w.defaultLine,m=C.castOption(s,h,"marker.line.width")||0;l.call(t,i,s,o).style("stroke-width",m).call(w.stroke,y).style("opacity",d?s.leaf.opacity:null)}Z.exports={style:r,styleOne:a}}}),xK=Ne({"src/traces/icicle/draw_descendants.js"(te,Z){var v=xn(),w=In(),C=zs(),P=uc(),t=_K(),r=W9().styleOne,a=d3(),l=Zs(),i=Au(),s=ec().formatSliceLabel,o=!1;Z.exports=function(d,h,y,m,E){var c=E.width,_=E.height,T=E.viewX,M=E.viewY,k=E.pathSlice,b=E.toMoveInsideSlice,A=E.strTransform,g=E.hasTransition,f=E.handleSlicesExit,p=E.makeUpdateSliceInterpolator,x=E.makeUpdateTextInterpolator,N=E.prevEntry,D={},B=d._context.staticPlot,U=d._fullLayout,V=h[0],q=V.trace,z=q.textposition.indexOf("left")!==-1,H=q.textposition.indexOf("right")!==-1,G=q.textposition.indexOf("bottom")!==-1,J=t(y,[c,_],{flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1,orientation:q.tiling.orientation,pad:{inner:q.tiling.pad},maxDepth:q._maxDepth}),le=J.descendants(),ye=1/0,de=-1/0;le.forEach(function(ee){var pe=ee.depth;pe>=q._maxDepth?(ee.x0=ee.x1=(ee.x0+ee.x1)/2,ee.y0=ee.y1=(ee.y0+ee.y1)/2):(ye=Math.min(ye,pe),de=Math.max(de,pe))}),m=m.data(le,l.getPtId),q._maxVisibleLayers=isFinite(de)?de-ye+1:0,m.enter().append("g").classed("slice",!0),f(m,o,D,[c,_],k),m.order();var me=null;if(g&&N){var W=l.getPtId(N);m.each(function(ee){me===null&&l.getPtId(ee)===W&&(me={x0:ee.x0,x1:ee.x1,y0:ee.y0,y1:ee.y1})})}var ie=function(){return me||{x0:0,x1:c,y0:0,y1:_}},se=m;return g&&(se=se.transition().each("end",function(){var ee=v.select(this);l.setSliceCursor(ee,d,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),se.each(function(ee){ee._x0=T(ee.x0),ee._x1=T(ee.x1),ee._y0=M(ee.y0),ee._y1=M(ee.y1),ee._hoverX=T(ee.x1-q.tiling.pad),ee._hoverY=M(G?ee.y1-q.tiling.pad/2:ee.y0+q.tiling.pad/2);var pe=v.select(this),oe=w.ensureSingle(pe,"path","surface",function(_e){_e.style("pointer-events",B?"none":"all")});g?oe.transition().attrTween("d",function(_e){var Le=p(_e,o,ie(),[c,_],{orientation:q.tiling.orientation,flipX:q.tiling.flip.indexOf("x")>-1,flipY:q.tiling.flip.indexOf("y")>-1});return function(ze){return k(Le(ze))}}):oe.attr("d",k),pe.call(i,y,d,h,{styleOne:r,eventDataKeys:a.eventDataKeys,transitionTime:a.CLICK_TRANSITION_TIME,transitionEasing:a.CLICK_TRANSITION_EASING}).call(l.setSliceCursor,d,{isTransitioning:d._transitioning}),oe.call(r,ee,q,d,{hovered:!1}),ee.x0===ee.x1||ee.y0===ee.y1?ee._text="":ee._text=s(ee,y,q,h,U)||"";var Y=w.ensureSingle(pe,"g","slicetext"),ce=w.ensureSingle(Y,"text","",function(_e){_e.attr("data-notex",1)}),ue=w.ensureUniformFontSize(d,l.determineTextFont(q,ee,U.font));ce.text(ee._text||" ").classed("slicetext",!0).attr("text-anchor",H?"end":z?"start":"middle").call(C.font,ue).call(P.convertToTspans,d),ee.textBB=C.bBox(ce.node()),ee.transform=b(ee,{fontSize:ue.size}),ee.transform.fontSize=ue.size,g?ce.transition().attrTween("transform",function(_e){var Le=x(_e,o,ie(),[c,_]);return function(ze){return A(Le(ze))}}):ce.attr("transform",A(ee))}),me}}}),bK=Ne({"src/traces/icicle/plot.js"(te,Z){var v=V9(),w=xK();Z.exports=function(P,t,r,a){return v(P,t,r,a,{type:"icicle",drawDescendants:w})}}}),wK=Ne({"src/traces/icicle/index.js"(te,Z){Z.exports={moduleType:"trace",name:"icicle",basePlotModule:mK(),categories:[],animatable:!0,attributes:H9(),layoutAttributes:G9(),supplyDefaults:yK(),supplyLayoutDefaults:gK(),calc:X9().calc,crossTraceCalc:X9().crossTraceCalc,plot:bK(),style:W9().style,colorbar:ah(),meta:{}}}}),TK=Ne({"lib/icicle.js"(te,Z){Z.exports=wK()}}),AK=Ne({"src/traces/funnelarea/base_plot.js"(te){var Z=uf();te.name="funnelarea",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),Y9=Ne({"src/traces/funnelarea/attributes.js"(te,Z){var v=d_(),w=ns(),C=Oc().attributes,{hovertemplateAttrs:P,texttemplateAttrs:t,templatefallbackAttrs:r}=Il(),a=co().extendFlat;Z.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:a({},v.marker.line.color,{dflt:null}),width:a({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:a({},v.scalegroup,{}),textinfo:a({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:t({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:r({editType:"plot"}),hoverinfo:a({},w.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:P({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:r(),textposition:a({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:a({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:C({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"}}}}),Z9=Ne({"src/traces/funnelarea/layout_attributes.js"(te,Z){var v=bS().hiddenlabels;Z.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),SK=Ne({"src/traces/funnelarea/defaults.js"(te,Z){var v=In(),w=Y9(),C=Oc().defaults,P=vp().handleText,t=v_().handleLabelsAndValues,r=v_().handleMarkerDefaults;Z.exports=function(l,i,s,o){function u(k,b){return v.coerce(l,i,w,k,b)}var d=u("labels"),h=u("values"),y=t(d,h),m=y.len;if(i._hasLabels=y.hasLabels,i._hasValues=y.hasValues,!i._hasLabels&&i._hasValues&&(u("label0"),u("dlabel")),!m){i.visible=!1;return}i._length=m,r(l,i,o,u),u("scalegroup");var E=u("text"),c=u("texttemplate");u("texttemplatefallback");var _;if(c||(_=u("textinfo",Array.isArray(E)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),c||_&&_!=="none"){var T=u("textposition");P(l,i,o,u,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else _==="none"&&u("textposition","none");C(i,o,u);var M=u("title.text");M&&(u("title.position"),v.coerceFont(u,"title.font",o.font)),u("aspectratio"),u("baseratio")}}}),EK=Ne({"src/traces/funnelarea/layout_defaults.js"(te,Z){var v=In(),w=Z9();Z.exports=function(P,t){function r(a,l){return v.coerce(P,t,w,a,l)}r("hiddenlabels"),r("funnelareacolorway",t.colorway),r("extendfunnelareacolors")}}}),$9=Ne({"src/traces/funnelarea/calc.js"(te,Z){var v=h0();function w(P,t){return v.calc(P,t)}function C(P){v.crossTraceCalc(P,{type:"funnelarea"})}Z.exports={calc:w,crossTraceCalc:C}}}),MK=Ne({"src/traces/funnelarea/plot.js"(te,Z){var v=xn(),w=zs(),C=In(),P=C.strScale,t=C.strTranslate,r=uc(),a=hu(),l=a.toMoveInsideBar,i=mc(),s=i.recordMinTextSize,o=i.clearMinTextSize,u=Ag(),d=p_(),h=d.attachFxHandlers,y=d.determineInsideTextFont,m=d.layoutAreas,E=d.prerenderTitles,c=d.positionTitleOutside,_=d.formatSliceLabel;Z.exports=function(A,g){var f=A._context.staticPlot,p=A._fullLayout;o("funnelarea",p),E(g,A),m(g,p._size),C.makeTraceGroups(p._funnelarealayer,g,"trace").each(function(x){var N=v.select(this),D=x[0],B=D.trace;k(x),N.each(function(){var U=v.select(this).selectAll("g.slice").data(x);U.enter().append("g").classed("slice",!0),U.exit().remove(),U.each(function(q,z){if(q.hidden){v.select(this).selectAll("path,g").remove();return}q.pointNumber=q.i,q.curveNumber=B.index;var H=D.cx,G=D.cy,J=v.select(this),le=J.selectAll("path.surface").data([q]);le.enter().append("path").classed("surface",!0).style({"pointer-events":f?"none":"all"}),J.call(h,A,x);var ye="M"+(H+q.TR[0])+","+(G+q.TR[1])+T(q.TR,q.BR)+T(q.BR,q.BL)+T(q.BL,q.TL)+"Z";le.attr("d",ye),_(A,q,D);var de=u.castOption(B.textposition,q.pts),me=J.selectAll("g.slicetext").data(q.text&&de!=="none"?[0]:[]);me.enter().append("g").classed("slicetext",!0),me.exit().remove(),me.each(function(){var W=C.ensureSingle(v.select(this),"text","",function(ue){ue.attr("data-notex",1)}),ie=C.ensureUniformFontSize(A,y(B,q,p.font));W.text(q.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(w.font,ie).call(r.convertToTspans,A);var se=w.bBox(W.node()),ee,pe,oe,Y=Math.min(q.BL[1],q.BR[1])+G,ce=Math.max(q.TL[1],q.TR[1])+G;pe=Math.max(q.TL[0],q.BL[0])+H,oe=Math.min(q.TR[0],q.BR[0])+H,ee=l(pe,oe,Y,ce,se,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),ee.fontSize=ie.size,s(B.type,ee,p),x[z].transform=ee,C.setTransormAndDisplay(W,ee)})});var V=v.select(this).selectAll("g.titletext").data(B.title.text?[0]:[]);V.enter().append("g").classed("titletext",!0),V.exit().remove(),V.each(function(){var q=C.ensureSingle(v.select(this),"text","",function(G){G.attr("data-notex",1)}),z=B.title.text;B._meta&&(z=C.templateString(z,B._meta)),q.text(z).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(w.font,B.title.font).call(r.convertToTspans,A);var H=c(D,p._size);q.attr("transform",t(H.x,H.y)+P(Math.min(1,H.scale))+t(H.tx,H.ty))})})})};function T(b,A){var g=A[0]-b[0],f=A[1]-b[1];return"l"+g+","+f}function M(b,A){return[.5*(b[0]+A[0]),.5*(b[1]+A[1])]}function k(b){if(!b.length)return;var A=b[0],g=A.trace,f=g.aspectratio,p=g.baseratio;p>.999&&(p=.999);var x=Math.pow(p,2),N=A.vTotal,D=N*x/(1-x),B=N,U=D/N;function V(){var _e=Math.sqrt(U);return{x:_e,y:-_e}}function q(){var _e=V();return[_e.x,_e.y]}var z,H=[];H.push(q());var G,J;for(G=b.length-1;G>-1;G--)if(J=b[G],!J.hidden){var le=J.v/B;U+=le,H.push(q())}var ye=1/0,de=-1/0;for(G=0;G<H.length;G++)z=H[G],ye=Math.min(ye,z[1]),de=Math.max(de,z[1]);for(G=0;G<H.length;G++)H[G][1]-=(de+ye)/2;var me=H[H.length-1][0],W=A.r,ie=(de-ye)/2,se=W/me,ee=W/ie*f;for(A.r=ee*ie,G=0;G<H.length;G++)H[G][0]*=se,H[G][1]*=ee;z=H[0];var pe=[-z[0],z[1]],oe=[z[0],z[1]],Y=0;for(G=b.length-1;G>-1;G--)if(J=b[G],!J.hidden){Y+=1;var ce=H[Y][0],ue=H[Y][1];J.TL=[-ce,ue],J.TR=[ce,ue],J.BL=pe,J.BR=oe,J.pxmid=M(J.TR,J.BR),pe=J.TL,oe=J.TR}}}}),CK=Ne({"src/traces/funnelarea/style.js"(te,Z){var v=xn(),w=Tx(),C=mc().resizeText;Z.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");C(t,r,"funnelarea"),r.each(function(a){var l=a[0],i=l.trace,s=v.select(this);s.style({opacity:i.opacity}),s.selectAll("path.surface").each(function(o){v.select(this).call(w,o,i,t)})})}}}),kK=Ne({"src/traces/funnelarea/index.js"(te,Z){Z.exports={moduleType:"trace",name:"funnelarea",basePlotModule:AK(),categories:["pie-like","funnelarea","showLegend"],attributes:Y9(),layoutAttributes:Z9(),supplyDefaults:SK(),supplyLayoutDefaults:EK(),calc:$9().calc,crossTraceCalc:$9().crossTraceCalc,plot:MK(),style:CK(),styleOne:Tx(),meta:{}}}}),PK=Ne({"lib/funnelarea.js"(te,Z){Z.exports=kK()}}),Vv=Ne({"stackgl_modules/index.js"(te,Z){(function(){var v={24:(function(t){var r={left:0,top:0};t.exports=a;function a(i,s,o){s=s||i.currentTarget||i.srcElement,Array.isArray(o)||(o=[0,0]);var u=i.clientX||0,d=i.clientY||0,h=l(s);return o[0]=u-h.left,o[1]=d-h.top,o}function l(i){return i===window||i===document||i===document.body?r:i.getBoundingClientRect()}}),109:(function(t){t.exports=r;function r(a,l,i,s){var o=i[0],u=i[2],d=l[0]-o,h=l[2]-u,y=Math.sin(s),m=Math.cos(s);return a[0]=o+h*y+d*m,a[1]=l[1],a[2]=u+h*m-d*y,a}}),160:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.max(l[0],i[0]),a[1]=Math.max(l[1],i[1]),a[2]=Math.max(l[2],i[2]),a[3]=Math.max(l[3],i[3]),a}}),216:(function(t){t.exports=r;function r(a,l){for(var i={},s=0;s<a.length;++s)for(var o=a[s].name,u=o.split("."),d=i,h=0;h<u.length;++h){var y=u[h].split("[");if(y.length>1){y[0]in d||(d[y[0]]=[]),d=d[y[0]];for(var m=1;m<y.length;++m){var E=parseInt(y[m]);m<y.length-1||h<u.length-1?(E in d||(m<y.length-1?d[E]=[]:d[E]={}),d=d[E]):l?d[E]=s:d[E]=a[s].type}}else h<u.length-1?(y[0]in d||(d[y[0]]={}),d=d[y[0]]):l?d[y[0]]=s:d[y[0]]=a[s].type}return i}}),236:(function(t,r,a){var l=a(8284);t.exports=i;function i(){var s={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var u=o.valueOf(s);return u&&u.identity===s?u:l(o,s)}}}),244:(function(t){t.exports=r;function r(a,l){return a[0]*l[0]+a[1]*l[1]+a[2]*l[2]}}),264:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],y=i[2],m=i[3],E=m*s+h*u-y*o,c=m*o+y*s-d*u,_=m*u+d*o-h*s,T=-d*s-h*o-y*u;return a[0]=E*m+T*-d+c*-y-_*-h,a[1]=c*m+T*-h+_*-d-E*-y,a[2]=_*m+T*-y+E*-h-c*-d,a}}),332:(function(t,r,a){t.exports=N;var l=a(1755),i=a(6867),s=a(1125),o=a(7842),u=a(1318),d=a(946),h=a(5838),y=a(1278),m=a(3637);function E(D){var B=d(D);return[y(B,-1/0),y(B,1/0)]}function c(D,B){for(var U=new Array(B.length),V=0;V<B.length;++V){var q=B[V],z=D[q[0]],H=D[q[1]];U[V]=[y(Math.min(z[0],H[0]),-1/0),y(Math.min(z[1],H[1]),-1/0),y(Math.max(z[0],H[0]),1/0),y(Math.max(z[1],H[1]),1/0)]}return U}function _(D){for(var B=new Array(D.length),U=0;U<D.length;++U){var V=D[U];B[U]=[y(V[0],-1/0),y(V[1],-1/0),y(V[0],1/0),y(V[1],1/0)]}return B}function T(D,B,U){var V=[];return i(U,function(q,z){var H=B[q],G=B[z];if(!(H[0]===G[0]||H[0]===G[1]||H[1]===G[0]||H[1]===G[1])){var J=D[H[0]],le=D[H[1]],ye=D[G[0]],de=D[G[1]];s(J,le,ye,de)&&V.push([q,z])}}),V}function M(D,B,U,V){var q=[];return i(U,V,function(z,H){var G=B[z];if(!(G[0]===H||G[1]===H)){var J=D[H],le=D[G[0]],ye=D[G[1]];s(le,ye,J,J)&&q.push([z,H])}}),q}function k(D,B,U,V,q){var z,H,G=D.map(function(ze){return[o(ze[0]),o(ze[1])]});for(z=0;z<U.length;++z){var J=U[z];H=J[0];var le=J[1],ye=B[H],de=B[le],me=m(h(D[ye[0]]),h(D[ye[1]]),h(D[de[0]]),h(D[de[1]]));if(me){var W=D.length;D.push([d(me[0]),d(me[1])]),G.push(me),V.push([H,W],[le,W])}}for(V.sort(function(ze,Ge){if(ze[0]!==Ge[0])return ze[0]-Ge[0];var Ve=G[ze[1]],rt=G[Ge[1]];return u(Ve[0],rt[0])||u(Ve[1],rt[1])}),z=V.length-1;z>=0;--z){var ie=V[z];H=ie[0];var se=B[H],ee=se[0],pe=se[1],oe=D[ee],Y=D[pe];if((oe[0]-Y[0]||oe[1]-Y[1])<0){var ce=ee;ee=pe,pe=ce}se[0]=ee;var ue=se[1]=ie[1],_e;for(q&&(_e=se[2]);z>0&&V[z-1][0]===H;){var ie=V[--z],Le=ie[1];q?B.push([ue,Le,_e]):B.push([ue,Le]),ue=Le}q?B.push([ue,pe,_e]):B.push([ue,pe])}return G}function b(D,B,U){for(var V=B.length,q=new l(V),z=[],H=0;H<B.length;++H){var G=B[H],J=E(G[0]),le=E(G[1]);z.push([y(J[0],-1/0),y(le[0],-1/0),y(J[1],1/0),y(le[1],1/0)])}i(z,function(ie,se){q.link(ie,se)});for(var ye=!0,de=new Array(V),H=0;H<V;++H){var me=q.find(H);me!==H&&(ye=!1,D[me]=[Math.min(D[H][0],D[me][0]),Math.min(D[H][1],D[me][1])])}if(ye)return null;for(var W=0,H=0;H<V;++H){var me=q.find(H);me===H?(de[H]=W,D[W++]=D[H]):de[H]=-1}D.length=W;for(var H=0;H<V;++H)de[H]<0&&(de[H]=de[q.find(H)]);return de}function A(D,B){return D[0]-B[0]||D[1]-B[1]}function g(D,B){var U=D[0]-B[0]||D[1]-B[1];return U||(D[2]<B[2]?-1:D[2]>B[2]?1:0)}function f(D,B,U){if(D.length!==0){if(B)for(var V=0;V<D.length;++V){var q=D[V],z=B[q[0]],H=B[q[1]];q[0]=Math.min(z,H),q[1]=Math.max(z,H)}else for(var V=0;V<D.length;++V){var q=D[V],z=q[0],H=q[1];q[0]=Math.min(z,H),q[1]=Math.max(z,H)}U?D.sort(g):D.sort(A);for(var G=1,V=1;V<D.length;++V){var J=D[V-1],le=D[V];le[0]===J[0]&&le[1]===J[1]&&(!U||le[2]===J[2])||(D[G++]=le)}D.length=G}}function p(D,B,U){var V=b(D,[],_(D));return f(B,V,U),!!V}function x(D,B,U){var V=c(D,B),q=T(D,B,V),z=_(D),H=M(D,B,V,z),G=k(D,B,q,H,U),J=b(D,G);return f(B,J,U),J?!0:q.length>0||H.length>0}function N(D,B,U){var V;if(U){V=B;for(var q=new Array(B.length),z=0;z<B.length;++z){var H=B[z];q[z]=[H[0],H[1],U[z]]}B=q}for(var G=p(D,B,!!U);x(D,B,!!U);)G=!0;if(U&&G){V.length=0,U.length=0;for(var z=0;z<B.length;++z){var H=B[z];V.push([H[0],H[1]]),U.push(H[2])}}return G}}),351:(function(t,r,a){t.exports=i;var l=a(4687);function i(s,o){o||(o=s,s=window);var u=0,d=0,h=0,y={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function E(x){var N=!1;return"altKey"in x&&(N=N||x.altKey!==y.alt,y.alt=!!x.altKey),"shiftKey"in x&&(N=N||x.shiftKey!==y.shift,y.shift=!!x.shiftKey),"ctrlKey"in x&&(N=N||x.ctrlKey!==y.control,y.control=!!x.ctrlKey),"metaKey"in x&&(N=N||x.metaKey!==y.meta,y.meta=!!x.metaKey),N}function c(x,N){var D=l.x(N),B=l.y(N);"buttons"in N&&(x=N.buttons|0),(x!==u||D!==d||B!==h||E(N))&&(u=x|0,d=D||0,h=B||0,o&&o(u,d,h,y))}function _(x){c(0,x)}function T(){(u||d||h||y.shift||y.alt||y.meta||y.control)&&(d=h=0,u=0,y.shift=y.alt=y.control=y.meta=!1,o&&o(0,0,0,y))}function M(x){E(x)&&o&&o(u,d,h,y)}function k(x){l.buttons(x)===0?c(0,x):c(u,x)}function b(x){c(u|l.buttons(x),x)}function A(x){c(u&~l.buttons(x),x)}function g(){m||(m=!0,s.addEventListener("mousemove",k),s.addEventListener("mousedown",b),s.addEventListener("mouseup",A),s.addEventListener("mouseleave",_),s.addEventListener("mouseenter",_),s.addEventListener("mouseout",_),s.addEventListener("mouseover",_),s.addEventListener("blur",T),s.addEventListener("keyup",M),s.addEventListener("keydown",M),s.addEventListener("keypress",M),s!==window&&(window.addEventListener("blur",T),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function f(){m&&(m=!1,s.removeEventListener("mousemove",k),s.removeEventListener("mousedown",b),s.removeEventListener("mouseup",A),s.removeEventListener("mouseleave",_),s.removeEventListener("mouseenter",_),s.removeEventListener("mouseout",_),s.removeEventListener("mouseover",_),s.removeEventListener("blur",T),s.removeEventListener("keyup",M),s.removeEventListener("keydown",M),s.removeEventListener("keypress",M),s!==window&&(window.removeEventListener("blur",T),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}g();var p={element:s};return Object.defineProperties(p,{enabled:{get:function(){return m},set:function(x){x?g():f()},enumerable:!0},buttons:{get:function(){return u},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return h},enumerable:!0},mods:{get:function(){return y},enumerable:!0}}),p}}),395:(function(t){function r(a,l,i){return a*(1-i)+l*i}t.exports=r}),446:(function(t,r,a){var l=a(7640),i={};function s(o){var u=o.order,d=o.dtype,h=[u,d],y=h.join(":"),m=i[y];return m||(i[y]=m=l(u,d)),m(o),o}t.exports=s}),483:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3];return l*l+i*i+s*s+o*o}}),492:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2];return a[0]=s*i[0]+o*i[3]+u*i[6],a[1]=s*i[1]+o*i[4]+u*i[7],a[2]=s*i[2]+o*i[5]+u*i[8],a}}),501:(function(t,r,a){t.exports=T;var l=a(2762),i=a(8116),s=a(1879).n,o=[0,0,0],u=[0,0,0],d=[0,0,0],h=[0,0,0],y=[1,1];function m(M){return M[0]=M[1]=M[2]=0,M}function E(M,k){return M[0]=k[0],M[1]=k[1],M[2]=k[2],M}function c(M,k,b,A,g,f,p,x){this.gl=M,this.vertBuffer=k,this.vao=b,this.shader=A,this.tickCount=g,this.tickOffset=f,this.gridCount=p,this.gridOffset=x}var _=c.prototype;_.bind=function(M,k,b){this.shader.bind(),this.shader.uniforms.model=M,this.shader.uniforms.view=k,this.shader.uniforms.projection=b,y[0]=this.gl.drawingBufferWidth,y[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=y,this.vao.bind()},_.unbind=function(){this.vao.unbind()},_.drawAxisLine=function(M,k,b,A,g){var f=m(u);this.shader.uniforms.majorAxis=u,f[M]=k[1][M]-k[0][M],this.shader.uniforms.minorAxis=f;var p=E(h,b);p[M]+=k[0][M],this.shader.uniforms.offset=p,this.shader.uniforms.lineWidth=g,this.shader.uniforms.color=A;var x=m(d);x[(M+2)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6);var x=m(d);x[(M+1)%3]=1,this.shader.uniforms.screenAxis=x,this.vao.draw(this.gl.TRIANGLES,6)},_.drawAxisTicks=function(M,k,b,A,g){if(this.tickCount[M]){var f=m(o);f[M]=1,this.shader.uniforms.majorAxis=f,this.shader.uniforms.offset=k,this.shader.uniforms.minorAxis=b,this.shader.uniforms.color=A,this.shader.uniforms.lineWidth=g;var p=m(d);p[M]=1,this.shader.uniforms.screenAxis=p,this.vao.draw(this.gl.TRIANGLES,this.tickCount[M],this.tickOffset[M])}},_.drawGrid=function(M,k,b,A,g,f){if(this.gridCount[M]){var p=m(u);p[k]=b[1][k]-b[0][k],this.shader.uniforms.minorAxis=p;var x=E(h,A);x[k]+=b[0][k],this.shader.uniforms.offset=x;var N=m(o);N[M]=1,this.shader.uniforms.majorAxis=N;var D=m(d);D[M]=1,this.shader.uniforms.screenAxis=D,this.shader.uniforms.lineWidth=f,this.shader.uniforms.color=g,this.vao.draw(this.gl.TRIANGLES,this.gridCount[M],this.gridOffset[M])}},_.drawZero=function(M,k,b,A,g,f){var p=m(u);this.shader.uniforms.majorAxis=p,p[M]=b[1][M]-b[0][M],this.shader.uniforms.minorAxis=p;var x=E(h,A);x[M]+=b[0][M],this.shader.uniforms.offset=x;var N=m(d);N[k]=1,this.shader.uniforms.screenAxis=N,this.shader.uniforms.lineWidth=f,this.shader.uniforms.color=g,this.vao.draw(this.gl.TRIANGLES,6)},_.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()};function T(M,k,b){var A=[],g=[0,0,0],f=[0,0,0],p=[0,0,0],x=[0,0,0];A.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var N=0;N<3;++N){for(var U=A.length/3|0,D=0;D<b[N].length;++D){var B=+b[N][D].x;A.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var q=A.length/3|0;g[N]=U,f[N]=q-U;for(var U=A.length/3|0,V=0;V<b[N].length;++V){var B=+b[N][V].x;A.push(B,0,1,B,1,1,B,0,-1,B,0,-1,B,1,1,B,1,-1)}var q=A.length/3|0;p[N]=U,x[N]=q-U}var z=l(M,new Float32Array(A)),H=i(M,[{buffer:z,type:M.FLOAT,size:3,stride:0,offset:0}]),G=s(M);return G.attributes.position.location=0,new c(M,z,H,G,f,g,x,p)}}),544:(function(t,r,a){var l=a(5572);t.exports=i;function i(s,o){for(var u=s.length,d=new Array(u),h=0;h<u;++h)d[h]=l(s[h],o[h]);return d}}),606:(function(t,r,a){var l=a(236);t.exports=i;function i(){var s=l();return{get:function(o,u){var d=s(o);return d.hasOwnProperty("value")?d.value:u},set:function(o,u){return s(o).value=u,this},has:function(o){return"value"in s(o)},delete:function(o){return delete s(o).value}}}}),614:(function(t,r,a){var l=a(3236),i=l([`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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}
`]),u=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  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);
}`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),620:(function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),665:(function(t,r,a){var l=a(3202);t.exports=u;var i=96;function s(d,h){var y=l(getComputedStyle(d).getPropertyValue(h));return y[0]*u(y[1],d)}function o(d,h){var y=document.createElement("div");y.style["font-size"]="128"+d,h.appendChild(y);var m=s(y,"font-size")/128;return h.removeChild(y),m}function u(d,h){switch(h=h||document.body,d=(d||"px").trim().toLowerCase(),(h===window||h===document)&&(h=document.body),d){case"%":return h.clientHeight/100;case"ch":case"ex":return o(d,h);case"em":return s(h,"font-size");case"rem":return s(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return i;case"cm":return i/2.54;case"mm":return i/25.4;case"pt":return i/72;case"pc":return i/6}return 1}}),727:(function(t,r,a){var l=a(2962),i=6;function s(M){var k=M===2?d:M===3?h:M===4?y:M===5?m:E;return M<6?k(l[M]):k(l)}function o(){return[[0]]}function u(M,k){return[[k[0]],[M[0][0]]]}function d(M){return function(b,A){return[M([[+A[0],+b[0][1]],[+A[1],+b[1][1]]]),M([[+b[0][0],+A[0]],[+b[1][0],+A[1]]]),M(b)]}}function h(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2]],[+A[1],+b[1][1],+b[1][2]],[+A[2],+b[2][1],+b[2][2]]]),M([[+b[0][0],+A[0],+b[0][2]],[+b[1][0],+A[1],+b[1][2]],[+b[2][0],+A[2],+b[2][2]]]),M([[+b[0][0],+b[0][1],+A[0]],[+b[1][0],+b[1][1],+A[1]],[+b[2][0],+b[2][1],+A[2]]]),M(b)]}}function y(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3]],[+A[1],+b[1][1],+b[1][2],+b[1][3]],[+A[2],+b[2][1],+b[2][2],+b[2][3]],[+A[3],+b[3][1],+b[3][2],+b[3][3]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3]],[+b[1][0],+A[1],+b[1][2],+b[1][3]],[+b[2][0],+A[2],+b[2][2],+b[2][3]],[+b[3][0],+A[3],+b[3][2],+b[3][3]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3]],[+b[1][0],+b[1][1],+A[1],+b[1][3]],[+b[2][0],+b[2][1],+A[2],+b[2][3]],[+b[3][0],+b[3][1],+A[3],+b[3][3]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+A[3]]]),M(b)]}}function m(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3],+b[0][4]],[+A[1],+b[1][1],+b[1][2],+b[1][3],+b[1][4]],[+A[2],+b[2][1],+b[2][2],+b[2][3],+b[2][4]],[+A[3],+b[3][1],+b[3][2],+b[3][3],+b[3][4]],[+A[4],+b[4][1],+b[4][2],+b[4][3],+b[4][4]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3],+b[0][4]],[+b[1][0],+A[1],+b[1][2],+b[1][3],+b[1][4]],[+b[2][0],+A[2],+b[2][2],+b[2][3],+b[2][4]],[+b[3][0],+A[3],+b[3][2],+b[3][3],+b[3][4]],[+b[4][0],+A[4],+b[4][2],+b[4][3],+b[4][4]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3],+b[0][4]],[+b[1][0],+b[1][1],+A[1],+b[1][3],+b[1][4]],[+b[2][0],+b[2][1],+A[2],+b[2][3],+b[2][4]],[+b[3][0],+b[3][1],+A[3],+b[3][3],+b[3][4]],[+b[4][0],+b[4][1],+A[4],+b[4][3],+b[4][4]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0],+b[0][4]],[+b[1][0],+b[1][1],+b[1][2],+A[1],+b[1][4]],[+b[2][0],+b[2][1],+b[2][2],+A[2],+b[2][4]],[+b[3][0],+b[3][1],+b[3][2],+A[3],+b[3][4]],[+b[4][0],+b[4][1],+b[4][2],+A[4],+b[4][4]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+A[3]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+A[4]]]),M(b)]}}function E(M){return function(b,A){return[M([[+A[0],+b[0][1],+b[0][2],+b[0][3],+b[0][4],+b[0][5]],[+A[1],+b[1][1],+b[1][2],+b[1][3],+b[1][4],+b[1][5]],[+A[2],+b[2][1],+b[2][2],+b[2][3],+b[2][4],+b[2][5]],[+A[3],+b[3][1],+b[3][2],+b[3][3],+b[3][4],+b[3][5]],[+A[4],+b[4][1],+b[4][2],+b[4][3],+b[4][4],+b[4][5]],[+A[5],+b[5][1],+b[5][2],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+A[0],+b[0][2],+b[0][3],+b[0][4],+b[0][5]],[+b[1][0],+A[1],+b[1][2],+b[1][3],+b[1][4],+b[1][5]],[+b[2][0],+A[2],+b[2][2],+b[2][3],+b[2][4],+b[2][5]],[+b[3][0],+A[3],+b[3][2],+b[3][3],+b[3][4],+b[3][5]],[+b[4][0],+A[4],+b[4][2],+b[4][3],+b[4][4],+b[4][5]],[+b[5][0],+A[5],+b[5][2],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+A[0],+b[0][3],+b[0][4],+b[0][5]],[+b[1][0],+b[1][1],+A[1],+b[1][3],+b[1][4],+b[1][5]],[+b[2][0],+b[2][1],+A[2],+b[2][3],+b[2][4],+b[2][5]],[+b[3][0],+b[3][1],+A[3],+b[3][3],+b[3][4],+b[3][5]],[+b[4][0],+b[4][1],+A[4],+b[4][3],+b[4][4],+b[4][5]],[+b[5][0],+b[5][1],+A[5],+b[5][3],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+A[0],+b[0][4],+b[0][5]],[+b[1][0],+b[1][1],+b[1][2],+A[1],+b[1][4],+b[1][5]],[+b[2][0],+b[2][1],+b[2][2],+A[2],+b[2][4],+b[2][5]],[+b[3][0],+b[3][1],+b[3][2],+A[3],+b[3][4],+b[3][5]],[+b[4][0],+b[4][1],+b[4][2],+A[4],+b[4][4],+b[4][5]],[+b[5][0],+b[5][1],+b[5][2],+A[5],+b[5][4],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+A[0],+b[0][5]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+A[1],+b[1][5]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+A[2],+b[2][5]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+A[3],+b[3][5]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+A[4],+b[4][5]],[+b[5][0],+b[5][1],+b[5][2],+b[5][3],+A[5],+b[5][5]]]),M([[+b[0][0],+b[0][1],+b[0][2],+b[0][3],+b[0][4],+A[0]],[+b[1][0],+b[1][1],+b[1][2],+b[1][3],+b[1][4],+A[1]],[+b[2][0],+b[2][1],+b[2][2],+b[2][3],+b[2][4],+A[2]],[+b[3][0],+b[3][1],+b[3][2],+b[3][3],+b[3][4],+A[3]],[+b[4][0],+b[4][1],+b[4][2],+b[4][3],+b[4][4],+A[4]],[+b[5][0],+b[5][1],+b[5][2],+b[5][3],+b[5][4],+A[5]]]),M(b)]}}var c=[o,u];function _(M,k,b,A,g,f,p,x){return function(D,B){switch(D.length){case 0:return M(D,B);case 1:return k(D,B);case 2:return b(D,B);case 3:return A(D,B);case 4:return g(D,B);case 5:return f(D,B)}var U=p[D.length];return U||(U=p[D.length]=x(D.length)),U(D,B)}}function T(){for(;c.length<i;)c.push(s(c.length));t.exports=_.apply(void 0,c.concat([c,s]));for(var M=0;M<i;++M)t.exports[M]=c[M]}T()}),737:(function(t){t.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"}}),781:(function(t,r,a){t.exports=i;var l=a(3349);function i(s,o){var u=[];return o=+o||0,l(s.hi(s.shape[0]-1),u,o),u}}),783:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2],h=l[3],y=i[0],m=i[1],E=i[2],c=i[3],_,T,M,k,b;return T=o*y+u*m+d*E+h*c,T<0&&(T=-T,y=-y,m=-m,E=-E,c=-c),1-T>1e-6?(_=Math.acos(T),M=Math.sin(_),k=Math.sin((1-s)*_)/M,b=Math.sin(s*_)/M):(k=1-s,b=s),a[0]=k*o+b*y,a[1]=k*u+b*m,a[2]=k*d+b*E,a[3]=k*h+b*c,a}}),799:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`precision mediump float;
#define GLSLIFY 1
attribute vec2 position;
varying vec2 uv;
void main() {
  uv = position;
  gl_Position = vec4(position, 0, 1);
}`]),o=l([`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);
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec2"}])}}),811:(function(t){t.exports=r;function r(a,l){return a[0]=1/l[0],a[1]=1/l[1],a[2]=1/l[2],a}}),840:(function(t,r,a){var l=a(3236),i=l([`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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}`]),u=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 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;
}`]),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);
}

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;
}`]),h=l([`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;
}`]),y=l([`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;
}`]),m=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  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);
}`]),E=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 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;
}`]),c=l([`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)));
}`]),_=l([`precision highp float;
#define GLSLIFY 1

uniform vec3 contourColor;

void main() {
  gl_FragColor = vec4(contourColor, 1.0);
}
`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:y,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:E,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:c,fragment:_,attributes:[{name:"position",type:"vec3"}]}}),855:(function(t,r,a){t.exports={init:T,sweepBipartite:b,sweepComplete:A,scanBipartite:g,scanComplete:f};var l=a(1888),i=a(8828),s=a(4192),o=1<<28,u=1024,d=l.mallocInt32(u),h=l.mallocInt32(u),y=l.mallocInt32(u),m=l.mallocInt32(u),E=l.mallocInt32(u),c=l.mallocInt32(u),_=l.mallocDouble(u*8);function T(p){var x=i.nextPow2(p);d.length<x&&(l.free(d),d=l.mallocInt32(x)),h.length<x&&(l.free(h),h=l.mallocInt32(x)),y.length<x&&(l.free(y),y=l.mallocInt32(x)),m.length<x&&(l.free(m),m=l.mallocInt32(x)),E.length<x&&(l.free(E),E=l.mallocInt32(x)),c.length<x&&(l.free(c),c=l.mallocInt32(x));var N=8*x;_.length<N&&(l.free(_),_=l.mallocDouble(N))}function M(p,x,N,D){var B=x[D],U=p[N-1];p[B]=U,x[U]=B}function k(p,x,N,D){p[N]=D,x[D]=N}function b(p,x,N,D,B,U,V,q,z,H){for(var G=0,J=2*p,le=p-1,ye=J-1,de=N;de<D;++de){var me=U[de],W=J*de;_[G++]=B[W+le],_[G++]=-(me+1),_[G++]=B[W+ye],_[G++]=me}for(var de=V;de<q;++de){var me=H[de]+o,ie=J*de;_[G++]=z[ie+le],_[G++]=-me,_[G++]=z[ie+ye],_[G++]=me}var se=G>>>1;s(_,se);for(var ee=0,pe=0,de=0;de<se;++de){var oe=_[2*de+1]|0;if(oe>=o)oe=oe-o|0,M(y,m,pe--,oe);else if(oe>=0)M(d,h,ee--,oe);else if(oe<=-o){oe=-oe-o|0;for(var Y=0;Y<ee;++Y){var ce=x(d[Y],oe);if(ce!==void 0)return ce}k(y,m,pe++,oe)}else{oe=-oe-1|0;for(var Y=0;Y<pe;++Y){var ce=x(oe,y[Y]);if(ce!==void 0)return ce}k(d,h,ee++,oe)}}}function A(p,x,N,D,B,U,V,q,z,H){for(var G=0,J=2*p,le=p-1,ye=J-1,de=N;de<D;++de){var me=U[de]+1<<1,W=J*de;_[G++]=B[W+le],_[G++]=-me,_[G++]=B[W+ye],_[G++]=me}for(var de=V;de<q;++de){var me=H[de]+1<<1,ie=J*de;_[G++]=z[ie+le],_[G++]=-me|1,_[G++]=z[ie+ye],_[G++]=me|1}var se=G>>>1;s(_,se);for(var ee=0,pe=0,oe=0,de=0;de<se;++de){var Y=_[2*de+1]|0,ce=Y&1;if(de<se-1&&Y>>1===_[2*de+3]>>1&&(ce=2,de+=1),Y<0){for(var ue=-(Y>>1)-1,_e=0;_e<oe;++_e){var Le=x(E[_e],ue);if(Le!==void 0)return Le}if(ce!==0)for(var _e=0;_e<ee;++_e){var Le=x(d[_e],ue);if(Le!==void 0)return Le}if(ce!==1)for(var _e=0;_e<pe;++_e){var Le=x(y[_e],ue);if(Le!==void 0)return Le}ce===0?k(d,h,ee++,ue):ce===1?k(y,m,pe++,ue):ce===2&&k(E,c,oe++,ue)}else{var ue=(Y>>1)-1;ce===0?M(d,h,ee--,ue):ce===1?M(y,m,pe--,ue):ce===2&&M(E,c,oe--,ue)}}}function g(p,x,N,D,B,U,V,q,z,H,G,J){var le=0,ye=2*p,de=x,me=x+p,W=1,ie=1;D?ie=o:W=o;for(var se=B;se<U;++se){var ee=se+W,pe=ye*se;_[le++]=V[pe+de],_[le++]=-ee,_[le++]=V[pe+me],_[le++]=ee}for(var se=z;se<H;++se){var ee=se+ie,oe=ye*se;_[le++]=G[oe+de],_[le++]=-ee}var Y=le>>>1;s(_,Y);for(var ce=0,se=0;se<Y;++se){var ue=_[2*se+1]|0;if(ue<0){var ee=-ue,_e=!1;if(ee>=o?(_e=!D,ee-=o):(_e=!!D,ee-=1),_e)k(d,h,ce++,ee);else{var Le=J[ee],ze=ye*ee,Ge=G[ze+x+1],Ve=G[ze+x+1+p];e:for(var rt=0;rt<ce;++rt){var pt=d[rt],gt=ye*pt;if(!(Ve<V[gt+x+1]||V[gt+x+1+p]<Ge)){for(var ht=x+2;ht<p;++ht)if(G[ze+ht+p]<V[gt+ht]||V[gt+ht+p]<G[ze+ht])continue e;var lt=q[pt],Fe;if(D?Fe=N(Le,lt):Fe=N(lt,Le),Fe!==void 0)return Fe}}}}else M(d,h,ce--,ue-W)}}function f(p,x,N,D,B,U,V,q,z,H,G){for(var J=0,le=2*p,ye=x,de=x+p,me=D;me<B;++me){var W=me+o,ie=le*me;_[J++]=U[ie+ye],_[J++]=-W,_[J++]=U[ie+de],_[J++]=W}for(var me=q;me<z;++me){var W=me+1,se=le*me;_[J++]=H[se+ye],_[J++]=-W}var ee=J>>>1;s(_,ee);for(var pe=0,me=0;me<ee;++me){var oe=_[2*me+1]|0;if(oe<0){var W=-oe;if(W>=o)d[pe++]=W-o;else{W-=1;var Y=G[W],ce=le*W,ue=H[ce+x+1],_e=H[ce+x+1+p];e:for(var Le=0;Le<pe;++Le){var ze=d[Le],Ge=V[ze];if(Ge===Y)break;var Ve=le*ze;if(!(_e<U[Ve+x+1]||U[Ve+x+1+p]<ue)){for(var rt=x+2;rt<p;++rt)if(H[ce+rt+p]<U[Ve+rt]||U[Ve+rt+p]<H[ce+rt])continue e;var pt=N(Ge,Y);if(pt!==void 0)return pt}}}}else{for(var W=oe-o,Le=pe-1;Le>=0;--Le)if(d[Le]===W){for(var rt=Le+1;rt<pe;++rt)d[rt-1]=d[rt];break}--pe}}}}),868:(function(t,r,a){t.exports=a(1387)}),869:(function(t,r,a){var l=a(2651),i=a(5716);t.exports=s;function s(o,u){var d=i(o),h=i(u);if(d===0)return[l(0),l(1)];if(h===0)return[l(0),l(0)];h<0&&(o=o.neg(),u=u.neg());var y=o.gcd(u);return y.cmpn(1)?[o.div(y),u.div(y)]:[o,u]}}),870:(function(t,r,a){var l=a(1433);function i(o){this.gl=o,this._elements=null,this._attributes=null,this._elementsType=o.UNSIGNED_SHORT}i.prototype.bind=function(){l(this.gl,this._elements,this._attributes)},i.prototype.update=function(o,u,d){this._elements=u,this._attributes=o,this._elementsType=d||this.gl.UNSIGNED_SHORT},i.prototype.dispose=function(){},i.prototype.unbind=function(){},i.prototype.draw=function(o,u,d){d=d||0;var h=this.gl;this._elements?h.drawElements(o,u,this._elementsType,d):h.drawArrays(o,d,u)};function s(o){return new i(o)}t.exports=s}),946:(function(t,r,a){var l=a(1369),i=a(4025);t.exports=s;function s(o){var u=o[0],d=o[1];if(u.cmpn(0)===0)return 0;var h=u.abs().divmod(d.abs()),y=h.div,m=l(y),E=h.mod,c=u.negative!==d.negative?-1:1;if(E.cmpn(0)===0)return c*m;if(m){var _=i(m)+4,T=l(E.ushln(_).divRound(d));return c*(m+T*Math.pow(2,-_))}else{var M=d.bitLength()-E.bitLength()+53,T=l(E.ushln(M).divRound(d));return M<1023?c*T*Math.pow(2,-M):(T*=Math.pow(2,-1023),c*T*Math.pow(2,1023-M))}}}),990:(function(t,r,a){var l=a(9405),i=a(3236),s=i([`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);
}
`]),o=i([`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 — 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;
}
`]),u=i([`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);
}
`]),d=i([`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));
}
`]);r.createShader=function(h){var y=l(h,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},r.createPickShader=function(h){var y=l(h,s,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y.attributes.normal.location=2,y},r.createContourShader=function(h){var y=l(h,u,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y},r.createPickContourShader=function(h){var y=l(h,u,d,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return y.attributes.uv.location=0,y.attributes.f.location=1,y}}),1085:(function(t,r,a){var l=a(1371);t.exports=i;function i(s,o,u){o=typeof o=="number"?o:1,u=u||": ";var d=s.split(/\r?\n/),h=String(d.length+o-1).length;return d.map(function(y,m){var E=m+o,c=String(E).length,_=l(E,h-c);return _+u+y}).join(`
`)}}),1091:(function(t){t.exports=r;function r(){var a=new Float32Array(3);return a[0]=0,a[1]=0,a[2]=0,a}}),1125:(function(t,r,a){t.exports=s;var l=a(3250)[3];function i(o,u,d,h){for(var y=0;y<2;++y){var m=o[y],E=u[y],c=Math.min(m,E),_=Math.max(m,E),T=d[y],M=h[y],k=Math.min(T,M),b=Math.max(T,M);if(b<c||_<k)return!1}return!0}function s(o,u,d,h){var y=l(o,d,h),m=l(u,d,h);if(y>0&&m>0||y<0&&m<0)return!1;var E=l(d,o,u),c=l(h,o,u);return E>0&&c>0||E<0&&c<0?!1:y===0&&m===0&&E===0&&c===0?i(o,u,d,h):!0}}),1278:(function(t,r,a){var l=a(2361),i=Math.pow(2,-1074),s=-1>>>0;t.exports=o;function o(u,d){if(isNaN(u)||isNaN(d))return NaN;if(u===d)return u;if(u===0)return d<0?-i:i;var h=l.hi(u),y=l.lo(u);return d>u==u>0?y===s?(h+=1,y=0):y+=1:y===0?(y=s,h-=1):y-=1,l.pack(y,h)}}),1283:(function(t,r,a){var l=a(9405),i=a(3236),s=i([`precision highp float;
#define GLSLIFY 1

bool outOfRange(float a, float b, float p) {
  return ((p > max(a, b)) || 
          (p < min(a, b)));
}

bool outOfRange(vec2 a, vec2 b, vec2 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y));
}

bool outOfRange(vec3 a, vec3 b, vec3 p) {
  return (outOfRange(a.x, b.x, p.x) ||
          outOfRange(a.y, b.y, p.y) ||
          outOfRange(a.z, b.z, p.z));
}

bool outOfRange(vec4 a, vec4 b, vec4 p) {
  return outOfRange(a.xyz, b.xyz, p.xyz);
}

attribute vec3 position;
attribute vec4 color;
attribute vec2 glyph;
attribute vec4 id;

uniform vec4 highlightId;
uniform float highlightScale;
uniform mat4 model, view, projection;
uniform vec3 clipBounds[2];

varying vec4 interpColor;
varying vec4 pickId;
varying vec3 dataCoordinate;

void main() {
  if (outOfRange(clipBounds[0], clipBounds[1], position)) {

    gl_Position = vec4(0,0,0,0);
  } else {
    float scale = 1.0;
    if(distance(highlightId, id) < 0.0001) {
      scale = highlightScale;
    }

    vec4 worldPosition = model * vec4(position, 1);
    vec4 viewPosition = view * worldPosition;
    viewPosition = viewPosition / viewPosition.w;
    vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));

    gl_Position = clipPosition;
    interpColor = color;
    pickId = id;
    dataCoordinate = position;
  }
}`]),o=i([`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;
  }
}`]),u=i([`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;
  }
}
`]),d=i([`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;
}
`]),h=i([`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);
}`]),y=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],m={vertex:s,fragment:d,attributes:y},E={vertex:o,fragment:d,attributes:y},c={vertex:u,fragment:d,attributes:y},_={vertex:s,fragment:h,attributes:y},T={vertex:o,fragment:h,attributes:y},M={vertex:u,fragment:h,attributes:y};function k(b,A){var g=l(b,A),f=g.attributes;return f.position.location=0,f.color.location=1,f.glyph.location=2,f.id.location=3,g}r.createPerspective=function(b){return k(b,m)},r.createOrtho=function(b){return k(b,E)},r.createProject=function(b){return k(b,c)},r.createPickPerspective=function(b){return k(b,_)},r.createPickOrtho=function(b){return k(b,T)},r.createPickProject=function(b){return k(b,M)}}),1303:(function(t,r,a){t.exports=s;var l=a(3250);function i(o,u){var d,h;if(u[0][0]<u[1][0])d=u[0],h=u[1];else if(u[0][0]>u[1][0])d=u[1],h=u[0];else{var y=Math.min(o[0][1],o[1][1]),m=Math.max(o[0][1],o[1][1]),E=Math.min(u[0][1],u[1][1]),c=Math.max(u[0][1],u[1][1]);return m<E?m-E:y>c?y-c:m-c}var _,T;o[0][1]<o[1][1]?(_=o[0],T=o[1]):(_=o[1],T=o[0]);var M=l(h,d,_);return M||(M=l(h,d,T),M)?M:T-h}function s(o,u){var d,h;if(u[0][0]<u[1][0])d=u[0],h=u[1];else if(u[0][0]>u[1][0])d=u[1],h=u[0];else return i(u,o);var y,m;if(o[0][0]<o[1][0])y=o[0],m=o[1];else if(o[0][0]>o[1][0])y=o[1],m=o[0];else return-i(o,u);var E=l(d,h,m),c=l(d,h,y);if(E<0){if(c<=0)return E}else if(E>0){if(c>=0)return E}else if(c)return c;if(E=l(m,y,h),c=l(m,y,d),E<0){if(c<=0)return E}else if(E>0){if(c>=0)return E}else if(c)return c;return h[0]-m[0]}}),1318:(function(t){t.exports=r;function r(a,l){return a[0].mul(l[1]).cmp(l[0].mul(a[1]))}}),1338:(function(t){function r(i,s,o){var u=i[o]|0;if(u<=0)return[];var d=new Array(u),h;if(o===i.length-1)for(h=0;h<u;++h)d[h]=s;else for(h=0;h<u;++h)d[h]=r(i,s,o+1);return d}function a(i,s){var o,u;for(o=new Array(i),u=0;u<i;++u)o[u]=s;return o}function l(i,s){switch(typeof s>"u"&&(s=0),typeof i){case"number":if(i>0)return a(i|0,s);break;case"object":if(typeof i.length=="number")return r(i,s,0);break}return[]}t.exports=l}),1369:(function(t,r,a){var l=a(5716);t.exports=i;function i(s){var o=s.length,u=s.words,d=0;if(o===1)d=u[0];else if(o===2)d=u[0]+u[1]*67108864;else for(var h=0;h<o;h++){var y=u[h];d+=y*Math.pow(67108864,h)}return l(s)*d}}),1371:(function(t,r,a){var l=a(3233);t.exports=function(s,o,u){return u=typeof u<"u"?u+"":" ",l(u,o)+s}}),1373:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]/i[0],a[1]=l[1]/i[1],a[2]=l[2]/i[2],a[3]=l[3]/i[3],a}}),1387:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2];return Math.sqrt(l*l+i*i+s*s)}}),1433:(function(t){function r(a,l,i){l?l.bind():a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null);var s=a.getParameter(a.MAX_VERTEX_ATTRIBS)|0;if(i){if(i.length>s)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o<i.length;++o){var u=i[o];if(u.buffer){var d=u.buffer,h=u.size||4,y=u.type||a.FLOAT,m=!!u.normalized,E=u.stride||0,c=u.offset||0;d.bind(),a.enableVertexAttribArray(o),a.vertexAttribPointer(o,h,y,m,E,c)}else{if(typeof u=="number")a.vertexAttrib1f(o,u);else if(u.length===1)a.vertexAttrib1f(o,u[0]);else if(u.length===2)a.vertexAttrib2f(o,u[0],u[1]);else if(u.length===3)a.vertexAttrib3f(o,u[0],u[1],u[2]);else if(u.length===4)a.vertexAttrib4f(o,u[0],u[1],u[2],u[3]);else throw new Error("gl-vao: Invalid vertex attribute");a.disableVertexAttribArray(o)}}for(;o<s;++o)a.disableVertexAttribArray(o)}else{a.bindBuffer(a.ARRAY_BUFFER,null);for(var o=0;o<s;++o)a.disableVertexAttribArray(o)}}t.exports=r}),1463:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l,a[1]=i,a[2]=s,a}}),1493:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`precision mediump float;
#define GLSLIFY 1

attribute vec3 position, color;
attribute float weight;

uniform mat4 model, view, projection;
uniform vec3 coordinates[3];
uniform vec4 colors[3];
uniform vec2 screenShape;
uniform float lineWidth;

varying vec4 fragColor;

void main() {
  vec3 vertexPosition = mix(coordinates[0],
    mix(coordinates[2], coordinates[1], 0.5 * (position + 1.0)), abs(position));

  vec4 clipPos = projection * (view * (model * vec4(vertexPosition, 1.0)));
  vec2 clipOffset = (projection * (view * (model * vec4(color, 0.0)))).xy;
  vec2 delta = weight * clipOffset * screenShape;
  vec2 lineOffset = normalize(vec2(delta.y, -delta.x)) / screenShape;

  gl_Position   = vec4(clipPos.xy + clipPos.w * 0.5 * lineWidth * lineOffset, clipPos.z, clipPos.w);
  fragColor     = color.x * colors[0] + color.y * colors[1] + color.z * colors[2];
}
`]),o=l([`precision mediump float;
#define GLSLIFY 1

varying vec4 fragColor;

void main() {
  gl_FragColor = fragColor;
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}}),1498:(function(t){t.exports=r;function r(a,l){return a[0]=-l[0],a[1]=-l[1],a[2]=-l[2],a[3]=-l[3],a}}),1533:(function(t,r,a){a(6859),t.exports=l;function l(i){return i&&typeof i=="object"&&!!i.words}}),1538:(function(t){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function a(p){p.permitHostObjects___&&p.permitHostObjects___(a)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=a);var l=!1;if(typeof WeakMap=="function"){var i=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var s=new i,o=Object.freeze({});if(s.set(o,1),s.get(o)!==1)l=!0;else{t.exports=WeakMap;return}}}var u=Object.getOwnPropertyNames,d=Object.defineProperty,h=Object.isExtensible,y="weakmap:",m=y+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var E=new ArrayBuffer(25),c=new Uint8Array(E);crypto.getRandomValues(c),m=y+"rand:"+Array.prototype.map.call(c,function(p){return(p%36).toString(36)}).join("")+"___"}function _(p){return!(p.substr(0,y.length)==y&&p.substr(p.length-3)==="___")}if(d(Object,"getOwnPropertyNames",{value:function(x){return u(x).filter(_)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;d(Object,"getPropertyNames",{value:function(x){return T(x).filter(_)}})}function M(p){if(p!==Object(p))throw new TypeError("Not an object: "+p);var x=p[m];if(x&&x.key===p)return x;if(h(p)){x={key:p};try{return d(p,m,{value:x,writable:!1,enumerable:!1,configurable:!1}),x}catch{return}}}(function(){var p=Object.freeze;d(Object,"freeze",{value:function(B){return M(B),p(B)}});var x=Object.seal;d(Object,"seal",{value:function(B){return M(B),x(B)}});var N=Object.preventExtensions;d(Object,"preventExtensions",{value:function(B){return M(B),N(B)}})})();function k(p){return p.prototype=null,Object.freeze(p)}var b=!1;function A(){!b&&typeof console<"u"&&(b=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var g=0,f=function(){this instanceof f||A();var p=[],x=[],N=g++;function D(q,z){var H,G=M(q);return G?N in G?G[N]:z:(H=p.indexOf(q),H>=0?x[H]:z)}function B(q){var z=M(q);return z?N in z:p.indexOf(q)>=0}function U(q,z){var H,G=M(q);return G?G[N]=z:(H=p.indexOf(q),H>=0?x[H]=z:(H=p.length,x[H]=z,p[H]=q)),this}function V(q){var z=M(q),H,G;return z?N in z&&delete z[N]:(H=p.indexOf(q),H<0?!1:(G=p.length-1,p[H]=void 0,x[H]=x[G],p[H]=p[G],p.length=G,x.length=G,!0))}return Object.create(f.prototype,{get___:{value:k(D)},has___:{value:k(B)},set___:{value:k(U)},delete___:{value:k(V)}})};f.prototype=Object.create(Object.prototype,{get:{value:function(x,N){return this.get___(x,N)},writable:!0,configurable:!0},has:{value:function(x){return this.has___(x)},writable:!0,configurable:!0},set:{value:function(x,N){return this.set___(x,N)},writable:!0,configurable:!0},delete:{value:function(x){return this.delete___(x)},writable:!0,configurable:!0}}),typeof i=="function"?(function(){l&&typeof Proxy<"u"&&(Proxy=void 0);function p(){this instanceof f||A();var x=new i,N=void 0,D=!1;function B(z,H){return N?x.has(z)?x.get(z):N.get___(z,H):x.get(z,H)}function U(z){return x.has(z)||(N?N.has___(z):!1)}var V;l?V=function(z,H){return x.set(z,H),x.has(z)||(N||(N=new f),N.set(z,H)),this}:V=function(z,H){if(D)try{x.set(z,H)}catch{N||(N=new f),N.set___(z,H)}else x.set(z,H);return this};function q(z){var H=!!x.delete(z);return N&&N.delete___(z)||H}return Object.create(f.prototype,{get___:{value:k(B)},has___:{value:k(U)},set___:{value:k(V)},delete___:{value:k(q)},permitHostObjects___:{value:k(function(z){if(z===a)D=!0;else throw new Error("bogus call to permitHostObjects___")})}})}p.prototype=f.prototype,t.exports=p,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy<"u"&&(Proxy=void 0),t.exports=f)})()}),1570:(function(t){t.exports=a;var r=[function(){function i(s,o,u,d){for(var h=s.length,y=[],m=0;m<h;++m){var E=s[m];E.length}return y}return i},function(){function i(o,u,d,h){for(var y=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*y],c=o[2*y+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var y=o.length,m=[],E=0;E<y;++E){var c=o[E],_=c.length;if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s},function(){function i(o,u,d,h){for(var y=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*y],c=o[2*y+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var y=o.length,m=[],E=0;E<y;++E){var c=o[E],_=c.length;if(_===3){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2);if(T===0||T===7)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[2]),i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0]),i(d,u,c[1],c[2])]);break;case 3:m.push([i(d,u,c[0],c[2]),i(d,u,c[1],c[2])]);break;case 4:m.push([i(d,u,c[2],c[1]),i(d,u,c[2],c[0])]);break;case 5:m.push([i(d,u,c[2],c[1]),i(d,u,c[0],c[1])]);break;case 6:m.push([i(d,u,c[1],c[0]),i(d,u,c[2],c[0])]);break}}else if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s},function(){function i(o,u,d,h){for(var y=Math.min(d,h)|0,m=Math.max(d,h)|0,E=o[2*y],c=o[2*y+1];E<c;){var _=E+c>>1,T=u[2*_+1];if(T===m)return _;m<T?c=_:E=_+1}return E}function s(o,u,d,h){for(var y=o.length,m=[],E=0;E<y;++E){var c=o[E],_=c.length;if(_===4){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2)+(h[c[3]]<<3);if(T===0||T===15)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1]),i(d,u,c[0],c[2]),i(d,u,c[0],c[3])]);break;case 2:m.push([i(d,u,c[1],c[2]),i(d,u,c[1],c[0]),i(d,u,c[1],c[3])]);break;case 3:m.push([i(d,u,c[1],c[2]),i(d,u,c[0],c[2]),i(d,u,c[0],c[3])],[i(d,u,c[1],c[3]),i(d,u,c[1],c[2]),i(d,u,c[0],c[3])]);break;case 4:m.push([i(d,u,c[2],c[0]),i(d,u,c[2],c[1]),i(d,u,c[2],c[3])]);break;case 5:m.push([i(d,u,c[0],c[1]),i(d,u,c[2],c[1]),i(d,u,c[0],c[3])],[i(d,u,c[2],c[1]),i(d,u,c[2],c[3]),i(d,u,c[0],c[3])]);break;case 6:m.push([i(d,u,c[2],c[0]),i(d,u,c[1],c[0]),i(d,u,c[1],c[3])],[i(d,u,c[2],c[3]),i(d,u,c[2],c[0]),i(d,u,c[1],c[3])]);break;case 7:m.push([i(d,u,c[0],c[3]),i(d,u,c[1],c[3]),i(d,u,c[2],c[3])]);break;case 8:m.push([i(d,u,c[3],c[1]),i(d,u,c[3],c[0]),i(d,u,c[3],c[2])]);break;case 9:m.push([i(d,u,c[3],c[1]),i(d,u,c[0],c[1]),i(d,u,c[0],c[2])],[i(d,u,c[3],c[2]),i(d,u,c[3],c[1]),i(d,u,c[0],c[2])]);break;case 10:m.push([i(d,u,c[1],c[0]),i(d,u,c[3],c[0]),i(d,u,c[1],c[2])],[i(d,u,c[3],c[0]),i(d,u,c[3],c[2]),i(d,u,c[1],c[2])]);break;case 11:m.push([i(d,u,c[1],c[2]),i(d,u,c[0],c[2]),i(d,u,c[3],c[2])]);break;case 12:m.push([i(d,u,c[3],c[0]),i(d,u,c[2],c[0]),i(d,u,c[2],c[1])],[i(d,u,c[3],c[1]),i(d,u,c[3],c[0]),i(d,u,c[2],c[1])]);break;case 13:m.push([i(d,u,c[0],c[1]),i(d,u,c[2],c[1]),i(d,u,c[3],c[1])]);break;case 14:m.push([i(d,u,c[2],c[0]),i(d,u,c[1],c[0]),i(d,u,c[3],c[0])]);break}}else if(_===3){var T=(h[c[0]]<<0)+(h[c[1]]<<1)+(h[c[2]]<<2);if(T===0||T===7)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[2]),i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0]),i(d,u,c[1],c[2])]);break;case 3:m.push([i(d,u,c[0],c[2]),i(d,u,c[1],c[2])]);break;case 4:m.push([i(d,u,c[2],c[1]),i(d,u,c[2],c[0])]);break;case 5:m.push([i(d,u,c[2],c[1]),i(d,u,c[0],c[1])]);break;case 6:m.push([i(d,u,c[1],c[0]),i(d,u,c[2],c[0])]);break}}else if(_===2){var T=(h[c[0]]<<0)+(h[c[1]]<<1);if(T===0||T===3)continue;switch(T){case 0:break;case 1:m.push([i(d,u,c[0],c[1])]);break;case 2:m.push([i(d,u,c[1],c[0])]);break}}}return m}return s}];function a(l){return r[l]()}}),1682:(function(t){function r(i,s){for(var o=1,u=i.length,d=i[0],h=i[0],y=1;y<u;++y)if(h=d,d=i[y],s(d,h)){if(y===o){o++;continue}i[o++]=d}return i.length=o,i}function a(i){for(var s=1,o=i.length,u=i[0],d=i[0],h=1;h<o;++h,d=u)if(d=u,u=i[h],u!==d){if(h===s){s++;continue}i[s++]=u}return i.length=s,i}function l(i,s,o){return i.length===0?i:s?(o||i.sort(s),r(i,s)):(o||i.sort(),a(i))}t.exports=l}),1755:(function(t){"use restrict";t.exports=r;function r(l){this.roots=new Array(l),this.ranks=new Array(l);for(var i=0;i<l;++i)this.roots[i]=i,this.ranks[i]=0}var a=r.prototype;Object.defineProperty(a,"length",{get:function(){return this.roots.length}}),a.makeSet=function(){var l=this.roots.length;return this.roots.push(l),this.ranks.push(0),l},a.find=function(l){for(var i=l,s=this.roots;s[l]!==l;)l=s[l];for(;s[i]!==l;){var o=s[i];s[i]=l,i=o}return l},a.link=function(l,i){var s=this.find(l),o=this.find(i);if(s!==o){var u=this.ranks,d=this.roots,h=u[s],y=u[o];h<y?d[s]=o:y<h?d[o]=s:(d[o]=s,++u[s])}}}),1811:(function(t,r,a){var l=a(2478),i=a(7442),s=a(7608),o=a(5567),u=a(2408),d=a(7089),h=a(6582),y=a(7656);a(2504);var m=a(3536),E=[0,0,0];t.exports=M;function c(k){this._components=k.slice(),this._time=[0],this.prevMatrix=k.slice(),this.nextMatrix=k.slice(),this.computedMatrix=k.slice(),this.computedInverse=k.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 _=c.prototype;_.recalcMatrix=function(k){var b=this._time,A=l.le(b,k),g=this.computedMatrix;if(!(A<0)){var f=this._components;if(A===b.length-1)for(var p=16*A,x=0;x<16;++x)g[x]=f[p++];else{for(var N=b[A+1]-b[A],p=16*A,D=this.prevMatrix,B=!0,x=0;x<16;++x)D[x]=f[p++];for(var U=this.nextMatrix,x=0;x<16;++x)U[x]=f[p++],B=B&&D[x]===U[x];if(N<1e-6||B)for(var x=0;x<16;++x)g[x]=D[x];else i(g,D,U,(k-b[A])/N)}var V=this.computedUp;V[0]=g[1],V[1]=g[5],V[2]=g[9],m(V,V);var q=this.computedInverse;s(q,g);var z=this.computedEye,H=q[15];z[0]=q[12]/H,z[1]=q[13]/H,z[2]=q[14]/H;for(var G=this.computedCenter,J=Math.exp(this.computedRadius[0]),x=0;x<3;++x)G[x]=z[x]-g[2+4*x]*J}},_.idle=function(k){if(!(k<this.lastT())){for(var b=this._components,A=b.length-16,g=0;g<16;++g)b.push(b[A++]);this._time.push(k)}},_.flush=function(k){var b=l.gt(this._time,k)-2;b<0||(this._time.splice(0,b),this._components.splice(0,16*b))},_.lastT=function(){return this._time[this._time.length-1]},_.lookAt=function(k,b,A,g){this.recalcMatrix(k),b=b||this.computedEye,A=A||E,g=g||this.computedUp,this.setMatrix(k,h(this.computedMatrix,b,A,g));for(var f=0,p=0;p<3;++p)f+=Math.pow(A[p]-b[p],2);f=Math.log(Math.sqrt(f)),this.computedRadius[0]=f},_.rotate=function(k,b,A,g){this.recalcMatrix(k);var f=this.computedInverse;b&&u(f,f,b),A&&o(f,f,A),g&&d(f,f,g),this.setMatrix(k,s(this.computedMatrix,f))};var T=[0,0,0];_.pan=function(k,b,A,g){T[0]=-(b||0),T[1]=-(A||0),T[2]=-(g||0),this.recalcMatrix(k);var f=this.computedInverse;y(f,f,T),this.setMatrix(k,s(f,f))},_.translate=function(k,b,A,g){T[0]=b||0,T[1]=A||0,T[2]=g||0,this.recalcMatrix(k);var f=this.computedMatrix;y(f,f,T),this.setMatrix(k,f)},_.setMatrix=function(k,b){if(!(k<this.lastT())){this._time.push(k);for(var A=0;A<16;++A)this._components.push(b[A])}},_.setDistance=function(k,b){this.computedRadius[0]=b},_.setDistanceLimits=function(k,b){var A=this._limits;A[0]=k,A[1]=b},_.getDistanceLimits=function(k){var b=this._limits;return k?(k[0]=b[0],k[1]=b[1],k):b};function M(k){k=k||{};var b=k.matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return new c(b)}}),1848:(function(t,r,a){var l=a(4905),i=a(6468);t.exports=s;function s(o){for(var u=Array.isArray(o)?o:l(o),d=0;d<u.length;d++){var h=u[d];if(h.type==="preprocessor"){var y=h.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(y&&y[2]){var m=y[1],E=y[2];return(m?i(E):E).trim()}}}}}),1879:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, majorAxis, minorAxis, screenAxis;
uniform float lineWidth;
uniform vec2 screenShape;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

void main() {
  vec3 major = position.x * majorAxis;
  vec3 minor = position.y * minorAxis;

  vec3 vPosition = major + minor + offset;
  vec3 pPosition = project(vPosition);
  vec3 offset = project(vPosition + screenAxis * position.z);

  vec2 screen = normalize((offset - pPosition).xy * screenShape) / screenShape;

  gl_Position = vec4(pPosition + vec3(0.5 * screen * lineWidth, 0), 1.0);
}
`]),o=l([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);r.n=function(m){return i(m,s,o,null,[{name:"position",type:"vec3"}])};var u=l([`precision highp float;
#define GLSLIFY 1

attribute vec3 position;

uniform mat4 model, view, projection;
uniform vec3 offset, axis, alignDir, alignOpt;
uniform float scale, angle, pixelScale;
uniform vec2 resolution;

vec3 project(vec3 p) {
  vec4 pp = projection * (view * (model * vec4(p, 1.0)));
  return pp.xyz / max(pp.w, 0.0001);
}

float computeViewAngle(vec3 a, vec3 b) {
  vec3 A = project(a);
  vec3 B = project(b);

  return atan(
    (B.y - A.y) * resolution.y,
    (B.x - A.x) * resolution.x
  );
}

const float PI = 3.141592;
const float TWO_PI = 2.0 * PI;
const float HALF_PI = 0.5 * PI;
const float ONE_AND_HALF_PI = 1.5 * PI;

int option = int(floor(alignOpt.x + 0.001));
float hv_ratio =       alignOpt.y;
bool enableAlign =    (alignOpt.z != 0.0);

float mod_angle(float a) {
  return mod(a, PI);
}

float positive_angle(float a) {
  return mod_angle((a < 0.0) ?
    a + TWO_PI :
    a
  );
}

float look_upwards(float a) {
  float b = positive_angle(a);
  return ((b > 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);
}
`]),d=l([`precision highp float;
#define GLSLIFY 1

uniform vec4 color;
void main() {
  gl_FragColor = color;
}`]);r.Q=function(m){return i(m,u,d,null,[{name:"position",type:"vec3"}])};var h=l([`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);
}
`]),y=l([`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];
}`]);r.bg=function(m){return i(m,h,y,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),1888:(function(t,r,a){var l=a(8828),i=a(1338),s=a(4793).hp;a.g.__TYPEDARRAY_POOL||(a.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o=typeof Uint8ClampedArray<"u",u=typeof BigUint64Array<"u",d=typeof BigInt64Array<"u",h=a.g.__TYPEDARRAY_POOL;h.UINT8C||(h.UINT8C=i([32,0])),h.BIGUINT64||(h.BIGUINT64=i([32,0])),h.BIGINT64||(h.BIGINT64=i([32,0])),h.BUFFER||(h.BUFFER=i([32,0]));var y=h.DATA,m=h.BUFFER;r.free=function(q){if(s.isBuffer(q))m[l.log2(q.length)].push(q);else{if(Object.prototype.toString.call(q)!=="[object ArrayBuffer]"&&(q=q.buffer),!q)return;var z=q.length||q.byteLength,H=l.log2(z)|0;y[H].push(q)}};function E(V){if(V){var q=V.length||V.byteLength,z=l.log2(q);y[z].push(V)}}function c(V){E(V.buffer)}r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=c,r.freeArrayBuffer=E,r.freeBuffer=function(q){m[l.log2(q.length)].push(q)},r.malloc=function(q,z){if(z===void 0||z==="arraybuffer")return _(q);switch(z){case"uint8":return T(q);case"uint16":return M(q);case"uint32":return k(q);case"int8":return b(q);case"int16":return A(q);case"int32":return g(q);case"float":case"float32":return f(q);case"double":case"float64":return p(q);case"uint8_clamped":return x(q);case"bigint64":return D(q);case"biguint64":return N(q);case"buffer":return U(q);case"data":case"dataview":return B(q);default:return null}return null};function _(q){var q=l.nextPow2(q),z=l.log2(q),H=y[z];return H.length>0?H.pop():new ArrayBuffer(q)}r.mallocArrayBuffer=_;function T(V){return new Uint8Array(_(V),0,V)}r.mallocUint8=T;function M(V){return new Uint16Array(_(2*V),0,V)}r.mallocUint16=M;function k(V){return new Uint32Array(_(4*V),0,V)}r.mallocUint32=k;function b(V){return new Int8Array(_(V),0,V)}r.mallocInt8=b;function A(V){return new Int16Array(_(2*V),0,V)}r.mallocInt16=A;function g(V){return new Int32Array(_(4*V),0,V)}r.mallocInt32=g;function f(V){return new Float32Array(_(4*V),0,V)}r.mallocFloat32=r.mallocFloat=f;function p(V){return new Float64Array(_(8*V),0,V)}r.mallocFloat64=r.mallocDouble=p;function x(V){return o?new Uint8ClampedArray(_(V),0,V):T(V)}r.mallocUint8Clamped=x;function N(V){return u?new BigUint64Array(_(8*V),0,V):null}r.mallocBigUint64=N;function D(V){return d?new BigInt64Array(_(8*V),0,V):null}r.mallocBigInt64=D;function B(V){return new DataView(_(V),0,V)}r.mallocDataView=B;function U(V){V=l.nextPow2(V);var q=l.log2(V),z=m[q];return z.length>0?z.pop():new s(V)}r.mallocBuffer=U,r.clearCache=function(){for(var q=0;q<32;++q)h.UINT8[q].length=0,h.UINT16[q].length=0,h.UINT32[q].length=0,h.INT8[q].length=0,h.INT16[q].length=0,h.INT32[q].length=0,h.FLOAT[q].length=0,h.DOUBLE[q].length=0,h.BIGUINT64[q].length=0,h.BIGINT64[q].length=0,h.UINT8C[q].length=0,y[q].length=0,m[q].length=0}}),1903:(function(t){t.exports=r;function r(a){var l=new Float32Array(16);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[3],l[4]=a[4],l[5]=a[5],l[6]=a[6],l[7]=a[7],l[8]=a[8],l[9]=a[9],l[10]=a[10],l[11]=a[11],l[12]=a[12],l[13]=a[13],l[14]=a[14],l[15]=a[15],l}}),1944:(function(t,r,a){var l=a(5250),i=a(8210);t.exports=s;function s(o,u){for(var d=l(o[0],u[0]),h=1;h<o.length;++h)d=i(d,l(o[h],u[h]));return d}}),1964:(function(t,r,a){t.exports={alpha_shape:a(3502),convex_hull:a(7352),delaunay_triangulate:a(7642),gl_cone3d:a(6405),gl_error3d:a(9165),gl_line3d:a(5714),gl_mesh3d:a(7201),gl_plot3d:a(4100),gl_scatter3d:a(8418),gl_streamtube3d:a(7815),gl_surface3d:a(9499),ndarray:a(9618),ndarray_linear_interpolate:a(4317)}}),2014:(function(t,r,a){"use restrict";var l=a(3105),i=a(4623);function s(f){for(var p=0,x=Math.max,N=0,D=f.length;N<D;++N)p=x(p,f[N].length);return p-1}r.dimension=s;function o(f){for(var p=-1,x=Math.max,N=0,D=f.length;N<D;++N)for(var B=f[N],U=0,V=B.length;U<V;++U)p=x(p,B[U]);return p+1}r.countVertices=o;function u(f){for(var p=new Array(f.length),x=0,N=f.length;x<N;++x)p[x]=f[x].slice(0);return p}r.cloneCells=u;function d(f,p){var x=f.length,N=f.length-p.length,D=Math.min;if(N)return N;switch(x){case 0:return 0;case 1:return f[0]-p[0];case 2:var z=f[0]+f[1]-p[0]-p[1];return z||D(f[0],f[1])-D(p[0],p[1]);case 3:var B=f[0]+f[1],U=p[0]+p[1];if(z=B+f[2]-(U+p[2]),z)return z;var V=D(f[0],f[1]),q=D(p[0],p[1]),z=D(V,f[2])-D(q,p[2]);return z||D(V+f[2],B)-D(q+p[2],U);default:var H=f.slice(0);H.sort();var G=p.slice(0);G.sort();for(var J=0;J<x;++J)if(N=H[J]-G[J],N)return N;return 0}}r.compareCells=d;function h(f,p){return d(f[0],p[0])}function y(f,p){if(p){for(var x=f.length,N=new Array(x),D=0;D<x;++D)N[D]=[f[D],p[D]];N.sort(h);for(var D=0;D<x;++D)f[D]=N[D][0],p[D]=N[D][1];return f}else return f.sort(d),f}r.normalize=y;function m(f){if(f.length===0)return[];for(var p=1,x=f.length,N=1;N<x;++N){var D=f[N];if(d(D,f[N-1])){if(N===p){p++;continue}f[p++]=D}}return f.length=p,f}r.unique=m;function E(f,p){for(var x=0,N=f.length-1,D=-1;x<=N;){var B=x+N>>1,U=d(f[B],p);U<=0?(U===0&&(D=B),x=B+1):U>0&&(N=B-1)}return D}r.findCell=E;function c(f,p){for(var x=new Array(f.length),N=0,D=x.length;N<D;++N)x[N]=[];for(var B=[],N=0,U=p.length;N<U;++N)for(var V=p[N],q=V.length,z=1,H=1<<q;z<H;++z){B.length=l.popCount(z);for(var G=0,J=0;J<q;++J)z&1<<J&&(B[G++]=V[J]);var le=E(f,B);if(!(le<0))for(;x[le++].push(N),!(le>=f.length||d(f[le],B)!==0););}return x}r.incidence=c;function _(f,p){if(!p)return c(m(M(f,0)),f);for(var x=new Array(p),N=0;N<p;++N)x[N]=[];for(var N=0,D=f.length;N<D;++N)for(var B=f[N],U=0,V=B.length;U<V;++U)x[B[U]].push(N);return x}r.dual=_;function T(f){for(var p=[],x=0,N=f.length;x<N;++x)for(var D=f[x],B=D.length|0,U=1,V=1<<B;U<V;++U){for(var q=[],z=0;z<B;++z)U>>>z&1&&q.push(D[z]);p.push(q)}return y(p)}r.explode=T;function M(f,p){if(p<0)return[];for(var x=[],N=(1<<p+1)-1,D=0;D<f.length;++D)for(var B=f[D],U=N;U<1<<B.length;U=l.nextCombination(U)){for(var V=new Array(p+1),q=0,z=0;z<B.length;++z)U&1<<z&&(V[q++]=B[z]);x.push(V)}return y(x)}r.skeleton=M;function k(f){for(var p=[],x=0,N=f.length;x<N;++x)for(var D=f[x],B=0,U=D.length;B<U;++B){for(var V=new Array(D.length-1),q=0,z=0;q<U;++q)q!==B&&(V[z++]=D[q]);p.push(V)}return y(p)}r.boundary=k;function b(f,p){for(var x=new i(p),N=0;N<f.length;++N)for(var D=f[N],B=0;B<D.length;++B)for(var U=B+1;U<D.length;++U)x.link(D[B],D[U]);for(var V=[],q=x.ranks,N=0;N<q.length;++N)q[N]=-1;for(var N=0;N<f.length;++N){var z=x.find(f[N][0]);q[z]<0?(q[z]=V.length,V.push([f[N].slice(0)])):V[q[z]].push(f[N].slice(0))}return V}function A(f){for(var p=m(y(M(f,0))),x=new i(p.length),N=0;N<f.length;++N)for(var D=f[N],B=0;B<D.length;++B)for(var U=E(p,[D[B]]),V=B+1;V<D.length;++V)x.link(U,E(p,[D[V]]));for(var q=[],z=x.ranks,N=0;N<z.length;++N)z[N]=-1;for(var N=0;N<f.length;++N){var H=x.find(E(p,[f[N][0]]));z[H]<0?(z[H]=q.length,q.push([f[N].slice(0)])):q[z[H]].push(f[N].slice(0))}return q}function g(f,p){return p?b(f,p):A(f)}r.connectedComponents=g}),2095:(function(t,r,a){t.exports=E;var l=a(3134),i=a(3088),s=a(5085),o=a(5250),u=a(8210),d=a(1682),h=a(5609);function y(c,_){for(var T=new Array(c),M=0;M<c;++M)T[M]=_;return T}function m(c){for(var _=new Array(c),T=0;T<c;++T)_[T]=[];return _}function E(c,_){var Y=h(c,_);c=Y[0],_=Y[1];var T=_.length;c.length;for(var M=l(c,_.length),k=0;k<T;++k)if(M[k].length%2===1)throw new Error("planar-graph-to-polyline: graph must be manifold");var b=i(c,_);function A(Ve){for(var rt=Ve.length,pt=[0],gt=0;gt<rt;++gt){var ht=_[Ve[gt]],lt=_[Ve[(gt+1)%rt]],Fe=o(-ht[0],ht[1]),Pe=o(-ht[0],lt[1]),be=o(lt[0],ht[1]),Ye=o(lt[0],lt[1]);pt=u(pt,u(u(Fe,Pe),u(be,Ye)))}return pt[pt.length-1]>0}b=b.filter(A);for(var g=b.length,f=new Array(g),p=new Array(g),k=0;k<g;++k){f[k]=k;var x=new Array(g),N=b[k].map(function(rt){return _[rt]}),D=s([N]),B=0;e:for(var U=0;U<g;++U)if(x[U]=0,k!==U){for(var V=b[U],q=V.length,z=0;z<q;++z){var H=D(_[V[z]]);if(H!==0){H<0&&(x[U]=1,B+=1);continue e}}x[U]=1,B+=1}p[k]=[B,k,x]}p.sort(function(Ve,rt){return rt[0]-Ve[0]});for(var k=0;k<g;++k)for(var x=p[k],G=x[1],J=x[2],U=0;U<g;++U)J[U]&&(f[U]=G);for(var le=m(g),k=0;k<g;++k)le[k].push(f[k]),le[f[k]].push(k);for(var ye={},de=y(T,!1),k=0;k<g;++k)for(var V=b[k],q=V.length,U=0;U<q;++U){var me=V[U],W=V[(U+1)%q],ie=Math.min(me,W)+":"+Math.max(me,W);if(ie in ye){var se=ye[ie];le[se].push(k),le[k].push(se),de[me]=de[W]=!0}else ye[ie]=k}function ee(Ve){for(var rt=Ve.length,pt=0;pt<rt;++pt)if(!de[Ve[pt]])return!1;return!0}for(var pe=[],oe=y(g,-1),k=0;k<g;++k)f[k]===k&&!ee(b[k])?(pe.push(k),oe[k]=0):oe[k]=-1;for(var Y=[];pe.length>0;){var ce=pe.pop(),ue=le[ce];d(ue,function(Ve,rt){return Ve-rt});var _e=ue.length,Le=oe[ce],ze;if(Le===0){var V=b[ce];ze=[V]}for(var k=0;k<_e;++k){var Ge=ue[k];if(!(oe[Ge]>=0)&&(oe[Ge]=Le^1,pe.push(Ge),Le===0)){var V=b[Ge];ee(V)||(V.reverse(),ze.push(V))}}Le===0&&Y.push(ze)}return Y}}),2145:(function(t,r){r.uniforms=s,r.attributes=o;var a={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube"},l=null;function i(u,d){if(!l){var h=Object.keys(a);l={};for(var y=0;y<h.length;++y){var m=h[y];l[u[m]]=a[m]}}return l[d]}function s(u,d){for(var h=u.getProgramParameter(d,u.ACTIVE_UNIFORMS),y=[],m=0;m<h;++m){var E=u.getActiveUniform(d,m);if(E){var c=i(u,E.type);if(E.size>1)for(var _=0;_<E.size;++_)y.push({name:E.name.replace("[0]","["+_+"]"),type:c});else y.push({name:E.name,type:c})}}return y}function o(u,d){for(var h=u.getProgramParameter(d,u.ACTIVE_ATTRIBUTES),y=[],m=0;m<h;++m){var E=u.getActiveAttrib(d,m);E&&y.push({name:E.name,type:i(u,E.type)})}return y}}),2229:(function(t,r,a){t.exports=a(6843)}),2260:(function(t,r,a){var l=a(7766);t.exports=A;var i=null,s,o,u,d;function h(g){var f=g.getParameter(g.FRAMEBUFFER_BINDING),p=g.getParameter(g.RENDERBUFFER_BINDING),x=g.getParameter(g.TEXTURE_BINDING_2D);return[f,p,x]}function y(g,f){g.bindFramebuffer(g.FRAMEBUFFER,f[0]),g.bindRenderbuffer(g.RENDERBUFFER,f[1]),g.bindTexture(g.TEXTURE_2D,f[2])}function m(g,f){var p=g.getParameter(f.MAX_COLOR_ATTACHMENTS_WEBGL);i=new Array(p+1);for(var x=0;x<=p;++x){for(var N=new Array(p),D=0;D<x;++D)N[D]=g.COLOR_ATTACHMENT0+D;for(var D=x;D<p;++D)N[D]=g.NONE;i[x]=N}}function E(g){switch(g){case s:throw new Error("gl-fbo: Framebuffer unsupported");case o:throw new Error("gl-fbo: Framebuffer incomplete attachment");case u:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case d:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function c(g,f,p,x,N,D){if(!x)return null;var B=l(g,f,p,N,x);return B.magFilter=g.NEAREST,B.minFilter=g.NEAREST,B.mipSamples=1,B.bind(),g.framebufferTexture2D(g.FRAMEBUFFER,D,g.TEXTURE_2D,B.handle,0),B}function _(g,f,p,x,N){var D=g.createRenderbuffer();return g.bindRenderbuffer(g.RENDERBUFFER,D),g.renderbufferStorage(g.RENDERBUFFER,x,f,p),g.framebufferRenderbuffer(g.FRAMEBUFFER,N,g.RENDERBUFFER,D),D}function T(g){var f=h(g.gl),p=g.gl,x=g.handle=p.createFramebuffer(),N=g._shape[0],D=g._shape[1],B=g.color.length,U=g._ext,V=g._useStencil,q=g._useDepth,z=g._colorType;p.bindFramebuffer(p.FRAMEBUFFER,x);for(var H=0;H<B;++H)g.color[H]=c(p,N,D,z,p.RGBA,p.COLOR_ATTACHMENT0+H);B===0?(g._color_rb=_(p,N,D,p.RGBA4,p.COLOR_ATTACHMENT0),U&&U.drawBuffersWEBGL(i[0])):B>1&&U.drawBuffersWEBGL(i[B]);var G=p.getExtension("WEBGL_depth_texture");G?V?g.depth=c(p,N,D,G.UNSIGNED_INT_24_8_WEBGL,p.DEPTH_STENCIL,p.DEPTH_STENCIL_ATTACHMENT):q&&(g.depth=c(p,N,D,p.UNSIGNED_SHORT,p.DEPTH_COMPONENT,p.DEPTH_ATTACHMENT)):q&&V?g._depth_rb=_(p,N,D,p.DEPTH_STENCIL,p.DEPTH_STENCIL_ATTACHMENT):q?g._depth_rb=_(p,N,D,p.DEPTH_COMPONENT16,p.DEPTH_ATTACHMENT):V&&(g._depth_rb=_(p,N,D,p.STENCIL_INDEX,p.STENCIL_ATTACHMENT));var J=p.checkFramebufferStatus(p.FRAMEBUFFER);if(J!==p.FRAMEBUFFER_COMPLETE){g._destroyed=!0,p.bindFramebuffer(p.FRAMEBUFFER,null),p.deleteFramebuffer(g.handle),g.handle=null,g.depth&&(g.depth.dispose(),g.depth=null),g._depth_rb&&(p.deleteRenderbuffer(g._depth_rb),g._depth_rb=null);for(var H=0;H<g.color.length;++H)g.color[H].dispose(),g.color[H]=null;g._color_rb&&(p.deleteRenderbuffer(g._color_rb),g._color_rb=null),y(p,f),E(J)}y(p,f)}function M(g,f,p,x,N,D,B,U){this.gl=g,this._shape=[f|0,p|0],this._destroyed=!1,this._ext=U,this.color=new Array(N);for(var V=0;V<N;++V)this.color[V]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=x,this._useDepth=D,this._useStencil=B;var q=this,z=[f|0,p|0];Object.defineProperties(z,{0:{get:function(){return q._shape[0]},set:function(H){return q.width=H}},1:{get:function(){return q._shape[1]},set:function(H){return q.height=H}}}),this._shapeVector=z,T(this)}var k=M.prototype;function b(g,f,p){if(g._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(!(g._shape[0]===f&&g._shape[1]===p)){var x=g.gl,N=x.getParameter(x.MAX_RENDERBUFFER_SIZE);if(f<0||f>N||p<0||p>N)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");g._shape[0]=f,g._shape[1]=p;for(var D=h(x),B=0;B<g.color.length;++B)g.color[B].shape=g._shape;g._color_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,g._color_rb),x.renderbufferStorage(x.RENDERBUFFER,x.RGBA4,g._shape[0],g._shape[1])),g.depth&&(g.depth.shape=g._shape),g._depth_rb&&(x.bindRenderbuffer(x.RENDERBUFFER,g._depth_rb),g._useDepth&&g._useStencil?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_STENCIL,g._shape[0],g._shape[1]):g._useDepth?x.renderbufferStorage(x.RENDERBUFFER,x.DEPTH_COMPONENT16,g._shape[0],g._shape[1]):g._useStencil&&x.renderbufferStorage(x.RENDERBUFFER,x.STENCIL_INDEX,g._shape[0],g._shape[1])),x.bindFramebuffer(x.FRAMEBUFFER,g.handle);var U=x.checkFramebufferStatus(x.FRAMEBUFFER);U!==x.FRAMEBUFFER_COMPLETE&&(g.dispose(),y(x,D),E(U)),y(x,D)}}Object.defineProperties(k,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(g){if(Array.isArray(g)||(g=[g|0,g|0]),g.length!==2)throw new Error("gl-fbo: Shape vector must be length 2");var f=g[0]|0,p=g[1]|0;return b(this,f,p),[f,p]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(g){return g=g|0,b(this,g,this._shape[1]),g},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(g){return g=g|0,b(this,this._shape[0],g),g},enumerable:!1}}),k.bind=function(){if(!this._destroyed){var g=this.gl;g.bindFramebuffer(g.FRAMEBUFFER,this.handle),g.viewport(0,0,this._shape[0],this._shape[1])}},k.dispose=function(){if(!this._destroyed){this._destroyed=!0;var g=this.gl;g.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(g.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var f=0;f<this.color.length;++f)this.color[f].dispose(),this.color[f]=null;this._color_rb&&(g.deleteRenderbuffer(this._color_rb),this._color_rb=null)}};function A(g,f,p,x){s||(s=g.FRAMEBUFFER_UNSUPPORTED,o=g.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,u=g.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,d=g.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var N=g.getExtension("WEBGL_draw_buffers");if(!i&&N&&m(g,N),Array.isArray(f)&&(x=p,p=f[1]|0,f=f[0]|0),typeof f!="number")throw new Error("gl-fbo: Missing shape parameter");var D=g.getParameter(g.MAX_RENDERBUFFER_SIZE);if(f<0||f>D||p<0||p>D)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var B=1;if("color"in x){if(B=Math.max(x.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(N){if(B>g.getParameter(N.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var U=g.UNSIGNED_BYTE,V=g.getExtension("OES_texture_float");if(x.float&&B>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");U=g.FLOAT}else x.preferFloat&&B>0&&V&&(U=g.FLOAT);var q=!0;"depth"in x&&(q=!!x.depth);var z=!1;return"stencil"in x&&(z=!!x.stencil),new M(g,f,p,U,B,q,z,N)}}),2272:(function(t,r,a){var l=a(2646)[4];a(2478),t.exports=s;function i(o,u,d,h,y,m){var E=u.opposite(h,y);if(!(E<0)){if(y<h){var c=h;h=y,y=c,c=m,m=E,E=c}u.isConstraint(h,y)||l(o[h],o[y],o[m],o[E])<0&&d.push(h,y)}}function s(o,u){for(var d=[],h=o.length,y=u.stars,m=0;m<h;++m)for(var E=y[m],c=1;c<E.length;c+=2){var _=E[c];if(!(_<m)&&!u.isConstraint(m,_)){for(var T=E[c-1],M=-1,k=1;k<E.length;k+=2)if(E[k-1]===_){M=E[k];break}M<0||l(o[m],o[_],o[T],o[M])<0&&d.push(m,_)}}for(;d.length>0;){for(var _=d.pop(),m=d.pop(),T=-1,M=-1,E=y[m],b=1;b<E.length;b+=2){var A=E[b-1],g=E[b];A===_?M=g:g===_&&(T=A)}T<0||M<0||l(o[m],o[_],o[T],o[M])>=0||(u.flip(m,_),i(o,u,d,T,m,M),i(o,u,d,m,M,T),i(o,u,d,M,_,T),i(o,u,d,_,T,M))}}}),2334:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.min(l[0],i[0]),a[1]=Math.min(l[1],i[1]),a[2]=Math.min(l[2],i[2]),a[3]=Math.min(l[3],i[3]),a}}),2335:(function(t){t.exports=r;function r(a){var l=new Float32Array(4);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l[3]=a[3],l}}),2361:(function(t){var r=!1;if(typeof Float64Array<"u"){var a=new Float64Array(1),l=new Uint32Array(a.buffer);if(a[0]=1,r=!0,l[1]===1072693248){let s=function(d,h){return l[0]=d,l[1]=h,a[0]},o=function(d){return a[0]=d,l[0]},u=function(d){return a[0]=d,l[1]};t.exports=function(h){return a[0]=h,[l[0],l[1]]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}else if(l[0]===1072693248){let s=function(d,h){return l[1]=d,l[0]=h,a[0]},o=function(d){return a[0]=d,l[1]},u=function(d){return a[0]=d,l[0]};t.exports=function(h){return a[0]=h,[l[1],l[0]]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}else r=!1}if(!r){let s=function(d,h){return i.writeUInt32LE(d,0,!0),i.writeUInt32LE(h,4,!0),i.readDoubleLE(0,!0)},o=function(d){return i.writeDoubleLE(d,0,!0),i.readUInt32LE(0,!0)},u=function(d){return i.writeDoubleLE(d,0,!0),i.readUInt32LE(4,!0)};var i=new Buffer(8);t.exports=function(h){return i.writeDoubleLE(h,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=s,t.exports.lo=o,t.exports.hi=u}t.exports.sign=function(s){return t.exports.hi(s)>>>31},t.exports.exponent=function(s){var o=t.exports.hi(s);return(o<<1>>>21)-1023},t.exports.fraction=function(s){var o=t.exports.lo(s),u=t.exports.hi(s),d=u&(1<<20)-1;return u&2146435072&&(d+=1048576),[o,d]},t.exports.denormalized=function(s){var o=t.exports.hi(s);return!(o&2146435072)}}),2408:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[0],d=l[1],h=l[2],y=l[3],m=l[8],E=l[9],c=l[10],_=l[11];return l!==a&&(a[4]=l[4],a[5]=l[5],a[6]=l[6],a[7]=l[7],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[0]=u*o-m*s,a[1]=d*o-E*s,a[2]=h*o-c*s,a[3]=y*o-_*s,a[8]=u*s+m*o,a[9]=d*s+E*o,a[10]=h*s+c*o,a[11]=y*s+_*o,a}}),2419:(function(t){t.exports=r;function r(a){for(var l=1,i=1;i<a.length;++i)for(var s=0;s<i;++s)if(a[i]<a[s])l=-l;else if(a[s]===a[i])return 0;return l}}),2447:(function(t){t.exports=r;function r(a,l){return a[0]=Math.round(l[0]),a[1]=Math.round(l[1]),a[2]=Math.round(l[2]),a}}),2455:(function(t,r){function a(){function s(d,h,y,m,E,c,_,T,M,k,b){for(var A=2*d,g=m,f=A*m;g<E;++g,f+=A){var p=c[h+f],x=c[h+f+d],N=_[g];e:for(var D=T,B=A*T;D<M;++D,B+=A){var U=k[h+B],V=k[h+B+d],q=b[D];if(!(V<p||x<U)){for(var z=h+1;z<d;++z){var H=c[z+f],G=c[z+d+f],J=k[z+B],le=k[z+d+B];if(G<J||le<H)continue e}var ye=y(N,q);if(ye!==void 0)return ye}}}}function o(d,h,y,m,E,c,_,T,M,k,b){for(var A=2*d,g=T,f=A*T;g<M;++g,f+=A){var p=k[h+f],x=k[h+f+d],N=b[g];e:for(var D=m,B=A*m;D<E;++D,B+=A){var U=c[h+B],V=c[h+B+d],q=_[D];if(!(x<U||V<p)){for(var z=h+1;z<d;++z){var H=c[z+B],G=c[z+d+B],J=k[z+f],le=k[z+d+f];if(G<J||le<H)continue e}var ye=y(q,N);if(ye!==void 0)return ye}}}}function u(d,h,y,m,E,c,_,T,M,k,b){return E-m>M-T?s(d,h,y,m,E,c,_,T,M,k,b):o(d,h,y,m,E,c,_,T,M,k,b)}return u}function l(){function s(y,m,E,c,_,T,M,k,b,A,g){for(var f=2*y,p=c,x=f*c;p<_;++p,x+=f){var N=T[m+x],D=T[m+x+y],B=M[p];e:for(var U=k,V=f*k;U<b;++U,V+=f){var q=A[m+V],z=g[U];if(!(q<=N||D<q)){for(var H=m+1;H<y;++H){var G=T[H+x],J=T[H+y+x],le=A[H+V],ye=A[H+y+V];if(J<le||ye<G)continue e}var de=E(z,B);if(de!==void 0)return de}}}}function o(y,m,E,c,_,T,M,k,b,A,g){for(var f=2*y,p=c,x=f*c;p<_;++p,x+=f){var N=T[m+x],D=T[m+x+y],B=M[p];e:for(var U=k,V=f*k;U<b;++U,V+=f){var q=A[m+V],z=g[U];if(!(q<N||D<q)){for(var H=m+1;H<y;++H){var G=T[H+x],J=T[H+y+x],le=A[H+V],ye=A[H+y+V];if(J<le||ye<G)continue e}var de=E(B,z);if(de!==void 0)return de}}}}function u(y,m,E,c,_,T,M,k,b,A,g){for(var f=2*y,p=k,x=f*k;p<b;++p,x+=f){var N=A[m+x],D=g[p];e:for(var B=c,U=f*c;B<_;++B,U+=f){var V=T[m+U],q=T[m+U+y],z=M[B];if(!(N<=V||q<N)){for(var H=m+1;H<y;++H){var G=T[H+U],J=T[H+y+U],le=A[H+x],ye=A[H+y+x];if(J<le||ye<G)continue e}var de=E(D,z);if(de!==void 0)return de}}}}function d(y,m,E,c,_,T,M,k,b,A,g){for(var f=2*y,p=k,x=f*k;p<b;++p,x+=f){var N=A[m+x],D=g[p];e:for(var B=c,U=f*c;B<_;++B,U+=f){var V=T[m+U],q=T[m+U+y],z=M[B];if(!(N<V||q<N)){for(var H=m+1;H<y;++H){var G=T[H+U],J=T[H+y+U],le=A[H+x],ye=A[H+y+x];if(J<le||ye<G)continue e}var de=E(z,D);if(de!==void 0)return de}}}}function h(y,m,E,c,_,T,M,k,b,A,g,f){return T-_>A-b?c?s(y,m,E,_,T,M,k,b,A,g,f):o(y,m,E,_,T,M,k,b,A,g,f):c?u(y,m,E,_,T,M,k,b,A,g,f):d(y,m,E,_,T,M,k,b,A,g,f)}return h}function i(s){return s?a():l()}r.partial=i(!1),r.full=i(!0)}),2478:(function(t){function r(u,d,h,y,m){for(var E=m+1;y<=m;){var c=y+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T>=0?(E=c,m=c-1):y=c+1}return E}function a(u,d,h,y,m){for(var E=m+1;y<=m;){var c=y+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T>0?(E=c,m=c-1):y=c+1}return E}function l(u,d,h,y,m){for(var E=y-1;y<=m;){var c=y+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T<0?(E=c,y=c+1):m=c-1}return E}function i(u,d,h,y,m){for(var E=y-1;y<=m;){var c=y+m>>>1,_=u[c],T=h!==void 0?h(_,d):_-d;T<=0?(E=c,y=c+1):m=c-1}return E}function s(u,d,h,y,m){for(;y<=m;){var E=y+m>>>1,c=u[E],_=h!==void 0?h(c,d):c-d;if(_===0)return E;_<=0?y=E+1:m=E-1}return-1}function o(u,d,h,y,m,E){return typeof h=="function"?E(u,d,h,y===void 0?0:y|0,m===void 0?u.length-1:m|0):E(u,d,void 0,h===void 0?0:h|0,y===void 0?u.length-1:y|0)}t.exports={ge:function(u,d,h,y,m){return o(u,d,h,y,m,r)},gt:function(u,d,h,y,m){return o(u,d,h,y,m,a)},lt:function(u,d,h,y,m){return o(u,d,h,y,m,l)},le:function(u,d,h,y,m){return o(u,d,h,y,m,i)},eq:function(u,d,h,y,m){return o(u,d,h,y,m,s)}}}),2504:(function(t){t.exports=r;function r(a,l,i){var s=i[0],o=i[1],u=i[2];return a[0]=l[0]*s,a[1]=l[1]*s,a[2]=l[2]*s,a[3]=l[3]*s,a[4]=l[4]*o,a[5]=l[5]*o,a[6]=l[6]*o,a[7]=l[7]*o,a[8]=l[8]*u,a[9]=l[9]*u,a[10]=l[10]*u,a[11]=l[11]*u,a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15],a}}),2538:(function(t,r,a){var l=a(8902),i=a(5542),s=a(2272),o=a(5023);t.exports=m;function u(E){return[Math.min(E[0],E[1]),Math.max(E[0],E[1])]}function d(E,c){return E[0]-c[0]||E[1]-c[1]}function h(E){return E.map(u).sort(d)}function y(E,c,_){return c in E?E[c]:_}function m(E,c,_){Array.isArray(c)?(_=_||{},c=c||[]):(_=c||{},c=[]);var T=!!y(_,"delaunay",!0),M=!!y(_,"interior",!0),k=!!y(_,"exterior",!0),b=!!y(_,"infinity",!1);if(!M&&!k||E.length===0)return[];var A=l(E,c);if(T||M!==k||b){for(var g=i(E.length,h(c)),f=0;f<A.length;++f){var p=A[f];g.addTriangle(p[0],p[1],p[2])}return T&&s(E,g),k?M?b?o(g,0,b):g.cells():o(g,1,b):o(g,-1)}else return A}}),2573:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2],h=l[3];return a[0]=o+s*(i[0]-o),a[1]=u+s*(i[1]-u),a[2]=d+s*(i[2]-d),a[3]=h+s*(i[3]-h),a}}),2613:(function(t){t.exports=1e-6}),2640:(function(t,r,a){var l=a(1888);t.exports=o;var i={"false,0,1":function(d,h,y,m,E){return function(_,T,M,k){var b=_.shape[0]|0,A=_.shape[1]|0,g=_.data,f=_.offset|0,p=_.stride[0]|0,x=_.stride[1]|0,N=f,D,B=-p|0,U=0,V=-x|0,q=0,z=-p-x|0,H=0,G=p|0,J=x-p*b|0,le=0,ye=0,de=0,me=2*b|0,W=m(me),ie=m(me),se=0,ee=0,pe=-1,oe=-1,Y=0,ce=-b|0,ue=b|0,_e=0,Le=-b-1|0,ze=b-1|0,Ge=0,Ve=0,rt=0;for(le=0;le<b;++le)W[se++]=y(g[N],T,M,k),N+=G;if(N+=J,A>0){if(ye=1,W[se++]=y(g[N],T,M,k),N+=G,b>0)for(le=1,D=g[N],ee=W[se]=y(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Ge=W[se+Le],(ee!==Y||ee!==_e||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,Y,_e,Ge,T,M,k),Ve=ie[se]=de++),se+=1,N+=G,le=2;le<b;++le)D=g[N],ee=W[se]=y(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Ge=W[se+Le],(ee!==Y||ee!==_e||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,Y,_e,Ge,T,M,k),Ve=ie[se]=de++,Ge!==Y&&h(ie[se+pe],Ve,H,U,Ge,Y,T,M,k)),se+=1,N+=G;for(N+=J,se=0,rt=pe,pe=oe,oe=rt,rt=ce,ce=ue,ue=rt,rt=Le,Le=ze,ze=rt,ye=2;ye<A;++ye){if(W[se++]=y(g[N],T,M,k),N+=G,b>0)for(le=1,D=g[N],ee=W[se]=y(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Ge=W[se+Le],(ee!==Y||ee!==_e||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,Y,_e,Ge,T,M,k),Ve=ie[se]=de++,Ge!==_e&&h(ie[se+ce],Ve,q,H,_e,Ge,T,M,k)),se+=1,N+=G,le=2;le<b;++le)D=g[N],ee=W[se]=y(D,T,M,k),Y=W[se+pe],_e=W[se+ce],Ge=W[se+Le],(ee!==Y||ee!==_e||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,Y,_e,Ge,T,M,k),Ve=ie[se]=de++,Ge!==_e&&h(ie[se+ce],Ve,q,H,_e,Ge,T,M,k),Ge!==Y&&h(ie[se+pe],Ve,H,U,Ge,Y,T,M,k)),se+=1,N+=G;ye&1&&(se=0),rt=pe,pe=oe,oe=rt,rt=ce,ce=ue,ue=rt,rt=Le,Le=ze,ze=rt,N+=J}}E(ie),E(W)}},"false,1,0":function(d,h,y,m,E){return function(_,T,M,k){var b=_.shape[0]|0,A=_.shape[1]|0,g=_.data,f=_.offset|0,p=_.stride[0]|0,x=_.stride[1]|0,N=f,D,B=-p|0,U=0,V=-x|0,q=0,z=-p-x|0,H=0,G=x|0,J=p-x*A|0,le=0,ye=0,de=0,me=2*A|0,W=m(me),ie=m(me),se=0,ee=0,pe=-1,oe=-1,Y=0,ce=-A|0,ue=A|0,_e=0,Le=-A-1|0,ze=A-1|0,Ge=0,Ve=0,rt=0;for(ye=0;ye<A;++ye)W[se++]=y(g[N],T,M,k),N+=G;if(N+=J,b>0){if(le=1,W[se++]=y(g[N],T,M,k),N+=G,A>0)for(ye=1,D=g[N],ee=W[se]=y(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Ge=W[se+Le],(ee!==_e||ee!==Y||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,_e,Y,Ge,T,M,k),Ve=ie[se]=de++),se+=1,N+=G,ye=2;ye<A;++ye)D=g[N],ee=W[se]=y(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Ge=W[se+Le],(ee!==_e||ee!==Y||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,_e,Y,Ge,T,M,k),Ve=ie[se]=de++,Ge!==Y&&h(ie[se+pe],Ve,q,H,Y,Ge,T,M,k)),se+=1,N+=G;for(N+=J,se=0,rt=ce,ce=ue,ue=rt,rt=pe,pe=oe,oe=rt,rt=Le,Le=ze,ze=rt,le=2;le<b;++le){if(W[se++]=y(g[N],T,M,k),N+=G,A>0)for(ye=1,D=g[N],ee=W[se]=y(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Ge=W[se+Le],(ee!==_e||ee!==Y||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,_e,Y,Ge,T,M,k),Ve=ie[se]=de++,Ge!==_e&&h(ie[se+ce],Ve,H,U,Ge,_e,T,M,k)),se+=1,N+=G,ye=2;ye<A;++ye)D=g[N],ee=W[se]=y(D,T,M,k),_e=W[se+ce],Y=W[se+pe],Ge=W[se+Le],(ee!==_e||ee!==Y||ee!==Ge)&&(U=g[N+B],q=g[N+V],H=g[N+z],d(le,ye,D,U,q,H,ee,_e,Y,Ge,T,M,k),Ve=ie[se]=de++,Ge!==Y&&h(ie[se+pe],Ve,q,H,Y,Ge,T,M,k),Ge!==_e&&h(ie[se+ce],Ve,H,U,Ge,_e,T,M,k)),se+=1,N+=G;le&1&&(se=0),rt=ce,ce=ue,ue=rt,rt=pe,pe=oe,oe=rt,rt=Le,Le=ze,ze=rt,N+=J}}E(ie),E(W)}}};function s(u,d,h,y,m,E){var c=[E,m].join(","),_=i[c];return _(u,d,h,l.mallocUint32,l.freeUint32)}function o(u){function d(T){throw new Error("ndarray-extract-contour: "+T)}typeof u!="object"&&d("Must specify arguments");var h=u.order;Array.isArray(h)||d("Must specify order");var y=u.arrayArguments||1;y<1&&d("Must have at least one array argument");var m=u.scalarArguments||0;m<0&&d("Scalar arg count must be > 0"),typeof u.vertex!="function"&&d("Must specify vertex creation function"),typeof u.cell!="function"&&d("Must specify cell creation function"),typeof u.phase!="function"&&d("Must specify phase function");for(var E=u.getters||[],c=new Array(y),_=0;_<y;++_)E.indexOf(_)>=0?c[_]=!0:c[_]=!1;return s(u.vertex,u.cell,u.phase,m,h,c)}}),2642:(function(t,r,a){t.exports=s;var l=a(727);function i(o){for(var u=0,d=0;d<o.length;++d)u+=o[d];return u}function s(o,u){for(var d=u.length,h=new Array(d+1),y=0;y<d;++y){for(var m=new Array(d+1),E=0;E<=d;++E)m[E]=o[E][y];h[y]=m}h[d]=new Array(d+1);for(var y=0;y<=d;++y)h[d][y]=1;for(var c=new Array(d+1),y=0;y<d;++y)c[y]=u[y];c[d]=1;var _=l(h,c),T=i(_[d+1]);T===0&&(T=1);for(var M=new Array(d+1),y=0;y<=d;++y)M[y]=i(_[y])/T;return M}}),2646:(function(t,r,a){var l=a(5250),i=a(8210),s=a(8545),o=a(3012),u=6;function d(g){var f=g===3?E:g===4?c:g===5?_:T;return f(i,s,l,o)}function h(){return 0}function y(){return 0}function m(){return 0}function E(g,f,p,x){function N(D,B,U){var V=p(D[0],D[0]),q=x(V,B[0]),z=x(V,U[0]),H=p(B[0],B[0]),G=x(H,D[0]),J=x(H,U[0]),le=p(U[0],U[0]),ye=x(le,D[0]),de=x(le,B[0]),me=g(f(de,J),f(G,q)),W=f(ye,z),ie=f(me,W);return ie[ie.length-1]}return N}function c(g,f,p,x){function N(D,B,U,V){var q=g(p(D[0],D[0]),p(D[1],D[1])),z=x(q,B[0]),H=x(q,U[0]),G=x(q,V[0]),J=g(p(B[0],B[0]),p(B[1],B[1])),le=x(J,D[0]),ye=x(J,U[0]),de=x(J,V[0]),me=g(p(U[0],U[0]),p(U[1],U[1])),W=x(me,D[0]),ie=x(me,B[0]),se=x(me,V[0]),ee=g(p(V[0],V[0]),p(V[1],V[1])),pe=x(ee,D[0]),oe=x(ee,B[0]),Y=x(ee,U[0]),ce=g(g(x(f(Y,se),B[1]),g(x(f(oe,de),-U[1]),x(f(ie,ye),V[1]))),g(x(f(oe,de),D[1]),g(x(f(pe,G),-B[1]),x(f(le,z),V[1])))),ue=g(g(x(f(Y,se),D[1]),g(x(f(pe,G),-U[1]),x(f(W,H),V[1]))),g(x(f(ie,ye),D[1]),g(x(f(W,H),-B[1]),x(f(le,z),U[1])))),_e=f(ce,ue);return _e[_e.length-1]}return N}function _(g,f,p,x){function N(D,B,U,V,q){var z=g(p(D[0],D[0]),g(p(D[1],D[1]),p(D[2],D[2]))),H=x(z,B[0]),G=x(z,U[0]),J=x(z,V[0]),le=x(z,q[0]),ye=g(p(B[0],B[0]),g(p(B[1],B[1]),p(B[2],B[2]))),de=x(ye,D[0]),me=x(ye,U[0]),W=x(ye,V[0]),ie=x(ye,q[0]),se=g(p(U[0],U[0]),g(p(U[1],U[1]),p(U[2],U[2]))),ee=x(se,D[0]),pe=x(se,B[0]),oe=x(se,V[0]),Y=x(se,q[0]),ce=g(p(V[0],V[0]),g(p(V[1],V[1]),p(V[2],V[2]))),ue=x(ce,D[0]),_e=x(ce,B[0]),Le=x(ce,U[0]),ze=x(ce,q[0]),Ge=g(p(q[0],q[0]),g(p(q[1],q[1]),p(q[2],q[2]))),Ve=x(Ge,D[0]),rt=x(Ge,B[0]),pt=x(Ge,U[0]),gt=x(Ge,V[0]),ht=g(g(g(x(g(x(f(gt,ze),U[1]),g(x(f(pt,Y),-V[1]),x(f(Le,oe),q[1]))),B[2]),g(x(g(x(f(gt,ze),B[1]),g(x(f(rt,ie),-V[1]),x(f(_e,W),q[1]))),-U[2]),x(g(x(f(pt,Y),B[1]),g(x(f(rt,ie),-U[1]),x(f(pe,me),q[1]))),V[2]))),g(x(g(x(f(Le,oe),B[1]),g(x(f(_e,W),-U[1]),x(f(pe,me),V[1]))),-q[2]),g(x(g(x(f(gt,ze),B[1]),g(x(f(rt,ie),-V[1]),x(f(_e,W),q[1]))),D[2]),x(g(x(f(gt,ze),D[1]),g(x(f(Ve,le),-V[1]),x(f(ue,J),q[1]))),-B[2])))),g(g(x(g(x(f(rt,ie),D[1]),g(x(f(Ve,le),-B[1]),x(f(de,H),q[1]))),V[2]),g(x(g(x(f(_e,W),D[1]),g(x(f(ue,J),-B[1]),x(f(de,H),V[1]))),-q[2]),x(g(x(f(Le,oe),B[1]),g(x(f(_e,W),-U[1]),x(f(pe,me),V[1]))),D[2]))),g(x(g(x(f(Le,oe),D[1]),g(x(f(ue,J),-U[1]),x(f(ee,G),V[1]))),-B[2]),g(x(g(x(f(_e,W),D[1]),g(x(f(ue,J),-B[1]),x(f(de,H),V[1]))),U[2]),x(g(x(f(pe,me),D[1]),g(x(f(ee,G),-B[1]),x(f(de,H),U[1]))),-V[2]))))),lt=g(g(g(x(g(x(f(gt,ze),U[1]),g(x(f(pt,Y),-V[1]),x(f(Le,oe),q[1]))),D[2]),x(g(x(f(gt,ze),D[1]),g(x(f(Ve,le),-V[1]),x(f(ue,J),q[1]))),-U[2])),g(x(g(x(f(pt,Y),D[1]),g(x(f(Ve,le),-U[1]),x(f(ee,G),q[1]))),V[2]),x(g(x(f(Le,oe),D[1]),g(x(f(ue,J),-U[1]),x(f(ee,G),V[1]))),-q[2]))),g(g(x(g(x(f(pt,Y),B[1]),g(x(f(rt,ie),-U[1]),x(f(pe,me),q[1]))),D[2]),x(g(x(f(pt,Y),D[1]),g(x(f(Ve,le),-U[1]),x(f(ee,G),q[1]))),-B[2])),g(x(g(x(f(rt,ie),D[1]),g(x(f(Ve,le),-B[1]),x(f(de,H),q[1]))),U[2]),x(g(x(f(pe,me),D[1]),g(x(f(ee,G),-B[1]),x(f(de,H),U[1]))),-q[2])))),Fe=f(ht,lt);return Fe[Fe.length-1]}return N}function T(g,f,p,x){function N(D,B,U,V,q,z){var H=g(g(p(D[0],D[0]),p(D[1],D[1])),g(p(D[2],D[2]),p(D[3],D[3]))),G=x(H,B[0]),J=x(H,U[0]),le=x(H,V[0]),ye=x(H,q[0]),de=x(H,z[0]),me=g(g(p(B[0],B[0]),p(B[1],B[1])),g(p(B[2],B[2]),p(B[3],B[3]))),W=x(me,D[0]),ie=x(me,U[0]),se=x(me,V[0]),ee=x(me,q[0]),pe=x(me,z[0]),oe=g(g(p(U[0],U[0]),p(U[1],U[1])),g(p(U[2],U[2]),p(U[3],U[3]))),Y=x(oe,D[0]),ce=x(oe,B[0]),ue=x(oe,V[0]),_e=x(oe,q[0]),Le=x(oe,z[0]),ze=g(g(p(V[0],V[0]),p(V[1],V[1])),g(p(V[2],V[2]),p(V[3],V[3]))),Ge=x(ze,D[0]),Ve=x(ze,B[0]),rt=x(ze,U[0]),pt=x(ze,q[0]),gt=x(ze,z[0]),ht=g(g(p(q[0],q[0]),p(q[1],q[1])),g(p(q[2],q[2]),p(q[3],q[3]))),lt=x(ht,D[0]),Fe=x(ht,B[0]),Pe=x(ht,U[0]),be=x(ht,V[0]),Ye=x(ht,z[0]),mt=g(g(p(z[0],z[0]),p(z[1],z[1])),g(p(z[2],z[2]),p(z[3],z[3]))),bt=x(mt,D[0]),ft=x(mt,B[0]),Wt=x(mt,U[0]),Zt=x(mt,V[0]),cr=x(mt,q[0]),pr=g(g(g(x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),U[2]),x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),q[2]),x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),-z[2]))),B[3]),g(x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),B[2]),x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),q[2]),x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-z[2]))),-U[3]),x(g(g(x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),B[2]),x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),q[2]),x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),-z[2]))),V[3]))),g(g(x(g(g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),B[2]),x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),V[2]),x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-z[2]))),-q[3]),x(g(g(x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),B[2]),x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-U[2])),g(x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),V[2]),x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-q[2]))),z[3])),g(x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),B[2]),x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),q[2]),x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-z[2]))),D[3]),x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),q[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-z[2]))),-B[3])))),g(g(g(x(g(g(x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),q[2]),x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),-z[2]))),V[3]),x(g(g(x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),D[2]),x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),V[2]),x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),-z[2]))),-q[3])),g(x(g(g(x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),D[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-B[2])),g(x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),V[2]),x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),-q[2]))),z[3]),x(g(g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),B[2]),x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),V[2]),x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-z[2]))),D[3]))),g(g(x(g(g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),D[2]),x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),V[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-z[2]))),-B[3]),x(g(g(x(g(x(f(Zt,gt),B[1]),g(x(f(ft,pe),-V[1]),x(f(Ve,se),z[1]))),D[2]),x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),V[2]),x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),-z[2]))),U[3])),g(x(g(g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),D[2]),x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-z[2]))),-V[3]),x(g(g(x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),D[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-B[2])),g(x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-V[2]))),z[3]))))),Br=g(g(g(x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),U[2]),x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),q[2]),x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),-z[2]))),D[3]),g(x(g(g(x(g(x(f(cr,Ye),V[1]),g(x(f(Zt,gt),-q[1]),x(f(be,pt),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-V[2])),g(x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),q[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-z[2]))),-U[3]),x(g(g(x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),q[2]),x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),-z[2]))),V[3]))),g(g(x(g(g(x(g(x(f(Zt,gt),U[1]),g(x(f(Wt,Le),-V[1]),x(f(rt,ue),z[1]))),D[2]),x(g(x(f(Zt,gt),D[1]),g(x(f(bt,de),-V[1]),x(f(Ge,le),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),V[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-z[2]))),-q[3]),x(g(g(x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),D[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-U[2])),g(x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),V[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-q[2]))),z[3])),g(x(g(g(x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),B[2]),x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),q[2]),x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),-z[2]))),D[3]),x(g(g(x(g(x(f(cr,Ye),U[1]),g(x(f(Wt,Le),-q[1]),x(f(Pe,_e),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-U[2])),g(x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),q[2]),x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),-z[2]))),-B[3])))),g(g(g(x(g(g(x(g(x(f(cr,Ye),B[1]),g(x(f(ft,pe),-q[1]),x(f(Fe,ee),z[1]))),D[2]),x(g(x(f(cr,Ye),D[1]),g(x(f(bt,de),-q[1]),x(f(lt,ye),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),q[2]),x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),-z[2]))),U[3]),x(g(g(x(g(x(f(Wt,Le),B[1]),g(x(f(ft,pe),-U[1]),x(f(ce,ie),z[1]))),D[2]),x(g(x(f(Wt,Le),D[1]),g(x(f(bt,de),-U[1]),x(f(Y,J),z[1]))),-B[2])),g(x(g(x(f(ft,pe),D[1]),g(x(f(bt,de),-B[1]),x(f(W,G),z[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-z[2]))),-q[3])),g(x(g(g(x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),D[2]),x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),-B[2])),g(x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-q[2]))),z[3]),x(g(g(x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),B[2]),x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),-U[2])),g(x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),V[2]),x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),-q[2]))),D[3]))),g(g(x(g(g(x(g(x(f(be,pt),U[1]),g(x(f(Pe,_e),-V[1]),x(f(rt,ue),q[1]))),D[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-U[2])),g(x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),V[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-q[2]))),-B[3]),x(g(g(x(g(x(f(be,pt),B[1]),g(x(f(Fe,ee),-V[1]),x(f(Ve,se),q[1]))),D[2]),x(g(x(f(be,pt),D[1]),g(x(f(lt,ye),-V[1]),x(f(Ge,le),q[1]))),-B[2])),g(x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),V[2]),x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),-q[2]))),U[3])),g(x(g(g(x(g(x(f(Pe,_e),B[1]),g(x(f(Fe,ee),-U[1]),x(f(ce,ie),q[1]))),D[2]),x(g(x(f(Pe,_e),D[1]),g(x(f(lt,ye),-U[1]),x(f(Y,J),q[1]))),-B[2])),g(x(g(x(f(Fe,ee),D[1]),g(x(f(lt,ye),-B[1]),x(f(W,G),q[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-q[2]))),-V[3]),x(g(g(x(g(x(f(rt,ue),B[1]),g(x(f(Ve,se),-U[1]),x(f(ce,ie),V[1]))),D[2]),x(g(x(f(rt,ue),D[1]),g(x(f(Ge,le),-U[1]),x(f(Y,J),V[1]))),-B[2])),g(x(g(x(f(Ve,se),D[1]),g(x(f(Ge,le),-B[1]),x(f(W,G),V[1]))),U[2]),x(g(x(f(ce,ie),D[1]),g(x(f(Y,J),-B[1]),x(f(W,G),U[1]))),-V[2]))),q[3]))))),Fr=f(pr,Br);return Fr[Fr.length-1]}return N}var M=[h,y,m];function k(g){var f=M[g.length];return f||(f=M[g.length]=d(g.length)),f.apply(void 0,g)}function b(g,f,p,x,N,D,B,U){function V(q,z,H,G,J,le){switch(arguments.length){case 0:case 1:return 0;case 2:return x(q,z);case 3:return N(q,z,H);case 4:return D(q,z,H,G);case 5:return B(q,z,H,G,J);case 6:return U(q,z,H,G,J,le)}for(var ye=new Array(arguments.length),de=0;de<arguments.length;++de)ye[de]=arguments[de];return g(ye)}return V}function A(){for(;M.length<=u;)M.push(d(M.length));t.exports=b.apply(void 0,[k].concat(M));for(var g=0;g<=u;++g)t.exports[g]=M[g]}A()}),2651:(function(t,r,a){var l=a(6859),i=a(2361);t.exports=s;function s(o){var u=i.exponent(o);return u<52?new l(o):new l(o*Math.pow(2,52-u)).ushln(u-52)}}),2652:(function(t,r,a){var l=a(4335),i=a(6864),s=a(1903),o=a(9921),u=a(7608),d=a(5665),h={length:a(1387),normalize:a(3536),dot:a(244),cross:a(5911)},y=i(),m=i(),E=[0,0,0,0],c=[[0,0,0],[0,0,0],[0,0,0]],_=[0,0,0];t.exports=function(A,g,f,p,x,N){if(g||(g=[0,0,0]),f||(f=[0,0,0]),p||(p=[0,0,0]),x||(x=[0,0,0,1]),N||(N=[0,0,0,1]),!l(y,A)||(s(m,y),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(o(m)<1e-8)))return!1;var D=y[3],B=y[7],U=y[11],V=y[12],q=y[13],z=y[14],H=y[15];if(D!==0||B!==0||U!==0){E[0]=D,E[1]=B,E[2]=U,E[3]=H;var G=u(m,m);if(!G)return!1;d(m,m),T(x,E,m)}else x[0]=x[1]=x[2]=0,x[3]=1;if(g[0]=V,g[1]=q,g[2]=z,M(c,y),f[0]=h.length(c[0]),h.normalize(c[0],c[0]),p[0]=h.dot(c[0],c[1]),k(c[1],c[1],c[0],1,-p[0]),f[1]=h.length(c[1]),h.normalize(c[1],c[1]),p[0]/=f[1],p[1]=h.dot(c[0],c[2]),k(c[2],c[2],c[0],1,-p[1]),p[2]=h.dot(c[1],c[2]),k(c[2],c[2],c[1],1,-p[2]),f[2]=h.length(c[2]),h.normalize(c[2],c[2]),p[1]/=f[2],p[2]/=f[2],h.cross(_,c[1],c[2]),h.dot(c[0],_)<0)for(var J=0;J<3;J++)f[J]*=-1,c[J][0]*=-1,c[J][1]*=-1,c[J][2]*=-1;return N[0]=.5*Math.sqrt(Math.max(1+c[0][0]-c[1][1]-c[2][2],0)),N[1]=.5*Math.sqrt(Math.max(1-c[0][0]+c[1][1]-c[2][2],0)),N[2]=.5*Math.sqrt(Math.max(1-c[0][0]-c[1][1]+c[2][2],0)),N[3]=.5*Math.sqrt(Math.max(1+c[0][0]+c[1][1]+c[2][2],0)),c[2][1]>c[1][2]&&(N[0]=-N[0]),c[0][2]>c[2][0]&&(N[1]=-N[1]),c[1][0]>c[0][1]&&(N[2]=-N[2]),!0};function T(b,A,g){var f=A[0],p=A[1],x=A[2],N=A[3];return b[0]=g[0]*f+g[4]*p+g[8]*x+g[12]*N,b[1]=g[1]*f+g[5]*p+g[9]*x+g[13]*N,b[2]=g[2]*f+g[6]*p+g[10]*x+g[14]*N,b[3]=g[3]*f+g[7]*p+g[11]*x+g[15]*N,b}function M(b,A){b[0][0]=A[0],b[0][1]=A[1],b[0][2]=A[2],b[1][0]=A[4],b[1][1]=A[5],b[1][2]=A[6],b[2][0]=A[8],b[2][1]=A[9],b[2][2]=A[10]}function k(b,A,g,f,p){b[0]=A[0]*f+g[0]*p,b[1]=A[1]*f+g[1]*p,b[2]=A[2]*f+g[2]*p}}),2653:(function(t,r,a){var l=a(3865);t.exports=i;function i(s,o){for(var u=s.length,d=new Array(u),h=0;h<u;++h)d[h]=l(s[h],o[h]);return d}}),2681:(function(t){t.exports=r;function r(a,l){return a[0]=Math.floor(l[0]),a[1]=Math.floor(l[1]),a[2]=Math.floor(l[2]),a}}),2690:(function(t,r,a){t.exports=u;var l=a(8954),i=a(3952);function s(d,h){for(var y=d.length,m=new Array(y),E=0;E<h.length;++E)m[E]=d[h[E]];for(var c=h.length,E=0;E<y;++E)h.indexOf(E)<0&&(m[c++]=d[E]);return m}function o(d,h){for(var y=d.length,m=h.length,E=0;E<y;++E)for(var c=d[E],_=0;_<c.length;++_){var T=c[_];if(T<m)c[_]=h[T];else{T=T-m;for(var M=0;M<m;++M)T>=h[M]&&(T+=1);c[_]=T}}return d}function u(d,h){try{return l(d,!0)}catch{var y=i(d);if(y.length<=h)return[];var m=s(d,y),E=l(m,!0);return o(E,y)}}}),2762:(function(t,r,a){var l=a(1888),i=a(5298),s=a(9618),o=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function u(c,_,T,M,k){this.gl=c,this.type=_,this.handle=T,this.length=M,this.usage=k}var d=u.prototype;d.bind=function(){this.gl.bindBuffer(this.type,this.handle)},d.unbind=function(){this.gl.bindBuffer(this.type,null)},d.dispose=function(){this.gl.deleteBuffer(this.handle)};function h(c,_,T,M,k,b){var A=k.length*k.BYTES_PER_ELEMENT;if(b<0)return c.bufferData(_,k,M),A;if(A+b>T)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return c.bufferSubData(_,b,k),T}function y(c,_){for(var T=l.malloc(c.length,_),M=c.length,k=0;k<M;++k)T[k]=c[k];return T}function m(c,_){for(var T=1,M=_.length-1;M>=0;--M){if(_[M]!==T)return!1;T*=c[M]}return!0}d.update=function(c,_){if(typeof _!="number"&&(_=-1),this.bind(),typeof c=="object"&&typeof c.shape<"u"){var T=c.dtype;if(o.indexOf(T)<0&&(T="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&T!=="uint16"?T="uint32":T="uint16"}if(T===c.dtype&&m(c.shape,c.stride))c.offset===0&&c.data.length===c.shape[0]?this.length=h(this.gl,this.type,this.length,this.usage,c.data,_):this.length=h(this.gl,this.type,this.length,this.usage,c.data.subarray(c.offset,c.shape[0]),_);else{var k=l.malloc(c.size,T),b=s(k,c.shape);i.assign(b,c),_<0?this.length=h(this.gl,this.type,this.length,this.usage,k,_):this.length=h(this.gl,this.type,this.length,this.usage,k.subarray(0,c.size),_),l.free(k)}}else if(Array.isArray(c)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=y(c,"uint16"):A=y(c,"float32"),_<0?this.length=h(this.gl,this.type,this.length,this.usage,A,_):this.length=h(this.gl,this.type,this.length,this.usage,A.subarray(0,c.length),_),l.free(A)}else if(typeof c=="object"&&typeof c.length=="number")this.length=h(this.gl,this.type,this.length,this.usage,c,_);else if(typeof c=="number"||c===void 0){if(_>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");c=c|0,c<=0&&(c=1),this.gl.bufferData(this.type,c|0,this.usage),this.length=c}else throw new Error("gl-buffer: Invalid data type")};function E(c,_,T,M){if(T=T||c.ARRAY_BUFFER,M=M||c.DYNAMIC_DRAW,T!==c.ARRAY_BUFFER&&T!==c.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(M!==c.DYNAMIC_DRAW&&M!==c.STATIC_DRAW&&M!==c.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 k=c.createBuffer(),b=new u(c,T,k,0,M);return b.update(_),b}t.exports=E}),2825:(function(t){t.exports=r;function r(a,l,i){var s=new Float32Array(3);return s[0]=a,s[1]=l,s[2]=i,s}}),2931:(function(t,r,a){t.exports={EPSILON:a(2613),create:a(1091),clone:a(3126),angle:a(8192),fromValues:a(2825),copy:a(3990),set:a(1463),equals:a(9922),exactEquals:a(9265),add:a(5632),subtract:a(6843),sub:a(2229),multiply:a(5847),mul:a(4505),divide:a(6690),div:a(4008),min:a(8107),max:a(7417),floor:a(2681),ceil:a(9226),round:a(2447),scale:a(6621),scaleAndAdd:a(8489),distance:a(7056),dist:a(5455),squaredDistance:a(2953),sqrDist:a(6141),length:a(1387),len:a(868),squaredLength:a(3066),sqrLen:a(5486),negate:a(5093),inverse:a(811),normalize:a(3536),dot:a(244),cross:a(5911),lerp:a(6658),random:a(7636),transformMat4:a(5673),transformMat3:a(492),transformQuat:a(264),rotateX:a(6894),rotateY:a(109),rotateZ:a(8692),forEach:a(5137)}}),2933:(function(t){t.exports=r;function r(a,l){return a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a}}),2953:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2];return i*i+s*s+o*o}}),2962:(function(t,r,a){var l=a(5250),i=a(8210),s=a(3012),o=a(7004),u=6;function d(M,k,b,A){return function(f){return A(M(b(f[0][0],f[1][1]),b(-f[0][1],f[1][0])))}}function h(M,k,b,A){return function(f){return A(M(k(M(b(f[1][1],f[2][2]),b(-f[1][2],f[2][1])),f[0][0]),M(k(M(b(f[1][0],f[2][2]),b(-f[1][2],f[2][0])),-f[0][1]),k(M(b(f[1][0],f[2][1]),b(-f[1][1],f[2][0])),f[0][2]))))}}function y(M,k,b,A){return function(f){return A(M(M(k(M(k(M(b(f[2][2],f[3][3]),b(-f[2][3],f[3][2])),f[1][1]),M(k(M(b(f[2][1],f[3][3]),b(-f[2][3],f[3][1])),-f[1][2]),k(M(b(f[2][1],f[3][2]),b(-f[2][2],f[3][1])),f[1][3]))),f[0][0]),k(M(k(M(b(f[2][2],f[3][3]),b(-f[2][3],f[3][2])),f[1][0]),M(k(M(b(f[2][0],f[3][3]),b(-f[2][3],f[3][0])),-f[1][2]),k(M(b(f[2][0],f[3][2]),b(-f[2][2],f[3][0])),f[1][3]))),-f[0][1])),M(k(M(k(M(b(f[2][1],f[3][3]),b(-f[2][3],f[3][1])),f[1][0]),M(k(M(b(f[2][0],f[3][3]),b(-f[2][3],f[3][0])),-f[1][1]),k(M(b(f[2][0],f[3][1]),b(-f[2][1],f[3][0])),f[1][3]))),f[0][2]),k(M(k(M(b(f[2][1],f[3][2]),b(-f[2][2],f[3][1])),f[1][0]),M(k(M(b(f[2][0],f[3][2]),b(-f[2][2],f[3][0])),-f[1][1]),k(M(b(f[2][0],f[3][1]),b(-f[2][1],f[3][0])),f[1][2]))),-f[0][3]))))}}function m(M,k,b,A){return function(f){return A(M(M(k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][2]),M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),-f[2][3]),k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][4]))),f[1][1]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][3]),k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][4]))),-f[1][2])),M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][3]))),-f[1][4]))),f[0][0]),k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][2]),M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),-f[2][3]),k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][3]),k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),f[2][4]))),-f[1][2])),M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][3]))),-f[1][4]))),-f[0][1])),M(k(M(M(k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][3]),k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][3],f[4][4]),b(-f[3][4],f[4][3])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][3]),k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),f[2][4]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][4]))),f[1][3]),k(M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][3]))),-f[1][4]))),f[0][2]),M(k(M(M(k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][4]))),f[1][0]),k(M(k(M(b(f[3][2],f[4][4]),b(-f[3][4],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][4]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][4]),b(-f[3][4],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][4]),b(-f[3][4],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][4]))),f[1][2]),k(M(k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][2]))),-f[1][4]))),-f[0][3]),k(M(M(k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][1]),M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),-f[2][2]),k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][3]))),f[1][0]),k(M(k(M(b(f[3][2],f[4][3]),b(-f[3][3],f[4][2])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][2]),k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),f[2][3]))),-f[1][1])),M(k(M(k(M(b(f[3][1],f[4][3]),b(-f[3][3],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][3]),b(-f[3][3],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][3]))),f[1][2]),k(M(k(M(b(f[3][1],f[4][2]),b(-f[3][2],f[4][1])),f[2][0]),M(k(M(b(f[3][0],f[4][2]),b(-f[3][2],f[4][0])),-f[2][1]),k(M(b(f[3][0],f[4][1]),b(-f[3][1],f[4][0])),f[2][2]))),-f[1][3]))),f[0][4])))))}}function E(M){var k=M===2?d:M===3?h:M===4?y:M===5?m:void 0;return k(i,s,l,o)}var c=[function(){return[0]},function(k){return[k[0][0]]}];function _(M,k,b,A,g,f,p,x){return function(D){switch(D.length){case 0:return M(D);case 1:return k(D);case 2:return b(D);case 3:return A(D);case 4:return g(D);case 5:return f(D)}var B=p[D.length];return B||(B=p[D.length]=x(D.length)),B(D)}}function T(){for(;c.length<u;)c.push(E(c.length));t.exports=_.apply(void 0,c.concat([c,E]));for(var M=0;M<c.length;++M)t.exports[M]=c[M]}T()}),2992:(function(t,r,a){var l=a(3387).sprintf,i=a(5171),s=a(1848),o=a(1085);t.exports=u;function u(d,h,y){var m=s(h)||"of unknown name (see npm glsl-shader-name)",E="unknown type";y!==void 0&&(E=y===i.FRAGMENT_SHADER?"fragment":"vertex");for(var c=l(`Error compiling %s shader %s:
`,E,m),_=l("%s%s",c,d),T=d.split(`
`),M={},k=0;k<T.length;k++){var b=T[k];if(!(b===""||b==="\0")){var A=parseInt(b.split(":")[2]);if(isNaN(A))throw new Error(l("Could not parse error: %s",b));M[A]=b}}for(var g=o(h).split(`
`),k=0;k<g.length;k++)if(!(!M[k+3]&&!M[k+2]&&!M[k+1])){var f=g[k];if(c+=f+`
`,M[k+1]){var p=M[k+1];p=p.substr(p.split(":",3).join(":").length+1).trim(),c+=l(`^^^ %s

`,p)}}return{long:c.trim(),short:_.trim()}}}),3012:(function(t,r,a){var l=a(5250),i=a(9362);t.exports=s;function s(o,u){var d=o.length;if(d===1){var h=l(o[0],u);return h[0]?h:[h[1]]}var y=new Array(2*d),m=[.1,.1],E=[.1,.1],c=0;l(o[0],u,m),m[0]&&(y[c++]=m[0]);for(var _=1;_<d;++_){l(o[_],u,E);var T=m[1];i(T,E[0],m),m[0]&&(y[c++]=m[0]);var M=E[1],k=m[1],b=M+k,A=b-M,g=k-A;m[1]=b,g&&(y[c++]=g)}return m[1]&&(y[c++]=m[1]),c===0&&(y[c++]=0),y.length=c,y}}),3025:(function(t,r,a){t.exports=a.g.performance&&a.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),3066:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2];return l*l+i*i+s*s}}),3088:(function(t,r,a){t.exports=i;var l=a(3140);function i(s,o){for(var u=o.length|0,d=s.length,h=[new Array(u),new Array(u)],y=0;y<u;++y)h[0][y]=[],h[1][y]=[];for(var y=0;y<d;++y){var m=s[y];h[0][m[0]].push(m),h[1][m[1]].push(m)}for(var E=[],y=0;y<u;++y)h[0][y].length+h[1][y].length===0&&E.push([y]);function c(g,f){var p=h[f][g[f]];p.splice(p.indexOf(g),1)}function _(g,f,p){for(var x,N,D,B=0;B<2;++B)if(h[B][f].length>0){x=h[B][f][0],D=B;break}N=x[D^1];for(var U=0;U<2;++U)for(var V=h[U][f],q=0;q<V.length;++q){var z=V[q],H=z[U^1],G=l(o[g],o[f],o[N],o[H]);G>0&&(x=z,N=H,D=U)}return p||x&&c(x,D),N}function T(g,f){var p=h[f][g][0],x=[g];c(p,f);for(var N=p[f^1];;){for(;N!==g;)x.push(N),N=_(x[x.length-2],N,!1);if(h[0][g].length+h[1][g].length===0)break;var D=x[x.length-1],B=g,U=x[1],V=_(D,B,!0);if(l(o[D],o[B],o[U],o[V])<0)break;x.push(g),N=_(D,B)}return x}function M(g,f){return f[1]===f[f.length-1]}for(var y=0;y<u;++y)for(var k=0;k<2;++k){for(var b=[];h[k][y].length>0;){h[0][y].length;var A=T(y,k);M(b,A)?b.push.apply(b,A):(b.length>0&&E.push(b),b=A)}b.length>0&&E.push(b)}return E}}),3090:(function(t,r,a){t.exports=i;var l=a(3250)[3];function i(s){var o=s.length;if(o<3){for(var _=new Array(o),u=0;u<o;++u)_[u]=u;return o===2&&s[0][0]===s[1][0]&&s[0][1]===s[1][1]?[0]:_}for(var d=new Array(o),u=0;u<o;++u)d[u]=u;d.sort(function(b,A){var g=s[b][0]-s[A][0];return g||s[b][1]-s[A][1]});for(var h=[d[0],d[1]],y=[d[0],d[1]],u=2;u<o;++u){for(var m=d[u],E=s[m],c=h.length;c>1&&l(s[h[c-2]],s[h[c-1]],E)<=0;)c-=1,h.pop();for(h.push(m),c=y.length;c>1&&l(s[y[c-2]],s[y[c-1]],E)>=0;)c-=1,y.pop();y.push(m)}for(var _=new Array(y.length+h.length-2),T=0,u=0,M=h.length;u<M;++u)_[T++]=h[u];for(var k=y.length-2;k>0;--k)_[T++]=y[k];return _}}),3105:(function(t,r){"use restrict";var a=32;r.INT_BITS=a,r.INT_MAX=2147483647,r.INT_MIN=-1<<a-1,r.sign=function(s){return(s>0)-(s<0)},r.abs=function(s){var o=s>>a-1;return(s^o)-o},r.min=function(s,o){return o^(s^o)&-(s<o)},r.max=function(s,o){return s^(s^o)&-(s<o)},r.isPow2=function(s){return!(s&s-1)&&!!s},r.log2=function(s){var o,u;return o=(s>65535)<<4,s>>>=o,u=(s>255)<<3,s>>>=u,o|=u,u=(s>15)<<2,s>>>=u,o|=u,u=(s>3)<<1,s>>>=u,o|=u,o|s>>1},r.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},r.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var o=32;return s&=-s,s&&o--,s&65535&&(o-=16),s&16711935&&(o-=8),s&252645135&&(o-=4),s&858993459&&(o-=2),s&1431655765&&(o-=1),o}r.countTrailingZeros=l,r.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},r.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},r.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var i=new Array(256);(function(s){for(var o=0;o<256;++o){var u=o,d=o,h=7;for(u>>>=1;u;u>>>=1)d<<=1,d|=u&1,--h;s[o]=d<<h&255}})(i),r.reverse=function(s){return i[s&255]<<24|i[s>>>8&255]<<16|i[s>>>16&255]<<8|i[s>>>24&255]},r.interleave2=function(s,o){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,s|o<<1},r.deinterleave2=function(s,o){return s=s>>>o&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},r.interleave3=function(s,o,u){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,s|=o<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,s|u<<2},r.deinterleave3=function(s,o){return s=s>>>o&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},r.nextCombination=function(s){var o=s|s-1;return o+1|(~o&-~o)-1>>>l(s)+1}}),3126:(function(t){t.exports=r;function r(a){var l=new Float32Array(3);return l[0]=a[0],l[1]=a[1],l[2]=a[2],l}}),3134:(function(t,r,a){t.exports=i;var l=a(1682);function i(s,o){var u=s.length;if(typeof o!="number"){o=0;for(var d=0;d<u;++d){var h=s[d];o=Math.max(o,h[0],h[1])}o=(o|0)+1}o=o|0;for(var y=new Array(o),d=0;d<o;++d)y[d]=[];for(var d=0;d<u;++d){var h=s[d];y[h[0]].push(h[1]),y[h[1]].push(h[0])}for(var m=0;m<o;++m)l(y[m],function(E,c){return E-c});return y}}),3140:(function(t,r,a){t.exports=h;var l=a(3250),i=a(8572),s=a(9362),o=a(5382),u=a(8210);function d(y,m,E){var c=s(y[0],-m[0]),_=s(y[1],-m[1]),T=s(E[0],-m[0]),M=s(E[1],-m[1]),k=u(o(c,T),o(_,M));return k[k.length-1]>=0}function h(y,m,E,c){var _=l(m,E,c);if(_===0){var T=i(l(y,m,E)),M=i(l(y,m,c));if(T===M){if(T===0){var k=d(y,m,E),b=d(y,m,c);return k===b?0:k?1:-1}return 0}else{if(M===0)return T>0||d(y,m,c)?-1:1;if(T===0)return M>0||d(y,m,E)?1:-1}return i(M-T)}var A=l(y,m,E);if(A>0)return _>0&&l(y,m,c)>0?1:-1;if(A<0)return _>0||l(y,m,c)>0?1:-1;var g=l(y,m,c);return g>0||d(y,m,E)?1:-1}}),3202:(function(t){t.exports=function(a,l){l||(l=[0,""]),a=String(a);var i=parseFloat(a,10);return l[0]=i,l[1]=a.match(/[\d.\-\+]*\s*(.*)/)[1]||"",l}}),3233:(function(t){var r="",a;t.exports=l;function l(i,s){if(typeof i!="string")throw new TypeError("expected a string");if(s===1)return i;if(s===2)return i+i;var o=i.length*s;if(a!==i||typeof a>"u")a=i,r="";else if(r.length>=o)return r.substr(0,o);for(;o>r.length&&s>1;)s&1&&(r+=i),s>>=1,i+=i;return r+=i,r=r.substr(0,o),r}}),3236:(function(t){t.exports=function(r){typeof r=="string"&&(r=[r]);for(var a=[].slice.call(arguments,1),l=[],i=0;i<r.length-1;i++)l.push(r[i],a[i]||"");return l.push(r[i]),l.join("")}}),3250:(function(t,r,a){var l=a(5250),i=a(8210),s=a(3012),o=a(8545),u=5,d=11102230246251565e-32,h=(3+16*d)*d,y=(7+56*d)*d;function m(f,p,x,N){return function(B,U,V){var q=f(f(p(U[1],V[0]),p(-V[1],U[0])),f(p(B[1],U[0]),p(-U[1],B[0]))),z=f(p(B[1],V[0]),p(-V[1],B[0])),H=N(q,z);return H[H.length-1]}}function E(f,p,x,N){return function(B,U,V,q){var z=f(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2])))),H=f(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2])))),G=N(z,H);return G[G.length-1]}}function c(f,p,x,N){return function(B,U,V,q,z){var H=f(f(f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),V[2]),f(x(f(p(V[1],z[0]),p(-z[1],V[0])),-q[2]),x(f(p(V[1],q[0]),p(-q[1],V[0])),z[2]))),U[3]),f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-q[2]),x(f(p(U[1],q[0]),p(-q[1],U[0])),z[2]))),-V[3]),x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),z[2]))),q[3]))),f(x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),-z[3]),f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-q[2]),x(f(p(U[1],q[0]),p(-q[1],U[0])),z[2]))),B[3]),x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-q[2]),x(f(p(B[1],q[0]),p(-q[1],B[0])),z[2]))),-U[3])))),f(f(x(f(x(f(p(U[1],z[0]),p(-z[1],U[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),z[2]))),q[3]),f(x(f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2]))),-z[3]),x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),U[2]),f(x(f(p(U[1],q[0]),p(-q[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),q[2]))),B[3]))),f(x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),-U[3]),f(x(f(x(f(p(U[1],q[0]),p(-q[1],U[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),q[2]))),V[3]),x(f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2]))),-q[3]))))),G=f(f(f(x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),V[2]),f(x(f(p(V[1],z[0]),p(-z[1],V[0])),-q[2]),x(f(p(V[1],q[0]),p(-q[1],V[0])),z[2]))),B[3]),x(f(x(f(p(q[1],z[0]),p(-z[1],q[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-q[2]),x(f(p(B[1],q[0]),p(-q[1],B[0])),z[2]))),-V[3])),f(x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),z[2]))),q[3]),x(f(x(f(p(V[1],q[0]),p(-q[1],V[0])),B[2]),f(x(f(p(B[1],q[0]),p(-q[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),q[2]))),-z[3]))),f(f(x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),U[2]),f(x(f(p(U[1],z[0]),p(-z[1],U[0])),-V[2]),x(f(p(U[1],V[0]),p(-V[1],U[0])),z[2]))),B[3]),x(f(x(f(p(V[1],z[0]),p(-z[1],V[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-V[2]),x(f(p(B[1],V[0]),p(-V[1],B[0])),z[2]))),-U[3])),f(x(f(x(f(p(U[1],z[0]),p(-z[1],U[0])),B[2]),f(x(f(p(B[1],z[0]),p(-z[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),z[2]))),V[3]),x(f(x(f(p(U[1],V[0]),p(-V[1],U[0])),B[2]),f(x(f(p(B[1],V[0]),p(-V[1],B[0])),-U[2]),x(f(p(B[1],U[0]),p(-U[1],B[0])),V[2]))),-z[3])))),J=N(H,G);return J[J.length-1]}}function _(f){var p=f===3?m:f===4?E:c;return p(i,l,s,o)}var T=_(3),M=_(4),k=[function(){return 0},function(){return 0},function(p,x){return x[0]-p[0]},function(p,x,N){var D=(p[1]-N[1])*(x[0]-N[0]),B=(p[0]-N[0])*(x[1]-N[1]),U=D-B,V;if(D>0){if(B<=0)return U;V=D+B}else if(D<0){if(B>=0)return U;V=-(D+B)}else return U;var q=h*V;return U>=q||U<=-q?U:T(p,x,N)},function(p,x,N,D){var B=p[0]-D[0],U=x[0]-D[0],V=N[0]-D[0],q=p[1]-D[1],z=x[1]-D[1],H=N[1]-D[1],G=p[2]-D[2],J=x[2]-D[2],le=N[2]-D[2],ye=U*H,de=V*z,me=V*q,W=B*H,ie=B*z,se=U*q,ee=G*(ye-de)+J*(me-W)+le*(ie-se),pe=(Math.abs(ye)+Math.abs(de))*Math.abs(G)+(Math.abs(me)+Math.abs(W))*Math.abs(J)+(Math.abs(ie)+Math.abs(se))*Math.abs(le),oe=y*pe;return ee>oe||-ee>oe?ee:M(p,x,N,D)}];function b(f){var p=k[f.length];return p||(p=k[f.length]=_(f.length)),p.apply(void 0,f)}function A(f,p,x,N,D,B,U){return function(q,z,H,G,J){switch(arguments.length){case 0:case 1:return 0;case 2:return N(q,z);case 3:return D(q,z,H);case 4:return B(q,z,H,G);case 5:return U(q,z,H,G,J)}for(var le=new Array(arguments.length),ye=0;ye<arguments.length;++ye)le[ye]=arguments[ye];return f(le)}}function g(){for(;k.length<=u;)k.push(_(k.length));t.exports=A.apply(void 0,[b].concat(k));for(var f=0;f<=u;++f)t.exports[f]=k[f]}g()}),3327:(function(t,r,a){var l=a(216),i=a(8866);t.exports=u;function s(d){return function(){return d}}function o(d,h){for(var y=new Array(d),m=0;m<d;++m)y[m]=h;return y}function u(d,h,y,m){function E(A){return function(g,f,p){return g.getUniform(f.program,p[A])}}function c(A){return function(f){for(var p=_("",A),x=0;x<p.length;++x){var N=p[x],D=N[0],B=N[1];if(m[B]){var U=f;if(typeof D=="string"&&(D.indexOf(".")===0||D.indexOf("[")===0)){var V=D;if(D.indexOf(".")===0&&(V=D.slice(1)),V.indexOf("]")===V.length-1){var q=V.indexOf("["),z=V.slice(0,q),H=V.slice(q+1,V.length-1);U=z?f[z][H]:f[H]}else U=f[V]}var G=y[B].type,J;switch(G){case"bool":case"int":case"sampler2D":case"samplerCube":d.uniform1i(m[B],U);break;case"float":d.uniform1f(m[B],U);break;default:var le=G.indexOf("vec");if(0<=le&&le<=1&&G.length===4+le){if(J=G.charCodeAt(G.length-1)-48,J<2||J>4)throw new i("","Invalid data type");switch(G.charAt(0)){case"b":case"i":d["uniform"+J+"iv"](m[B],U);break;case"v":d["uniform"+J+"fv"](m[B],U);break;default:throw new i("","Unrecognized data type for vector "+name+": "+G)}}else if(G.indexOf("mat")===0&&G.length===4){if(J=G.charCodeAt(G.length-1)-48,J<2||J>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+G);d["uniformMatrix"+J+"fv"](m[B],!1,U);break}else throw new i("","Unknown uniform data type for "+name+": "+G)}}}}}function _(A,g){if(typeof g!="object")return[[A,g]];var f=[];for(var p in g){var x=g[p],N=A;parseInt(p)+""===p?N+="["+p+"]":N+="."+p,typeof x=="object"?f.push.apply(f,_(N,x)):f.push([N,x])}return f}function T(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var g=A.indexOf("vec");if(0<=g&&g<=1&&A.length===4+g){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type");return A.charAt(0)==="b"?o(f,!1):o(f,0)}else if(A.indexOf("mat")===0&&A.length===4){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+A);return o(f*f,0)}else throw new i("","Unknown uniform data type for "+name+": "+A)}}function M(A,g,f){if(typeof f=="object"){var p=k(f);Object.defineProperty(A,g,{get:s(p),set:c(f),enumerable:!0,configurable:!1})}else m[f]?Object.defineProperty(A,g,{get:E(f),set:c(f),enumerable:!0,configurable:!1}):A[g]=T(y[f].type)}function k(A){var g;if(Array.isArray(A)){g=new Array(A.length);for(var f=0;f<A.length;++f)M(g,f,A[f])}else{g={};for(var p in A)M(g,p,A[p])}return g}var b=l(y,!0);return{get:s(k(b)),set:c(b),enumerable:!0,configurable:!0}}}),3349:(function(t){function r(){return function(u,d,h,y,m,E){var c=u[0],_=h[0],T=[0],M=_;y|=0;var k=0,b=_;for(k=0;k<c;++k){{var A=d[y]-E,g=d[y+M]-E;A>=0!=g>=0&&m.push(T[0]+.5+.5*(A+g)/(A-g))}y+=b,++T[0]}}}function a(){return r()}var l=a;function i(u){var d={};return function(y,m,E){var c=y.dtype,_=y.order,T=[c,_.join()].join(),M=d[T];return M||(d[T]=M=u([c,_])),M(y.shape.slice(0),y.data,y.stride,y.offset|0,m,E)}}function s(u){return i(l.bind(void 0,u))}function o(u){return s({funcName:u.funcName})}t.exports=o({funcName:"zeroCrossings"})}),3352:(function(t,r,a){var l=a(2478),i=0,s=1,o=2;t.exports=p;function u(x,N,D,B,U){this.mid=x,this.left=N,this.right=D,this.leftPoints=B,this.rightPoints=U,this.count=(N?N.count:0)+(D?D.count:0)+B.length}var d=u.prototype;function h(x,N){x.mid=N.mid,x.left=N.left,x.right=N.right,x.leftPoints=N.leftPoints,x.rightPoints=N.rightPoints,x.count=N.count}function y(x,N){var D=A(N);x.mid=D.mid,x.left=D.left,x.right=D.right,x.leftPoints=D.leftPoints,x.rightPoints=D.rightPoints,x.count=D.count}function m(x,N){var D=x.intervals([]);D.push(N),y(x,D)}function E(x,N){var D=x.intervals([]),B=D.indexOf(N);return B<0?i:(D.splice(B,1),y(x,D),s)}d.intervals=function(x){return x.push.apply(x,this.leftPoints),this.left&&this.left.intervals(x),this.right&&this.right.intervals(x),x},d.insert=function(x){var N=this.count-this.leftPoints.length;if(this.count+=1,x[1]<this.mid)this.left?4*(this.left.count+1)>3*(N+1)?m(this,x):this.left.insert(x):this.left=A([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(N+1)?m(this,x):this.right.insert(x):this.right=A([x]);else{var D=l.ge(this.leftPoints,x,k),B=l.ge(this.rightPoints,x,b);this.leftPoints.splice(D,0,x),this.rightPoints.splice(B,0,x)}},d.remove=function(x){var N=this.count-this.leftPoints;if(x[1]<this.mid){if(!this.left)return i;var D=this.right?this.right.count:0;if(4*D>3*(N-1))return E(this,x);var B=this.left.remove(x);return B===o?(this.left=null,this.count-=1,s):(B===s&&(this.count-=1),B)}else if(x[0]>this.mid){if(!this.right)return i;var U=this.left?this.left.count:0;if(4*U>3*(N-1))return E(this,x);var B=this.right.remove(x);return B===o?(this.right=null,this.count-=1,s):(B===s&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===x?o:i;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var V=this,q=this.left;q.right;)V=q,q=q.right;if(V===this)q.right=this.right;else{var z=this.left,B=this.right;V.count-=q.count,V.right=q.left,q.left=z,q.right=B}h(this,q),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?h(this,this.left):h(this,this.right);return s}for(var z=l.ge(this.leftPoints,x,k);z<this.leftPoints.length&&this.leftPoints[z][0]===x[0];++z)if(this.leftPoints[z]===x){this.count-=1,this.leftPoints.splice(z,1);for(var B=l.ge(this.rightPoints,x,b);B<this.rightPoints.length&&this.rightPoints[B][1]===x[1];++B)if(this.rightPoints[B]===x)return this.rightPoints.splice(B,1),s}return i}};function c(x,N,D){for(var B=0;B<x.length&&x[B][0]<=N;++B){var U=D(x[B]);if(U)return U}}function _(x,N,D){for(var B=x.length-1;B>=0&&x[B][1]>=N;--B){var U=D(x[B]);if(U)return U}}function T(x,N){for(var D=0;D<x.length;++D){var B=N(x[D]);if(B)return B}}d.queryPoint=function(x,N){if(x<this.mid){if(this.left){var D=this.left.queryPoint(x,N);if(D)return D}return c(this.leftPoints,x,N)}else if(x>this.mid){if(this.right){var D=this.right.queryPoint(x,N);if(D)return D}return _(this.rightPoints,x,N)}else return T(this.leftPoints,N)},d.queryInterval=function(x,N,D){if(x<this.mid&&this.left){var B=this.left.queryInterval(x,N,D);if(B)return B}if(N>this.mid&&this.right){var B=this.right.queryInterval(x,N,D);if(B)return B}return N<this.mid?c(this.leftPoints,N,D):x>this.mid?_(this.rightPoints,x,D):T(this.leftPoints,D)};function M(x,N){return x-N}function k(x,N){var D=x[0]-N[0];return D||x[1]-N[1]}function b(x,N){var D=x[1]-N[1];return D||x[0]-N[0]}function A(x){if(x.length===0)return null;for(var N=[],D=0;D<x.length;++D)N.push(x[D][0],x[D][1]);N.sort(M);for(var B=N[N.length>>1],U=[],V=[],q=[],D=0;D<x.length;++D){var z=x[D];z[1]<B?U.push(z):B<z[0]?V.push(z):q.push(z)}var H=q,G=q.slice();return H.sort(k),G.sort(b),new u(B,A(U),A(V),H,G)}function g(x){this.root=x}var f=g.prototype;f.insert=function(x){this.root?this.root.insert(x):this.root=new u(x[0],null,null,[x],[x])},f.remove=function(x){if(this.root){var N=this.root.remove(x);return N===o&&(this.root=null),N!==i}return!1},f.queryPoint=function(x,N){if(this.root)return this.root.queryPoint(x,N)},f.queryInterval=function(x,N,D){if(x<=N&&this.root)return this.root.queryInterval(x,N,D)},Object.defineProperty(f,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(f,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});function p(x){return!x||x.length===0?new g(null):new g(A(x))}}),3387:(function(t,r,a){var l;(function(){var i={not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,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 s(y){return u(h(y),arguments)}function o(y,m){return s.apply(null,[y].concat(m||[]))}function u(y,m){var E=1,c=y.length,_,T="",M,k,b,A,g,f,p,x;for(M=0;M<c;M++)if(typeof y[M]=="string")T+=y[M];else if(typeof y[M]=="object"){if(b=y[M],b.keys)for(_=m[E],k=0;k<b.keys.length;k++){if(_==null)throw new Error(s('[sprintf] Cannot access property "%s" of undefined value "%s"',b.keys[k],b.keys[k-1]));_=_[b.keys[k]]}else b.param_no?_=m[b.param_no]:_=m[E++];if(i.not_type.test(b.type)&&i.not_primitive.test(b.type)&&_ instanceof Function&&(_=_()),i.numeric_arg.test(b.type)&&typeof _!="number"&&isNaN(_))throw new TypeError(s("[sprintf] expecting number but found %T",_));switch(i.number.test(b.type)&&(p=_>=0),b.type){case"b":_=parseInt(_,10).toString(2);break;case"c":_=String.fromCharCode(parseInt(_,10));break;case"d":case"i":_=parseInt(_,10);break;case"j":_=JSON.stringify(_,null,b.width?parseInt(b.width):0);break;case"e":_=b.precision?parseFloat(_).toExponential(b.precision):parseFloat(_).toExponential();break;case"f":_=b.precision?parseFloat(_).toFixed(b.precision):parseFloat(_);break;case"g":_=b.precision?String(Number(_.toPrecision(b.precision))):parseFloat(_);break;case"o":_=(parseInt(_,10)>>>0).toString(8);break;case"s":_=String(_),_=b.precision?_.substring(0,b.precision):_;break;case"t":_=String(!!_),_=b.precision?_.substring(0,b.precision):_;break;case"T":_=Object.prototype.toString.call(_).slice(8,-1).toLowerCase(),_=b.precision?_.substring(0,b.precision):_;break;case"u":_=parseInt(_,10)>>>0;break;case"v":_=_.valueOf(),_=b.precision?_.substring(0,b.precision):_;break;case"x":_=(parseInt(_,10)>>>0).toString(16);break;case"X":_=(parseInt(_,10)>>>0).toString(16).toUpperCase();break}i.json.test(b.type)?T+=_:(i.number.test(b.type)&&(!p||b.sign)?(x=p?"+":"-",_=_.toString().replace(i.sign,"")):x="",g=b.pad_char?b.pad_char==="0"?"0":b.pad_char.charAt(1):" ",f=b.width-(x+_).length,A=b.width&&f>0?g.repeat(f):"",T+=b.align?x+_+A:g==="0"?x+A+_:A+x+_)}return T}var d=Object.create(null);function h(y){if(d[y])return d[y];for(var m=y,E,c=[],_=0;m;){if((E=i.text.exec(m))!==null)c.push(E[0]);else if((E=i.modulo.exec(m))!==null)c.push("%");else if((E=i.placeholder.exec(m))!==null){if(E[2]){_|=1;var T=[],M=E[2],k=[];if((k=i.key.exec(M))!==null)for(T.push(k[1]);(M=M.substring(k[0].length))!=="";)if((k=i.key_access.exec(M))!==null)T.push(k[1]);else if((k=i.index_access.exec(M))!==null)T.push(k[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");E[2]=T}else _|=2;if(_===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");c.push({placeholder:E[0],param_no:E[1],keys:E[2],sign:E[3],pad_char:E[4],align:E[5],width:E[6],precision:E[7],type:E[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(E[0].length)}return d[y]=c}r.sprintf=s,r.vsprintf=o,typeof window<"u"&&(window.sprintf=s,window.vsprintf=o,l=(function(){return{sprintf:s,vsprintf:o}}).call(r,a,r,t),l!==void 0&&(t.exports=l))})()}),3390:(function(t){t.exports=r;function r(a,l,i,s){var o=new Float32Array(4);return o[0]=a,o[1]=l,o[2]=i,o[3]=s,o}}),3436:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`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;
}`]),o=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 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;
}`]);t.exports=function(u){return i(u,s,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),3502:(function(t,r,a){t.exports=s;var l=a(5995),i=a(9127);function s(o,u){return i(l(o,u))}}),3508:(function(t,r,a){var l=a(6852);l=l.slice().filter(function(i){return!/^(gl\_|texture)/.test(i)}),t.exports=l.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),3536:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=i*i+s*s+o*o;return u>0&&(u=1/Math.sqrt(u),a[0]=l[0]*u,a[1]=l[1]*u,a[2]=l[2]*u),a}}),3545:(function(t,r,a){t.exports=u;var l=a(8105),i=l("lo<p0"),s=8;function o(d,h,y,m,E,c){for(var _=2*d,T=_*(y+1)+h,M=y+1;M<m;++M,T+=_)for(var k=E[T],b=M,A=_*(M-1);b>y&&E[A+h]>k;--b,A-=_){for(var g=A,f=A+_,p=0;p<_;++p,++g,++f){var x=E[g];E[g]=E[f],E[f]=x}var N=c[b];c[b]=c[b-1],c[b-1]=N}}function u(d,h,y,m,E,c){if(m<=y+1)return y;for(var _=y,T=m,M=m+y>>>1,k=2*d,b=M,A=E[k*M+h];_<T;){if(T-_<s){o(d,h,_,T,E,c),A=E[k*M+h];break}var g=T-_,f=Math.random()*g+_|0,p=E[k*f+h],x=Math.random()*g+_|0,N=E[k*x+h],D=Math.random()*g+_|0,B=E[k*D+h];p<=N?B>=N?(b=x,A=N):p>=B?(b=f,A=p):(b=D,A=B):N>=B?(b=x,A=N):B>=p?(b=f,A=p):(b=D,A=B);for(var q=k*(T-1),z=k*b,U=0;U<k;++U,++q,++z){var V=E[q];E[q]=E[z],E[z]=V}var H=c[T-1];c[T-1]=c[b],c[b]=H,b=i(d,h,_,T-1,E,c,A);for(var q=k*(T-1),z=k*b,U=0;U<k;++U,++q,++z){var V=E[q];E[q]=E[z],E[z]=V}var H=c[T-1];if(c[T-1]=c[b],c[b]=H,M<b){for(T=b-1;_<T&&E[k*(T-1)+h]===A;)T-=1;T+=1}else if(b<M)for(_=b+1;_<T&&E[k*_+h]===A;)_+=1;else break}return i(d,h,y,M,E,c,E[k*M+h])}}),3576:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i[0],a[1]=l[1]*i[1],a[2]=l[2]*i[2],a[3]=l[3]*i[3],a}}),3589:(function(t,r,a){t.exports=m;var l=a(2260),i=a(1888),s=a(9618),o=a(8828).nextPow2,u=function(E,c,_){for(var T=1e8,M=-1,k=-1,b=E.shape[0],A=E.shape[1],g=0;g<b;g++)for(var f=0;f<A;f++){var p=E.get(g,f,0),x=E.get(g,f,1),N=E.get(g,f,2),D=E.get(g,f,3);if(p<255||x<255||N<255||D<255){var B=c-g,U=_-f,V=B*B+U*U;V<T&&(T=V,M=g,k=f)}}return[M,k,T]};function d(E,c,_,T,M){this.coord=[E,c],this.id=_,this.value=T,this.distance=M}function h(E,c,_){this.gl=E,this.fbo=c,this.buffer=_,this._readTimeout=null;var T=this;this._readCallback=function(){T.gl&&(c.bind(),E.readPixels(0,0,c.shape[0],c.shape[1],E.RGBA,E.UNSIGNED_BYTE,T.buffer),T._readTimeout=null)}}var y=h.prototype;Object.defineProperty(y,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(E){if(this.gl){this.fbo.shape=E;var c=this.fbo.shape[0],_=this.fbo.shape[1];if(_*c*4>this.buffer.length){i.free(this.buffer);for(var T=this.buffer=i.mallocUint8(o(_*c*4)),M=0;M<_*c*4;++M)T[M]=255}return E}}}),y.begin=function(){var E=this.gl;this.shape,E&&(this.fbo.bind(),E.clearColor(1,1,1,1),E.clear(E.COLOR_BUFFER_BIT|E.DEPTH_BUFFER_BIT))},y.end=function(){var E=this.gl;E&&(E.bindFramebuffer(E.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},y.query=function(E,c,_){if(!this.gl)return null;var T=this.fbo.shape.slice();E=E|0,c=c|0,typeof _!="number"&&(_=1);var M=Math.min(Math.max(E-_,0),T[0])|0,k=Math.min(Math.max(E+_,0),T[0])|0,b=Math.min(Math.max(c-_,0),T[1])|0,A=Math.min(Math.max(c+_,0),T[1])|0;if(k<=M||A<=b)return null;var g=[k-M,A-b],f=s(this.buffer,[g[0],g[1],4],[4,T[0]*4,1],4*(M+T[0]*b)),p=u(f.hi(g[0],g[1],1),_,_),x=p[0],N=p[1];if(x<0||Math.pow(this.radius,2)<p[2])return null;var D=f.get(x,N,0),B=f.get(x,N,1),U=f.get(x,N,2),V=f.get(x,N,3);return new d(x+M|0,N+b|0,D,[B,U,V],Math.sqrt(p[2]))},y.dispose=function(){this.gl&&(this.fbo.dispose(),i.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))};function m(E,c){var _=c[0],T=c[1],M={},k=l(E,_,T,M),b=i.mallocUint8(_*T*4);return new h(E,k,b)}}),3628:(function(t,r,a){var l=a(1338),i=a(727);function s(d,h){for(var y=0,m=d.length,E=0;E<m;++E)y+=d[E]*h[E];return y}function o(d){var h=d.length;if(h===0)return[];d[0].length;var y=l([d.length+1,d.length+1],1),m=l([d.length+1],1);y[h][h]=0;for(var E=0;E<h;++E){for(var c=0;c<=E;++c)y[c][E]=y[E][c]=2*s(d[E],d[c]);m[E]=s(d[E],d[E])}for(var _=i(y,m),T=0,M=_[h+1],E=0;E<M.length;++E)T+=M[E];for(var k=new Array(h),E=0;E<h;++E){for(var M=_[E],b=0,c=0;c<M.length;++c)b+=M[c];k[E]=b/T}return k}function u(d){if(d.length===0)return[];for(var h=d[0].length,y=l([h]),m=o(d),E=0;E<d.length;++E)for(var c=0;c<h;++c)y[c]+=d[E][c]*m[E];return y}u.barycenetric=o,t.exports=u}),3637:(function(t,r,a){t.exports=m;var l=a(6504),i=a(8697),s=a(5572),o=a(7721),u=a(544),d=a(2653),h=a(8987);function y(E,c){return s(l(E[0],c[1]),l(E[1],c[0]))}function m(E,c,_,T){var M=u(c,E),k=u(T,_),b=y(M,k);if(o(b)===0)return null;var A=u(E,_),g=y(k,A),f=i(g,b),p=h(M,f),x=d(E,p);return x}}),3642:(function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}}),3711:(function(t,r,a){t.exports=h;var l=a(2640),i=a(781),s={"2d":function(y,m,E){var c=y({order:m,scalarArguments:3,getters:E==="generic"?[0]:void 0,phase:function(T,M,k,b){return T>b|0},vertex:function(T,M,k,b,A,g,f,p,x,N,D,B,U){var V=(f<<0)+(p<<1)+(x<<2)+(N<<3)|0;if(!(V===0||V===15))switch(V){case 0:D.push([T-.5,M-.5]);break;case 1:D.push([T-.25-.25*(b+k-2*U)/(k-b),M-.25-.25*(A+k-2*U)/(k-A)]);break;case 2:D.push([T-.75-.25*(-b-k+2*U)/(b-k),M-.25-.25*(g+b-2*U)/(b-g)]);break;case 3:D.push([T-.5,M-.5-.5*(A+k+g+b-4*U)/(k-A+b-g)]);break;case 4:D.push([T-.25-.25*(g+A-2*U)/(A-g),M-.75-.25*(-A-k+2*U)/(A-k)]);break;case 5:D.push([T-.5-.5*(b+k+g+A-4*U)/(k-b+A-g),M-.5]);break;case 6:D.push([T-.5-.25*(-b-k+g+A)/(b-k+A-g),M-.5-.25*(-A-k+g+b)/(A-k+b-g)]);break;case 7:D.push([T-.75-.25*(g+A-2*U)/(A-g),M-.75-.25*(g+b-2*U)/(b-g)]);break;case 8:D.push([T-.75-.25*(-g-A+2*U)/(g-A),M-.75-.25*(-g-b+2*U)/(g-b)]);break;case 9:D.push([T-.5-.25*(b+k+-g-A)/(k-b+g-A),M-.5-.25*(A+k+-g-b)/(k-A+g-b)]);break;case 10:D.push([T-.5-.5*(-b-k+-g-A+4*U)/(b-k+g-A),M-.5]);break;case 11:D.push([T-.25-.25*(-g-A+2*U)/(g-A),M-.75-.25*(A+k-2*U)/(k-A)]);break;case 12:D.push([T-.5,M-.5-.5*(-A-k+-g-b+4*U)/(A-k+g-b)]);break;case 13:D.push([T-.75-.25*(b+k-2*U)/(k-b),M-.25-.25*(-g-b+2*U)/(g-b)]);break;case 14:D.push([T-.25-.25*(-b-k+2*U)/(b-k),M-.25-.25*(-A-k+2*U)/(A-k)]);break;case 15:D.push([T-.5,M-.5]);break}},cell:function(T,M,k,b,A,g,f,p,x){A?p.push([T,M]):p.push([M,T])}});return function(_,T){var M=[],k=[];return c(_,M,k,T),{positions:M,cells:k}}}};function o(y,m){var E=y.length+"d",c=s[E];if(c)return c(l,y,m)}function u(y,m){for(var E=i(y,m),c=E.length,_=new Array(c),T=new Array(c),M=0;M<c;++M)_[M]=[E[M]],T[M]=[M];return{positions:_,cells:T}}var d={};function h(y,_){if(y.dimension<=0)return{positions:[],cells:[]};if(y.dimension===1)return u(y,_);var E=y.order.join()+"-"+y.dtype,c=d[E],_=+_||0;return c||(c=d[E]=o(y.order,y.dtype)),c(y,_)}}),3750:(function(t){t.exports=r;function r(a,l){return a[0]*l[0]+a[1]*l[1]+a[2]*l[2]+a[3]*l[3]}}),3778:(function(t,r){r.read=function(a,l,i,s,o){var u,d,h=o*8-s-1,y=(1<<h)-1,m=y>>1,E=-7,c=i?o-1:0,_=i?-1:1,T=a[l+c];for(c+=_,u=T&(1<<-E)-1,T>>=-E,E+=h;E>0;u=u*256+a[l+c],c+=_,E-=8);for(d=u&(1<<-E)-1,u>>=-E,E+=s;E>0;d=d*256+a[l+c],c+=_,E-=8);if(u===0)u=1-m;else{if(u===y)return d?NaN:(T?-1:1)*(1/0);d=d+Math.pow(2,s),u=u-m}return(T?-1:1)*d*Math.pow(2,u-s)},r.write=function(a,l,i,s,o,u){var d,h,y,m=u*8-o-1,E=(1<<m)-1,c=E>>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,T=s?0:u-1,M=s?1:-1,k=l<0||l===0&&1/l<0?1:0;for(l=Math.abs(l),isNaN(l)||l===1/0?(h=isNaN(l)?1:0,d=E):(d=Math.floor(Math.log(l)/Math.LN2),l*(y=Math.pow(2,-d))<1&&(d--,y*=2),d+c>=1?l+=_/y:l+=_*Math.pow(2,1-c),l*y>=2&&(d++,y/=2),d+c>=E?(h=0,d=E):d+c>=1?(h=(l*y-1)*Math.pow(2,o),d=d+c):(h=l*Math.pow(2,c-1)*Math.pow(2,o),d=0));o>=8;a[i+T]=h&255,T+=M,h/=256,o-=8);for(d=d<<o|h,m+=o;m>0;a[i+T]=d&255,T+=M,d/=256,m-=8);a[i+T-M]|=k*128}}),3788:(function(t,r,a){var l=a(8507),i=a(2419);t.exports=s;function s(o,u){return l(o,u)||i(o)-i(u)}}),3837:(function(t,r,a){t.exports=D;var l=a(4935),i=a(501),s=a(5304),o=a(6429),u=a(6444),d=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),h=ArrayBuffer,y=DataView;function m(B){return h.isView(B)&&!(B instanceof y)}function E(B){return Array.isArray(B)||m(B)}function c(B,U){return B[0]=U[0],B[1]=U[1],B[2]=U[2],B}function _(B){this.gl=B,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=s(B)}var T=_.prototype;T.update=function(B){B=B||{};function U(ee,pe,oe){if(oe in B){var Y=B[oe],ce=this[oe],ue;(ee?E(Y)&&E(Y[0]):E(Y))?this[oe]=ue=[pe(Y[0]),pe(Y[1]),pe(Y[2])]:this[oe]=ue=[pe(Y),pe(Y),pe(Y)];for(var _e=0;_e<3;++_e)if(ue[_e]!==ce[_e])return!0}return!1}var V=U.bind(this,!1,Number),q=U.bind(this,!1,Boolean),z=U.bind(this,!1,String),H=U.bind(this,!0,function(ee){if(E(ee)){if(ee.length===3)return[+ee[0],+ee[1],+ee[2],1];if(ee.length===4)return[+ee[0],+ee[1],+ee[2],+ee[3]]}return[0,0,0,1]}),G,J=!1,le=!1;if("bounds"in B)for(var ye=B.bounds,de=0;de<2;++de)for(var me=0;me<3;++me)ye[de][me]!==this.bounds[de][me]&&(le=!0),this.bounds[de][me]=ye[de][me];if("ticks"in B){G=B.ticks,J=!0,this.autoTicks=!1;for(var de=0;de<3;++de)this.tickSpacing[de]=0}else V("tickSpacing")&&(this.autoTicks=!0,le=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),le=!0,J=!0,this._firstInit=!1),le&&this.autoTicks&&(G=u.create(this.bounds,this.tickSpacing),J=!0),J){for(var de=0;de<3;++de)G[de].sort(function(pe,oe){return pe.x-oe.x});u.equal(G,this.ticks)?J=!1:this.ticks=G}q("tickEnable"),z("tickFont")&&(J=!0),z("tickFontStyle")&&(J=!0),z("tickFontWeight")&&(J=!0),z("tickFontVariant")&&(J=!0),V("tickSize"),V("tickAngle"),V("tickPad"),H("tickColor");var W=z("labels");z("labelFont")&&(W=!0),z("labelFontStyle")&&(W=!0),z("labelFontWeight")&&(W=!0),z("labelFontVariant")&&(W=!0),q("labelEnable"),V("labelSize"),V("labelPad"),H("labelColor"),q("lineEnable"),q("lineMirror"),V("lineWidth"),H("lineColor"),q("lineTickEnable"),q("lineTickMirror"),V("lineTickLength"),V("lineTickWidth"),H("lineTickColor"),q("gridEnable"),V("gridWidth"),H("gridColor"),q("zeroEnable"),H("zeroLineColor"),V("zeroLineWidth"),q("backgroundEnable"),H("backgroundColor");var ie=[{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]}],se=[{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&&(W||J)&&this._text.update(this.bounds,this.labels,ie,this.ticks,se):this._text=l(this.gl,this.bounds,this.labels,ie,this.ticks,se),this._lines&&J&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var k=[new M,new M,new M];function b(B,U,V,q,z){for(var H=B.primalOffset,G=B.primalMinor,J=B.mirrorOffset,le=B.mirrorMinor,ye=q[U],de=0;de<3;++de)if(U!==de){var me=H,W=J,ie=G,se=le;ye&1<<de&&(me=J,W=H,ie=le,se=G),me[de]=V[0][de],W[de]=V[1][de],z[de]>0?(ie[de]=-1,se[de]=0):(ie[de]=0,se[de]=1)}}var A=[0,0,0],g={model:d,view:d,projection:d,_ortho:!1};T.isOpaque=function(){return!0},T.isTransparent=function(){return!1},T.drawTransparent=function(B){};var f=0,p=[0,0,0],x=[0,0,0],N=[0,0,0];T.draw=function(B){B=B||g;for(var oe=this.gl,U=B.model||d,V=B.view||d,q=B.projection||d,z=this.bounds,H=B._ortho||!1,G=o(U,V,q,z,H),J=G.cubeEdges,le=G.axis,ye=V[12],de=V[13],me=V[14],W=V[15],ie=H?2:1,se=ie*this.pixelRatio*(q[3]*ye+q[7]*de+q[11]*me+q[15]*W)/oe.drawingBufferHeight,ee=0;ee<3;++ee)this.lastCubeProps.cubeEdges[ee]=J[ee],this.lastCubeProps.axis[ee]=le[ee];for(var pe=k,ee=0;ee<3;++ee)b(k[ee],ee,this.bounds,J,le);for(var oe=this.gl,Y=A,ee=0;ee<3;++ee)this.backgroundEnable[ee]?Y[ee]=le[ee]:Y[ee]=0;this._background.draw(U,V,q,z,Y,this.backgroundColor),this._lines.bind(U,V,q,this);for(var ee=0;ee<3;++ee){var ce=[0,0,0];le[ee]>0?ce[ee]=z[1][ee]:ce[ee]=z[0][ee];for(var ue=0;ue<2;++ue){var _e=(ee+1+ue)%3,Le=(ee+1+(ue^1))%3;this.gridEnable[_e]&&this._lines.drawGrid(_e,Le,this.bounds,ce,this.gridColor[_e],this.gridWidth[_e]*this.pixelRatio)}for(var ue=0;ue<2;++ue){var _e=(ee+1+ue)%3,Le=(ee+1+(ue^1))%3;this.zeroEnable[Le]&&Math.min(z[0][Le],z[1][Le])<=0&&Math.max(z[0][Le],z[1][Le])>=0&&this._lines.drawZero(_e,Le,this.bounds,ce,this.zeroLineColor[Le],this.zeroLineWidth[Le]*this.pixelRatio)}}for(var ee=0;ee<3;++ee){this.lineEnable[ee]&&this._lines.drawAxisLine(ee,this.bounds,pe[ee].primalOffset,this.lineColor[ee],this.lineWidth[ee]*this.pixelRatio),this.lineMirror[ee]&&this._lines.drawAxisLine(ee,this.bounds,pe[ee].mirrorOffset,this.lineColor[ee],this.lineWidth[ee]*this.pixelRatio);for(var ze=c(p,pe[ee].primalMinor),Ge=c(x,pe[ee].mirrorMinor),Ve=this.lineTickLength,ue=0;ue<3;++ue){var rt=se/U[5*ue];ze[ue]*=Ve[ue]*rt,Ge[ue]*=Ve[ue]*rt}this.lineTickEnable[ee]&&this._lines.drawAxisTicks(ee,pe[ee].primalOffset,ze,this.lineTickColor[ee],this.lineTickWidth[ee]*this.pixelRatio),this.lineTickMirror[ee]&&this._lines.drawAxisTicks(ee,pe[ee].mirrorOffset,Ge,this.lineTickColor[ee],this.lineTickWidth[ee]*this.pixelRatio)}this._lines.unbind(),this._text.bind(U,V,q,this.pixelRatio);var pt,gt=.5,ht,lt;function Fe(ft){lt=[0,0,0],lt[ft]=1}function Pe(ft,Wt,Zt){var cr=(ft+1)%3,pr=(ft+2)%3,Br=Wt[cr],Fr=Wt[pr],cn=Zt[cr],Nr=Zt[pr];if(Br>0&&Nr>0){Fe(cr);return}else if(Br>0&&Nr<0){Fe(cr);return}else if(Br<0&&Nr>0){Fe(cr);return}else if(Br<0&&Nr<0){Fe(cr);return}else if(Fr>0&&cn>0){Fe(pr);return}else if(Fr>0&&cn<0){Fe(pr);return}else if(Fr<0&&cn>0){Fe(pr);return}else if(Fr<0&&cn<0){Fe(pr);return}}for(var ee=0;ee<3;++ee){for(var be=pe[ee].primalMinor,Ye=pe[ee].mirrorMinor,mt=c(N,pe[ee].primalOffset),ue=0;ue<3;++ue)this.lineTickEnable[ee]&&(mt[ue]+=se*be[ue]*Math.max(this.lineTickLength[ue],0)/U[5*ue]);var bt=[0,0,0];if(bt[ee]=1,this.tickEnable[ee]){this.tickAngle[ee]===-3600?(this.tickAngle[ee]=0,this.tickAlign[ee]="auto"):this.tickAlign[ee]=-1,ht=1,pt=[this.tickAlign[ee],gt,ht],pt[0]==="auto"?pt[0]=f:pt[0]=parseInt(""+pt[0]),lt=[0,0,0],Pe(ee,be,Ye);for(var ue=0;ue<3;++ue)mt[ue]+=se*be[ue]*this.tickPad[ue]/U[5*ue];this._text.drawTicks(ee,this.tickSize[ee],this.tickAngle[ee],mt,this.tickColor[ee],bt,lt,pt)}if(this.labelEnable[ee]){ht=0,lt=[0,0,0],this.labels[ee].length>4&&(Fe(ee),ht=1),pt=[this.labelAlign[ee],gt,ht],pt[0]==="auto"?pt[0]=f:pt[0]=parseInt(""+pt[0]);for(var ue=0;ue<3;++ue)mt[ue]+=se*be[ue]*this.labelPad[ue]/U[5*ue];mt[ee]+=.5*(z[0][ee]+z[1][ee]),this._text.drawLabel(ee,this.labelSize[ee],this.labelAngle[ee],mt,this.labelColor[ee],[0,0,0],lt,pt)}}this._text.unbind()},T.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function D(B,U){var V=new _(B);return V.update(U),V}}),3840:(function(t){t.exports=k;var r=0,a=1;function l(b,A,g,f,p,x){this._color=b,this.key=A,this.value=g,this.left=f,this.right=p,this._count=x}function i(b){return new l(b._color,b.key,b.value,b.left,b.right,b._count)}function s(b,A){return new l(b,A.key,A.value,A.left,A.right,A._count)}function o(b){b._count=1+(b.left?b.left._count:0)+(b.right?b.right._count:0)}function u(b,A){this._compare=b,this.root=A}var d=u.prototype;Object.defineProperty(d,"keys",{get:function(){var b=[];return this.forEach(function(A,g){b.push(A)}),b}}),Object.defineProperty(d,"values",{get:function(){var b=[];return this.forEach(function(A,g){b.push(g)}),b}}),Object.defineProperty(d,"length",{get:function(){return this.root?this.root._count:0}}),d.insert=function(b,A){for(var g=this._compare,f=this.root,p=[],x=[];f;){var N=g(b,f.key);p.push(f),x.push(N),N<=0?f=f.left:f=f.right}p.push(new l(r,b,A,null,null,1));for(var D=p.length-2;D>=0;--D){var f=p[D];x[D]<=0?p[D]=new l(f._color,f.key,f.value,p[D+1],f.right,f._count+1):p[D]=new l(f._color,f.key,f.value,f.left,p[D+1],f._count+1)}for(var D=p.length-1;D>1;--D){var B=p[D-1],f=p[D];if(B._color===a||f._color===a)break;var U=p[D-2];if(U.left===B)if(B.left===f){var V=U.right;if(V&&V._color===r)B._color=a,U.right=s(a,V),U._color=r,D-=1;else{if(U._color=r,U.left=B.right,B._color=a,B.right=U,p[D-2]=B,p[D-1]=f,o(U),o(B),D>=3){var q=p[D-3];q.left===U?q.left=B:q.right=B}break}}else{var V=U.right;if(V&&V._color===r)B._color=a,U.right=s(a,V),U._color=r,D-=1;else{if(B.right=f.left,U._color=r,U.left=f.right,f._color=a,f.left=B,f.right=U,p[D-2]=f,p[D-1]=B,o(U),o(B),o(f),D>=3){var q=p[D-3];q.left===U?q.left=f:q.right=f}break}}else if(B.right===f){var V=U.left;if(V&&V._color===r)B._color=a,U.left=s(a,V),U._color=r,D-=1;else{if(U._color=r,U.right=B.left,B._color=a,B.left=U,p[D-2]=B,p[D-1]=f,o(U),o(B),D>=3){var q=p[D-3];q.right===U?q.right=B:q.left=B}break}}else{var V=U.left;if(V&&V._color===r)B._color=a,U.left=s(a,V),U._color=r,D-=1;else{if(B.left=f.right,U._color=r,U.right=f.left,f._color=a,f.right=B,f.left=U,p[D-2]=f,p[D-1]=B,o(U),o(B),o(f),D>=3){var q=p[D-3];q.right===U?q.right=f:q.left=f}break}}}return p[0]._color=a,new u(g,p[0])};function h(b,A){if(A.left){var g=h(b,A.left);if(g)return g}var g=b(A.key,A.value);if(g)return g;if(A.right)return h(b,A.right)}function y(b,A,g,f){var p=A(b,f.key);if(p<=0){if(f.left){var x=y(b,A,g,f.left);if(x)return x}var x=g(f.key,f.value);if(x)return x}if(f.right)return y(b,A,g,f.right)}function m(b,A,g,f,p){var x=g(b,p.key),N=g(A,p.key),D;if(x<=0&&(p.left&&(D=m(b,A,g,f,p.left),D)||N>0&&(D=f(p.key,p.value),D)))return D;if(N>0&&p.right)return m(b,A,g,f,p.right)}d.forEach=function(A,g,f){if(this.root)switch(arguments.length){case 1:return h(A,this.root);case 2:return y(g,this._compare,A,this.root);case 3:return this._compare(g,f)>=0?void 0:m(g,f,this._compare,A,this.root)}},Object.defineProperty(d,"begin",{get:function(){for(var b=[],A=this.root;A;)b.push(A),A=A.left;return new E(this,b)}}),Object.defineProperty(d,"end",{get:function(){for(var b=[],A=this.root;A;)b.push(A),A=A.right;return new E(this,b)}}),d.at=function(b){if(b<0)return new E(this,[]);for(var A=this.root,g=[];;){if(g.push(A),A.left){if(b<A.left._count){A=A.left;continue}b-=A.left._count}if(!b)return new E(this,g);if(b-=1,A.right){if(b>=A.right._count)break;A=A.right}else break}return new E(this,[])},d.ge=function(b){for(var A=this._compare,g=this.root,f=[],p=0;g;){var x=A(b,g.key);f.push(g),x<=0&&(p=f.length),x<=0?g=g.left:g=g.right}return f.length=p,new E(this,f)},d.gt=function(b){for(var A=this._compare,g=this.root,f=[],p=0;g;){var x=A(b,g.key);f.push(g),x<0&&(p=f.length),x<0?g=g.left:g=g.right}return f.length=p,new E(this,f)},d.lt=function(b){for(var A=this._compare,g=this.root,f=[],p=0;g;){var x=A(b,g.key);f.push(g),x>0&&(p=f.length),x<=0?g=g.left:g=g.right}return f.length=p,new E(this,f)},d.le=function(b){for(var A=this._compare,g=this.root,f=[],p=0;g;){var x=A(b,g.key);f.push(g),x>=0&&(p=f.length),x<0?g=g.left:g=g.right}return f.length=p,new E(this,f)},d.find=function(b){for(var A=this._compare,g=this.root,f=[];g;){var p=A(b,g.key);if(f.push(g),p===0)return new E(this,f);p<=0?g=g.left:g=g.right}return new E(this,[])},d.remove=function(b){var A=this.find(b);return A?A.remove():this},d.get=function(b){for(var A=this._compare,g=this.root;g;){var f=A(b,g.key);if(f===0)return g.value;f<=0?g=g.left:g=g.right}};function E(b,A){this.tree=b,this._stack=A}var c=E.prototype;Object.defineProperty(c,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(c,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),c.clone=function(){return new E(this.tree,this._stack.slice())};function _(b,A){b.key=A.key,b.value=A.value,b.left=A.left,b.right=A.right,b._color=A._color,b._count=A._count}function T(b){for(var A,g,f,p,x=b.length-1;x>=0;--x){if(A=b[x],x===0){A._color=a;return}if(g=b[x-1],g.left===A){if(f=g.right,f.right&&f.right._color===r){if(f=g.right=i(f),p=f.right=i(f.right),g.right=f.left,f.left=g,f.right=p,f._color=g._color,A._color=a,g._color=a,p._color=a,o(g),o(f),x>1){var N=b[x-2];N.left===g?N.left=f:N.right=f}b[x-1]=f;return}else if(f.left&&f.left._color===r){if(f=g.right=i(f),p=f.left=i(f.left),g.right=p.left,f.left=p.right,p.left=g,p.right=f,p._color=g._color,g._color=a,f._color=a,A._color=a,o(g),o(f),o(p),x>1){var N=b[x-2];N.left===g?N.left=p:N.right=p}b[x-1]=p;return}if(f._color===a)if(g._color===r){g._color=a,g.right=s(r,f);return}else{g.right=s(r,f);continue}else{if(f=i(f),g.right=f.left,f.left=g,f._color=g._color,g._color=r,o(g),o(f),x>1){var N=b[x-2];N.left===g?N.left=f:N.right=f}b[x-1]=f,b[x]=g,x+1<b.length?b[x+1]=A:b.push(A),x=x+2}}else{if(f=g.left,f.left&&f.left._color===r){if(f=g.left=i(f),p=f.left=i(f.left),g.left=f.right,f.right=g,f.left=p,f._color=g._color,A._color=a,g._color=a,p._color=a,o(g),o(f),x>1){var N=b[x-2];N.right===g?N.right=f:N.left=f}b[x-1]=f;return}else if(f.right&&f.right._color===r){if(f=g.left=i(f),p=f.right=i(f.right),g.left=p.right,f.right=p.left,p.right=g,p.left=f,p._color=g._color,g._color=a,f._color=a,A._color=a,o(g),o(f),o(p),x>1){var N=b[x-2];N.right===g?N.right=p:N.left=p}b[x-1]=p;return}if(f._color===a)if(g._color===r){g._color=a,g.left=s(r,f);return}else{g.left=s(r,f);continue}else{if(f=i(f),g.left=f.right,f.right=g,f._color=g._color,g._color=r,o(g),o(f),x>1){var N=b[x-2];N.right===g?N.right=f:N.left=f}b[x-1]=f,b[x]=g,x+1<b.length?b[x+1]=A:b.push(A),x=x+2}}}}c.remove=function(){var b=this._stack;if(b.length===0)return this.tree;var A=new Array(b.length),g=b[b.length-1];A[A.length-1]=new l(g._color,g.key,g.value,g.left,g.right,g._count);for(var f=b.length-2;f>=0;--f){var g=b[f];g.left===b[f+1]?A[f]=new l(g._color,g.key,g.value,A[f+1],g.right,g._count):A[f]=new l(g._color,g.key,g.value,g.left,A[f+1],g._count)}if(g=A[A.length-1],g.left&&g.right){var p=A.length;for(g=g.left;g.right;)A.push(g),g=g.right;var x=A[p-1];A.push(new l(g._color,x.key,x.value,g.left,g.right,g._count)),A[p-1].key=g.key,A[p-1].value=g.value;for(var f=A.length-2;f>=p;--f)g=A[f],A[f]=new l(g._color,g.key,g.value,g.left,A[f+1],g._count);A[p-1].left=A[p]}if(g=A[A.length-1],g._color===r){var N=A[A.length-2];N.left===g?N.left=null:N.right===g&&(N.right=null),A.pop();for(var f=0;f<A.length;++f)A[f]._count--;return new u(this.tree._compare,A[0])}else if(g.left||g.right){g.left?_(g,g.left):g.right&&_(g,g.right),g._color=a;for(var f=0;f<A.length-1;++f)A[f]._count--;return new u(this.tree._compare,A[0])}else{if(A.length===1)return new u(this.tree._compare,null);for(var f=0;f<A.length;++f)A[f]._count--;var D=A[A.length-2];T(A),D.left===g?D.left=null:D.right=null}return new u(this.tree._compare,A[0])},Object.defineProperty(c,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(c,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(c,"index",{get:function(){var b=0,A=this._stack;if(A.length===0){var g=this.tree.root;return g?g._count:0}else A[A.length-1].left&&(b=A[A.length-1].left._count);for(var f=A.length-2;f>=0;--f)A[f+1]===A[f].right&&(++b,A[f].left&&(b+=A[f].left._count));return b},enumerable:!0}),c.next=function(){var b=this._stack;if(b.length!==0){var A=b[b.length-1];if(A.right)for(A=A.right;A;)b.push(A),A=A.left;else for(b.pop();b.length>0&&b[b.length-1].right===A;)A=b[b.length-1],b.pop()}},Object.defineProperty(c,"hasNext",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].right)return!0;for(var A=b.length-1;A>0;--A)if(b[A-1].left===b[A])return!0;return!1}}),c.update=function(b){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var g=new Array(A.length),f=A[A.length-1];g[g.length-1]=new l(f._color,f.key,b,f.left,f.right,f._count);for(var p=A.length-2;p>=0;--p)f=A[p],f.left===A[p+1]?g[p]=new l(f._color,f.key,f.value,g[p+1],f.right,f._count):g[p]=new l(f._color,f.key,f.value,f.left,g[p+1],f._count);return new u(this.tree._compare,g[0])},c.prev=function(){var b=this._stack;if(b.length!==0){var A=b[b.length-1];if(A.left)for(A=A.left;A;)b.push(A),A=A.right;else for(b.pop();b.length>0&&b[b.length-1].left===A;)A=b[b.length-1],b.pop()}},Object.defineProperty(c,"hasPrev",{get:function(){var b=this._stack;if(b.length===0)return!1;if(b[b.length-1].left)return!0;for(var A=b.length-1;A>0;--A)if(b[A-1].right===b[A])return!0;return!1}});function M(b,A){return b<A?-1:b>A?1:0}function k(b){return new u(b||M,null)}}),3865:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]).add(o[0].mul(s[1])),s[1].mul(o[1]))}}),3952:(function(t,r,a){t.exports=s;var l=a(3250);function i(o,u){for(var d=new Array(u+1),h=0;h<o.length;++h)d[h]=o[h];for(var h=0;h<=o.length;++h){for(var y=o.length;y<=u;++y){for(var m=new Array(u),E=0;E<u;++E)m[E]=Math.pow(y+1-h,E);d[y]=m}var c=l.apply(void 0,d);if(c)return!0}return!1}function s(o){var u=o.length;if(u===0)return[];if(u===1)return[0];for(var d=o[0].length,h=[o[0]],y=[0],m=1;m<u;++m){if(h.push(o[m]),!i(h,d)){h.pop();continue}if(y.push(m),y.length===d+1)return y}return y}}),3990:(function(t){t.exports=r;function r(a,l){return a[0]=l[0],a[1]=l[1],a[2]=l[2],a}}),4008:(function(t,r,a){t.exports=a(6690)}),4025:(function(t,r,a){var l=a(2361),i=a(8828).countTrailingZeros;t.exports=s;function s(o){var u=i(l.lo(o));if(u<32)return u;var d=i(l.hi(o));return d>20?52:d+32}}),4040:(function(t){t.exports=r;function r(a,l,i,s,o,u,d){var h=1/(l-i),y=1/(s-o),m=1/(u-d);return a[0]=-2*h,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*y,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*m,a[11]=0,a[12]=(l+i)*h,a[13]=(o+s)*y,a[14]=(d+u)*m,a[15]=1,a}}),4041:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],y=i[2],m=i[3],E=m*s+h*u-y*o,c=m*o+y*s-d*u,_=m*u+d*o-h*s,T=-d*s-h*o-y*u;return a[0]=E*m+T*-d+c*-y-_*-h,a[1]=c*m+T*-h+_*-d-E*-y,a[2]=_*m+T*-y+E*-h-c*-d,a[3]=l[3],a}}),4081:(function(t){t.exports=r;function r(a,l,i,s,o,u,d,h,y,m){var E=l+u+m;if(c>0){var c=Math.sqrt(E+1);a[0]=.5*(d-y)/c,a[1]=.5*(h-s)/c,a[2]=.5*(i-u)/c,a[3]=.5*c}else{var _=Math.max(l,u,m),c=Math.sqrt(2*_-E+1);l>=_?(a[0]=.5*c,a[1]=.5*(o+i)/c,a[2]=.5*(h+s)/c,a[3]=.5*(d-y)/c):u>=_?(a[0]=.5*(i+o)/c,a[1]=.5*c,a[2]=.5*(y+d)/c,a[3]=.5*(h-s)/c):(a[0]=.5*(s+h)/c,a[1]=.5*(d+y)/c,a[2]=.5*c,a[3]=.5*(i-o)/c)}return a}}),4100:(function(t,r,a){var l=a(4437),i=a(3837),s=a(5445),o=a(4449),u=a(3589),d=a(2260),h=a(7169),y=a(351),m=a(4772),E=a(4040),c=a(799),_=a(9216)({tablet:!0,featureDetect:!0});t.exports={createScene:A,createCamera:l};function T(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function M(f,p){var x=null;try{x=f.getContext("webgl",p),x||(x=f.getContext("experimental-webgl",p))}catch{return null}return x}function k(f){var p=Math.round(Math.log(Math.abs(f))/Math.log(10));if(p<0){var x=Math.round(Math.pow(10,-p));return Math.ceil(f*x)/x}else if(p>0){var x=Math.round(Math.pow(10,p));return Math.ceil(f/x)*x}return Math.ceil(f)}function b(f){return typeof f=="boolean"?f:!0}function A(f){f=f||{},f.camera=f.camera||{};var p=f.canvas;if(!p)if(p=document.createElement("canvas"),f.container){var x=f.container;x.appendChild(p)}else document.body.appendChild(p);var N=f.gl;if(N||(f.glOptions&&(_=!!f.glOptions.preserveDrawingBuffer),N=M(p,f.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:_})),!N)throw new Error("webgl not supported");var D=f.bounds||[[-10,-10,-10],[10,10,10]],B=new T,U=d(N,N.drawingBufferWidth,N.drawingBufferHeight,{preferFloat:!_}),V=c(N),q=f.cameraObject&&f.cameraObject._ortho===!0||f.camera.projection&&f.camera.projection.type==="orthographic"||!1,z={eye:f.camera.eye||[2,0,0],center:f.camera.center||[0,0,0],up:f.camera.up||[0,1,0],zoomMin:f.camera.zoomMax||.1,zoomMax:f.camera.zoomMin||100,mode:f.camera.mode||"turntable",_ortho:q},H=f.axes||{},G=i(N,H);G.enable=!H.disable;var J=f.spikes||{},le=o(N,J),ye=[],de=[],me=[],W=[],ie=!0,oe=!0,se=new Array(16),ee=new Array(16),pe={view:null,projection:se,model:ee,_ortho:!1},oe=!0,Y=[N.drawingBufferWidth,N.drawingBufferHeight],ce=f.cameraObject||l(p,z),ue={gl:N,contextLost:!1,pixelRatio:f.pixelRatio||1,canvas:p,selection:B,camera:ce,axes:G,axesPixels:null,spikes:le,bounds:D,objects:ye,shape:Y,aspect:f.aspectRatio||[1,1,1],pickRadius:f.pickRadius||10,zNear:f.zNear||.01,zFar:f.zFar||1e3,fovy:f.fovy||Math.PI/4,clearColor:f.clearColor||[0,0,0,0],autoResize:b(f.autoResize),autoBounds:b(f.autoBounds),autoScale:!!f.autoScale,autoCenter:b(f.autoCenter),clipToBounds:b(f.clipToBounds),snapToData:!!f.snapToData,onselect:f.onselect||null,onrender:f.onrender||null,onclick:f.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(lt){this.aspect[0]=lt.x,this.aspect[1]=lt.y,this.aspect[2]=lt.z,oe=!0},setBounds:function(lt,Fe){this.bounds[0][lt]=Fe.min,this.bounds[1][lt]=Fe.max},setClearColor:function(lt){this.clearColor=lt},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)}},_e=[N.drawingBufferWidth/ue.pixelRatio|0,N.drawingBufferHeight/ue.pixelRatio|0];function Le(){if(!ue._stopped&&ue.autoResize){var lt=p.parentNode,Fe=1,Pe=1;lt&&lt!==document.body?(Fe=lt.clientWidth,Pe=lt.clientHeight):(Fe=window.innerWidth,Pe=window.innerHeight);var be=Math.ceil(Fe*ue.pixelRatio)|0,Ye=Math.ceil(Pe*ue.pixelRatio)|0;if(be!==p.width||Ye!==p.height){p.width=be,p.height=Ye;var mt=p.style;mt.position=mt.position||"absolute",mt.left="0px",mt.top="0px",mt.width=Fe+"px",mt.height=Pe+"px",ie=!0}}}ue.autoResize&&Le(),window.addEventListener("resize",Le);function ze(){for(var lt=ye.length,Fe=W.length,Pe=0;Pe<Fe;++Pe)me[Pe]=0;e:for(var Pe=0;Pe<lt;++Pe){var be=ye[Pe],Ye=be.pickSlots;if(!Ye){de[Pe]=-1;continue}for(var mt=0;mt<Fe;++mt)if(me[mt]+Ye<255){de[Pe]=mt,be.setPickBase(me[mt]+1),me[mt]+=Ye;continue e}var bt=u(N,Y);de[Pe]=Fe,W.push(bt),me.push(Ye),be.setPickBase(1),Fe+=1}for(;Fe>0&&me[Fe-1]===0;)me.pop(),W.pop().dispose()}ue.update=function(lt){ue._stopped||(ie=!0,oe=!0)},ue.add=function(lt){ue._stopped||(lt.axes=G,ye.push(lt),de.push(-1),ie=!0,oe=!0,ze())},ue.remove=function(lt){if(!ue._stopped){var Fe=ye.indexOf(lt);Fe<0||(ye.splice(Fe,1),de.pop(),ie=!0,oe=!0,ze())}},ue.dispose=function(){if(!ue._stopped&&(ue._stopped=!0,window.removeEventListener("resize",Le),p.removeEventListener("webglcontextlost",Ge),ue.mouseListener.enabled=!1,!ue.contextLost)){G.dispose(),le.dispose();for(var lt=0;lt<ye.length;++lt)ye[lt].dispose();U.dispose();for(var lt=0;lt<W.length;++lt)W[lt].dispose();V.dispose(),N=null,G=null,le=null,ye=[]}},ue._mouseRotating=!1,ue._prevButtons=0,ue.enableMouseListeners=function(){ue.mouseListener=y(p,function(lt,Fe,Pe){if(!ue._stopped){var be=W.length,Ye=ye.length,mt=B.object;B.distance=1/0,B.mouse[0]=Fe,B.mouse[1]=Pe,B.object=null,B.screen=null,B.dataCoordinate=B.dataPosition=null;var bt=!1;if(lt&&ue._prevButtons)ue._mouseRotating=!0;else{ue._mouseRotating&&(oe=!0),ue._mouseRotating=!1;for(var ft=0;ft<be;++ft){var Wt=W[ft].query(Fe,_e[1]-Pe-1,ue.pickRadius);if(Wt){if(Wt.distance>B.distance)continue;for(var Zt=0;Zt<Ye;++Zt){var cr=ye[Zt];if(de[Zt]===ft){var pr=cr.pick(Wt);pr&&(B.buttons=lt,B.screen=Wt.coord,B.distance=Wt.distance,B.object=cr,B.index=pr.distance,B.dataPosition=pr.position,B.dataCoordinate=pr.dataCoordinate,B.data=pr,bt=!0)}}}}}mt&&mt!==B.object&&(mt.highlight&&mt.highlight(null),ie=!0),B.object&&(B.object.highlight&&B.object.highlight(B.data),ie=!0),bt=bt||B.object!==mt,bt&&ue.onselect&&ue.onselect(B),lt&1&&!(ue._prevButtons&1)&&ue.onclick&&ue.onclick(B),ue._prevButtons=lt}})};function Ge(){if(ue.contextLost)return!0;N.isContextLost()&&(ue.contextLost=!0,ue.mouseListener.enabled=!1,ue.selection.object=null,ue.oncontextloss&&ue.oncontextloss())}p.addEventListener("webglcontextlost",Ge);function Ve(){if(!Ge()){N.colorMask(!0,!0,!0,!0),N.depthMask(!0),N.disable(N.BLEND),N.enable(N.DEPTH_TEST),N.depthFunc(N.LEQUAL);for(var lt=ye.length,Fe=W.length,Pe=0;Pe<Fe;++Pe){var be=W[Pe];be.shape=_e,be.begin();for(var Ye=0;Ye<lt;++Ye)if(de[Ye]===Pe){var mt=ye[Ye];mt.drawPick&&(mt.pixelRatio=1,mt.drawPick(pe))}be.end()}}}var rt=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],pt=[rt[0].slice(),rt[1].slice()];function gt(){if(!Ge()){Le();var lt=ue.camera.tick();pe.view=ue.camera.matrix,ie=ie||lt,oe=oe||lt,G.pixelRatio=ue.pixelRatio,le.pixelRatio=ue.pixelRatio;var Fe=ye.length,Pe=rt[0],be=rt[1];Pe[0]=Pe[1]=Pe[2]=1/0,be[0]=be[1]=be[2]=-1/0;for(var Ye=0;Ye<Fe;++Ye){var mt=ye[Ye];mt.pixelRatio=ue.pixelRatio,mt.axes=ue.axes,ie=ie||!!mt.dirty,oe=oe||!!mt.dirty;var bt=mt.bounds;if(bt)for(var ft=bt[0],Wt=bt[1],Zt=0;Zt<3;++Zt)Pe[Zt]=Math.min(Pe[Zt],ft[Zt]),be[Zt]=Math.max(be[Zt],Wt[Zt])}var cr=ue.bounds;if(ue.autoBounds)for(var Zt=0;Zt<3;++Zt){if(be[Zt]<Pe[Zt])Pe[Zt]=-1,be[Zt]=1;else{Pe[Zt]===be[Zt]&&(Pe[Zt]-=1,be[Zt]+=1);var pr=.05*(be[Zt]-Pe[Zt]);Pe[Zt]=Pe[Zt]-pr,be[Zt]=be[Zt]+pr}cr[0][Zt]=Pe[Zt],cr[1][Zt]=be[Zt]}for(var Br=!1,Zt=0;Zt<3;++Zt)Br=Br||pt[0][Zt]!==cr[0][Zt]||pt[1][Zt]!==cr[1][Zt],pt[0][Zt]=cr[0][Zt],pt[1][Zt]=cr[1][Zt];if(oe=oe||Br,ie=ie||Br,!!ie){if(Br){for(var Fr=[0,0,0],Ye=0;Ye<3;++Ye)Fr[Ye]=k((cr[1][Ye]-cr[0][Ye])/10);G.autoTicks?G.update({bounds:cr,tickSpacing:Fr}):G.update({bounds:cr})}var cn=N.drawingBufferWidth,Nr=N.drawingBufferHeight;Y[0]=cn,Y[1]=Nr,_e[0]=Math.max(cn/ue.pixelRatio,1)|0,_e[1]=Math.max(Nr/ue.pixelRatio,1)|0,g(ue,q);for(var Ye=0;Ye<Fe;++Ye){var mt=ye[Ye];mt.axesBounds=cr,ue.clipToBounds&&(mt.clipBounds=cr)}B.object&&(ue.snapToData?le.position=B.dataCoordinate:le.position=B.dataPosition,le.bounds=cr),oe&&(oe=!1,Ve()),ue.axesPixels=s(ue.axes,pe,cn,Nr),ue.onrender&&ue.onrender(),N.bindFramebuffer(N.FRAMEBUFFER,null),N.viewport(0,0,cn,Nr),ue.clearRGBA(),N.depthMask(!0),N.colorMask(!0,!0,!0,!0),N.enable(N.DEPTH_TEST),N.depthFunc(N.LEQUAL),N.disable(N.BLEND),N.disable(N.CULL_FACE);var Jr=!1;G.enable&&(Jr=Jr||G.isTransparent(),G.draw(pe)),le.axes=G,B.object&&le.draw(pe),N.disable(N.CULL_FACE);for(var Ye=0;Ye<Fe;++Ye){var mt=ye[Ye];mt.axes=G,mt.pixelRatio=ue.pixelRatio,mt.isOpaque&&mt.isOpaque()&&mt.draw(pe),mt.isTransparent&&mt.isTransparent()&&(Jr=!0)}if(Jr){U.shape=Y,U.bind(),N.clear(N.DEPTH_BUFFER_BIT),N.colorMask(!1,!1,!1,!1),N.depthMask(!0),N.depthFunc(N.LESS),G.enable&&G.isTransparent()&&G.drawTransparent(pe);for(var Ye=0;Ye<Fe;++Ye){var mt=ye[Ye];mt.isOpaque&&mt.isOpaque()&&mt.draw(pe)}N.enable(N.BLEND),N.blendEquation(N.FUNC_ADD),N.blendFunc(N.ONE,N.ONE_MINUS_SRC_ALPHA),N.colorMask(!0,!0,!0,!0),N.depthMask(!1),N.clearColor(0,0,0,0),N.clear(N.COLOR_BUFFER_BIT),G.isTransparent()&&G.drawTransparent(pe);for(var Ye=0;Ye<Fe;++Ye){var mt=ye[Ye];mt.isTransparent&&mt.isTransparent()&&mt.drawTransparent(pe)}N.bindFramebuffer(N.FRAMEBUFFER,null),N.blendFunc(N.ONE,N.ONE_MINUS_SRC_ALPHA),N.disable(N.DEPTH_TEST),V.bind(),U.color[0].bind(0),V.uniforms.accumBuffer=0,h(N),N.disable(N.BLEND)}ie=!1;for(var Ye=0;Ye<Fe;++Ye)ye[Ye].dirty=!1}}}function ht(){ue._stopped||ue.contextLost||(gt(),requestAnimationFrame(ht))}return ue.enableMouseListeners(),ht(),ue.redraw=function(){ue._stopped||(ie=!0,gt())},ue}function g(f,p){var x=f.bounds,N=f.cameraParams,D=N.projection,B=N.model,U=f.gl.drawingBufferWidth,V=f.gl.drawingBufferHeight,q=f.zNear,z=f.zFar,H=f.fovy,G=U/V;p?(E(D,-G,G,-1,1,q,z),N._ortho=!0):(m(D,H,G,q,z),N._ortho=!1);for(var J=0;J<16;++J)B[J]=0;B[15]=1;for(var le=0,J=0;J<3;++J)le=Math.max(le,x[1][J]-x[0][J]);for(var J=0;J<3;++J)f.autoScale?B[5*J]=f.aspect[J]/(x[1][J]-x[0][J]):B[5*J]=1/le,f.autoCenter&&(B[12+J]=-B[5*J]*.5*(x[0][J]+x[1][J]))}}),4192:(function(t){t.exports=a;var r=32;function a(m,E){E<=4*r?l(0,E-1,m):y(0,E-1,m)}function l(m,E,c){for(var _=2*(m+1),T=m+1;T<=E;++T){for(var M=c[_++],k=c[_++],b=T,A=_-2;b-- >m;){var g=c[A-2],f=c[A-1];if(g<M)break;if(g===M&&f<k)break;c[A]=g,c[A+1]=f,A-=2}c[A]=M,c[A+1]=k}}function i(m,E,c){m*=2,E*=2;var _=c[m],T=c[m+1];c[m]=c[E],c[m+1]=c[E+1],c[E]=_,c[E+1]=T}function s(m,E,c){m*=2,E*=2,c[m]=c[E],c[m+1]=c[E+1]}function o(m,E,c,_){m*=2,E*=2,c*=2;var T=_[m],M=_[m+1];_[m]=_[E],_[m+1]=_[E+1],_[E]=_[c],_[E+1]=_[c+1],_[c]=T,_[c+1]=M}function u(m,E,c,_,T){m*=2,E*=2,T[m]=T[E],T[E]=c,T[m+1]=T[E+1],T[E+1]=_}function d(m,E,c){m*=2,E*=2;var _=c[m],T=c[E];return _<T?!1:_===T?c[m+1]>c[E+1]:!0}function h(m,E,c,_){m*=2;var T=_[m];return T<E?!0:T===E?_[m+1]<c:!1}function y(m,E,c){var _=(E-m+1)/6|0,T=m+_,M=E-_,k=m+E>>1,b=k-_,A=k+_,g=T,f=b,p=k,x=A,N=M,D=m+1,B=E-1,U=0;d(g,f,c)&&(U=g,g=f,f=U),d(x,N,c)&&(U=x,x=N,N=U),d(g,p,c)&&(U=g,g=p,p=U),d(f,p,c)&&(U=f,f=p,p=U),d(g,x,c)&&(U=g,g=x,x=U),d(p,x,c)&&(U=p,p=x,x=U),d(f,N,c)&&(U=f,f=N,N=U),d(f,p,c)&&(U=f,f=p,p=U),d(x,N,c)&&(U=x,x=N,N=U);for(var V=c[2*f],q=c[2*f+1],z=c[2*x],H=c[2*x+1],G=2*g,J=2*p,le=2*N,ye=2*T,de=2*k,me=2*M,W=0;W<2;++W){var ie=c[G+W],se=c[J+W],ee=c[le+W];c[ye+W]=ie,c[de+W]=se,c[me+W]=ee}s(b,m,c),s(A,E,c);for(var pe=D;pe<=B;++pe)if(h(pe,V,q,c))pe!==D&&i(pe,D,c),++D;else if(!h(pe,z,H,c))for(;;)if(h(B,z,H,c)){h(B,V,q,c)?(o(pe,D,B,c),++D,--B):(i(pe,B,c),--B);break}else{if(--B<pe)break;continue}u(m,D-1,V,q,c),u(E,B+1,z,H,c),D-2-m<=r?l(m,D-2,c):y(m,D-2,c),E-(B+2)<=r?l(B+2,E,c):y(B+2,E,c),B-D<=r?l(D,B,c):y(D,B,c)}}),4209:(function(t,r,a){t.exports=c;var l=a(2478),i=a(3840),s=a(3250),o=a(1303);function u(_,T,M){this.slabs=_,this.coordinates=T,this.horizontal=M}var d=u.prototype;function h(_,T){return _.y-T}function y(_,T){for(var M=null;_;){var k=_.key,b,A;k[0][0]<k[1][0]?(b=k[0],A=k[1]):(b=k[1],A=k[0]);var g=s(b,A,T);if(g<0)_=_.left;else if(g>0)if(T[0]!==k[1][0])M=_,_=_.right;else{var f=y(_.right,T);if(f)return f;_=_.left}else{if(T[0]!==k[1][0])return _;var f=y(_.right,T);if(f)return f;_=_.left}}return M}d.castUp=function(_){var T=l.le(this.coordinates,_[0]);if(T<0)return-1;this.slabs[T];var M=y(this.slabs[T],_),k=-1;if(M&&(k=M.value),this.coordinates[T]===_[0]){var b=null;if(M&&(b=M.key),T>0){var A=y(this.slabs[T-1],_);A&&(b?o(A.key,b)>0&&(b=A.key,k=A.value):(k=A.value,b=A.key))}var g=this.horizontal[T];if(g.length>0){var f=l.ge(g,_[1],h);if(f<g.length){var p=g[f];if(_[1]===p.y){if(p.closed)return p.index;for(;f<g.length-1&&g[f+1].y===_[1];)if(f=f+1,p=g[f],p.closed)return p.index;if(p.y===_[1]&&!p.start){if(f=f+1,f>=g.length)return k;p=g[f]}}if(p.start)if(b){var x=s(b[0],b[1],[_[0],p.y]);b[0][0]>b[1][0]&&(x=-x),x>0&&(k=p.index)}else k=p.index;else p.y!==_[1]&&(k=p.index)}}}return k};function m(_,T,M,k){this.y=_,this.index=T,this.start=M,this.closed=k}function E(_,T,M,k){this.x=_,this.segment=T,this.create=M,this.index=k}function c(_){for(var T=_.length,M=2*T,k=new Array(M),b=0;b<T;++b){var A=_[b],g=A[0][0]<A[1][0];k[2*b]=new E(A[0][0],A,g,b),k[2*b+1]=new E(A[1][0],A,!g,b)}k.sort(function(V,q){var z=V.x-q.x;return z||(z=V.create-q.create,z)?z:Math.min(V.segment[0][1],V.segment[1][1])-Math.min(q.segment[0][1],q.segment[1][1])});for(var f=i(o),p=[],x=[],N=[],b=0;b<M;){for(var D=k[b].x,B=[];b<M;){var U=k[b];if(U.x!==D)break;b+=1,U.segment[0][0]===U.x&&U.segment[1][0]===U.x?U.create&&(U.segment[0][1]<U.segment[1][1]?(B.push(new m(U.segment[0][1],U.index,!0,!0)),B.push(new m(U.segment[1][1],U.index,!1,!1))):(B.push(new m(U.segment[1][1],U.index,!0,!1)),B.push(new m(U.segment[0][1],U.index,!1,!0)))):U.create?f=f.insert(U.segment,U.index):f=f.remove(U.segment)}p.push(f.root),x.push(D),N.push(B)}return new u(p,x,N)}}),4317:(function(t){function r(o,u){var d=Math.floor(u),h=u-d,y=0<=d&&d<o.shape[0],m=0<=d+1&&d+1<o.shape[0],E=y?+o.get(d):0,c=m?+o.get(d+1):0;return(1-h)*E+h*c}function a(o,u,d){var h=Math.floor(u),y=u-h,m=0<=h&&h<o.shape[0],E=0<=h+1&&h+1<o.shape[0],c=Math.floor(d),_=d-c,T=0<=c&&c<o.shape[1],M=0<=c+1&&c+1<o.shape[1],k=m&&T?o.get(h,c):0,b=m&&M?o.get(h,c+1):0,A=E&&T?o.get(h+1,c):0,g=E&&M?o.get(h+1,c+1):0;return(1-_)*((1-y)*k+y*A)+_*((1-y)*b+y*g)}function l(o,u,d,h){var y=Math.floor(u),m=u-y,E=0<=y&&y<o.shape[0],c=0<=y+1&&y+1<o.shape[0],_=Math.floor(d),T=d-_,M=0<=_&&_<o.shape[1],k=0<=_+1&&_+1<o.shape[1],b=Math.floor(h),A=h-b,g=0<=b&&b<o.shape[2],f=0<=b+1&&b+1<o.shape[2],p=E&&M&&g?o.get(y,_,b):0,x=E&&k&&g?o.get(y,_+1,b):0,N=c&&M&&g?o.get(y+1,_,b):0,D=c&&k&&g?o.get(y+1,_+1,b):0,B=E&&M&&f?o.get(y,_,b+1):0,U=E&&k&&f?o.get(y,_+1,b+1):0,V=c&&M&&f?o.get(y+1,_,b+1):0,q=c&&k&&f?o.get(y+1,_+1,b+1):0;return(1-A)*((1-T)*((1-m)*p+m*N)+T*((1-m)*x+m*D))+A*((1-T)*((1-m)*B+m*V)+T*((1-m)*U+m*q))}function i(o){var u=o.shape.length|0,d=new Array(u),h=new Array(u),y=new Array(u),m=new Array(u),E,c;for(E=0;E<u;++E)c=+arguments[E+1],d[E]=Math.floor(c),h[E]=c-d[E],y[E]=0<=d[E]&&d[E]<o.shape[E],m[E]=0<=d[E]+1&&d[E]+1<o.shape[E];var _=0,T,M,k;e:for(E=0;E<1<<u;++E){for(M=1,k=o.offset,T=0;T<u;++T)if(E&1<<T){if(!m[T])continue e;M*=h[T],k+=o.stride[T]*(d[T]+1)}else{if(!y[T])continue e;M*=1-h[T],k+=o.stride[T]*d[T]}_+=M*o.data[k]}return _}function s(o,u,d,h){switch(o.shape.length){case 0:return 0;case 1:return r(o,u);case 2:return a(o,u,d);case 3:return l(o,u,d,h);default:return i.apply(void 0,arguments)}}t.exports=s,t.exports.d1=r,t.exports.d2=a,t.exports.d3=l}),4335:(function(t){t.exports=function(a,l){var i=l[15];if(i===0)return!1;for(var s=1/i,o=0;o<16;o++)a[o]=l[o]*s;return!0}}),4359:(function(t,r,a){t.exports=o;var l=a(7718),i=null,s=null;typeof document<"u"&&(i=document.createElement("canvas"),i.width=8192,i.height=1024,s=i.getContext("2d"));function o(u,d){return(typeof d!="object"||d===null)&&(d={}),l(u,d.canvas||i,d.context||s,d)}}),4361:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]+i[0],a[1]=l[1]+i[1],a[2]=l[2]+i[2],a[3]=l[3]+i[3],a}}),4437:(function(t,r,a){t.exports=h;var l=a(3025),i=a(6296),s=a(351),o=a(8512),u=a(24),d=a(7520);function h(y,m){y=y||document.body,m=m||{};var E=[.01,1/0];"distanceLimits"in m&&(E[0]=m.distanceLimits[0],E[1]=m.distanceLimits[1]),"zoomMin"in m&&(E[0]=m.zoomMin),"zoomMax"in m&&(E[1]=m.zoomMax);var c=i({center:m.center||[0,0,0],up:m.up||[0,1,0],eye:m.eye||[0,0,10],mode:m.mode||"orbit",distanceLimits:E}),_=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0,M=y.clientWidth,k=y.clientHeight,b={keyBindingMode:"rotate",enableWheel:!0,view:c,element:y,delay:m.delay||16,rotateSpeed:m.rotateSpeed||1,zoomSpeed:m.zoomSpeed||1,translateSpeed:m.translateSpeed||1,flipX:!!m.flipX,flipY:!!m.flipY,modes:c.modes,_ortho:m._ortho||m.projection&&m.projection.type==="orthographic"||!1,tick:function(){var A=l(),g=this.delay,f=A-2*g;c.idle(A-g),c.recalcMatrix(f),c.flush(A-(100+g*2));for(var p=!0,x=c.computedMatrix,N=0;N<16;++N)p=p&&_[N]===x[N],_[N]=x[N];var D=y.clientWidth===M&&y.clientHeight===k;return M=y.clientWidth,k=y.clientHeight,p?!D:(T=Math.exp(c.computedRadius[0]),!0)},lookAt:function(A,g,f){c.lookAt(c.lastT(),A,g,f)},rotate:function(A,g,f){c.rotate(c.lastT(),A,g,f)},pan:function(A,g,f){c.pan(c.lastT(),A,g,f)},translate:function(A,g,f){c.translate(c.lastT(),A,g,f)}};return Object.defineProperties(b,{matrix:{get:function(){return c.computedMatrix},set:function(A){return c.setMatrix(c.lastT(),A),c.computedMatrix},enumerable:!0},mode:{get:function(){return c.getMode()},set:function(A){var g=c.computedUp.slice(),f=c.computedEye.slice(),p=c.computedCenter.slice();if(c.setMode(A),A==="turntable"){var x=l();c._active.lookAt(x,f,p,g),c._active.lookAt(x+500,f,p,[0,0,1]),c._active.flush(x)}return c.getMode()},enumerable:!0},center:{get:function(){return c.computedCenter},set:function(A){return c.lookAt(c.lastT(),null,A),c.computedCenter},enumerable:!0},eye:{get:function(){return c.computedEye},set:function(A){return c.lookAt(c.lastT(),A),c.computedEye},enumerable:!0},up:{get:function(){return c.computedUp},set:function(A){return c.lookAt(c.lastT(),null,null,A),c.computedUp},enumerable:!0},distance:{get:function(){return T},set:function(A){return c.setDistance(c.lastT(),A),A},enumerable:!0},distanceLimits:{get:function(){return c.getDistanceLimits(E)},set:function(A){return c.setDistanceLimits(A),A},enumerable:!0}}),y.addEventListener("contextmenu",function(A){return A.preventDefault(),!1}),b._lastX=-1,b._lastY=-1,b._lastMods={shift:!1,control:!1,alt:!1,meta:!1},b.enableMouseListeners=function(){b.mouseListener=s(y,A),y.addEventListener("touchstart",function(g){var f=u(g.changedTouches[0],y);A(0,f[0],f[1],b._lastMods),A(1,f[0],f[1],b._lastMods)},d?{passive:!0}:!1),y.addEventListener("touchmove",function(g){var f=u(g.changedTouches[0],y);A(1,f[0],f[1],b._lastMods),g.preventDefault()},d?{passive:!1}:!1),y.addEventListener("touchend",function(g){A(0,b._lastX,b._lastY,b._lastMods)},d?{passive:!0}:!1);function A(g,f,p,x){var N=b.keyBindingMode;if(N!==!1){var D=N==="rotate",B=N==="pan",U=N==="zoom",V=!!x.control,q=!!x.alt,z=!!x.shift,H=!!(g&1),G=!!(g&2),J=!!(g&4),le=1/y.clientHeight,ye=le*(f-b._lastX),de=le*(p-b._lastY),me=b.flipX?1:-1,W=b.flipY?1:-1,ie=Math.PI*b.rotateSpeed,se=l();if(b._lastX!==-1&&b._lastY!==-1&&((D&&H&&!V&&!q&&!z||H&&!V&&!q&&z)&&c.rotate(se,me*ie*ye,-W*ie*de,0),(B&&H&&!V&&!q&&!z||G||H&&V&&!q&&!z)&&c.pan(se,-b.translateSpeed*ye*T,b.translateSpeed*de*T,0),U&&H&&!V&&!q&&!z||J||H&&!V&&q&&!z)){var ee=-b.zoomSpeed*de/window.innerHeight*(se-c.lastT())*100;c.pan(se,0,0,T*(Math.exp(ee)-1))}return b._lastX=f,b._lastY=p,b._lastMods=x,!0}}b.wheelListener=o(y,function(g,f){if(b.keyBindingMode!==!1&&b.enableWheel){var p=b.flipX?1:-1,x=b.flipY?1:-1,N=l();if(Math.abs(g)>Math.abs(f))c.rotate(N,0,0,-g*p*Math.PI*b.rotateSpeed/window.innerWidth);else if(!b._ortho){var D=-b.zoomSpeed*x*f/window.innerHeight*(N-c.lastT())/20;c.pan(N,0,0,T*(Math.exp(D)-1))}}},!0)},b.enableMouseListeners(),b}}),4449:(function(t,r,a){var l=a(2762),i=a(8116),s=a(1493);t.exports=E;var o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(c,_,T,M){this.gl=c,this.buffer=_,this.vao=T,this.shader=M,this.pixelRatio=1,this.bounds=[[-1e3,-1e3,-1e3],[1e3,1e3,1e3]],this.position=[0,0,0],this.lineWidth=[2,2,2],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.enabled=[!0,!0,!0],this.drawSides=[!0,!0,!0],this.axes=null}var d=u.prototype,h=[0,0,0],y=[0,0,0],m=[0,0];d.isTransparent=function(){return!1},d.drawTransparent=function(c){},d.draw=function(c){var _=this.gl,T=this.vao,M=this.shader;T.bind(),M.bind();var k=c.model||o,b=c.view||o,A=c.projection||o,g;this.axes&&(g=this.axes.lastCubeProps.axis);for(var f=h,p=y,x=0;x<3;++x)g&&g[x]<0?(f[x]=this.bounds[0][x],p[x]=this.bounds[1][x]):(f[x]=this.bounds[1][x],p[x]=this.bounds[0][x]);m[0]=_.drawingBufferWidth,m[1]=_.drawingBufferHeight,M.uniforms.model=k,M.uniforms.view=b,M.uniforms.projection=A,M.uniforms.coordinates=[this.position,f,p],M.uniforms.colors=this.colors,M.uniforms.screenShape=m;for(var x=0;x<3;++x)M.uniforms.lineWidth=this.lineWidth[x]*this.pixelRatio,this.enabled[x]&&(T.draw(_.TRIANGLES,6,6*x),this.drawSides[x]&&T.draw(_.TRIANGLES,12,18+12*x));T.unbind()},d.update=function(c){c&&("bounds"in c&&(this.bounds=c.bounds),"position"in c&&(this.position=c.position),"lineWidth"in c&&(this.lineWidth=c.lineWidth),"colors"in c&&(this.colors=c.colors),"enabled"in c&&(this.enabled=c.enabled),"drawSides"in c&&(this.drawSides=c.drawSides))},d.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function E(c,_){var T=[];function M(f,p,x,N,D,B){var U=[f,p,x,0,0,0,1];U[N+3]=1,U[N]=D,T.push.apply(T,U),U[6]=-1,T.push.apply(T,U),U[N]=B,T.push.apply(T,U),T.push.apply(T,U),U[6]=1,T.push.apply(T,U),U[N]=D,T.push.apply(T,U)}M(0,0,0,0,0,1),M(0,0,0,1,0,1),M(0,0,0,2,0,1),M(1,0,0,1,-1,1),M(1,0,0,2,-1,1),M(0,1,0,0,-1,1),M(0,1,0,2,-1,1),M(0,0,1,0,-1,1),M(0,0,1,1,-1,1);var k=l(c,T),b=i(c,[{type:c.FLOAT,buffer:k,size:3,offset:0,stride:28},{type:c.FLOAT,buffer:k,size:3,offset:12,stride:28},{type:c.FLOAT,buffer:k,size:1,offset:24,stride:28}]),A=s(c);A.attributes.position.location=0,A.attributes.color.location=1,A.attributes.weight.location=2;var g=new u(c,k,b,A);return g.update(_),g}}),4494:(function(t){t.exports=r;function r(a,l){return a[0]=1/l[0],a[1]=1/l[1],a[2]=1/l[2],a[3]=1/l[3],a}}),4505:(function(t,r,a){t.exports=a(5847)}),4578:(function(t){t.exports=r;function r(a,l,i,s,o){return a[0]=l,a[1]=i,a[2]=s,a[3]=o,a}}),4623:(function(t){"use restrict";t.exports=r;function r(a){this.roots=new Array(a),this.ranks=new Array(a);for(var l=0;l<a;++l)this.roots[l]=l,this.ranks[l]=0}r.prototype.length=function(){return this.roots.length},r.prototype.makeSet=function(){var a=this.roots.length;return this.roots.push(a),this.ranks.push(0),a},r.prototype.find=function(a){for(var l=this.roots;l[a]!==a;){var i=l[a];l[a]=l[i],a=i}return a},r.prototype.link=function(a,l){var i=this.find(a),s=this.find(l);if(i!==s){var o=this.ranks,u=this.roots,d=o[i],h=o[s];d<h?u[i]=s:h<d?u[s]=i:(u[s]=i,++o[i])}}}),4687:(function(t,r){function a(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var u=o.which;if(u===2)return 4;if(u===3)return 2;if(u>0)return 1<<u-1}else if("button"in o){var u=o.button;if(u===1)return 4;if(u===2)return 2;if(u>=0)return 1<<u}}return 0}r.buttons=a;function l(o){return o.target||o.srcElement||window}r.element=l;function i(o){if(typeof o=="object"){if("offsetX"in o)return o.offsetX;var u=l(o),d=u.getBoundingClientRect();return o.clientX-d.left}return 0}r.x=i;function s(o){if(typeof o=="object"){if("offsetY"in o)return o.offsetY;var u=l(o),d=u.getBoundingClientRect();return o.clientY-d.top}return 0}r.y=s}),4691:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2],u=l[3]-a[3];return Math.sqrt(i*i+s*s+o*o+u*u)}}),4750:(function(t,r,a){t.exports=i;var l=a(3090);function i(s){var o=l(s),u=o.length;if(u<=2)return[];for(var d=new Array(u),h=o[u-1],y=0;y<u;++y){var m=o[y];d[y]=[h,m],h=m}return d}}),4769:(function(t){function r(l,i,s,o,u,d){var h=6*u*u-6*u,y=3*u*u-4*u+1,m=-6*u*u+6*u,E=3*u*u-2*u;if(l.length){d||(d=new Array(l.length));for(var c=l.length-1;c>=0;--c)d[c]=h*l[c]+y*i[c]+m*s[c]+E*o[c];return d}return h*l+y*i+m*s[c]+E*o}function a(l,i,s,o,u,d){var h=u-1,y=u*u,m=h*h,E=(1+2*u)*m,c=u*m,_=y*(3-2*u),T=y*h;if(l.length){d||(d=new Array(l.length));for(var M=l.length-1;M>=0;--M)d[M]=E*l[M]+c*i[M]+_*s[M]+T*o[M];return d}return E*l+c*i+_*s+T*o}t.exports=a,t.exports.derivative=r}),4772:(function(t){t.exports=r;function r(a,l,i,s,o){var u=1/Math.tan(l/2),d=1/(s-o);return a[0]=u/i,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=u,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=(o+s)*d,a[11]=-1,a[12]=0,a[13]=0,a[14]=2*o*s*d,a[15]=0,a}}),4793:(function(t,r,a){function l(Ee,Ae){if(!(Ee instanceof Ae))throw new TypeError("Cannot call a class as a function")}function i(Ee,Ae){for(var Ie=0;Ie<Ae.length;Ie++){var tt=Ae[Ie];tt.enumerable=tt.enumerable||!1,tt.configurable=!0,"value"in tt&&(tt.writable=!0),Object.defineProperty(Ee,o(tt.key),tt)}}function s(Ee,Ae,Ie){return Ae&&i(Ee.prototype,Ae),Object.defineProperty(Ee,"prototype",{writable:!1}),Ee}function o(Ee){var Ae=u(Ee,"string");return T(Ae)=="symbol"?Ae:Ae+""}function u(Ee,Ae){if(T(Ee)!="object"||!Ee)return Ee;var Ie=Ee[Symbol.toPrimitive];if(Ie!==void 0){var tt=Ie.call(Ee,Ae);if(T(tt)!="object")return tt;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ee)}function d(Ee,Ae,Ie){return Ae=E(Ae),h(Ee,m()?Reflect.construct(Ae,[],E(Ee).constructor):Ae.apply(Ee,Ie))}function h(Ee,Ae){if(Ae&&(T(Ae)=="object"||typeof Ae=="function"))return Ae;if(Ae!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(Ee)}function y(Ee){if(Ee===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ee}function m(){try{var Ee=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(m=function(){return!!Ee})()}function E(Ee){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ae){return Ae.__proto__||Object.getPrototypeOf(Ae)},E(Ee)}function c(Ee,Ae){if(typeof Ae!="function"&&Ae!==null)throw new TypeError("Super expression must either be null or a function");Ee.prototype=Object.create(Ae&&Ae.prototype,{constructor:{value:Ee,writable:!0,configurable:!0}}),Object.defineProperty(Ee,"prototype",{writable:!1}),Ae&&_(Ee,Ae)}function _(Ee,Ae){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Ie,tt){return Ie.__proto__=tt,Ie},_(Ee,Ae)}function T(Ee){"@babel/helpers - typeof";return T=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ae){return typeof Ae}:function(Ae){return Ae&&typeof Symbol=="function"&&Ae.constructor===Symbol&&Ae!==Symbol.prototype?"symbol":typeof Ae},T(Ee)}var M=a(7507),k=a(3778),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.hp=p,r.IS=50;var A=2147483647;p.TYPED_ARRAY_SUPPORT=g(),!p.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function g(){try{var Ee=new Uint8Array(1),Ae={foo:function(){return 42}};return Object.setPrototypeOf(Ae,Uint8Array.prototype),Object.setPrototypeOf(Ee,Ae),Ee.foo()===42}catch{return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function f(Ee){if(Ee>A)throw new RangeError('The value "'+Ee+'" is invalid for option "size"');var Ae=new Uint8Array(Ee);return Object.setPrototypeOf(Ae,p.prototype),Ae}function p(Ee,Ae,Ie){if(typeof Ee=="number"){if(typeof Ae=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return B(Ee)}return x(Ee,Ae,Ie)}p.poolSize=8192;function x(Ee,Ae,Ie){if(typeof Ee=="string")return U(Ee,Ae);if(ArrayBuffer.isView(Ee))return q(Ee);if(Ee==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ee));if(Jr(Ee,ArrayBuffer)||Ee&&Jr(Ee.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Jr(Ee,SharedArrayBuffer)||Ee&&Jr(Ee.buffer,SharedArrayBuffer)))return z(Ee,Ae,Ie);if(typeof Ee=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var tt=Ee.valueOf&&Ee.valueOf();if(tt!=null&&tt!==Ee)return p.from(tt,Ae,Ie);var st=H(Ee);if(st)return st;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Ee[Symbol.toPrimitive]=="function")return p.from(Ee[Symbol.toPrimitive]("string"),Ae,Ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+T(Ee))}p.from=function(Ee,Ae,Ie){return x(Ee,Ae,Ie)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function N(Ee){if(typeof Ee!="number")throw new TypeError('"size" argument must be of type number');if(Ee<0)throw new RangeError('The value "'+Ee+'" is invalid for option "size"')}function D(Ee,Ae,Ie){return N(Ee),Ee<=0?f(Ee):Ae!==void 0?typeof Ie=="string"?f(Ee).fill(Ae,Ie):f(Ee).fill(Ae):f(Ee)}p.alloc=function(Ee,Ae,Ie){return D(Ee,Ae,Ie)};function B(Ee){return N(Ee),f(Ee<0?0:G(Ee)|0)}p.allocUnsafe=function(Ee){return B(Ee)},p.allocUnsafeSlow=function(Ee){return B(Ee)};function U(Ee,Ae){if((typeof Ae!="string"||Ae==="")&&(Ae="utf8"),!p.isEncoding(Ae))throw new TypeError("Unknown encoding: "+Ae);var Ie=J(Ee,Ae)|0,tt=f(Ie),st=tt.write(Ee,Ae);return st!==Ie&&(tt=tt.slice(0,st)),tt}function V(Ee){for(var Ae=Ee.length<0?0:G(Ee.length)|0,Ie=f(Ae),tt=0;tt<Ae;tt+=1)Ie[tt]=Ee[tt]&255;return Ie}function q(Ee){if(Jr(Ee,Uint8Array)){var Ae=new Uint8Array(Ee);return z(Ae.buffer,Ae.byteOffset,Ae.byteLength)}return V(Ee)}function z(Ee,Ae,Ie){if(Ae<0||Ee.byteLength<Ae)throw new RangeError('"offset" is outside of buffer bounds');if(Ee.byteLength<Ae+(Ie||0))throw new RangeError('"length" is outside of buffer bounds');var tt;return Ae===void 0&&Ie===void 0?tt=new Uint8Array(Ee):Ie===void 0?tt=new Uint8Array(Ee,Ae):tt=new Uint8Array(Ee,Ae,Ie),Object.setPrototypeOf(tt,p.prototype),tt}function H(Ee){if(p.isBuffer(Ee)){var Ae=G(Ee.length)|0,Ie=f(Ae);return Ie.length===0||Ee.copy(Ie,0,0,Ae),Ie}if(Ee.length!==void 0)return typeof Ee.length!="number"||Dt(Ee.length)?f(0):V(Ee);if(Ee.type==="Buffer"&&Array.isArray(Ee.data))return V(Ee.data)}function G(Ee){if(Ee>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return Ee|0}p.isBuffer=function(Ae){return Ae!=null&&Ae._isBuffer===!0&&Ae!==p.prototype},p.compare=function(Ae,Ie){if(Jr(Ae,Uint8Array)&&(Ae=p.from(Ae,Ae.offset,Ae.byteLength)),Jr(Ie,Uint8Array)&&(Ie=p.from(Ie,Ie.offset,Ie.byteLength)),!p.isBuffer(Ae)||!p.isBuffer(Ie))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Ae===Ie)return 0;for(var tt=Ae.length,st=Ie.length,Ft=0,Nt=Math.min(tt,st);Ft<Nt;++Ft)if(Ae[Ft]!==Ie[Ft]){tt=Ae[Ft],st=Ie[Ft];break}return tt<st?-1:st<tt?1:0},p.isEncoding=function(Ae){switch(String(Ae).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},p.concat=function(Ae,Ie){if(!Array.isArray(Ae))throw new TypeError('"list" argument must be an Array of Buffers');if(Ae.length===0)return p.alloc(0);var tt;if(Ie===void 0)for(Ie=0,tt=0;tt<Ae.length;++tt)Ie+=Ae[tt].length;var st=p.allocUnsafe(Ie),Ft=0;for(tt=0;tt<Ae.length;++tt){var Nt=Ae[tt];if(Jr(Nt,Uint8Array))Ft+Nt.length>st.length?(p.isBuffer(Nt)||(Nt=p.from(Nt)),Nt.copy(st,Ft)):Uint8Array.prototype.set.call(st,Nt,Ft);else if(p.isBuffer(Nt))Nt.copy(st,Ft);else throw new TypeError('"list" argument must be an Array of Buffers');Ft+=Nt.length}return st};function J(Ee,Ae){if(p.isBuffer(Ee))return Ee.length;if(ArrayBuffer.isView(Ee)||Jr(Ee,ArrayBuffer))return Ee.byteLength;if(typeof Ee!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+T(Ee));var Ie=Ee.length,tt=arguments.length>2&&arguments[2]===!0;if(!tt&&Ie===0)return 0;for(var st=!1;;)switch(Ae){case"ascii":case"latin1":case"binary":return Ie;case"utf8":case"utf-8":return pr(Ee).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ie*2;case"hex":return Ie>>>1;case"base64":return cn(Ee).length;default:if(st)return tt?-1:pr(Ee).length;Ae=(""+Ae).toLowerCase(),st=!0}}p.byteLength=J;function le(Ee,Ae,Ie){var tt=!1;if((Ae===void 0||Ae<0)&&(Ae=0),Ae>this.length||((Ie===void 0||Ie>this.length)&&(Ie=this.length),Ie<=0)||(Ie>>>=0,Ae>>>=0,Ie<=Ae))return"";for(Ee||(Ee="utf8");;)switch(Ee){case"hex":return ze(this,Ae,Ie);case"utf8":case"utf-8":return Y(this,Ae,Ie);case"ascii":return _e(this,Ae,Ie);case"latin1":case"binary":return Le(this,Ae,Ie);case"base64":return oe(this,Ae,Ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ge(this,Ae,Ie);default:if(tt)throw new TypeError("Unknown encoding: "+Ee);Ee=(Ee+"").toLowerCase(),tt=!0}}p.prototype._isBuffer=!0;function ye(Ee,Ae,Ie){var tt=Ee[Ae];Ee[Ae]=Ee[Ie],Ee[Ie]=tt}p.prototype.swap16=function(){var Ae=this.length;if(Ae%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ie=0;Ie<Ae;Ie+=2)ye(this,Ie,Ie+1);return this},p.prototype.swap32=function(){var Ae=this.length;if(Ae%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Ie=0;Ie<Ae;Ie+=4)ye(this,Ie,Ie+3),ye(this,Ie+1,Ie+2);return this},p.prototype.swap64=function(){var Ae=this.length;if(Ae%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Ie=0;Ie<Ae;Ie+=8)ye(this,Ie,Ie+7),ye(this,Ie+1,Ie+6),ye(this,Ie+2,Ie+5),ye(this,Ie+3,Ie+4);return this},p.prototype.toString=function(){var Ae=this.length;return Ae===0?"":arguments.length===0?Y(this,0,Ae):le.apply(this,arguments)},p.prototype.toLocaleString=p.prototype.toString,p.prototype.equals=function(Ae){if(!p.isBuffer(Ae))throw new TypeError("Argument must be a Buffer");return this===Ae?!0:p.compare(this,Ae)===0},p.prototype.inspect=function(){var Ae="",Ie=r.IS;return Ae=this.toString("hex",0,Ie).replace(/(.{2})/g,"$1 ").trim(),this.length>Ie&&(Ae+=" ... "),"<Buffer "+Ae+">"},b&&(p.prototype[b]=p.prototype.inspect),p.prototype.compare=function(Ae,Ie,tt,st,Ft){if(Jr(Ae,Uint8Array)&&(Ae=p.from(Ae,Ae.offset,Ae.byteLength)),!p.isBuffer(Ae))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+T(Ae));if(Ie===void 0&&(Ie=0),tt===void 0&&(tt=Ae?Ae.length:0),st===void 0&&(st=0),Ft===void 0&&(Ft=this.length),Ie<0||tt>Ae.length||st<0||Ft>this.length)throw new RangeError("out of range index");if(st>=Ft&&Ie>=tt)return 0;if(st>=Ft)return-1;if(Ie>=tt)return 1;if(Ie>>>=0,tt>>>=0,st>>>=0,Ft>>>=0,this===Ae)return 0;for(var Nt=Ft-st,Xt=tt-Ie,lr=Math.min(Nt,Xt),Rr=this.slice(st,Ft),Mr=Ae.slice(Ie,tt),Sr=0;Sr<lr;++Sr)if(Rr[Sr]!==Mr[Sr]){Nt=Rr[Sr],Xt=Mr[Sr];break}return Nt<Xt?-1:Xt<Nt?1:0};function de(Ee,Ae,Ie,tt,st){if(Ee.length===0)return-1;if(typeof Ie=="string"?(tt=Ie,Ie=0):Ie>2147483647?Ie=2147483647:Ie<-2147483648&&(Ie=-2147483648),Ie=+Ie,Dt(Ie)&&(Ie=st?0:Ee.length-1),Ie<0&&(Ie=Ee.length+Ie),Ie>=Ee.length){if(st)return-1;Ie=Ee.length-1}else if(Ie<0)if(st)Ie=0;else return-1;if(typeof Ae=="string"&&(Ae=p.from(Ae,tt)),p.isBuffer(Ae))return Ae.length===0?-1:me(Ee,Ae,Ie,tt,st);if(typeof Ae=="number")return Ae=Ae&255,typeof Uint8Array.prototype.indexOf=="function"?st?Uint8Array.prototype.indexOf.call(Ee,Ae,Ie):Uint8Array.prototype.lastIndexOf.call(Ee,Ae,Ie):me(Ee,[Ae],Ie,tt,st);throw new TypeError("val must be string, number or Buffer")}function me(Ee,Ae,Ie,tt,st){var Ft=1,Nt=Ee.length,Xt=Ae.length;if(tt!==void 0&&(tt=String(tt).toLowerCase(),tt==="ucs2"||tt==="ucs-2"||tt==="utf16le"||tt==="utf-16le")){if(Ee.length<2||Ae.length<2)return-1;Ft=2,Nt/=2,Xt/=2,Ie/=2}function lr(qn,ha){return Ft===1?qn[ha]:qn.readUInt16BE(ha*Ft)}var Rr;if(st){var Mr=-1;for(Rr=Ie;Rr<Nt;Rr++)if(lr(Ee,Rr)===lr(Ae,Mr===-1?0:Rr-Mr)){if(Mr===-1&&(Mr=Rr),Rr-Mr+1===Xt)return Mr*Ft}else Mr!==-1&&(Rr-=Rr-Mr),Mr=-1}else for(Ie+Xt>Nt&&(Ie=Nt-Xt),Rr=Ie;Rr>=0;Rr--){for(var Sr=!0,Kr=0;Kr<Xt;Kr++)if(lr(Ee,Rr+Kr)!==lr(Ae,Kr)){Sr=!1;break}if(Sr)return Rr}return-1}p.prototype.includes=function(Ae,Ie,tt){return this.indexOf(Ae,Ie,tt)!==-1},p.prototype.indexOf=function(Ae,Ie,tt){return de(this,Ae,Ie,tt,!0)},p.prototype.lastIndexOf=function(Ae,Ie,tt){return de(this,Ae,Ie,tt,!1)};function W(Ee,Ae,Ie,tt){Ie=Number(Ie)||0;var st=Ee.length-Ie;tt?(tt=Number(tt),tt>st&&(tt=st)):tt=st;var Ft=Ae.length;tt>Ft/2&&(tt=Ft/2);var Nt;for(Nt=0;Nt<tt;++Nt){var Xt=parseInt(Ae.substr(Nt*2,2),16);if(Dt(Xt))return Nt;Ee[Ie+Nt]=Xt}return Nt}function ie(Ee,Ae,Ie,tt){return Nr(pr(Ae,Ee.length-Ie),Ee,Ie,tt)}function se(Ee,Ae,Ie,tt){return Nr(Br(Ae),Ee,Ie,tt)}function ee(Ee,Ae,Ie,tt){return Nr(cn(Ae),Ee,Ie,tt)}function pe(Ee,Ae,Ie,tt){return Nr(Fr(Ae,Ee.length-Ie),Ee,Ie,tt)}p.prototype.write=function(Ae,Ie,tt,st){if(Ie===void 0)st="utf8",tt=this.length,Ie=0;else if(tt===void 0&&typeof Ie=="string")st=Ie,tt=this.length,Ie=0;else if(isFinite(Ie))Ie=Ie>>>0,isFinite(tt)?(tt=tt>>>0,st===void 0&&(st="utf8")):(st=tt,tt=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ft=this.length-Ie;if((tt===void 0||tt>Ft)&&(tt=Ft),Ae.length>0&&(tt<0||Ie<0)||Ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");st||(st="utf8");for(var Nt=!1;;)switch(st){case"hex":return W(this,Ae,Ie,tt);case"utf8":case"utf-8":return ie(this,Ae,Ie,tt);case"ascii":case"latin1":case"binary":return se(this,Ae,Ie,tt);case"base64":return ee(this,Ae,Ie,tt);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,Ae,Ie,tt);default:if(Nt)throw new TypeError("Unknown encoding: "+st);st=(""+st).toLowerCase(),Nt=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(Ee,Ae,Ie){return Ae===0&&Ie===Ee.length?M.fromByteArray(Ee):M.fromByteArray(Ee.slice(Ae,Ie))}function Y(Ee,Ae,Ie){Ie=Math.min(Ee.length,Ie);for(var tt=[],st=Ae;st<Ie;){var Ft=Ee[st],Nt=null,Xt=Ft>239?4:Ft>223?3:Ft>191?2:1;if(st+Xt<=Ie){var lr=void 0,Rr=void 0,Mr=void 0,Sr=void 0;switch(Xt){case 1:Ft<128&&(Nt=Ft);break;case 2:lr=Ee[st+1],(lr&192)===128&&(Sr=(Ft&31)<<6|lr&63,Sr>127&&(Nt=Sr));break;case 3:lr=Ee[st+1],Rr=Ee[st+2],(lr&192)===128&&(Rr&192)===128&&(Sr=(Ft&15)<<12|(lr&63)<<6|Rr&63,Sr>2047&&(Sr<55296||Sr>57343)&&(Nt=Sr));break;case 4:lr=Ee[st+1],Rr=Ee[st+2],Mr=Ee[st+3],(lr&192)===128&&(Rr&192)===128&&(Mr&192)===128&&(Sr=(Ft&15)<<18|(lr&63)<<12|(Rr&63)<<6|Mr&63,Sr>65535&&Sr<1114112&&(Nt=Sr))}}Nt===null?(Nt=65533,Xt=1):Nt>65535&&(Nt-=65536,tt.push(Nt>>>10&1023|55296),Nt=56320|Nt&1023),tt.push(Nt),st+=Xt}return ue(tt)}var ce=4096;function ue(Ee){var Ae=Ee.length;if(Ae<=ce)return String.fromCharCode.apply(String,Ee);for(var Ie="",tt=0;tt<Ae;)Ie+=String.fromCharCode.apply(String,Ee.slice(tt,tt+=ce));return Ie}function _e(Ee,Ae,Ie){var tt="";Ie=Math.min(Ee.length,Ie);for(var st=Ae;st<Ie;++st)tt+=String.fromCharCode(Ee[st]&127);return tt}function Le(Ee,Ae,Ie){var tt="";Ie=Math.min(Ee.length,Ie);for(var st=Ae;st<Ie;++st)tt+=String.fromCharCode(Ee[st]);return tt}function ze(Ee,Ae,Ie){var tt=Ee.length;(!Ae||Ae<0)&&(Ae=0),(!Ie||Ie<0||Ie>tt)&&(Ie=tt);for(var st="",Ft=Ae;Ft<Ie;++Ft)st+=$e[Ee[Ft]];return st}function Ge(Ee,Ae,Ie){for(var tt=Ee.slice(Ae,Ie),st="",Ft=0;Ft<tt.length-1;Ft+=2)st+=String.fromCharCode(tt[Ft]+tt[Ft+1]*256);return st}p.prototype.slice=function(Ae,Ie){var tt=this.length;Ae=~~Ae,Ie=Ie===void 0?tt:~~Ie,Ae<0?(Ae+=tt,Ae<0&&(Ae=0)):Ae>tt&&(Ae=tt),Ie<0?(Ie+=tt,Ie<0&&(Ie=0)):Ie>tt&&(Ie=tt),Ie<Ae&&(Ie=Ae);var st=this.subarray(Ae,Ie);return Object.setPrototypeOf(st,p.prototype),st};function Ve(Ee,Ae,Ie){if(Ee%1!==0||Ee<0)throw new RangeError("offset is not uint");if(Ee+Ae>Ie)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae],Ft=1,Nt=0;++Nt<Ie&&(Ft*=256);)st+=this[Ae+Nt]*Ft;return st},p.prototype.readUintBE=p.prototype.readUIntBE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae+--Ie],Ft=1;Ie>0&&(Ft*=256);)st+=this[Ae+--Ie]*Ft;return st},p.prototype.readUint8=p.prototype.readUInt8=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,1,this.length),this[Ae]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,2,this.length),this[Ae]|this[Ae+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,2,this.length),this[Ae]<<8|this[Ae+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),(this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16)+this[Ae+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]*16777216+(this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3])},p.prototype.readBigUInt64LE=ot(function(Ae){Ae=Ae>>>0,ft(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Wt(Ae,this.length-8);var st=Ie+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,24),Ft=this[++Ae]+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+tt*Math.pow(2,24);return BigInt(st)+(BigInt(Ft)<<BigInt(32))}),p.prototype.readBigUInt64BE=ot(function(Ae){Ae=Ae>>>0,ft(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Wt(Ae,this.length-8);var st=Ie*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+this[++Ae],Ft=this[++Ae]*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+tt;return(BigInt(st)<<BigInt(32))+BigInt(Ft)}),p.prototype.readIntLE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=this[Ae],Ft=1,Nt=0;++Nt<Ie&&(Ft*=256);)st+=this[Ae+Nt]*Ft;return Ft*=128,st>=Ft&&(st-=Math.pow(2,8*Ie)),st},p.prototype.readIntBE=function(Ae,Ie,tt){Ae=Ae>>>0,Ie=Ie>>>0,tt||Ve(Ae,Ie,this.length);for(var st=Ie,Ft=1,Nt=this[Ae+--st];st>0&&(Ft*=256);)Nt+=this[Ae+--st]*Ft;return Ft*=128,Nt>=Ft&&(Nt-=Math.pow(2,8*Ie)),Nt},p.prototype.readInt8=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,1,this.length),this[Ae]&128?(255-this[Ae]+1)*-1:this[Ae]},p.prototype.readInt16LE=function(Ae,Ie){Ae=Ae>>>0,Ie||Ve(Ae,2,this.length);var tt=this[Ae]|this[Ae+1]<<8;return tt&32768?tt|4294901760:tt},p.prototype.readInt16BE=function(Ae,Ie){Ae=Ae>>>0,Ie||Ve(Ae,2,this.length);var tt=this[Ae+1]|this[Ae]<<8;return tt&32768?tt|4294901760:tt},p.prototype.readInt32LE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]|this[Ae+1]<<8|this[Ae+2]<<16|this[Ae+3]<<24},p.prototype.readInt32BE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),this[Ae]<<24|this[Ae+1]<<16|this[Ae+2]<<8|this[Ae+3]},p.prototype.readBigInt64LE=ot(function(Ae){Ae=Ae>>>0,ft(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Wt(Ae,this.length-8);var st=this[Ae+4]+this[Ae+5]*Math.pow(2,8)+this[Ae+6]*Math.pow(2,16)+(tt<<24);return(BigInt(st)<<BigInt(32))+BigInt(Ie+this[++Ae]*Math.pow(2,8)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,24))}),p.prototype.readBigInt64BE=ot(function(Ae){Ae=Ae>>>0,ft(Ae,"offset");var Ie=this[Ae],tt=this[Ae+7];(Ie===void 0||tt===void 0)&&Wt(Ae,this.length-8);var st=(Ie<<24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+this[++Ae];return(BigInt(st)<<BigInt(32))+BigInt(this[++Ae]*Math.pow(2,24)+this[++Ae]*Math.pow(2,16)+this[++Ae]*Math.pow(2,8)+tt)}),p.prototype.readFloatLE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),k.read(this,Ae,!0,23,4)},p.prototype.readFloatBE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,4,this.length),k.read(this,Ae,!1,23,4)},p.prototype.readDoubleLE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,8,this.length),k.read(this,Ae,!0,52,8)},p.prototype.readDoubleBE=function(Ae,Ie){return Ae=Ae>>>0,Ie||Ve(Ae,8,this.length),k.read(this,Ae,!1,52,8)};function rt(Ee,Ae,Ie,tt,st,Ft){if(!p.isBuffer(Ee))throw new TypeError('"buffer" argument must be a Buffer instance');if(Ae>st||Ae<Ft)throw new RangeError('"value" argument is out of bounds');if(Ie+tt>Ee.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,tt=tt>>>0,!st){var Ft=Math.pow(2,8*tt)-1;rt(this,Ae,Ie,tt,Ft,0)}var Nt=1,Xt=0;for(this[Ie]=Ae&255;++Xt<tt&&(Nt*=256);)this[Ie+Xt]=Ae/Nt&255;return Ie+tt},p.prototype.writeUintBE=p.prototype.writeUIntBE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,tt=tt>>>0,!st){var Ft=Math.pow(2,8*tt)-1;rt(this,Ae,Ie,tt,Ft,0)}var Nt=tt-1,Xt=1;for(this[Ie+Nt]=Ae&255;--Nt>=0&&(Xt*=256);)this[Ie+Nt]=Ae/Xt&255;return Ie+tt},p.prototype.writeUint8=p.prototype.writeUInt8=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,1,255,0),this[Ie]=Ae&255,Ie+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,65535,0),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,Ie+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,65535,0),this[Ie]=Ae>>>8,this[Ie+1]=Ae&255,Ie+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,4294967295,0),this[Ie+3]=Ae>>>24,this[Ie+2]=Ae>>>16,this[Ie+1]=Ae>>>8,this[Ie]=Ae&255,Ie+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,4294967295,0),this[Ie]=Ae>>>24,this[Ie+1]=Ae>>>16,this[Ie+2]=Ae>>>8,this[Ie+3]=Ae&255,Ie+4};function pt(Ee,Ae,Ie,tt,st){bt(Ae,tt,st,Ee,Ie,7);var Ft=Number(Ae&BigInt(4294967295));Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft,Ft=Ft>>8,Ee[Ie++]=Ft;var Nt=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ee[Ie++]=Nt,Nt=Nt>>8,Ee[Ie++]=Nt,Nt=Nt>>8,Ee[Ie++]=Nt,Nt=Nt>>8,Ee[Ie++]=Nt,Ie}function gt(Ee,Ae,Ie,tt,st){bt(Ae,tt,st,Ee,Ie,7);var Ft=Number(Ae&BigInt(4294967295));Ee[Ie+7]=Ft,Ft=Ft>>8,Ee[Ie+6]=Ft,Ft=Ft>>8,Ee[Ie+5]=Ft,Ft=Ft>>8,Ee[Ie+4]=Ft;var Nt=Number(Ae>>BigInt(32)&BigInt(4294967295));return Ee[Ie+3]=Nt,Nt=Nt>>8,Ee[Ie+2]=Nt,Nt=Nt>>8,Ee[Ie+1]=Nt,Nt=Nt>>8,Ee[Ie]=Nt,Ie+8}p.prototype.writeBigUInt64LE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return pt(this,Ae,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeBigUInt64BE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return gt(this,Ae,Ie,BigInt(0),BigInt("0xffffffffffffffff"))}),p.prototype.writeIntLE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,!st){var Ft=Math.pow(2,8*tt-1);rt(this,Ae,Ie,tt,Ft-1,-Ft)}var Nt=0,Xt=1,lr=0;for(this[Ie]=Ae&255;++Nt<tt&&(Xt*=256);)Ae<0&&lr===0&&this[Ie+Nt-1]!==0&&(lr=1),this[Ie+Nt]=(Ae/Xt>>0)-lr&255;return Ie+tt},p.prototype.writeIntBE=function(Ae,Ie,tt,st){if(Ae=+Ae,Ie=Ie>>>0,!st){var Ft=Math.pow(2,8*tt-1);rt(this,Ae,Ie,tt,Ft-1,-Ft)}var Nt=tt-1,Xt=1,lr=0;for(this[Ie+Nt]=Ae&255;--Nt>=0&&(Xt*=256);)Ae<0&&lr===0&&this[Ie+Nt+1]!==0&&(lr=1),this[Ie+Nt]=(Ae/Xt>>0)-lr&255;return Ie+tt},p.prototype.writeInt8=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,1,127,-128),Ae<0&&(Ae=255+Ae+1),this[Ie]=Ae&255,Ie+1},p.prototype.writeInt16LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,32767,-32768),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,Ie+2},p.prototype.writeInt16BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,2,32767,-32768),this[Ie]=Ae>>>8,this[Ie+1]=Ae&255,Ie+2},p.prototype.writeInt32LE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,2147483647,-2147483648),this[Ie]=Ae&255,this[Ie+1]=Ae>>>8,this[Ie+2]=Ae>>>16,this[Ie+3]=Ae>>>24,Ie+4},p.prototype.writeInt32BE=function(Ae,Ie,tt){return Ae=+Ae,Ie=Ie>>>0,tt||rt(this,Ae,Ie,4,2147483647,-2147483648),Ae<0&&(Ae=4294967295+Ae+1),this[Ie]=Ae>>>24,this[Ie+1]=Ae>>>16,this[Ie+2]=Ae>>>8,this[Ie+3]=Ae&255,Ie+4},p.prototype.writeBigInt64LE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return pt(this,Ae,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),p.prototype.writeBigInt64BE=ot(function(Ae){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return gt(this,Ae,Ie,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ht(Ee,Ae,Ie,tt,st,Ft){if(Ie+tt>Ee.length)throw new RangeError("Index out of range");if(Ie<0)throw new RangeError("Index out of range")}function lt(Ee,Ae,Ie,tt,st){return Ae=+Ae,Ie=Ie>>>0,st||ht(Ee,Ae,Ie,4),k.write(Ee,Ae,Ie,tt,23,4),Ie+4}p.prototype.writeFloatLE=function(Ae,Ie,tt){return lt(this,Ae,Ie,!0,tt)},p.prototype.writeFloatBE=function(Ae,Ie,tt){return lt(this,Ae,Ie,!1,tt)};function Fe(Ee,Ae,Ie,tt,st){return Ae=+Ae,Ie=Ie>>>0,st||ht(Ee,Ae,Ie,8),k.write(Ee,Ae,Ie,tt,52,8),Ie+8}p.prototype.writeDoubleLE=function(Ae,Ie,tt){return Fe(this,Ae,Ie,!0,tt)},p.prototype.writeDoubleBE=function(Ae,Ie,tt){return Fe(this,Ae,Ie,!1,tt)},p.prototype.copy=function(Ae,Ie,tt,st){if(!p.isBuffer(Ae))throw new TypeError("argument should be a Buffer");if(tt||(tt=0),!st&&st!==0&&(st=this.length),Ie>=Ae.length&&(Ie=Ae.length),Ie||(Ie=0),st>0&&st<tt&&(st=tt),st===tt||Ae.length===0||this.length===0)return 0;if(Ie<0)throw new RangeError("targetStart out of bounds");if(tt<0||tt>=this.length)throw new RangeError("Index out of range");if(st<0)throw new RangeError("sourceEnd out of bounds");st>this.length&&(st=this.length),Ae.length-Ie<st-tt&&(st=Ae.length-Ie+tt);var Ft=st-tt;return this===Ae&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Ie,tt,st):Uint8Array.prototype.set.call(Ae,this.subarray(tt,st),Ie),Ft},p.prototype.fill=function(Ae,Ie,tt,st){if(typeof Ae=="string"){if(typeof Ie=="string"?(st=Ie,Ie=0,tt=this.length):typeof tt=="string"&&(st=tt,tt=this.length),st!==void 0&&typeof st!="string")throw new TypeError("encoding must be a string");if(typeof st=="string"&&!p.isEncoding(st))throw new TypeError("Unknown encoding: "+st);if(Ae.length===1){var Ft=Ae.charCodeAt(0);(st==="utf8"&&Ft<128||st==="latin1")&&(Ae=Ft)}}else typeof Ae=="number"?Ae=Ae&255:typeof Ae=="boolean"&&(Ae=Number(Ae));if(Ie<0||this.length<Ie||this.length<tt)throw new RangeError("Out of range index");if(tt<=Ie)return this;Ie=Ie>>>0,tt=tt===void 0?this.length:tt>>>0,Ae||(Ae=0);var Nt;if(typeof Ae=="number")for(Nt=Ie;Nt<tt;++Nt)this[Nt]=Ae;else{var Xt=p.isBuffer(Ae)?Ae:p.from(Ae,st),lr=Xt.length;if(lr===0)throw new TypeError('The value "'+Ae+'" is invalid for argument "value"');for(Nt=0;Nt<tt-Ie;++Nt)this[Nt+Ie]=Xt[Nt%lr]}return this};var Pe={};function be(Ee,Ae,Ie){Pe[Ee]=(function(tt){function st(){var Ft;return l(this,st),Ft=d(this,st),Object.defineProperty(Ft,"message",{value:Ae.apply(Ft,arguments),writable:!0,configurable:!0}),Ft.name="".concat(Ft.name," [").concat(Ee,"]"),Ft.stack,delete Ft.name,Ft}return c(st,tt),s(st,[{key:"code",get:function(){return Ee},set:function(Nt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Nt,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Ee,"]: ").concat(this.message)}}])})(Ie)}be("ERR_BUFFER_OUT_OF_BOUNDS",function(Ee){return Ee?"".concat(Ee," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),be("ERR_INVALID_ARG_TYPE",function(Ee,Ae){return'The "'.concat(Ee,'" argument must be of type number. Received type ').concat(T(Ae))},TypeError),be("ERR_OUT_OF_RANGE",function(Ee,Ae,Ie){var tt='The value of "'.concat(Ee,'" is out of range.'),st=Ie;return Number.isInteger(Ie)&&Math.abs(Ie)>Math.pow(2,32)?st=Ye(String(Ie)):typeof Ie=="bigint"&&(st=String(Ie),(Ie>Math.pow(BigInt(2),BigInt(32))||Ie<-Math.pow(BigInt(2),BigInt(32)))&&(st=Ye(st)),st+="n"),tt+=" It must be ".concat(Ae,". Received ").concat(st),tt},RangeError);function Ye(Ee){for(var Ae="",Ie=Ee.length,tt=Ee[0]==="-"?1:0;Ie>=tt+4;Ie-=3)Ae="_".concat(Ee.slice(Ie-3,Ie)).concat(Ae);return"".concat(Ee.slice(0,Ie)).concat(Ae)}function mt(Ee,Ae,Ie){ft(Ae,"offset"),(Ee[Ae]===void 0||Ee[Ae+Ie]===void 0)&&Wt(Ae,Ee.length-(Ie+1))}function bt(Ee,Ae,Ie,tt,st,Ft){if(Ee>Ie||Ee<Ae){var Nt=typeof Ae=="bigint"?"n":"",Xt;throw Ae===0||Ae===BigInt(0)?Xt=">= 0".concat(Nt," and < 2").concat(Nt," ** ").concat((Ft+1)*8).concat(Nt):Xt=">= -(2".concat(Nt," ** ").concat((Ft+1)*8-1).concat(Nt,") and < 2 ** ")+"".concat((Ft+1)*8-1).concat(Nt),new Pe.ERR_OUT_OF_RANGE("value",Xt,Ee)}mt(tt,st,Ft)}function ft(Ee,Ae){if(typeof Ee!="number")throw new Pe.ERR_INVALID_ARG_TYPE(Ae,"number",Ee)}function Wt(Ee,Ae,Ie){throw Math.floor(Ee)!==Ee?(ft(Ee,Ie),new Pe.ERR_OUT_OF_RANGE("offset","an integer",Ee)):Ae<0?new Pe.ERR_BUFFER_OUT_OF_BOUNDS:new Pe.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Ae),Ee)}var Zt=/[^+/0-9A-Za-z-_]/g;function cr(Ee){if(Ee=Ee.split("=")[0],Ee=Ee.trim().replace(Zt,""),Ee.length<2)return"";for(;Ee.length%4!==0;)Ee=Ee+"=";return Ee}function pr(Ee,Ae){Ae=Ae||1/0;for(var Ie,tt=Ee.length,st=null,Ft=[],Nt=0;Nt<tt;++Nt){if(Ie=Ee.charCodeAt(Nt),Ie>55295&&Ie<57344){if(!st){if(Ie>56319){(Ae-=3)>-1&&Ft.push(239,191,189);continue}else if(Nt+1===tt){(Ae-=3)>-1&&Ft.push(239,191,189);continue}st=Ie;continue}if(Ie<56320){(Ae-=3)>-1&&Ft.push(239,191,189),st=Ie;continue}Ie=(st-55296<<10|Ie-56320)+65536}else st&&(Ae-=3)>-1&&Ft.push(239,191,189);if(st=null,Ie<128){if((Ae-=1)<0)break;Ft.push(Ie)}else if(Ie<2048){if((Ae-=2)<0)break;Ft.push(Ie>>6|192,Ie&63|128)}else if(Ie<65536){if((Ae-=3)<0)break;Ft.push(Ie>>12|224,Ie>>6&63|128,Ie&63|128)}else if(Ie<1114112){if((Ae-=4)<0)break;Ft.push(Ie>>18|240,Ie>>12&63|128,Ie>>6&63|128,Ie&63|128)}else throw new Error("Invalid code point")}return Ft}function Br(Ee){for(var Ae=[],Ie=0;Ie<Ee.length;++Ie)Ae.push(Ee.charCodeAt(Ie)&255);return Ae}function Fr(Ee,Ae){for(var Ie,tt,st,Ft=[],Nt=0;Nt<Ee.length&&!((Ae-=2)<0);++Nt)Ie=Ee.charCodeAt(Nt),tt=Ie>>8,st=Ie%256,Ft.push(st),Ft.push(tt);return Ft}function cn(Ee){return M.toByteArray(cr(Ee))}function Nr(Ee,Ae,Ie,tt){var st;for(st=0;st<tt&&!(st+Ie>=Ae.length||st>=Ee.length);++st)Ae[st+Ie]=Ee[st];return st}function Jr(Ee,Ae){return Ee instanceof Ae||Ee!=null&&Ee.constructor!=null&&Ee.constructor.name!=null&&Ee.constructor.name===Ae.name}function Dt(Ee){return Ee!==Ee}var $e=(function(){for(var Ee="0123456789abcdef",Ae=new Array(256),Ie=0;Ie<16;++Ie)for(var tt=Ie*16,st=0;st<16;++st)Ae[tt+st]=Ee[Ie]+Ee[st];return Ae})();function ot(Ee){return typeof BigInt>"u"?De:Ee}function De(){throw new Error("BigInt not supported")}}),4844:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l[0]+i[0]*s,a[1]=l[1]+i[1]*s,a[2]=l[2]+i[2]*s,a[3]=l[3]+i[3]*s,a}}),4905:(function(t,r,a){var l=a(5874);t.exports=i;function i(s,o){var u=l(o),d=[];return d=d.concat(u(s)),d=d.concat(u(null)),d}}),4935:(function(t,r,a){t.exports=_;var l=a(2762),i=a(8116),s=a(4359),o=a(1879).Q,u=window||process.global||{},d=u.__TEXT_CACHE||{};u.__TEXT_CACHE={};var h=3;function y(T,M,k,b){this.gl=T,this.shader=M,this.buffer=k,this.vao=b,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var m=y.prototype,E=[0,0];m.bind=function(T,M,k,b){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=T,A.view=M,A.projection=k,A.pixelScale=b,E[0]=this.gl.drawingBufferWidth,E[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=E},m.unbind=function(){this.vao.unbind()},m.update=function(T,M,k,b,A){var g=[];function f(H,G,J,le,ye,de){var me=[J.style,J.weight,J.variant,J.family].join("_"),W=d[me];W||(W=d[me]={});var ie=W[G];ie||(ie=W[G]=c(G,{triangles:!0,font:J.family,fontStyle:J.style,fontWeight:J.weight,fontVariant:J.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ye,styletags:de}));for(var se=(le||12)/12,ee=ie.positions,pe=ie.cells,oe=0,Y=pe.length;oe<Y;++oe)for(var ce=pe[oe],ue=2;ue>=0;--ue){var _e=ee[ce[ue]];g.push(se*_e[0],-se*_e[1],H)}}for(var p=[0,0,0],x=[0,0,0],N=[0,0,0],D=[0,0,0],B=1.25,U={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){N[V]=g.length/h|0,f(.5*(T[0][V]+T[1][V]),M[V],k[V],12,B,U),D[V]=(g.length/h|0)-N[V],p[V]=g.length/h|0;for(var q=0;q<b[V].length;++q)if(b[V][q].text){var z={family:b[V][q].font||A[V].family,style:A[V].fontStyle||A[V].style,weight:A[V].fontWeight||A[V].weight,variant:A[V].fontVariant||A[V].variant};f(b[V][q].x,b[V][q].text,z,b[V][q].fontSize||12,B,U)}x[V]=(g.length/h|0)-p[V]}this.buffer.update(g),this.tickOffset=p,this.tickCount=x,this.labelOffset=N,this.labelCount=D},m.drawTicks=function(T,M,k,b,A,g,f,p){this.tickCount[T]&&(this.shader.uniforms.axis=g,this.shader.uniforms.color=A,this.shader.uniforms.angle=k,this.shader.uniforms.scale=M,this.shader.uniforms.offset=b,this.shader.uniforms.alignDir=f,this.shader.uniforms.alignOpt=p,this.vao.draw(this.gl.TRIANGLES,this.tickCount[T],this.tickOffset[T]))},m.drawLabel=function(T,M,k,b,A,g,f,p){this.labelCount[T]&&(this.shader.uniforms.axis=g,this.shader.uniforms.color=A,this.shader.uniforms.angle=k,this.shader.uniforms.scale=M,this.shader.uniforms.offset=b,this.shader.uniforms.alignDir=f,this.shader.uniforms.alignOpt=p,this.vao.draw(this.gl.TRIANGLES,this.labelCount[T],this.labelOffset[T]))},m.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function c(T,M){try{return s(T,M)}catch(k){return console.warn('error vectorizing text:"'+T+'" error:',k),{cells:[],positions:[]}}}function _(T,M,k,b,A,g){var f=l(T),p=i(T,[{buffer:f,size:3}]),x=o(T);x.attributes.position.location=0;var N=new y(T,x,f,p);return N.update(M,k,b,A,g),N}}),5023:(function(t,r,a){var l=a(2478);t.exports=h;function i(y,m,E,c,_,T,M){this.cells=y,this.neighbor=m,this.flags=c,this.constraint=E,this.active=_,this.next=T,this.boundary=M}var s=i.prototype;function o(y,m){return y[0]-m[0]||y[1]-m[1]||y[2]-m[2]}s.locate=(function(){var y=[0,0,0];return function(m,E,c){var _=m,T=E,M=c;return E<c?E<m&&(_=E,T=c,M=m):c<m&&(_=c,T=m,M=E),_<0?-1:(y[0]=_,y[1]=T,y[2]=M,l.eq(this.cells,y,o))}})();function u(y,m){for(var E=y.cells(),c=E.length,_=0;_<c;++_){var T=E[_],M=T[0],k=T[1],b=T[2];k<b?k<M&&(T[0]=k,T[1]=b,T[2]=M):b<M&&(T[0]=b,T[1]=M,T[2]=k)}E.sort(o);for(var A=new Array(c),_=0;_<A.length;++_)A[_]=0;var g=[],f=[],p=new Array(3*c),x=new Array(3*c),N=null;m&&(N=[]);for(var D=new i(E,p,x,A,g,f,N),_=0;_<c;++_)for(var T=E[_],B=0;B<3;++B){var M=T[B],k=T[(B+1)%3],U=p[3*_+B]=D.locate(k,M,y.opposite(k,M)),V=x[3*_+B]=y.isConstraint(M,k);U<0&&(V?f.push(_):(g.push(_),A[_]=1),m&&N.push([k,M,-1]))}return D}function d(y,m,E){for(var c=0,_=0;_<y.length;++_)m[_]===E&&(y[c++]=y[_]);return y.length=c,y}function h(y,m,E){var c=u(y,E);if(m===0)return E?c.cells.concat(c.boundary):c.cells;for(var _=1,T=c.active,M=c.next,k=c.flags,b=c.cells,A=c.constraint,g=c.neighbor;T.length>0||M.length>0;){for(;T.length>0;){var f=T.pop();if(k[f]!==-_){k[f]=_,b[f];for(var p=0;p<3;++p){var x=g[3*f+p];x>=0&&k[x]===0&&(A[3*f+p]?M.push(x):(T.push(x),k[x]=_))}}}var N=M;M=T,T=N,M.length=0,_=-_}var D=d(b,k,m);return E?D.concat(c.boundary):D}}),5033:(function(t){t.exports=r;function r(a,l,i){var s=l||0,o=i||1;return[[a[12]+a[0],a[13]+a[1],a[14]+a[2],a[15]+a[3]],[a[12]-a[0],a[13]-a[1],a[14]-a[2],a[15]-a[3]],[a[12]+a[4],a[13]+a[5],a[14]+a[6],a[15]+a[7]],[a[12]-a[4],a[13]-a[5],a[14]-a[6],a[15]-a[7]],[s*a[12]+a[8],s*a[13]+a[9],s*a[14]+a[10],s*a[15]+a[11]],[o*a[12]-a[8],o*a[13]-a[9],o*a[14]-a[10],o*a[15]-a[11]]]}}),5085:(function(t,r,a){t.exports=_;var l=a(3250)[3],i=a(4209),s=a(3352),o=a(2478);function u(){return!0}function d(T){return function(M,k){var b=T[M];return b?!!b.queryPoint(k,u):!1}}function h(T){for(var M={},k=0;k<T.length;++k){var b=T[k],A=b[0][0],g=b[0][1],f=b[1][1],p=[Math.min(g,f),Math.max(g,f)];A in M?M[A].push(p):M[A]=[p]}for(var x={},N=Object.keys(M),k=0;k<N.length;++k){var D=M[N[k]];x[N[k]]=s(D)}return d(x)}function y(T,M){return function(k){var b=o.le(M,k[0]);if(b<0)return 1;var A=T[b];if(!A)if(b>0&&M[b]===k[0])A=T[b-1];else return 1;for(var g=1;A;){var f=A.key,p=l(k,f[0],f[1]);if(f[0][0]<f[1][0])if(p<0)A=A.left;else if(p>0)g=-1,A=A.right;else return 0;else if(p>0)A=A.left;else if(p<0)g=1,A=A.right;else return 0}return g}}function m(T){return 1}function E(T){return function(k){return T(k[0],k[1])?0:1}}function c(T,M){return function(b){return T(b[0],b[1])?0:M(b)}}function _(T){for(var M=T.length,k=[],b=[],A=0;A<M;++A)for(var g=T[A],f=g.length,p=f-1,x=0;x<f;p=x++){var N=g[p],D=g[x];N[0]===D[0]?b.push([N,D]):k.push([N,D])}if(k.length===0)return b.length===0?m:E(h(b));var B=i(k),U=y(B.slabs,B.coordinates);return b.length===0?U:c(h(b),U)}}),5091:(function(t,r,a){r.shader=_,r.program=T;var l=a(8866),i=a(2992),s=typeof WeakMap>"u"?a(606):WeakMap,o=new s,u=0;function d(M,k,b,A,g,f,p){this.id=M,this.src=k,this.type=b,this.shader=A,this.count=f,this.programs=[],this.cache=p}d.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,k=M.gl,b=this.programs,A=0,g=b.length;A<g;++A){var f=M.programs[b[A]];f&&(delete M.programs[A],k.deleteProgram(f))}k.deleteShader(this.shader),delete M.shaders[this.type===k.FRAGMENT_SHADER|0][this.src]}};function h(M){this.gl=M,this.shaders=[{},{}],this.programs={}}var y=h.prototype;function m(M,k,b){var A=M.createShader(k);if(M.shaderSource(A,b),M.compileShader(A),!M.getShaderParameter(A,M.COMPILE_STATUS)){var g=M.getShaderInfoLog(A);try{var f=i(g,b,k)}catch(p){throw console.warn("Failed to format compiler error: "+p),new l(g,`Error compiling shader:
`+g)}throw new l(g,f.short,f.long)}return A}y.getShaderReference=function(M,k){var b=this.gl,A=this.shaders[M===b.FRAGMENT_SHADER|0],g=A[k];if(!g||!b.isShader(g.shader)){var f=m(b,M,k);g=A[k]=new d(u++,k,M,f,[],1,this)}else g.count+=1;return g};function E(M,k,b,A,g){var f=M.createProgram();M.attachShader(f,k),M.attachShader(f,b);for(var p=0;p<A.length;++p)M.bindAttribLocation(f,g[p],A[p]);if(M.linkProgram(f),!M.getProgramParameter(f,M.LINK_STATUS)){var x=M.getProgramInfoLog(f);throw new l(x,"Error linking program: "+x)}return f}y.getProgram=function(M,k,b,A){var g=[M.id,k.id,b.join(":"),A.join(":")].join("@"),f=this.programs[g];return(!f||!this.gl.isProgram(f))&&(this.programs[g]=f=E(this.gl,M.shader,k.shader,b,A),M.programs.push(g),k.programs.push(g)),f};function c(M){var k=o.get(M);return k||(k=new h(M),o.set(M,k)),k}function _(M,k,b){return c(M).getShaderReference(k,b)}function T(M,k,b,A,g){return c(M).getProgram(k,b,A,g)}}),5093:(function(t){t.exports=r;function r(a,l){return a[0]=-l[0],a[1]=-l[1],a[2]=-l[2],a}}),5137:(function(t,r,a){t.exports=i;var l=a(1091)();function i(s,o,u,d,h,y){var m,E;for(o||(o=3),u||(u=0),d?E=Math.min(d*o+u,s.length):E=s.length,m=u;m<E;m+=o)l[0]=s[m],l[1]=s[m+1],l[2]=s[m+2],h(l,l,y),s[m]=l[0],s[m+1]=l[1],s[m+2]=l[2];return s}}),5171:(function(t,r,a){var l=a(737);t.exports=function(s){return l[s]}}),5177:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=i*i+s*s+o*o+u*u;return d>0&&(d=1/Math.sqrt(d),a[0]=i*d,a[1]=s*d,a[2]=o*d,a[3]=u*d),a}}),5202:(function(t,r,a){var l=a(1944),i=a(8210);t.exports=u,t.exports.positive=d,t.exports.negative=h;function s(y,m){var E=i(l(y,m),[m[m.length-1]]);return E[E.length-1]}function o(y,m,E,c){var _=c-m,T=-m/_;T<0?T=0:T>1&&(T=1);for(var M=1-T,k=y.length,b=new Array(k),A=0;A<k;++A)b[A]=T*y[A]+M*E[A];return b}function u(y,m){for(var E=[],c=[],_=s(y[y.length-1],m),T=y[y.length-1],M=y[0],k=0;k<y.length;++k,T=M){M=y[k];var b=s(M,m);if(_<0&&b>0||_>0&&b<0){var A=o(T,b,M,_);E.push(A),c.push(A.slice())}b<0?c.push(M.slice()):b>0?E.push(M.slice()):(E.push(M.slice()),c.push(M.slice())),_=b}return{positive:E,negative:c}}function d(y,m){for(var E=[],c=s(y[y.length-1],m),_=y[y.length-1],T=y[0],M=0;M<y.length;++M,_=T){T=y[M];var k=s(T,m);(c<0&&k>0||c>0&&k<0)&&E.push(o(_,k,T,c)),k>=0&&E.push(T.slice()),c=k}return E}function h(y,m){for(var E=[],c=s(y[y.length-1],m),_=y[y.length-1],T=y[0],M=0;M<y.length;++M,_=T){T=y[M];var k=s(T,m);(c<0&&k>0||c>0&&k<0)&&E.push(o(_,k,T,c)),k<=0&&E.push(T.slice()),c=k}return E}}),5219:(function(t){t.exports=function(r){for(var a=r.length,l,i=0;i<a;i++)if(l=r.charCodeAt(i),(l<9||l>13)&&l!==32&&l!==133&&l!==160&&l!==5760&&l!==6158&&(l<8192||l>8205)&&l!==8232&&l!==8233&&l!==8239&&l!==8287&&l!==8288&&l!==12288&&l!==65279)return!1;return!0}}),5250:(function(t){t.exports=a;var r=+(Math.pow(2,27)+1);function a(l,i,s){var o=l*i,u=r*l,d=u-l,h=u-d,y=l-h,m=r*i,E=m-i,c=m-E,_=i-c,T=o-h*c,M=T-y*c,k=M-h*_,b=y*_-k;return s?(s[0]=b,s[1]=o,s):[b,o]}}),5298:(function(t,r){var a={"float64,2,1,0":function(){return function(y,m,E,c,_){var T=y[0],M=y[1],k=y[2],b=E[0],A=E[1],g=E[2];c|=0;var f=0,p=0,x=0,N=g,D=A-k*g,B=b-M*A;for(x=0;x<T;++x){for(p=0;p<M;++p){for(f=0;f<k;++f)m[c]/=_,c+=N;c+=D}c+=B}}},"uint8,2,0,1,float64,2,1,0":function(){return function(y,m,E,c,_,T,M,k){var b=y[0],A=y[1],g=y[2],f=E[0],p=E[1],x=E[2],N=T[0],D=T[1],B=T[2];c|=0,M|=0;for(var U=c,V=M,q=y[0]|0;q>0;){q<64?(b=q,q=0):(b=64,q-=64);for(var z=y[1]|0;z>0;){z<64?(A=z,z=0):(A=64,z-=64),c=U+q*f+z*p,M=V+q*N+z*D;var H=0,G=0,J=0,le=x,ye=f-g*x,de=p-b*f,me=B,W=N-g*B,ie=D-b*N;for(J=0;J<A;++J){for(G=0;G<b;++G){for(H=0;H<g;++H)m[c]=_[M]*k,c+=le,M+=me;c+=ye,M+=W}c+=de,M+=ie}}}}},"float32,1,0,float32,1,0":function(){return function(y,m,E,c,_,T,M){var k=y[0],b=y[1],A=E[0],g=E[1],f=T[0],p=T[1];c|=0,M|=0;var x=0,N=0,D=g,B=A-b*g,U=p,V=f-b*p;for(N=0;N<k;++N){for(x=0;x<b;++x)m[c]=_[M],c+=D,M+=U;c+=B,M+=V}}},"float32,1,0,float32,0,1":function(){return function(y,m,E,c,_,T,M){var k=y[0],b=y[1],A=E[0],g=E[1],f=T[0],p=T[1];c|=0,M|=0;for(var x=c,N=M,D=y[1]|0;D>0;){D<64?(b=D,D=0):(b=64,D-=64);for(var B=y[0]|0;B>0;){B<64?(k=B,B=0):(k=64,B-=64),c=x+D*g+B*A,M=N+D*p+B*f;var U=0,V=0,q=g,z=A-b*g,H=p,G=f-b*p;for(V=0;V<k;++V){for(U=0;U<b;++U)m[c]=_[M],c+=q,M+=H;c+=z,M+=G}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(y,m,E,c,_,T,M){var k=y[0],b=y[1],A=y[2],g=E[0],f=E[1],p=E[2],x=T[0],N=T[1],D=T[2];c|=0,M|=0;for(var B=c,U=M,V=y[2]|0;V>0;){V<64?(A=V,V=0):(A=64,V-=64);for(var q=y[0]|0;q>0;){q<64?(k=q,q=0):(k=64,q-=64);for(var z=y[1]|0;z>0;){z<64?(b=z,z=0):(b=64,z-=64),c=B+V*p+q*g+z*f,M=U+V*D+q*x+z*N;var H=0,G=0,J=0,le=p,ye=g-A*p,de=f-k*g,me=D,W=x-A*D,ie=N-k*x;for(J=0;J<b;++J){for(G=0;G<k;++G){for(H=0;H<A;++H)m[c]=_[M],c+=le,M+=me;c+=ye,M+=W}c+=de,M+=ie}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(y,m,E,c,_,T,M){var k=y[0],b=y[1],A=y[2],g=E[0],f=E[1],p=E[2],x=T[0],N=T[1],D=T[2];c|=0,M|=0;var B=0,U=0,V=0,q=p,z=g-A*p,H=f-k*g,G=D,J=x-A*D,le=N-k*x;for(V=0;V<b;++V){for(U=0;U<k;++U){for(B=0;B<A;++B)m[c]=_[M],c+=q,M+=G;c+=z,M+=J}c+=H,M+=le}}}};function l(h,y){var m=y.join(","),E=a[m];return E()}var i=l,s={mul:function(h){var y={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=_.dtype,g=_.order,f=[T,M.join(),k,b.join(),A,g.join()].join(),p=y[f];return p||(y[f]=p=h([T,M,k,b,A,g])),p(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_.data,_.stride,_.offset|0)}},muls:function(h){var y={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=[T,M.join(),k,b.join()].join(),g=y[A];return g||(y[A]=g=h([T,M,k,b])),g(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_)}},mulseq:function(h){var y={};return function(E,c){var _=E.dtype,T=E.order,M=[_,T.join()].join(),k=y[M];return k||(y[M]=k=h([_,T])),k(E.shape.slice(0),E.data,E.stride,E.offset|0,c)}},div:function(h){var y={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=_.dtype,g=_.order,f=[T,M.join(),k,b.join(),A,g.join()].join(),p=y[f];return p||(y[f]=p=h([T,M,k,b,A,g])),p(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_.data,_.stride,_.offset|0)}},divs:function(h){var y={};return function(E,c,_){var T=E.dtype,M=E.order,k=c.dtype,b=c.order,A=[T,M.join(),k,b.join()].join(),g=y[A];return g||(y[A]=g=h([T,M,k,b])),g(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0,_)}},divseq:function(h){var y={};return function(E,c){var _=E.dtype,T=E.order,M=[_,T.join()].join(),k=y[M];return k||(y[M]=k=h([_,T])),k(E.shape.slice(0),E.data,E.stride,E.offset|0,c)}},assign:function(h){var y={};return function(E,c){var _=E.dtype,T=E.order,M=c.dtype,k=c.order,b=[_,T.join(),M,k.join()].join(),A=y[b];return A||(y[b]=A=h([_,T,M,k])),A(E.shape.slice(0),E.data,E.stride,E.offset|0,c.data,c.stride,c.offset|0)}}};function o(h){var y=s[h.funcName];return y(i.bind(void 0,h))}function u(h){return o({funcName:h.funcName})}var d={mul:"*",div:"/"};(function(){for(var h in d)r[h]=u({funcName:h}),r[h+"s"]=u({funcName:h+"s"}),r[h+"seq"]=u({funcName:h+"seq"})})(),r.assign=u({funcName:"assign"})}),5304:(function(t,r,a){t.exports=d;var l=a(2762),i=a(8116),s=a(1879).bg;function o(h,y,m,E){this.gl=h,this.buffer=y,this.vao=m,this.shader=E}var u=o.prototype;u.draw=function(h,y,m,E,c,_){for(var T=!1,M=0;M<3;++M)T=T||c[M];if(T){var k=this.gl;k.enable(k.POLYGON_OFFSET_FILL),k.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:h,view:y,projection:m,bounds:E,enable:c,colors:_},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),k.disable(k.POLYGON_OFFSET_FILL)}},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function d(h){for(var y=[],m=[],E=0,c=0;c<3;++c)for(var _=(c+1)%3,T=(c+2)%3,M=[0,0,0],k=[0,0,0],b=-1;b<=1;b+=2){m.push(E,E+2,E+1,E+1,E+2,E+3),M[c]=b,k[c]=b;for(var A=-1;A<=1;A+=2){M[_]=A;for(var g=-1;g<=1;g+=2)M[T]=g,y.push(M[0],M[1],M[2],k[0],k[1],k[2]),E+=1}var f=_;_=T,T=f}var p=l(h,new Float32Array(y)),x=l(h,new Uint16Array(m),h.ELEMENT_ARRAY_BUFFER),N=i(h,[{buffer:p,type:h.FLOAT,size:3,offset:0,stride:24},{buffer:p,type:h.FLOAT,size:3,offset:12,stride:24}],x),D=s(h);return D.attributes.position.location=0,D.attributes.normal.location=1,new o(h,p,N,D)}}),5352:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3];return a[0]=i[0]*s+i[4]*o+i[8]*u+i[12]*d,a[1]=i[1]*s+i[5]*o+i[9]*u+i[13]*d,a[2]=i[2]*s+i[6]*o+i[10]*u+i[14]*d,a[3]=i[3]*s+i[7]*o+i[11]*u+i[15]*d,a}}),5382:(function(t,r,a){var l=a(8210),i=a(3012);t.exports=s;function s(o,u){if(o.length===1)return i(u,o[0]);if(u.length===1)return i(o,u[0]);if(o.length===0||u.length===0)return[0];var d=[0];if(o.length<u.length)for(var h=0;h<o.length;++h)d=l(d,i(u,o[h]));else for(var h=0;h<u.length;++h)d=l(d,i(o,u[h]));return d}}),5445:(function(t,r,a){t.exports=k;var l=a(5033),i=a(5202),s=a(6429),o=a(6760),u=a(5665),d=a(5352),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),y=new Float32Array(16);function m(b,A,g){this.lo=b,this.hi=A,this.pixelsPerDataUnit=g}var E=[0,0,0,1],c=[0,0,0,1];function _(b,A,g,f,p){for(var x=0;x<3;++x){for(var N=E,D=c,B=0;B<3;++B)D[B]=N[B]=g[B];D[3]=N[3]=1,D[x]+=1,d(D,D,A),D[3]<0&&(b[x]=1/0),N[x]-=1,d(N,N,A),N[3]<0&&(b[x]=1/0);var U=(N[0]/N[3]-D[0]/D[3])*f,V=(N[1]/N[3]-D[1]/D[3])*p;b[x]=.25*Math.sqrt(U*U+V*V)}return b}var T=[new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0),new m(1/0,-1/0,1/0)],M=[0,0,0];function k(b,A,g,f,V){var x=A.model||h,N=A.view||h,D=A.projection||h,B=A._ortho||!1,U=b.bounds,V=V||s(x,N,D,U,B),q=V.axis;o(y,N,x),o(y,D,y);for(var z=T,H=0;H<3;++H)z[H].lo=1/0,z[H].hi=-1/0,z[H].pixelsPerDataUnit=1/0;var G=l(u(y,y));u(y,y);for(var J=0;J<3;++J){var le=(J+1)%3,ye=(J+2)%3,de=M;e:for(var H=0;H<2;++H){var me=[];if(q[J]<0!=!!H){de[J]=U[H][J];for(var W=0;W<2;++W){de[le]=U[W^H][le];for(var ie=0;ie<2;++ie)de[ye]=U[ie^W^H][ye],me.push(de.slice())}for(var se=B?5:4,W=se;W===se;++W){if(me.length===0)continue e;me=i.positive(me,G[W])}for(var W=0;W<me.length;++W)for(var ye=me[W],ee=_(M,y,ye,g,f),ie=0;ie<3;++ie)z[ie].lo=Math.min(z[ie].lo,ye[ie]),z[ie].hi=Math.max(z[ie].hi,ye[ie]),ie!==J&&(z[ie].pixelsPerDataUnit=Math.min(z[ie].pixelsPerDataUnit,Math.abs(ee[ie])))}}}return z}}),5455:(function(t,r,a){t.exports=a(7056)}),5486:(function(t,r,a){t.exports=a(3066)}),5542:(function(t,r,a){var l=a(2478);t.exports=u;function i(d,h){this.stars=d,this.edges=h}var s=i.prototype;function o(d,h,y){for(var m=1,E=d.length;m<E;m+=2)if(d[m-1]===h&&d[m]===y){d[m-1]=d[E-2],d[m]=d[E-1],d.length=E-2;return}}s.isConstraint=(function(){var d=[0,0];function h(y,m){return y[0]-m[0]||y[1]-m[1]}return function(y,m){return d[0]=Math.min(y,m),d[1]=Math.max(y,m),l.eq(this.edges,d,h)>=0}})(),s.removeTriangle=function(d,h,y){var m=this.stars;o(m[d],h,y),o(m[h],y,d),o(m[y],d,h)},s.addTriangle=function(d,h,y){var m=this.stars;m[d].push(h,y),m[h].push(y,d),m[y].push(d,h)},s.opposite=function(d,h){for(var y=this.stars[h],m=1,E=y.length;m<E;m+=2)if(y[m]===d)return y[m-1];return-1},s.flip=function(d,h){var y=this.opposite(d,h),m=this.opposite(h,d);this.removeTriangle(d,h,y),this.removeTriangle(h,d,m),this.addTriangle(d,m,y),this.addTriangle(h,y,m)},s.edges=function(){for(var d=this.stars,h=[],y=0,m=d.length;y<m;++y)for(var E=d[y],c=0,_=E.length;c<_;c+=2)h.push([E[c],E[c+1]]);return h},s.cells=function(){for(var d=this.stars,h=[],y=0,m=d.length;y<m;++y)for(var E=d[y],c=0,_=E.length;c<_;c+=2){var T=E[c],M=E[c+1];y<Math.min(T,M)&&h.push([y,T,M])}return h};function u(d,h){for(var y=new Array(d),m=0;m<d;++m)y[m]=[];return new i(y,h)}}),5567:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[4],d=l[5],h=l[6],y=l[7],m=l[8],E=l[9],c=l[10],_=l[11];return l!==a&&(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[4]=u*o+m*s,a[5]=d*o+E*s,a[6]=h*o+c*s,a[7]=y*o+_*s,a[8]=m*o-u*s,a[9]=E*o-d*s,a[10]=c*o-h*s,a[11]=_*o-y*s,a}}),5572:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]).sub(s[1].mul(o[0])),s[1].mul(o[1]))}}),5609:(function(t,r,a){t.exports=i;var l=a(3134);function i(s,o){for(var u=l(s,o.length),d=new Array(o.length),h=new Array(o.length),y=[],m=0;m<o.length;++m){var E=u[m].length;h[m]=E,d[m]=!0,E<=1&&y.push(m)}for(;y.length>0;){var c=y.pop();d[c]=!1;for(var _=u[c],m=0;m<_.length;++m){var T=_[m];--h[T]===0&&y.push(T)}}for(var M=new Array(o.length),k=[],m=0;m<o.length;++m)if(d[m]){var c=k.length;M[m]=c,k.push(o[m])}else M[m]=-1;for(var b=[],m=0;m<s.length;++m){var A=s[m];d[A[0]]&&d[A[1]]&&b.push([M[A[0]],M[A[1]]])}return[b,k]}}),5632:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]+i[0],a[1]=l[1]+i[1],a[2]=l[2]+i[2],a}}),5665:(function(t){t.exports=r;function r(a,l){if(a===l){var i=l[1],s=l[2],o=l[3],u=l[6],d=l[7],h=l[11];a[1]=l[4],a[2]=l[8],a[3]=l[12],a[4]=i,a[6]=l[9],a[7]=l[13],a[8]=s,a[9]=u,a[11]=l[14],a[12]=o,a[13]=d,a[14]=h}else a[0]=l[0],a[1]=l[4],a[2]=l[8],a[3]=l[12],a[4]=l[1],a[5]=l[5],a[6]=l[9],a[7]=l[13],a[8]=l[2],a[9]=l[6],a[10]=l[10],a[11]=l[14],a[12]=l[3],a[13]=l[7],a[14]=l[11],a[15]=l[15];return a}}),5673:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[3]*s+i[7]*o+i[11]*u+i[15];return d=d||1,a[0]=(i[0]*s+i[4]*o+i[8]*u+i[12])/d,a[1]=(i[1]*s+i[5]*o+i[9]*u+i[13])/d,a[2]=(i[2]*s+i[6]*o+i[10]*u+i[14])/d,a}}),5714:(function(t,r,a){t.exports=g;var l=a(2762),i=a(8116),s=a(7766),o=new Uint8Array(4),u=new Float32Array(o.buffer);function d(f,p,x,N){return o[0]=N,o[1]=x,o[2]=p,o[3]=f,u[0]}var h=a(2478),y=a(9618),m=a(7319),E=m.createShader,c=m.createPickShader,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(f,p){for(var x=0,N=0;N<3;++N){var D=f[N]-p[N];x+=D*D}return Math.sqrt(x)}function M(f){for(var p=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)p[0][x]=Math.max(f[0][x],p[0][x]),p[1][x]=Math.min(f[1][x],p[1][x]);return p}function k(f,p,x,N){this.arcLength=f,this.position=p,this.index=x,this.dataCoordinate=N}function b(f,p,x,N,D,B){this.gl=f,this.shader=p,this.pickShader=x,this.buffer=N,this.vao=D,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var A=b.prototype;A.isTransparent=function(){return this.hasAlpha},A.isOpaque=function(){return!this.hasAlpha},A.pickSlots=1,A.setPickBase=function(f){this.pickId=f},A.drawTransparent=A.draw=function(f){if(this.vertexCount){var p=this.gl,x=this.shader,N=this.vao;x.bind(),x.uniforms={model:f.model||_,view:f.view||_,projection:f.projection||_,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[p.drawingBufferWidth,p.drawingBufferHeight],pixelRatio:this.pixelRatio},N.bind(),N.draw(p.TRIANGLE_STRIP,this.vertexCount),N.unbind()}},A.drawPick=function(f){if(this.vertexCount){var p=this.gl,x=this.pickShader,N=this.vao;x.bind(),x.uniforms={model:f.model||_,view:f.view||_,projection:f.projection||_,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[p.drawingBufferWidth,p.drawingBufferHeight],pixelRatio:this.pixelRatio},N.bind(),N.draw(p.TRIANGLE_STRIP,this.vertexCount),N.unbind()}},A.update=function(f){var p,x;this.dirty=!0;var N=!!f.connectGaps;"dashScale"in f&&(this.dashScale=f.dashScale),this.hasAlpha=!1,"opacity"in f&&(this.opacity=+f.opacity,this.opacity<1&&(this.hasAlpha=!0));var D=[],B=[],U=[],V=0,q=0,z=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],H=f.position||f.positions;if(H){var G=f.color||f.colors||[0,0,0,1],J=f.lineWidth||1,le=!1;e:for(p=1;p<H.length;++p){var ye=H[p-1],de=H[p];for(B.push(V),U.push(ye.slice()),x=0;x<3;++x){if(isNaN(ye[x])||isNaN(de[x])||!isFinite(ye[x])||!isFinite(de[x])){if(!N&&D.length>0){for(var me=0;me<24;++me)D.push(D[D.length-12]);q+=2,le=!0}continue e}z[0][x]=Math.min(z[0][x],ye[x],de[x]),z[1][x]=Math.max(z[1][x],ye[x],de[x])}var W,ie;Array.isArray(G[0])?(W=G.length>p-1?G[p-1]:G.length>0?G[G.length-1]:[0,0,0,1],ie=G.length>p?G[p]:G.length>0?G[G.length-1]:[0,0,0,1]):W=ie=G,W.length===3&&(W=[W[0],W[1],W[2],1]),ie.length===3&&(ie=[ie[0],ie[1],ie[2],1]),!this.hasAlpha&&W[3]<1&&(this.hasAlpha=!0);var se;Array.isArray(J)?se=J.length>p-1?J[p-1]:J.length>0?J[J.length-1]:[0,0,0,1]:se=J;var ee=V;if(V+=T(ye,de),le){for(x=0;x<2;++x)D.push(ye[0],ye[1],ye[2],de[0],de[1],de[2],ee,se,W[0],W[1],W[2],W[3]);q+=2,le=!1}D.push(ye[0],ye[1],ye[2],de[0],de[1],de[2],ee,se,W[0],W[1],W[2],W[3],ye[0],ye[1],ye[2],de[0],de[1],de[2],ee,-se,W[0],W[1],W[2],W[3],de[0],de[1],de[2],ye[0],ye[1],ye[2],V,-se,ie[0],ie[1],ie[2],ie[3],de[0],de[1],de[2],ye[0],ye[1],ye[2],V,se,ie[0],ie[1],ie[2],ie[3]),q+=4}}if(this.buffer.update(D),B.push(V),U.push(H[H.length-1].slice()),this.bounds=z,this.vertexCount=q,this.points=U,this.arcLength=B,"dashes"in f){var pe=f.dashes,oe=pe.slice();for(oe.unshift(0),p=1;p<oe.length;++p)oe[p]=oe[p-1]+oe[p];var Y=y(new Array(256*4),[256,1,4]);for(p=0;p<256;++p){for(x=0;x<4;++x)Y.set(p,0,x,0);h.le(oe,oe[oe.length-1]*p/255)&1?Y.set(p,0,0,0):Y.set(p,0,0,255)}this.texture.setPixels(Y)}},A.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},A.pick=function(f){if(!f||f.id!==this.pickId)return null;var p=d(f.value[0],f.value[1],f.value[2],0),x=h.le(this.arcLength,p);if(x<0)return null;if(x===this.arcLength.length-1)return new k(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),x);for(var N=this.points[x],D=this.points[Math.min(x+1,this.points.length-1)],B=(p-this.arcLength[x])/(this.arcLength[x+1]-this.arcLength[x]),U=1-B,V=[0,0,0],q=0;q<3;++q)V[q]=U*N[q]+B*D[q];var z=Math.min(B<.5?x:x+1,this.points.length-1);return new k(p,V,z,this.points[z])};function g(f){var p=f.gl||f.scene&&f.scene.gl,x=E(p);x.attributes.position.location=0,x.attributes.nextPosition.location=1,x.attributes.arcLength.location=2,x.attributes.lineWidth.location=3,x.attributes.color.location=4;var N=c(p);N.attributes.position.location=0,N.attributes.nextPosition.location=1,N.attributes.arcLength.location=2,N.attributes.lineWidth.location=3,N.attributes.color.location=4;for(var D=l(p),B=i(p,[{buffer:D,size:3,offset:0,stride:48},{buffer:D,size:3,offset:12,stride:48},{buffer:D,size:1,offset:24,stride:48},{buffer:D,size:1,offset:28,stride:48},{buffer:D,size:4,offset:32,stride:48}]),U=y(new Array(256*4),[256,1,4]),V=0;V<1024;++V)U.data[V]=255;var q=s(p,U);q.wrap=p.REPEAT;var z=new b(p,x,N,D,B,q);return z.update(f),z}}),5716:(function(t,r,a){var l=a(6859);t.exports=i;function i(s){return s.cmp(new l(0))}}),5721:(function(t){t.exports=r;function r(a){for(var l=0,i=0,s=1;s<a.length;++s)a[s][0]<a[l][0]&&(l=s),a[s][0]>a[i][0]&&(i=s);return l<i?[[l],[i]]:l>i?[[i],[l]]:[[l]]}}),5771:(function(t,r,a){var l=a(8507),i=a(3788),s=a(2419);t.exports=o;function o(u){u.sort(i);for(var d=u.length,h=0,y=0;y<d;++y){var m=u[y],E=s(m);if(E!==0){if(h>0){var c=u[h-1];if(l(m,c)===0&&s(c)!==E){h-=1;continue}}u[h++]=m}}return u.length=h,u}}),5838:(function(t,r,a){t.exports=i;var l=a(7842);function i(s){for(var o=new Array(s.length),u=0;u<s.length;++u)o[u]=l(s[u]);return o}}),5847:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i[0],a[1]=l[1]*i[1],a[2]=l[2]*i[2],a}}),5874:(function(t,r,a){t.exports=x;var l=a(620),i=a(7827),s=a(6852),o=a(7932),u=a(3508),d=999,h=9999,y=0,m=1,E=2,c=3,_=4,T=5,M=6,k=7,b=8,A=9,g=10,f=11,p=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"];function x(N){var D=0,B=0,U=d,V,q,z=[],H=[],G=1,J=0,le=0,ye=!1,de=!1,me="",W;N=N||{};var ie=s,se=l;N.version==="300 es"&&(ie=u,se=o);for(var ee={},pe={},D=0;D<ie.length;D++)ee[ie[D]]=!0;for(var D=0;D<se.length;D++)pe[se[D]]=!0;return function(Fe){return H=[],Fe!==null?Y(Fe):ce()};function oe(Fe){Fe.length&&H.push({type:p[U],data:Fe,position:le,line:G,column:J})}function Y(Fe){D=0,Fe.toString&&(Fe=Fe.toString()),me+=Fe.replace(/\r\n/g,`
`),W=me.length;for(var Pe;V=me[D],D<W;){switch(Pe=D,U){case y:D=Ge();break;case m:D=ze();break;case E:D=Le();break;case c:D=Ve();break;case _:D=gt();break;case f:D=pt();break;case T:D=ht();break;case h:D=lt();break;case A:D=_e();break;case d:D=ue();break}if(Pe!==D)switch(me[Pe]){case`
`:J=0,++G;break;default:++J;break}}return B+=D,me=me.slice(D),H}function ce(Fe){return z.length&&oe(z.join("")),U=g,oe("(eof)"),H}function ue(){return z=z.length?[]:z,q==="/"&&V==="*"?(le=B+D-1,U=y,q=V,D+1):q==="/"&&V==="/"?(le=B+D-1,U=m,q=V,D+1):V==="#"?(U=E,le=B+D,D):/\s/.test(V)?(U=A,le=B+D,D):(ye=/\d/.test(V),de=/[^\w_]/.test(V),le=B+D,U=ye?_:de?c:h,D)}function _e(){return/[^\s]/g.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function Le(){return(V==="\r"||V===`
`)&&q!=="\\"?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function ze(){return Le()}function Ge(){return V==="/"&&q==="*"?(z.push(V),oe(z.join("")),U=d,D+1):(z.push(V),q=V,D+1)}function Ve(){if(q==="."&&/\d/.test(V))return U=T,D;if(q==="/"&&V==="*")return U=y,D;if(q==="/"&&V==="/")return U=m,D;if(V==="."&&z.length){for(;rt(z););return U=T,D}if(V===";"||V===")"||V==="("){if(z.length)for(;rt(z););return oe(V),U=d,D+1}var Fe=z.length===2&&V!=="=";if(/[\w_\d\s]/.test(V)||Fe){for(;rt(z););return U=d,D}return z.push(V),q=V,D+1}function rt(Fe){var Pe=0,be,Ye;do{if(be=i.indexOf(Fe.slice(0,Fe.length+Pe).join("")),Ye=i[be],be===-1){if(Pe--+Fe.length>0)continue;Ye=Fe.slice(0,1).join("")}return oe(Ye),le+=Ye.length,z=z.slice(Ye.length),z.length}while(!0)}function pt(){return/[^a-fA-F0-9]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function gt(){return V==="."||/[eE]/.test(V)?(z.push(V),U=T,q=V,D+1):V==="x"&&z.length===1&&z[0]==="0"?(U=f,z.push(V),q=V,D+1):/[^\d]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function ht(){return V==="f"&&(z.push(V),q=V,D+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(q)?(z.push(V),q=V,D+1):/[^\d]/.test(V)?(oe(z.join("")),U=d,D):(z.push(V),q=V,D+1)}function lt(){if(/[^\d\w_]/.test(V)){var Fe=z.join("");return pe[Fe]?U=b:ee[Fe]?U=k:U=M,oe(z.join("")),U=d,D}return z.push(V),q=V,D+1}}}),5878:(function(t,r,a){t.exports=o;var l=a(3250),i=a(2014);function s(u,d,h){var y=Math.abs(l(u,d,h)),m=Math.sqrt(Math.pow(d[0]-h[0],2)+Math.pow(d[1]-h[1],2));return y/m}function o(u,d,h){for(var y=d.length,m=u.length,E=new Array(y),c=new Array(y),_=new Array(y),T=new Array(y),M=0;M<y;++M)E[M]=c[M]=-1,_[M]=1/0,T[M]=!1;for(var M=0;M<m;++M){var k=u[M];if(k.length!==2)throw new Error("Input must be a graph");var b=k[1],A=k[0];c[A]!==-1?c[A]=-2:c[A]=b,E[b]!==-1?E[b]=-2:E[b]=A}function g(me){if(T[me])return 1/0;var W=E[me],ie=c[me];return W<0||ie<0?1/0:s(d[me],d[W],d[ie])}function f(me,W){var ie=q[me],se=q[W];q[me]=se,q[W]=ie,z[ie]=W,z[se]=me}function p(me){return _[q[me]]}function x(me){return me&1?me-1>>1:(me>>1)-1}function N(me){for(var W=p(me);;){var ie=W,se=2*me+1,ee=2*(me+1),pe=me;if(se<G){var oe=p(se);oe<ie&&(pe=se,ie=oe)}if(ee<G){var Y=p(ee);Y<ie&&(pe=ee)}if(pe===me)return me;f(me,pe),me=pe}}function D(me){for(var W=p(me);me>0;){var ie=x(me);if(ie>=0){var se=p(ie);if(W<se){f(me,ie),me=ie;continue}}return me}}function B(){if(G>0){var me=q[0];return f(0,G-1),G-=1,N(0),me}return-1}function U(me,W){var ie=q[me];return _[ie]===W?me:(_[ie]=-1/0,D(me),B(),_[ie]=W,G+=1,D(G-1))}function V(me){if(!T[me]){T[me]=!0;var W=E[me],ie=c[me];E[ie]>=0&&(E[ie]=W),c[W]>=0&&(c[W]=ie),z[W]>=0&&U(z[W],g(W)),z[ie]>=0&&U(z[ie],g(ie))}}for(var q=[],z=new Array(y),M=0;M<y;++M){var H=_[M]=g(M);H<1/0?(z[M]=q.length,q.push(M)):z[M]=-1}for(var G=q.length,M=G>>1;M>=0;--M)N(M);for(;;){var J=B();if(J<0||_[J]>h)break;V(J)}for(var le=[],M=0;M<y;++M)T[M]||(z[M]=le.length,le.push(d[M].slice()));le.length;function ye(me,W){if(me[W]<0)return W;var ie=W,se=W;do{var ee=me[se];if(!T[se]||ee<0||ee===se||(se=ee,ee=me[se],!T[se]||ee<0||ee===se))break;se=ee,ie=me[ie]}while(ie!==se);for(var pe=W;pe!==se;pe=me[pe])me[pe]=se;return se}var de=[];return u.forEach(function(me){var W=ye(E,me[0]),ie=ye(c,me[1]);if(W>=0&&ie>=0&&W!==ie){var se=z[W],ee=z[ie];se!==ee&&de.push([se,ee])}}),i.unique(i.normalize(de)),{positions:le,edges:de}}}),5911:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=i[0],h=i[1],y=i[2];return a[0]=o*y-u*h,a[1]=u*d-s*y,a[2]=s*h-o*d,a}}),5964:(function(t){t.exports=function(r){return!r&&r!==0?"":r.toString()}}),5995:(function(t,r,a){t.exports=s;var l=a(7642),i=a(6037);function s(o,u){return l(u).filter(function(d){for(var h=new Array(d.length),y=0;y<d.length;++y)h[y]=u[d[y]];return i(h)*o<1})}}),6037:(function(t,r,a){t.exports=i;var l=a(3628);function i(s){for(var o=l(s),u=0,d=0;d<s.length;++d)for(var h=s[d],y=0;y<o.length;++y)u+=Math.pow(h[y]-o[y],2);return Math.sqrt(u/s.length)}}),6079:(function(t){t.exports=r;function r(a,l,i,s){var o=s[0],u=s[1],d=s[2],h=Math.sqrt(o*o+u*u+d*d),y,m,E,c,_,T,M,k,b,A,g,f,p,x,N,D,B,U,V,q,z,H,G,J;return Math.abs(h)<1e-6?null:(h=1/h,o*=h,u*=h,d*=h,y=Math.sin(i),m=Math.cos(i),E=1-m,c=l[0],_=l[1],T=l[2],M=l[3],k=l[4],b=l[5],A=l[6],g=l[7],f=l[8],p=l[9],x=l[10],N=l[11],D=o*o*E+m,B=u*o*E+d*y,U=d*o*E-u*y,V=o*u*E-d*y,q=u*u*E+m,z=d*u*E+o*y,H=o*d*E+u*y,G=u*d*E-o*y,J=d*d*E+m,a[0]=c*D+k*B+f*U,a[1]=_*D+b*B+p*U,a[2]=T*D+A*B+x*U,a[3]=M*D+g*B+N*U,a[4]=c*V+k*q+f*z,a[5]=_*V+b*q+p*z,a[6]=T*V+A*q+x*z,a[7]=M*V+g*q+N*z,a[8]=c*H+k*G+f*J,a[9]=_*H+b*G+p*J,a[10]=T*H+A*G+x*J,a[11]=M*H+g*G+N*J,l!==a&&(a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a)}}),6141:(function(t,r,a){t.exports=a(2953)}),6199:(function(t,r,a){var l=a(1338),i={zero:function(M,k,b,A){var g=M[0],f=b[0];A|=0;var p=0,x=f;for(p=0;p<g;++p)k[A]=0,A+=x},fdTemplate1:function(M,k,b,A,g,f,p){var x=M[0],N=b[0],D=f[0],B=-1*N,U=N;A|=0,p|=0;var V=0,q=N,z=D;for(V=0;V<x;++V)g[p]=.5*(k[A+B]-k[A+U]),A+=q,p+=z},fdTemplate2:function(M,k,b,A,g,f,p,x,N,D){var B=M[0],U=M[1],V=b[0],q=b[1],z=f[0],H=f[1],G=N[0],J=N[1],le=-1*V,ye=V,de=-1*q,me=q;A|=0,p|=0,D|=0;var W=0,ie=0,se=q,ee=V-U*q,pe=H,oe=z-U*H,Y=J,ce=G-U*J;for(ie=0;ie<B;++ie){for(W=0;W<U;++W)g[p]=.5*(k[A+le]-k[A+ye]),x[D]=.5*(k[A+de]-k[A+me]),A+=se,p+=pe,D+=Y;A+=ee,p+=oe,D+=ce}}},s={cdiff:function(M){var k={};return function(A,g,f){var p=A.dtype,x=A.order,N=g.dtype,D=g.order,B=f.dtype,U=f.order,V=[p,x.join(),N,D.join(),B,U.join()].join(),q=k[V];return q||(k[V]=q=M([p,x,N,D,B,U])),q(A.shape.slice(0),A.data,A.stride,A.offset|0,g.data,g.stride,g.offset|0,f.data,f.stride,f.offset|0)}},zero:function(M){var k={};return function(A){var g=A.dtype,f=A.order,p=[g,f.join()].join(),x=k[p];return x||(k[p]=x=M([g,f])),x(A.shape.slice(0),A.data,A.stride,A.offset|0)}},fdTemplate1:function(M){var k={};return function(A,g){var f=A.dtype,p=A.order,x=g.dtype,N=g.order,D=[f,p.join(),x,N.join()].join(),B=k[D];return B||(k[D]=B=M([f,p,x,N])),B(A.shape.slice(0),A.data,A.stride,A.offset|0,g.data,g.stride,g.offset|0)}},fdTemplate2:function(M){var k={};return function(A,g,f){var p=A.dtype,x=A.order,N=g.dtype,D=g.order,B=f.dtype,U=f.order,V=[p,x.join(),N,D.join(),B,U.join()].join(),q=k[V];return q||(k[V]=q=M([p,x,N,D,B,U])),q(A.shape.slice(0),A.data,A.stride,A.offset|0,g.data,g.stride,g.offset|0,f.data,f.stride,f.offset|0)}}};function o(M){var k=s[M.funcName];return k(u.bind(void 0,M))}function u(M){return i[M.funcName]}function d(M){return o({funcName:M.funcName})}var h={},y={},m=d({funcName:"cdiff"}),E=d({funcName:"zero"});function c(M){return M in h?h[M]:h[M]=d({funcName:"fdTemplate"+M})}function _(M,k,b,A){return function(g,f){var p=f.shape.slice();return p[0]>2&&p[1]>2&&A(f.pick(-1,-1).lo(1,1).hi(p[0]-2,p[1]-2),g.pick(-1,-1,0).lo(1,1).hi(p[0]-2,p[1]-2),g.pick(-1,-1,1).lo(1,1).hi(p[0]-2,p[1]-2)),p[1]>2&&(b(f.pick(0,-1).lo(1).hi(p[1]-2),g.pick(0,-1,1).lo(1).hi(p[1]-2)),k(g.pick(0,-1,0).lo(1).hi(p[1]-2))),p[1]>2&&(b(f.pick(p[0]-1,-1).lo(1).hi(p[1]-2),g.pick(p[0]-1,-1,1).lo(1).hi(p[1]-2)),k(g.pick(p[0]-1,-1,0).lo(1).hi(p[1]-2))),p[0]>2&&(b(f.pick(-1,0).lo(1).hi(p[0]-2),g.pick(-1,0,0).lo(1).hi(p[0]-2)),k(g.pick(-1,0,1).lo(1).hi(p[0]-2))),p[0]>2&&(b(f.pick(-1,p[1]-1).lo(1).hi(p[0]-2),g.pick(-1,p[1]-1,0).lo(1).hi(p[0]-2)),k(g.pick(-1,p[1]-1,1).lo(1).hi(p[0]-2))),g.set(0,0,0,0),g.set(0,0,1,0),g.set(p[0]-1,0,0,0),g.set(p[0]-1,0,1,0),g.set(0,p[1]-1,0,0),g.set(0,p[1]-1,1,0),g.set(p[0]-1,p[1]-1,0,0),g.set(p[0]-1,p[1]-1,1,0),g}}function T(M){var k=M.join(),p=y[k];if(p)return p;for(var b=M.length,A=[m,E],g=1;g<=b;++g)A.push(c(g));var f=_,p=f.apply(void 0,A);return y[k]=p,p}t.exports=function(k,b,A){if(Array.isArray(A)||(typeof A=="string"?A=l(b.dimension,A):A=l(b.dimension,"clamp")),b.size===0)return k;if(b.dimension===0)return k.set(0),k;var g=T(A);return g(k,b)}}),6204:(function(t){t.exports=r;function r(a){var l,i,s,o=a.length,u=0;for(l=0;l<o;++l)u+=a[l].length;var d=new Array(u),h=0;for(l=0;l<o;++l){var y=a[l],m=y.length;for(i=0;i<m;++i){var E=d[h++]=new Array(m-1),c=0;for(s=0;s<m;++s)s!==i&&(E[c++]=y[s]);if(i&1){var _=E[1];E[1]=E[0],E[0]=_}}}return d}}),6296:(function(t,r,a){t.exports=d;var l=a(7261),i=a(9977),s=a(1811);function o(h,y){this._controllerNames=Object.keys(h),this._controllerList=this._controllerNames.map(function(m){return h[m]}),this._mode=y,this._active=h[y],this._active||(this._mode="turntable",this._active=h.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 u=o.prototype;u.flush=function(h){for(var y=this._controllerList,m=0;m<y.length;++m)y[m].flush(h)},u.idle=function(h){for(var y=this._controllerList,m=0;m<y.length;++m)y[m].idle(h)},u.lookAt=function(h,y,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].lookAt(h,y,m,E)},u.rotate=function(h,y,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].rotate(h,y,m,E)},u.pan=function(h,y,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].pan(h,y,m,E)},u.translate=function(h,y,m,E){for(var c=this._controllerList,_=0;_<c.length;++_)c[_].translate(h,y,m,E)},u.setMatrix=function(h,y){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setMatrix(h,y)},u.setDistanceLimits=function(h,y){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setDistanceLimits(h,y)},u.setDistance=function(h,y){for(var m=this._controllerList,E=0;E<m.length;++E)m[E].setDistance(h,y)},u.recalcMatrix=function(h){this._active.recalcMatrix(h)},u.getDistance=function(h){return this._active.getDistance(h)},u.getDistanceLimits=function(h){return this._active.getDistanceLimits(h)},u.lastT=function(){return this._active.lastT()},u.setMode=function(h){if(h!==this._mode){var y=this._controllerNames.indexOf(h);if(!(y<0)){var m=this._active,E=this._controllerList[y],c=Math.max(m.lastT(),E.lastT());m.recalcMatrix(c),E.setMatrix(c,m.computedMatrix),this._active=E,this._mode=h,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}}},u.getMode=function(){return this._mode};function d(h){h=h||{};var y=h.eye||[0,0,1],m=h.center||[0,0,0],E=h.up||[0,1,0],c=h.distanceLimits||[0,1/0],_=h.mode||"turntable",T=l(),M=i(),k=s();return T.setDistanceLimits(c[0],c[1]),T.lookAt(0,y,m,E),M.setDistanceLimits(c[0],c[1]),M.lookAt(0,y,m,E),k.setDistanceLimits(c[0],c[1]),k.lookAt(0,y,m,E),new o({turntable:T,orbit:M,matrix:k},_)}}),6330:(function(t,r,a){var l=a(1533);t.exports=i;function i(s){return Array.isArray(s)&&s.length===2&&l(s[0])&&l(s[1])}}),6405:(function(t,r,a){var l=a(2931);t.exports=function(s,o){var u=s.positions,d=s.vectors,h={positions:[],vertexIntensity:[],vertexIntensityBounds:s.vertexIntensityBounds,vectors:[],cells:[],coneOffset:s.coneOffset,colormap:s.colormap};if(s.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),h;for(var y=0,m=1/0,E=-1/0,c=1/0,_=-1/0,T=1/0,M=-1/0,k=null,b=null,A=[],g=1/0,f=!1,p=s.coneSizemode==="raw",x=0;x<u.length;x++){var N=u[x];m=Math.min(N[0],m),E=Math.max(N[0],E),c=Math.min(N[1],c),_=Math.max(N[1],_),T=Math.min(N[2],T),M=Math.max(N[2],M);var D=d[x];if(l.length(D)>y&&(y=l.length(D)),x&&!p){var B=2*l.distance(k,N)/(l.length(b)+l.length(D));B?(g=Math.min(g,B),f=!1):f=!0}f||(k=N,b=D),A.push(D)}var U=[m,c,T],V=[E,_,M];o&&(o[0]=U,o[1]=V),y===0&&(y=1);var q=1/y;isFinite(g)||(g=1),h.vectorScale=g;var z=s.coneSize||(p?1:.5);s.absoluteConeSize&&(z=s.absoluteConeSize*q),h.coneScale=z;for(var x=0,H=0;x<u.length;x++)for(var N=u[x],G=N[0],J=N[1],le=N[2],ye=A[x],de=l.length(ye)*q,me=0,W=8;me<W;me++){h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.positions.push([G,J,le,H++]),h.vectors.push(ye),h.vectors.push(ye),h.vectors.push(ye),h.vectors.push(ye),h.vectors.push(ye),h.vectors.push(ye),h.vertexIntensity.push(de,de,de),h.vertexIntensity.push(de,de,de);var ie=h.positions.length;h.cells.push([ie-6,ie-5,ie-4],[ie-3,ie-2,ie-1])}return h};var i=a(614);t.exports.createMesh=a(9060),t.exports.createConeMesh=function(s,o){return t.exports.createMesh(s,o,{shaders:i,traceType:"cone"})}}),6429:(function(t,r,a){t.exports=b;var l=a(8828),i=a(6760),s=a(5202),o=a(3250),u=new Array(16),d=new Array(8),h=new Array(8),y=new Array(3),m=[0,0,0];(function(){for(var A=0;A<8;++A)d[A]=[1,1,1,1],h[A]=[1,1,1]})();function E(A,g,f){for(var p=0;p<4;++p){A[p]=f[12+p];for(var x=0;x<3;++x)A[p]+=g[x]*f[4*x+p]}}var c=[[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 _(A){for(var g=0;g<c.length;++g)if(A=s.positive(A,c[g]),A.length<3)return 0;for(var f=A[0],p=f[0]/f[3],x=f[1]/f[3],N=0,g=1;g+1<A.length;++g){var D=A[g],B=A[g+1],U=D[0]/D[3],V=D[1]/D[3],q=B[0]/B[3],z=B[1]/B[3],H=U-p,G=V-x,J=q-p,le=z-x;N+=Math.abs(H*le-G*J)}return N}var T=[1,1,1],M=[0,0,0],k={cubeEdges:T,axis:M};function b(A,g,f,p,x){i(u,g,A),i(u,f,u);for(var N=0,D=0;D<2;++D){y[2]=p[D][2];for(var B=0;B<2;++B){y[1]=p[B][1];for(var U=0;U<2;++U)y[0]=p[U][0],E(d[N],y,u),N+=1}}for(var V=-1,D=0;D<8;++D){for(var q=d[D][3],z=0;z<3;++z)h[D][z]=d[D][z]/q;x&&(h[D][2]*=-1),q<0&&(V<0||h[D][2]<h[V][2])&&(V=D)}if(V<0){V=0;for(var H=0;H<3;++H){for(var G=(H+2)%3,J=(H+1)%3,le=-1,ye=-1,de=0;de<2;++de){var me=de<<H,W=me+(de<<G)+(1-de<<J),ie=me+(1-de<<G)+(de<<J);o(h[me],h[W],h[ie],m)<0||(de?le=1:ye=1)}if(le<0||ye<0){ye>le&&(V|=1<<H);continue}for(var de=0;de<2;++de){var me=de<<H,W=me+(de<<G)+(1-de<<J),ie=me+(1-de<<G)+(de<<J),se=_([d[me],d[W],d[ie],d[me+(1<<G)+(1<<J)]]);de?le=se:ye=se}if(ye>le){V|=1<<H;continue}}}for(var ee=7^V,pe=-1,D=0;D<8;++D)D===V||D===ee||(pe<0||h[pe][1]>h[D][1])&&(pe=D);for(var oe=-1,D=0;D<3;++D){var Y=pe^1<<D;if(!(Y===V||Y===ee)){oe<0&&(oe=Y);var J=h[Y];J[0]<h[oe][0]&&(oe=Y)}}for(var ce=-1,D=0;D<3;++D){var Y=pe^1<<D;if(!(Y===V||Y===ee||Y===oe)){ce<0&&(ce=Y);var J=h[Y];J[0]>h[ce][0]&&(ce=Y)}}var ue=T;ue[0]=ue[1]=ue[2]=0,ue[l.log2(oe^pe)]=pe&oe,ue[l.log2(pe^ce)]=pe&ce;var _e=ce^7;_e===V||_e===ee?(_e=oe^7,ue[l.log2(ce^_e)]=_e&ce):ue[l.log2(oe^_e)]=_e&oe;for(var Le=M,ze=V,H=0;H<3;++H)ze&1<<H?Le[H]=-1:Le[H]=1;return k}}),6444:(function(t,r){r.create=l,r.equal=i;function a(s,o){var u=s+"",d=u.indexOf("."),h=0;d>=0&&(h=u.length-d-1);var y=Math.pow(10,h),m=Math.round(s*o*y),E=m+"";if(E.indexOf("e")>=0)return E;var c=m/y,_=m%y;m<0?(c=-Math.ceil(c)|0,_=-_|0):(c=Math.floor(c)|0,_=_|0);var T=""+c;if(m<0&&(T="-"+T),h){for(var M=""+_;M.length<h;)M="0"+M;return T+"."+M}else return T}function l(s,o){for(var u=[],d=0;d<3;++d){var h=[];.5*(s[0][d]+s[1][d]);for(var y=0;y*o[d]<=s[1][d];++y)h.push({x:y*o[d],text:a(o[d],y)});for(var y=-1;y*o[d]>=s[0][d];--y)h.push({x:y*o[d],text:a(o[d],y)});u.push(h)}return u}function i(s,o){for(var u=0;u<3;++u){if(s[u].length!==o[u].length)return!1;for(var d=0;d<s[u].length;++d){var h=s[u][d],y=o[u][d];if(h.x!==y.x||h.text!==y.text||h.font!==y.font||h.fontColor!==y.fontColor||h.fontSize!==y.fontSize||h.dx!==y.dx||h.dy!==y.dy)return!1}}return!0}}),6468:(function(t){t.exports=function(a){return atob(a)}}),6504:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[0]),s[1].mul(o[1]))}}),6582:(function(t,r,a){var l=a(7894);t.exports=i;function i(s,o,u,d){var h,y,m,E,c,_,T,M,k,b,A=o[0],g=o[1],f=o[2],p=d[0],x=d[1],N=d[2],D=u[0],B=u[1],U=u[2];return Math.abs(A-D)<1e-6&&Math.abs(g-B)<1e-6&&Math.abs(f-U)<1e-6?l(s):(T=A-D,M=g-B,k=f-U,b=1/Math.sqrt(T*T+M*M+k*k),T*=b,M*=b,k*=b,h=x*k-N*M,y=N*T-p*k,m=p*M-x*T,b=Math.sqrt(h*h+y*y+m*m),b?(b=1/b,h*=b,y*=b,m*=b):(h=0,y=0,m=0),E=M*m-k*y,c=k*h-T*m,_=T*y-M*h,b=Math.sqrt(E*E+c*c+_*_),b?(b=1/b,E*=b,c*=b,_*=b):(E=0,c=0,_=0),s[0]=h,s[1]=E,s[2]=T,s[3]=0,s[4]=y,s[5]=c,s[6]=M,s[7]=0,s[8]=m,s[9]=_,s[10]=k,s[11]=0,s[12]=-(h*A+y*g+m*f),s[13]=-(E*A+c*g+_*f),s[14]=-(T*A+M*g+k*f),s[15]=1,s)}}),6621:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i,a[1]=l[1]*i,a[2]=l[2]*i,a}}),6658:(function(t){t.exports=r;function r(a,l,i,s){var o=l[0],u=l[1],d=l[2];return a[0]=o+s*(i[0]-o),a[1]=u+s*(i[1]-u),a[2]=d+s*(i[2]-d),a}}),6690:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]/i[0],a[1]=l[1]/i[1],a[2]=l[2]/i[2],a}}),6729:(function(t,r,a){var l=a(3642),i=a(395);t.exports=s;function s(h){var y,m,E,c,_,T,M,k,f,b,A;if(h||(h={}),k=(h.nshades||72)-1,M=h.format||"hex",T=h.colormap,T||(T="jet"),typeof T=="string"){if(T=T.toLowerCase(),!l[T])throw Error(T+" not a supported colorscale");_=l[T]}else if(Array.isArray(T))_=T.slice();else throw Error("unsupported colormap option",T);if(_.length>k+1)throw new Error(T+" map requires nshades to be at least size "+_.length);Array.isArray(h.alpha)?h.alpha.length!==2?b=[1,1]:b=h.alpha.slice():typeof h.alpha=="number"?b=[h.alpha,h.alpha]:b=[1,1],y=_.map(function(N){return Math.round(N.index*k)}),b[0]=Math.min(Math.max(b[0],0),1),b[1]=Math.min(Math.max(b[1],0),1);var g=_.map(function(N,D){var B=_[D].index,U=_[D].rgb.slice();return U.length===4&&U[3]>=0&&U[3]<=1||(U[3]=b[0]+(b[1]-b[0])*B),U}),f=[];for(A=0;A<y.length-1;++A){c=y[A+1]-y[A],m=g[A],E=g[A+1];for(var p=0;p<c;p++){var x=p/c;f.push([Math.round(i(m[0],E[0],x)),Math.round(i(m[1],E[1],x)),Math.round(i(m[2],E[2],x)),i(m[3],E[3],x)])}}return f.push(_[_.length-1].rgb.concat(b[1])),M==="hex"?f=f.map(u):M==="rgbaString"?f=f.map(d):M==="float"&&(f=f.map(o)),f}function o(h){return[h[0]/255,h[1]/255,h[2]/255,h[3]]}function u(h){for(var y,m="#",E=0;E<3;++E)y=h[E],y=y.toString(16),m+=("00"+y).substr(y.length);return m}function d(h){return"rgba("+h.join(",")+")"}}),6740:(function(t,r,a){var l=a(3236),i=l([`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 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;
}
`]),s=l([`#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;
}
`]),o=l([`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;
}
`]),u=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  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);
}`]);r.meshShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),6743:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3],h=s+s,y=o+o,m=u+u,E=s*h,c=s*y,_=s*m,T=o*y,M=o*m,k=u*m,b=d*h,A=d*y,g=d*m;return a[0]=1-(T+k),a[1]=c+g,a[2]=_-A,a[3]=0,a[4]=c-g,a[5]=1-(E+k),a[6]=M+b,a[7]=0,a[8]=_+A,a[9]=M-b,a[10]=1-(E+T),a[11]=0,a[12]=i[0],a[13]=i[1],a[14]=i[2],a[15]=1,a}}),6760:(function(t){t.exports=r;function r(a,l,i){var s=l[0],o=l[1],u=l[2],d=l[3],h=l[4],y=l[5],m=l[6],E=l[7],c=l[8],_=l[9],T=l[10],M=l[11],k=l[12],b=l[13],A=l[14],g=l[15],f=i[0],p=i[1],x=i[2],N=i[3];return a[0]=f*s+p*h+x*c+N*k,a[1]=f*o+p*y+x*_+N*b,a[2]=f*u+p*m+x*T+N*A,a[3]=f*d+p*E+x*M+N*g,f=i[4],p=i[5],x=i[6],N=i[7],a[4]=f*s+p*h+x*c+N*k,a[5]=f*o+p*y+x*_+N*b,a[6]=f*u+p*m+x*T+N*A,a[7]=f*d+p*E+x*M+N*g,f=i[8],p=i[9],x=i[10],N=i[11],a[8]=f*s+p*h+x*c+N*k,a[9]=f*o+p*y+x*_+N*b,a[10]=f*u+p*m+x*T+N*A,a[11]=f*d+p*E+x*M+N*g,f=i[12],p=i[13],x=i[14],N=i[15],a[12]=f*s+p*h+x*c+N*k,a[13]=f*o+p*y+x*_+N*b,a[14]=f*u+p*m+x*T+N*A,a[15]=f*d+p*E+x*M+N*g,a}}),6768:(function(t,r,a){var l=a(6859);t.exports=i;function i(s){return new l(s)}}),6803:(function(t,r,a){a(8828),a(1755);function l(i,s){var o=i.length,u=i.length-s.length,d=Math.min;if(u)return u;switch(o){case 0:return 0;case 1:return i[0]-s[0];case 2:var c=i[0]+i[1]-s[0]-s[1];return c||d(i[0],i[1])-d(s[0],s[1]);case 3:var h=i[0]+i[1],y=s[0]+s[1];if(c=h+i[2]-(y+s[2]),c)return c;var m=d(i[0],i[1]),E=d(s[0],s[1]),c=d(m,i[2])-d(E,s[2]);return c||d(m+i[2],h)-d(E+s[2],y);default:var _=i.slice(0);_.sort();var T=s.slice(0);T.sort();for(var M=0;M<o;++M)if(u=_[M]-T[M],u)return u;return 0}}r.Fw=l}),6808:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3];return Math.sqrt(l*l+i*i+s*s+o*o)}}),6843:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]-i[0],a[1]=l[1]-i[1],a[2]=l[2]-i[2],a}}),6852:(function(t){t.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"]}),6859:(function(t,r,a){t=a.nmd(t),(function(l,i){function s(q,z){if(!q)throw new Error(z||"Assertion failed")}function o(q,z){q.super_=z;var H=function(){};H.prototype=z.prototype,q.prototype=new H,q.prototype.constructor=q}function u(q,z,H){if(u.isBN(q))return q;this.negative=0,this.words=null,this.length=0,this.red=null,q!==null&&((z==="le"||z==="be")&&(H=z,z=10),this._init(q||0,z||10,H||"be"))}typeof l=="object"?l.exports=u:i.BN=u,u.BN=u,u.wordSize=26;var d;try{typeof window<"u"&&typeof window.Buffer<"u"?d=window.Buffer:d=a(7790).Buffer}catch{}u.isBN=function(z){return z instanceof u?!0:z!==null&&typeof z=="object"&&z.constructor.wordSize===u.wordSize&&Array.isArray(z.words)},u.max=function(z,H){return z.cmp(H)>0?z:H},u.min=function(z,H){return z.cmp(H)<0?z:H},u.prototype._init=function(z,H,G){if(typeof z=="number")return this._initNumber(z,H,G);if(typeof z=="object")return this._initArray(z,H,G);H==="hex"&&(H=16),s(H===(H|0)&&H>=2&&H<=36),z=z.toString().replace(/\s+/g,"");var J=0;z[0]==="-"&&(J++,this.negative=1),J<z.length&&(H===16?this._parseHex(z,J,G):(this._parseBase(z,H,J),G==="le"&&this._initArray(this.toArray(),H,G)))},u.prototype._initNumber=function(z,H,G){z<0&&(this.negative=1,z=-z),z<67108864?(this.words=[z&67108863],this.length=1):z<4503599627370496?(this.words=[z&67108863,z/67108864&67108863],this.length=2):(s(z<9007199254740992),this.words=[z&67108863,z/67108864&67108863,1],this.length=3),G==="le"&&this._initArray(this.toArray(),H,G)},u.prototype._initArray=function(z,H,G){if(s(typeof z.length=="number"),z.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(z.length/3),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var le,ye,de=0;if(G==="be")for(J=z.length-1,le=0;J>=0;J-=3)ye=z[J]|z[J-1]<<8|z[J-2]<<16,this.words[le]|=ye<<de&67108863,this.words[le+1]=ye>>>26-de&67108863,de+=24,de>=26&&(de-=26,le++);else if(G==="le")for(J=0,le=0;J<z.length;J+=3)ye=z[J]|z[J+1]<<8|z[J+2]<<16,this.words[le]|=ye<<de&67108863,this.words[le+1]=ye>>>26-de&67108863,de+=24,de>=26&&(de-=26,le++);return this.strip()};function h(q,z){var H=q.charCodeAt(z);return H>=65&&H<=70?H-55:H>=97&&H<=102?H-87:H-48&15}function y(q,z,H){var G=h(q,H);return H-1>=z&&(G|=h(q,H-1)<<4),G}u.prototype._parseHex=function(z,H,G){this.length=Math.ceil((z.length-H)/6),this.words=new Array(this.length);for(var J=0;J<this.length;J++)this.words[J]=0;var le=0,ye=0,de;if(G==="be")for(J=z.length-1;J>=H;J-=2)de=y(z,H,J)<<le,this.words[ye]|=de&67108863,le>=18?(le-=18,ye+=1,this.words[ye]|=de>>>26):le+=8;else{var me=z.length-H;for(J=me%2===0?H+1:H;J<z.length;J+=2)de=y(z,H,J)<<le,this.words[ye]|=de&67108863,le>=18?(le-=18,ye+=1,this.words[ye]|=de>>>26):le+=8}this.strip()};function m(q,z,H,G){for(var J=0,le=Math.min(q.length,H),ye=z;ye<le;ye++){var de=q.charCodeAt(ye)-48;J*=G,de>=49?J+=de-49+10:de>=17?J+=de-17+10:J+=de}return J}u.prototype._parseBase=function(z,H,G){this.words=[0],this.length=1;for(var J=0,le=1;le<=67108863;le*=H)J++;J--,le=le/H|0;for(var ye=z.length-G,de=ye%J,me=Math.min(ye,ye-de)+G,W=0,ie=G;ie<me;ie+=J)W=m(z,ie,ie+J,H),this.imuln(le),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W);if(de!==0){var se=1;for(W=m(z,ie,z.length,H),ie=0;ie<de;ie++)se*=H;this.imuln(se),this.words[0]+W<67108864?this.words[0]+=W:this._iaddn(W)}this.strip()},u.prototype.copy=function(z){z.words=new Array(this.length);for(var H=0;H<this.length;H++)z.words[H]=this.words[H];z.length=this.length,z.negative=this.negative,z.red=this.red},u.prototype.clone=function(){var z=new u(null);return this.copy(z),z},u.prototype._expand=function(z){for(;this.length<z;)this.words[this.length++]=0;return this},u.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","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"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];u.prototype.toString=function(z,H){z=z||10,H=H|0||1;var G;if(z===16||z==="hex"){G="";for(var J=0,le=0,ye=0;ye<this.length;ye++){var de=this.words[ye],me=((de<<J|le)&16777215).toString(16);le=de>>>24-J&16777215,le!==0||ye!==this.length-1?G=E[6-me.length]+me+G:G=me+G,J+=2,J>=26&&(J-=26,ye--)}for(le!==0&&(G=le.toString(16)+G);G.length%H!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}if(z===(z|0)&&z>=2&&z<=36){var W=c[z],ie=_[z];G="";var se=this.clone();for(se.negative=0;!se.isZero();){var ee=se.modn(ie).toString(z);se=se.idivn(ie),se.isZero()?G=ee+G:G=E[W-ee.length]+ee+G}for(this.isZero()&&(G="0"+G);G.length%H!==0;)G="0"+G;return this.negative!==0&&(G="-"+G),G}s(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var z=this.words[0];return this.length===2?z+=this.words[1]*67108864:this.length===3&&this.words[2]===1?z+=4503599627370496+this.words[1]*67108864:this.length>2&&s(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-z:z},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(z,H){return s(typeof d<"u"),this.toArrayLike(d,z,H)},u.prototype.toArray=function(z,H){return this.toArrayLike(Array,z,H)},u.prototype.toArrayLike=function(z,H,G){var J=this.byteLength(),le=G||Math.max(1,J);s(J<=le,"byte array longer than desired length"),s(le>0,"Requested array length <= 0"),this.strip();var ye=H==="le",de=new z(le),me,W,ie=this.clone();if(ye){for(W=0;!ie.isZero();W++)me=ie.andln(255),ie.iushrn(8),de[W]=me;for(;W<le;W++)de[W]=0}else{for(W=0;W<le-J;W++)de[W]=0;for(W=0;!ie.isZero();W++)me=ie.andln(255),ie.iushrn(8),de[le-W-1]=me}return de},Math.clz32?u.prototype._countBits=function(z){return 32-Math.clz32(z)}:u.prototype._countBits=function(z){var H=z,G=0;return H>=4096&&(G+=13,H>>>=13),H>=64&&(G+=7,H>>>=7),H>=8&&(G+=4,H>>>=4),H>=2&&(G+=2,H>>>=2),G+H},u.prototype._zeroBits=function(z){if(z===0)return 26;var H=z,G=0;return(H&8191)===0&&(G+=13,H>>>=13),(H&127)===0&&(G+=7,H>>>=7),(H&15)===0&&(G+=4,H>>>=4),(H&3)===0&&(G+=2,H>>>=2),(H&1)===0&&G++,G},u.prototype.bitLength=function(){var z=this.words[this.length-1],H=this._countBits(z);return(this.length-1)*26+H};function T(q){for(var z=new Array(q.bitLength()),H=0;H<z.length;H++){var G=H/26|0,J=H%26;z[H]=(q.words[G]&1<<J)>>>J}return z}u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var z=0,H=0;H<this.length;H++){var G=this._zeroBits(this.words[H]);if(z+=G,G!==26)break}return z},u.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},u.prototype.toTwos=function(z){return this.negative!==0?this.abs().inotn(z).iaddn(1):this.clone()},u.prototype.fromTwos=function(z){return this.testn(z-1)?this.notn(z).iaddn(1).ineg():this.clone()},u.prototype.isNeg=function(){return this.negative!==0},u.prototype.neg=function(){return this.clone().ineg()},u.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},u.prototype.iuor=function(z){for(;this.length<z.length;)this.words[this.length++]=0;for(var H=0;H<z.length;H++)this.words[H]=this.words[H]|z.words[H];return this.strip()},u.prototype.ior=function(z){return s((this.negative|z.negative)===0),this.iuor(z)},u.prototype.or=function(z){return this.length>z.length?this.clone().ior(z):z.clone().ior(this)},u.prototype.uor=function(z){return this.length>z.length?this.clone().iuor(z):z.clone().iuor(this)},u.prototype.iuand=function(z){var H;this.length>z.length?H=z:H=this;for(var G=0;G<H.length;G++)this.words[G]=this.words[G]&z.words[G];return this.length=H.length,this.strip()},u.prototype.iand=function(z){return s((this.negative|z.negative)===0),this.iuand(z)},u.prototype.and=function(z){return this.length>z.length?this.clone().iand(z):z.clone().iand(this)},u.prototype.uand=function(z){return this.length>z.length?this.clone().iuand(z):z.clone().iuand(this)},u.prototype.iuxor=function(z){var H,G;this.length>z.length?(H=this,G=z):(H=z,G=this);for(var J=0;J<G.length;J++)this.words[J]=H.words[J]^G.words[J];if(this!==H)for(;J<H.length;J++)this.words[J]=H.words[J];return this.length=H.length,this.strip()},u.prototype.ixor=function(z){return s((this.negative|z.negative)===0),this.iuxor(z)},u.prototype.xor=function(z){return this.length>z.length?this.clone().ixor(z):z.clone().ixor(this)},u.prototype.uxor=function(z){return this.length>z.length?this.clone().iuxor(z):z.clone().iuxor(this)},u.prototype.inotn=function(z){s(typeof z=="number"&&z>=0);var H=Math.ceil(z/26)|0,G=z%26;this._expand(H),G>0&&H--;for(var J=0;J<H;J++)this.words[J]=~this.words[J]&67108863;return G>0&&(this.words[J]=~this.words[J]&67108863>>26-G),this.strip()},u.prototype.notn=function(z){return this.clone().inotn(z)},u.prototype.setn=function(z,H){s(typeof z=="number"&&z>=0);var G=z/26|0,J=z%26;return this._expand(G+1),H?this.words[G]=this.words[G]|1<<J:this.words[G]=this.words[G]&~(1<<J),this.strip()},u.prototype.iadd=function(z){var H;if(this.negative!==0&&z.negative===0)return this.negative=0,H=this.isub(z),this.negative^=1,this._normSign();if(this.negative===0&&z.negative!==0)return z.negative=0,H=this.isub(z),z.negative=1,H._normSign();var G,J;this.length>z.length?(G=this,J=z):(G=z,J=this);for(var le=0,ye=0;ye<J.length;ye++)H=(G.words[ye]|0)+(J.words[ye]|0)+le,this.words[ye]=H&67108863,le=H>>>26;for(;le!==0&&ye<G.length;ye++)H=(G.words[ye]|0)+le,this.words[ye]=H&67108863,le=H>>>26;if(this.length=G.length,le!==0)this.words[this.length]=le,this.length++;else if(G!==this)for(;ye<G.length;ye++)this.words[ye]=G.words[ye];return this},u.prototype.add=function(z){var H;return z.negative!==0&&this.negative===0?(z.negative=0,H=this.sub(z),z.negative^=1,H):z.negative===0&&this.negative!==0?(this.negative=0,H=z.sub(this),this.negative=1,H):this.length>z.length?this.clone().iadd(z):z.clone().iadd(this)},u.prototype.isub=function(z){if(z.negative!==0){z.negative=0;var H=this.iadd(z);return z.negative=1,H._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(z),this.negative=1,this._normSign();var G=this.cmp(z);if(G===0)return this.negative=0,this.length=1,this.words[0]=0,this;var J,le;G>0?(J=this,le=z):(J=z,le=this);for(var ye=0,de=0;de<le.length;de++)H=(J.words[de]|0)-(le.words[de]|0)+ye,ye=H>>26,this.words[de]=H&67108863;for(;ye!==0&&de<J.length;de++)H=(J.words[de]|0)+ye,ye=H>>26,this.words[de]=H&67108863;if(ye===0&&de<J.length&&J!==this)for(;de<J.length;de++)this.words[de]=J.words[de];return this.length=Math.max(this.length,de),J!==this&&(this.negative=1),this.strip()},u.prototype.sub=function(z){return this.clone().isub(z)};function M(q,z,H){H.negative=z.negative^q.negative;var G=q.length+z.length|0;H.length=G,G=G-1|0;var J=q.words[0]|0,le=z.words[0]|0,ye=J*le,de=ye&67108863,me=ye/67108864|0;H.words[0]=de;for(var W=1;W<G;W++){for(var ie=me>>>26,se=me&67108863,ee=Math.min(W,z.length-1),pe=Math.max(0,W-q.length+1);pe<=ee;pe++){var oe=W-pe|0;J=q.words[oe]|0,le=z.words[pe]|0,ye=J*le+se,ie+=ye/67108864|0,se=ye&67108863}H.words[W]=se|0,me=ie|0}return me!==0?H.words[W]=me|0:H.length--,H.strip()}var k=function(z,H,G){var J=z.words,le=H.words,ye=G.words,de=0,me,W,ie,se=J[0]|0,ee=se&8191,pe=se>>>13,oe=J[1]|0,Y=oe&8191,ce=oe>>>13,ue=J[2]|0,_e=ue&8191,Le=ue>>>13,ze=J[3]|0,Ge=ze&8191,Ve=ze>>>13,rt=J[4]|0,pt=rt&8191,gt=rt>>>13,ht=J[5]|0,lt=ht&8191,Fe=ht>>>13,Pe=J[6]|0,be=Pe&8191,Ye=Pe>>>13,mt=J[7]|0,bt=mt&8191,ft=mt>>>13,Wt=J[8]|0,Zt=Wt&8191,cr=Wt>>>13,pr=J[9]|0,Br=pr&8191,Fr=pr>>>13,cn=le[0]|0,Nr=cn&8191,Jr=cn>>>13,Dt=le[1]|0,$e=Dt&8191,ot=Dt>>>13,De=le[2]|0,Ee=De&8191,Ae=De>>>13,Ie=le[3]|0,tt=Ie&8191,st=Ie>>>13,Ft=le[4]|0,Nt=Ft&8191,Xt=Ft>>>13,lr=le[5]|0,Rr=lr&8191,Mr=lr>>>13,Sr=le[6]|0,Kr=Sr&8191,qn=Sr>>>13,ha=le[7]|0,ia=ha&8191,xa=ha>>>13,ba=le[8]|0,ea=ba&8191,Za=ba>>>13,ui=le[9]|0,_r=ui&8191,Qt=ui>>>13;G.negative=z.negative^H.negative,G.length=19,me=Math.imul(ee,Nr),W=Math.imul(ee,Jr),W=W+Math.imul(pe,Nr)|0,ie=Math.imul(pe,Jr);var yr=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(yr>>>26)|0,yr&=67108863,me=Math.imul(Y,Nr),W=Math.imul(Y,Jr),W=W+Math.imul(ce,Nr)|0,ie=Math.imul(ce,Jr),me=me+Math.imul(ee,$e)|0,W=W+Math.imul(ee,ot)|0,W=W+Math.imul(pe,$e)|0,ie=ie+Math.imul(pe,ot)|0;var br=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(br>>>26)|0,br&=67108863,me=Math.imul(_e,Nr),W=Math.imul(_e,Jr),W=W+Math.imul(Le,Nr)|0,ie=Math.imul(Le,Jr),me=me+Math.imul(Y,$e)|0,W=W+Math.imul(Y,ot)|0,W=W+Math.imul(ce,$e)|0,ie=ie+Math.imul(ce,ot)|0,me=me+Math.imul(ee,Ee)|0,W=W+Math.imul(ee,Ae)|0,W=W+Math.imul(pe,Ee)|0,ie=ie+Math.imul(pe,Ae)|0;var nn=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(nn>>>26)|0,nn&=67108863,me=Math.imul(Ge,Nr),W=Math.imul(Ge,Jr),W=W+Math.imul(Ve,Nr)|0,ie=Math.imul(Ve,Jr),me=me+Math.imul(_e,$e)|0,W=W+Math.imul(_e,ot)|0,W=W+Math.imul(Le,$e)|0,ie=ie+Math.imul(Le,ot)|0,me=me+Math.imul(Y,Ee)|0,W=W+Math.imul(Y,Ae)|0,W=W+Math.imul(ce,Ee)|0,ie=ie+Math.imul(ce,Ae)|0,me=me+Math.imul(ee,tt)|0,W=W+Math.imul(ee,st)|0,W=W+Math.imul(pe,tt)|0,ie=ie+Math.imul(pe,st)|0;var wn=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(wn>>>26)|0,wn&=67108863,me=Math.imul(pt,Nr),W=Math.imul(pt,Jr),W=W+Math.imul(gt,Nr)|0,ie=Math.imul(gt,Jr),me=me+Math.imul(Ge,$e)|0,W=W+Math.imul(Ge,ot)|0,W=W+Math.imul(Ve,$e)|0,ie=ie+Math.imul(Ve,ot)|0,me=me+Math.imul(_e,Ee)|0,W=W+Math.imul(_e,Ae)|0,W=W+Math.imul(Le,Ee)|0,ie=ie+Math.imul(Le,Ae)|0,me=me+Math.imul(Y,tt)|0,W=W+Math.imul(Y,st)|0,W=W+Math.imul(ce,tt)|0,ie=ie+Math.imul(ce,st)|0,me=me+Math.imul(ee,Nt)|0,W=W+Math.imul(ee,Xt)|0,W=W+Math.imul(pe,Nt)|0,ie=ie+Math.imul(pe,Xt)|0;var Ln=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,me=Math.imul(lt,Nr),W=Math.imul(lt,Jr),W=W+Math.imul(Fe,Nr)|0,ie=Math.imul(Fe,Jr),me=me+Math.imul(pt,$e)|0,W=W+Math.imul(pt,ot)|0,W=W+Math.imul(gt,$e)|0,ie=ie+Math.imul(gt,ot)|0,me=me+Math.imul(Ge,Ee)|0,W=W+Math.imul(Ge,Ae)|0,W=W+Math.imul(Ve,Ee)|0,ie=ie+Math.imul(Ve,Ae)|0,me=me+Math.imul(_e,tt)|0,W=W+Math.imul(_e,st)|0,W=W+Math.imul(Le,tt)|0,ie=ie+Math.imul(Le,st)|0,me=me+Math.imul(Y,Nt)|0,W=W+Math.imul(Y,Xt)|0,W=W+Math.imul(ce,Nt)|0,ie=ie+Math.imul(ce,Xt)|0,me=me+Math.imul(ee,Rr)|0,W=W+Math.imul(ee,Mr)|0,W=W+Math.imul(pe,Rr)|0,ie=ie+Math.imul(pe,Mr)|0;var Fn=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,me=Math.imul(be,Nr),W=Math.imul(be,Jr),W=W+Math.imul(Ye,Nr)|0,ie=Math.imul(Ye,Jr),me=me+Math.imul(lt,$e)|0,W=W+Math.imul(lt,ot)|0,W=W+Math.imul(Fe,$e)|0,ie=ie+Math.imul(Fe,ot)|0,me=me+Math.imul(pt,Ee)|0,W=W+Math.imul(pt,Ae)|0,W=W+Math.imul(gt,Ee)|0,ie=ie+Math.imul(gt,Ae)|0,me=me+Math.imul(Ge,tt)|0,W=W+Math.imul(Ge,st)|0,W=W+Math.imul(Ve,tt)|0,ie=ie+Math.imul(Ve,st)|0,me=me+Math.imul(_e,Nt)|0,W=W+Math.imul(_e,Xt)|0,W=W+Math.imul(Le,Nt)|0,ie=ie+Math.imul(Le,Xt)|0,me=me+Math.imul(Y,Rr)|0,W=W+Math.imul(Y,Mr)|0,W=W+Math.imul(ce,Rr)|0,ie=ie+Math.imul(ce,Mr)|0,me=me+Math.imul(ee,Kr)|0,W=W+Math.imul(ee,qn)|0,W=W+Math.imul(pe,Kr)|0,ie=ie+Math.imul(pe,qn)|0;var va=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(va>>>26)|0,va&=67108863,me=Math.imul(bt,Nr),W=Math.imul(bt,Jr),W=W+Math.imul(ft,Nr)|0,ie=Math.imul(ft,Jr),me=me+Math.imul(be,$e)|0,W=W+Math.imul(be,ot)|0,W=W+Math.imul(Ye,$e)|0,ie=ie+Math.imul(Ye,ot)|0,me=me+Math.imul(lt,Ee)|0,W=W+Math.imul(lt,Ae)|0,W=W+Math.imul(Fe,Ee)|0,ie=ie+Math.imul(Fe,Ae)|0,me=me+Math.imul(pt,tt)|0,W=W+Math.imul(pt,st)|0,W=W+Math.imul(gt,tt)|0,ie=ie+Math.imul(gt,st)|0,me=me+Math.imul(Ge,Nt)|0,W=W+Math.imul(Ge,Xt)|0,W=W+Math.imul(Ve,Nt)|0,ie=ie+Math.imul(Ve,Xt)|0,me=me+Math.imul(_e,Rr)|0,W=W+Math.imul(_e,Mr)|0,W=W+Math.imul(Le,Rr)|0,ie=ie+Math.imul(Le,Mr)|0,me=me+Math.imul(Y,Kr)|0,W=W+Math.imul(Y,qn)|0,W=W+Math.imul(ce,Kr)|0,ie=ie+Math.imul(ce,qn)|0,me=me+Math.imul(ee,ia)|0,W=W+Math.imul(ee,xa)|0,W=W+Math.imul(pe,ia)|0,ie=ie+Math.imul(pe,xa)|0;var Da=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Da>>>26)|0,Da&=67108863,me=Math.imul(Zt,Nr),W=Math.imul(Zt,Jr),W=W+Math.imul(cr,Nr)|0,ie=Math.imul(cr,Jr),me=me+Math.imul(bt,$e)|0,W=W+Math.imul(bt,ot)|0,W=W+Math.imul(ft,$e)|0,ie=ie+Math.imul(ft,ot)|0,me=me+Math.imul(be,Ee)|0,W=W+Math.imul(be,Ae)|0,W=W+Math.imul(Ye,Ee)|0,ie=ie+Math.imul(Ye,Ae)|0,me=me+Math.imul(lt,tt)|0,W=W+Math.imul(lt,st)|0,W=W+Math.imul(Fe,tt)|0,ie=ie+Math.imul(Fe,st)|0,me=me+Math.imul(pt,Nt)|0,W=W+Math.imul(pt,Xt)|0,W=W+Math.imul(gt,Nt)|0,ie=ie+Math.imul(gt,Xt)|0,me=me+Math.imul(Ge,Rr)|0,W=W+Math.imul(Ge,Mr)|0,W=W+Math.imul(Ve,Rr)|0,ie=ie+Math.imul(Ve,Mr)|0,me=me+Math.imul(_e,Kr)|0,W=W+Math.imul(_e,qn)|0,W=W+Math.imul(Le,Kr)|0,ie=ie+Math.imul(Le,qn)|0,me=me+Math.imul(Y,ia)|0,W=W+Math.imul(Y,xa)|0,W=W+Math.imul(ce,ia)|0,ie=ie+Math.imul(ce,xa)|0,me=me+Math.imul(ee,ea)|0,W=W+Math.imul(ee,Za)|0,W=W+Math.imul(pe,ea)|0,ie=ie+Math.imul(pe,Za)|0;var Pa=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,me=Math.imul(Br,Nr),W=Math.imul(Br,Jr),W=W+Math.imul(Fr,Nr)|0,ie=Math.imul(Fr,Jr),me=me+Math.imul(Zt,$e)|0,W=W+Math.imul(Zt,ot)|0,W=W+Math.imul(cr,$e)|0,ie=ie+Math.imul(cr,ot)|0,me=me+Math.imul(bt,Ee)|0,W=W+Math.imul(bt,Ae)|0,W=W+Math.imul(ft,Ee)|0,ie=ie+Math.imul(ft,Ae)|0,me=me+Math.imul(be,tt)|0,W=W+Math.imul(be,st)|0,W=W+Math.imul(Ye,tt)|0,ie=ie+Math.imul(Ye,st)|0,me=me+Math.imul(lt,Nt)|0,W=W+Math.imul(lt,Xt)|0,W=W+Math.imul(Fe,Nt)|0,ie=ie+Math.imul(Fe,Xt)|0,me=me+Math.imul(pt,Rr)|0,W=W+Math.imul(pt,Mr)|0,W=W+Math.imul(gt,Rr)|0,ie=ie+Math.imul(gt,Mr)|0,me=me+Math.imul(Ge,Kr)|0,W=W+Math.imul(Ge,qn)|0,W=W+Math.imul(Ve,Kr)|0,ie=ie+Math.imul(Ve,qn)|0,me=me+Math.imul(_e,ia)|0,W=W+Math.imul(_e,xa)|0,W=W+Math.imul(Le,ia)|0,ie=ie+Math.imul(Le,xa)|0,me=me+Math.imul(Y,ea)|0,W=W+Math.imul(Y,Za)|0,W=W+Math.imul(ce,ea)|0,ie=ie+Math.imul(ce,Za)|0,me=me+Math.imul(ee,_r)|0,W=W+Math.imul(ee,Qt)|0,W=W+Math.imul(pe,_r)|0,ie=ie+Math.imul(pe,Qt)|0;var Fa=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,me=Math.imul(Br,$e),W=Math.imul(Br,ot),W=W+Math.imul(Fr,$e)|0,ie=Math.imul(Fr,ot),me=me+Math.imul(Zt,Ee)|0,W=W+Math.imul(Zt,Ae)|0,W=W+Math.imul(cr,Ee)|0,ie=ie+Math.imul(cr,Ae)|0,me=me+Math.imul(bt,tt)|0,W=W+Math.imul(bt,st)|0,W=W+Math.imul(ft,tt)|0,ie=ie+Math.imul(ft,st)|0,me=me+Math.imul(be,Nt)|0,W=W+Math.imul(be,Xt)|0,W=W+Math.imul(Ye,Nt)|0,ie=ie+Math.imul(Ye,Xt)|0,me=me+Math.imul(lt,Rr)|0,W=W+Math.imul(lt,Mr)|0,W=W+Math.imul(Fe,Rr)|0,ie=ie+Math.imul(Fe,Mr)|0,me=me+Math.imul(pt,Kr)|0,W=W+Math.imul(pt,qn)|0,W=W+Math.imul(gt,Kr)|0,ie=ie+Math.imul(gt,qn)|0,me=me+Math.imul(Ge,ia)|0,W=W+Math.imul(Ge,xa)|0,W=W+Math.imul(Ve,ia)|0,ie=ie+Math.imul(Ve,xa)|0,me=me+Math.imul(_e,ea)|0,W=W+Math.imul(_e,Za)|0,W=W+Math.imul(Le,ea)|0,ie=ie+Math.imul(Le,Za)|0,me=me+Math.imul(Y,_r)|0,W=W+Math.imul(Y,Qt)|0,W=W+Math.imul(ce,_r)|0,ie=ie+Math.imul(ce,Qt)|0;var $a=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+($a>>>26)|0,$a&=67108863,me=Math.imul(Br,Ee),W=Math.imul(Br,Ae),W=W+Math.imul(Fr,Ee)|0,ie=Math.imul(Fr,Ae),me=me+Math.imul(Zt,tt)|0,W=W+Math.imul(Zt,st)|0,W=W+Math.imul(cr,tt)|0,ie=ie+Math.imul(cr,st)|0,me=me+Math.imul(bt,Nt)|0,W=W+Math.imul(bt,Xt)|0,W=W+Math.imul(ft,Nt)|0,ie=ie+Math.imul(ft,Xt)|0,me=me+Math.imul(be,Rr)|0,W=W+Math.imul(be,Mr)|0,W=W+Math.imul(Ye,Rr)|0,ie=ie+Math.imul(Ye,Mr)|0,me=me+Math.imul(lt,Kr)|0,W=W+Math.imul(lt,qn)|0,W=W+Math.imul(Fe,Kr)|0,ie=ie+Math.imul(Fe,qn)|0,me=me+Math.imul(pt,ia)|0,W=W+Math.imul(pt,xa)|0,W=W+Math.imul(gt,ia)|0,ie=ie+Math.imul(gt,xa)|0,me=me+Math.imul(Ge,ea)|0,W=W+Math.imul(Ge,Za)|0,W=W+Math.imul(Ve,ea)|0,ie=ie+Math.imul(Ve,Za)|0,me=me+Math.imul(_e,_r)|0,W=W+Math.imul(_e,Qt)|0,W=W+Math.imul(Le,_r)|0,ie=ie+Math.imul(Le,Qt)|0;var oa=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(oa>>>26)|0,oa&=67108863,me=Math.imul(Br,tt),W=Math.imul(Br,st),W=W+Math.imul(Fr,tt)|0,ie=Math.imul(Fr,st),me=me+Math.imul(Zt,Nt)|0,W=W+Math.imul(Zt,Xt)|0,W=W+Math.imul(cr,Nt)|0,ie=ie+Math.imul(cr,Xt)|0,me=me+Math.imul(bt,Rr)|0,W=W+Math.imul(bt,Mr)|0,W=W+Math.imul(ft,Rr)|0,ie=ie+Math.imul(ft,Mr)|0,me=me+Math.imul(be,Kr)|0,W=W+Math.imul(be,qn)|0,W=W+Math.imul(Ye,Kr)|0,ie=ie+Math.imul(Ye,qn)|0,me=me+Math.imul(lt,ia)|0,W=W+Math.imul(lt,xa)|0,W=W+Math.imul(Fe,ia)|0,ie=ie+Math.imul(Fe,xa)|0,me=me+Math.imul(pt,ea)|0,W=W+Math.imul(pt,Za)|0,W=W+Math.imul(gt,ea)|0,ie=ie+Math.imul(gt,Za)|0,me=me+Math.imul(Ge,_r)|0,W=W+Math.imul(Ge,Qt)|0,W=W+Math.imul(Ve,_r)|0,ie=ie+Math.imul(Ve,Qt)|0;var zi=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(zi>>>26)|0,zi&=67108863,me=Math.imul(Br,Nt),W=Math.imul(Br,Xt),W=W+Math.imul(Fr,Nt)|0,ie=Math.imul(Fr,Xt),me=me+Math.imul(Zt,Rr)|0,W=W+Math.imul(Zt,Mr)|0,W=W+Math.imul(cr,Rr)|0,ie=ie+Math.imul(cr,Mr)|0,me=me+Math.imul(bt,Kr)|0,W=W+Math.imul(bt,qn)|0,W=W+Math.imul(ft,Kr)|0,ie=ie+Math.imul(ft,qn)|0,me=me+Math.imul(be,ia)|0,W=W+Math.imul(be,xa)|0,W=W+Math.imul(Ye,ia)|0,ie=ie+Math.imul(Ye,xa)|0,me=me+Math.imul(lt,ea)|0,W=W+Math.imul(lt,Za)|0,W=W+Math.imul(Fe,ea)|0,ie=ie+Math.imul(Fe,Za)|0,me=me+Math.imul(pt,_r)|0,W=W+Math.imul(pt,Qt)|0,W=W+Math.imul(gt,_r)|0,ie=ie+Math.imul(gt,Qt)|0;var Gi=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,me=Math.imul(Br,Rr),W=Math.imul(Br,Mr),W=W+Math.imul(Fr,Rr)|0,ie=Math.imul(Fr,Mr),me=me+Math.imul(Zt,Kr)|0,W=W+Math.imul(Zt,qn)|0,W=W+Math.imul(cr,Kr)|0,ie=ie+Math.imul(cr,qn)|0,me=me+Math.imul(bt,ia)|0,W=W+Math.imul(bt,xa)|0,W=W+Math.imul(ft,ia)|0,ie=ie+Math.imul(ft,xa)|0,me=me+Math.imul(be,ea)|0,W=W+Math.imul(be,Za)|0,W=W+Math.imul(Ye,ea)|0,ie=ie+Math.imul(Ye,Za)|0,me=me+Math.imul(lt,_r)|0,W=W+Math.imul(lt,Qt)|0,W=W+Math.imul(Fe,_r)|0,ie=ie+Math.imul(Fe,Qt)|0;var qt=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(qt>>>26)|0,qt&=67108863,me=Math.imul(Br,Kr),W=Math.imul(Br,qn),W=W+Math.imul(Fr,Kr)|0,ie=Math.imul(Fr,qn),me=me+Math.imul(Zt,ia)|0,W=W+Math.imul(Zt,xa)|0,W=W+Math.imul(cr,ia)|0,ie=ie+Math.imul(cr,xa)|0,me=me+Math.imul(bt,ea)|0,W=W+Math.imul(bt,Za)|0,W=W+Math.imul(ft,ea)|0,ie=ie+Math.imul(ft,Za)|0,me=me+Math.imul(be,_r)|0,W=W+Math.imul(be,Qt)|0,W=W+Math.imul(Ye,_r)|0,ie=ie+Math.imul(Ye,Qt)|0;var Ct=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,me=Math.imul(Br,ia),W=Math.imul(Br,xa),W=W+Math.imul(Fr,ia)|0,ie=Math.imul(Fr,xa),me=me+Math.imul(Zt,ea)|0,W=W+Math.imul(Zt,Za)|0,W=W+Math.imul(cr,ea)|0,ie=ie+Math.imul(cr,Za)|0,me=me+Math.imul(bt,_r)|0,W=W+Math.imul(bt,Qt)|0,W=W+Math.imul(ft,_r)|0,ie=ie+Math.imul(ft,Qt)|0;var Ur=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Ur>>>26)|0,Ur&=67108863,me=Math.imul(Br,ea),W=Math.imul(Br,Za),W=W+Math.imul(Fr,ea)|0,ie=Math.imul(Fr,Za),me=me+Math.imul(Zt,_r)|0,W=W+Math.imul(Zt,Qt)|0,W=W+Math.imul(cr,_r)|0,ie=ie+Math.imul(cr,Qt)|0;var Qr=(de+me|0)+((W&8191)<<13)|0;de=(ie+(W>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,me=Math.imul(Br,_r),W=Math.imul(Br,Qt),W=W+Math.imul(Fr,_r)|0,ie=Math.imul(Fr,Qt);var tn=(de+me|0)+((W&8191)<<13)|0;return de=(ie+(W>>>13)|0)+(tn>>>26)|0,tn&=67108863,ye[0]=yr,ye[1]=br,ye[2]=nn,ye[3]=wn,ye[4]=Ln,ye[5]=Fn,ye[6]=va,ye[7]=Da,ye[8]=Pa,ye[9]=Fa,ye[10]=$a,ye[11]=oa,ye[12]=zi,ye[13]=Gi,ye[14]=qt,ye[15]=Ct,ye[16]=Ur,ye[17]=Qr,ye[18]=tn,de!==0&&(ye[19]=de,G.length++),G};Math.imul||(k=M);function b(q,z,H){H.negative=z.negative^q.negative,H.length=q.length+z.length;for(var G=0,J=0,le=0;le<H.length-1;le++){var ye=J;J=0;for(var de=G&67108863,me=Math.min(le,z.length-1),W=Math.max(0,le-q.length+1);W<=me;W++){var ie=le-W,se=q.words[ie]|0,ee=z.words[W]|0,pe=se*ee,oe=pe&67108863;ye=ye+(pe/67108864|0)|0,oe=oe+de|0,de=oe&67108863,ye=ye+(oe>>>26)|0,J+=ye>>>26,ye&=67108863}H.words[le]=de,G=ye,ye=J}return G!==0?H.words[le]=G:H.length--,H.strip()}function A(q,z,H){var G=new g;return G.mulp(q,z,H)}u.prototype.mulTo=function(z,H){var G,J=this.length+z.length;return this.length===10&&z.length===10?G=k(this,z,H):J<63?G=M(this,z,H):J<1024?G=b(this,z,H):G=A(this,z,H),G};function g(q,z){this.x=q,this.y=z}g.prototype.makeRBT=function(z){for(var H=new Array(z),G=u.prototype._countBits(z)-1,J=0;J<z;J++)H[J]=this.revBin(J,G,z);return H},g.prototype.revBin=function(z,H,G){if(z===0||z===G-1)return z;for(var J=0,le=0;le<H;le++)J|=(z&1)<<H-le-1,z>>=1;return J},g.prototype.permute=function(z,H,G,J,le,ye){for(var de=0;de<ye;de++)J[de]=H[z[de]],le[de]=G[z[de]]},g.prototype.transform=function(z,H,G,J,le,ye){this.permute(ye,z,H,G,J,le);for(var de=1;de<le;de<<=1)for(var me=de<<1,W=Math.cos(2*Math.PI/me),ie=Math.sin(2*Math.PI/me),se=0;se<le;se+=me)for(var ee=W,pe=ie,oe=0;oe<de;oe++){var Y=G[se+oe],ce=J[se+oe],ue=G[se+oe+de],_e=J[se+oe+de],Le=ee*ue-pe*_e;_e=ee*_e+pe*ue,ue=Le,G[se+oe]=Y+ue,J[se+oe]=ce+_e,G[se+oe+de]=Y-ue,J[se+oe+de]=ce-_e,oe!==me&&(Le=W*ee-ie*pe,pe=W*pe+ie*ee,ee=Le)}},g.prototype.guessLen13b=function(z,H){var G=Math.max(H,z)|1,J=G&1,le=0;for(G=G/2|0;G;G=G>>>1)le++;return 1<<le+1+J},g.prototype.conjugate=function(z,H,G){if(!(G<=1))for(var J=0;J<G/2;J++){var le=z[J];z[J]=z[G-J-1],z[G-J-1]=le,le=H[J],H[J]=-H[G-J-1],H[G-J-1]=-le}},g.prototype.normalize13b=function(z,H){for(var G=0,J=0;J<H/2;J++){var le=Math.round(z[2*J+1]/H)*8192+Math.round(z[2*J]/H)+G;z[J]=le&67108863,le<67108864?G=0:G=le/67108864|0}return z},g.prototype.convert13b=function(z,H,G,J){for(var le=0,ye=0;ye<H;ye++)le=le+(z[ye]|0),G[2*ye]=le&8191,le=le>>>13,G[2*ye+1]=le&8191,le=le>>>13;for(ye=2*H;ye<J;++ye)G[ye]=0;s(le===0),s((le&-8192)===0)},g.prototype.stub=function(z){for(var H=new Array(z),G=0;G<z;G++)H[G]=0;return H},g.prototype.mulp=function(z,H,G){var J=2*this.guessLen13b(z.length,H.length),le=this.makeRBT(J),ye=this.stub(J),de=new Array(J),me=new Array(J),W=new Array(J),ie=new Array(J),se=new Array(J),ee=new Array(J),pe=G.words;pe.length=J,this.convert13b(z.words,z.length,de,J),this.convert13b(H.words,H.length,ie,J),this.transform(de,ye,me,W,J,le),this.transform(ie,ye,se,ee,J,le);for(var oe=0;oe<J;oe++){var Y=me[oe]*se[oe]-W[oe]*ee[oe];W[oe]=me[oe]*ee[oe]+W[oe]*se[oe],me[oe]=Y}return this.conjugate(me,W,J),this.transform(me,W,pe,ye,J,le),this.conjugate(pe,ye,J),this.normalize13b(pe,J),G.negative=z.negative^H.negative,G.length=z.length+H.length,G.strip()},u.prototype.mul=function(z){var H=new u(null);return H.words=new Array(this.length+z.length),this.mulTo(z,H)},u.prototype.mulf=function(z){var H=new u(null);return H.words=new Array(this.length+z.length),A(this,z,H)},u.prototype.imul=function(z){return this.clone().mulTo(z,this)},u.prototype.imuln=function(z){s(typeof z=="number"),s(z<67108864);for(var H=0,G=0;G<this.length;G++){var J=(this.words[G]|0)*z,le=(J&67108863)+(H&67108863);H>>=26,H+=J/67108864|0,H+=le>>>26,this.words[G]=le&67108863}return H!==0&&(this.words[G]=H,this.length++),this},u.prototype.muln=function(z){return this.clone().imuln(z)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(z){var H=T(z);if(H.length===0)return new u(1);for(var G=this,J=0;J<H.length&&H[J]===0;J++,G=G.sqr());if(++J<H.length)for(var le=G.sqr();J<H.length;J++,le=le.sqr())H[J]!==0&&(G=G.mul(le));return G},u.prototype.iushln=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26,J=67108863>>>26-H<<26-H,le;if(H!==0){var ye=0;for(le=0;le<this.length;le++){var de=this.words[le]&J,me=(this.words[le]|0)-de<<H;this.words[le]=me|ye,ye=de>>>26-H}ye&&(this.words[le]=ye,this.length++)}if(G!==0){for(le=this.length-1;le>=0;le--)this.words[le+G]=this.words[le];for(le=0;le<G;le++)this.words[le]=0;this.length+=G}return this.strip()},u.prototype.ishln=function(z){return s(this.negative===0),this.iushln(z)},u.prototype.iushrn=function(z,H,G){s(typeof z=="number"&&z>=0);var J;H?J=(H-H%26)/26:J=0;var le=z%26,ye=Math.min((z-le)/26,this.length),de=67108863^67108863>>>le<<le,me=G;if(J-=ye,J=Math.max(0,J),me){for(var W=0;W<ye;W++)me.words[W]=this.words[W];me.length=ye}if(ye!==0)if(this.length>ye)for(this.length-=ye,W=0;W<this.length;W++)this.words[W]=this.words[W+ye];else this.words[0]=0,this.length=1;var ie=0;for(W=this.length-1;W>=0&&(ie!==0||W>=J);W--){var se=this.words[W]|0;this.words[W]=ie<<26-le|se>>>le,ie=se&de}return me&&ie!==0&&(me.words[me.length++]=ie),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(z,H,G){return s(this.negative===0),this.iushrn(z,H,G)},u.prototype.shln=function(z){return this.clone().ishln(z)},u.prototype.ushln=function(z){return this.clone().iushln(z)},u.prototype.shrn=function(z){return this.clone().ishrn(z)},u.prototype.ushrn=function(z){return this.clone().iushrn(z)},u.prototype.testn=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26,J=1<<H;if(this.length<=G)return!1;var le=this.words[G];return!!(le&J)},u.prototype.imaskn=function(z){s(typeof z=="number"&&z>=0);var H=z%26,G=(z-H)/26;if(s(this.negative===0,"imaskn works only with positive numbers"),this.length<=G)return this;if(H!==0&&G++,this.length=Math.min(G,this.length),H!==0){var J=67108863^67108863>>>H<<H;this.words[this.length-1]&=J}return this.strip()},u.prototype.maskn=function(z){return this.clone().imaskn(z)},u.prototype.iaddn=function(z){return s(typeof z=="number"),s(z<67108864),z<0?this.isubn(-z):this.negative!==0?this.length===1&&(this.words[0]|0)<z?(this.words[0]=z-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(z),this.negative=1,this):this._iaddn(z)},u.prototype._iaddn=function(z){this.words[0]+=z;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},u.prototype.isubn=function(z){if(s(typeof z=="number"),s(z<67108864),z<0)return this.iaddn(-z);if(this.negative!==0)return this.negative=0,this.iaddn(z),this.negative=1,this;if(this.words[0]-=z,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this.strip()},u.prototype.addn=function(z){return this.clone().iaddn(z)},u.prototype.subn=function(z){return this.clone().isubn(z)},u.prototype.iabs=function(){return this.negative=0,this},u.prototype.abs=function(){return this.clone().iabs()},u.prototype._ishlnsubmul=function(z,H,G){var J=z.length+G,le;this._expand(J);var ye,de=0;for(le=0;le<z.length;le++){ye=(this.words[le+G]|0)+de;var me=(z.words[le]|0)*H;ye-=me&67108863,de=(ye>>26)-(me/67108864|0),this.words[le+G]=ye&67108863}for(;le<this.length-G;le++)ye=(this.words[le+G]|0)+de,de=ye>>26,this.words[le+G]=ye&67108863;if(de===0)return this.strip();for(s(de===-1),de=0,le=0;le<this.length;le++)ye=-(this.words[le]|0)+de,de=ye>>26,this.words[le]=ye&67108863;return this.negative=1,this.strip()},u.prototype._wordDiv=function(z,H){var G=this.length-z.length,J=this.clone(),le=z,ye=le.words[le.length-1]|0,de=this._countBits(ye);G=26-de,G!==0&&(le=le.ushln(G),J.iushln(G),ye=le.words[le.length-1]|0);var me=J.length-le.length,W;if(H!=="mod"){W=new u(null),W.length=me+1,W.words=new Array(W.length);for(var ie=0;ie<W.length;ie++)W.words[ie]=0}var se=J.clone()._ishlnsubmul(le,1,me);se.negative===0&&(J=se,W&&(W.words[me]=1));for(var ee=me-1;ee>=0;ee--){var pe=(J.words[le.length+ee]|0)*67108864+(J.words[le.length+ee-1]|0);for(pe=Math.min(pe/ye|0,67108863),J._ishlnsubmul(le,pe,ee);J.negative!==0;)pe--,J.negative=0,J._ishlnsubmul(le,1,ee),J.isZero()||(J.negative^=1);W&&(W.words[ee]=pe)}return W&&W.strip(),J.strip(),H!=="div"&&G!==0&&J.iushrn(G),{div:W||null,mod:J}},u.prototype.divmod=function(z,H,G){if(s(!z.isZero()),this.isZero())return{div:new u(0),mod:new u(0)};var J,le,ye;return this.negative!==0&&z.negative===0?(ye=this.neg().divmod(z,H),H!=="mod"&&(J=ye.div.neg()),H!=="div"&&(le=ye.mod.neg(),G&&le.negative!==0&&le.iadd(z)),{div:J,mod:le}):this.negative===0&&z.negative!==0?(ye=this.divmod(z.neg(),H),H!=="mod"&&(J=ye.div.neg()),{div:J,mod:ye.mod}):(this.negative&z.negative)!==0?(ye=this.neg().divmod(z.neg(),H),H!=="div"&&(le=ye.mod.neg(),G&&le.negative!==0&&le.isub(z)),{div:ye.div,mod:le}):z.length>this.length||this.cmp(z)<0?{div:new u(0),mod:this}:z.length===1?H==="div"?{div:this.divn(z.words[0]),mod:null}:H==="mod"?{div:null,mod:new u(this.modn(z.words[0]))}:{div:this.divn(z.words[0]),mod:new u(this.modn(z.words[0]))}:this._wordDiv(z,H)},u.prototype.div=function(z){return this.divmod(z,"div",!1).div},u.prototype.mod=function(z){return this.divmod(z,"mod",!1).mod},u.prototype.umod=function(z){return this.divmod(z,"mod",!0).mod},u.prototype.divRound=function(z){var H=this.divmod(z);if(H.mod.isZero())return H.div;var G=H.div.negative!==0?H.mod.isub(z):H.mod,J=z.ushrn(1),le=z.andln(1),ye=G.cmp(J);return ye<0||le===1&&ye===0?H.div:H.div.negative!==0?H.div.isubn(1):H.div.iaddn(1)},u.prototype.modn=function(z){s(z<=67108863);for(var H=(1<<26)%z,G=0,J=this.length-1;J>=0;J--)G=(H*G+(this.words[J]|0))%z;return G},u.prototype.idivn=function(z){s(z<=67108863);for(var H=0,G=this.length-1;G>=0;G--){var J=(this.words[G]|0)+H*67108864;this.words[G]=J/z|0,H=J%z}return this.strip()},u.prototype.divn=function(z){return this.clone().idivn(z)},u.prototype.egcd=function(z){s(z.negative===0),s(!z.isZero());var H=this,G=z.clone();H.negative!==0?H=H.umod(z):H=H.clone();for(var J=new u(1),le=new u(0),ye=new u(0),de=new u(1),me=0;H.isEven()&&G.isEven();)H.iushrn(1),G.iushrn(1),++me;for(var W=G.clone(),ie=H.clone();!H.isZero();){for(var se=0,ee=1;(H.words[0]&ee)===0&&se<26;++se,ee<<=1);if(se>0)for(H.iushrn(se);se-- >0;)(J.isOdd()||le.isOdd())&&(J.iadd(W),le.isub(ie)),J.iushrn(1),le.iushrn(1);for(var pe=0,oe=1;(G.words[0]&oe)===0&&pe<26;++pe,oe<<=1);if(pe>0)for(G.iushrn(pe);pe-- >0;)(ye.isOdd()||de.isOdd())&&(ye.iadd(W),de.isub(ie)),ye.iushrn(1),de.iushrn(1);H.cmp(G)>=0?(H.isub(G),J.isub(ye),le.isub(de)):(G.isub(H),ye.isub(J),de.isub(le))}return{a:ye,b:de,gcd:G.iushln(me)}},u.prototype._invmp=function(z){s(z.negative===0),s(!z.isZero());var H=this,G=z.clone();H.negative!==0?H=H.umod(z):H=H.clone();for(var J=new u(1),le=new u(0),ye=G.clone();H.cmpn(1)>0&&G.cmpn(1)>0;){for(var de=0,me=1;(H.words[0]&me)===0&&de<26;++de,me<<=1);if(de>0)for(H.iushrn(de);de-- >0;)J.isOdd()&&J.iadd(ye),J.iushrn(1);for(var W=0,ie=1;(G.words[0]&ie)===0&&W<26;++W,ie<<=1);if(W>0)for(G.iushrn(W);W-- >0;)le.isOdd()&&le.iadd(ye),le.iushrn(1);H.cmp(G)>=0?(H.isub(G),J.isub(le)):(G.isub(H),le.isub(J))}var se;return H.cmpn(1)===0?se=J:se=le,se.cmpn(0)<0&&se.iadd(z),se},u.prototype.gcd=function(z){if(this.isZero())return z.abs();if(z.isZero())return this.abs();var H=this.clone(),G=z.clone();H.negative=0,G.negative=0;for(var J=0;H.isEven()&&G.isEven();J++)H.iushrn(1),G.iushrn(1);do{for(;H.isEven();)H.iushrn(1);for(;G.isEven();)G.iushrn(1);var le=H.cmp(G);if(le<0){var ye=H;H=G,G=ye}else if(le===0||G.cmpn(1)===0)break;H.isub(G)}while(!0);return G.iushln(J)},u.prototype.invm=function(z){return this.egcd(z).a.umod(z)},u.prototype.isEven=function(){return(this.words[0]&1)===0},u.prototype.isOdd=function(){return(this.words[0]&1)===1},u.prototype.andln=function(z){return this.words[0]&z},u.prototype.bincn=function(z){s(typeof z=="number");var H=z%26,G=(z-H)/26,J=1<<H;if(this.length<=G)return this._expand(G+1),this.words[G]|=J,this;for(var le=J,ye=G;le!==0&&ye<this.length;ye++){var de=this.words[ye]|0;de+=le,le=de>>>26,de&=67108863,this.words[ye]=de}return le!==0&&(this.words[ye]=le,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(z){var H=z<0;if(this.negative!==0&&!H)return-1;if(this.negative===0&&H)return 1;this.strip();var G;if(this.length>1)G=1;else{H&&(z=-z),s(z<=67108863,"Number is too big");var J=this.words[0]|0;G=J===z?0:J<z?-1:1}return this.negative!==0?-G|0:G},u.prototype.cmp=function(z){if(this.negative!==0&&z.negative===0)return-1;if(this.negative===0&&z.negative!==0)return 1;var H=this.ucmp(z);return this.negative!==0?-H|0:H},u.prototype.ucmp=function(z){if(this.length>z.length)return 1;if(this.length<z.length)return-1;for(var H=0,G=this.length-1;G>=0;G--){var J=this.words[G]|0,le=z.words[G]|0;if(J!==le){J<le?H=-1:J>le&&(H=1);break}}return H},u.prototype.gtn=function(z){return this.cmpn(z)===1},u.prototype.gt=function(z){return this.cmp(z)===1},u.prototype.gten=function(z){return this.cmpn(z)>=0},u.prototype.gte=function(z){return this.cmp(z)>=0},u.prototype.ltn=function(z){return this.cmpn(z)===-1},u.prototype.lt=function(z){return this.cmp(z)===-1},u.prototype.lten=function(z){return this.cmpn(z)<=0},u.prototype.lte=function(z){return this.cmp(z)<=0},u.prototype.eqn=function(z){return this.cmpn(z)===0},u.prototype.eq=function(z){return this.cmp(z)===0},u.red=function(z){return new U(z)},u.prototype.toRed=function(z){return s(!this.red,"Already a number in reduction context"),s(this.negative===0,"red works only with positives"),z.convertTo(this)._forceRed(z)},u.prototype.fromRed=function(){return s(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(z){return this.red=z,this},u.prototype.forceRed=function(z){return s(!this.red,"Already a number in reduction context"),this._forceRed(z)},u.prototype.redAdd=function(z){return s(this.red,"redAdd works only with red numbers"),this.red.add(this,z)},u.prototype.redIAdd=function(z){return s(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,z)},u.prototype.redSub=function(z){return s(this.red,"redSub works only with red numbers"),this.red.sub(this,z)},u.prototype.redISub=function(z){return s(this.red,"redISub works only with red numbers"),this.red.isub(this,z)},u.prototype.redShl=function(z){return s(this.red,"redShl works only with red numbers"),this.red.shl(this,z)},u.prototype.redMul=function(z){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.mul(this,z)},u.prototype.redIMul=function(z){return s(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.imul(this,z)},u.prototype.redSqr=function(){return s(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return s(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return s(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return s(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return s(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(z){return s(this.red&&!z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,z)};var f={k256:null,p224:null,p192:null,p25519:null};function p(q,z){this.name=q,this.p=new u(z,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}p.prototype._tmp=function(){var z=new u(null);return z.words=new Array(Math.ceil(this.n/13)),z},p.prototype.ireduce=function(z){var H=z,G;do this.split(H,this.tmp),H=this.imulK(H),H=H.iadd(this.tmp),G=H.bitLength();while(G>this.n);var J=G<this.n?-1:H.ucmp(this.p);return J===0?(H.words[0]=0,H.length=1):J>0?H.isub(this.p):H.strip!==void 0?H.strip():H._strip(),H},p.prototype.split=function(z,H){z.iushrn(this.n,0,H)},p.prototype.imulK=function(z){return z.imul(this.k)};function x(){p.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,p),x.prototype.split=function(z,H){for(var G=4194303,J=Math.min(z.length,9),le=0;le<J;le++)H.words[le]=z.words[le];if(H.length=J,z.length<=9){z.words[0]=0,z.length=1;return}var ye=z.words[9];for(H.words[H.length++]=ye&G,le=10;le<z.length;le++){var de=z.words[le]|0;z.words[le-10]=(de&G)<<4|ye>>>22,ye=de}ye>>>=22,z.words[le-10]=ye,ye===0&&z.length>10?z.length-=10:z.length-=9},x.prototype.imulK=function(z){z.words[z.length]=0,z.words[z.length+1]=0,z.length+=2;for(var H=0,G=0;G<z.length;G++){var J=z.words[G]|0;H+=J*977,z.words[G]=H&67108863,H=J*64+(H/67108864|0)}return z.words[z.length-1]===0&&(z.length--,z.words[z.length-1]===0&&z.length--),z};function N(){p.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}o(N,p);function D(){p.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}o(D,p);function B(){p.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}o(B,p),B.prototype.imulK=function(z){for(var H=0,G=0;G<z.length;G++){var J=(z.words[G]|0)*19+H,le=J&67108863;J>>>=26,z.words[G]=le,H=J}return H!==0&&(z.words[z.length++]=H),z},u._prime=function(z){if(f[z])return f[z];var H;if(z==="k256")H=new x;else if(z==="p224")H=new N;else if(z==="p192")H=new D;else if(z==="p25519")H=new B;else throw new Error("Unknown prime "+z);return f[z]=H,H};function U(q){if(typeof q=="string"){var z=u._prime(q);this.m=z.p,this.prime=z}else s(q.gtn(1),"modulus must be greater than 1"),this.m=q,this.prime=null}U.prototype._verify1=function(z){s(z.negative===0,"red works only with positives"),s(z.red,"red works only with red numbers")},U.prototype._verify2=function(z,H){s((z.negative|H.negative)===0,"red works only with positives"),s(z.red&&z.red===H.red,"red works only with red numbers")},U.prototype.imod=function(z){return this.prime?this.prime.ireduce(z)._forceRed(this):z.umod(this.m)._forceRed(this)},U.prototype.neg=function(z){return z.isZero()?z.clone():this.m.sub(z)._forceRed(this)},U.prototype.add=function(z,H){this._verify2(z,H);var G=z.add(H);return G.cmp(this.m)>=0&&G.isub(this.m),G._forceRed(this)},U.prototype.iadd=function(z,H){this._verify2(z,H);var G=z.iadd(H);return G.cmp(this.m)>=0&&G.isub(this.m),G},U.prototype.sub=function(z,H){this._verify2(z,H);var G=z.sub(H);return G.cmpn(0)<0&&G.iadd(this.m),G._forceRed(this)},U.prototype.isub=function(z,H){this._verify2(z,H);var G=z.isub(H);return G.cmpn(0)<0&&G.iadd(this.m),G},U.prototype.shl=function(z,H){return this._verify1(z),this.imod(z.ushln(H))},U.prototype.imul=function(z,H){return this._verify2(z,H),this.imod(z.imul(H))},U.prototype.mul=function(z,H){return this._verify2(z,H),this.imod(z.mul(H))},U.prototype.isqr=function(z){return this.imul(z,z.clone())},U.prototype.sqr=function(z){return this.mul(z,z)},U.prototype.sqrt=function(z){if(z.isZero())return z.clone();var H=this.m.andln(3);if(s(H%2===1),H===3){var G=this.m.add(new u(1)).iushrn(2);return this.pow(z,G)}for(var J=this.m.subn(1),le=0;!J.isZero()&&J.andln(1)===0;)le++,J.iushrn(1);s(!J.isZero());var ye=new u(1).toRed(this),de=ye.redNeg(),me=this.m.subn(1).iushrn(1),W=this.m.bitLength();for(W=new u(2*W*W).toRed(this);this.pow(W,me).cmp(de)!==0;)W.redIAdd(de);for(var ie=this.pow(W,J),se=this.pow(z,J.addn(1).iushrn(1)),ee=this.pow(z,J),pe=le;ee.cmp(ye)!==0;){for(var oe=ee,Y=0;oe.cmp(ye)!==0;Y++)oe=oe.redSqr();s(Y<pe);var ce=this.pow(ie,new u(1).iushln(pe-Y-1));se=se.redMul(ce),ie=ce.redSqr(),ee=ee.redMul(ie),pe=Y}return se},U.prototype.invm=function(z){var H=z._invmp(this.m);return H.negative!==0?(H.negative=0,this.imod(H).redNeg()):this.imod(H)},U.prototype.pow=function(z,H){if(H.isZero())return new u(1).toRed(this);if(H.cmpn(1)===0)return z.clone();var G=4,J=new Array(1<<G);J[0]=new u(1).toRed(this),J[1]=z;for(var le=2;le<J.length;le++)J[le]=this.mul(J[le-1],z);var ye=J[0],de=0,me=0,W=H.bitLength()%26;for(W===0&&(W=26),le=H.length-1;le>=0;le--){for(var ie=H.words[le],se=W-1;se>=0;se--){var ee=ie>>se&1;if(ye!==J[0]&&(ye=this.sqr(ye)),ee===0&&de===0){me=0;continue}de<<=1,de|=ee,me++,!(me!==G&&(le!==0||se!==0))&&(ye=this.mul(ye,J[de]),me=0,de=0)}W=26}return ye},U.prototype.convertTo=function(z){var H=z.umod(this.m);return H===z?H.clone():H},U.prototype.convertFrom=function(z){var H=z.clone();return H.red=null,H},u.mont=function(z){return new V(z)};function V(q){U.call(this,q),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new u(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}o(V,U),V.prototype.convertTo=function(z){return this.imod(z.ushln(this.shift))},V.prototype.convertFrom=function(z){var H=this.imod(z.mul(this.rinv));return H.red=null,H},V.prototype.imul=function(z,H){if(z.isZero()||H.isZero())return z.words[0]=0,z.length=1,z;var G=z.imul(H),J=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),le=G.isub(J).iushrn(this.shift),ye=le;return le.cmp(this.m)>=0?ye=le.isub(this.m):le.cmpn(0)<0&&(ye=le.iadd(this.m)),ye._forceRed(this)},V.prototype.mul=function(z,H){if(z.isZero()||H.isZero())return new u(0)._forceRed(this);var G=z.mul(H),J=G.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),le=G.isub(J).iushrn(this.shift),ye=le;return le.cmp(this.m)>=0?ye=le.isub(this.m):le.cmpn(0)<0&&(ye=le.iadd(this.m)),ye._forceRed(this)},V.prototype.invm=function(z){var H=this.imod(z._invmp(this.m).mul(this.r2));return H._forceRed(this)}})(t,this)}),6860:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]-i[0],a[1]=l[1]-i[1],a[2]=l[2]-i[2],a[3]=l[3]-i[3],a}}),6864:(function(t){t.exports=r;function r(){var a=new Float32Array(16);return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),6867:(function(t,r,a){t.exports=c;var l=a(1888),i=a(855),s=a(7150);function o(_,T){for(var M=0;M<_;++M)if(!(T[M]<=T[M+_]))return!0;return!1}function u(_,T,M,k){for(var b=0,A=0,g=0,f=_.length;g<f;++g){var p=_[g];if(!o(T,p)){for(var x=0;x<2*T;++x)M[b++]=p[x];k[A++]=g}}return A}function d(_,T,M,k){var b=_.length,A=T.length;if(!(b<=0||A<=0)){var g=_[0].length>>>1;if(!(g<=0)){var f,p=l.mallocDouble(2*g*b),x=l.mallocInt32(b);if(b=u(_,g,p,x),b>0){if(g===1&&k)i.init(b),f=i.sweepComplete(g,M,0,b,p,x,0,b,p,x);else{var N=l.mallocDouble(2*g*A),D=l.mallocInt32(A);A=u(T,g,N,D),A>0&&(i.init(b+A),g===1?f=i.sweepBipartite(g,M,0,b,p,x,0,A,N,D):f=s(g,M,k,b,p,x,A,N,D),l.free(N),l.free(D))}l.free(p),l.free(x)}return f}}}var h;function y(_,T){h.push([_,T])}function m(_){return h=[],d(_,_,y,!0),h}function E(_,T){return h=[],d(_,T,y,!1),h}function c(_,T,M){switch(arguments.length){case 1:return m(_);case 2:return typeof T=="function"?d(_,_,T,!0):E(_,T);case 3:return d(_,T,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),6894:(function(t){t.exports=r;function r(a,l,i,s){var o=i[1],u=i[2],d=l[1]-o,h=l[2]-u,y=Math.sin(s),m=Math.cos(s);return a[0]=l[0],a[1]=o+d*m-h*y,a[2]=u+d*y+h*m,a}}),7004:(function(t){t.exports=r;function r(a){for(var l=a.length,i=a[a.length-1],s=l,o=l-2;o>=0;--o){var u=i,d=a[o];i=u+d;var h=i-u,y=d-h;y&&(a[--s]=i,i=y)}for(var m=0,o=s;o<l;++o){var u=a[o],d=i;i=u+d;var h=i-u,y=d-h;y&&(a[m++]=y)}return a[m++]=i,a.length=m,a}}),7056:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2];return Math.sqrt(i*i+s*s+o*o)}}),7089:(function(t){t.exports=r;function r(a,l,i){var s=Math.sin(i),o=Math.cos(i),u=l[0],d=l[1],h=l[2],y=l[3],m=l[4],E=l[5],c=l[6],_=l[7];return l!==a&&(a[8]=l[8],a[9]=l[9],a[10]=l[10],a[11]=l[11],a[12]=l[12],a[13]=l[13],a[14]=l[14],a[15]=l[15]),a[0]=u*o+m*s,a[1]=d*o+E*s,a[2]=h*o+c*s,a[3]=y*o+_*s,a[4]=m*o-u*s,a[5]=E*o-d*s,a[6]=c*o-h*s,a[7]=_*o-y*s,a}}),7150:(function(t,r,a){t.exports=q;var l=a(1888),i=a(8828),s=a(2455),o=s.partial,u=s.full,d=a(855),h=a(3545),y=a(8105),m=128,E=1<<22,c=1<<22,_=y("!(lo>=p0)&&!(p1>=hi)"),T=y("lo===p0"),M=y("lo<p0"),k=y("hi<=p0"),b=y("lo<=p0&&p0<=hi"),A=y("lo<p0&&p0<=hi"),g=6,f=2,p=1024,x=l.mallocInt32(p),N=l.mallocDouble(p);function D(z,H){var G=8*i.log2(H+1)*(z+1)|0,J=i.nextPow2(g*G);x.length<J&&(l.free(x),x=l.mallocInt32(J));var le=i.nextPow2(f*G);N.length<le&&(l.free(N),N=l.mallocDouble(le))}function B(z,H,G,J,le,ye,de,me,W){var ie=g*z;x[ie]=H,x[ie+1]=G,x[ie+2]=J,x[ie+3]=le,x[ie+4]=ye,x[ie+5]=de;var se=f*z;N[se]=me,N[se+1]=W}function U(z,H,G,J,le,ye,de,me,W,ie,se){var ee=2*z,pe=W*ee,oe=ie[pe+H];e:for(var Y=le,ce=le*ee;Y<ye;++Y,ce+=ee){var ue=de[ce+H],_e=de[ce+H+z];if(!(oe<ue||_e<oe)&&!(J&&oe===ue)){for(var Le=me[Y],ze=H+1;ze<z;++ze){var ue=de[ce+ze],_e=de[ce+ze+z],Ge=ie[pe+ze],Ve=ie[pe+ze+z];if(_e<Ge||Ve<ue)continue e}var rt;if(J?rt=G(se,Le):rt=G(Le,se),rt!==void 0)return rt}}}function V(z,H,G,J,le,ye,de,me,W,ie){var se=2*z,ee=me*se,pe=W[ee+H];e:for(var oe=J,Y=J*se;oe<le;++oe,Y+=se){var ce=de[oe];if(ce!==ie){var ue=ye[Y+H],_e=ye[Y+H+z];if(!(pe<ue||_e<pe)){for(var Le=H+1;Le<z;++Le){var ue=ye[Y+Le],_e=ye[Y+Le+z],ze=W[ee+Le],Ge=W[ee+Le+z];if(_e<ze||Ge<ue)continue e}var Ve=G(ce,ie);if(Ve!==void 0)return Ve}}}}function q(z,H,G,J,le,ye,de,me,W){D(z,J+de);var ie=0,se=2*z,ee;for(B(ie++,0,0,J,0,de,G?16:0,-1/0,1/0),G||B(ie++,0,0,de,0,J,1,-1/0,1/0);ie>0;){ie-=1;var pe=ie*g,oe=x[pe],Y=x[pe+1],ce=x[pe+2],ue=x[pe+3],_e=x[pe+4],Le=x[pe+5],ze=ie*f,Ge=N[ze],Ve=N[ze+1],rt=Le&1,pt=!!(Le&16),gt=le,ht=ye,lt=me,Fe=W;if(rt&&(gt=me,ht=W,lt=le,Fe=ye),!(Le&2&&(ce=M(z,oe,Y,ce,gt,ht,Ve),Y>=ce))&&!(Le&4&&(Y=k(z,oe,Y,ce,gt,ht,Ge),Y>=ce))){var Pe=ce-Y,be=_e-ue;if(pt){if(z*Pe*(Pe+be)<c){if(ee=d.scanComplete(z,oe,H,Y,ce,gt,ht,ue,_e,lt,Fe),ee!==void 0)return ee;continue}}else if(z*Math.min(Pe,be)<m){if(ee=o(z,oe,H,rt,Y,ce,gt,ht,ue,_e,lt,Fe),ee!==void 0)return ee;continue}else if(z*Pe*be<E){if(ee=d.scanBipartite(z,oe,H,rt,Y,ce,gt,ht,ue,_e,lt,Fe),ee!==void 0)return ee;continue}var Ye=_(z,oe,Y,ce,gt,ht,Ge,Ve);if(Y<Ye)if(z*(Ye-Y)<m){if(ee=u(z,oe+1,H,Y,Ye,gt,ht,ue,_e,lt,Fe),ee!==void 0)return ee}else if(oe===z-2){if(rt?ee=d.sweepBipartite(z,H,ue,_e,lt,Fe,Y,Ye,gt,ht):ee=d.sweepBipartite(z,H,Y,Ye,gt,ht,ue,_e,lt,Fe),ee!==void 0)return ee}else B(ie++,oe+1,Y,Ye,ue,_e,rt,-1/0,1/0),B(ie++,oe+1,ue,_e,Y,Ye,rt^1,-1/0,1/0);if(Ye<ce){var mt=h(z,oe,ue,_e,lt,Fe),bt=lt[se*mt+oe],ft=T(z,oe,mt,_e,lt,Fe,bt);if(ft<_e&&B(ie++,oe,Ye,ce,ft,_e,(rt|4)+(pt?16:0),bt,Ve),ue<mt&&B(ie++,oe,Ye,ce,ue,mt,(rt|2)+(pt?16:0),Ge,bt),mt+1===ft){if(pt?ee=V(z,oe,H,Ye,ce,gt,ht,mt,lt,Fe[mt]):ee=U(z,oe,H,rt,Ye,ce,gt,ht,mt,lt,Fe[mt]),ee!==void 0)return ee}else if(mt<ft){var Wt;if(pt){if(Wt=b(z,oe,Ye,ce,gt,ht,bt),Ye<Wt){var Zt=T(z,oe,Ye,Wt,gt,ht,bt);if(oe===z-2){if(Ye<Zt&&(ee=d.sweepComplete(z,H,Ye,Zt,gt,ht,mt,ft,lt,Fe),ee!==void 0)||Zt<Wt&&(ee=d.sweepBipartite(z,H,Zt,Wt,gt,ht,mt,ft,lt,Fe),ee!==void 0))return ee}else Ye<Zt&&B(ie++,oe+1,Ye,Zt,mt,ft,16,-1/0,1/0),Zt<Wt&&(B(ie++,oe+1,Zt,Wt,mt,ft,0,-1/0,1/0),B(ie++,oe+1,mt,ft,Zt,Wt,1,-1/0,1/0))}}else rt?Wt=A(z,oe,Ye,ce,gt,ht,bt):Wt=b(z,oe,Ye,ce,gt,ht,bt),Ye<Wt&&(oe===z-2?rt?ee=d.sweepBipartite(z,H,mt,ft,lt,Fe,Ye,Wt,gt,ht):ee=d.sweepBipartite(z,H,Ye,Wt,gt,ht,mt,ft,lt,Fe):(B(ie++,oe+1,Ye,Wt,mt,ft,rt,-1/0,1/0),B(ie++,oe+1,mt,ft,Ye,Wt,rt^1,-1/0,1/0)))}}}}}}),7163:(function(t){t.exports=function(l){return l!=null&&(r(l)||a(l)||!!l._isBuffer)};function r(l){return!!l.constructor&&typeof l.constructor.isBuffer=="function"&&l.constructor.isBuffer(l)}function a(l){return typeof l.readFloatLE=="function"&&typeof l.slice=="function"&&r(l.slice(0,0))}}),7169:(function(t,r,a){var l=typeof WeakMap>"u"?a(1538):WeakMap,i=a(2762),s=a(8116),o=new l;function u(d){var h=o.get(d),y=h&&(h._triangleBuffer.handle||h._triangleBuffer.buffer);if(!y||!d.isBuffer(y)){var m=i(d,new Float32Array([-1,-1,-1,4,4,-1]));h=s(d,[{buffer:m,type:d.FLOAT,size:2}]),h._triangleBuffer=m,o.set(d,h)}h.bind(),d.drawArrays(d.TRIANGLES,0,3),h.unbind()}t.exports=u}),7182:(function(t,r,a){var l={identity:a(7894),translate:a(7656),multiply:a(6760),create:a(6864),scale:a(2504),fromRotationTranslation:a(6743)};l.create();var i=l.create();t.exports=function(o,u,d,h,y,m){return l.identity(o),l.fromRotationTranslation(o,m,u),o[3]=y[0],o[7]=y[1],o[11]=y[2],o[15]=y[3],l.identity(i),h[2]!==0&&(i[9]=h[2],l.multiply(o,o,i)),h[1]!==0&&(i[9]=0,i[8]=h[1],l.multiply(o,o,i)),h[0]!==0&&(i[8]=0,i[4]=h[0],l.multiply(o,o,i)),l.scale(o,o,d),o}}),7201:(function(t,r,a){var l=1e-6,i=1e-6,s=a(9405),o=a(2762),u=a(8116),d=a(7766),h=a(8406),y=a(6760),m=a(7608),E=a(9618),c=a(6729),_=a(7765),T=a(1888),M=a(840),k=a(7626),b=M.meshShader,A=M.wireShader,g=M.pointShader,f=M.pickShader,p=M.pointPickShader,x=M.contourShader,N=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(me,W,ie,se,ee,pe,oe,Y,ce,ue,_e,Le,ze,Ge,Ve,rt,pt,gt,ht,lt,Fe,Pe,be,Ye,mt,bt,ft){this.gl=me,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=W,this.dirty=!0,this.triShader=ie,this.lineShader=se,this.pointShader=ee,this.pickShader=pe,this.pointPickShader=oe,this.contourShader=Y,this.trianglePositions=ce,this.triangleColors=_e,this.triangleNormals=ze,this.triangleUVs=Le,this.triangleIds=ue,this.triangleVAO=Ge,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Ve,this.edgeColors=pt,this.edgeUVs=gt,this.edgeIds=rt,this.edgeVAO=ht,this.edgeCount=0,this.pointPositions=lt,this.pointColors=Pe,this.pointUVs=be,this.pointSizes=Ye,this.pointIds=Fe,this.pointVAO=mt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=bt,this.contourVAO=ft,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=N,this._view=N,this._projection=N,this._resolution=[1,1]}var B=D.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(me){this.pickId=me};function U(me,W){if(!W||!W.length)return 1;for(var ie=0;ie<W.length;++ie){if(W.length<2)return 1;if(W[ie][0]===me)return W[ie][1];if(W[ie][0]>me&&ie>0){var se=(W[ie][0]-me)/(W[ie][0]-W[ie-1][0]);return W[ie][1]*(1-se)+se*W[ie-1][1]}}return 1}function V(me,W){for(var ie=c({colormap:me,nshades:256,format:"rgba"}),se=new Uint8Array(256*4),ee=0;ee<256;++ee){for(var pe=ie[ee],oe=0;oe<3;++oe)se[4*ee+oe]=pe[oe];W?se[4*ee+3]=255*U(ee/255,W):se[4*ee+3]=255*pe[3]}return E(se,[256,256,4],[4,0,1])}function q(me){for(var W=me.length,ie=new Array(W),se=0;se<W;++se)ie[se]=me[se][2];return ie}B.highlight=function(me){if(!me||!this.contourEnable){this.contourCount=0;return}for(var W=_(this.cells,this.intensity,me.intensity),ie=W.cells,se=W.vertexIds,ee=W.vertexWeights,pe=ie.length,oe=T.mallocFloat32(6*pe),Y=0,ce=0;ce<pe;++ce)for(var ue=ie[ce],_e=0;_e<2;++_e){var Le=ue[0];ue.length===2&&(Le=ue[_e]);for(var ze=se[Le][0],Ge=se[Le][1],Ve=ee[Le],rt=1-Ve,pt=this.positions[ze],gt=this.positions[Ge],ht=0;ht<3;++ht)oe[Y++]=Ve*pt[ht]+rt*gt[ht]}this.contourCount=Y/3|0,this.contourPositions.update(oe.subarray(0,Y)),T.free(oe)},B.update=function(me){me=me||{};var W=this.gl;this.dirty=!0,"contourEnable"in me&&(this.contourEnable=me.contourEnable),"contourColor"in me&&(this.contourColor=me.contourColor),"lineWidth"in me&&(this.lineWidth=me.lineWidth),"lightPosition"in me&&(this.lightPosition=me.lightPosition),this.hasAlpha=!1,"opacity"in me&&(this.opacity=me.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in me&&(this.opacityscale=me.opacityscale,this.hasAlpha=!0),"ambient"in me&&(this.ambientLight=me.ambient),"diffuse"in me&&(this.diffuseLight=me.diffuse),"specular"in me&&(this.specularLight=me.specular),"roughness"in me&&(this.roughness=me.roughness),"fresnel"in me&&(this.fresnel=me.fresnel),me.texture?(this.texture.dispose(),this.texture=d(W,me.texture)):me.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=W.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=W.LINEAR,this.texture.setPixels(V(me.colormap,this.opacityscale)),this.texture.generateMipmap());var ie=me.cells,se=me.positions;if(!(!se||!ie)){var ee=[],pe=[],oe=[],Y=[],ce=[],ue=[],_e=[],Le=[],ze=[],Ge=[],Ve=[],rt=[],pt=[],gt=[];this.cells=ie,this.positions=se;var ht=me.vertexNormals,lt=me.cellNormals,Fe=me.vertexNormalsEpsilon===void 0?l:me.vertexNormalsEpsilon,Pe=me.faceNormalsEpsilon===void 0?i:me.faceNormalsEpsilon;me.useFacetNormals&&!lt&&(lt=h.faceNormals(ie,se,Pe)),!lt&&!ht&&(ht=h.vertexNormals(ie,se,Fe));var be=me.vertexColors,Ye=me.cellColors,mt=me.meshColor||[1,1,1,1],bt=me.vertexUVs,ft=me.vertexIntensity,Wt=me.cellUVs,Zt=me.cellIntensity,cr=1/0,pr=-1/0;if(!bt&&!Wt)if(ft)if(me.vertexIntensityBounds)cr=+me.vertexIntensityBounds[0],pr=+me.vertexIntensityBounds[1];else for(var Br=0;Br<ft.length;++Br){var Fr=ft[Br];cr=Math.min(cr,Fr),pr=Math.max(pr,Fr)}else if(Zt)if(me.cellIntensityBounds)cr=+me.cellIntensityBounds[0],pr=+me.cellIntensityBounds[1];else for(var Br=0;Br<Zt.length;++Br){var Fr=Zt[Br];cr=Math.min(cr,Fr),pr=Math.max(pr,Fr)}else for(var Br=0;Br<se.length;++Br){var Fr=se[Br][2];cr=Math.min(cr,Fr),pr=Math.max(pr,Fr)}ft?this.intensity=ft:Zt?this.intensity=Zt:this.intensity=q(se),this.pickVertex=!(Zt||Ye);var cn=me.pointSizes,Nr=me.pointSize||1;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var Br=0;Br<se.length;++Br)for(var Jr=se[Br],Dt=0;Dt<3;++Dt)isNaN(Jr[Dt])||!isFinite(Jr[Dt])||(this.bounds[0][Dt]=Math.min(this.bounds[0][Dt],Jr[Dt]),this.bounds[1][Dt]=Math.max(this.bounds[1][Dt],Jr[Dt]));var $e=0,ot=0,De=0;e:for(var Br=0;Br<ie.length;++Br){var Ee=ie[Br];switch(Ee.length){case 1:for(var Ae=Ee[0],Jr=se[Ae],Dt=0;Dt<3;++Dt)if(isNaN(Jr[Dt])||!isFinite(Jr[Dt]))continue e;Ge.push(Jr[0],Jr[1],Jr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Br]:Ie=mt,this.opacityscale&&ft?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ft[Ae]-cr)/(pr-cr),this.opacityscale)):Ie.length===3?Ve.push(Ie[0],Ie[1],Ie[2],this.opacity):(Ve.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var tt;bt?tt=bt[Ae]:ft?tt=[(ft[Ae]-cr)/(pr-cr),0]:Wt?tt=Wt[Br]:Zt?tt=[(Zt[Br]-cr)/(pr-cr),0]:tt=[(Jr[2]-cr)/(pr-cr),0],rt.push(tt[0],tt[1]),cn?pt.push(cn[Ae]):pt.push(Nr),gt.push(Br),De+=1;break;case 2:for(var Dt=0;Dt<2;++Dt)for(var Ae=Ee[Dt],Jr=se[Ae],st=0;st<3;++st)if(isNaN(Jr[st])||!isFinite(Jr[st]))continue e;for(var Dt=0;Dt<2;++Dt){var Ae=Ee[Dt],Jr=se[Ae];ue.push(Jr[0],Jr[1],Jr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Br]:Ie=mt,this.opacityscale&&ft?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ft[Ae]-cr)/(pr-cr),this.opacityscale)):Ie.length===3?_e.push(Ie[0],Ie[1],Ie[2],this.opacity):(_e.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0));var tt;bt?tt=bt[Ae]:ft?tt=[(ft[Ae]-cr)/(pr-cr),0]:Wt?tt=Wt[Br]:Zt?tt=[(Zt[Br]-cr)/(pr-cr),0]:tt=[(Jr[2]-cr)/(pr-cr),0],Le.push(tt[0],tt[1]),ze.push(Br)}ot+=1;break;case 3:for(var Dt=0;Dt<3;++Dt)for(var Ae=Ee[Dt],Jr=se[Ae],st=0;st<3;++st)if(isNaN(Jr[st])||!isFinite(Jr[st]))continue e;for(var Dt=0;Dt<3;++Dt){var Ae=Ee[2-Dt],Jr=se[Ae];ee.push(Jr[0],Jr[1],Jr[2]);var Ie;be?Ie=be[Ae]:Ye?Ie=Ye[Br]:Ie=mt,Ie?this.opacityscale&&ft?pe.push(Ie[0],Ie[1],Ie[2],this.opacity*U((ft[Ae]-cr)/(pr-cr),this.opacityscale)):Ie.length===3?pe.push(Ie[0],Ie[1],Ie[2],this.opacity):(pe.push(Ie[0],Ie[1],Ie[2],Ie[3]*this.opacity),Ie[3]<1&&(this.hasAlpha=!0)):pe.push(.5,.5,.5,1);var tt;bt?tt=bt[Ae]:ft?tt=[(ft[Ae]-cr)/(pr-cr),0]:Wt?tt=Wt[Br]:Zt?tt=[(Zt[Br]-cr)/(pr-cr),0]:tt=[(Jr[2]-cr)/(pr-cr),0],Y.push(tt[0],tt[1]);var Ft;ht?Ft=ht[Ae]:Ft=lt[Br],oe.push(Ft[0],Ft[1],Ft[2]),ce.push(Br)}$e+=1;break}}this.pointCount=De,this.edgeCount=ot,this.triangleCount=$e,this.pointPositions.update(Ge),this.pointColors.update(Ve),this.pointUVs.update(rt),this.pointSizes.update(pt),this.pointIds.update(new Uint32Array(gt)),this.edgePositions.update(ue),this.edgeColors.update(_e),this.edgeUVs.update(Le),this.edgeIds.update(new Uint32Array(ze)),this.trianglePositions.update(ee),this.triangleColors.update(pe),this.triangleUVs.update(Y),this.triangleNormals.update(oe),this.triangleIds.update(new Uint32Array(ce))}},B.drawTransparent=B.draw=function(me){me=me||{};for(var W=this.gl,ie=me.model||N,se=me.view||N,ee=me.projection||N,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],oe=0;oe<3;++oe)pe[0][oe]=Math.max(pe[0][oe],this.clipBounds[0][oe]),pe[1][oe]=Math.min(pe[1][oe],this.clipBounds[1][oe]);var Y={model:ie,view:se,projection:ee,inverseModel:N.slice(),clipBounds:pe,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],contourColor:this.contourColor,texture:0};Y.inverseModel=m(Y.inverseModel,Y.model),W.disable(W.CULL_FACE),this.texture.bind(0);var ce=new Array(16);y(ce,Y.view,Y.model),y(ce,Y.projection,ce),m(ce,ce);for(var oe=0;oe<3;++oe)Y.eyePosition[oe]=ce[12+oe]/ce[15];for(var ue=ce[15],oe=0;oe<3;++oe)ue+=this.lightPosition[oe]*ce[4*oe+3];for(var oe=0;oe<3;++oe){for(var _e=ce[12+oe],Le=0;Le<3;++Le)_e+=ce[4*Le+oe]*this.lightPosition[Le];Y.lightPosition[oe]=_e/ue}if(this.triangleCount>0){var ze=this.triShader;ze.bind(),ze.uniforms=Y,this.triangleVAO.bind(),W.drawArrays(W.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ze=this.lineShader;ze.bind(),ze.uniforms=Y,this.edgeVAO.bind(),W.lineWidth(this.lineWidth*this.pixelRatio),W.drawArrays(W.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ze=this.pointShader;ze.bind(),ze.uniforms=Y,this.pointVAO.bind(),W.drawArrays(W.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ze=this.contourShader;ze.bind(),ze.uniforms=Y,this.contourVAO.bind(),W.drawArrays(W.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(me){me=me||{};for(var W=this.gl,ie=me.model||N,se=me.view||N,ee=me.projection||N,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],oe=0;oe<3;++oe)pe[0][oe]=Math.max(pe[0][oe],this.clipBounds[0][oe]),pe[1][oe]=Math.min(pe[1][oe],this.clipBounds[1][oe]);this._model=[].slice.call(ie),this._view=[].slice.call(se),this._projection=[].slice.call(ee),this._resolution=[W.drawingBufferWidth,W.drawingBufferHeight];var Y={model:ie,view:se,projection:ee,clipBounds:pe,pickId:this.pickId/255},ce=this.pickShader;if(ce.bind(),ce.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),W.drawArrays(W.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),W.lineWidth(this.lineWidth*this.pixelRatio),W.drawArrays(W.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ce=this.pointPickShader;ce.bind(),ce.uniforms=Y,this.pointVAO.bind(),W.drawArrays(W.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(me){if(!me||me.id!==this.pickId)return null;for(var W=me.value[0]+256*me.value[1]+65536*me.value[2],ie=this.cells[W],se=this.positions,ee=new Array(ie.length),pe=0;pe<ie.length;++pe)ee[pe]=se[ie[pe]];var oe=me.coord[0],Y=me.coord[1];if(!this.pickVertex){var ce=this.positions[ie[0]],ue=this.positions[ie[1]],_e=this.positions[ie[2]],Le=[(ce[0]+ue[0]+_e[0])/3,(ce[1]+ue[1]+_e[1])/3,(ce[2]+ue[2]+_e[2])/3];return{_cellCenter:!0,position:[oe,Y],index:W,cell:ie,cellId:W,intensity:this.intensity[W],dataCoordinate:Le}}var ze=k(ee,[oe*this.pixelRatio,this._resolution[1]-Y*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!ze)return null;for(var Ge=ze[2],Ve=0,pe=0;pe<ie.length;++pe)Ve+=Ge[pe]*this.intensity[ie[pe]];return{position:ze[1],index:ie[ze[0]],cell:ie,cellId:W,intensity:Ve,dataCoordinate:this.positions[ie[ze[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function z(me){var W=s(me,b.vertex,b.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W.attributes.normal.location=4,W}function H(me){var W=s(me,A.vertex,A.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W}function G(me){var W=s(me,g.vertex,g.fragment);return W.attributes.position.location=0,W.attributes.color.location=2,W.attributes.uv.location=3,W.attributes.pointSize.location=4,W}function J(me){var W=s(me,f.vertex,f.fragment);return W.attributes.position.location=0,W.attributes.id.location=1,W}function le(me){var W=s(me,p.vertex,p.fragment);return W.attributes.position.location=0,W.attributes.id.location=1,W.attributes.pointSize.location=4,W}function ye(me){var W=s(me,x.vertex,x.fragment);return W.attributes.position.location=0,W}function de(me,W){arguments.length===1&&(W=me,me=W.gl);var ie=me.getExtension("OES_standard_derivatives")||me.getExtension("MOZ_OES_standard_derivatives")||me.getExtension("WEBKIT_OES_standard_derivatives");if(!ie)throw new Error("derivatives not supported");var se=z(me),ee=H(me),pe=G(me),oe=J(me),Y=le(me),ce=ye(me),ue=d(me,E(new Uint8Array([255,255,255,255]),[1,1,4]));ue.generateMipmap(),ue.minFilter=me.LINEAR_MIPMAP_LINEAR,ue.magFilter=me.LINEAR;var _e=o(me),Le=o(me),ze=o(me),Ge=o(me),Ve=o(me),rt=u(me,[{buffer:_e,type:me.FLOAT,size:3},{buffer:Ve,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Le,type:me.FLOAT,size:4},{buffer:ze,type:me.FLOAT,size:2},{buffer:Ge,type:me.FLOAT,size:3}]),pt=o(me),gt=o(me),ht=o(me),lt=o(me),Fe=u(me,[{buffer:pt,type:me.FLOAT,size:3},{buffer:lt,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:gt,type:me.FLOAT,size:4},{buffer:ht,type:me.FLOAT,size:2}]),Pe=o(me),be=o(me),Ye=o(me),mt=o(me),bt=o(me),ft=u(me,[{buffer:Pe,type:me.FLOAT,size:3},{buffer:bt,type:me.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:be,type:me.FLOAT,size:4},{buffer:Ye,type:me.FLOAT,size:2},{buffer:mt,type:me.FLOAT,size:1}]),Wt=o(me),Zt=u(me,[{buffer:Wt,type:me.FLOAT,size:3}]),cr=new D(me,ue,se,ee,pe,oe,Y,ce,_e,Ve,Le,ze,Ge,rt,pt,lt,gt,ht,Fe,Pe,bt,be,Ye,mt,ft,Wt,Zt);return cr.update(W),cr}t.exports=de}),7261:(function(t,r,a){t.exports=T;var l=a(9215),i=a(7608),s=a(6079),o=a(5911),u=a(3536),d=a(244);function h(M,k,b){return Math.sqrt(Math.pow(M,2)+Math.pow(k,2)+Math.pow(b,2))}function y(M){return Math.min(1,Math.max(-1,M))}function m(M){var k=Math.abs(M[0]),b=Math.abs(M[1]),A=Math.abs(M[2]),g=[0,0,0];k>Math.max(b,A)?g[2]=1:b>Math.max(k,A)?g[0]=1:g[1]=1;for(var f=0,p=0,x=0;x<3;++x)f+=M[x]*M[x],p+=g[x]*M[x];for(var x=0;x<3;++x)g[x]-=p/f*M[x];return u(g,g),g}function E(M,k,b,A,g,f,p,x){this.center=l(b),this.up=l(A),this.right=l(g),this.radius=l([f]),this.angle=l([p,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,k),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 N=0;N<16;++N)this.computedMatrix[N]=.5;this.recalcMatrix(0)}var c=E.prototype;c.setDistanceLimits=function(M,k){M>0?M=Math.log(M):M=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=k},c.getDistanceLimits=function(M){var k=this.radius.bounds[0];return M?(M[0]=Math.exp(k[0][0]),M[1]=Math.exp(k[1][0]),M):[Math.exp(k[0][0]),Math.exp(k[1][0])]},c.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var k=this.computedUp,b=this.computedRight,A=0,g=0,f=0;f<3;++f)g+=k[f]*b[f],A+=k[f]*k[f];for(var p=Math.sqrt(A),x=0,f=0;f<3;++f)b[f]-=k[f]*g/A,x+=b[f]*b[f],k[f]/=p;for(var N=Math.sqrt(x),f=0;f<3;++f)b[f]/=N;var D=this.computedToward;o(D,k,b),u(D,D);for(var B=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],V=this.computedAngle[1],q=Math.cos(U),z=Math.sin(U),H=Math.cos(V),G=Math.sin(V),J=this.computedCenter,le=q*H,ye=z*H,de=G,me=-q*G,W=-z*G,ie=H,se=this.computedEye,ee=this.computedMatrix,f=0;f<3;++f){var pe=le*b[f]+ye*D[f]+de*k[f];ee[4*f+1]=me*b[f]+W*D[f]+ie*k[f],ee[4*f+2]=pe,ee[4*f+3]=0}var oe=ee[1],Y=ee[5],ce=ee[9],ue=ee[2],_e=ee[6],Le=ee[10],ze=Y*Le-ce*_e,Ge=ce*ue-oe*Le,Ve=oe*_e-Y*ue,rt=h(ze,Ge,Ve);ze/=rt,Ge/=rt,Ve/=rt,ee[0]=ze,ee[4]=Ge,ee[8]=Ve;for(var f=0;f<3;++f)se[f]=J[f]+ee[2+4*f]*B;for(var f=0;f<3;++f){for(var x=0,pt=0;pt<3;++pt)x+=ee[f+4*pt]*se[pt];ee[12+f]=-x}ee[15]=1},c.getMatrix=function(M,k){this.recalcMatrix(M);var b=this.computedMatrix;if(k){for(var A=0;A<16;++A)k[A]=b[A];return k}return b};var _=[0,0,0];c.rotate=function(M,k,b,A){if(this.angle.move(M,k,b),A){this.recalcMatrix(M);var g=this.computedMatrix;_[0]=g[2],_[1]=g[6],_[2]=g[10];for(var f=this.computedUp,p=this.computedRight,x=this.computedToward,N=0;N<3;++N)g[4*N]=f[N],g[4*N+1]=p[N],g[4*N+2]=x[N];s(g,g,A,_);for(var N=0;N<3;++N)f[N]=g[4*N],p[N]=g[4*N+1];this.up.set(M,f[0],f[1],f[2]),this.right.set(M,p[0],p[1],p[2])}},c.pan=function(M,k,b,A){k=k||0,b=b||0,A=A||0,this.recalcMatrix(M);var g=this.computedMatrix;Math.exp(this.computedRadius[0]);var f=g[1],p=g[5],x=g[9],N=h(f,p,x);f/=N,p/=N,x/=N;var D=g[0],B=g[4],U=g[8],V=D*f+B*p+U*x;D-=f*V,B-=p*V,U-=x*V;var q=h(D,B,U);D/=q,B/=q,U/=q;var z=D*k+f*b,H=B*k+p*b,G=U*k+x*b;this.center.move(M,z,H,G);var J=Math.exp(this.computedRadius[0]);J=Math.max(1e-4,J+A),this.radius.set(M,Math.log(J))},c.translate=function(M,k,b,A){this.center.move(M,k||0,b||0,A||0)},c.setMatrix=function(M,k,b,A){var g=1;typeof b=="number"&&(g=b|0),(g<0||g>3)&&(g=1);var f=(g+2)%3;k||(this.recalcMatrix(M),k=this.computedMatrix);var p=k[g],x=k[g+4],N=k[g+8];if(A){var B=Math.abs(p),U=Math.abs(x),V=Math.abs(N),q=Math.max(B,U,V);B===q?(p=p<0?-1:1,x=N=0):V===q?(N=N<0?-1:1,p=x=0):(x=x<0?-1:1,p=N=0)}else{var D=h(p,x,N);p/=D,x/=D,N/=D}var z=k[f],H=k[f+4],G=k[f+8],J=z*p+H*x+G*N;z-=p*J,H-=x*J,G-=N*J;var le=h(z,H,G);z/=le,H/=le,G/=le;var ye=x*G-N*H,de=N*z-p*G,me=p*H-x*z,W=h(ye,de,me);ye/=W,de/=W,me/=W,this.center.jump(M,Fe,Pe,be),this.radius.idle(M),this.up.jump(M,p,x,N),this.right.jump(M,z,H,G);var ie,se;if(g===2){var ee=k[1],pe=k[5],oe=k[9],Y=ee*z+pe*H+oe*G,ce=ee*ye+pe*de+oe*me;ze<0?ie=-Math.PI/2:ie=Math.PI/2,se=Math.atan2(ce,Y)}else{var ue=k[2],_e=k[6],Le=k[10],ze=ue*p+_e*x+Le*N,Ge=ue*z+_e*H+Le*G,Ve=ue*ye+_e*de+Le*me;ie=Math.asin(y(ze)),se=Math.atan2(Ve,Ge)}this.angle.jump(M,se,ie),this.recalcMatrix(M);var rt=k[2],pt=k[6],gt=k[10],ht=this.computedMatrix;i(ht,k);var lt=ht[15],Fe=ht[12]/lt,Pe=ht[13]/lt,be=ht[14]/lt,Ye=Math.exp(this.computedRadius[0]);this.center.jump(M,Fe-rt*Ye,Pe-pt*Ye,be-gt*Ye)},c.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},c.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},c.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},c.setDistance=function(M,k){k>0&&this.radius.set(M,Math.log(k))},c.lookAt=function(M,k,b,A){this.recalcMatrix(M),k=k||this.computedEye,b=b||this.computedCenter,A=A||this.computedUp;var g=A[0],f=A[1],p=A[2],x=h(g,f,p);if(!(x<1e-6)){g/=x,f/=x,p/=x;var N=k[0]-b[0],D=k[1]-b[1],B=k[2]-b[2],U=h(N,D,B);if(!(U<1e-6)){N/=U,D/=U,B/=U;var V=this.computedRight,q=V[0],z=V[1],H=V[2],G=g*q+f*z+p*H;q-=G*g,z-=G*f,H-=G*p;var J=h(q,z,H);if(!(J<.01&&(q=f*B-p*D,z=p*N-g*B,H=g*D-f*N,J=h(q,z,H),J<1e-6))){q/=J,z/=J,H/=J,this.up.set(M,g,f,p),this.right.set(M,q,z,H),this.center.set(M,b[0],b[1],b[2]),this.radius.set(M,Math.log(U));var le=f*H-p*z,ye=p*q-g*H,de=g*z-f*q,me=h(le,ye,de);le/=me,ye/=me,de/=me;var W=g*N+f*D+p*B,ie=q*N+z*D+H*B,se=le*N+ye*D+de*B,ee=Math.asin(y(W)),pe=Math.atan2(se,ie),oe=this.angle._state,Y=oe[oe.length-1],ce=oe[oe.length-2];Y=Y%(2*Math.PI);var ue=Math.abs(Y+2*Math.PI-pe),_e=Math.abs(Y-pe),Le=Math.abs(Y-2*Math.PI-pe);ue<_e&&(Y+=2*Math.PI),Le<_e&&(Y-=2*Math.PI),this.angle.jump(this.angle.lastT(),Y,ce),this.angle.set(M,pe,ee)}}}};function T(M){M=M||{};var k=M.center||[0,0,0],b=M.up||[0,1,0],A=M.right||m(b),g=M.radius||1,f=M.theta||0,p=M.phi||0;if(k=[].slice.call(k,0,3),b=[].slice.call(b,0,3),u(b,b),A=[].slice.call(A,0,3),u(A,A),"eye"in M){var x=M.eye,N=[x[0]-k[0],x[1]-k[1],x[2]-k[2]];o(A,N,b),h(A[0],A[1],A[2])<1e-6?A=m(b):u(A,A),g=h(N[0],N[1],N[2]);var D=d(b,N)/g,B=d(A,N)/g;p=Math.acos(D),f=Math.acos(B)}return g=Math.log(g),new E(M.zoomMin,M.zoomMax,k,b,A,g,f,p)}}),7319:(function(t,r,a){var l=a(3236),i=a(9405),s=l([`precision highp float;
#define GLSLIFY 1

attribute vec3 position, nextPosition;
attribute float arcLength, lineWidth;
attribute vec4 color;

uniform vec2 screenShape;
uniform float pixelRatio;
uniform mat4 model, view, projection;

varying vec4 fragColor;
varying vec3 worldPosition;
varying float pixelArcLength;

vec4 project(vec3 p) {
  return projection * (view * (model * vec4(p, 1.0)));
}

void main() {
  vec4 startPoint = project(position);
  vec4 endPoint   = project(nextPosition);

  vec2 A = startPoint.xy / startPoint.w;
  vec2 B =   endPoint.xy /   endPoint.w;

  float clipAngle = atan(
    (B.y - A.y) * screenShape.y,
    (B.x - A.x) * screenShape.x
  );

  vec2 offset = 0.5 * pixelRatio * lineWidth * vec2(
    sin(clipAngle),
    -cos(clipAngle)
  ) / screenShape;

  gl_Position = vec4(startPoint.xy + startPoint.w * offset, startPoint.zw);

  worldPosition = position;
  pixelArcLength = arcLength;
  fragColor = color;
}
`]),o=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      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;
}
`]),u=l([`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);
}`]),d=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(h){return i(h,s,o,null,d)},r.createPickShader=function(h){return i(h,s,u,null,d)}}),7352:(function(t,r,a){var l=a(5721),i=a(4750),s=a(2690);t.exports=o;function o(u){var d=u.length;if(d===0)return[];if(d===1)return[[0]];var h=u[0].length;return h===0?[]:h===1?l(u):h===2?i(u):s(u,h)}}),7399:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=i+i,h=s+s,y=o+o,m=i*d,E=s*d,c=s*h,_=o*d,T=o*h,M=o*y,k=u*d,b=u*h,A=u*y;return a[0]=1-c-M,a[1]=E+A,a[2]=_-b,a[3]=0,a[4]=E-A,a[5]=1-m-M,a[6]=T+k,a[7]=0,a[8]=_+b,a[9]=T-k,a[10]=1-m-c,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),7417:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.max(l[0],i[0]),a[1]=Math.max(l[1],i[1]),a[2]=Math.max(l[2],i[2]),a}}),7442:(function(t,r,a){var l=a(6658),i=a(7182),s=a(2652),o=a(9921),u=a(8648),d=E(),h=E(),y=E();t.exports=m;function m(T,M,k,b){if(o(M)===0||o(k)===0)return!1;var A=s(M,d.translate,d.scale,d.skew,d.perspective,d.quaternion),g=s(k,h.translate,h.scale,h.skew,h.perspective,h.quaternion);return!A||!g?!1:(l(y.translate,d.translate,h.translate,b),l(y.skew,d.skew,h.skew,b),l(y.scale,d.scale,h.scale,b),l(y.perspective,d.perspective,h.perspective,b),u(y.quaternion,d.quaternion,h.quaternion,b),i(T,y.translate,y.scale,y.skew,y.perspective,y.quaternion),!0)}function E(){return{translate:c(),scale:c(1),skew:c(),perspective:_(),quaternion:_()}}function c(T){return[T||0,T||0,T||0]}function _(){return[0,0,0,1]}}),7507:(function(t,r){r.byteLength=h,r.toByteArray=m,r.fromByteArray=_;for(var a=[],l=[],i=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=s.length;o<u;++o)a[o]=s[o],l[s.charCodeAt(o)]=o;l[45]=62,l[95]=63;function d(T){var M=T.length;if(M%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=T.indexOf("=");k===-1&&(k=M);var b=k===M?0:4-k%4;return[k,b]}function h(T){var M=d(T),k=M[0],b=M[1];return(k+b)*3/4-b}function y(T,M,k){return(M+k)*3/4-k}function m(T){var M,k=d(T),b=k[0],A=k[1],g=new i(y(T,b,A)),f=0,p=A>0?b-4:b,x;for(x=0;x<p;x+=4)M=l[T.charCodeAt(x)]<<18|l[T.charCodeAt(x+1)]<<12|l[T.charCodeAt(x+2)]<<6|l[T.charCodeAt(x+3)],g[f++]=M>>16&255,g[f++]=M>>8&255,g[f++]=M&255;return A===2&&(M=l[T.charCodeAt(x)]<<2|l[T.charCodeAt(x+1)]>>4,g[f++]=M&255),A===1&&(M=l[T.charCodeAt(x)]<<10|l[T.charCodeAt(x+1)]<<4|l[T.charCodeAt(x+2)]>>2,g[f++]=M>>8&255,g[f++]=M&255),g}function E(T){return a[T>>18&63]+a[T>>12&63]+a[T>>6&63]+a[T&63]}function c(T,M,k){for(var b,A=[],g=M;g<k;g+=3)b=(T[g]<<16&16711680)+(T[g+1]<<8&65280)+(T[g+2]&255),A.push(E(b));return A.join("")}function _(T){for(var M,k=T.length,b=k%3,A=[],g=16383,f=0,p=k-b;f<p;f+=g)A.push(c(T,f,f+g>p?p:f+g));return b===1?(M=T[k-1],A.push(a[M>>2]+a[M<<4&63]+"==")):b===2&&(M=(T[k-2]<<8)+T[k-1],A.push(a[M>>10]+a[M>>4&63]+a[M<<2&63]+"=")),A.join("")}}),7518:(function(t,r,a){var l=a(1433);function i(u,d,h,y,m,E){this.location=u,this.dimension=d,this.a=h,this.b=y,this.c=m,this.d=E}i.prototype.bind=function(u){switch(this.dimension){case 1:u.vertexAttrib1f(this.location,this.a);break;case 2:u.vertexAttrib2f(this.location,this.a,this.b);break;case 3:u.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:u.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d);break}};function s(u,d,h){this.gl=u,this._ext=d,this.handle=h,this._attribs=[],this._useElements=!1,this._elementsType=u.UNSIGNED_SHORT}s.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var u=0;u<this._attribs.length;++u)this._attribs[u].bind(this.gl)},s.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},s.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},s.prototype.update=function(u,d,h){if(this.bind(),l(this.gl,d,u),this.unbind(),this._attribs.length=0,u)for(var y=0;y<u.length;++y){var m=u[y];typeof m=="number"?this._attribs.push(new i(y,1,m)):Array.isArray(m)&&this._attribs.push(new i(y,m.length,m[0],m[1],m[2],m[3]))}this._useElements=!!d,this._elementsType=h||this.gl.UNSIGNED_SHORT},s.prototype.draw=function(u,d,h){h=h||0;var y=this.gl;this._useElements?y.drawElements(u,d,this._elementsType,h):y.drawArrays(u,h,d)};function o(u,d){return new s(u,d,d.createVertexArrayOES())}t.exports=o}),7520:(function(t,r,a){var l=a(9507);function i(){var s=!1;try{var o=Object.defineProperty({},"passive",{get:function(){s=!0}});window.addEventListener("test",null,o),window.removeEventListener("test",null,o)}catch{s=!1}return s}t.exports=l&&i()}),7536:(function(t){t.exports=r;function r(){var a=new Float32Array(4);return a[0]=0,a[1]=0,a[2]=0,a[3]=0,a}}),7608:(function(t){t.exports=r;function r(a,l){var i=l[0],s=l[1],o=l[2],u=l[3],d=l[4],h=l[5],y=l[6],m=l[7],E=l[8],c=l[9],_=l[10],T=l[11],M=l[12],k=l[13],b=l[14],A=l[15],g=i*h-s*d,f=i*y-o*d,p=i*m-u*d,x=s*y-o*h,N=s*m-u*h,D=o*m-u*y,B=E*k-c*M,U=E*b-_*M,V=E*A-T*M,q=c*b-_*k,z=c*A-T*k,H=_*A-T*b,G=g*H-f*z+p*q+x*V-N*U+D*B;return G?(G=1/G,a[0]=(h*H-y*z+m*q)*G,a[1]=(o*z-s*H-u*q)*G,a[2]=(k*D-b*N+A*x)*G,a[3]=(_*N-c*D-T*x)*G,a[4]=(y*V-d*H-m*U)*G,a[5]=(i*H-o*V+u*U)*G,a[6]=(b*p-M*D-A*f)*G,a[7]=(E*D-_*p+T*f)*G,a[8]=(d*z-h*V+m*B)*G,a[9]=(s*V-i*z-u*B)*G,a[10]=(M*N-k*p+A*g)*G,a[11]=(c*p-E*N-T*g)*G,a[12]=(h*U-d*q-y*B)*G,a[13]=(i*q-s*U+o*B)*G,a[14]=(k*f-M*x-b*g)*G,a[15]=(E*x-c*f+_*g)*G,a):null}}),7626:(function(t,r,a){var l=a(2642),i=a(9346);t.exports=h;function s(y,m){for(var E=[0,0,0,0],c=0;c<4;++c)for(var _=0;_<4;++_)E[_]+=y[4*c+_]*m[c];return E}function o(y,m,E,c,_){for(var T=s(c,s(E,s(m,[y[0],y[1],y[2],1]))),M=0;M<3;++M)T[M]/=T[3];return[.5*_[0]*(1+T[0]),.5*_[1]*(1-T[1])]}function u(y,m){if(y.length===2){for(var E=0,c=0,_=0;_<2;++_)E+=Math.pow(m[_]-y[0][_],2),c+=Math.pow(m[_]-y[1][_],2);return E=Math.sqrt(E),c=Math.sqrt(c),E+c<1e-6?[1,0]:[c/(E+c),E/(c+E)]}else if(y.length===3){var T=[0,0];return i(y[0],y[1],y[2],m,T),l(y,T)}return[]}function d(y,m){for(var E=[0,0,0],c=0;c<y.length;++c)for(var _=y[c],T=m[c],M=0;M<3;++M)E[M]+=T*_[M];return E}function h(y,m,E,c,_,T){if(y.length===1)return[0,y[0].slice()];for(var M=new Array(y.length),k=0;k<y.length;++k)M[k]=o(y[k],E,c,_,T);for(var b=0,A=1/0,k=0;k<M.length;++k){for(var g=0,f=0;f<2;++f)g+=Math.pow(M[k][f]-m[f],2);g<A&&(A=g,b=k)}for(var p=u(M,m),x=0,k=0;k<3;++k){if(p[k]<-.001||p[k]>1.0001)return null;x+=p[k]}return Math.abs(x-1)>.001?null:[b,d(y,p),p]}}),7636:(function(t){t.exports=r;function r(a,l){l=l||1;var i=Math.random()*2*Math.PI,s=Math.random()*2-1,o=Math.sqrt(1-s*s)*l;return a[0]=Math.cos(i)*o,a[1]=Math.sin(i)*o,a[2]=s*l,a}}),7640:(function(t,r,a){var l=a(1888);function i(m){switch(m){case"uint32":return[l.mallocUint32,l.freeUint32];default:return null}}var s={"uint32,1,0":function(m,E){return function(_,T,M,k,b,A,g,f,p,x,N){var D,B,U,V=_*b+k,q,z=m(f),H,G,J,le;for(D=_+1;D<=T;++D){for(B=D,V+=b,U=V,H=0,G=V,q=0;q<f;++q)z[H++]=M[G],G+=p;e:for(;B-- >_;){H=0,G=U-b;t:for(q=0;q<f;++q){if(J=M[G],le=z[H],J<le)break e;if(J>le)break t;G+=x,H+=N}for(H=U,G=U-b,q=0;q<f;++q)M[H]=M[G],H+=p,G+=p;U-=b}for(H=U,G=0,q=0;q<f;++q)M[H]=z[G++],H+=p}E(z)}}};function o(m,E){var c=i(E),_=[E,m].join(","),T=s[_];return c?T(c[0],c[1]):T()}var u={"uint32,1,0":function(m,E,c){return function _(T,M,k,b,A,g,f,p,x,N,D){var B=(M-T+1)/6|0,U=T+B,V=M-B,q=T+M>>1,z=q-B,H=q+B,G=U,J=z,le=q,ye=H,de=V,me=T+1,W=M-1,ie=!0,se,ee,pe,oe,Y,ce,ue,_e,Le,ze=0,Ge=0,Ve=0,rt,pt,gt,ht,lt,Fe,Pe,be,Ye,mt,bt,ft,Wt,Zt,cr,pr,Br=p,Fr=E(Br),cn=E(Br);pt=A*G,gt=A*J,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=J,J=ee;break e}if(Ve<0)break e;pr+=N}pt=A*ye,gt=A*de,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=ye,ye=de,de=ee;break e}if(Ve<0)break e;pr+=N}pt=A*G,gt=A*le,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=le,le=ee;break e}if(Ve<0)break e;pr+=N}pt=A*J,gt=A*le,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=le,le=ee;break e}if(Ve<0)break e;pr+=N}pt=A*G,gt=A*ye,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=G,G=ye,ye=ee;break e}if(Ve<0)break e;pr+=N}pt=A*le,gt=A*ye,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=le,le=ye,ye=ee;break e}if(Ve<0)break e;pr+=N}pt=A*J,gt=A*de,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=de,de=ee;break e}if(Ve<0)break e;pr+=N}pt=A*J,gt=A*le,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=J,J=le,le=ee;break e}if(Ve<0)break e;pr+=N}pt=A*ye,gt=A*de,pr=b;e:for(rt=0;rt<p;++rt){if(ue=pt+pr,_e=gt+pr,Ve=k[ue]-k[_e],Ve>0){ee=ye,ye=de,de=ee;break e}if(Ve<0)break e;pr+=N}for(pt=A*G,gt=A*J,ht=A*le,lt=A*ye,Fe=A*de,Pe=A*U,be=A*q,Ye=A*V,cr=0,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,Le=ht+pr,mt=lt+pr,bt=Fe+pr,ft=Pe+pr,Wt=be+pr,Zt=Ye+pr,Fr[cr]=k[_e],cn[cr]=k[mt],ie=ie&&Fr[cr]===cn[cr],pe=k[ue],oe=k[Le],Y=k[bt],k[ft]=pe,k[Wt]=oe,k[Zt]=Y,++cr,pr+=x;for(pt=A*z,gt=A*T,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,k[ue]=k[_e],pr+=x;for(pt=A*H,gt=A*M,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,k[ue]=k[_e],pr+=x;if(ie)for(ce=me;ce<=W;++ce){ue=b+ce*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-Fr[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve!==0)if(Ve<0){if(ce!==me)for(pt=A*ce,gt=A*me,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;++me}else for(;;){ue=b+W*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-Fr[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve>0)W--;else if(Ve<0){for(pt=A*ce,gt=A*me,ht=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,Le=ht+pr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,pr+=x;++me,--W;break}else{for(pt=A*ce,gt=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;--W;break}}}else for(ce=me;ce<=W;++ce){ue=b+ce*A,cr=0;e:for(rt=0;rt<p;++rt){if(ze=k[ue]-Fr[cr],ze!==0)break e;cr+=D,ue+=N}if(ze<0){if(ce!==me)for(pt=A*ce,gt=A*me,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;++me}else{ue=b+ce*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ge=k[ue]-cn[cr],Ge!==0)break e;cr+=D,ue+=N}if(Ge>0)for(;;){ue=b+W*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-cn[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve>0){if(--W<ce)break;continue}else{ue=b+W*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-Fr[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve<0){for(pt=A*ce,gt=A*me,ht=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,Le=ht+pr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,pr+=x;++me,--W}else{for(pt=A*ce,gt=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;--W}break}}}}for(pt=A*T,gt=A*(me-1),cr=0,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,k[ue]=k[_e],k[_e]=Fr[cr],++cr,pr+=x;for(pt=A*M,gt=A*(W+1),cr=0,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,k[ue]=k[_e],k[_e]=cn[cr],++cr,pr+=x;if(me-2-T<=32?m(T,me-2,k,b,A,g,f,p,x,N,D):_(T,me-2,k,b,A,g,f,p,x,N,D),M-(W+2)<=32?m(W+2,M,k,b,A,g,f,p,x,N,D):_(W+2,M,k,b,A,g,f,p,x,N,D),ie){c(Fr),c(cn);return}if(me<U&&W>V){e:for(;;){for(ue=b+me*A,cr=0,pr=b,rt=0;rt<p;++rt){if(k[ue]!==Fr[cr])break e;++cr,ue+=x}++me}e:for(;;){for(ue=b+W*A,cr=0,pr=b,rt=0;rt<p;++rt){if(k[ue]!==cn[cr])break e;++cr,ue+=x}--W}for(ce=me;ce<=W;++ce){ue=b+ce*A,cr=0;e:for(rt=0;rt<p;++rt){if(ze=k[ue]-Fr[cr],ze!==0)break e;cr+=D,ue+=N}if(ze===0){if(ce!==me)for(pt=A*ce,gt=A*me,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;++me}else{ue=b+ce*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ge=k[ue]-cn[cr],Ge!==0)break e;cr+=D,ue+=N}if(Ge===0)for(;;){ue=b+W*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-cn[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve===0){if(--W<ce)break;continue}else{ue=b+W*A,cr=0;e:for(rt=0;rt<p;++rt){if(Ve=k[ue]-Fr[cr],Ve!==0)break e;cr+=D,ue+=N}if(Ve<0){for(pt=A*ce,gt=A*me,ht=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,Le=ht+pr,se=k[ue],k[ue]=k[_e],k[_e]=k[Le],k[Le]=se,pr+=x;++me,--W}else{for(pt=A*ce,gt=A*W,pr=b,rt=0;rt<p;++rt)ue=pt+pr,_e=gt+pr,se=k[ue],k[ue]=k[_e],k[_e]=se,pr+=x;--W}break}}}}}c(Fr),c(cn),W-me<=32?m(me,W,k,b,A,g,f,p,x,N,D):_(me,W,k,b,A,g,f,p,x,N,D)}}};function d(m,E,c){var _=i(E),T=[E,m].join(","),M=u[T];return m.length>1&&_?M(c,_[0],_[1]):M(c)}var h={"uint32,1,0":function(m,E){return function(c){var _=c.data,T=c.offset|0,M=c.shape,k=c.stride,b=k[0]|0,A=M[0]|0,g=k[1]|0,f=M[1]|0,p=g,x=g,N=1;A<=32?m(0,A-1,_,T,b,g,A,f,p,x,N):E(0,A-1,_,T,b,g,A,f,p,x,N)}}};function y(m,E){var c=[E,m].join(","),_=h[c],T=o(m,E),M=d(m,E,T);return _(T,M)}t.exports=y}),7642:(function(t,r,a){var l=a(8954),i=a(1682);t.exports=d;function s(h,y){this.point=h,this.index=y}function o(h,y){for(var m=h.point,E=y.point,c=m.length,_=0;_<c;++_){var T=E[_]-m[_];if(T)return T}return 0}function u(h,y,m){if(h===1)return m?[[-1,0]]:[];var E=y.map(function(k,b){return[k[0],b]});E.sort(function(k,b){return k[0]-b[0]});for(var c=new Array(h-1),_=1;_<h;++_){var T=E[_-1],M=E[_];c[_-1]=[T[1],M[1]]}return m&&c.push([-1,c[0][1]],[c[h-1][1],-1]),c}function d(h,y){var m=h.length;if(m===0)return[];var E=h[0].length;if(E<1)return[];if(E===1)return u(m,h,y);for(var c=new Array(m),_=1,T=0;T<m;++T){for(var M=h[T],k=new Array(E+1),b=0,A=0;A<E;++A){var g=M[A];k[A]=g,b+=g*g}k[E]=b,c[T]=new s(k,T),_=Math.max(b,_)}i(c,o),m=c.length;for(var f=new Array(m+E+1),p=new Array(m+E+1),x=(E+1)*(E+1)*_,N=new Array(E+1),T=0;T<=E;++T)N[T]=0;N[E]=x,f[0]=N.slice(),p[0]=-1;for(var T=0;T<=E;++T){var k=N.slice();k[T]=1,f[T+1]=k,p[T+1]=-1}for(var T=0;T<m;++T){var D=c[T];f[T+E+1]=D.point,p[T+E+1]=D.index}var B=l(f,!1);if(y?B=B.filter(function(U){for(var V=0,q=0;q<=E;++q){var z=p[U[q]];if(z<0&&++V>=2)return!1;U[q]=z}return!0}):B=B.filter(function(U){for(var V=0;V<=E;++V){var q=p[U[V]];if(q<0)return!1;U[V]=q}return!0}),E&1)for(var T=0;T<B.length;++T){var D=B[T],k=D[0];D[0]=D[1],D[1]=k}return B}}),7656:(function(t){t.exports=r;function r(a,l,i){var s=i[0],o=i[1],u=i[2],d,h,y,m,E,c,_,T,M,k,b,A;return l===a?(a[12]=l[0]*s+l[4]*o+l[8]*u+l[12],a[13]=l[1]*s+l[5]*o+l[9]*u+l[13],a[14]=l[2]*s+l[6]*o+l[10]*u+l[14],a[15]=l[3]*s+l[7]*o+l[11]*u+l[15]):(d=l[0],h=l[1],y=l[2],m=l[3],E=l[4],c=l[5],_=l[6],T=l[7],M=l[8],k=l[9],b=l[10],A=l[11],a[0]=d,a[1]=h,a[2]=y,a[3]=m,a[4]=E,a[5]=c,a[6]=_,a[7]=T,a[8]=M,a[9]=k,a[10]=b,a[11]=A,a[12]=d*s+E*o+M*u+l[12],a[13]=h*s+c*o+k*u+l[13],a[14]=y*s+_*o+b*u+l[14],a[15]=m*s+T*o+A*u+l[15]),a}}),7718:(function(t,r,a){t.exports=D,t.exports.processPixels=N;var l=a(3711),i=a(9618),s=a(5878),o=a(332),u=a(2538),d=a(2095),h="b",y="b|",m="i",E="i|",c="sup",_="+",T="+1",M="sub",k="-",b="-1";function A(B,U,V,q){for(var z="<"+B+">",H="</"+B+">",G=z.length,J=H.length,le=U[0]===_||U[0]===k,ye=0,de=-J;ye>-1&&(ye=V.indexOf(z,ye),!(ye===-1||(de=V.indexOf(H,ye+G),de===-1)||de<=ye));){for(var me=ye;me<de+J;++me)if(me<ye+G||me>=de)q[me]=null,V=V.substr(0,me)+" "+V.substr(me+1);else if(q[me]!==null){var W=q[me].indexOf(U[0]);W===-1?q[me]+=U:le&&(q[me]=q[me].substr(0,W+1)+(1+parseInt(q[me][W+1]))+q[me].substr(W+2))}var ie=ye+G,se=V.substr(ie,de-ie),ee=se.indexOf(z);ee!==-1?ye=ee:ye=de+J}return q}function g(B,U,V){for(var q=U.textAlign||"start",z=U.textBaseline||"alphabetic",H=[1<<30,1<<30],G=[0,0],J=B.length,le=0;le<J;++le)for(var ye=B[le],de=0;de<2;++de)H[de]=Math.min(H[de],ye[de])|0,G[de]=Math.max(G[de],ye[de])|0;var me=0;switch(q){case"center":me=-.5*(H[0]+G[0]);break;case"right":case"end":me=-G[0];break;case"left":case"start":me=-H[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+q+"'")}var W=0;switch(z){case"hanging":case"top":W=-H[1];break;case"middle":W=-.5*(H[1]+G[1]);break;case"alphabetic":case"ideographic":W=-3*V;break;case"bottom":W=-G[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+z+"'")}var ie=1/V;return"lineHeight"in U?ie*=+U.lineHeight:"width"in U?ie=U.width/(G[0]-H[0]):"height"in U&&(ie=U.height/(G[1]-H[1])),B.map(function(se){return[ie*(se[0]+me),ie*(se[1]+W)]})}function f(B,U,V,q,z,H){V=V.replace(/\n/g,""),H.breaklines===!0?V=V.replace(/\<br\>/g,`
`):V=V.replace(/\<br\>/g," ");var G="",J=[];for(Y=0;Y<V.length;++Y)J[Y]=G;H.bolds===!0&&(J=A(h,y,V,J)),H.italics===!0&&(J=A(m,E,V,J)),H.superscripts===!0&&(J=A(c,T,V,J)),H.subscripts===!0&&(J=A(M,b,V,J));var le=[],ye="";for(Y=0;Y<V.length;++Y)J[Y]!==null&&(ye+=V[Y],le.push(J[Y]));var de=ye.split(`
`),me=de.length,W=Math.round(z*q),ie=q,se=q*2,ee=0,pe=me*W+se;B.height<pe&&(B.height=pe),U.fillStyle="#000",U.fillRect(0,0,B.width,B.height),U.fillStyle="#fff";var oe,Y,ce,ue,_e,Le=0,ze="";function Ge(){if(ze!==""){var be=U.measureText(ze).width;U.fillText(ze,ie+ce,se+ue),ce+=be}}function Ve(){return""+Math.round(_e)+"px "}function rt(be,Ye){var mt=""+U.font;if(H.subscripts===!0){var bt=be.indexOf(k),ft=Ye.indexOf(k),Wt=bt>-1?parseInt(be[1+bt]):0,Zt=ft>-1?parseInt(Ye[1+ft]):0;Wt!==Zt&&(mt=mt.replace(Ve(),"?px "),_e*=Math.pow(.75,Zt-Wt),mt=mt.replace("?px ",Ve())),ue+=.25*W*(Zt-Wt)}if(H.superscripts===!0){var cr=be.indexOf(_),pr=Ye.indexOf(_),Br=cr>-1?parseInt(be[1+cr]):0,Fr=pr>-1?parseInt(Ye[1+pr]):0;Br!==Fr&&(mt=mt.replace(Ve(),"?px "),_e*=Math.pow(.75,Fr-Br),mt=mt.replace("?px ",Ve())),ue-=.25*W*(Fr-Br)}if(H.bolds===!0){var cn=be.indexOf(y)>-1,Nr=Ye.indexOf(y)>-1;!cn&&Nr&&(Jr?mt=mt.replace("italic ","italic bold "):mt="bold "+mt),cn&&!Nr&&(mt=mt.replace("bold ",""))}if(H.italics===!0){var Jr=be.indexOf(E)>-1,Dt=Ye.indexOf(E)>-1;!Jr&&Dt&&(mt="italic "+mt),Jr&&!Dt&&(mt=mt.replace("italic ",""))}U.font=mt}for(oe=0;oe<me;++oe){var pt=de[oe]+`
`;for(ce=0,ue=oe*W,_e=q,ze="",Y=0;Y<pt.length;++Y){var gt=Y+Le<le.length?le[Y+Le]:le[le.length-1];G===gt?ze+=pt[Y]:(Ge(),ze=pt[Y],gt!==void 0&&(rt(G,gt),G=gt))}Ge(),Le+=pt.length;var ht=Math.round(ce+2*ie)|0;ee<ht&&(ee=ht)}var lt=ee,Fe=se+W*me,Pe=i(U.getImageData(0,0,lt,Fe).data,[Fe,lt,4]);return Pe.pick(-1,-1,0).transpose(1,0)}function p(B,U){var V=l(B,128);return U?s(V.cells,V.positions,.25):{edges:V.cells,positions:V.positions}}function x(B,U,V,q){var z=p(B,q),H=g(z.positions,U,V),G=z.edges,J=U.orientation==="ccw";if(o(H,G),U.polygons||U.polygon||U.polyline){for(var le=d(G,H),ye=new Array(le.length),de=0;de<le.length;++de){for(var me=le[de],W=new Array(me.length),ie=0;ie<me.length;++ie){for(var se=me[ie],ee=new Array(se.length),pe=0;pe<se.length;++pe)ee[pe]=H[se[pe]].slice();J&&ee.reverse(),W[ie]=ee}ye[de]=W}return ye}else return U.triangles||U.triangulate||U.triangle?{cells:u(H,G,{delaunay:!1,exterior:!1,interior:!0}),positions:H}:{edges:G,positions:H}}function N(B,U,V){try{return x(B,U,V,!0)}catch{}try{return x(B,U,V,!1)}catch{}return U.polygons||U.polyline||U.polygon?[]:U.triangles||U.triangulate||U.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}function D(B,U,V,q){var z=64,H=1.25,G={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};q&&(q.size&&q.size>0&&(z=q.size),q.lineSpacing&&q.lineSpacing>0&&(H=q.lineSpacing),q.styletags&&q.styletags.breaklines&&(G.breaklines=!!q.styletags.breaklines),q.styletags&&q.styletags.bolds&&(G.bolds=!!q.styletags.bolds),q.styletags&&q.styletags.italics&&(G.italics=!!q.styletags.italics),q.styletags&&q.styletags.subscripts&&(G.subscripts=!!q.styletags.subscripts),q.styletags&&q.styletags.superscripts&&(G.superscripts=!!q.styletags.superscripts)),V.font=[q.fontStyle,q.fontVariant,q.fontWeight,z+"px",q.font].filter(function(le){return le}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var J=f(U,V,B,z,H,G);return N(J,q,z)}}),7721:(function(t,r,a){var l=a(5716);t.exports=i;function i(s){return l(s[0])*l(s[1])}}),7765:(function(t,r,a){t.exports=c;var l=a(9618),i=a(1888),s=a(446),o=a(1570);function u(_){for(var T=_.length,M=0,k=0;k<T;++k)M=Math.max(M,_[k].length)|0;return M-1}function d(_,T){for(var M=_.length,k=i.mallocUint8(M),b=0;b<M;++b)k[b]=_[b]<T|0;return k}function h(_,T){for(var M=_.length,k=T*(T+1)/2*M|0,b=i.mallocUint32(k*2),A=0,g=0;g<M;++g)for(var f=_[g],T=f.length,p=0;p<T;++p)for(var x=0;x<p;++x){var N=f[x],D=f[p];b[A++]=Math.min(N,D)|0,b[A++]=Math.max(N,D)|0}var B=A/2|0;s(l(b,[B,2]));for(var U=2,g=2;g<A;g+=2)b[g-2]===b[g]&&b[g-1]===b[g+1]||(b[U++]=b[g],b[U++]=b[g+1]);return l(b,[U/2|0,2])}function y(_,T,M,k){for(var b=_.data,A=_.shape[0],g=i.mallocDouble(A),f=0,p=0;p<A;++p){var x=b[2*p],N=b[2*p+1];if(M[x]!==M[N]){var D=T[x],B=T[N];b[2*f]=x,b[2*f+1]=N,g[f++]=(B-k)/(B-D)}}return _.shape[0]=f,l(g,[f])}function m(_,T){var M=i.mallocInt32(T*2),k=_.shape[0],b=_.data;M[0]=0;for(var A=0,g=0;g<k;++g){var f=b[2*g];if(f!==A){for(M[2*A+1]=g;++A<f;)M[2*A]=g,M[2*A+1]=g;M[2*A]=g}}for(M[2*A+1]=k;++A<T;)M[2*A]=M[2*A+1]=k;return M}function E(_){for(var T=_.shape[0]|0,M=_.data,k=new Array(T),b=0;b<T;++b)k[b]=[M[2*b],M[2*b+1]];return k}function c(_,T,M,k){M=M||0,typeof k>"u"&&(k=u(_));var b=_.length;if(b===0||k<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=d(T,+M),g=h(_,k),f=y(g,T,A,+M),p=m(g,T.length|0),x=o(k)(_,g.data,p,A),N=E(g),D=[].slice.call(f.data,0,f.shape[0]);return i.free(A),i.free(g.data),i.free(f.data),i.free(p),{cells:x,vertexIds:N,vertexWeights:D}}}),7766:(function(t,r,a){var l=a(9618),i=a(5298),s=a(1888);t.exports=f;var o=null,u=null,d=null;function h(p){o=[p.LINEAR,p.NEAREST_MIPMAP_LINEAR,p.LINEAR_MIPMAP_NEAREST,p.LINEAR_MIPMAP_NEAREST],u=[p.NEAREST,p.LINEAR,p.NEAREST_MIPMAP_NEAREST,p.NEAREST_MIPMAP_LINEAR,p.LINEAR_MIPMAP_NEAREST,p.LINEAR_MIPMAP_LINEAR],d=[p.REPEAT,p.CLAMP_TO_EDGE,p.MIRRORED_REPEAT]}function y(p){return typeof HTMLCanvasElement<"u"&&p instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&p instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&p instanceof HTMLVideoElement||typeof ImageData<"u"&&p instanceof ImageData}var m=function(p,x){i.muls(p,x,255)};function E(p,x,N){var D=p.gl,B=D.getParameter(D.MAX_TEXTURE_SIZE);if(x<0||x>B||N<0||N>B)throw new Error("gl-texture2d: Invalid texture size");return p._shape=[x,N],p.bind(),D.texImage2D(D.TEXTURE_2D,0,p.format,x,N,0,p.format,p.type,null),p._mipLevels=[0],p}function c(p,x,N,D,B,U){this.gl=p,this.handle=x,this.format=B,this.type=U,this._shape=[N,D],this._mipLevels=[0],this._magFilter=p.NEAREST,this._minFilter=p.NEAREST,this._wrapS=p.CLAMP_TO_EDGE,this._wrapT=p.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,q=[this._wrapS,this._wrapT];Object.defineProperties(q,[{get:function(){return V._wrapS},set:function(H){return V.wrapS=H}},{get:function(){return V._wrapT},set:function(H){return V.wrapT=H}}]),this._wrapVector=q;var z=[this._shape[0],this._shape[1]];Object.defineProperties(z,[{get:function(){return V._shape[0]},set:function(H){return V.width=H}},{get:function(){return V._shape[1]},set:function(H){return V.height=H}}]),this._shapeVector=z}var _=c.prototype;Object.defineProperties(_,{minFilter:{get:function(){return this._minFilter},set:function(p){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(p)>=0&&(x.getExtension("OES_texture_float_linear")||(p=x.NEAREST)),u.indexOf(p)<0)throw new Error("gl-texture2d: Unknown filter mode "+p);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,p),this._minFilter=p}},magFilter:{get:function(){return this._magFilter},set:function(p){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(p)>=0&&(x.getExtension("OES_texture_float_linear")||(p=x.NEAREST)),u.indexOf(p)<0)throw new Error("gl-texture2d: Unknown filter mode "+p);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,p),this._magFilter=p}},mipSamples:{get:function(){return this._anisoSamples},set:function(p){var x=this._anisoSamples;if(this._anisoSamples=Math.max(p,1)|0,x!==this._anisoSamples){var N=this.gl.getExtension("EXT_texture_filter_anisotropic");N&&this.gl.texParameterf(this.gl.TEXTURE_2D,N.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(p){if(this.bind(),d.indexOf(p)<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,p),this._wrapS=p}},wrapT:{get:function(){return this._wrapT},set:function(p){if(this.bind(),d.indexOf(p)<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,p),this._wrapT=p}},wrap:{get:function(){return this._wrapVector},set:function(p){if(Array.isArray(p)||(p=[p,p]),p.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(d.indexOf(p[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+p);this._wrapS=p[0],this._wrapT=p[1];var N=this.gl;return this.bind(),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,this._wrapS),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,this._wrapT),p}},shape:{get:function(){return this._shapeVector},set:function(p){if(!Array.isArray(p))p=[p|0,p|0];else if(p.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return E(this,p[0]|0,p[1]|0),[p[0]|0,p[1]|0]}},width:{get:function(){return this._shape[0]},set:function(p){return p=p|0,E(this,p,this._shape[1]),p}},height:{get:function(){return this._shape[1]},set:function(p){return p=p|0,E(this,this._shape[0],p),p}}}),_.bind=function(p){var x=this.gl;return p!==void 0&&x.activeTexture(x.TEXTURE0+(p|0)),x.bindTexture(x.TEXTURE_2D,this.handle),p!==void 0?p|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},_.dispose=function(){this.gl.deleteTexture(this.handle)},_.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var p=Math.min(this._shape[0],this._shape[1]),x=0;p>0;++x,p>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},_.setPixels=function(p,x,N,D){var B=this.gl;this.bind(),Array.isArray(x)?(D=N,N=x[1]|0,x=x[0]|0):(x=x||0,N=N||0),D=D||0;var U=y(p)?p:p.raw;if(U){var V=this._mipLevels.indexOf(D)<0;V?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,U),this._mipLevels.push(D)):B.texSubImage2D(B.TEXTURE_2D,D,x,N,this.format,this.type,U)}else if(p.shape&&p.stride&&p.data){if(p.shape.length<2||x+p.shape[1]>this._shape[1]>>>D||N+p.shape[0]>this._shape[0]>>>D||x<0||N<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(B,x,N,D,this.format,this.type,this._mipLevels,p)}else throw new Error("gl-texture2d: Unsupported data type")};function T(p,x){return p.length===3?x[2]===1&&x[1]===p[0]*p[2]&&x[0]===p[2]:x[0]===1&&x[1]===p[0]}function M(p,x,N,D,B,U,V,q){var z=q.dtype,H=q.shape.slice();if(H.length<2||H.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var G=0,J=0,le=T(H,q.stride.slice());if(z==="float32"?G=p.FLOAT:z==="float64"?(G=p.FLOAT,le=!1,z="float32"):z==="uint8"?G=p.UNSIGNED_BYTE:(G=p.UNSIGNED_BYTE,le=!1,z="uint8"),H.length===2)J=p.LUMINANCE,H=[H[0],H[1],1],q=l(q.data,H,[q.stride[0],q.stride[1],1],q.offset);else if(H.length===3){if(H[2]===1)J=p.ALPHA;else if(H[2]===2)J=p.LUMINANCE_ALPHA;else if(H[2]===3)J=p.RGB;else if(H[2]===4)J=p.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");H[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((J===p.LUMINANCE||J===p.ALPHA)&&(B===p.LUMINANCE||B===p.ALPHA)&&(J=B),J!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ye=q.size,de=V.indexOf(D)<0;if(de&&V.push(D),G===U&&le)q.offset===0&&q.data.length===ye?de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,q.data):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,q.data):de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,q.data.subarray(q.offset,q.offset+ye)):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,q.data.subarray(q.offset,q.offset+ye));else{var me;U===p.FLOAT?me=s.mallocFloat32(ye):me=s.mallocUint8(ye);var W=l(me,H,[H[2],H[2]*H[0],1]);G===p.FLOAT&&U===p.UNSIGNED_BYTE?m(W,q):i.assign(W,q),de?p.texImage2D(p.TEXTURE_2D,D,B,H[0],H[1],0,B,U,me.subarray(0,ye)):p.texSubImage2D(p.TEXTURE_2D,D,x,N,H[0],H[1],B,U,me.subarray(0,ye)),U===p.FLOAT?s.freeFloat32(me):s.freeUint8(me)}}function k(p){var x=p.createTexture();return p.bindTexture(p.TEXTURE_2D,x),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,p.NEAREST),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,p.CLAMP_TO_EDGE),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,p.CLAMP_TO_EDGE),x}function b(p,x,N,D,B){var U=p.getParameter(p.MAX_TEXTURE_SIZE);if(x<0||x>U||N<0||N>U)throw new Error("gl-texture2d: Invalid texture shape");if(B===p.FLOAT&&!p.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=k(p);return p.texImage2D(p.TEXTURE_2D,0,D,x,N,0,D,B,null),new c(p,V,x,N,D,B)}function A(p,x,N,D,B,U){var V=k(p);return p.texImage2D(p.TEXTURE_2D,0,B,B,U,x),new c(p,V,N,D,B,U)}function g(p,x){var N=x.dtype,D=x.shape.slice(),B=p.getParameter(p.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>B||D[1]<0||D[1]>B)throw new Error("gl-texture2d: Invalid texture size");var U=T(D,x.stride.slice()),V=0;N==="float32"?V=p.FLOAT:N==="float64"?(V=p.FLOAT,U=!1,N="float32"):N==="uint8"?V=p.UNSIGNED_BYTE:(V=p.UNSIGNED_BYTE,U=!1,N="uint8");var q=0;if(D.length===2)q=p.LUMINANCE,D=[D[0],D[1],1],x=l(x.data,D,[x.stride[0],x.stride[1],1],x.offset);else if(D.length===3)if(D[2]===1)q=p.ALPHA;else if(D[2]===2)q=p.LUMINANCE_ALPHA;else if(D[2]===3)q=p.RGB;else if(D[2]===4)q=p.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===p.FLOAT&&!p.getExtension("OES_texture_float")&&(V=p.UNSIGNED_BYTE,U=!1);var z,H,G=x.size;if(U)x.offset===0&&x.data.length===G?z=x.data:z=x.data.subarray(x.offset,x.offset+G);else{var J=[D[2],D[2]*D[0],1];H=s.malloc(G,N);var le=l(H,D,J,0);(N==="float32"||N==="float64")&&V===p.UNSIGNED_BYTE?m(le,x):i.assign(le,x),z=H.subarray(0,G)}var ye=k(p);return p.texImage2D(p.TEXTURE_2D,0,q,D[0],D[1],0,q,V,z),U||s.free(H),new c(p,ye,D[0],D[1],q,V)}function f(p){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||h(p),typeof arguments[1]=="number")return b(p,arguments[1],arguments[2],arguments[3]||p.RGBA,arguments[4]||p.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return b(p,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||p.RGBA,arguments[3]||p.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],N=y(x)?x:x.raw;if(N)return A(p,N,x.width|0,x.height|0,arguments[2]||p.RGBA,arguments[3]||p.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return g(p,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),7790:(function(){}),7815:(function(t,r,a){var l=a(2931),i=a(9970),s=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(T,M,k,b){for(var A=T.points,g=T.velocities,f=T.divergences,p=[],x=[],N=[],D=[],B=[],U=[],V=0,q=0,z=i.create(),H=i.create(),G=8,J=0;J<A.length;J++){var le=A[J],ye=g[J],de=f[J];M===0&&(de=k*.05),q=l.length(ye)/b,z=i.create(),l.copy(z,ye),z[3]=de;for(var me=0;me<G;me++)B[me]=[le[0],le[1],le[2],me];if(D.length>0)for(var me=0;me<G;me++){var W=(me+1)%G;p.push(D[me],B[me],B[W],B[W],D[W],D[me]),N.push(H,z,z,z,H,H),U.push(V,q,q,q,V,V);var ie=p.length;x.push([ie-6,ie-5,ie-4],[ie-3,ie-2,ie-1])}var se=D;D=B,B=se;var ee=H;H=z,z=ee;var pe=V;V=q,q=pe}return{positions:p,cells:x,vectors:N,vertexIntensity:U}},u=function(T,M,k,b){for(var A=0,g=0;g<T.length;g++)for(var f=T[g].velocities,p=0;p<f.length;p++)A=Math.max(A,l.length(f[p]));for(var x=T.map(function(J){return o(J,k,b,A)}),N=[],D=[],B=[],U=[],g=0;g<x.length;g++){var V=x[g],q=N.length;N=N.concat(V.positions),B=B.concat(V.vectors),U=U.concat(V.vertexIntensity);for(var p=0;p<V.cells.length;p++){var z=V.cells[p],H=[];D.push(H);for(var G=0;G<z.length;G++)H.push(z[G]+q)}}return{positions:N,cells:D,vectors:B,vertexIntensity:U,colormap:M}},d=function(T,M){var k=T.length,b;for(b=0;b<k;b++){var A=T[b];if(A===M)return b;if(A>M)return b-1}return b},h=function(T,M,k){return T<M?M:T>k?k:T},y=function(T,M,k){var b=M.vectors,A=M.meshgrid,g=T[0],f=T[1],p=T[2],x=A[0].length,N=A[1].length,D=A[2].length,B=d(A[0],g),U=d(A[1],f),V=d(A[2],p),q=B+1,z=U+1,H=V+1;if(B=h(B,0,x-1),q=h(q,0,x-1),U=h(U,0,N-1),z=h(z,0,N-1),V=h(V,0,D-1),H=h(H,0,D-1),B<0||U<0||V<0||q>x-1||z>N-1||H>D-1)return l.create();var G=A[0][B],J=A[0][q],le=A[1][U],ye=A[1][z],de=A[2][V],me=A[2][H],W=(g-G)/(J-G),ie=(f-le)/(ye-le),se=(p-de)/(me-de);isFinite(W)||(W=.5),isFinite(ie)||(ie=.5),isFinite(se)||(se=.5);var ee,pe,oe,Y,ce,ue;switch(k.reversedX&&(B=x-1-B,q=x-1-q),k.reversedY&&(U=N-1-U,z=N-1-z),k.reversedZ&&(V=D-1-V,H=D-1-H),k.filled){case 5:ce=V,ue=H,oe=U*D,Y=z*D,ee=B*D*N,pe=q*D*N;break;case 4:ce=V,ue=H,ee=B*D,pe=q*D,oe=U*D*x,Y=z*D*x;break;case 3:oe=U,Y=z,ce=V*N,ue=H*N,ee=B*N*D,pe=q*N*D;break;case 2:oe=U,Y=z,ee=B*N,pe=q*N,ce=V*N*x,ue=H*N*x;break;case 1:ee=B,pe=q,ce=V*x,ue=H*x,oe=U*x*D,Y=z*x*D;break;default:ee=B,pe=q,oe=U*x,Y=z*x,ce=V*x*N,ue=H*x*N;break}var _e=b[ee+oe+ce],Le=b[ee+oe+ue],ze=b[ee+Y+ce],Ge=b[ee+Y+ue],Ve=b[pe+oe+ce],rt=b[pe+oe+ue],pt=b[pe+Y+ce],gt=b[pe+Y+ue],ht=l.create(),lt=l.create(),Fe=l.create(),Pe=l.create();l.lerp(ht,_e,Ve,W),l.lerp(lt,Le,rt,W),l.lerp(Fe,ze,pt,W),l.lerp(Pe,Ge,gt,W);var be=l.create(),Ye=l.create();l.lerp(be,ht,Fe,ie),l.lerp(Ye,lt,Pe,ie);var mt=l.create();return l.lerp(mt,be,Ye,se),mt},m=function(T){var M=1/0;T.sort(function(g,f){return g-f});for(var k=T.length,b=1;b<k;b++){var A=Math.abs(T[b]-T[b-1]);A<M&&(M=A)}return M},E=function(T){for(var M=[],k=[],b=[],A={},g={},f={},p=T.length,x=0;x<p;x++){var N=T[x],D=N[0],B=N[1],U=N[2];A[D]||(M.push(D),A[D]=!0),g[B]||(k.push(B),g[B]=!0),f[U]||(b.push(U),f[U]=!0)}var V=m(M),q=m(k),z=m(b),H=Math.min(V,q,z);return isFinite(H)?H:1};t.exports=function(T,M){var k=T.startingPositions,b=T.maxLength||1e3,A=T.tubeSize||1,g=T.absoluteTubeSize,f=T.gridFill||"+x+y+z",p={};f.indexOf("-x")!==-1&&(p.reversedX=!0),f.indexOf("-y")!==-1&&(p.reversedY=!0),f.indexOf("-z")!==-1&&(p.reversedZ=!0),p.filled=s.indexOf(f.replace(/-/g,"").replace(/\+/g,""));var x=T.getVelocity||function(rt){return y(rt,T,p)},N=T.getDivergence||function(rt,pt){var gt=l.create(),ht=1e-4;l.add(gt,rt,[ht,0,0]);var lt=x(gt);l.subtract(lt,lt,pt),l.scale(lt,lt,1/ht),l.add(gt,rt,[0,ht,0]);var Fe=x(gt);l.subtract(Fe,Fe,pt),l.scale(Fe,Fe,1/ht),l.add(gt,rt,[0,0,ht]);var Pe=x(gt);return l.subtract(Pe,Pe,pt),l.scale(Pe,Pe,1/ht),l.add(gt,lt,Fe),l.add(gt,gt,Pe),gt},D=[],B=M[0][0],U=M[0][1],V=M[0][2],q=M[1][0],z=M[1][1],H=M[1][2],G=function(rt){var pt=rt[0],gt=rt[1],ht=rt[2];return!(pt<B||pt>q||gt<U||gt>z||ht<V||ht>H)},J=l.distance(M[0],M[1]),le=10*J/b,ye=le*le,de=1,me=0,W=k.length;W>1&&(de=E(k));for(var ie=0;ie<W;ie++){var se=l.create();l.copy(se,k[ie]);var ee=[se],pe=[],oe=x(se),Y=se;pe.push(oe);var ce=[],ue=N(se,oe),_e=l.length(ue);isFinite(_e)&&_e>me&&(me=_e),ce.push(_e),D.push({points:ee,velocities:pe,divergences:ce});for(var Le=0;Le<b*100&&ee.length<b&&G(se);){Le++;var ze=l.clone(oe),Ge=l.squaredLength(ze);if(Ge===0)break;if(Ge>ye&&l.scale(ze,ze,le/Math.sqrt(Ge)),l.add(ze,ze,se),oe=x(ze),l.squaredDistance(Y,ze)-ye>-1e-4*ye){ee.push(ze),Y=ze,pe.push(oe);var ue=N(ze,oe),_e=l.length(ue);isFinite(_e)&&_e>me&&(me=_e),ce.push(_e)}se=ze}}var Ve=u(D,T.colormap,me,de);return g?Ve.tubeScale=g:(me===0&&(me=1),Ve.tubeScale=A*.5*de/me),Ve};var c=a(6740),_=a(6405).createMesh;t.exports.createTubeMesh=function(T,M){return _(T,M,{shaders:c,traceType:"streamtube"})}}),7827:(function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),7842:(function(t,r,a){var l=a(6330),i=a(1533),s=a(2651),o=a(6768),u=a(869),d=a(8697);t.exports=h;function h(y,m){if(l(y))return m?d(y,h(m)):[y[0].clone(),y[1].clone()];var E=0,c,_;if(i(y))c=y.clone();else if(typeof y=="string")c=o(y);else{if(y===0)return[s(0),s(1)];if(y===Math.floor(y))c=s(y);else{for(;y!==Math.floor(y);)y=y*Math.pow(2,256),E-=256;c=s(y)}}if(l(m))c.mul(m[1]),_=m[0].clone();else if(i(m))_=m.clone();else if(typeof m=="string")_=o(m);else if(!m)_=s(1);else if(m===Math.floor(m))_=s(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),E+=256;_=s(m)}return E>0?c=c.ushln(E):E<0&&(_=_.ushln(-E)),u(c,_)}}),7894:(function(t){t.exports=r;function r(a){return a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1,a}}),7932:(function(t,r,a){var l=a(620);t.exports=l.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),7960:(function(t){t.exports=r;function r(a,l){var i=l[0]-a[0],s=l[1]-a[1],o=l[2]-a[2],u=l[3]-a[3];return i*i+s*s+o*o+u*u}}),8105:(function(t){t.exports=a;var r={"lo===p0":l,"lo<p0":i,"lo<=p0":s,"hi<=p0":o,"lo<p0&&p0<=hi":d,"lo<=p0&&p0<=hi":u,"!(lo>=p0)&&!(p1>=hi)":h};function a(y){return r[y]}function l(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+f];if(N===M)if(g===x)g+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[g],T[g++]=U}}return g}function i(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+f];if(N<M)if(g===x)g+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[g],T[g++]=U}}return g}function s(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+p];if(N<=M)if(g===x)g+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[g],T[g++]=U}}return g}function o(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+p];if(N<=M)if(g===x)g+=1,A+=k;else{for(var D=0;k>D;++D){var B=_[b+D];_[b+D]=_[A],_[A++]=B}var U=T[x];T[x]=T[g],T[g++]=U}}return g}function u(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+f],D=_[b+p];if(N<=M&&M<=D)if(g===x)g+=1,A+=k;else{for(var B=0;k>B;++B){var U=_[b+B];_[b+B]=_[A],_[A++]=U}var V=T[x];T[x]=T[g],T[g++]=V}}return g}function d(y,m,E,c,_,T,M){for(var k=2*y,b=k*E,A=b,g=E,f=m,p=y+m,x=E;c>x;++x,b+=k){var N=_[b+f],D=_[b+p];if(N<M&&M<=D)if(g===x)g+=1,A+=k;else{for(var B=0;k>B;++B){var U=_[b+B];_[b+B]=_[A],_[A++]=U}var V=T[x];T[x]=T[g],T[g++]=V}}return g}function h(y,m,E,c,_,T,M,k){for(var b=2*y,A=b*E,g=A,f=E,p=m,x=y+m,N=E;c>N;++N,A+=b){var D=_[A+p],B=_[A+x];if(!(D>=M)&&!(k>=B))if(f===N)f+=1,g+=b;else{for(var U=0;b>U;++U){var V=_[A+U];_[A+U]=_[g],_[g++]=V}var q=T[N];T[N]=T[f],T[f++]=q}}return f}}),8107:(function(t){t.exports=r;function r(a,l,i){return a[0]=Math.min(l[0],i[0]),a[1]=Math.min(l[1],i[1]),a[2]=Math.min(l[2],i[2]),a}}),8116:(function(t,r,a){var l=a(7518),i=a(870);function s(u){this.bindVertexArrayOES=u.bindVertexArray.bind(u),this.createVertexArrayOES=u.createVertexArray.bind(u),this.deleteVertexArrayOES=u.deleteVertexArray.bind(u)}function o(u,d,h,y){var m=u.createVertexArray?new s(u):u.getExtension("OES_vertex_array_object"),E;return m?E=l(u,m):E=i(u),E.update(d,h,y),E}t.exports=o}),8192:(function(t,r,a){t.exports=o;var l=a(2825),i=a(3536),s=a(244);function o(u,d){var h=l(u[0],u[1],u[2]),y=l(d[0],d[1],d[2]);i(h,h),i(y,y);var m=s(h,y);return m>1?0:Math.acos(m)}}),8210:(function(t){t.exports=a;function r(l,i){var s=l+i,o=s-l,u=s-o,d=i-o,h=l-u,y=h+d;return y?[y,s]:[s]}function a(l,i){var s=l.length|0,o=i.length|0;if(s===1&&o===1)return r(l[0],i[0]);var u=s+o,d=new Array(u),h=0,y=0,m=0,E=Math.abs,c=l[y],_=E(c),T=i[m],M=E(T),k,b;_<M?(b=c,y+=1,y<s&&(c=l[y],_=E(c))):(b=T,m+=1,m<o&&(T=i[m],M=E(T))),y<s&&_<M||m>=o?(k=c,y+=1,y<s&&(c=l[y],_=E(c))):(k=T,m+=1,m<o&&(T=i[m],M=E(T)));for(var A=k+b,g=A-k,f=b-g,p=f,x=A,N,D,B,U,V;y<s&&m<o;)_<M?(k=c,y+=1,y<s&&(c=l[y],_=E(c))):(k=T,m+=1,m<o&&(T=i[m],M=E(T))),b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N;for(;y<s;)k=c,b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,y+=1,y<s&&(c=l[y]);for(;m<o;)k=T,b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,m+=1,m<o&&(T=i[m]);return p&&(d[h++]=p),x&&(d[h++]=x),h||(d[h++]=0),d.length=h,d}}),8277:(function(t){function r(){return function(u,d,h,y,m){var E=u[0],c=u[1],_=u[2],T=h[0],M=h[1],k=h[2],b=[0,0,0];y|=0;var A=0,g=0,f=0,p=k,x=M-_*k,N=T-c*M;for(f=0;f<E;++f){for(g=0;g<c;++g){for(A=0;A<_;++A){{var D=m,B;for(B=0;B<b.length-1;++B)D=D[b[B]];d[y]=D[b[b.length-1]]}y+=p,++b[2]}y+=x,b[2]-=_,++b[1]}y+=N,b[1]-=c,++b[0]}}}function a(){return r()}var l=a;function i(u){var d={};return function(y,m){var E=y.dtype,c=y.order,_=[E,c.join()].join(),T=d[_];return T||(d[_]=T=u([E,c])),T(y.shape.slice(0),y.data,y.stride,y.offset|0,m)}}function s(u){return i(l.bind(void 0,u))}function o(u){return s({funcName:u.funcName})}t.exports=o({funcName:"convert"})}),8284:(function(t){t.exports=r;function r(a,l){var i={identity:l},s=a.valueOf;return Object.defineProperty(a,"valueOf",{value:function(o){return o!==l?s.apply(this,arguments):i},writable:!0}),i}}),8406:(function(t,r){var a=1e-6,l=1e-6;r.vertexNormals=function(i,s,o){for(var u=s.length,d=new Array(u),h=o===void 0?a:o,y=0;y<u;++y)d[y]=[0,0,0];for(var y=0;y<i.length;++y)for(var m=i[y],E=0,c=m[m.length-1],_=m[0],T=0;T<m.length;++T){E=c,c=_,_=m[(T+1)%m.length];for(var M=s[E],k=s[c],b=s[_],A=new Array(3),g=0,f=new Array(3),p=0,x=0;x<3;++x)A[x]=M[x]-k[x],g+=A[x]*A[x],f[x]=b[x]-k[x],p+=f[x]*f[x];if(g*p>h)for(var N=d[c],D=1/Math.sqrt(g*p),x=0;x<3;++x){var B=(x+1)%3,U=(x+2)%3;N[x]+=D*(f[B]*A[U]-f[U]*A[B])}}for(var y=0;y<u;++y){for(var N=d[y],V=0,x=0;x<3;++x)V+=N[x]*N[x];if(V>h)for(var D=1/Math.sqrt(V),x=0;x<3;++x)N[x]*=D;else for(var x=0;x<3;++x)N[x]=0}return d},r.faceNormals=function(i,s,o){for(var u=i.length,d=new Array(u),h=o===void 0?l:o,y=0;y<u;++y){for(var m=i[y],E=new Array(3),c=0;c<3;++c)E[c]=s[m[c]];for(var _=new Array(3),T=new Array(3),c=0;c<3;++c)_[c]=E[1][c]-E[0][c],T[c]=E[2][c]-E[0][c];for(var M=new Array(3),k=0,c=0;c<3;++c){var b=(c+1)%3,A=(c+2)%3;M[c]=_[b]*T[A]-_[A]*T[b],k+=M[c]*M[c]}k>h?k=1/Math.sqrt(k):k=0;for(var c=0;c<3;++c)M[c]*=k;d[y]=M}return d}}),8418:(function(t,r,a){var l=a(5219),i=a(2762),s=a(8116),o=a(1888),u=a(6760),d=a(1283),h=a(9366),y=a(5964),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],E=ArrayBuffer,c=DataView;function _(ee){return E.isView(ee)&&!(ee instanceof c)}function T(ee){return Array.isArray(ee)||_(ee)}t.exports=se;function M(ee,pe){var oe=ee[0],Y=ee[1],ce=ee[2],ue=ee[3];return ee[0]=pe[0]*oe+pe[4]*Y+pe[8]*ce+pe[12]*ue,ee[1]=pe[1]*oe+pe[5]*Y+pe[9]*ce+pe[13]*ue,ee[2]=pe[2]*oe+pe[6]*Y+pe[10]*ce+pe[14]*ue,ee[3]=pe[3]*oe+pe[7]*Y+pe[11]*ce+pe[15]*ue,ee}function k(ee,pe,oe,Y){return M(Y,Y),M(Y,Y),M(Y,Y)}function b(ee,pe){this.index=ee,this.dataCoordinate=this.position=pe}function A(ee){return ee===!0||ee>1?1:ee}function g(ee,pe,oe,Y,ce,ue,_e,Le,ze,Ge,Ve,rt){this.gl=ee,this.pixelRatio=1,this.shader=pe,this.orthoShader=oe,this.projectShader=Y,this.pointBuffer=ce,this.colorBuffer=ue,this.glyphBuffer=_e,this.idBuffer=Le,this.vao=ze,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=Ge,this.pickOrthoShader=Ve,this.pickProjectShader=rt,this.points=[],this._selectResult=new b(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 f=g.prototype;f.pickSlots=1,f.setPickBase=function(ee){this.pickId=ee},f.isTransparent=function(){if(this.hasAlpha)return!0;for(var ee=0;ee<3;++ee)if(this.axesProject[ee]&&this.projectHasAlpha)return!0;return!1},f.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ee=0;ee<3;++ee)if(this.axesProject[ee]&&!this.projectHasAlpha)return!0;return!1};var p=[0,0],x=[0,0,0],N=[0,0,0],D=[0,0,0,1],B=[0,0,0,1],U=m.slice(),V=[0,0,0],q=[[0,0,0],[0,0,0]];function z(ee){return ee[0]=ee[1]=ee[2]=0,ee}function H(ee,pe){return ee[0]=pe[0],ee[1]=pe[1],ee[2]=pe[2],ee[3]=1,ee}function G(ee,pe,oe,Y){return ee[0]=pe[0],ee[1]=pe[1],ee[2]=pe[2],ee[oe]=Y,ee}function J(ee){for(var pe=q,oe=0;oe<2;++oe)for(var Y=0;Y<3;++Y)pe[oe][Y]=Math.max(Math.min(ee[oe][Y],1e8),-1e8);return pe}function le(ee,pe,oe,Y){var ce=pe.axesProject,ue=pe.gl,_e=ee.uniforms,Le=oe.model||m,ze=oe.view||m,Ge=oe.projection||m,Ve=pe.axesBounds,rt=J(pe.clipBounds),pt;pe.axes&&pe.axes.lastCubeProps?pt=pe.axes.lastCubeProps.axis:pt=[1,1,1],p[0]=2/ue.drawingBufferWidth,p[1]=2/ue.drawingBufferHeight,ee.bind(),_e.view=ze,_e.projection=Ge,_e.screenSize=p,_e.highlightId=pe.highlightId,_e.highlightScale=pe.highlightScale,_e.clipBounds=rt,_e.pickGroup=pe.pickId/255,_e.pixelRatio=Y;for(var gt=0;gt<3;++gt)if(ce[gt]){_e.scale=pe.projectScale[gt],_e.opacity=pe.projectOpacity[gt];for(var ht=U,lt=0;lt<16;++lt)ht[lt]=0;for(var lt=0;lt<4;++lt)ht[5*lt]=1;ht[5*gt]=0,pt[gt]<0?ht[12+gt]=Ve[0][gt]:ht[12+gt]=Ve[1][gt],u(ht,Le,ht),_e.model=ht;var Fe=(gt+1)%3,Pe=(gt+2)%3,be=z(x),Ye=z(N);be[Fe]=1,Ye[Pe]=1;var mt=k(Ge,ze,Le,H(D,be)),bt=k(Ge,ze,Le,H(B,Ye));if(Math.abs(mt[1])>Math.abs(bt[1])){var ft=mt;mt=bt,bt=ft,ft=be,be=Ye,Ye=ft;var Wt=Fe;Fe=Pe,Pe=Wt}mt[0]<0&&(be[Fe]=-1),bt[1]>0&&(Ye[Pe]=-1);for(var Zt=0,cr=0,lt=0;lt<4;++lt)Zt+=Math.pow(Le[4*Fe+lt],2),cr+=Math.pow(Le[4*Pe+lt],2);be[Fe]/=Math.sqrt(Zt),Ye[Pe]/=Math.sqrt(cr),_e.axes[0]=be,_e.axes[1]=Ye,_e.fragClipBounds[0]=G(V,rt[0],gt,-1e8),_e.fragClipBounds[1]=G(V,rt[1],gt,1e8),pe.vao.bind(),pe.vao.draw(ue.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(ue.lineWidth(pe.lineWidth*Y),pe.vao.draw(ue.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var ye=[-1e8,-1e8,-1e8],de=[1e8,1e8,1e8],me=[ye,de];function W(ee,pe,oe,Y,ce,ue,_e){var Le=oe.gl;if((ue===oe.projectHasAlpha||_e)&&le(pe,oe,Y,ce),ue===oe.hasAlpha||_e){ee.bind();var ze=ee.uniforms;ze.model=Y.model||m,ze.view=Y.view||m,ze.projection=Y.projection||m,p[0]=2/Le.drawingBufferWidth,p[1]=2/Le.drawingBufferHeight,ze.screenSize=p,ze.highlightId=oe.highlightId,ze.highlightScale=oe.highlightScale,ze.fragClipBounds=me,ze.clipBounds=oe.axes.bounds,ze.opacity=oe.opacity,ze.pickGroup=oe.pickId/255,ze.pixelRatio=ce,oe.vao.bind(),oe.vao.draw(Le.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(Le.lineWidth(oe.lineWidth*ce),oe.vao.draw(Le.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}f.draw=function(ee){var pe=this.useOrtho?this.orthoShader:this.shader;W(pe,this.projectShader,this,ee,this.pixelRatio,!1,!1)},f.drawTransparent=function(ee){var pe=this.useOrtho?this.orthoShader:this.shader;W(pe,this.projectShader,this,ee,this.pixelRatio,!0,!1)},f.drawPick=function(ee){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;W(pe,this.pickProjectShader,this,ee,1,!0,!0)},f.pick=function(ee){if(!ee||ee.id!==this.pickId)return null;var pe=ee.value[2]+(ee.value[1]<<8)+(ee.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var oe=this.points[pe],Y=this._selectResult;Y.index=pe;for(var ce=0;ce<3;++ce)Y.position[ce]=Y.dataCoordinate[ce]=oe[ce];return Y},f.highlight=function(ee){if(!ee)this.highlightId=[1,1,1,1];else{var pe=ee.index,oe=pe&255,Y=pe>>8&255,ce=pe>>16&255;this.highlightId=[oe/255,Y/255,ce/255,0]}};function ie(ee,pe,oe,Y){var ce;T(ee)?pe<ee.length?ce=ee[pe]:ce=void 0:ce=ee,ce=y(ce);var ue=!0;l(ce)&&(ce="▼",ue=!1),oe||(oe={});var _e=oe.family;T(_e)&&(_e=_e[pe]),_e||(_e="normal");var Le=oe.weight;T(Le)&&(Le=Le[pe]),Le||(Le="normal");var ze=oe.style;T(ze)&&(ze=ze[pe]),ze||(ze="normal");var Ge=oe.variant;T(Ge)&&(Ge=Ge[pe]),Ge||(Ge="normal");var Ve=h(ce,{family:_e,weight:Le,style:ze,variant:Ge},Y),Ve=h(ce,oe,Y);return{mesh:Ve[0],lines:Ve[1],bounds:Ve[2],visible:ue}}f.update=function(ee){if(ee=ee||{},"perspective"in ee&&(this.useOrtho=!ee.perspective),"orthographic"in ee&&(this.useOrtho=!!ee.orthographic),"lineWidth"in ee&&(this.lineWidth=ee.lineWidth),"project"in ee)if(T(ee.project))this.axesProject=ee.project;else{var pe=!!ee.project;this.axesProject=[pe,pe,pe]}if("projectScale"in ee)if(T(ee.projectScale))this.projectScale=ee.projectScale.slice();else{var oe=+ee.projectScale;this.projectScale=[oe,oe,oe]}if(this.projectHasAlpha=!1,"projectOpacity"in ee){if(T(ee.projectOpacity))this.projectOpacity=ee.projectOpacity.slice();else{var oe=+ee.projectOpacity;this.projectOpacity=[oe,oe,oe]}for(var Y=0;Y<3;++Y)this.projectOpacity[Y]=A(this.projectOpacity[Y]),this.projectOpacity[Y]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in ee&&(this.opacity=A(ee.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var ce=ee.position,ue={family:ee.font||"normal",style:ee.fontStyle||"normal",weight:ee.fontWeight||"normal",variant:ee.fontVariant||"normal"},_e=ee.alignment||[0,0],Le,ze;if(_e.length===2)Le=_e[0],ze=_e[1];else{Le=[],ze=[];for(var Y=0;Y<_e.length;++Y)Le[Y]=_e[Y][0],ze[Y]=_e[Y][1]}var Ge=[1/0,1/0,1/0],Ve=[-1/0,-1/0,-1/0],rt=ee.glyph,pt=ee.color,gt=ee.size,ht=ee.angle,lt=ee.lineColor,Fe=-1,Pe=0,be=0,Ye=0;if(ce.length){Ye=ce.length;e:for(var Y=0;Y<Ye;++Y){for(var mt=ce[Y],bt=0;bt<3;++bt)if(isNaN(mt[bt])||!isFinite(mt[bt]))continue e;var ft=ie(rt,Y,ue,this.pixelRatio),Wt=ft.mesh,Zt=ft.lines,cr=ft.bounds;Pe+=Wt.cells.length*3,be+=Zt.edges.length*2}}var pr=Pe+be,Br=o.mallocFloat(3*pr),Fr=o.mallocFloat(4*pr),cn=o.mallocFloat(2*pr),Nr=o.mallocUint32(pr);if(pr>0){var Jr=0,Dt=Pe,$e=[0,0,0,1],ot=[0,0,0,1],De=T(pt)&&T(pt[0]),Ee=T(lt)&&T(lt[0]);e:for(var Y=0;Y<Ye;++Y){Fe+=1;for(var mt=ce[Y],bt=0;bt<3;++bt){if(isNaN(mt[bt])||!isFinite(mt[bt]))continue e;Ve[bt]=Math.max(Ve[bt],mt[bt]),Ge[bt]=Math.min(Ge[bt],mt[bt])}var ft=ie(rt,Y,ue,this.pixelRatio),Wt=ft.mesh,Zt=ft.lines,cr=ft.bounds,Ae=ft.visible;if(!Ae)$e=[1,1,1,0];else if(T(pt)){var Ie;if(De?Y<pt.length?Ie=pt[Y]:Ie=[0,0,0,0]:Ie=pt,Ie.length===3){for(var bt=0;bt<3;++bt)$e[bt]=Ie[bt];$e[3]=1}else if(Ie.length===4){for(var bt=0;bt<4;++bt)$e[bt]=Ie[bt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else $e[0]=$e[1]=$e[2]=0,$e[3]=1;if(!Ae)ot=[1,1,1,0];else if(T(lt)){var Ie;if(Ee?Y<lt.length?Ie=lt[Y]:Ie=[0,0,0,0]:Ie=lt,Ie.length===3){for(var bt=0;bt<3;++bt)ot[bt]=Ie[bt];ot[bt]=1}else if(Ie.length===4){for(var bt=0;bt<4;++bt)ot[bt]=Ie[bt];!this.hasAlpha&&Ie[3]<1&&(this.hasAlpha=!0)}}else ot[0]=ot[1]=ot[2]=0,ot[3]=1;var tt=.5;Ae?T(gt)?Y<gt.length?tt=+gt[Y]:tt=12:gt?tt=+gt:this.useOrtho&&(tt=12):tt=0;var st=0;T(ht)?Y<ht.length?st=+ht[Y]:st=0:ht&&(st=+ht);for(var Ft=Math.cos(st),Nt=Math.sin(st),mt=ce[Y],bt=0;bt<3;++bt)Ve[bt]=Math.max(Ve[bt],mt[bt]),Ge[bt]=Math.min(Ge[bt],mt[bt]);var Xt=Le,lr=ze,Xt=0;T(Le)?Y<Le.length?Xt=Le[Y]:Xt=0:Le&&(Xt=Le);var lr=0;T(ze)?Y<ze.length?lr=ze[Y]:lr=0:ze&&(lr=ze),Xt*=Xt>0?1-cr[0][0]:Xt<0?1+cr[1][0]:1,lr*=lr>0?1-cr[0][1]:lr<0?1+cr[1][1]:1;for(var Rr=[Xt,lr],ha=Wt.cells||[],ia=Wt.positions||[],bt=0;bt<ha.length;++bt)for(var Mr=ha[bt],Sr=0;Sr<3;++Sr){for(var Kr=0;Kr<3;++Kr)Br[3*Jr+Kr]=mt[Kr];for(var Kr=0;Kr<4;++Kr)Fr[4*Jr+Kr]=$e[Kr];Nr[Jr]=Fe;var qn=ia[Mr[Sr]];cn[2*Jr]=tt*(Ft*qn[0]-Nt*qn[1]+Rr[0]),cn[2*Jr+1]=tt*(Nt*qn[0]+Ft*qn[1]+Rr[1]),Jr+=1}for(var ha=Zt.edges,ia=Zt.positions,bt=0;bt<ha.length;++bt)for(var Mr=ha[bt],Sr=0;Sr<2;++Sr){for(var Kr=0;Kr<3;++Kr)Br[3*Dt+Kr]=mt[Kr];for(var Kr=0;Kr<4;++Kr)Fr[4*Dt+Kr]=ot[Kr];Nr[Dt]=Fe;var qn=ia[Mr[Sr]];cn[2*Dt]=tt*(Ft*qn[0]-Nt*qn[1]+Rr[0]),cn[2*Dt+1]=tt*(Nt*qn[0]+Ft*qn[1]+Rr[1]),Dt+=1}}}this.bounds=[Ge,Ve],this.points=ce,this.pointCount=ce.length,this.vertexCount=Pe,this.lineVertexCount=be,this.pointBuffer.update(Br),this.colorBuffer.update(Fr),this.glyphBuffer.update(cn),this.idBuffer.update(Nr),o.free(Br),o.free(Fr),o.free(cn),o.free(Nr)},f.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 se(ee){var pe=ee.gl,oe=d.createPerspective(pe),Y=d.createOrtho(pe),ce=d.createProject(pe),ue=d.createPickPerspective(pe),_e=d.createPickOrtho(pe),Le=d.createPickProject(pe),ze=i(pe),Ge=i(pe),Ve=i(pe),rt=i(pe),pt=s(pe,[{buffer:ze,size:3,type:pe.FLOAT},{buffer:Ge,size:4,type:pe.FLOAT},{buffer:Ve,size:2,type:pe.FLOAT},{buffer:rt,size:4,type:pe.UNSIGNED_BYTE,normalized:!0}]),gt=new g(pe,oe,Y,ce,ze,Ge,Ve,rt,pt,ue,_e,Le);return gt.update(ee),gt}}),8489:(function(t){t.exports=r;function r(a,l,i,s){return a[0]=l[0]+i[0]*s,a[1]=l[1]+i[1]*s,a[2]=l[2]+i[2]*s,a}}),8507:(function(t){t.exports=l;var r=Math.min;function a(i,s){return i-s}function l(i,s){var o=i.length,u=i.length-s.length;if(u)return u;switch(o){case 0:return 0;case 1:return i[0]-s[0];case 2:return i[0]+i[1]-s[0]-s[1]||r(i[0],i[1])-r(s[0],s[1]);case 3:var d=i[0]+i[1],h=s[0]+s[1];if(u=d+i[2]-(h+s[2]),u)return u;var y=r(i[0],i[1]),m=r(s[0],s[1]);return r(y,i[2])-r(m,s[2])||r(y+i[2],d)-r(m+s[2],h);case 4:var E=i[0],c=i[1],_=i[2],T=i[3],M=s[0],k=s[1],b=s[2],A=s[3];return E+c+_+T-(M+k+b+A)||r(E,c,_,T)-r(M,k,b,A,M)||r(E+c,E+_,E+T,c+_,c+T,_+T)-r(M+k,M+b,M+A,k+b,k+A,b+A)||r(E+c+_,E+c+T,E+_+T,c+_+T)-r(M+k+b,M+k+A,M+b+A,k+b+A);default:for(var g=i.slice().sort(a),f=s.slice().sort(a),p=0;p<o;++p)if(u=g[p]-f[p],u)return u;return 0}}}),8512:(function(t,r,a){var l=a(665);t.exports=i;function i(s,o,u){typeof s=="function"&&(u=!!o,o=s,s=window);var d=l("ex",s),h=function(y){u&&y.preventDefault();var m=y.deltaX||0,E=y.deltaY||0,c=y.deltaZ||0,_=y.deltaMode,T=1;switch(_){case 1:T=d;break;case 2:T=window.innerHeight;break}if(m*=T,E*=T,c*=T,m||E||c)return o(m,E,c,y)};return s.addEventListener("wheel",h),h}}),8545:(function(t){t.exports=a;function r(l,i){var s=l+i,o=s-l,u=s-o,d=i-o,h=l-u,y=h+d;return y?[y,s]:[s]}function a(l,i){var s=l.length|0,o=i.length|0;if(s===1&&o===1)return r(l[0],-i[0]);var u=s+o,d=new Array(u),h=0,y=0,m=0,E=Math.abs,c=l[y],_=E(c),T=-i[m],M=E(T),k,b;_<M?(b=c,y+=1,y<s&&(c=l[y],_=E(c))):(b=T,m+=1,m<o&&(T=-i[m],M=E(T))),y<s&&_<M||m>=o?(k=c,y+=1,y<s&&(c=l[y],_=E(c))):(k=T,m+=1,m<o&&(T=-i[m],M=E(T)));for(var A=k+b,g=A-k,f=b-g,p=f,x=A,N,D,B,U,V;y<s&&m<o;)_<M?(k=c,y+=1,y<s&&(c=l[y],_=E(c))):(k=T,m+=1,m<o&&(T=-i[m],M=E(T))),b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N;for(;y<s;)k=c,b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,y+=1,y<s&&(c=l[y]);for(;m<o;)k=T,b=p,A=k+b,g=A-k,f=b-g,f&&(d[h++]=f),N=x+A,D=N-x,B=N-D,U=A-D,V=x-B,p=V+U,x=N,m+=1,m<o&&(T=-i[m]);return p&&(d[h++]=p),x&&(d[h++]=x),h||(d[h++]=0),d.length=h,d}}),8572:(function(t){t.exports=function(a){return a<0?-1:a>0?1:0}}),8648:(function(t,r,a){t.exports=a(783)}),8692:(function(t){t.exports=r;function r(a,l,i,s){var o=i[0],u=i[1],d=l[0]-o,h=l[1]-u,y=Math.sin(s),m=Math.cos(s);return a[0]=o+d*m-h*y,a[1]=u+d*y+h*m,a[2]=l[2],a}}),8697:(function(t,r,a){var l=a(869);t.exports=i;function i(s,o){return l(s[0].mul(o[1]),s[1].mul(o[0]))}}),8731:(function(t,r,a){t.exports=h;var l=a(8866);function i(y,m,E,c,_,T){this._gl=y,this._wrapper=m,this._index=E,this._locations=c,this._dimension=_,this._constFunc=T}var s=i.prototype;s.pointer=function(m,E,c,_){var T=this,M=T._gl,k=T._locations[T._index];M.vertexAttribPointer(k,T._dimension,m||M.FLOAT,!!E,c||0,_||0),M.enableVertexAttribArray(k)},s.set=function(y,m,E,c){return this._constFunc(this._locations[this._index],y,m,E,c)},Object.defineProperty(s,"location",{get:function(){return this._locations[this._index]},set:function(y){return y!==this._locations[this._index]&&(this._locations[this._index]=y|0,this._wrapper.program=null),y|0}});var o=[function(y,m,E){return E.length===void 0?y.vertexAttrib1f(m,E):y.vertexAttrib1fv(m,E)},function(y,m,E,c){return E.length===void 0?y.vertexAttrib2f(m,E,c):y.vertexAttrib2fv(m,E)},function(y,m,E,c,_){return E.length===void 0?y.vertexAttrib3f(m,E,c,_):y.vertexAttrib3fv(m,E)},function(y,m,E,c,_,T){return E.length===void 0?y.vertexAttrib4f(m,E,c,_,T):y.vertexAttrib4fv(m,E)}];function u(y,m,E,c,_,T,M){var k=o[_],b=new i(y,m,E,c,_,k);Object.defineProperty(T,M,{set:function(A){return y.disableVertexAttribArray(c[E]),k(y,c[E],A),A},get:function(){return b},enumerable:!0})}function d(y,m,E,c,_,T,M){for(var k=new Array(_),b=new Array(_),A=0;A<_;++A)u(y,m,E[A],c,_,k,A),b[A]=k[A];Object.defineProperty(k,"location",{set:function(p){if(Array.isArray(p))for(var x=0;x<_;++x)b[x].location=p[x];else for(var x=0;x<_;++x)b[x].location=p+x;return p},get:function(){for(var p=new Array(_),x=0;x<_;++x)p[x]=c[E[x]];return p},enumerable:!0}),k.pointer=function(p,x,N,D){p=p||y.FLOAT,x=!!x,N=N||_*_,D=D||0;for(var B=0;B<_;++B){var U=c[E[B]];y.vertexAttribPointer(U,_,p,x,N,D+B*_),y.enableVertexAttribArray(U)}};var g=new Array(_),f=y["vertexAttrib"+_+"fv"];Object.defineProperty(T,M,{set:function(p){for(var x=0;x<_;++x){var N=c[E[x]];if(y.disableVertexAttribArray(N),Array.isArray(p[0]))f.call(y,N,p[x]);else{for(var D=0;D<_;++D)g[D]=p[_*x+D];f.call(y,N,g)}}return p},get:function(){return k},enumerable:!0})}function h(y,m,E,c){for(var _={},T=0,M=E.length;T<M;++T){var k=E[T],b=k.name,A=k.type,g=k.locations;switch(A){case"bool":case"int":case"float":u(y,m,g[0],c,1,_,b);break;default:if(A.indexOf("vec")>=0){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new l("","Invalid data type for attribute "+b+": "+A);u(y,m,g[0],c,f,_,b)}else if(A.indexOf("mat")>=0){var f=A.charCodeAt(A.length-1)-48;if(f<2||f>4)throw new l("","Invalid data type for attribute "+b+": "+A);d(y,m,g,c,f,_,b)}else throw new l("","Unknown data type for attribute "+b+": "+A);break}}return _}}),8828:(function(t,r){"use restrict";var a=32;r.INT_BITS=a,r.INT_MAX=2147483647,r.INT_MIN=-1<<a-1,r.sign=function(s){return(s>0)-(s<0)},r.abs=function(s){var o=s>>a-1;return(s^o)-o},r.min=function(s,o){return o^(s^o)&-(s<o)},r.max=function(s,o){return s^(s^o)&-(s<o)},r.isPow2=function(s){return!(s&s-1)&&!!s},r.log2=function(s){var o,u;return o=(s>65535)<<4,s>>>=o,u=(s>255)<<3,s>>>=u,o|=u,u=(s>15)<<2,s>>>=u,o|=u,u=(s>3)<<1,s>>>=u,o|=u,o|s>>1},r.log10=function(s){return s>=1e9?9:s>=1e8?8:s>=1e7?7:s>=1e6?6:s>=1e5?5:s>=1e4?4:s>=1e3?3:s>=100?2:s>=10?1:0},r.popCount=function(s){return s=s-(s>>>1&1431655765),s=(s&858993459)+(s>>>2&858993459),(s+(s>>>4)&252645135)*16843009>>>24};function l(s){var o=32;return s&=-s,s&&o--,s&65535&&(o-=16),s&16711935&&(o-=8),s&252645135&&(o-=4),s&858993459&&(o-=2),s&1431655765&&(o-=1),o}r.countTrailingZeros=l,r.nextPow2=function(s){return s+=s===0,--s,s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s+1},r.prevPow2=function(s){return s|=s>>>1,s|=s>>>2,s|=s>>>4,s|=s>>>8,s|=s>>>16,s-(s>>>1)},r.parity=function(s){return s^=s>>>16,s^=s>>>8,s^=s>>>4,s&=15,27030>>>s&1};var i=new Array(256);(function(s){for(var o=0;o<256;++o){var u=o,d=o,h=7;for(u>>>=1;u;u>>>=1)d<<=1,d|=u&1,--h;s[o]=d<<h&255}})(i),r.reverse=function(s){return i[s&255]<<24|i[s>>>8&255]<<16|i[s>>>16&255]<<8|i[s>>>24&255]},r.interleave2=function(s,o){return s&=65535,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,s|o<<1},r.deinterleave2=function(s,o){return s=s>>>o&1431655765,s=(s|s>>>1)&858993459,s=(s|s>>>2)&252645135,s=(s|s>>>4)&16711935,s=(s|s>>>16)&65535,s<<16>>16},r.interleave3=function(s,o,u){return s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,s|=o<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,s|u<<2},r.deinterleave3=function(s,o){return s=s>>>o&1227133513,s=(s|s>>>2)&3272356035,s=(s|s>>>4)&251719695,s=(s|s>>>8)&4278190335,s=(s|s>>>16)&1023,s<<22>>22},r.nextCombination=function(s){var o=s|s-1;return o+1|(~o&-~o)-1>>>l(s)+1}}),8866:(function(t){function r(a,l,i){this.shortMessage=l||"",this.longMessage=i||"",this.rawError=a||"",this.message="gl-shader: "+(l||a||"")+(i?`
`+i:""),this.stack=new Error().stack}r.prototype=new Error,r.prototype.name="GLError",r.prototype.constructor=r,t.exports=r}),8902:(function(t,r,a){var l=a(2478),i=a(3250)[3],s=0,o=1,u=2;t.exports=M;function d(k,b,A,g,f){this.a=k,this.b=b,this.idx=A,this.lowerIds=g,this.upperIds=f}function h(k,b,A,g){this.a=k,this.b=b,this.type=A,this.idx=g}function y(k,b){var A=k.a[0]-b.a[0]||k.a[1]-b.a[1]||k.type-b.type;return A||k.type!==s&&(A=i(k.a,k.b,b.b),A)?A:k.idx-b.idx}function m(k,b){return i(k.a,k.b,b)}function E(k,b,A,g,f){for(var p=l.lt(b,g,m),x=l.gt(b,g,m),N=p;N<x;++N){for(var D=b[N],B=D.lowerIds,V=B.length;V>1&&i(A[B[V-2]],A[B[V-1]],g)>0;)k.push([B[V-1],B[V-2],f]),V-=1;B.length=V,B.push(f);for(var U=D.upperIds,V=U.length;V>1&&i(A[U[V-2]],A[U[V-1]],g)<0;)k.push([U[V-2],U[V-1],f]),V-=1;U.length=V,U.push(f)}}function c(k,b){var A;return k.a[0]<b.a[0]?A=i(k.a,k.b,b.a):A=i(b.b,b.a,k.a),A||(b.b[0]<k.b[0]?A=i(k.a,k.b,b.b):A=i(b.b,b.a,k.b),A||k.idx-b.idx)}function _(k,b,A){var g=l.le(k,A,c),f=k[g],p=f.upperIds,x=p[p.length-1];f.upperIds=[x],k.splice(g+1,0,new d(A.a,A.b,A.idx,[x],p))}function T(k,b,A){var g=A.a;A.a=A.b,A.b=g;var f=l.eq(k,A,c),p=k[f],x=k[f-1];x.upperIds=p.upperIds,k.splice(f,1)}function M(k,b){for(var A=k.length,g=b.length,f=[],p=0;p<A;++p)f.push(new h(k[p],null,s,p));for(var p=0;p<g;++p){var x=b[p],N=k[x[0]],D=k[x[1]];N[0]<D[0]?f.push(new h(N,D,u,p),new h(D,N,o,p)):N[0]>D[0]&&f.push(new h(D,N,u,p),new h(N,D,o,p))}f.sort(y);for(var B=f[0].a[0]-(1+Math.abs(f[0].a[0]))*Math.pow(2,-52),U=[new d([B,1],[B,0],-1,[],[])],V=[],p=0,q=f.length;p<q;++p){var z=f[p],H=z.type;H===s?E(V,U,k,z.a,z.idx):H===u?_(U,k,z):T(U,k,z)}return V}}),8954:(function(t,r,a){t.exports=c;var l=a(3250),i=a(6803).Fw;function s(_,T,M){this.vertices=_,this.adjacent=T,this.boundary=M,this.lastVisited=-1}s.prototype.flip=function(){var _=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=_;var T=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=T};function o(_,T,M){this.vertices=_,this.cell=T,this.index=M}function u(_,T){return i(_.vertices,T.vertices)}function d(_){return function(){var T=this.tuple;return _.apply(this,T)}}function h(_){var T=l[_+1];return T||(T=l),d(T)}var y=[];function m(_,T,M){this.dimension=_,this.vertices=T,this.simplices=M,this.interior=M.filter(function(A){return!A.boundary}),this.tuple=new Array(_+1);for(var k=0;k<=_;++k)this.tuple[k]=this.vertices[k];var b=y[_];b||(b=y[_]=h(_)),this.orient=b}var E=m.prototype;E.handleBoundaryDegeneracy=function(_,T){var M=this.dimension,k=this.vertices.length-1,b=this.tuple,A=this.vertices,g=[_];for(_.lastVisited=-k;g.length>0;){_=g.pop();for(var f=_.adjacent,p=0;p<=M;++p){var x=f[p];if(!(!x.boundary||x.lastVisited<=-k)){for(var N=x.vertices,D=0;D<=M;++D){var B=N[D];B<0?b[D]=T:b[D]=A[B]}var U=this.orient();if(U>0)return x;x.lastVisited=-k,U===0&&g.push(x)}}}return null},E.walk=function(_,T){var M=this.vertices.length-1,k=this.dimension,b=this.vertices,A=this.tuple,g=T?this.interior.length*Math.random()|0:this.interior.length-1,f=this.interior[g];e:for(;!f.boundary;){for(var p=f.vertices,x=f.adjacent,N=0;N<=k;++N)A[N]=b[p[N]];f.lastVisited=M;for(var N=0;N<=k;++N){var D=x[N];if(!(D.lastVisited>=M)){var B=A[N];A[N]=_;var U=this.orient();if(A[N]=B,U<0){f=D;continue e}else D.boundary?D.lastVisited=-M:D.lastVisited=M}}return}return f},E.addPeaks=function(_,T){var M=this.vertices.length-1,k=this.dimension,b=this.vertices,A=this.tuple,g=this.interior,f=this.simplices,p=[T];T.lastVisited=M,T.vertices[T.vertices.indexOf(-1)]=M,T.boundary=!1,g.push(T);for(var x=[];p.length>0;){var T=p.pop(),N=T.vertices,D=T.adjacent,B=N.indexOf(M);if(!(B<0)){for(var U=0;U<=k;++U)if(U!==B){var V=D[U];if(!(!V.boundary||V.lastVisited>=M)){var q=V.vertices;if(V.lastVisited!==-M){for(var z=0,H=0;H<=k;++H)q[H]<0?(z=H,A[H]=_):A[H]=b[q[H]];var G=this.orient();if(G>0){q[z]=M,V.boundary=!1,g.push(V),p.push(V),V.lastVisited=M;continue}else V.lastVisited=-M}var J=V.adjacent,le=N.slice(),ye=D.slice(),de=new s(le,ye,!0);f.push(de);var me=J.indexOf(T);if(!(me<0)){J[me]=de,ye[B]=V,le[U]=-1,ye[U]=T,D[U]=de,de.flip();for(var H=0;H<=k;++H){var W=le[H];if(!(W<0||W===M)){for(var ie=new Array(k-1),se=0,ee=0;ee<=k;++ee){var pe=le[ee];pe<0||ee===H||(ie[se++]=pe)}x.push(new o(ie,de,H))}}}}}}}x.sort(u);for(var U=0;U+1<x.length;U+=2){var oe=x[U],Y=x[U+1],ce=oe.index,ue=Y.index;ce<0||ue<0||(oe.cell.adjacent[oe.index]=Y.cell,Y.cell.adjacent[Y.index]=oe.cell)}},E.insert=function(_,T){var M=this.vertices;M.push(_);var k=this.walk(_,T);if(k){for(var b=this.dimension,A=this.tuple,g=0;g<=b;++g){var f=k.vertices[g];f<0?A[g]=_:A[g]=M[f]}var p=this.orient(A);p<0||p===0&&(k=this.handleBoundaryDegeneracy(k,_),!k)||this.addPeaks(_,k)}},E.boundary=function(){for(var _=this.dimension,T=[],M=this.simplices,k=M.length,b=0;b<k;++b){var A=M[b];if(A.boundary){for(var g=new Array(_),f=A.vertices,p=0,x=0,N=0;N<=_;++N)f[N]>=0?g[p++]=f[N]:x=N&1;if(x===(_&1)){var D=g[0];g[0]=g[1],g[1]=D}T.push(g)}}return T};function c(_,T){var M=_.length;if(M===0)throw new Error("Must have at least d+1 points");var k=_[0].length;if(M<=k)throw new Error("Must input at least d+1 points");var b=_.slice(0,k+1),A=l.apply(void 0,b);if(A===0)throw new Error("Input not in general position");for(var g=new Array(k+1),f=0;f<=k;++f)g[f]=f;A<0&&(g[0]=1,g[1]=0);for(var p=new s(g,new Array(k+1),!1),x=p.adjacent,N=new Array(k+2),f=0;f<=k;++f){for(var D=g.slice(),B=0;B<=k;++B)B===f&&(D[B]=-1);var U=D[0];D[0]=D[1],D[1]=U;var V=new s(D,new Array(k+1),!0);x[f]=V,N[f]=V}N[k+1]=p;for(var f=0;f<=k;++f)for(var D=x[f].vertices,q=x[f].adjacent,B=0;B<=k;++B){var z=D[B];if(z<0){q[B]=p;continue}for(var H=0;H<=k;++H)x[H].vertices.indexOf(z)<0&&(q[B]=x[H])}for(var G=new m(k,b,N),J=!!T,f=k+1;f<M;++f)G.insert(_[f],J);return G.boundary()}}),8987:(function(t,r,a){var l=a(7842),i=a(6504);t.exports=s;function s(o,u){for(var d=l(u),h=o.length,y=new Array(h),m=0;m<h;++m)y[m]=i(o[m],d);return y}}),9060:(function(t,r,a){var l=a(9405),i=a(2762),s=a(8116),o=a(7766),u=a(6760),d=a(7608),h=a(9618),y=a(6729),m=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function E(A,g,f,p,x,N,D,B,U,V,q){this.gl=A,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=g,this.dirty=!0,this.triShader=f,this.pickShader=p,this.trianglePositions=x,this.triangleVectors=N,this.triangleColors=B,this.triangleUVs=U,this.triangleIds=D,this.triangleVAO=V,this.triangleCount=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.traceType=q,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=m,this._view=m,this._projection=m,this._resolution=[1,1]}var c=E.prototype;c.isOpaque=function(){return this.opacity>=1},c.isTransparent=function(){return this.opacity<1},c.pickSlots=1,c.setPickBase=function(A){this.pickId=A};function _(A){for(var g=y({colormap:A,nshades:256,format:"rgba"}),f=new Uint8Array(256*4),p=0;p<256;++p){for(var x=g[p],N=0;N<3;++N)f[4*p+N]=x[N];f[4*p+3]=x[3]*255}return h(f,[256,256,4],[4,0,1])}function T(A){for(var g=A.length,f=new Array(g),p=0;p<g;++p)f[p]=A[p][2];return f}c.update=function(A){A=A||{};var g=this.gl;this.dirty=!0,"lightPosition"in A&&(this.lightPosition=A.lightPosition),"opacity"in A&&(this.opacity=A.opacity),"ambient"in A&&(this.ambientLight=A.ambient),"diffuse"in A&&(this.diffuseLight=A.diffuse),"specular"in A&&(this.specularLight=A.specular),"roughness"in A&&(this.roughness=A.roughness),"fresnel"in A&&(this.fresnel=A.fresnel),A.tubeScale!==void 0&&(this.tubeScale=A.tubeScale),A.vectorScale!==void 0&&(this.vectorScale=A.vectorScale),A.coneScale!==void 0&&(this.coneScale=A.coneScale),A.coneOffset!==void 0&&(this.coneOffset=A.coneOffset),A.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=g.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=g.LINEAR,this.texture.setPixels(_(A.colormap)),this.texture.generateMipmap());var f=A.cells,p=A.positions,x=A.vectors;if(!(!p||!f||!x)){var N=[],D=[],B=[],U=[],V=[];this.cells=f,this.positions=p,this.vectors=x;var q=A.meshColor||[1,1,1,1],z=A.vertexIntensity,H=1/0,G=-1/0;if(z)if(A.vertexIntensityBounds)H=+A.vertexIntensityBounds[0],G=+A.vertexIntensityBounds[1];else for(var J=0;J<z.length;++J){var le=z[J];H=Math.min(H,le),G=Math.max(G,le)}else for(var J=0;J<p.length;++J){var le=p[J][2];H=Math.min(H,le),G=Math.max(G,le)}z?this.intensity=z:this.intensity=T(p),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(var J=0;J<p.length;++J)for(var ye=p[J],de=0;de<3;++de)isNaN(ye[de])||!isFinite(ye[de])||(this.bounds[0][de]=Math.min(this.bounds[0][de],ye[de]),this.bounds[1][de]=Math.max(this.bounds[1][de],ye[de]));var me=0;e:for(var J=0;J<f.length;++J){var W=f[J];switch(W.length){case 3:for(var de=0;de<3;++de)for(var ie=W[de],ye=p[ie],se=0;se<3;++se)if(isNaN(ye[se])||!isFinite(ye[se]))continue e;for(var de=0;de<3;++de){var ie=W[2-de],ye=p[ie];N.push(ye[0],ye[1],ye[2],ye[3]);var ee=x[ie];D.push(ee[0],ee[1],ee[2],ee[3]||0);var pe=q;pe.length===3?B.push(pe[0],pe[1],pe[2],1):B.push(pe[0],pe[1],pe[2],pe[3]);var oe;z?oe=[(z[ie]-H)/(G-H),0]:oe=[(ye[2]-H)/(G-H),0],U.push(oe[0],oe[1]),V.push(J)}me+=1;break}}this.triangleCount=me,this.trianglePositions.update(N),this.triangleVectors.update(D),this.triangleColors.update(B),this.triangleUVs.update(U),this.triangleIds.update(new Uint32Array(V))}},c.drawTransparent=c.draw=function(A){A=A||{};for(var g=this.gl,f=A.model||m,p=A.view||m,x=A.projection||m,N=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)N[0][D]=Math.max(N[0][D],this.clipBounds[0][D]),N[1][D]=Math.min(N[1][D],this.clipBounds[1][D]);var B={model:f,view:p,projection:x,inverseModel:m.slice(),clipBounds:N,kambient:this.ambientLight,kdiffuse:this.diffuseLight,kspecular:this.specularLight,roughness:this.roughness,fresnel:this.fresnel,eyePosition:[0,0,0],lightPosition:[0,0,0],opacity:this.opacity,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,texture:0};B.inverseModel=d(B.inverseModel,B.model),g.disable(g.CULL_FACE),this.texture.bind(0);var U=new Array(16);u(U,B.view,B.model),u(U,B.projection,U),d(U,U);for(var D=0;D<3;++D)B.eyePosition[D]=U[12+D]/U[15];for(var V=U[15],D=0;D<3;++D)V+=this.lightPosition[D]*U[4*D+3];for(var D=0;D<3;++D){for(var q=U[12+D],z=0;z<3;++z)q+=U[4*z+D]*this.lightPosition[z];B.lightPosition[D]=q/V}if(this.triangleCount>0){var H=this.triShader;H.bind(),H.uniforms=B,this.triangleVAO.bind(),g.drawArrays(g.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},c.drawPick=function(A){A=A||{};for(var g=this.gl,f=A.model||m,p=A.view||m,x=A.projection||m,N=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)N[0][D]=Math.max(N[0][D],this.clipBounds[0][D]),N[1][D]=Math.min(N[1][D],this.clipBounds[1][D]);this._model=[].slice.call(f),this._view=[].slice.call(p),this._projection=[].slice.call(x),this._resolution=[g.drawingBufferWidth,g.drawingBufferHeight];var B={model:f,view:p,projection:x,clipBounds:N,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},U=this.pickShader;U.bind(),U.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),g.drawArrays(g.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},c.pick=function(A){if(!A||A.id!==this.pickId)return null;var g=A.value[0]+256*A.value[1]+65536*A.value[2],f=this.cells[g],p=this.positions[f[1]].slice(0,3),x={position:p,dataCoordinate:p,index:Math.floor(f[1]/48)};return this.traceType==="cone"?x.index=Math.floor(f[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[f[1]],x.velocity=this.vectors[f[1]].slice(0,3),x.divergence=this.vectors[f[1]][3],x.index=g),x},c.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()};function M(A,g){var f=l(A,g.meshShader.vertex,g.meshShader.fragment,null,g.meshShader.attributes);return f.attributes.position.location=0,f.attributes.color.location=2,f.attributes.uv.location=3,f.attributes.vector.location=4,f}function k(A,g){var f=l(A,g.pickShader.vertex,g.pickShader.fragment,null,g.pickShader.attributes);return f.attributes.position.location=0,f.attributes.id.location=1,f.attributes.vector.location=4,f}function b(A,g,f){var p=f.shaders;arguments.length===1&&(g=A,A=g.gl);var x=M(A,p),N=k(A,p),D=o(A,h(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=A.LINEAR_MIPMAP_LINEAR,D.magFilter=A.LINEAR;var B=i(A),U=i(A),V=i(A),q=i(A),z=i(A),H=s(A,[{buffer:B,type:A.FLOAT,size:4},{buffer:z,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:A.FLOAT,size:4},{buffer:q,type:A.FLOAT,size:2},{buffer:U,type:A.FLOAT,size:4}]),G=new E(A,D,x,N,B,U,z,V,q,H,f.traceType||"cone");return G.update(g),G}t.exports=b}),9127:(function(t,r,a){t.exports=s;var l=a(6204),i=a(5771);function s(o){return i(l(o))}}),9131:(function(t,r,a){var l=a(5177),i=a(9288);t.exports=s;function s(o,u){return u=u||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),l(o,o),i(o,o,u),o}}),9165:(function(t,r,a){t.exports=E;var l=a(2762),i=a(8116),s=a(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(c,_,T,M){this.gl=c,this.shader=M,this.buffer=_,this.vao=T,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 d=u.prototype;d.isOpaque=function(){return!this.hasAlpha},d.isTransparent=function(){return this.hasAlpha},d.drawTransparent=d.draw=function(c){var _=this.gl,T=this.shader.uniforms;this.shader.bind();var M=T.view=c.view||o,k=T.projection=c.projection||o;T.model=c.model||o,T.clipBounds=this.clipBounds,T.opacity=this.opacity;var b=M[12],A=M[13],g=M[14],f=M[15],p=c._ortho||!1,x=p?2:1,N=x*this.pixelRatio*(k[3]*b+k[7]*A+k[11]*g+k[15]*f)/_.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)_.lineWidth(this.lineWidth[D]*this.pixelRatio),T.capSize=this.capSize[D]*N,this.lineCount[D]&&_.drawArrays(_.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function h(c,_){for(var T=0;T<3;++T)c[0][T]=Math.min(c[0][T],_[T]),c[1][T]=Math.max(c[1][T],_[T])}var y=(function(){for(var c=new Array(3),_=0;_<3;++_){for(var T=[],M=1;M<=2;++M)for(var k=-1;k<=1;k+=2){var b=(M+_)%3,A=[0,0,0];A[b]=k,T.push(A)}c[_]=T}return c})();function m(c,_,T,M){for(var k=y[M],b=0;b<k.length;++b){var A=k[b];c.push(_[0],_[1],_[2],T[0],T[1],T[2],T[3],A[0],A[1],A[2])}return k.length}d.update=function(c){c=c||{},"lineWidth"in c&&(this.lineWidth=c.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in c&&(this.capSize=c.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in c&&(this.opacity=+c.opacity,this.opacity<1&&(this.hasAlpha=!0));var _=c.color||[[0,0,0],[0,0,0],[0,0,0]],T=c.position,M=c.error;if(Array.isArray(_[0])||(_=[_,_,_]),T&&M){var k=[],b=T.length,A=0;this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.lineCount=[0,0,0];for(var g=0;g<3;++g){this.lineOffset[g]=A;e:for(var f=0;f<b;++f){for(var p=T[f],x=0;x<3;++x)if(isNaN(p[x])||!isFinite(p[x]))continue e;var N=M[f],D=_[g];if(Array.isArray(D[0])&&(D=_[f]),D.length===3?D=[D[0],D[1],D[2],1]:D.length===4&&(D=[D[0],D[1],D[2],D[3]],!this.hasAlpha&&D[3]<1&&(this.hasAlpha=!0)),!(isNaN(N[0][g])||isNaN(N[1][g]))){if(N[0][g]<0){var B=p.slice();B[g]+=N[0][g],k.push(p[0],p[1],p[2],D[0],D[1],D[2],D[3],0,0,0,B[0],B[1],B[2],D[0],D[1],D[2],D[3],0,0,0),h(this.bounds,B),A+=2+m(k,B,D,g)}if(N[1][g]>0){var B=p.slice();B[g]+=N[1][g],k.push(p[0],p[1],p[2],D[0],D[1],D[2],D[3],0,0,0,B[0],B[1],B[2],D[0],D[1],D[2],D[3],0,0,0),h(this.bounds,B),A+=2+m(k,B,D,g)}}}this.lineCount[g]=A-this.lineOffset[g]}this.buffer.update(k)}},d.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function E(c){var _=c.gl,T=l(_),M=i(_,[{buffer:T,type:_.FLOAT,size:3,offset:0,stride:40},{buffer:T,type:_.FLOAT,size:4,offset:12,stride:40},{buffer:T,type:_.FLOAT,size:3,offset:28,stride:40}]),k=s(_);k.attributes.position.location=0,k.attributes.color.location=1,k.attributes.offset.location=2;var b=new u(_,T,M,k);return b.update(c),b}}),9215:(function(t,r,a){t.exports=h;var l=a(4769),i=a(2478);function s(y,m,E){return Math.min(m,Math.max(y,E))}function o(y,m,E){this.dimension=y.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var c=0;c<this.dimension;++c)this.bounds[0][c]=-1/0,this.bounds[1][c]=1/0;this._state=y.slice().reverse(),this._velocity=m.slice().reverse(),this._time=[E],this._scratch=[y.slice(),y.slice(),y.slice(),y.slice(),y.slice()]}var u=o.prototype;u.flush=function(y){var m=i.gt(this._time,y)-1;m<=0||(this._time.splice(0,m),this._state.splice(0,m*this.dimension),this._velocity.splice(0,m*this.dimension))},u.curve=function(y){var m=this._time,E=m.length,c=i.le(m,y),_=this._scratch[0],T=this._state,M=this._velocity,k=this.dimension,b=this.bounds;if(c<0)for(var A=k-1,g=0;g<k;++g,--A)_[g]=T[A];else if(c>=E-1)for(var A=T.length-1,f=y-m[E-1],g=0;g<k;++g,--A)_[g]=T[A]+f*M[A];else{for(var A=k*(c+1)-1,p=m[c],x=m[c+1],N=x-p||1,D=this._scratch[1],B=this._scratch[2],U=this._scratch[3],V=this._scratch[4],q=!0,g=0;g<k;++g,--A)D[g]=T[A],U[g]=M[A]*N,B[g]=T[A+k],V[g]=M[A+k]*N,q=q&&D[g]===B[g]&&U[g]===V[g]&&U[g]===0;if(q)for(var g=0;g<k;++g)_[g]=D[g];else l(D,U,B,V,(y-p)/N,_)}for(var z=b[0],H=b[1],g=0;g<k;++g)_[g]=s(z[g],H[g],_[g]);return _},u.dcurve=function(y){var m=this._time,E=m.length,c=i.le(m,y),_=this._scratch[0],T=this._state,M=this._velocity,k=this.dimension;if(c>=E-1){var b=T.length-1;y-m[E-1];for(var A=0;A<k;++A,--b)_[A]=M[b]}else{for(var b=k*(c+1)-1,g=m[c],f=m[c+1],p=f-g||1,x=this._scratch[1],N=this._scratch[2],D=this._scratch[3],B=this._scratch[4],U=!0,A=0;A<k;++A,--b)x[A]=T[b],D[A]=M[b]*p,N[A]=T[b+k],B[A]=M[b+k]*p,U=U&&x[A]===N[A]&&D[A]===B[A]&&D[A]===0;if(U)for(var A=0;A<k;++A)_[A]=0;else{l.derivative(x,D,N,B,(y-g)/p,_);for(var A=0;A<k;++A)_[A]/=p}}return _},u.lastT=function(){var y=this._time;return y[y.length-1]},u.stable=function(){for(var y=this._velocity,m=y.length,E=this.dimension-1;E>=0;--E)if(y[--m])return!1;return!0},u.jump=function(y){var m=this.lastT(),E=this.dimension;if(!(y<m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=this.bounds,k=M[0],b=M[1];this._time.push(m,y);for(var A=0;A<2;++A)for(var g=0;g<E;++g)c.push(c[T++]),_.push(0);this._time.push(y);for(var g=E;g>0;--g)c.push(s(k[g-1],b[g-1],arguments[g])),_.push(0)}},u.push=function(y){var m=this.lastT(),E=this.dimension;if(!(y<m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=y-m,k=this.bounds,b=k[0],A=k[1],g=M>1e-6?1/M:0;this._time.push(y);for(var f=E;f>0;--f){var p=s(b[f-1],A[f-1],arguments[f]);c.push(p),_.push((p-c[T++])*g)}}},u.set=function(y){var m=this.dimension;if(!(y<this.lastT()||arguments.length!==m+1)){var E=this._state,c=this._velocity,_=this.bounds,T=_[0],M=_[1];this._time.push(y);for(var k=m;k>0;--k)E.push(s(T[k-1],M[k-1],arguments[k])),c.push(0)}},u.move=function(y){var m=this.lastT(),E=this.dimension;if(!(y<=m||arguments.length!==E+1)){var c=this._state,_=this._velocity,T=c.length-this.dimension,M=this.bounds,k=M[0],b=M[1],A=y-m,g=A>1e-6?1/A:0;this._time.push(y);for(var f=E;f>0;--f){var p=arguments[f];c.push(s(k[f-1],b[f-1],c[T++]+p)),_.push(p*g)}}},u.idle=function(y){var m=this.lastT();if(!(y<m)){var E=this.dimension,c=this._state,_=this._velocity,T=c.length-E,M=this.bounds,k=M[0],b=M[1],A=y-m;this._time.push(y);for(var g=E-1;g>=0;--g)c.push(s(k[g],b[g],c[T]+A*_[T])),_.push(0),T+=1}};function d(y){for(var m=new Array(y),E=0;E<y;++E)m[E]=0;return m}function h(y,m,E){switch(arguments.length){case 0:return new o([0],[0],0);case 1:if(typeof y=="number"){var c=d(y);return new o(c,c,0)}else return new o(y,d(y.length),0);case 2:if(typeof m=="number"){var c=d(y.length);return new o(y,c,+m)}else E=0;case 3:if(y.length!==m.length)throw new Error("state and velocity lengths must match");return new o(y,m,E)}}}),9216:(function(t){t.exports=i,t.exports.isMobile=i,t.exports.default=i;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,a=/CrOS/,l=/android|ipad|playbook|silk/i;function i(s){s||(s={});var o=s.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;var u=r.test(o)&&!a.test(o)||!!s.tablet&&l.test(o);return!u&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(u=!0),u}}),9226:(function(t){t.exports=r;function r(a,l){return a[0]=Math.ceil(l[0]),a[1]=Math.ceil(l[1]),a[2]=Math.ceil(l[2]),a}}),9265:(function(t){t.exports=r;function r(a,l){return a[0]===l[0]&&a[1]===l[1]&&a[2]===l[2]}}),9288:(function(t){t.exports=r;function r(a,l,i){return a[0]=l[0]*i,a[1]=l[1]*i,a[2]=l[2]*i,a[3]=l[3]*i,a}}),9346:(function(t){var r=new Float64Array(4),a=new Float64Array(4),l=new Float64Array(4);function i(s,o,u,d,h){r.length<d.length&&(r=new Float64Array(d.length),a=new Float64Array(d.length),l=new Float64Array(d.length));for(var y=0;y<d.length;++y)r[y]=s[y]-d[y],a[y]=o[y]-s[y],l[y]=u[y]-s[y];for(var m=0,E=0,c=0,_=0,T=0,M=0,y=0;y<d.length;++y){var k=a[y],b=l[y],A=r[y];m+=k*k,E+=k*b,c+=b*b,_+=A*k,T+=A*b,M+=A*A}var g=Math.abs(m*c-E*E),f=E*T-c*_,p=E*_-m*T,x;if(f+p<=g)if(f<0)p<0&&_<0?(p=0,-_>=m?(f=1,x=m+2*_+M):(f=-_/m,x=_*f+M)):(f=0,T>=0?(p=0,x=M):-T>=c?(p=1,x=c+2*T+M):(p=-T/c,x=T*p+M));else if(p<0)p=0,_>=0?(f=0,x=M):-_>=m?(f=1,x=m+2*_+M):(f=-_/m,x=_*f+M);else{var N=1/g;f*=N,p*=N,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M}else{var D,B,U,V;f<0?(D=E+_,B=c+T,B>D?(U=B-D,V=m-2*E+c,U>=V?(f=1,p=0,x=m+2*_+M):(f=U/V,p=1-f,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)):(f=0,B<=0?(p=1,x=c+2*T+M):T>=0?(p=0,x=M):(p=-T/c,x=T*p+M))):p<0?(D=E+T,B=m+_,B>D?(U=B-D,V=m-2*E+c,U>=V?(p=1,f=0,x=c+2*T+M):(p=U/V,f=1-p,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)):(p=0,B<=0?(f=1,x=m+2*_+M):_>=0?(f=0,x=M):(f=-_/m,x=_*f+M))):(U=c+T-E-_,U<=0?(f=0,p=1,x=c+2*T+M):(V=m-2*E+c,U>=V?(f=1,p=0,x=m+2*_+M):(f=U/V,p=1-f,x=f*(m*f+E*p+2*_)+p*(E*f+c*p+2*T)+M)))}for(var q=1-f-p,y=0;y<d.length;++y)h[y]=q*s[y]+f*o[y]+p*u[y];return x<0?0:x}t.exports=i}),9362:(function(t){t.exports=r;function r(a,l,i){var s=a+l,o=s-a,u=s-o,d=l-o,h=a-u;return i?(i[0]=h+d,i[1]=s,i):[h+d,s]}}),9366:(function(t,r,a){var l=a(4359);t.exports=s;var i={};function s(o,u,d){var h=[u.style,u.weight,u.variant,u.family].join("_"),y=i[h];if(y||(y=i[h]={}),o in y)return y[o];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:u.family,fontStyle:u.style,fontWeight:u.weight,fontVariant:u.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var E=l(o,m);m.triangles=!1;var c=l(o,m),_,T;if(d&&d!==1){for(_=0;_<E.positions.length;++_)for(T=0;T<E.positions[_].length;++T)E.positions[_][T]/=d;for(_=0;_<c.positions.length;++_)for(T=0;T<c.positions[_].length;++T)c.positions[_][T]/=d}var M=[[1/0,1/0],[-1/0,-1/0]],k=c.positions.length;for(_=0;_<k;++_){var b=c.positions[_];for(T=0;T<2;++T)M[0][T]=Math.min(M[0][T],b[T]),M[1][T]=Math.max(M[1][T],b[T])}return y[o]=[E,c,M]}}),9405:(function(t,r,a){var l=a(3327),i=a(8731),s=a(216),o=a(5091),u=a(2145),d=a(8866);function h(c){this.gl=c,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var y=h.prototype;y.bind=function(){this.program||this._relink();var c,_=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),T=this.gl.lastAttribCount;if(_>T)for(c=T;c<_;c++)this.gl.enableVertexAttribArray(c);else if(T>_)for(c=_;c<T;c++)this.gl.disableVertexAttribArray(c);this.gl.lastAttribCount=_,this.gl.useProgram(this.program)},y.dispose=function(){for(var c=this.gl.lastAttribCount,_=0;_<c;_++)this.gl.disableVertexAttribArray(_);this.gl.lastAttribCount=0,this._fref&&this._fref.dispose(),this._vref&&this._vref.dispose(),this.attributes=this.types=this.vertShader=this.fragShader=this.program=this._relink=this._fref=this._vref=null};function m(c,_){return c.name<_.name?-1:1}y.update=function(c,_,T,M){if(!_||arguments.length===1){var k=c;c=k.vertex,_=k.fragment,T=k.uniforms,M=k.attributes}var b=this,A=b.gl,g=b._vref;b._vref=o.shader(A,A.VERTEX_SHADER,c),g&&g.dispose(),b.vertShader=b._vref.shader;var f=this._fref;if(b._fref=o.shader(A,A.FRAGMENT_SHADER,_),f&&f.dispose(),b.fragShader=b._fref.shader,!T||!M){var p=A.createProgram();if(A.attachShader(p,b.fragShader),A.attachShader(p,b.vertShader),A.linkProgram(p),!A.getProgramParameter(p,A.LINK_STATUS)){var x=A.getProgramInfoLog(p);throw new d(x,"Error linking program:"+x)}T=T||u.uniforms(A,p),M=M||u.attributes(A,p),A.deleteProgram(p)}M=M.slice(),M.sort(m);var N=[],D=[],B=[],U;for(U=0;U<M.length;++U){var V=M[U];if(V.type.indexOf("mat")>=0){for(var q=V.type.charAt(V.type.length-1)|0,z=new Array(q),H=0;H<q;++H)z[H]=B.length,D.push(V.name+"["+H+"]"),typeof V.location=="number"?B.push(V.location+H):Array.isArray(V.location)&&V.location.length===q&&typeof V.location[H]=="number"?B.push(V.location[H]|0):B.push(-1);N.push({name:V.name,type:V.type,locations:z})}else N.push({name:V.name,type:V.type,locations:[B.length]}),D.push(V.name),typeof V.location=="number"?B.push(V.location|0):B.push(-1)}var G=0;for(U=0;U<B.length;++U)if(B[U]<0){for(;B.indexOf(G)>=0;)G+=1;B[U]=G}var J=new Array(T.length);function le(){b.program=o.program(A,b._vref,b._fref,D,B);for(var ye=0;ye<T.length;++ye)J[ye]=A.getUniformLocation(b.program,T[ye].name)}le(),b._relink=le,b.types={uniforms:s(T),attributes:s(M)},b.attributes=i(A,b,N,B),Object.defineProperty(b,"uniforms",l(A,b,T,J))};function E(c,_,T,M,k){var b=new h(c);return b.update(_,T,M,k),b}t.exports=E}),9499:(function(t,r,a){t.exports=pe;var l=a(8828),i=a(2762),s=a(8116),o=a(7766),u=a(1888),d=a(6729),h=a(5298),y=a(9994),m=a(9618),E=a(3711),c=a(6760),_=a(7608),T=a(2478),M=a(6199),k=a(990),b=k.createShader,A=k.createContourShader,g=k.createPickShader,f=k.createPickContourShader,p=40,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],N=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];(function(){for(var oe=0;oe<3;++oe){var Y=D[oe],ce=(oe+1)%3,ue=(oe+2)%3;Y[ce+0]=1,Y[ue+3]=1,Y[oe+6]=1}})();function B(oe,Y,ce,ue,_e){this.position=oe,this.index=Y,this.uv=ce,this.level=ue,this.dataCoordinate=_e}var U=256;function V(oe,Y,ce,ue,_e,Le,ze,Ge,Ve,rt,pt,gt,ht,lt,Fe){this.gl=oe,this.shape=Y,this.bounds=ce,this.objectOffset=Fe,this.intensityBounds=[],this._shader=ue,this._pickShader=_e,this._coordinateBuffer=Le,this._vao=ze,this._colorMap=Ge,this._contourShader=Ve,this._contourPickShader=rt,this._contourBuffer=pt,this._contourVAO=gt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ht,this._dynamicVAO=lt,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=[m(u.mallocFloat(1024),[0,0]),m(u.mallocFloat(1024),[0,0]),m(u.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 q=V.prototype;q.genColormap=function(oe,Y){var ce=!1,ue=y([d({colormap:oe,nshades:U,format:"rgba"}).map(function(_e,Le){var ze=Y?z(Le/255,Y):_e[3];return ze<1&&(ce=!0),[_e[0],_e[1],_e[2],255*ze]})]);return h.divseq(ue,255),this.hasAlphaScale=ce,ue},q.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},q.isOpaque=function(){return!this.isTransparent()},q.pickSlots=1,q.setPickBase=function(oe){this.pickId=oe};function z(oe,Y){if(!Y||!Y.length)return 1;for(var ce=0;ce<Y.length;++ce){if(Y.length<2)return 1;if(Y[ce][0]===oe)return Y[ce][1];if(Y[ce][0]>oe&&ce>0){var ue=(Y[ce][0]-oe)/(Y[ce][0]-Y[ce-1][0]);return Y[ce][1]*(1-ue)+ue*Y[ce-1][1]}}return 1}var H=[0,0,0],G={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function J(oe,Y){var ce,ue,_e,Le=Y.axes&&Y.axes.lastCubeProps.axis||H,ze=Y.showSurface,Ge=Y.showContour;for(ce=0;ce<3;++ce)for(ze=ze||Y.surfaceProject[ce],ue=0;ue<3;++ue)Ge=Ge||Y.contourProject[ce][ue];for(ce=0;ce<3;++ce){var Ve=G.projections[ce];for(ue=0;ue<16;++ue)Ve[ue]=0;for(ue=0;ue<4;++ue)Ve[5*ue]=1;Ve[5*ce]=0,Ve[12+ce]=Y.axesBounds[+(Le[ce]>0)][ce],c(Ve,oe.model,Ve);var rt=G.clipBounds[ce];for(_e=0;_e<2;++_e)for(ue=0;ue<3;++ue)rt[_e][ue]=oe.clipBounds[_e][ue];rt[0][ce]=-1e8,rt[1][ce]=1e8}return G.showSurface=ze,G.showContour=Ge,G}var le={model:x,view:x,projection:x,inverseModel:x.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},ye=x.slice(),de=[1,0,0,0,1,0,0,0,1];function me(oe,Y){oe=oe||{};var ce=this.gl;ce.disable(ce.CULL_FACE),this._colorMap.bind(0);var ue=le;ue.model=oe.model||x,ue.view=oe.view||x,ue.projection=oe.projection||x,ue.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ue.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ue.objectOffset=this.objectOffset,ue.contourColor=this.contourColor[0],ue.inverseModel=_(ue.inverseModel,ue.model);for(var _e=0;_e<2;++_e)for(var Le=ue.clipBounds[_e],ze=0;ze<3;++ze)Le[ze]=Math.min(Math.max(this.clipBounds[_e][ze],-1e8),1e8);ue.kambient=this.ambientLight,ue.kdiffuse=this.diffuseLight,ue.kspecular=this.specularLight,ue.roughness=this.roughness,ue.fresnel=this.fresnel,ue.opacity=this.opacity,ue.height=0,ue.permutation=de,ue.vertexColor=this.vertexColor;var Ge=ye;for(c(Ge,ue.view,ue.model),c(Ge,ue.projection,Ge),_(Ge,Ge),_e=0;_e<3;++_e)ue.eyePosition[_e]=Ge[12+_e]/Ge[15];var Ve=Ge[15];for(_e=0;_e<3;++_e)Ve+=this.lightPosition[_e]*Ge[4*_e+3];for(_e=0;_e<3;++_e){var rt=Ge[12+_e];for(ze=0;ze<3;++ze)rt+=Ge[4*ze+_e]*this.lightPosition[ze];ue.lightPosition[_e]=rt/Ve}var pt=J(ue,this);if(pt.showSurface){for(this._shader.bind(),this._shader.uniforms=ue,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ce.TRIANGLES,this._vertexCount),_e=0;_e<3;++_e)!this.surfaceProject[_e]||!this.vertexCount||(this._shader.uniforms.model=pt.projections[_e],this._shader.uniforms.clipBounds=pt.clipBounds[_e],this._vao.draw(ce.TRIANGLES,this._vertexCount));this._vao.unbind()}if(pt.showContour){var gt=this._contourShader;ue.kambient=1,ue.kdiffuse=0,ue.kspecular=0,ue.opacity=1,gt.bind(),gt.uniforms=ue;var ht=this._contourVAO;for(ht.bind(),_e=0;_e<3;++_e)for(gt.uniforms.permutation=D[_e],ce.lineWidth(this.contourWidth[_e]*this.pixelRatio),ze=0;ze<this.contourLevels[_e].length;++ze)ze===this.highlightLevel[_e]?(gt.uniforms.contourColor=this.highlightColor[_e],gt.uniforms.contourTint=this.highlightTint[_e]):(ze===0||ze-1===this.highlightLevel[_e])&&(gt.uniforms.contourColor=this.contourColor[_e],gt.uniforms.contourTint=this.contourTint[_e]),this._contourCounts[_e][ze]&&(gt.uniforms.height=this.contourLevels[_e][ze],ht.draw(ce.LINES,this._contourCounts[_e][ze],this._contourOffsets[_e][ze]));for(_e=0;_e<3;++_e)for(gt.uniforms.model=pt.projections[_e],gt.uniforms.clipBounds=pt.clipBounds[_e],ze=0;ze<3;++ze)if(this.contourProject[_e][ze]){gt.uniforms.permutation=D[ze],ce.lineWidth(this.contourWidth[ze]*this.pixelRatio);for(var lt=0;lt<this.contourLevels[ze].length;++lt)lt===this.highlightLevel[ze]?(gt.uniforms.contourColor=this.highlightColor[ze],gt.uniforms.contourTint=this.highlightTint[ze]):(lt===0||lt-1===this.highlightLevel[ze])&&(gt.uniforms.contourColor=this.contourColor[ze],gt.uniforms.contourTint=this.contourTint[ze]),this._contourCounts[ze][lt]&&(gt.uniforms.height=this.contourLevels[ze][lt],ht.draw(ce.LINES,this._contourCounts[ze][lt],this._contourOffsets[ze][lt]))}for(ht.unbind(),ht=this._dynamicVAO,ht.bind(),_e=0;_e<3;++_e)if(this._dynamicCounts[_e]!==0)for(gt.uniforms.model=ue.model,gt.uniforms.clipBounds=ue.clipBounds,gt.uniforms.permutation=D[_e],ce.lineWidth(this.dynamicWidth[_e]*this.pixelRatio),gt.uniforms.contourColor=this.dynamicColor[_e],gt.uniforms.contourTint=this.dynamicTint[_e],gt.uniforms.height=this.dynamicLevel[_e],ht.draw(ce.LINES,this._dynamicCounts[_e],this._dynamicOffsets[_e]),ze=0;ze<3;++ze)this.contourProject[ze][_e]&&(gt.uniforms.model=pt.projections[ze],gt.uniforms.clipBounds=pt.clipBounds[ze],ht.draw(ce.LINES,this._dynamicCounts[_e],this._dynamicOffsets[_e]));ht.unbind()}}q.draw=function(oe){return me.call(this,oe,!1)},q.drawTransparent=function(oe){return me.call(this,oe,!0)};var W={model:x,view:x,projection:x,inverseModel:x,clipBounds:[[0,0,0],[0,0,0]],height:0,shape:[0,0],pickId:0,lowerBound:[0,0,0],upperBound:[0,0,0],zOffset:0,objectOffset:[0,0,0],permutation:[1,0,0,0,1,0,0,0,1],lightPosition:[0,0,0],eyePosition:[0,0,0]};q.drawPick=function(oe){oe=oe||{};var Y=this.gl;Y.disable(Y.CULL_FACE);var ce=W;ce.model=oe.model||x,ce.view=oe.view||x,ce.projection=oe.projection||x,ce.shape=this._field[2].shape,ce.pickId=this.pickId/255,ce.lowerBound=this.bounds[0],ce.upperBound=this.bounds[1],ce.objectOffset=this.objectOffset,ce.permutation=de;for(var ue=0;ue<2;++ue)for(var _e=ce.clipBounds[ue],Le=0;Le<3;++Le)_e[Le]=Math.min(Math.max(this.clipBounds[ue][Le],-1e8),1e8);var ze=J(ce,this);if(ze.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ce,this._vao.bind(),this._vao.draw(Y.TRIANGLES,this._vertexCount),ue=0;ue<3;++ue)this.surfaceProject[ue]&&(this._pickShader.uniforms.model=ze.projections[ue],this._pickShader.uniforms.clipBounds=ze.clipBounds[ue],this._vao.draw(Y.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ze.showContour){var Ge=this._contourPickShader;Ge.bind(),Ge.uniforms=ce;var Ve=this._contourVAO;for(Ve.bind(),Le=0;Le<3;++Le)for(Y.lineWidth(this.contourWidth[Le]*this.pixelRatio),Ge.uniforms.permutation=D[Le],ue=0;ue<this.contourLevels[Le].length;++ue)this._contourCounts[Le][ue]&&(Ge.uniforms.height=this.contourLevels[Le][ue],Ve.draw(Y.LINES,this._contourCounts[Le][ue],this._contourOffsets[Le][ue]));for(ue=0;ue<3;++ue)for(Ge.uniforms.model=ze.projections[ue],Ge.uniforms.clipBounds=ze.clipBounds[ue],Le=0;Le<3;++Le)if(this.contourProject[ue][Le]){Ge.uniforms.permutation=D[Le],Y.lineWidth(this.contourWidth[Le]*this.pixelRatio);for(var rt=0;rt<this.contourLevels[Le].length;++rt)this._contourCounts[Le][rt]&&(Ge.uniforms.height=this.contourLevels[Le][rt],Ve.draw(Y.LINES,this._contourCounts[Le][rt],this._contourOffsets[Le][rt]))}Ve.unbind()}},q.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;var Y=this._field[2].shape,ce=this._pickResult,ue=Y[0]*(oe.value[0]+(oe.value[2]>>4)/16)/255,_e=Math.floor(ue),Le=ue-_e,ze=Y[1]*(oe.value[1]+(oe.value[2]&15)/16)/255,Ge=Math.floor(ze),Ve=ze-Ge;_e+=1,Ge+=1;var rt=ce.position;rt[0]=rt[1]=rt[2]=0;for(var pt=0;pt<2;++pt)for(var gt=pt?Le:1-Le,ht=0;ht<2;++ht)for(var lt=ht?Ve:1-Ve,Fe=_e+pt,Pe=Ge+ht,be=gt*lt,Ye=0;Ye<3;++Ye)rt[Ye]+=this._field[Ye].get(Fe,Pe)*be;for(var mt=this._pickResult.level,bt=0;bt<3;++bt)if(mt[bt]=T.le(this.contourLevels[bt],rt[bt]),mt[bt]<0)this.contourLevels[bt].length>0&&(mt[bt]=0);else if(mt[bt]<this.contourLevels[bt].length-1){var ft=this.contourLevels[bt][mt[bt]],Wt=this.contourLevels[bt][mt[bt]+1];Math.abs(ft-rt[bt])>Math.abs(Wt-rt[bt])&&(mt[bt]+=1)}for(ce.index[0]=Le<.5?_e:_e+1,ce.index[1]=Ve<.5?Ge:Ge+1,ce.uv[0]=ue/Y[0],ce.uv[1]=ze/Y[1],Ye=0;Ye<3;++Ye)ce.dataCoordinate[Ye]=this._field[Ye].get(ce.index[0],ce.index[1]);return ce},q.padField=function(oe,Y){var ce=Y.shape.slice(),ue=oe.shape.slice();h.assign(oe.lo(1,1).hi(ce[0],ce[1]),Y),h.assign(oe.lo(1).hi(ce[0],1),Y.hi(ce[0],1)),h.assign(oe.lo(1,ue[1]-1).hi(ce[0],1),Y.lo(0,ce[1]-1).hi(ce[0],1)),h.assign(oe.lo(0,1).hi(1,ce[1]),Y.hi(1)),h.assign(oe.lo(ue[0]-1,1).hi(1,ce[1]),Y.lo(ce[0]-1)),oe.set(0,0,Y.get(0,0)),oe.set(0,ue[1]-1,Y.get(0,ce[1]-1)),oe.set(ue[0]-1,0,Y.get(ce[0]-1,0)),oe.set(ue[0]-1,ue[1]-1,Y.get(ce[0]-1,ce[1]-1))};function ie(oe,Y){return Array.isArray(oe)?[Y(oe[0]),Y(oe[1]),Y(oe[2])]:[Y(oe),Y(oe),Y(oe)]}function se(oe){return Array.isArray(oe)?oe.length===3?[oe[0],oe[1],oe[2],1]:[oe[0],oe[1],oe[2],oe[3]]:[0,0,0,1]}function ee(oe){if(Array.isArray(oe)){if(Array.isArray(oe))return[se(oe[0]),se(oe[1]),se(oe[2])];var Y=se(oe);return[Y.slice(),Y.slice(),Y.slice()]}}q.update=function(oe){oe=oe||{},this.objectOffset=oe.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in oe&&(this.contourWidth=ie(oe.contourWidth,Number)),"showContour"in oe&&(this.showContour=ie(oe.showContour,Boolean)),"showSurface"in oe&&(this.showSurface=!!oe.showSurface),"contourTint"in oe&&(this.contourTint=ie(oe.contourTint,Boolean)),"contourColor"in oe&&(this.contourColor=ee(oe.contourColor)),"contourProject"in oe&&(this.contourProject=ie(oe.contourProject,function($a){return ie($a,Boolean)})),"surfaceProject"in oe&&(this.surfaceProject=oe.surfaceProject),"dynamicColor"in oe&&(this.dynamicColor=ee(oe.dynamicColor)),"dynamicTint"in oe&&(this.dynamicTint=ie(oe.dynamicTint,Number)),"dynamicWidth"in oe&&(this.dynamicWidth=ie(oe.dynamicWidth,Number)),"opacity"in oe&&(this.opacity=oe.opacity),"opacityscale"in oe&&(this.opacityscale=oe.opacityscale),"colorBounds"in oe&&(this.colorBounds=oe.colorBounds),"vertexColor"in oe&&(this.vertexColor=oe.vertexColor?1:0),"colormap"in oe&&this._colorMap.setPixels(this.genColormap(oe.colormap,this.opacityscale));var Y=oe.field||oe.coords&&oe.coords[2]||null,ce=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in oe||"coords"in oe){var ue=(Y.shape[0]+2)*(Y.shape[1]+2);ue>this._field[2].data.length&&(u.freeFloat(this._field[2].data),this._field[2].data=u.mallocFloat(l.nextPow2(ue))),this._field[2]=m(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var _e=this.shape,Le=0;Le<2;++Le)this._field[2].size>this._field[Le].data.length&&(u.freeFloat(this._field[Le].data),this._field[Le].data=u.mallocFloat(this._field[2].size)),this._field[Le]=m(this._field[Le].data,[_e[0]+2,_e[1]+2]);if(oe.coords){var ze=oe.coords;if(!Array.isArray(ze)||ze.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Le=0;Le<2;++Le){var Ge=ze[Le];for(ht=0;ht<2;++ht)if(Ge.shape[ht]!==_e[ht])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Le],Ge)}}else if(oe.ticks){var Ve=oe.ticks;if(!Array.isArray(Ve)||Ve.length!==2)throw new Error("gl-surface: invalid ticks");for(Le=0;Le<2;++Le){var rt=Ve[Le];if((Array.isArray(rt)||rt.length)&&(rt=m(rt)),rt.shape[0]!==_e[Le])throw new Error("gl-surface: invalid tick length");var pt=m(rt.data,_e);pt.stride[Le]=rt.stride[0],pt.stride[Le^1]=0,this.padField(this._field[Le],pt)}}else{for(Le=0;Le<2;++Le){var gt=[0,0];gt[Le]=1,this._field[Le]=m(this._field[Le].data,[_e[0]+2,_e[1]+2],gt,0)}this._field[0].set(0,0,0);for(var ht=0;ht<_e[0];++ht)this._field[0].set(ht+1,0,ht);for(this._field[0].set(_e[0]+1,0,_e[0]-1),this._field[1].set(0,0,0),ht=0;ht<_e[1];++ht)this._field[1].set(0,ht+1,ht);this._field[1].set(0,_e[1]+1,_e[1]-1)}var lt=this._field,Fe=m(u.mallocFloat(lt[2].size*3*2),[3,_e[0]+2,_e[1]+2,2]);for(Le=0;Le<3;++Le)M(Fe.pick(Le),lt[Le],"mirror");var Pe=m(u.mallocFloat(lt[2].size*3),[_e[0]+2,_e[1]+2,3]);for(Le=0;Le<_e[0]+2;++Le)for(ht=0;ht<_e[1]+2;++ht){var be=Fe.get(0,Le,ht,0),Ye=Fe.get(0,Le,ht,1),mt=Fe.get(1,Le,ht,0),bt=Fe.get(1,Le,ht,1),ft=Fe.get(2,Le,ht,0),Wt=Fe.get(2,Le,ht,1),Zt=mt*Wt-bt*ft,cr=ft*Ye-Wt*be,pr=be*bt-Ye*mt,Br=Math.sqrt(Zt*Zt+cr*cr+pr*pr);Br<1e-8?(Br=Math.max(Math.abs(Zt),Math.abs(cr),Math.abs(pr)),Br<1e-8?(pr=1,cr=Zt=0,Br=1):Br=1/Br):Br=1/Math.sqrt(Br),Pe.set(Le,ht,0,Zt*Br),Pe.set(Le,ht,1,cr*Br),Pe.set(Le,ht,2,pr*Br)}u.free(Fe.data);var Fr=[1/0,1/0,1/0],cn=[-1/0,-1/0,-1/0],Nr=1/0,Jr=-1/0,Dt=(_e[0]-1)*(_e[1]-1)*6,$e=u.mallocFloat(l.nextPow2(10*Dt)),ot=0,De=0;for(Le=0;Le<_e[0]-1;++Le)e:for(ht=0;ht<_e[1]-1;++ht){for(var Ee=0;Ee<2;++Ee)for(var Ae=0;Ae<2;++Ae)for(var Ie=0;Ie<3;++Ie){var tt=this._field[Ie].get(1+Le+Ee,1+ht+Ae);if(isNaN(tt)||!isFinite(tt))continue e}for(Ie=0;Ie<6;++Ie){var st=Le+N[Ie][0],Ft=ht+N[Ie][1],Nt=this._field[0].get(st+1,Ft+1),Xt=this._field[1].get(st+1,Ft+1);tt=this._field[2].get(st+1,Ft+1),Zt=Pe.get(st+1,Ft+1,0),cr=Pe.get(st+1,Ft+1,1),pr=Pe.get(st+1,Ft+1,2),oe.intensity&&(lr=oe.intensity.get(st,Ft));var lr=oe.intensity?oe.intensity.get(st,Ft):tt+this.objectOffset[2];$e[ot++]=st,$e[ot++]=Ft,$e[ot++]=Nt,$e[ot++]=Xt,$e[ot++]=tt,$e[ot++]=0,$e[ot++]=lr,$e[ot++]=Zt,$e[ot++]=cr,$e[ot++]=pr,Fr[0]=Math.min(Fr[0],Nt+this.objectOffset[0]),Fr[1]=Math.min(Fr[1],Xt+this.objectOffset[1]),Fr[2]=Math.min(Fr[2],tt+this.objectOffset[2]),Nr=Math.min(Nr,lr),cn[0]=Math.max(cn[0],Nt+this.objectOffset[0]),cn[1]=Math.max(cn[1],Xt+this.objectOffset[1]),cn[2]=Math.max(cn[2],tt+this.objectOffset[2]),Jr=Math.max(Jr,lr),De+=1}}for(oe.intensityBounds&&(Nr=+oe.intensityBounds[0],Jr=+oe.intensityBounds[1]),Le=6;Le<ot;Le+=10)$e[Le]=($e[Le]-Nr)/(Jr-Nr);this._vertexCount=De,this._coordinateBuffer.update($e.subarray(0,ot)),u.freeFloat($e),u.free(Pe.data),this.bounds=[Fr,cn],this.intensity=oe.intensity||this._field[2],(this.intensityBounds[0]!==Nr||this.intensityBounds[1]!==Jr)&&(ce=!0),this.intensityBounds=[Nr,Jr]}if("levels"in oe){var Rr=oe.levels;for(Array.isArray(Rr[0])?Rr=Rr.slice():Rr=[[],[],Rr],Le=0;Le<3;++Le)Rr[Le]=Rr[Le].slice(),Rr[Le].sort(function($a,oa){return $a-oa});for(Le=0;Le<3;++Le)for(ht=0;ht<Rr[Le].length;++ht)Rr[Le][ht]-=this.objectOffset[Le];e:for(Le=0;Le<3;++Le){if(Rr[Le].length!==this.contourLevels[Le].length){ce=!0;break}for(ht=0;ht<Rr[Le].length;++ht)if(Rr[Le][ht]!==this.contourLevels[Le][ht]){ce=!0;break e}}this.contourLevels=Rr}if(ce){lt=this._field,_e=this.shape;for(var Mr=[],Sr=0;Sr<3;++Sr){var Kr=this.contourLevels[Sr],qn=[],ha=[],ia=[0,0,0];for(Le=0;Le<Kr.length;++Le){var xa=E(this._field[Sr],Kr[Le]);qn.push(Mr.length/5|0),De=0;e:for(ht=0;ht<xa.cells.length;++ht){var ba=xa.cells[ht];for(Ie=0;Ie<2;++Ie){var ea=xa.positions[ba[Ie]],Za=ea[0],ui=Math.floor(Za)|0,_r=Za-ui,Qt=ea[1],yr=Math.floor(Qt)|0,br=Qt-yr,nn=!1;t:for(var wn=0;wn<3;++wn){ia[wn]=0;var Ln=(Sr+wn+1)%3;for(Ee=0;Ee<2;++Ee){var Fn=Ee?_r:1-_r;for(st=Math.min(Math.max(ui+Ee,0),_e[0])|0,Ae=0;Ae<2;++Ae){var va=Ae?br:1-br;if(Ft=Math.min(Math.max(yr+Ae,0),_e[1])|0,wn<2?tt=this._field[Ln].get(st,Ft):tt=(this.intensity.get(st,Ft)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(tt)||isNaN(tt)){nn=!0;break t}var Da=Fn*va;ia[wn]+=Da*tt}}}if(!nn)Mr.push(ia[0],ia[1],ea[0],ea[1],ia[2]),De+=1;else{if(Ie>0){for(var Pa=0;Pa<5;++Pa)Mr.pop();De-=1}continue e}}}ha.push(De)}this._contourOffsets[Sr]=qn,this._contourCounts[Sr]=ha}var Fa=u.mallocFloat(Mr.length);for(Le=0;Le<Mr.length;++Le)Fa[Le]=Mr[Le];this._contourBuffer.update(Fa),u.freeFloat(Fa)}},q.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var oe=0;oe<3;++oe)u.freeFloat(this._field[oe].data)},q.highlight=function(oe){var Y;if(!oe){this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],this.highlightLevel=[-1,-1,-1];return}for(Y=0;Y<3;++Y)this.enableHighlight[Y]?this.highlightLevel[Y]=oe.level[Y]:this.highlightLevel[Y]=-1;var ce;for(this.snapToData?ce=oe.dataCoordinate:ce=oe.position,Y=0;Y<3;++Y)ce[Y]-=this.objectOffset[Y];if(!((!this.enableDynamic[0]||ce[0]===this.dynamicLevel[0])&&(!this.enableDynamic[1]||ce[1]===this.dynamicLevel[1])&&(!this.enableDynamic[2]||ce[2]===this.dynamicLevel[2]))){for(var ue=0,_e=this.shape,Le=u.mallocFloat(12*_e[0]*_e[1]),ze=0;ze<3;++ze){if(!this.enableDynamic[ze]){this.dynamicLevel[ze]=NaN,this._dynamicCounts[ze]=0;continue}this.dynamicLevel[ze]=ce[ze];var Ge=(ze+1)%3,Ve=(ze+2)%3,rt=this._field[ze],pt=this._field[Ge],gt=this._field[Ve],ht=E(rt,ce[ze]),lt=ht.cells,Fe=ht.positions;for(this._dynamicOffsets[ze]=ue,Y=0;Y<lt.length;++Y)for(var Pe=lt[Y],be=0;be<2;++be){var Ye=Fe[Pe[be]],mt=+Ye[0],bt=mt|0,ft=Math.min(bt+1,_e[0])|0,Wt=mt-bt,Zt=1-Wt,cr=+Ye[1],pr=cr|0,Br=Math.min(pr+1,_e[1])|0,Fr=cr-pr,cn=1-Fr,Nr=Zt*cn,Jr=Zt*Fr,Dt=Wt*cn,$e=Wt*Fr,ot=Nr*pt.get(bt,pr)+Jr*pt.get(bt,Br)+Dt*pt.get(ft,pr)+$e*pt.get(ft,Br),De=Nr*gt.get(bt,pr)+Jr*gt.get(bt,Br)+Dt*gt.get(ft,pr)+$e*gt.get(ft,Br);if(isNaN(ot)||isNaN(De)){be&&(ue-=1);break}Le[2*ue+0]=ot,Le[2*ue+1]=De,ue+=1}this._dynamicCounts[ze]=ue-this._dynamicOffsets[ze]}this._dynamicBuffer.update(Le.subarray(0,2*ue)),u.freeFloat(Le)}};function pe(oe){var Y=oe.gl,ce=b(Y),ue=g(Y),_e=A(Y),Le=f(Y),ze=i(Y),Ge=s(Y,[{buffer:ze,size:4,stride:p,offset:0},{buffer:ze,size:3,stride:p,offset:16},{buffer:ze,size:3,stride:p,offset:28}]),Ve=i(Y),rt=s(Y,[{buffer:Ve,size:4,stride:20,offset:0},{buffer:Ve,size:1,stride:20,offset:16}]),pt=i(Y),gt=s(Y,[{buffer:pt,size:2,type:Y.FLOAT}]),ht=o(Y,1,U,Y.RGBA,Y.UNSIGNED_BYTE);ht.minFilter=Y.LINEAR,ht.magFilter=Y.LINEAR;var lt=new V(Y,[0,0],[[0,0,0],[0,0,0]],ce,ue,ze,Ge,ht,_e,Le,Ve,rt,pt,gt,[0,0,0]),Fe={levels:[[],[],[]]};for(var Pe in oe)Fe[Pe]=oe[Pe];return Fe.colormap=Fe.colormap||"jet",lt.update(Fe),lt}}),9507:(function(t){t.exports=!0}),9618:(function(t,r,a){var l=a(7163),i=typeof Float64Array<"u";function s(E,c){return E[0]-c[0]}function o(){var E=this.stride,c=new Array(E.length),_;for(_=0;_<c.length;++_)c[_]=[Math.abs(E[_]),_];c.sort(s);var T=new Array(c.length);for(_=0;_<T.length;++_)T[_]=c[_][1];return T}var u={T:function(E){function c(T){this.data=T}var _=c.prototype;return _.dtype=E,_.index=function(){return-1},_.size=0,_.dimension=-1,_.shape=_.stride=_.order=[],_.lo=_.hi=_.transpose=_.step=function(){return new c(this.data)},_.get=_.set=function(){},_.pick=function(){return null},function(M){return new c(M)}},0:function(E,c){function _(M,k){this.data=M,this.offset=k}var T=_.prototype;return T.dtype=E,T.index=function(){return this.offset},T.dimension=0,T.size=1,T.shape=T.stride=T.order=[],T.lo=T.hi=T.transpose=T.step=function(){return new _(this.data,this.offset)},T.pick=function(){return c(this.data)},T.valueOf=T.get=function(){return E==="generic"?this.data.get(this.offset):this.data[this.offset]},T.set=function(k){return E==="generic"?this.data.set(this.offset,k):this.data[this.offset]=k},function(k,b,A,g){return new _(k,g)}},1:function(E,c,_){function T(k,b,A,g){this.data=k,this.shape=[b],this.stride=[A],this.offset=g|0}var M=T.prototype;return M.dtype=E,M.dimension=1,Object.defineProperty(M,"size",{get:function(){return this.shape[0]}}),M.order=[0],M.set=function(b,A){return E==="generic"?this.data.set(this.offset+this.stride[0]*b,A):this.data[this.offset+this.stride[0]*b]=A},M.get=function(b){return E==="generic"?this.data.get(this.offset+this.stride[0]*b):this.data[this.offset+this.stride[0]*b]},M.index=function(b){return this.offset+this.stride[0]*b},M.hi=function(b){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,this.stride[0],this.offset)},M.lo=function(b){var A=this.offset,g=0,f=this.shape[0],p=this.stride[0];return typeof b=="number"&&b>=0&&(g=b|0,A+=p*g,f-=g),new T(this.data,f,p,A)},M.step=function(b){var A=this.shape[0],g=this.stride[0],f=this.offset,p=0,x=Math.ceil;return typeof b=="number"&&(p=b|0,p<0?(f+=g*(A-1),A=x(-A/p)):A=x(A/p),g*=p),new T(this.data,A,g,f)},M.transpose=function(b){b=b===void 0?0:b|0;var A=this.shape,g=this.stride;return new T(this.data,A[b],g[b],this.offset)},M.pick=function(b){var A=[],g=[],f=this.offset;typeof b=="number"&&b>=0?f=f+this.stride[0]*b|0:(A.push(this.shape[0]),g.push(this.stride[0]));var p=c[A.length+1];return p(this.data,A,g,f)},function(b,A,g,f){return new T(b,A[0],g[0],f)}},2:function(E,c,_){function T(k,b,A,g,f,p){this.data=k,this.shape=[b,A],this.stride=[g,f],this.offset=p|0}var M=T.prototype;return M.dtype=E,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(b,A,g){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A,g):this.data[this.offset+this.stride[0]*b+this.stride[1]*A]=g},M.get=function(b,A){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A):this.data[this.offset+this.stride[0]*b+this.stride[1]*A]},M.index=function(b,A){return this.offset+this.stride[0]*b+this.stride[1]*A},M.hi=function(b,A){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(b,A){var g=this.offset,f=0,p=this.shape[0],x=this.shape[1],N=this.stride[0],D=this.stride[1];return typeof b=="number"&&b>=0&&(f=b|0,g+=N*f,p-=f),typeof A=="number"&&A>=0&&(f=A|0,g+=D*f,x-=f),new T(this.data,p,x,N,D,g)},M.step=function(b,A){var g=this.shape[0],f=this.shape[1],p=this.stride[0],x=this.stride[1],N=this.offset,D=0,B=Math.ceil;return typeof b=="number"&&(D=b|0,D<0?(N+=p*(g-1),g=B(-g/D)):g=B(g/D),p*=D),typeof A=="number"&&(D=A|0,D<0?(N+=x*(f-1),f=B(-f/D)):f=B(f/D),x*=D),new T(this.data,g,f,p,x,N)},M.transpose=function(b,A){b=b===void 0?0:b|0,A=A===void 0?1:A|0;var g=this.shape,f=this.stride;return new T(this.data,g[b],g[A],f[b],f[A],this.offset)},M.pick=function(b,A){var g=[],f=[],p=this.offset;typeof b=="number"&&b>=0?p=p+this.stride[0]*b|0:(g.push(this.shape[0]),f.push(this.stride[0])),typeof A=="number"&&A>=0?p=p+this.stride[1]*A|0:(g.push(this.shape[1]),f.push(this.stride[1]));var x=c[g.length+1];return x(this.data,g,f,p)},function(b,A,g,f){return new T(b,A[0],A[1],g[0],g[1],f)}},3:function(E,c,_){function T(k,b,A,g,f,p,x,N){this.data=k,this.shape=[b,A,g],this.stride=[f,p,x],this.offset=N|0}var M=T.prototype;return M.dtype=E,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var b=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),g=Math.abs(this.stride[2]);return b>A?A>g?[2,1,0]:b>g?[1,2,0]:[1,0,2]:b>g?[2,0,1]:g>A?[0,1,2]:[0,2,1]}}),M.set=function(b,A,g,f){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g,f):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g]=f},M.get=function(b,A,g){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g]},M.index=function(b,A,g){return this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g},M.hi=function(b,A,g){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof g!="number"||g<0?this.shape[2]:g|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(b,A,g){var f=this.offset,p=0,x=this.shape[0],N=this.shape[1],D=this.shape[2],B=this.stride[0],U=this.stride[1],V=this.stride[2];return typeof b=="number"&&b>=0&&(p=b|0,f+=B*p,x-=p),typeof A=="number"&&A>=0&&(p=A|0,f+=U*p,N-=p),typeof g=="number"&&g>=0&&(p=g|0,f+=V*p,D-=p),new T(this.data,x,N,D,B,U,V,f)},M.step=function(b,A,g){var f=this.shape[0],p=this.shape[1],x=this.shape[2],N=this.stride[0],D=this.stride[1],B=this.stride[2],U=this.offset,V=0,q=Math.ceil;return typeof b=="number"&&(V=b|0,V<0?(U+=N*(f-1),f=q(-f/V)):f=q(f/V),N*=V),typeof A=="number"&&(V=A|0,V<0?(U+=D*(p-1),p=q(-p/V)):p=q(p/V),D*=V),typeof g=="number"&&(V=g|0,V<0?(U+=B*(x-1),x=q(-x/V)):x=q(x/V),B*=V),new T(this.data,f,p,x,N,D,B,U)},M.transpose=function(b,A,g){b=b===void 0?0:b|0,A=A===void 0?1:A|0,g=g===void 0?2:g|0;var f=this.shape,p=this.stride;return new T(this.data,f[b],f[A],f[g],p[b],p[A],p[g],this.offset)},M.pick=function(b,A,g){var f=[],p=[],x=this.offset;typeof b=="number"&&b>=0?x=x+this.stride[0]*b|0:(f.push(this.shape[0]),p.push(this.stride[0])),typeof A=="number"&&A>=0?x=x+this.stride[1]*A|0:(f.push(this.shape[1]),p.push(this.stride[1])),typeof g=="number"&&g>=0?x=x+this.stride[2]*g|0:(f.push(this.shape[2]),p.push(this.stride[2]));var N=c[f.length+1];return N(this.data,f,p,x)},function(b,A,g,f){return new T(b,A[0],A[1],A[2],g[0],g[1],g[2],f)}},4:function(E,c,_){function T(k,b,A,g,f,p,x,N,D,B){this.data=k,this.shape=[b,A,g,f],this.stride=[p,x,N,D],this.offset=B|0}var M=T.prototype;return M.dtype=E,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:_}),M.set=function(b,A,g,f,p){return E==="generic"?this.data.set(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g+this.stride[3]*f,p):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g+this.stride[3]*f]=p},M.get=function(b,A,g,f){return E==="generic"?this.data.get(this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g+this.stride[3]*f):this.data[this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g+this.stride[3]*f]},M.index=function(b,A,g,f){return this.offset+this.stride[0]*b+this.stride[1]*A+this.stride[2]*g+this.stride[3]*f},M.hi=function(b,A,g,f){return new T(this.data,typeof b!="number"||b<0?this.shape[0]:b|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof g!="number"||g<0?this.shape[2]:g|0,typeof f!="number"||f<0?this.shape[3]:f|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(b,A,g,f){var p=this.offset,x=0,N=this.shape[0],D=this.shape[1],B=this.shape[2],U=this.shape[3],V=this.stride[0],q=this.stride[1],z=this.stride[2],H=this.stride[3];return typeof b=="number"&&b>=0&&(x=b|0,p+=V*x,N-=x),typeof A=="number"&&A>=0&&(x=A|0,p+=q*x,D-=x),typeof g=="number"&&g>=0&&(x=g|0,p+=z*x,B-=x),typeof f=="number"&&f>=0&&(x=f|0,p+=H*x,U-=x),new T(this.data,N,D,B,U,V,q,z,H,p)},M.step=function(b,A,g,f){var p=this.shape[0],x=this.shape[1],N=this.shape[2],D=this.shape[3],B=this.stride[0],U=this.stride[1],V=this.stride[2],q=this.stride[3],z=this.offset,H=0,G=Math.ceil;return typeof b=="number"&&(H=b|0,H<0?(z+=B*(p-1),p=G(-p/H)):p=G(p/H),B*=H),typeof A=="number"&&(H=A|0,H<0?(z+=U*(x-1),x=G(-x/H)):x=G(x/H),U*=H),typeof g=="number"&&(H=g|0,H<0?(z+=V*(N-1),N=G(-N/H)):N=G(N/H),V*=H),typeof f=="number"&&(H=f|0,H<0?(z+=q*(D-1),D=G(-D/H)):D=G(D/H),q*=H),new T(this.data,p,x,N,D,B,U,V,q,z)},M.transpose=function(b,A,g,f){b=b===void 0?0:b|0,A=A===void 0?1:A|0,g=g===void 0?2:g|0,f=f===void 0?3:f|0;var p=this.shape,x=this.stride;return new T(this.data,p[b],p[A],p[g],p[f],x[b],x[A],x[g],x[f],this.offset)},M.pick=function(b,A,g,f){var p=[],x=[],N=this.offset;typeof b=="number"&&b>=0?N=N+this.stride[0]*b|0:(p.push(this.shape[0]),x.push(this.stride[0])),typeof A=="number"&&A>=0?N=N+this.stride[1]*A|0:(p.push(this.shape[1]),x.push(this.stride[1])),typeof g=="number"&&g>=0?N=N+this.stride[2]*g|0:(p.push(this.shape[2]),x.push(this.stride[2])),typeof f=="number"&&f>=0?N=N+this.stride[3]*f|0:(p.push(this.shape[3]),x.push(this.stride[3]));var D=c[p.length+1];return D(this.data,p,x,N)},function(b,A,g,f){return new T(b,A[0],A[1],A[2],A[3],g[0],g[1],g[2],g[3],f)}},5:function(c,_,T){function M(b,A,g,f,p,x,N,D,B,U,V,q){this.data=b,this.shape=[A,g,f,p,x],this.stride=[N,D,B,U,V],this.offset=q|0}var k=M.prototype;return k.dtype=c,k.dimension=5,Object.defineProperty(k,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(k,"order",{get:T}),k.set=function(A,g,f,p,x,N){return c==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*g+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x,N):this.data[this.offset+this.stride[0]*A+this.stride[1]*g+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x]=N},k.get=function(A,g,f,p,x){return c==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*g+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x):this.data[this.offset+this.stride[0]*A+this.stride[1]*g+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x]},k.index=function(A,g,f,p,x){return this.offset+this.stride[0]*A+this.stride[1]*g+this.stride[2]*f+this.stride[3]*p+this.stride[4]*x},k.hi=function(A,g,f,p,x){return new M(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof g!="number"||g<0?this.shape[1]:g|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof p!="number"||p<0?this.shape[3]:p|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},k.lo=function(A,g,f,p,x){var N=this.offset,D=0,B=this.shape[0],U=this.shape[1],V=this.shape[2],q=this.shape[3],z=this.shape[4],H=this.stride[0],G=this.stride[1],J=this.stride[2],le=this.stride[3],ye=this.stride[4];return typeof A=="number"&&A>=0&&(D=A|0,N+=H*D,B-=D),typeof g=="number"&&g>=0&&(D=g|0,N+=G*D,U-=D),typeof f=="number"&&f>=0&&(D=f|0,N+=J*D,V-=D),typeof p=="number"&&p>=0&&(D=p|0,N+=le*D,q-=D),typeof x=="number"&&x>=0&&(D=x|0,N+=ye*D,z-=D),new M(this.data,B,U,V,q,z,H,G,J,le,ye,N)},k.step=function(A,g,f,p,x){var N=this.shape[0],D=this.shape[1],B=this.shape[2],U=this.shape[3],V=this.shape[4],q=this.stride[0],z=this.stride[1],H=this.stride[2],G=this.stride[3],J=this.stride[4],le=this.offset,ye=0,de=Math.ceil;return typeof A=="number"&&(ye=A|0,ye<0?(le+=q*(N-1),N=de(-N/ye)):N=de(N/ye),q*=ye),typeof g=="number"&&(ye=g|0,ye<0?(le+=z*(D-1),D=de(-D/ye)):D=de(D/ye),z*=ye),typeof f=="number"&&(ye=f|0,ye<0?(le+=H*(B-1),B=de(-B/ye)):B=de(B/ye),H*=ye),typeof p=="number"&&(ye=p|0,ye<0?(le+=G*(U-1),U=de(-U/ye)):U=de(U/ye),G*=ye),typeof x=="number"&&(ye=x|0,ye<0?(le+=J*(V-1),V=de(-V/ye)):V=de(V/ye),J*=ye),new M(this.data,N,D,B,U,V,q,z,H,G,J,le)},k.transpose=function(A,g,f,p,x){A=A===void 0?0:A|0,g=g===void 0?1:g|0,f=f===void 0?2:f|0,p=p===void 0?3:p|0,x=x===void 0?4:x|0;var N=this.shape,D=this.stride;return new M(this.data,N[A],N[g],N[f],N[p],N[x],D[A],D[g],D[f],D[p],D[x],this.offset)},k.pick=function(A,g,f,p,x){var N=[],D=[],B=this.offset;typeof A=="number"&&A>=0?B=B+this.stride[0]*A|0:(N.push(this.shape[0]),D.push(this.stride[0])),typeof g=="number"&&g>=0?B=B+this.stride[1]*g|0:(N.push(this.shape[1]),D.push(this.stride[1])),typeof f=="number"&&f>=0?B=B+this.stride[2]*f|0:(N.push(this.shape[2]),D.push(this.stride[2])),typeof p=="number"&&p>=0?B=B+this.stride[3]*p|0:(N.push(this.shape[3]),D.push(this.stride[3])),typeof x=="number"&&x>=0?B=B+this.stride[4]*x|0:(N.push(this.shape[4]),D.push(this.stride[4]));var U=_[N.length+1];return U(this.data,N,D,B)},function(A,g,f,p){return new M(A,g[0],g[1],g[2],g[3],g[4],f[0],f[1],f[2],f[3],f[4],p)}}};function d(E,c){var _=c===-1?"T":String(c),T=u[_];return c===-1?T(E):c===0?T(E,y[E][0]):T(E,y[E],o)}function h(E){if(l(E))return"buffer";if(i)switch(Object.prototype.toString.call(E)){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(E)?"array":"generic"}var y={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(E,c,_,T){if(E===void 0){var f=y.array[0];return f([])}else typeof E=="number"&&(E=[E]);c===void 0&&(c=[E.length]);var M=c.length;if(_===void 0){_=new Array(M);for(var k=M-1,b=1;k>=0;--k)_[k]=b,b*=c[k]}if(T===void 0){T=0;for(var k=0;k<M;++k)_[k]<0&&(T-=(c[k]-1)*_[k])}for(var A=h(E),g=y[A];g.length<=M+1;)g.push(d(A,g.length-1));var f=g[M+1];return f(E,c,_,T)}t.exports=m}),9921:(function(t){t.exports=r;function r(a){var l=a[0],i=a[1],s=a[2],o=a[3],u=a[4],d=a[5],h=a[6],y=a[7],m=a[8],E=a[9],c=a[10],_=a[11],T=a[12],M=a[13],k=a[14],b=a[15],A=l*d-i*u,g=l*h-s*u,f=l*y-o*u,p=i*h-s*d,x=i*y-o*d,N=s*y-o*h,D=m*M-E*T,B=m*k-c*T,U=m*b-_*T,V=E*k-c*M,q=E*b-_*M,z=c*b-_*k;return A*z-g*q+f*V+p*U-x*B+N*D}}),9922:(function(t,r,a){t.exports=i;var l=a(2613);function i(s,o){var u=s[0],d=s[1],h=s[2],y=o[0],m=o[1],E=o[2];return Math.abs(u-y)<=l*Math.max(1,Math.abs(u),Math.abs(y))&&Math.abs(d-m)<=l*Math.max(1,Math.abs(d),Math.abs(m))&&Math.abs(h-E)<=l*Math.max(1,Math.abs(h),Math.abs(E))}}),9970:(function(t,r,a){t.exports={create:a(7536),clone:a(2335),fromValues:a(3390),copy:a(2933),set:a(4578),add:a(4361),subtract:a(6860),multiply:a(3576),divide:a(1373),min:a(2334),max:a(160),scale:a(9288),scaleAndAdd:a(4844),distance:a(4691),squaredDistance:a(7960),length:a(6808),squaredLength:a(483),negate:a(1498),inverse:a(4494),normalize:a(5177),dot:a(3750),lerp:a(2573),random:a(9131),transformMat4:a(5352),transformQuat:a(4041)}}),9977:(function(t,r,a){t.exports=c;var l=a(9215),i=a(6582),s=a(7399),o=a(7608),u=a(4081);function d(_,T,M){return Math.sqrt(Math.pow(_,2)+Math.pow(T,2)+Math.pow(M,2))}function h(_,T,M,k){return Math.sqrt(Math.pow(_,2)+Math.pow(T,2)+Math.pow(M,2)+Math.pow(k,2))}function y(_,T){var M=T[0],k=T[1],b=T[2],A=T[3],g=h(M,k,b,A);g>1e-6?(_[0]=M/g,_[1]=k/g,_[2]=b/g,_[3]=A/g):(_[0]=_[1]=_[2]=0,_[3]=1)}function m(_,T,M){this.radius=l([M]),this.center=l(T),this.rotation=l(_),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 E=m.prototype;E.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},E.recalcMatrix=function(_){this.radius.curve(_),this.center.curve(_),this.rotation.curve(_);var T=this.computedRotation;y(T,T);var M=this.computedMatrix;s(M,T);var k=this.computedCenter,b=this.computedEye,A=this.computedUp,g=Math.exp(this.computedRadius[0]);b[0]=k[0]+g*M[2],b[1]=k[1]+g*M[6],b[2]=k[2]+g*M[10],A[0]=M[1],A[1]=M[5],A[2]=M[9];for(var f=0;f<3;++f){for(var p=0,x=0;x<3;++x)p+=M[f+4*x]*b[x];M[12+f]=-p}},E.getMatrix=function(_,T){this.recalcMatrix(_);var M=this.computedMatrix;if(T){for(var k=0;k<16;++k)T[k]=M[k];return T}return M},E.idle=function(_){this.center.idle(_),this.radius.idle(_),this.rotation.idle(_)},E.flush=function(_){this.center.flush(_),this.radius.flush(_),this.rotation.flush(_)},E.pan=function(_,T,M,k){T=T||0,M=M||0,k=k||0,this.recalcMatrix(_);var b=this.computedMatrix,A=b[1],g=b[5],f=b[9],p=d(A,g,f);A/=p,g/=p,f/=p;var x=b[0],N=b[4],D=b[8],B=x*A+N*g+D*f;x-=A*B,N-=g*B,D-=f*B;var U=d(x,N,D);x/=U,N/=U,D/=U,b[2],b[6],b[10];var V=x*T+A*M,q=N*T+g*M,z=D*T+f*M;this.center.move(_,V,q,z);var H=Math.exp(this.computedRadius[0]);H=Math.max(1e-4,H+k),this.radius.set(_,Math.log(H))},E.rotate=function(_,T,M,k){this.recalcMatrix(_),T=T||0,M=M||0;var b=this.computedMatrix,A=b[0],g=b[4],f=b[8],p=b[1],x=b[5],N=b[9],D=b[2],B=b[6],U=b[10],V=T*A+M*p,q=T*g+M*x,z=T*f+M*N,H=-(B*z-U*q),G=-(U*V-D*z),J=-(D*q-B*V),le=Math.sqrt(Math.max(0,1-Math.pow(H,2)-Math.pow(G,2)-Math.pow(J,2))),ye=h(H,G,J,le);ye>1e-6?(H/=ye,G/=ye,J/=ye,le/=ye):(H=G=J=0,le=1);var de=this.computedRotation,me=de[0],W=de[1],ie=de[2],se=de[3],ee=me*le+se*H+W*J-ie*G,pe=W*le+se*G+ie*H-me*J,oe=ie*le+se*J+me*G-W*H,Y=se*le-me*H-W*G-ie*J;if(k){H=D,G=B,J=U;var ce=Math.sin(k)/d(H,G,J);H*=ce,G*=ce,J*=ce,le=Math.cos(T),ee=ee*le+Y*H+pe*J-oe*G,pe=pe*le+Y*G+oe*H-ee*J,oe=oe*le+Y*J+ee*G-pe*H,Y=Y*le-ee*H-pe*G-oe*J}var ue=h(ee,pe,oe,Y);ue>1e-6?(ee/=ue,pe/=ue,oe/=ue,Y/=ue):(ee=pe=oe=0,Y=1),this.rotation.set(_,ee,pe,oe,Y)},E.lookAt=function(_,T,M,k){this.recalcMatrix(_),M=M||this.computedCenter,T=T||this.computedEye,k=k||this.computedUp;var b=this.computedMatrix;i(b,T,M,k);var A=this.computedRotation;u(A,b[0],b[1],b[2],b[4],b[5],b[6],b[8],b[9],b[10]),y(A,A),this.rotation.set(_,A[0],A[1],A[2],A[3]);for(var g=0,f=0;f<3;++f)g+=Math.pow(M[f]-T[f],2);this.radius.set(_,.5*Math.log(Math.max(g,1e-6))),this.center.set(_,M[0],M[1],M[2])},E.translate=function(_,T,M,k){this.center.move(_,T||0,M||0,k||0)},E.setMatrix=function(_,T){var M=this.computedRotation;u(M,T[0],T[1],T[2],T[4],T[5],T[6],T[8],T[9],T[10]),y(M,M),this.rotation.set(_,M[0],M[1],M[2],M[3]);var k=this.computedMatrix;o(k,T);var b=k[15];if(Math.abs(b)>1e-6){var A=k[12]/b,g=k[13]/b,f=k[14]/b;this.recalcMatrix(_);var p=Math.exp(this.computedRadius[0]);this.center.set(_,A-k[2]*p,g-k[6]*p,f-k[10]*p),this.radius.idle(_)}else this.center.idle(_),this.radius.idle(_)},E.setDistance=function(_,T){T>0&&this.radius.set(_,Math.log(T))},E.setDistanceLimits=function(_,T){_>0?_=Math.log(_):_=-1/0,T>0?T=Math.log(T):T=1/0,T=Math.max(T,_),this.radius.bounds[0][0]=_,this.radius.bounds[1][0]=T},E.getDistanceLimits=function(_){var T=this.radius.bounds;return _?(_[0]=Math.exp(T[0][0]),_[1]=Math.exp(T[1][0]),_):[Math.exp(T[0][0]),Math.exp(T[1][0])]},E.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]}},E.fromJSON=function(_){var T=this.lastT(),M=_.center;M&&this.center.set(T,M[0],M[1],M[2]);var k=_.rotation;k&&this.rotation.set(T,k[0],k[1],k[2],k[3]);var b=_.distance;b&&b>0&&this.radius.set(T,Math.log(b)),this.setDistanceLimits(_.zoomMin,_.zoomMax)};function c(_){_=_||{};var T=_.center||[0,0,0],M=_.rotation||[0,0,0,1],k=_.radius||1;T=[].slice.call(T,0,3),M=[].slice.call(M,0,4),y(M,M);var b=new m(M,T,Math.log(k));return b.setDistanceLimits(_.zoomMin,_.zoomMax),("eye"in _||"up"in _)&&b.lookAt(0,_.eye,_.center,_.up),b}}),9994:(function(t,r,a){var l=a(9618),i=a(8277);t.exports=function(o,u){for(var d=[],h=o,y=1;Array.isArray(h);)d.push(h.length),y*=h.length,h=h[0];return d.length===0?l():(u||(u=l(new Float64Array(y),d)),i(u,o),u)}})},w={};function C(t){var r=w[t];if(r!==void 0)return r.exports;var a=w[t]={id:t,loaded:!1,exports:{}};return v[t].call(a.exports,a,a.exports,C),a.loaded=!0,a.exports}(function(){C.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})()})(),(function(){C.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t}})();var P=C(1964);Z.exports=P})()}}),K9=Ne({"node_modules/color-name/index.js"(te,Z){Z.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]}}}),LK=Ne({"node_modules/color-normalize/node_modules/color-parse/index.js"(te,Z){var v=K9();Z.exports=C;var w={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function C(P){var t,r=[],a=1,l;if(typeof P=="string")if(P=P.toLowerCase(),v[P])r=v[P].slice(),l="rgb";else if(P==="transparent")a=0,l="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(P)){var i=P.slice(1),s=i.length,o=s<=4;a=1,o?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],s===4&&(a=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],s===8&&(a=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),l="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(P)){var u=t[1],d=u==="rgb",i=u.replace(/a$/,"");l=i;var s=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(m,E){if(/%$/.test(m))return E===s?parseFloat(m)/100:i==="rgb"?parseFloat(m)*255/100:parseFloat(m);if(i[E]==="h"){if(/deg$/.test(m))return parseFloat(m);if(w[m]!==void 0)return w[m]}return parseFloat(m)}),u===i&&r.push(1),a=d||r[s]===void 0?1:r[s],r=r.slice(0,s)}else P.length>10&&/[0-9](?:\s|\/)/.test(P)&&(r=P.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),l=P.match(/([a-z])/ig).join("").toLowerCase());else isNaN(P)?Array.isArray(P)||P.length?(r=[P[0],P[1],P[2]],l="rgb",a=P.length===4?P[3]:1):P instanceof Object&&(P.r!=null||P.red!=null||P.R!=null?(l="rgb",r=[P.r||P.red||P.R||0,P.g||P.green||P.G||0,P.b||P.blue||P.B||0]):(l="hsl",r=[P.h||P.hue||P.H||0,P.s||P.saturation||P.S||0,P.l||P.lightness||P.L||P.b||P.brightness]),a=P.a||P.alpha||P.opacity||1,P.opacity!=null&&(a/=100)):(l="rgb",r=[P>>>16,(P&65280)>>>8,P&255]);return{space:l,values:r,alpha:a}}}}),RK=Ne({"node_modules/color-normalize/node_modules/color-rgba/index.js"(te,Z){var v=LK();Z.exports=function(P){Array.isArray(P)&&P.raw&&(P=String.raw.apply(null,arguments));var t,r=v(P);if(!r.space)return[];var a=[0,0,0],l=r.space[0]==="h"?[360,100,100]:[255,255,255];return t=Array(3),t[0]=Math.min(Math.max(r.values[0],a[0]),l[0]),t[1]=Math.min(Math.max(r.values[1],a[1]),l[1]),t[2]=Math.min(Math.max(r.values[2],a[2]),l[2]),r.space[0]==="h"&&(t=w(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t};function w(C){var P=C[0]/360,t=C[1]/100,r=C[2]/100,a,l,i,s,o,u=0;if(t===0)return o=r*255,[o,o,o];for(l=r<.5?r*(1+t):r+t-r*t,a=2*r-l,s=[0,0,0];u<3;)i=P+1/3*-(u-1),i<0?i++:i>1&&i--,o=6*i<1?a+(l-a)*6*i:2*i<1?l:3*i<2?a+(l-a)*(2/3-i)*6:a,s[u++]=o*255;return s}}}),a6=Ne({"node_modules/clamp/index.js"(te,Z){Z.exports=v;function v(w,C,P){return C<P?w<C?C:w>P?P:w:w<P?P:w>C?C:w}}}),fR=Ne({"node_modules/dtype/index.js"(te,Z){Z.exports=function(v){switch(v){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}}}),Lb=Ne({"node_modules/color-normalize/index.js"(te,Z){var v=RK(),w=a6(),C=fR();Z.exports=function(r,a){(a==="float"||!a)&&(a="array"),a==="uint"&&(a="uint8"),a==="uint_clamped"&&(a="uint8_clamped");var l=C(a),i=new l(4),s=a!=="uint8"&&a!=="uint8_clamped";return(!r.length||typeof r=="string")&&(r=v(r),r[0]/=255,r[1]/=255,r[2]/=255),P(r)?(i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3]!=null?r[3]:255,s&&(i[0]/=255,i[1]/=255,i[2]/=255,i[3]/=255),i):(s?(i[0]=r[0],i[1]=r[1],i[2]=r[2],i[3]=r[3]!=null?r[3]:1):(i[0]=w(Math.floor(r[0]*255),0,255),i[1]=w(Math.floor(r[1]*255),0,255),i[2]=w(Math.floor(r[2]*255),0,255),i[3]=r[3]==null?255:w(Math.floor(r[3]*255),0,255)),i)};function P(t){return!!(t instanceof Uint8Array||t instanceof Uint8ClampedArray||Array.isArray(t)&&(t[0]>1||t[0]===0)&&(t[1]>1||t[1]===0)&&(t[2]>1||t[2]===0)&&(!t[3]||t[3]>1))}}}),C_=Ne({"src/lib/str2rgbarray.js"(te,Z){var v=Lb();function w(C){return C?v(C):[0,0,0,1]}Z.exports=w}}),k_=Ne({"src/lib/gl_format_color.js"(te,Z){var v=la(),w=Ro(),C=Lb(),P=Dc(),t=lu().defaultLine,r=vi().isArrayOrTypedArray,a=C(t),l=1;function i(h,y){var m=h;return m[3]*=y,m}function s(h){if(v(h))return a;var y=C(h);return y.length?y:a}function o(h){return v(h)?h:l}function u(h,y,m){var E=h.color;E&&E._inputArray&&(E=E._inputArray);var c=r(E),_=r(y),T=P.extractOpts(h),M=[],k,b,A,g,f;if(T.colorscale!==void 0?k=P.makeColorScaleFuncFromTrace(h):k=s,c?b=function(x,N){return x[N]===void 0?a:C(k(x[N]))}:b=s,_?A=function(x,N){return x[N]===void 0?l:o(x[N])}:A=o,c||_)for(var p=0;p<m;p++)g=b(E,p),f=A(y,p),M[p]=i(g,f);else M=i(C(E),y);return M}function d(h){var y=P.extractOpts(h),m=y.colorscale;return y.reversescale&&(m=P.flipScale(y.colorscale)),m.map(function(E){var c=E[0],_=w(E[1]),T=_.toRgb();return{index:c,rgb:[T.r,T.g,T.b,T.a]}})}Z.exports={formatColor:u,parseColorScale:d}}}),J9=Ne({"src/constants/gl3d_dashes.js"(te,Z){Z.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]}}}),hR=Ne({"src/constants/gl3d_markers.js"(te,Z){Z.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}}}),IK=Ne({"src/traces/scatter3d/calc_errors.js"(te,Z){var v=Xo();function w(t,r,a,l){if(!r||!r.visible)return null;for(var i=v.getComponentMethod("errorbars","makeComputeError")(r),s=new Array(t.length),o=0;o<t.length;o++){var u=i(+t[o],o);if(l.type==="log"){var d=l.c2l(t[o]),h=t[o]-u[0],y=t[o]+u[1];if(s[o]=[(l.c2l(h,!0)-d)*a,(l.c2l(y,!0)-d)*a],h>0){var m=l.c2l(h);l._lowerLogErrorBound||(l._lowerLogErrorBound=m),l._lowerErrorBound=Math.min(l._lowerLogErrorBound,m)}}else s[o]=[-u[0]*a,u[1]*a]}return s}function C(t){for(var r=0;r<t.length;r++)if(t[r])return t[r].length;return 0}function P(t,r,a){var l=[w(t.x,t.error_x,r[0],a.xaxis),w(t.y,t.error_y,r[1],a.yaxis),w(t.z,t.error_z,r[2],a.zaxis)],i=C(l);if(i===0)return null;for(var s=new Array(i),o=0;o<i;o++){for(var u=[[0,0,0],[0,0,0]],d=0;d<3;d++)if(l[d])for(var h=0;h<2;h++)u[h][d]=l[d][o][h];s[o]=u}return s}Z.exports=P}}),DK=Ne({"src/traces/scatter3d/convert.js"(te,Z){var v=Vv().gl_line3d,w=Vv().gl_scatter3d,C=Vv().gl_error3d,P=Vv().gl_mesh3d,t=Vv().delaunay_triangulate,r=In(),a=C_(),l=k_().formatColor,i=Mm(),s=J9(),o=hR(),u=Os(),d=_v().appendArrayPointValue,h=IK();function y(N,D){this.scene=N,this.uid=D,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 m=y.prototype;m.handlePick=function(N){if(N.object&&(N.object===this.linePlot||N.object===this.delaunayMesh||N.object===this.textMarkers||N.object===this.scatterPlot)){var D=N.index=N.data.index;return N.object.highlight&&N.object.highlight(null),this.scatterPlot&&(N.object=this.scatterPlot,this.scatterPlot.highlight(N.data)),N.textLabel="",this.textLabels&&(r.isArrayOrTypedArray(this.textLabels)?(this.textLabels[D]||this.textLabels[D]===0)&&(N.textLabel=this.textLabels[D]):N.textLabel=this.textLabels),N.traceCoordinate=[this.data.x[D],this.data.y[D],this.data.z[D]],!0}};function E(N,D,B){var U=(B+1)%3,V=(B+2)%3,q=[],z=[],H;for(H=0;H<N.length;++H){var G=N[H];isNaN(G[U])||!isFinite(G[U])||isNaN(G[V])||!isFinite(G[V])||(q.push([G[U],G[V]]),z.push(H))}var J=t(q);for(H=0;H<J.length;++H)for(var le=J[H],ye=0;ye<le.length;++ye)le[ye]=z[le[ye]];return{positions:N,cells:J,meshColor:D}}function c(N){for(var D=[0,0,0],B=[[0,0,0],[0,0,0],[0,0,0]],U=[1,1,1],V=0;V<3;V++){var q=N[V];q&&q.copy_zstyle!==!1&&N[2].visible!==!1&&(q=N[2]),!(!q||!q.visible)&&(D[V]=q.width/2,B[V]=a(q.color),U[V]=q.thickness)}return{capSize:D,color:B,lineWidth:U}}function _(N){return N==null?0:N.indexOf("left")>-1?-1:N.indexOf("right")>-1?1:0}function T(N){return N==null?0:N.indexOf("top")>-1?-1:N.indexOf("bottom")>-1?1:0}function M(N){var D=0,B=0,U=[D,B];if(Array.isArray(N))for(var V=0;V<N.length;V++)U[V]=[D,B],N[V]&&(U[V][0]=_(N[V]),U[V][1]=T(N[V]));else U[0]=_(N),U[1]=T(N);return U}function k(N,D){return D(N*4)}function b(N){return o[N]}function A(N,D,B,U,V){var q=null;if(r.isArrayOrTypedArray(N)){q=[];for(var z=0;z<D;z++)N[z]===void 0?q[z]=U:q[z]=B(N[z],V)}else q=B(N,r.identity);return q}function g(N,D){var B=[],U=N.fullSceneLayout,V=N.dataScale,q=U.xaxis,z=U.yaxis,H=U.zaxis,G=D.marker,J=D.line,le=D.x||[],ye=D.y||[],de=D.z||[],me=le.length,W=D.xcalendar,ie=D.ycalendar,se=D.zcalendar,ee,pe,oe,Y,ce,ue;for(ce=0;ce<me;ce++)ee=q.d2l(le[ce],0,W)*V[0],pe=z.d2l(ye[ce],0,ie)*V[1],oe=H.d2l(de[ce],0,se)*V[2],B[ce]=[ee,pe,oe];if(Array.isArray(D.text))ue=D.text;else if(r.isTypedArray(D.text))ue=Array.from(D.text);else if(D.text!==void 0)for(ue=new Array(me),ce=0;ce<me;ce++)ue[ce]=D.text;function _e(mt,bt){var ft=U[mt];return u.tickText(ft,ft.d2l(bt),!0).text}var Le=D.texttemplate;if(Le){var ze=N.fullLayout,Ge=ze._d3locale,Ve=Array.isArray(Le),rt=Ve?Math.min(Le.length,me):me,pt=Ve?function(mt){return Le[mt]}:function(){return Le};for(ue=new Array(rt),ce=0;ce<rt;ce++){var gt={x:le[ce],y:ye[ce],z:de[ce]},ht={xLabel:_e("xaxis",le[ce]),yLabel:_e("yaxis",ye[ce]),zLabel:_e("zaxis",de[ce])},lt={};d(lt,D,ce),ue[ce]=r.texttemplateString({data:[lt,gt,D._meta],fallback:D.texttemplatefallback,labels:ht,locale:Ge,template:pt(ce)})}}if(Y={position:B,mode:D.mode,text:ue},"line"in D&&(Y.lineColor=l(J,1,me),Y.lineWidth=J.width,Y.lineDashes=J.dash),"marker"in D){var Fe=i(D);Y.scatterColor=l(G,1,me),Y.scatterSize=A(G.size,me,k,20,Fe),Y.scatterMarker=A(G.symbol,me,b,"●"),Y.scatterLineWidth=G.line.width,Y.scatterLineColor=l(G.line,1,me),Y.scatterAngle=0}"textposition"in D&&(Y.textOffset=M(D.textposition),Y.textColor=l(D.textfont,1,me),Y.textSize=A(D.textfont.size,me,r.identity,12),Y.textFontFamily=D.textfont.family,Y.textFontWeight=D.textfont.weight,Y.textFontStyle=D.textfont.style,Y.textFontVariant=D.textfont.variant,Y.textAngle=0);var Pe=["x","y","z"];for(Y.project=[!1,!1,!1],Y.projectScale=[1,1,1],Y.projectOpacity=[1,1,1],ce=0;ce<3;++ce){var be=D.projection[Pe[ce]];(Y.project[ce]=be.show)&&(Y.projectOpacity[ce]=be.opacity,Y.projectScale[ce]=be.scale)}Y.errorBounds=h(D,V,U);var Ye=c([D.error_x,D.error_y,D.error_z]);return Y.errorColor=Ye.color,Y.errorLineWidth=Ye.lineWidth,Y.errorCapSize=Ye.capSize,Y.delaunayAxis=D.surfaceaxis,Y.delaunayColor=a(D.surfacecolor),Y}function f(N){if(r.isArrayOrTypedArray(N)){var D=N[0];return r.isArrayOrTypedArray(D)&&(N=D),"rgb("+N.slice(0,3).map(function(B){return Math.round(B*255)})+")"}return null}function p(N){return r.isArrayOrTypedArray(N)?N.length===4&&typeof N[0]=="number"?f(N):N.map(f):null}m.update=function(N){var D=this.scene.glplot.gl,B,U,V,q,z=s.solid;this.data=N;var H=g(this.scene,N);"mode"in H&&(this.mode=H.mode),"lineDashes"in H&&H.lineDashes in s&&(z=s[H.lineDashes]),this.color=p(H.scatterColor)||p(H.lineColor),this.dataPoints=H.position,B={gl:this.scene.glplot.gl,position:H.position,color:H.lineColor,lineWidth:H.lineWidth||1,dashes:z[0],dashScale:z[1],opacity:N.opacity,connectGaps:N.connectgaps},this.mode.indexOf("lines")!==-1?this.linePlot?this.linePlot.update(B):(this.linePlot=v(B),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var G=N.opacity;if(N.marker&&N.marker.opacity!==void 0&&(G*=N.marker.opacity),U={gl:this.scene.glplot.gl,position:H.position,color:H.scatterColor,size:H.scatterSize,glyph:H.scatterMarker,opacity:G,orthographic:!0,lineWidth:H.scatterLineWidth,lineColor:H.scatterLineColor,project:H.project,projectScale:H.projectScale,projectOpacity:H.projectOpacity},this.mode.indexOf("markers")!==-1?this.scatterPlot?this.scatterPlot.update(U):(this.scatterPlot=w(U),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),q={gl:this.scene.glplot.gl,position:H.position,glyph:H.text,color:H.textColor,size:H.textSize,angle:H.textAngle,alignment:H.textOffset,font:H.textFontFamily,fontWeight:H.textFontWeight,fontStyle:H.textFontStyle,fontVariant:H.textFontVariant,orthographic:!0,lineWidth:0,project:!1,opacity:N.opacity},this.textLabels=N.hovertext||N.text,this.mode.indexOf("text")!==-1?this.textMarkers?this.textMarkers.update(q):(this.textMarkers=w(q),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),V={gl:this.scene.glplot.gl,position:H.position,color:H.errorColor,error:H.errorBounds,lineWidth:H.errorLineWidth,capSize:H.errorCapSize,opacity:N.opacity},this.errorBars?H.errorBounds?this.errorBars.update(V):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):H.errorBounds&&(this.errorBars=C(V),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),H.delaunayAxis>=0){var J=E(H.position,H.delaunayColor,H.delaunayAxis);J.opacity=N.opacity,this.delaunayMesh?this.delaunayMesh.update(J):(J.gl=D,this.delaunayMesh=P(J),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)},m.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function x(N,D){var B=new y(N,D.uid);return B.update(D),B}Z.exports=x}}),Q9=Ne({"src/traces/scatter3d/attributes.js"(te,Z){var v=Jc(),w=$o(),C=Vu(),P=bc().axisHoverFormat,{hovertemplateAttrs:t,texttemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=ns(),i=J9(),s=hR(),o=co().extendFlat,u=Kc().overrideAll,d=Sm(),h=v.line,y=v.marker,m=y.line,E=o({width:h.width,dash:{valType:"enumerated",values:d(i),dflt:"solid"}},C("line"));function c(T){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 _=Z.exports=u({x:v.x,y:v.y,z:{valType:"data_array"},text:o({},v.text,{}),texttemplate:r(),texttemplatefallback:a({editType:"calc"}),hovertext:o({},v.hovertext,{}),hovertemplate:t(),hovertemplatefallback:a(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),mode:o({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:c(),y:c(),z:c()},connectgaps:v.connectgaps,line:E,marker:o({symbol:{valType:"enumerated",values:d(s),dflt:"circle",arrayOk:!0},size:o({},y.size,{dflt:8}),sizeref:y.sizeref,sizemin:y.sizemin,sizemode:y.sizemode,opacity:o({},y.opacity,{arrayOk:!1}),colorbar:y.colorbar,line:o({width:o({},m.width,{arrayOk:!1})},C("marker.line"))},C("marker")),textposition:o({},v.textposition,{dflt:"top center"}),textfont:w({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:l.opacity,hoverinfo:o({},l.hoverinfo)},"calc","nested");_.x.editType=_.y.editType=_.z.editType="calc+clearAxisTypes"}}),OK=Ne({"src/traces/scatter3d/defaults.js"(te,Z){var v=Xo(),w=In(),C=vu(),P=xv(),t=Im(),r=Xp(),a=Q9();Z.exports=function(s,o,u,d){function h(k,b){return w.coerce(s,o,a,k,b)}var y=l(s,o,h,d);if(!y){o.visible=!1;return}h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("xhoverformat"),h("yhoverformat"),h("zhoverformat"),h("mode"),C.hasMarkers(o)&&P(s,o,u,d,h,{noSelect:!0,noAngle:!0}),C.hasLines(o)&&(h("connectgaps"),t(s,o,u,d,h)),C.hasText(o)&&(h("texttemplate"),h("texttemplatefallback"),r(s,o,d,h,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var m=(o.line||{}).color,E=(o.marker||{}).color;h("surfaceaxis")>=0&&h("surfacecolor",m||E);for(var c=["x","y","z"],_=0;_<3;++_){var T="projection."+c[_];h(T+".show")&&(h(T+".opacity"),h(T+".scale"))}var M=v.getComponentMethod("errorbars","supplyDefaults");M(s,o,m||E||u,{axis:"z"}),M(s,o,m||E||u,{axis:"y",inherit:"z"}),M(s,o,m||E||u,{axis:"x",inherit:"z"})};function l(i,s,o,u){var d=0,h=o("x"),y=o("y"),m=o("z"),E=v.getComponentMethod("calendars","handleTraceDefaults");return E(i,s,["x","y","z"],u),h&&y&&m&&(d=Math.min(h.length,y.length,m.length),s._length=s._xlength=s._ylength=s._zlength=d),d}}}),zK=Ne({"src/traces/scatter3d/calc.js"(te,Z){var v=o0(),w=Wp();Z.exports=function(P,t){var r=[{x:!1,y:!1,trace:t,t:{}}];return v(r,t),w(P,t),r}}}),NK=Ne({"node_modules/get-canvas-context/index.js"(te,Z){Z.exports=v;function v(w,C){if(typeof w!="string")throw new TypeError("must specify type string");if(C=C||{},typeof document>"u"&&!C.canvas)return null;var P=C.canvas||document.createElement("canvas");typeof C.width=="number"&&(P.width=C.width),typeof C.height=="number"&&(P.height=C.height);var t=C,r;try{var a=[w];w.indexOf("webgl")===0&&a.push("experimental-"+w);for(var l=0;l<a.length;l++)if(r=P.getContext(a[l],t),r)return r}catch{r=null}return r||null}}}),FK=Ne({"node_modules/webgl-context/index.js"(te,Z){var v=NK();Z.exports=function(C){return v("webgl",C)}}}),eN=Ne({"src/lib/show_no_webgl_msg.js"(te,Z){var v=io(),w=function(){};Z.exports=function(P){for(var t in P)typeof P[t]=="function"&&(P[t]=w);P.destroy=function(){P.container.parentNode.removeChild(P.container)};var r=document.createElement("div");r.className="no-webgl",r.style.cursor="pointer",r.style.fontSize="24px",r.style.color=v.defaults[0],r.style.position="absolute",r.style.left=r.style.top="0px",r.style.width=r.style.height="100%",r.style["background-color"]=v.lightLine,r.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",r.appendChild(a),P.container.appendChild(r),P.container.style.background="#FFFFFF",P.container.onclick=function(){window.open("https://get.webgl.org")},!1}}}),BK=Ne({"src/plots/gl3d/layout/convert.js"(te,Z){var v=C_(),w=In(),C=["xaxis","yaxis","zaxis"];function P(){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 t=P.prototype;t.merge=function(a,l){for(var i=this,s=0;s<3;++s){var o=l[C[s]];if(!o.visible){i.tickEnable[s]=!1,i.labelEnable[s]=!1,i.lineEnable[s]=!1,i.lineTickEnable[s]=!1,i.gridEnable[s]=!1,i.zeroEnable[s]=!1,i.backgroundEnable[s]=!1;continue}i.labels[s]=a._meta?w.templateString(o.title.text,a._meta):o.title.text,"font"in o.title&&(o.title.font.color&&(i.labelColor[s]=v(o.title.font.color)),o.title.font.family&&(i.labelFont[s]=o.title.font.family),o.title.font.size&&(i.labelSize[s]=o.title.font.size),o.title.font.weight&&(i.labelFontWeight[s]=o.title.font.weight),o.title.font.style&&(i.labelFontStyle[s]=o.title.font.style),o.title.font.variant&&(i.labelFontVariant[s]=o.title.font.variant)),"showline"in o&&(i.lineEnable[s]=o.showline),"linecolor"in o&&(i.lineColor[s]=v(o.linecolor)),"linewidth"in o&&(i.lineWidth[s]=o.linewidth),"showgrid"in o&&(i.gridEnable[s]=o.showgrid),"gridcolor"in o&&(i.gridColor[s]=v(o.gridcolor)),"gridwidth"in o&&(i.gridWidth[s]=o.gridwidth),o.type==="log"?i.zeroEnable[s]=!1:"zeroline"in o&&(i.zeroEnable[s]=o.zeroline),"zerolinecolor"in o&&(i.zeroLineColor[s]=v(o.zerolinecolor)),"zerolinewidth"in o&&(i.zeroLineWidth[s]=o.zerolinewidth),"ticks"in o&&o.ticks?i.lineTickEnable[s]=!0:i.lineTickEnable[s]=!1,"ticklen"in o&&(i.lineTickLength[s]=i._defaultLineTickLength[s]=o.ticklen),"tickcolor"in o&&(i.lineTickColor[s]=v(o.tickcolor)),"tickwidth"in o&&(i.lineTickWidth[s]=o.tickwidth),"tickangle"in o&&(i.tickAngle[s]=o.tickangle==="auto"?-3600:Math.PI*-o.tickangle/180),"showticklabels"in o&&(i.tickEnable[s]=o.showticklabels),"tickfont"in o&&(o.tickfont.color&&(i.tickColor[s]=v(o.tickfont.color)),o.tickfont.family&&(i.tickFont[s]=o.tickfont.family),o.tickfont.size&&(i.tickSize[s]=o.tickfont.size),o.tickfont.weight&&(i.tickFontWeight[s]=o.tickfont.weight),o.tickfont.style&&(i.tickFontStyle[s]=o.tickfont.style),o.tickfont.variant&&(i.tickFontVariant[s]=o.tickfont.variant)),"mirror"in o?["ticks","all","allticks"].indexOf(o.mirror)!==-1?(i.lineTickMirror[s]=!0,i.lineMirror[s]=!0):o.mirror===!0?(i.lineTickMirror[s]=!1,i.lineMirror[s]=!0):(i.lineTickMirror[s]=!1,i.lineMirror[s]=!1):i.lineMirror[s]=!1,"showbackground"in o&&o.showbackground!==!1?(i.backgroundEnable[s]=!0,i.backgroundColor[s]=v(o.backgroundcolor)):i.backgroundEnable[s]=!1}};function r(a,l){var i=new P;return i.merge(a,l),i}Z.exports=r}}),jK=Ne({"src/plots/gl3d/layout/spikes.js"(te,Z){var v=C_(),w=["xaxis","yaxis","zaxis"];function C(){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 P=C.prototype;P.merge=function(r){for(var a=0;a<3;++a){var l=r[w[a]];if(!l.visible){this.enabled[a]=!1,this.drawSides[a]=!1;continue}this.enabled[a]=l.showspikes,this.colors[a]=v(l.spikecolor),this.drawSides[a]=l.spikesides,this.lineWidth[a]=l.spikethickness}};function t(r){var a=new C;return a.merge(r),a}Z.exports=t}}),UK=Ne({"src/plots/gl3d/layout/tick_marks.js"(te,Z){Z.exports=t;var v=Os(),w=In(),C=["xaxis","yaxis","zaxis"];function P(r){for(var a=new Array(3),l=0;l<3;++l){for(var i=r[l],s=new Array(i.length),o=0;o<i.length;++o)s[o]=i[o].x;a[l]=s}return a}function t(r){for(var a=r.axesOptions,l=r.glplot.axesPixels,i=r.fullSceneLayout,s=[[],[],[]],o=0;o<3;++o){var u=i[C[o]];if(u._length=(l[o].hi-l[o].lo)*l[o].pixelsPerDataUnit/r.dataScale[o],Math.abs(u._length)===1/0||isNaN(u._length))s[o]=[];else{u._input_range=u.range.slice(),u.range[0]=l[o].lo/r.dataScale[o],u.range[1]=l[o].hi/r.dataScale[o],u._m=1/(r.dataScale[o]*l[o].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var d=u.tickmode;if(u.tickmode==="auto"){u.tickmode="linear";var h=u.nticks||w.constrain(u._length/40,4,9);v.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var y=v.calcTicks(u,{msUTC:!0}),m=0;m<y.length;++m)y[m].x=y[m].x*r.dataScale[o],u.type==="date"&&(y[m].text=y[m].text.replace(/\<br\>/g," "));s[o]=y,u.tickmode=d}}a.ticks=s;for(var o=0;o<3;++o){.5*(r.glplot.bounds[0][o]+r.glplot.bounds[1][o]);for(var m=0;m<2;++m)a.bounds[m][o]=r.glplot.bounds[m][o]}r.contourLevels=P(s)}}}),qK=Ne({"src/plots/gl3d/scene.js"(te,Z){var v=Vv().gl_plot3d,w=v.createCamera,C=v.createScene,P=FK(),t=nA(),r=Xo(),a=In(),l=a.preserveDrawingBuffer(),i=Os(),s=nh(),o=C_(),u=eN(),d=Rg(),h=BK(),y=jK(),m=UK(),E=Cm().applyAutorangeOptions,c,_,T=!1;function M(B,U){var V=document.createElement("div"),q=B.container;this.graphDiv=B.graphDiv;var z=document.createElementNS("http://www.w3.org/2000/svg","svg");z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",z.style["z-index"]=20,z.style["pointer-events"]="none",V.appendChild(z),this.svgContainer=z,V.id=B.id,V.style.position="absolute",V.style.top=V.style.left="0px",V.style.width=V.style.height="100%",q.appendChild(V),this.fullLayout=U,this.id=B.id||"scene",this.fullSceneLayout=U[this.id],this.plotArgs=[[],{},{}],this.axesOptions=h(U,U[this.id]),this.spikeOptions=y(U[this.id]),this.container=V,this.staticMode=!!B.staticPlot,this.pixelRatio=this.pixelRatio||B.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=r.getComponentMethod("annotations3d","convert"),this.drawAnnotations=r.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var k=M.prototype;k.prepareOptions=function(){var B=this,U={canvas:B.canvas,gl:B.gl,glOptions:{preserveDrawingBuffer:l,premultipliedAlpha:!0,antialias:!0},container:B.container,axes:B.axesOptions,spikes:B.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:B.camera,pixelRatio:B.pixelRatio};if(B.staticMode){if(!_&&(c=document.createElement("canvas"),_=P({canvas:c,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!_))throw new Error("error creating static canvas/context for image server");U.gl=_,U.canvas=c}return U};var b=!0;k.tryCreatePlot=function(){var B=this,U=B.prepareOptions(),V=!0;try{B.glplot=C(U)}catch{if(B.staticMode||!b||l)V=!1;else{a.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{l=U.glOptions.preserveDrawingBuffer=!0,B.glplot=C(U)}catch{l=U.glOptions.preserveDrawingBuffer=!1,V=!1}}}return b=!1,V},k.initializeGLCamera=function(){var B=this,U=B.fullSceneLayout.camera,V=U.projection.type==="orthographic";B.camera=w(B.container,{center:[U.center.x,U.center.y,U.center.z],eye:[U.eye.x,U.eye.y,U.eye.z],up:[U.up.x,U.up.y,U.up.z],_ortho:V,zoomMin:.01,zoomMax:100,mode:"orbit"})},k.initializeGLPlot=function(){var B=this;B.initializeGLCamera();var U=B.tryCreatePlot();if(!U)return u(B);B.traces={},B.make4thDimension();var V=B.graphDiv,q=V.layout,z=function(){var G={};return B.isCameraChanged(q)&&(G[B.id+".camera"]=B.getCamera()),B.isAspectChanged(q)&&(G[B.id+".aspectratio"]=B.glplot.getAspectratio(),q[B.id].aspectmode!=="manual"&&(B.fullSceneLayout.aspectmode=q[B.id].aspectmode=G[B.id+".aspectmode"]="manual")),G},H=function(G){if(G.fullSceneLayout.dragmode!==!1){var J=z();G.saveLayout(q),G.graphDiv.emit("plotly_relayout",J)}};return B.glplot.canvas&&(B.glplot.canvas.addEventListener("mouseup",function(){H(B)}),B.glplot.canvas.addEventListener("touchstart",function(){T=!0}),B.glplot.canvas.addEventListener("wheel",function(G){if(V._context._scrollZoom.gl3d){if(B.camera._ortho){var J=G.deltaX>G.deltaY?1.1:.9090909090909091,le=B.glplot.getAspectratio();B.glplot.setAspectratio({x:J*le.x,y:J*le.y,z:J*le.z})}H(B)}},t?{passive:!1}:!1),B.glplot.canvas.addEventListener("mousemove",function(){if(B.fullSceneLayout.dragmode!==!1&&B.camera.mouseListener.buttons!==0){var G=z();B.graphDiv.emit("plotly_relayouting",G)}}),B.staticMode||B.glplot.canvas.addEventListener("webglcontextlost",function(G){V&&V.emit&&V.emit("plotly_webglcontextlost",{event:G,layer:B.id})},!1)),B.glplot.oncontextloss=function(){B.recoverContext()},B.glplot.onrender=function(){B.render()},!0},k.render=function(){var B=this,U=B.graphDiv,V,q=B.svgContainer,z=B.container.getBoundingClientRect();U._fullLayout._calcInverseTransform(U);var H=U._fullLayout._invScaleX,G=U._fullLayout._invScaleY,J=z.width*H,le=z.height*G;q.setAttributeNS(null,"viewBox","0 0 "+J+" "+le),q.setAttributeNS(null,"width",J),q.setAttributeNS(null,"height",le),m(B),B.glplot.axes.update(B.axesOptions);for(var ye=Object.keys(B.traces),de=null,me=B.glplot.selection,W=0;W<ye.length;++W)V=B.traces[ye[W]],V.data.hoverinfo!=="skip"&&V.handlePick(me)&&(de=V),V.setContourLevels&&V.setContourLevels();function ie(rt,pt,gt){var ht=B.fullSceneLayout[rt+"axis"];return ht.type!=="log"&&(pt=ht.d2l(pt)),i.hoverLabelText(ht,pt,gt)}if(de!==null){var se=d(B.glplot.cameraParams,me.dataCoordinate);V=de.data;var ee=U._fullData[V.index],pe=me.index,oe={xLabel:ie("x",me.traceCoordinate[0],V.xhoverformat),yLabel:ie("y",me.traceCoordinate[1],V.yhoverformat),zLabel:ie("z",me.traceCoordinate[2],V.zhoverformat)},Y=s.castHoverinfo(ee,B.fullLayout,pe),ce=(Y||"").split("+"),ue=Y&&Y==="all";!ee.hovertemplate&&!ue&&(ce.indexOf("x")===-1&&(oe.xLabel=void 0),ce.indexOf("y")===-1&&(oe.yLabel=void 0),ce.indexOf("z")===-1&&(oe.zLabel=void 0),ce.indexOf("text")===-1&&(me.textLabel=void 0),ce.indexOf("name")===-1&&(de.name=void 0));var _e,Le=[];V.type==="cone"||V.type==="streamtube"?(oe.uLabel=ie("x",me.traceCoordinate[3],V.uhoverformat),(ue||ce.indexOf("u")!==-1)&&Le.push("u: "+oe.uLabel),oe.vLabel=ie("y",me.traceCoordinate[4],V.vhoverformat),(ue||ce.indexOf("v")!==-1)&&Le.push("v: "+oe.vLabel),oe.wLabel=ie("z",me.traceCoordinate[5],V.whoverformat),(ue||ce.indexOf("w")!==-1)&&Le.push("w: "+oe.wLabel),oe.normLabel=me.traceCoordinate[6].toPrecision(3),(ue||ce.indexOf("norm")!==-1)&&Le.push("norm: "+oe.normLabel),V.type==="streamtube"&&(oe.divergenceLabel=me.traceCoordinate[7].toPrecision(3),(ue||ce.indexOf("divergence")!==-1)&&Le.push("divergence: "+oe.divergenceLabel)),me.textLabel&&Le.push(me.textLabel),_e=Le.join("<br>")):V.type==="isosurface"||V.type==="volume"?(oe.valueLabel=i.hoverLabelText(B._mockAxis,B._mockAxis.d2l(me.traceCoordinate[3]),V.valuehoverformat),Le.push("value: "+oe.valueLabel),me.textLabel&&Le.push(me.textLabel),_e=Le.join("<br>")):_e=me.textLabel;var ze={x:me.traceCoordinate[0],y:me.traceCoordinate[1],z:me.traceCoordinate[2],data:ee._input,fullData:ee,curveNumber:ee.index,pointNumber:pe};s.appendArrayPointValue(ze,ee,pe),V._module.eventData&&(ze=ee._module.eventData(ze,me,ee,{},pe));var Ge={points:[ze]};if(B.fullSceneLayout.hovermode){var Ve=[];s.loneHover({trace:ee,x:(.5+.5*se[0]/se[3])*J,y:(.5-.5*se[1]/se[3])*le,xLabel:oe.xLabel,yLabel:oe.yLabel,zLabel:oe.zLabel,text:_e,name:de.name,color:s.castHoverOption(ee,pe,"bgcolor")||de.color,borderColor:s.castHoverOption(ee,pe,"bordercolor"),fontFamily:s.castHoverOption(ee,pe,"font.family"),fontSize:s.castHoverOption(ee,pe,"font.size"),fontColor:s.castHoverOption(ee,pe,"font.color"),nameLength:s.castHoverOption(ee,pe,"namelength"),textAlign:s.castHoverOption(ee,pe,"align"),hovertemplate:a.castOption(ee,pe,"hovertemplate"),hovertemplateLabels:a.extendFlat({},ze,oe),eventData:[ze]},{container:q,gd:U,inOut_bbox:Ve}),ze.bbox=Ve[0]}me.distance<5&&(me.buttons||T)?U.emit("plotly_click",Ge):U.emit("plotly_hover",Ge),this.oldEventData=Ge}else s.loneUnhover(q),this.oldEventData&&U.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;B.drawAnnotations(B)},k.recoverContext=function(){var B=this;B.glplot.dispose();var U=function(){if(B.glplot.gl.isContextLost()){requestAnimationFrame(U);return}if(!B.initializeGLPlot()){a.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}B.plot.apply(B,B.plotArgs)};requestAnimationFrame(U)};var A=["xaxis","yaxis","zaxis"];function g(B,U,V){for(var q=B.fullSceneLayout,z=0;z<3;z++){var H=A[z],G=H.charAt(0),J=q[H],le=U[G],ye=U[G+"calendar"],de=U["_"+G+"length"];if(!a.isArrayOrTypedArray(le))V[0][z]=Math.min(V[0][z],0),V[1][z]=Math.max(V[1][z],de-1);else for(var me,W=0;W<(de||le.length);W++)if(a.isArrayOrTypedArray(le[W]))for(var ie=0;ie<le[W].length;++ie)me=J.d2l(le[W][ie],0,ye),!isNaN(me)&&isFinite(me)&&(V[0][z]=Math.min(V[0][z],me),V[1][z]=Math.max(V[1][z],me));else me=J.d2l(le[W],0,ye),!isNaN(me)&&isFinite(me)&&(V[0][z]=Math.min(V[0][z],me),V[1][z]=Math.max(V[1][z],me))}}function f(B,U){for(var V=B.fullSceneLayout,q=V.annotations||[],z=0;z<3;z++)for(var H=A[z],G=H.charAt(0),J=V[H],le=0;le<q.length;le++){var ye=q[le];if(ye.visible){var de=J.r2l(ye[G]);!isNaN(de)&&isFinite(de)&&(U[0][z]=Math.min(U[0][z],de),U[1][z]=Math.max(U[1][z],de))}}}k.plot=function(B,U,V){var q=this;if(q.plotArgs=[B,U,V],!q.glplot.contextLost){var z,H,G,J,le,ye,de=U[q.id],me=V[q.id];q.fullLayout=U,q.fullSceneLayout=de,q.axesOptions.merge(U,de),q.spikeOptions.merge(de),q.setViewport(de),q.updateFx(de.dragmode,de.hovermode),q.camera.enableWheel=q.graphDiv._context._scrollZoom.gl3d,q.glplot.setClearColor(o(de.bgcolor)),q.setConvert(le),B?Array.isArray(B)||(B=[B]):B=[];var W=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(G=0;G<B.length;++G)z=B[G],!(z.visible!==!0||z._length===0)&&g(this,z,W);f(this,W);var ie=[1,1,1];for(J=0;J<3;++J)W[1][J]===W[0][J]?ie[J]=1:ie[J]=1/(W[1][J]-W[0][J]);for(q.dataScale=ie,q.convertAnnotations(this),G=0;G<B.length;++G)z=B[G],!(z.visible!==!0||z._length===0)&&(H=q.traces[z.uid],H?H.data.type===z.type?H.update(z):(H.dispose(),H=z._module.plot(this,z),q.traces[z.uid]=H):(H=z._module.plot(this,z),q.traces[z.uid]=H),H.name=z.name);var se=Object.keys(q.traces);e:for(G=0;G<se.length;++G){for(J=0;J<B.length;++J)if(B[J].uid===se[G]&&B[J].visible===!0&&B[J]._length!==0)continue e;H=q.traces[se[G]],H.dispose(),delete q.traces[se[G]]}q.glplot.objects.sort(function(bt,ft){return bt._trace.data.index-ft._trace.data.index});var ee=[[0,0,0],[0,0,0]],pe={};for(G=0;G<3;++G){le=de[A[G]],ye=le.type,ye in pe?(pe[ye].acc*=ie[G],pe[ye].count+=1):pe[ye]={acc:ie[G],count:1};var oe;if(le.autorange){ee[0][G]=1/0,ee[1][G]=-1/0;var Y=q.glplot.objects,ce=q.fullSceneLayout.annotations||[],ue=le._name.charAt(0);for(J=0;J<Y.length;J++){var _e=Y[J],Le=_e.bounds,ze=_e._trace.data._pad||0;_e.constructor.name==="ErrorBars"&&le._lowerLogErrorBound?ee[0][G]=Math.min(ee[0][G],le._lowerLogErrorBound):ee[0][G]=Math.min(ee[0][G],Le[0][G]/ie[G]-ze),ee[1][G]=Math.max(ee[1][G],Le[1][G]/ie[G]+ze)}for(J=0;J<ce.length;J++){var Ge=ce[J];if(Ge.visible){var Ve=le.r2l(Ge[ue]);ee[0][G]=Math.min(ee[0][G],Ve),ee[1][G]=Math.max(ee[1][G],Ve)}}if("rangemode"in le&&le.rangemode==="tozero"&&(ee[0][G]=Math.min(ee[0][G],0),ee[1][G]=Math.max(ee[1][G],0)),ee[0][G]>ee[1][G])ee[0][G]=-1,ee[1][G]=1;else{var rt=ee[1][G]-ee[0][G];ee[0][G]-=rt/32,ee[1][G]+=rt/32}if(oe=[ee[0][G],ee[1][G]],oe=E(oe,le),ee[0][G]=oe[0],ee[1][G]=oe[1],le.isReversed()){var pt=ee[0][G];ee[0][G]=ee[1][G],ee[1][G]=pt}}else oe=le.range,ee[0][G]=le.r2l(oe[0]),ee[1][G]=le.r2l(oe[1]);ee[0][G]===ee[1][G]&&(ee[0][G]-=1,ee[1][G]+=1),le.range=[ee[0][G],ee[1][G]],le.limitRange(),q.glplot.setBounds(G,{min:le.range[0]*ie[G],max:le.range[1]*ie[G]})}var gt,ht=de.aspectmode;if(ht==="cube")gt=[1,1,1];else if(ht==="manual"){var lt=de.aspectratio;gt=[lt.x,lt.y,lt.z]}else if(ht==="auto"||ht==="data"){var Fe=[1,1,1];for(G=0;G<3;++G){le=de[A[G]],ye=le.type;var Pe=pe[ye];Fe[G]=Math.pow(Pe.acc,1/Pe.count)/ie[G]}ht==="data"||Math.max.apply(null,Fe)/Math.min.apply(null,Fe)<=4?gt=Fe:gt=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");de.aspectratio.x=me.aspectratio.x=gt[0],de.aspectratio.y=me.aspectratio.y=gt[1],de.aspectratio.z=me.aspectratio.z=gt[2],q.glplot.setAspectratio(de.aspectratio),q.viewInitial.aspectratio||(q.viewInitial.aspectratio={x:de.aspectratio.x,y:de.aspectratio.y,z:de.aspectratio.z}),q.viewInitial.aspectmode||(q.viewInitial.aspectmode=de.aspectmode);var be=de.domain||null,Ye=U._size||null;if(be&&Ye){var mt=q.container.style;mt.position="absolute",mt.left=Ye.l+be.x[0]*Ye.w+"px",mt.top=Ye.t+(1-be.y[1])*Ye.h+"px",mt.width=Ye.w*(be.x[1]-be.x[0])+"px",mt.height=Ye.h*(be.y[1]-be.y[0])+"px"}q.glplot.redraw()}},k.destroy=function(){var B=this;B.glplot&&(B.camera.mouseListener.enabled=!1,B.container.removeEventListener("wheel",B.camera.wheelListener),B.camera=null,B.glplot.dispose(),B.container.parentNode.removeChild(B.container),B.glplot=null)};function p(B){return[[B.eye.x,B.eye.y,B.eye.z],[B.center.x,B.center.y,B.center.z],[B.up.x,B.up.y,B.up.z]]}function x(B){return{up:{x:B.up[0],y:B.up[1],z:B.up[2]},center:{x:B.center[0],y:B.center[1],z:B.center[2]},eye:{x:B.eye[0],y:B.eye[1],z:B.eye[2]},projection:{type:B._ortho===!0?"orthographic":"perspective"}}}k.getCamera=function(){var B=this;return B.camera.view.recalcMatrix(B.camera.view.lastT()),x(B.camera)},k.setViewport=function(B){var U=this,V=B.camera;U.camera.lookAt.apply(this,p(V)),U.glplot.setAspectratio(B.aspectratio);var q=V.projection.type==="orthographic",z=U.camera._ortho;q!==z&&(U.glplot.redraw(),U.glplot.clearRGBA(),U.glplot.dispose(),U.initializeGLPlot())},k.isCameraChanged=function(B){var U=this,V=U.getCamera(),q=a.nestedProperty(B,U.id+".camera"),z=q.get();function H(ye,de,me,W){var ie=["up","center","eye"],se=["x","y","z"];return de[ie[me]]&&ye[ie[me]][se[W]]===de[ie[me]][se[W]]}var G=!1;if(z===void 0)G=!0;else{for(var J=0;J<3;J++)for(var le=0;le<3;le++)if(!H(V,z,J,le)){G=!0;break}(!z.projection||V.projection&&V.projection.type!==z.projection.type)&&(G=!0)}return G},k.isAspectChanged=function(B){var U=this,V=U.glplot.getAspectratio(),q=a.nestedProperty(B,U.id+".aspectratio"),z=q.get();return z===void 0||z.x!==V.x||z.y!==V.y||z.z!==V.z},k.saveLayout=function(B){var U=this,V=U.fullLayout,q,z,H,G,J,le,ye=U.isCameraChanged(B),de=U.isAspectChanged(B),me=ye||de;if(me){var W={};if(ye&&(q=U.getCamera(),z=a.nestedProperty(B,U.id+".camera"),H=z.get(),W[U.id+".camera"]=H),de&&(G=U.glplot.getAspectratio(),J=a.nestedProperty(B,U.id+".aspectratio"),le=J.get(),W[U.id+".aspectratio"]=le),r.call("_storeDirectGUIEdit",B,V._preGUI,W),ye){z.set(q);var ie=a.nestedProperty(V,U.id+".camera");ie.set(q)}if(de){J.set(G);var se=a.nestedProperty(V,U.id+".aspectratio");se.set(G),U.glplot.redraw()}}return me},k.updateFx=function(B,U){var V=this,q=V.camera;if(q)if(B==="orbit")q.mode="orbit",q.keyBindingMode="rotate";else if(B==="turntable"){q.up=[0,0,1],q.mode="turntable",q.keyBindingMode="rotate";var z=V.graphDiv,H=z._fullLayout,G=V.fullSceneLayout.camera,J=G.up.x,le=G.up.y,ye=G.up.z;if(ye/Math.sqrt(J*J+le*le+ye*ye)<.999){var de=V.id+".camera.up",me={x:0,y:0,z:1},W={};W[de]=me;var ie=z.layout;r.call("_storeDirectGUIEdit",ie,H._preGUI,W),G.up=me,a.nestedProperty(ie,de).set(me)}}else q.keyBindingMode=B;V.fullSceneLayout.hovermode=U};function N(B,U,V){for(var q=0,z=V-1;q<z;++q,--z)for(var H=0;H<U;++H)for(var G=0;G<4;++G){var J=4*(U*q+H)+G,le=4*(U*z+H)+G,ye=B[J];B[J]=B[le],B[le]=ye}}function D(B,U,V){for(var q=0;q<V;++q)for(var z=0;z<U;++z){var H=4*(U*q+z),G=B[H+3];if(G>0)for(var J=255/G,le=0;le<3;++le)B[H+le]=Math.min(J*B[H+le],255)}}k.toImage=function(B){var U=this;B||(B="png"),U.staticMode&&U.container.appendChild(c),U.glplot.redraw();var V=U.glplot.gl,q=V.drawingBufferWidth,z=V.drawingBufferHeight;V.bindFramebuffer(V.FRAMEBUFFER,null);var H=new Uint8Array(q*z*4);V.readPixels(0,0,q,z,V.RGBA,V.UNSIGNED_BYTE,H),N(H,q,z),D(H,q,z);var G=document.createElement("canvas");G.width=q,G.height=z;var J=G.getContext("2d",{willReadFrequently:!0}),le=J.createImageData(q,z);le.data.set(H),J.putImageData(le,0,0);var ye;switch(B){case"jpeg":ye=G.toDataURL("image/jpeg");break;case"webp":ye=G.toDataURL("image/webp");break;default:ye=G.toDataURL("image/png")}return U.staticMode&&U.container.removeChild(c),ye},k.setConvert=function(){for(var B=this,U=0;U<3;U++){var V=B.fullSceneLayout[A[U]];i.setConvert(V,B.fullLayout),V.setScale=a.noop}},k.make4thDimension=function(){var B=this,U=B.graphDiv,V=U._fullLayout;B._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},i.setConvert(B._mockAxis,V)},Z.exports=M}}),VK=Ne({"src/plots/gl3d/layout/attributes.js"(te,Z){Z.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),tN=Ne({"src/plots/gl3d/layout/axis_attributes.js"(te,Z){var v=io(),w=wd(),C=co().extendFlat,P=Kc().overrideAll;Z.exports=P({visible:w.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:w.color,categoryorder:w.categoryorder,categoryarray:w.categoryarray,title:{text:w.title.text,font:w.title.font},type:C({},w.type,{values:["-","linear","log","date","category"]}),autotypenumbers:w.autotypenumbers,autorange:w.autorange,autorangeoptions:{minallowed:w.autorangeoptions.minallowed,maxallowed:w.autorangeoptions.maxallowed,clipmin:w.autorangeoptions.clipmin,clipmax:w.autorangeoptions.clipmax,include:w.autorangeoptions.include,editType:"plot"},rangemode:w.rangemode,minallowed:w.minallowed,maxallowed:w.maxallowed,range:C({},w.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:w.minor.tickmode,nticks:w.nticks,tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,mirror:w.mirror,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,showticklabels:w.showticklabels,labelalias:w.labelalias,tickfont:w.tickfont,tickangle:w.tickangle,tickprefix:w.tickprefix,showtickprefix:w.showtickprefix,ticksuffix:w.ticksuffix,showticksuffix:w.showticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickformat:w.tickformat,tickformatstops:w.tickformatstops,hoverformat:w.hoverformat,showline:w.showline,linecolor:w.linecolor,linewidth:w.linewidth,showgrid:w.showgrid,gridcolor:C({},w.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:w.gridwidth,zeroline:w.zeroline,zerolinecolor:w.zerolinecolor,zerolinewidth:w.zerolinewidth},"plot","from-root")}}),rN=Ne({"src/plots/gl3d/layout/layout_attributes.js"(te,Z){var v=tN(),w=Oc().attributes,C=co().extendFlat,P=In().counterRegex;function t(r,a,l){return{x:{valType:"number",dflt:r,editType:"camera"},y:{valType:"number",dflt:a,editType:"camera"},z:{valType:"number",dflt:l,editType:"camera"},editType:"camera"}}Z.exports={_arrayAttrRegexps:[P("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:C(t(0,0,1),{}),center:C(t(0,0,0),{}),eye:C(t(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:w({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:v,yaxis:v,zaxis:v,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot"}}}),HK=Ne({"src/plots/gl3d/layout/axis_defaults.js"(te,Z){var v=Ro().mix,w=In(),C=Tu(),P=tN(),t=sv(),r=Om(),a=["xaxis","yaxis","zaxis"],l=13600/187;Z.exports=function(s,o,u){var d,h;function y(c,_){return w.coerce(d,h,P,c,_)}for(var m=0;m<a.length;m++){var E=a[m];d=s[E]||{},h=C.newContainer(o,E),h._id=E[0]+u.scene,h._name=E,t(d,h,y,u),r(d,h,y,{font:u.font,letter:E[0],data:u.data,showGrid:!0,noAutotickangles:!0,noMinorloglabels:!0,noTicklabelindex:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,noInsiderange:!0,noUnifiedhovertitle:!0,bgColor:u.bgColor,calendar:u.calendar},u.fullLayout),y("gridcolor",v(h.color,u.bgColor,l).toRgbString()),y("title.text",E[0]),h.setScale=w.noop,y("showspikes")&&(y("spikesides"),y("spikethickness"),y("spikecolor",h.color)),y("showaxeslabels"),y("showbackground")&&y("backgroundcolor")}}}}),GK=Ne({"src/plots/gl3d/layout/defaults.js"(te,Z){var v=In(),w=io(),C=Xo(),P=X0(),t=HK(),r=rN(),a=iv().getSubplotData,l="gl3d";Z.exports=function(o,u,d){var h=u._basePlotModules.length>1;function y(m){if(!h){var E=v.validate(o[m],r[m]);if(E)return o[m]}}P(o,u,d,{type:l,attributes:r,handleDefaults:i,fullLayout:u,font:u.font,fullData:d,getDfltFromLayout:y,autotypenumbersDflt:u.autotypenumbers,paper_bgcolor:u.paper_bgcolor,calendar:u.calendar})};function i(s,o,u,d){for(var h=u("bgcolor"),y=w.combine(h,d.paper_bgcolor),m=["up","center","eye"],E=0;E<m.length;E++)u("camera."+m[E]+".x"),u("camera."+m[E]+".y"),u("camera."+m[E]+".z");u("camera.projection.type");var c=!!u("aspectratio.x")&&!!u("aspectratio.y")&&!!u("aspectratio.z"),_=c?"manual":"auto",T=u("aspectmode",_);c||(s.aspectratio=o.aspectratio={x:1,y:1,z:1},T==="manual"&&(o.aspectmode="auto"),s.aspectmode=o.aspectmode);var M=a(d.fullData,l,d.id);t(s,o,{font:d.font,scene:d.id,data:M,bgColor:y,calendar:d.calendar,autotypenumbersDflt:d.autotypenumbersDflt,fullLayout:d.fullLayout}),C.getComponentMethod("annotations3d","handleDefaults")(s,o,d);var k=d.getDfltFromLayout("dragmode");if(k!==!1&&!k)if(k="orbit",s.camera&&s.camera.up){var b=s.camera.up.x,A=s.camera.up.y,g=s.camera.up.z;g!==0&&(!b||!A||!g||g/Math.sqrt(b*b+A*A+g*g)>.999)&&(k="turntable")}else k="turntable";u("dragmode",k),u("hovermode",d.getDfltFromLayout("hovermode"))}}}),Rb=Ne({"src/plots/gl3d/index.js"(te){var Z=Kc().overrideAll,v=Bo(),w=qK(),C=iv().getSubplotData,P=In(),t=cp(),r="gl3d",a="scene";te.name=r,te.attr=a,te.idRoot=a,te.idRegex=te.attrRegex=P.counterRegex("scene"),te.attributes=VK(),te.layoutAttributes=rN(),te.baseLayoutAttrOverrides=Z({hoverlabel:v.hoverlabel},"plot","nested"),te.supplyLayoutDefaults=GK(),te.plot=function(i){for(var s=i._fullLayout,o=i._fullData,u=s._subplots[r],d=0;d<u.length;d++){var h=u[d],y=C(o,r,h),m=s[h],E=m.camera,c=m._scene;c||(c=new w({id:h,graphDiv:i,container:i.querySelector(".gl-container"),staticPlot:i._context.staticPlot,plotGlPixelRatio:i._context.plotGlPixelRatio,camera:E},s),m._scene=c),c.viewInitial||(c.viewInitial={up:{x:E.up.x,y:E.up.y,z:E.up.z},eye:{x:E.eye.x,y:E.eye.y,z:E.eye.z},center:{x:E.center.x,y:E.center.y,z:E.center.z}}),c.plot(y,s,i.layout)}},te.clean=function(l,i,s,o){for(var u=o._subplots[r]||[],d=0;d<u.length;d++){var h=u[d];!i[h]&&o[h]._scene&&(o[h]._scene.destroy(),o._infolayer&&o._infolayer.selectAll(".annotation-"+h).remove())}},te.toSVG=function(l){for(var i=l._fullLayout,s=i._subplots[r],o=i._size,u=0;u<s.length;u++){var d=i[s[u]],h=d.domain,y=d._scene,m=y.toImage("png"),E=i._glimages.append("svg:image");E.attr({xmlns:t.svg,"xlink:href":m,x:o.l+o.w*h.x[0],y:o.t+o.h*(1-h.y[1]),width:o.w*(h.x[1]-h.x[0]),height:o.h*(h.y[1]-h.y[0]),preserveAspectRatio:"none"}),y.destroy()}},te.cleanId=function(i){if(i.match(/^scene[0-9]*$/)){var s=i.substr(5);return s==="1"&&(s=""),a+s}},te.updateFx=function(l){for(var i=l._fullLayout,s=i._subplots[r],o=0;o<s.length;o++){var u=i[s[o]]._scene;u.updateFx(i.dragmode,i.hovermode)}}}}),XK=Ne({"src/traces/scatter3d/index.js"(te,Z){Z.exports={plot:DK(),attributes:Q9(),markerSymbols:hR(),supplyDefaults:OK(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:zK(),moduleType:"trace",name:"scatter3d",basePlotModule:Rb(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}}}),WK=Ne({"lib/scatter3d.js"(te,Z){Z.exports=XK()}}),i6=Ne({"src/traces/surface/attributes.js"(te,Z){var v=io(),w=Vu(),C=bc().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Il(),r=ns(),a=co().extendFlat,l=Kc().overrideAll;function i(u){return{valType:"boolean",dflt:!1}}function s(u){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:i(),y:i(),z:i()},color:{valType:"color",dflt:v.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:v.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var o=Z.exports=l(a({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:P(),hovertemplatefallback:t(),xhoverformat:C("x"),yhoverformat:C("y"),zhoverformat:C("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},w("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:s(),y:s(),z:s()},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:a({},r.hoverinfo),showlegend:a({},r.showlegend,{dflt:!1})}),"calc","nested");o.x.editType=o.y.editType=o.z.editType="calc+clearAxisTypes"}}),nN=Ne({"src/traces/surface/defaults.js"(te,Z){var v=Xo(),w=In(),C=Ph(),P=i6(),t=.1;function r(s,o){for(var u=[],d=32,h=0;h<d;h++){var y=h/(d-1),m=o+(1-o)*(1-Math.pow(Math.sin(s*y*Math.PI),2));u.push([y,Math.max(0,Math.min(1,m))])}return u}function a(s){var o=0;if(!Array.isArray(s)||s.length<2||!s[0]||!s[s.length-1]||+s[0][0]!=0||+s[s.length-1][0]!=1)return!1;for(var u=0;u<s.length;u++){var d=s[u];if(d.length!==2||+d[0]<o)return!1;o=+d[0]}return!0}function l(s,o,u,d){var h,y;function m(g,f){return w.coerce(s,o,P,g,f)}var E=m("x"),c=m("y"),_=m("z");if(!_||!_.length||E&&E.length<1||c&&c.length<1){o.visible=!1;return}o._xlength=Array.isArray(E)&&w.isArrayOrTypedArray(E[0])?_.length:_[0].length,o._ylength=_.length;var T=v.getComponentMethod("calendars","handleTraceDefaults");T(s,o,["x","y","z"],d),m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(g){m(g)}),m("surfacecolor");var M=["x","y","z"];for(h=0;h<3;++h){var k="contours."+M[h],b=m(k+".show"),A=m(k+".highlight");if(b||A)for(y=0;y<3;++y)m(k+".project."+M[y]);b&&(m(k+".color"),m(k+".width"),m(k+".usecolormap")),A&&(m(k+".highlightcolor"),m(k+".highlightwidth")),m(k+".start"),m(k+".end"),m(k+".size")}C(s,o,d,m,{prefix:"",cLetter:"c"}),i(s,o,d,m),o._length=null}function i(s,o,u,d){var h=d("opacityscale");h==="max"?o.opacityscale=[[0,t],[1,1]]:h==="min"?o.opacityscale=[[0,1],[1,t]]:h==="extremes"?o.opacityscale=r(1,t):a(h)||(o.opacityscale=void 0)}Z.exports={supplyDefaults:l,opacityscaleDefaults:i}}}),YK=Ne({"src/traces/surface/calc.js"(te,Z){var v=Nd();Z.exports=function(C,P){P.surfacecolor?v(C,P,{vals:P.surfacecolor,containerStr:"",cLetter:"c"}):v(C,P,{vals:P.z,containerStr:"",cLetter:"c"})}}}),ZK=Ne({"src/traces/surface/convert.js"(te,Z){var v=Vv().gl_surface3d,w=Vv().ndarray,C=Vv().ndarray_linear_interpolate.d2,P=o2(),t=s2(),r=In().isArrayOrTypedArray,a=k_().parseColorScale,l=C_(),i=Dc().extractOpts;function s(p,x,N){this.scene=p,this.uid=N,this.surface=x,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 o=s.prototype;o.getXat=function(p,x,N,D){var B=r(this.data.x)?r(this.data.x[0])?this.data.x[x][p]:this.data.x[p]:p;return N===void 0?B:D.d2l(B,0,N)},o.getYat=function(p,x,N,D){var B=r(this.data.y)?r(this.data.y[0])?this.data.y[x][p]:this.data.y[x]:x;return N===void 0?B:D.d2l(B,0,N)},o.getZat=function(p,x,N,D){var B=this.data.z[x][p];return B===null&&this.data.connectgaps&&this.data._interpolatedZ&&(B=this.data._interpolatedZ[x][p]),N===void 0?B:D.d2l(B,0,N)},o.handlePick=function(p){if(p.object===this.surface){var x=(p.data.index[0]-1)/this.dataScaleX-1,N=(p.data.index[1]-1)/this.dataScaleY-1,D=Math.max(Math.min(Math.round(x),this.data.z[0].length-1),0),B=Math.max(Math.min(Math.round(N),this.data._ylength-1),0);p.index=[D,B],p.traceCoordinate=[this.getXat(D,B),this.getYat(D,B),this.getZat(D,B)],p.dataCoordinate=[this.getXat(D,B,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(D,B,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(D,B,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var U=0;U<3;U++){var V=p.dataCoordinate[U];V!=null&&(p.dataCoordinate[U]*=this.scene.dataScale[U])}var q=this.data.hovertext||this.data.text;return r(q)&&q[B]&&q[B][D]!==void 0?p.textLabel=q[B][D]:q?p.textLabel=q:p.textLabel="",p.data.dataCoordinate=p.dataCoordinate.slice(),this.surface.highlight(p.data),this.scene.glplot.spikes.position=p.dataCoordinate,!0}};function u(p){var x=p[0].rgb,N=p[p.length-1].rgb;return x[0]===N[0]&&x[1]===N[1]&&x[2]===N[2]&&x[3]===N[3]}var d=[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 h(p,x){if(p<x)return 0;for(var N=0;Math.floor(p%x)===0;)p/=x,N++;return N}function y(p){for(var x=[],N=0;N<d.length;N++){var D=d[N];x.push(h(p,D))}return x}function m(p){for(var x=y(p),N=p,D=0;D<d.length;D++)if(x[D]>0){N=d[D];break}return N}function E(p,x){if(!(p<1||x<1)){for(var N=y(p),D=y(x),B=1,U=0;U<d.length;U++)B*=Math.pow(d[U],Math.max(N[U],D[U]));return B}}function c(p){if(p.length!==0){for(var x=1,N=0;N<p.length;N++)x=E(x,p[N]);return x}}o.calcXnums=function(p){var x,N=[];for(x=1;x<p;x++){var D=this.getXat(x-1,0),B=this.getXat(x,0);B!==D&&D!==void 0&&D!==null&&B!==void 0&&B!==null?N[x-1]=Math.abs(B-D):N[x-1]=0}var U=0;for(x=1;x<p;x++)U+=N[x-1];for(x=1;x<p;x++)N[x-1]===0?N[x-1]=1:N[x-1]=Math.round(U/N[x-1]);return N},o.calcYnums=function(p){var x,N=[];for(x=1;x<p;x++){var D=this.getYat(0,x-1),B=this.getYat(0,x);B!==D&&D!==void 0&&D!==null&&B!==void 0&&B!==null?N[x-1]=Math.abs(B-D):N[x-1]=0}var U=0;for(x=1;x<p;x++)U+=N[x-1];for(x=1;x<p;x++)N[x-1]===0?N[x-1]=1:N[x-1]=Math.round(U/N[x-1]);return N};var _=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],T=_[9],M=_[13];o.estimateScale=function(p,x){for(var N=x===0?this.calcXnums(p):this.calcYnums(p),D=1+c(N);D<T;)D*=2;for(;D>M;)D--,D/=m(D),D++,D<T&&(D=M);var B=Math.round(D/p);return B>1?B:1};function k(p,x,N){var D=N[8]+N[2]*x[0]+N[5]*x[1];return p[0]=(N[6]+N[0]*x[0]+N[3]*x[1])/D,p[1]=(N[7]+N[1]*x[0]+N[4]*x[1])/D,p}function b(p,x,N){return A(p,x,k,N),p}function A(p,x,N,D){for(var B=[0,0],U=p.shape[0],V=p.shape[1],q=0;q<U;q++)for(var z=0;z<V;z++)N(B,[q,z],D),p.set(q,z,C(x,B[0],B[1]));return p}o.refineCoords=function(p){for(var x=this.dataScaleX,N=this.dataScaleY,D=p[0].shape[0],B=p[0].shape[1],U=Math.floor(p[0].shape[0]*x+1)|0,V=Math.floor(p[0].shape[1]*N+1)|0,q=1+D+1,z=1+B+1,H=w(new Float32Array(q*z),[q,z]),G=[1/x,0,0,0,1/N,0,0,0,1],J=0;J<p.length;++J){this.surface.padField(H,p[J]);var le=w(new Float32Array(U*V),[U,V]);b(le,H,G),p[J]=le}};function g(p,x){for(var N=!1,D=0;D<p.length;D++)if(x===p[D]){N=!0;break}N===!1&&p.push(x)}o.setContourLevels=function(){var p=[[],[],[]],x=[!1,!1,!1],N=!1,D,B,U;for(D=0;D<3;++D)if(this.showContour[D]&&(N=!0,this.contourSize[D]>0&&this.contourStart[D]!==null&&this.contourEnd[D]!==null&&this.contourEnd[D]>this.contourStart[D]))for(x[D]=!0,B=this.contourStart[D];B<this.contourEnd[D];B+=this.contourSize[D])U=B*this.scene.dataScale[D],g(p[D],U);if(N){var V=[[],[],[]];for(D=0;D<3;++D)this.showContour[D]&&(V[D]=x[D]?p[D]:this.scene.contourLevels[D]);this.surface.update({levels:V})}},o.update=function(p){var x=this.scene,N=x.fullSceneLayout,D=this.surface,B=a(p),U=x.dataScale,V=p.z[0].length,q=p._ylength,z=x.contourLevels;this.data=p;var H,G,J,le,ye=[];for(H=0;H<3;H++)for(ye[H]=[],G=0;G<V;G++)ye[H][G]=[];for(G=0;G<V;G++)for(J=0;J<q;J++)ye[0][G][J]=this.getXat(G,J,p.xcalendar,N.xaxis),ye[1][G][J]=this.getYat(G,J,p.ycalendar,N.yaxis),ye[2][G][J]=this.getZat(G,J,p.zcalendar,N.zaxis);if(p.connectgaps)for(p._emptypoints=t(ye[2]),P(ye[2],p._emptypoints),p._interpolatedZ=[],G=0;G<V;G++)for(p._interpolatedZ[G]=[],J=0;J<q;J++)p._interpolatedZ[G][J]=ye[2][G][J];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ye[H][G][J],le==null?ye[H][G][J]=NaN:le=ye[H][G][J]*=U[H];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ye[H][G][J],le!=null&&(this.minValues[H]>le&&(this.minValues[H]=le),this.maxValues[H]<le&&(this.maxValues[H]=le));for(H=0;H<3;H++)this.objectOffset[H]=.5*(this.minValues[H]+this.maxValues[H]);for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)le=ye[H][G][J],le!=null&&(ye[H][G][J]-=this.objectOffset[H]);var de=[w(new Float32Array(V*q),[V,q]),w(new Float32Array(V*q),[V,q]),w(new Float32Array(V*q),[V,q])];for(H=0;H<3;H++)for(G=0;G<V;G++)for(J=0;J<q;J++)de[H].set(G,J,ye[H][G][J]);ye=[];var me={colormap:B,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!p.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:p.opacityscale,opacity:p.opacity},W=i(p);if(me.intensityBounds=[W.min,W.max],p.surfacecolor){var ie=w(new Float32Array(V*q),[V,q]);for(G=0;G<V;G++)for(J=0;J<q;J++)ie.set(G,J,p.surfacecolor[J][G]);de.push(ie)}else me.intensityBounds[0]*=U[2],me.intensityBounds[1]*=U[2];(M<de[0].shape[0]||M<de[0].shape[1])&&(this.refineData=!1),this.refineData===!0&&(this.dataScaleX=this.estimateScale(de[0].shape[0],0),this.dataScaleY=this.estimateScale(de[0].shape[1],1),(this.dataScaleX!==1||this.dataScaleY!==1)&&this.refineCoords(de)),p.surfacecolor&&(me.intensity=de.pop());var se=[!0,!0,!0],ee=["x","y","z"];for(H=0;H<3;++H){var pe=p.contours[ee[H]];se[H]=pe.highlight,me.showContour[H]=pe.show||pe.highlight,me.showContour[H]&&(me.contourProject[H]=[pe.project.x,pe.project.y,pe.project.z],pe.show?(this.showContour[H]=!0,me.levels[H]=z[H],D.highlightColor[H]=me.contourColor[H]=l(pe.color),pe.usecolormap?D.highlightTint[H]=me.contourTint[H]=0:D.highlightTint[H]=me.contourTint[H]=1,me.contourWidth[H]=pe.width,this.contourStart[H]=pe.start,this.contourEnd[H]=pe.end,this.contourSize[H]=pe.size):(this.showContour[H]=!1,this.contourStart[H]=null,this.contourEnd[H]=null,this.contourSize[H]=0),pe.highlight&&(me.dynamicColor[H]=l(pe.highlightcolor),me.dynamicWidth[H]=pe.highlightwidth))}u(B)&&(me.vertexColor=!0),me.objectOffset=this.objectOffset,me.coords=de,D.update(me),D.visible=p.visible,D.enableDynamic=se,D.enableHighlight=se,D.snapToData=!0,"lighting"in p&&(D.ambientLight=p.lighting.ambient,D.diffuseLight=p.lighting.diffuse,D.specularLight=p.lighting.specular,D.roughness=p.lighting.roughness,D.fresnel=p.lighting.fresnel),"lightposition"in p&&(D.lightPosition=[p.lightposition.x,p.lightposition.y,p.lightposition.z])},o.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()};function f(p,x){var N=p.glplot.gl,D=v({gl:N}),B=new s(p,D,x.uid);return D._trace=B,B.update(x),p.glplot.add(D),B}Z.exports=f}}),$K=Ne({"src/traces/surface/index.js"(te,Z){Z.exports={attributes:i6(),supplyDefaults:nN().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:YK(),plot:ZK(),moduleType:"trace",name:"surface",basePlotModule:Rb(),categories:["gl3d","2dMap","showLegend"],meta:{}}}}),KK=Ne({"lib/surface.js"(te,Z){Z.exports=$K()}}),ZS=Ne({"src/traces/mesh3d/attributes.js"(te,Z){var v=Vu(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=i6(),r=ns(),a=co().extendFlat;Z.exports=a({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:C({editType:"calc"}),hovertemplatefallback:P({editType:"calc"}),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("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"}},v("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:a({},t.contours.x.show,{}),color:t.contours.x.color,width:t.contours.x.width,editType:"calc"},lightposition:{x:a({},t.lightposition.x,{dflt:1e5}),y:a({},t.lightposition.y,{dflt:1e5}),z:a({},t.lightposition.z,{dflt:0}),editType:"calc"},lighting:a({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"},t.lighting),hoverinfo:a({},r.hoverinfo,{editType:"calc"}),showlegend:a({},r.showlegend,{dflt:!1})})}}),dR=Ne({"src/traces/isosurface/attributes.js"(te,Z){var v=Vu(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=ZS(),r=ns(),a=co().extendFlat,l=Kc().overrideAll;function i(u){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function s(u){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var o=Z.exports=l(a({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:i(),y:i(),z:i()},caps:{x:s(),y:s(),z:s()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:C(),hovertemplatefallback:P(),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),valuehoverformat:w("value",1),showlegend:a({},r.showlegend,{dflt:!1})},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:t.opacity,lightposition:t.lightposition,lighting:t.lighting,flatshading:t.flatshading,contour:t.contour,hoverinfo:a({},r.hoverinfo)}),"calc","nested");o.flatshading.dflt=!0,o.lighting.facenormalsepsilon.dflt=0,o.x.editType=o.y.editType=o.z.editType=o.value.editType="calc+clearAxisTypes"}}),aN=Ne({"src/traces/isosurface/defaults.js"(te,Z){var v=In(),w=Xo(),C=dR(),P=Ph();function t(a,l,i,s){function o(u,d){return v.coerce(a,l,C,u,d)}r(a,l,i,s,o)}function r(a,l,i,s,o){var u=o("isomin"),d=o("isomax");d!=null&&u!==void 0&&u!==null&&u>d&&(l.isomin=null,l.isomax=null);var h=o("x"),y=o("y"),m=o("z"),E=o("value");if(!h||!h.length||!y||!y.length||!m||!m.length||!E||!E.length){l.visible=!1;return}var c=w.getComponentMethod("calendars","handleTraceDefaults");c(a,l,["x","y","z"],s),o("valuehoverformat"),["x","y","z"].forEach(function(k){o(k+"hoverformat");var b="caps."+k,A=o(b+".show");A&&o(b+".fill");var g="slices."+k,f=o(g+".show");f&&(o(g+".fill"),o(g+".locations"))});var _=o("spaceframe.show");_&&o("spaceframe.fill");var T=o("surface.show");T&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(k){o(k)}),P(a,l,s,o,{prefix:"",cLetter:"c"}),l._length=null}Z.exports={supplyDefaults:t,supplyIsoDefaults:r}}}),vR=Ne({"src/traces/streamtube/calc.js"(te,Z){var v=In(),w=Nd();function C(a,l){l._len=Math.min(l.u.length,l.v.length,l.w.length,l.x.length,l.y.length,l.z.length),l._u=r(l.u,l._len),l._v=r(l.v,l._len),l._w=r(l.w,l._len),l._x=r(l.x,l._len),l._y=r(l.y,l._len),l._z=r(l.z,l._len);var i=P(l);l._gridFill=i.fill,l._Xs=i.Xs,l._Ys=i.Ys,l._Zs=i.Zs,l._len=i.len;var s=0,o,u,d;l.starts&&(o=r(l.starts.x||[]),u=r(l.starts.y||[]),d=r(l.starts.z||[]),s=Math.min(o.length,u.length,d.length)),l._startsX=o||[],l._startsY=u||[],l._startsZ=d||[];var h=0,y=1/0,m;for(m=0;m<l._len;m++){var E=l._u[m],c=l._v[m],_=l._w[m],T=Math.sqrt(E*E+c*c+_*_);h=Math.max(h,T),y=Math.min(y,T)}for(w(a,l,{vals:[y,h],containerStr:"",cLetter:"c"}),m=0;m<s;m++){var M=o[m];i.xMax=Math.max(i.xMax,M),i.xMin=Math.min(i.xMin,M);var k=u[m];i.yMax=Math.max(i.yMax,k),i.yMin=Math.min(i.yMin,k);var b=d[m];i.zMax=Math.max(i.zMax,b),i.zMin=Math.min(i.zMin,b)}l._slen=s,l._normMax=h,l._xbnds=[i.xMin,i.xMax],l._ybnds=[i.yMin,i.yMax],l._zbnds=[i.zMin,i.zMax]}function P(a){var l=a._x,i=a._y,s=a._z,o=a._len,u,d,h,y=-1/0,m=1/0,E=-1/0,c=1/0,_=-1/0,T=1/0,M="",k,b,A,g,f,p,x,N,D;for(o&&(g=l[0],p=i[0],N=s[0]),o>1&&(f=l[o-1],x=i[o-1],D=s[o-1]),u=0;u<o;u++)y=Math.max(y,l[u]),m=Math.min(m,l[u]),E=Math.max(E,i[u]),c=Math.min(c,i[u]),_=Math.max(_,s[u]),T=Math.min(T,s[u]),!k&&l[u]!==g&&(k=!0,M+="x"),!b&&i[u]!==p&&(b=!0,M+="y"),!A&&s[u]!==N&&(A=!0,M+="z");k||(M+="x"),b||(M+="y"),A||(M+="z");var B=t(a._x),U=t(a._y),V=t(a._z);M=M.replace("x",(g>f?"-":"+")+"x"),M=M.replace("y",(p>x?"-":"+")+"y"),M=M.replace("z",(N>D?"-":"+")+"z");var q=function(){o=0,B=[],U=[],V=[]};(!o||o<B.length*U.length*V.length)&&q();var z=function(Le){return Le==="x"?l:Le==="y"?i:s},H=function(Le){return Le==="x"?B:Le==="y"?U:V},G=function(Le){return Le[o-1]<Le[0]?-1:1},J=z(M[1]),le=z(M[3]),ye=z(M[5]),de=H(M[1]).length,me=H(M[3]).length,W=H(M[5]).length,ie=!1,se=function(Le,ze,Ge){return de*(me*Le+ze)+Ge},ee=G(z(M[1])),pe=G(z(M[3])),oe=G(z(M[5]));for(u=0;u<W-1;u++){for(d=0;d<me-1;d++){for(h=0;h<de-1;h++){var Y=se(u,d,h),ce=se(u,d,h+1),ue=se(u,d+1,h),_e=se(u+1,d,h);if((!(J[Y]*ee<J[ce]*ee)||!(le[Y]*pe<le[ue]*pe)||!(ye[Y]*oe<ye[_e]*oe))&&(ie=!0),ie)break}if(ie)break}if(ie)break}return ie&&(v.warn("Encountered arbitrary coordinates! Unable to input data grid."),q()),{xMin:m,yMin:c,zMin:T,xMax:y,yMax:E,zMax:_,Xs:B,Ys:U,Zs:V,len:o,fill:M}}function t(a){return v.distinctVals(a).vals}function r(a,l){if(l===void 0&&(l=a.length),v.isTypedArray(a))return a.subarray(0,l);for(var i=[],s=0;s<l;s++)i[s]=+a[s];return i}Z.exports={calc:C,filter:r,processGrid:P}}}),iN=Ne({"src/traces/isosurface/calc.js"(te,Z){var v=Nd(),w=vR().processGrid,C=vR().filter;Z.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=C(r.x,r._len),r._y=C(r.y,r._len),r._z=C(r.z,r._len),r._value=C(r.value,r._len);var a=w(r);r._gridFill=a.fill,r._Xs=a.Xs,r._Ys=a.Ys,r._Zs=a.Zs,r._len=a.len;for(var l=1/0,i=-1/0,s=0;s<r._len;s++){var o=r._value[s];l=Math.min(l,o),i=Math.max(i,o)}r._minValues=l,r._maxValues=i,r._vMin=r.isomin===void 0||r.isomin===null?l:r.isomin,r._vMax=r.isomax===void 0||r.isomax===null?i:r.isomax,v(t,r,{vals:[r._vMin,r._vMax],containerStr:"",cLetter:"c"})}}}),$S=Ne({"src/plots/gl3d/zip3.js"(te,Z){Z.exports=function(w,C,P,t){t=t||w.length;for(var r=new Array(t),a=0;a<t;a++)r[a]=[w[a],C[a],P[a]];return r}}}),pR=Ne({"src/traces/isosurface/convert.js"(te,Z){var v=Vv().gl_mesh3d,w=k_().parseColorScale,C=In().isArrayOrTypedArray,P=C_(),t=Dc().extractOpts,r=$S(),a=function(d,h){for(var y=h.length-1;y>0;y--){var m=Math.min(h[y],h[y-1]),E=Math.max(h[y],h[y-1]);if(E>m&&m<d&&d<=E)return{id:y,distRatio:(E-d)/(E-m)}}return{id:0,distRatio:0}};function l(d,h,y){this.scene=d,this.uid=y,this.mesh=h,this.name="",this.data=null,this.showContour=!1}var i=l.prototype;i.handlePick=function(d){if(d.object===this.mesh){var h=d.data.index,y=this.data._meshX[h],m=this.data._meshY[h],E=this.data._meshZ[h],c=this.data._Ys.length,_=this.data._Zs.length,T=a(y,this.data._Xs).id,M=a(m,this.data._Ys).id,k=a(E,this.data._Zs).id,b=d.index=k+_*M+_*c*T;d.traceCoordinate=[this.data._meshX[b],this.data._meshY[b],this.data._meshZ[b],this.data._value[b]];var A=this.data.hovertext||this.data.text;return C(A)&&A[b]!==void 0?d.textLabel=A[b]:A&&(d.textLabel=A),!0}},i.update=function(d){var h=this.scene,y=h.fullSceneLayout;this.data=o(d);function m(M,k,b,A){return k.map(function(g){return M.d2l(g,0,A)*b})}var E=r(m(y.xaxis,d._meshX,h.dataScale[0],d.xcalendar),m(y.yaxis,d._meshY,h.dataScale[1],d.ycalendar),m(y.zaxis,d._meshZ,h.dataScale[2],d.zcalendar)),c=r(d._meshI,d._meshJ,d._meshK),_={positions:E,cells:c,lightPosition:[d.lightposition.x,d.lightposition.y,d.lightposition.z],ambient:d.lighting.ambient,diffuse:d.lighting.diffuse,specular:d.lighting.specular,roughness:d.lighting.roughness,fresnel:d.lighting.fresnel,vertexNormalsEpsilon:d.lighting.vertexnormalsepsilon,faceNormalsEpsilon:d.lighting.facenormalsepsilon,opacity:d.opacity,contourEnable:d.contour.show,contourColor:P(d.contour.color).slice(0,3),contourWidth:d.contour.width,useFacetNormals:d.flatshading},T=t(d);_.vertexIntensity=d._meshIntensity,_.vertexIntensityBounds=[T.min,T.max],_.colormap=w(d),this.mesh.update(_)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var s=["xyz","xzy","yxz","yzx","zxy","zyx"];function o(d){d._meshI=[],d._meshJ=[],d._meshK=[];var h=d.surface.show,y=d.spaceframe.show,m=d.surface.fill,E=d.spaceframe.fill,c=!1,_=!1,T=0,M,k,b=d._Xs,A=d._Ys,g=d._Zs,f=b.length,p=A.length,x=g.length,N=s.indexOf(d._gridFill.replace(/-/g,"").replace(/\+/g,"")),D=function(Dt,$e,ot){switch(N){case 5:return ot+x*$e+x*p*Dt;case 4:return ot+x*Dt+x*f*$e;case 3:return $e+p*ot+p*x*Dt;case 2:return $e+p*Dt+p*f*ot;case 1:return Dt+f*ot+f*x*$e;default:return Dt+f*$e+f*p*ot}},B=d._minValues,U=d._maxValues,V=d._vMin,q=d._vMax,z,H,G,J;function le(Dt,$e,ot){for(var De=J.length,Ee=k;Ee<De;Ee++)if(Dt===z[Ee]&&$e===H[Ee]&&ot===G[Ee])return Ee;return-1}function ye(){k=M}function de(){z=[],H=[],G=[],J=[],M=0,ye()}function me(Dt,$e,ot,De){return z.push(Dt),H.push($e),G.push(ot),J.push(De),M++,M-1}function W(Dt,$e,ot){return d._meshI.push(Dt),d._meshJ.push($e),d._meshK.push(ot),T++,T-1}function ie(Dt,$e,ot){for(var De=[],Ee=0;Ee<Dt.length;Ee++)De[Ee]=(Dt[Ee]+$e[Ee]+ot[Ee])/3;return De}function se(Dt,$e,ot){for(var De=[],Ee=0;Ee<Dt.length;Ee++)De[Ee]=Dt[Ee]*(1-ot)+ot*$e[Ee];return De}var ee;function pe(Dt){ee=Dt}function oe(Dt,$e){var ot=Dt[0],De=Dt[1],Ee=Dt[2],Ae=ie(ot,De,Ee),Ie=Math.sqrt(1-ee),tt=se(Ae,ot,Ie),st=se(Ae,De,Ie),Ft=se(Ae,Ee,Ie),Nt=$e[0],Xt=$e[1],lr=$e[2];return{xyzv:[[ot,De,st],[st,tt,ot],[De,Ee,Ft],[Ft,st,De],[Ee,ot,tt],[tt,Ft,Ee]],abc:[[Nt,Xt,-1],[-1,-1,Nt],[Xt,lr,-1],[-1,-1,Xt],[lr,Nt,-1],[-1,-1,lr]]}}function Y(Dt,$e){return Dt==="all"||Dt===null?!0:Dt.indexOf($e)>-1}function ce(Dt,$e){return Dt===null?$e:Dt}function ue(Dt,$e,ot){ye();var De=[$e],Ee=[ot];if(ee>=1)De=[$e],Ee=[ot];else if(ee>0){var Ae=oe($e,ot);De=Ae.xyzv,Ee=Ae.abc}for(var Ie=0;Ie<De.length;Ie++){$e=De[Ie],ot=Ee[Ie];for(var tt=[],st=0;st<3;st++){var Ft=$e[st][0],Nt=$e[st][1],Xt=$e[st][2],lr=$e[st][3],Rr=ot[st]>-1?ot[st]:le(Ft,Nt,Xt);Rr>-1?tt[st]=Rr:tt[st]=me(Ft,Nt,Xt,ce(Dt,lr))}W(tt[0],tt[1],tt[2])}}function _e(Dt,$e,ot){var De=function(Ee,Ae,Ie){ue(Dt,[$e[Ee],$e[Ae],$e[Ie]],[ot[Ee],ot[Ae],ot[Ie]])};De(0,1,2),De(2,3,0)}function Le(Dt,$e,ot){var De=function(Ee,Ae,Ie){ue(Dt,[$e[Ee],$e[Ae],$e[Ie]],[ot[Ee],ot[Ae],ot[Ie]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function ze(Dt,$e,ot,De){var Ee=Dt[3];Ee<ot&&(Ee=ot),Ee>De&&(Ee=De);for(var Ae=(Dt[3]-Ee)/(Dt[3]-$e[3]+1e-9),Ie=[],tt=0;tt<4;tt++)Ie[tt]=(1-Ae)*Dt[tt]+Ae*$e[tt];return Ie}function Ge(Dt,$e,ot){return Dt>=$e&&Dt<=ot}function Ve(Dt){var $e=.001*(q-V);return Dt>=V-$e&&Dt<=q+$e}function rt(Dt){for(var $e=[],ot=0;ot<4;ot++){var De=Dt[ot];$e.push([d._x[De],d._y[De],d._z[De],d._value[De]])}return $e}var pt=3;function gt(Dt,$e,ot,De,Ee,Ae){Ae||(Ae=1),ot=[-1,-1,-1];var Ie=!1,tt=[Ge($e[0][3],De,Ee),Ge($e[1][3],De,Ee),Ge($e[2][3],De,Ee)];if(!tt[0]&&!tt[1]&&!tt[2])return!1;var st=function(Nt,Xt,lr){return Ve(Xt[0][3])&&Ve(Xt[1][3])&&Ve(Xt[2][3])?(ue(Nt,Xt,lr),!0):Ae<pt?gt(Nt,Xt,lr,V,q,++Ae):!1};if(tt[0]&&tt[1]&&tt[2])return st(Dt,$e,ot)||Ie;var Ft=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(Nt){if(tt[Nt[0]]&&tt[Nt[1]]&&!tt[Nt[2]]){var Xt=$e[Nt[0]],lr=$e[Nt[1]],Rr=$e[Nt[2]],Mr=ze(Rr,Xt,De,Ee),Sr=ze(Rr,lr,De,Ee);Ie=st(Dt,[Sr,Mr,Xt],[-1,-1,ot[Nt[0]]])||Ie,Ie=st(Dt,[Xt,lr,Sr],[ot[Nt[0]],ot[Nt[1]],-1])||Ie,Ft=!0}}),Ft||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(Nt){if(tt[Nt[0]]&&!tt[Nt[1]]&&!tt[Nt[2]]){var Xt=$e[Nt[0]],lr=$e[Nt[1]],Rr=$e[Nt[2]],Mr=ze(lr,Xt,De,Ee),Sr=ze(Rr,Xt,De,Ee);Ie=st(Dt,[Sr,Mr,Xt],[-1,-1,ot[Nt[0]]])||Ie,Ft=!0}}),Ie}function ht(Dt,$e,ot,De){var Ee=!1,Ae=rt($e),Ie=[Ge(Ae[0][3],ot,De),Ge(Ae[1][3],ot,De),Ge(Ae[2][3],ot,De),Ge(Ae[3][3],ot,De)];if(!Ie[0]&&!Ie[1]&&!Ie[2]&&!Ie[3])return Ee;if(Ie[0]&&Ie[1]&&Ie[2]&&Ie[3])return _&&(Ee=Le(Dt,Ae,$e)||Ee),Ee;var tt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(st){if(Ie[st[0]]&&Ie[st[1]]&&Ie[st[2]]&&!Ie[st[3]]){var Ft=Ae[st[0]],Nt=Ae[st[1]],Xt=Ae[st[2]],lr=Ae[st[3]];if(_)Ee=ue(Dt,[Ft,Nt,Xt],[$e[st[0]],$e[st[1]],$e[st[2]]])||Ee;else{var Rr=ze(lr,Ft,ot,De),Mr=ze(lr,Nt,ot,De),Sr=ze(lr,Xt,ot,De);Ee=ue(null,[Rr,Mr,Sr],[-1,-1,-1])||Ee}tt=!0}}),tt||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(st){if(Ie[st[0]]&&Ie[st[1]]&&!Ie[st[2]]&&!Ie[st[3]]){var Ft=Ae[st[0]],Nt=Ae[st[1]],Xt=Ae[st[2]],lr=Ae[st[3]],Rr=ze(Xt,Ft,ot,De),Mr=ze(Xt,Nt,ot,De),Sr=ze(lr,Nt,ot,De),Kr=ze(lr,Ft,ot,De);_?(Ee=ue(Dt,[Ft,Kr,Rr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Dt,[Nt,Mr,Sr],[$e[st[1]],-1,-1])||Ee):Ee=_e(null,[Rr,Mr,Sr,Kr],[-1,-1,-1,-1])||Ee,tt=!0}}),tt)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(st){if(Ie[st[0]]&&!Ie[st[1]]&&!Ie[st[2]]&&!Ie[st[3]]){var Ft=Ae[st[0]],Nt=Ae[st[1]],Xt=Ae[st[2]],lr=Ae[st[3]],Rr=ze(Nt,Ft,ot,De),Mr=ze(Xt,Ft,ot,De),Sr=ze(lr,Ft,ot,De);_?(Ee=ue(Dt,[Ft,Rr,Mr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Dt,[Ft,Mr,Sr],[$e[st[0]],-1,-1])||Ee,Ee=ue(Dt,[Ft,Sr,Rr],[$e[st[0]],-1,-1])||Ee):Ee=ue(null,[Rr,Mr,Sr],[-1,-1,-1])||Ee,tt=!0}}),Ee}function lt(Dt,$e,ot,De,Ee,Ae,Ie,tt,st,Ft,Nt){var Xt=!1;return c&&(Y(Dt,"A")&&(Xt=ht(null,[$e,ot,De,Ae],Ft,Nt)||Xt),Y(Dt,"B")&&(Xt=ht(null,[ot,De,Ee,st],Ft,Nt)||Xt),Y(Dt,"C")&&(Xt=ht(null,[ot,Ae,Ie,st],Ft,Nt)||Xt),Y(Dt,"D")&&(Xt=ht(null,[De,Ae,tt,st],Ft,Nt)||Xt),Y(Dt,"E")&&(Xt=ht(null,[ot,De,Ae,st],Ft,Nt)||Xt)),_&&(Xt=ht(Dt,[ot,De,Ae,st],Ft,Nt)||Xt),Xt}function Fe(Dt,$e,ot,De,Ee,Ae,Ie,tt){return[tt[0]===!0?!0:gt(Dt,rt([$e,ot,De]),[$e,ot,De],Ae,Ie),tt[1]===!0?!0:gt(Dt,rt([De,Ee,$e]),[De,Ee,$e],Ae,Ie)]}function Pe(Dt,$e,ot,De,Ee,Ae,Ie,tt,st){return tt?Fe(Dt,$e,ot,Ee,De,Ae,Ie,st):Fe(Dt,ot,Ee,De,$e,Ae,Ie,st)}function be(Dt,$e,ot,De,Ee,Ae,Ie){var tt=!1,st,Ft,Nt,Xt,lr=function(){tt=gt(Dt,[st,Ft,Nt],[-1,-1,-1],Ee,Ae)||tt,tt=gt(Dt,[Nt,Xt,st],[-1,-1,-1],Ee,Ae)||tt},Rr=Ie[0],Mr=Ie[1],Sr=Ie[2];return Rr&&(st=se(rt([D($e,ot-0,De-0)])[0],rt([D($e-1,ot-0,De-0)])[0],Rr),Ft=se(rt([D($e,ot-0,De-1)])[0],rt([D($e-1,ot-0,De-1)])[0],Rr),Nt=se(rt([D($e,ot-1,De-1)])[0],rt([D($e-1,ot-1,De-1)])[0],Rr),Xt=se(rt([D($e,ot-1,De-0)])[0],rt([D($e-1,ot-1,De-0)])[0],Rr),lr()),Mr&&(st=se(rt([D($e-0,ot,De-0)])[0],rt([D($e-0,ot-1,De-0)])[0],Mr),Ft=se(rt([D($e-0,ot,De-1)])[0],rt([D($e-0,ot-1,De-1)])[0],Mr),Nt=se(rt([D($e-1,ot,De-1)])[0],rt([D($e-1,ot-1,De-1)])[0],Mr),Xt=se(rt([D($e-1,ot,De-0)])[0],rt([D($e-1,ot-1,De-0)])[0],Mr),lr()),Sr&&(st=se(rt([D($e-0,ot-0,De)])[0],rt([D($e-0,ot-0,De-1)])[0],Sr),Ft=se(rt([D($e-0,ot-1,De)])[0],rt([D($e-0,ot-1,De-1)])[0],Sr),Nt=se(rt([D($e-1,ot-1,De)])[0],rt([D($e-1,ot-1,De-1)])[0],Sr),Xt=se(rt([D($e-1,ot-0,De)])[0],rt([D($e-1,ot-0,De-1)])[0],Sr),lr()),tt}function Ye(Dt,$e,ot,De,Ee,Ae,Ie,tt,st,Ft,Nt,Xt){var lr=Dt;return Xt?(c&&Dt==="even"&&(lr=null),lt(lr,$e,ot,De,Ee,Ae,Ie,tt,st,Ft,Nt)):(c&&Dt==="odd"&&(lr=null),lt(lr,st,tt,Ie,Ae,Ee,De,ot,$e,Ft,Nt))}function mt(Dt,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Ft=1;Ft<x;Ft++)for(var Nt=1;Nt<p;Nt++)Ae.push(Pe(Dt,D(st,Nt-1,Ft-1),D(st,Nt-1,Ft),D(st,Nt,Ft-1),D(st,Nt,Ft),ot,De,(st+Nt+Ft)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function bt(Dt,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Ft=1;Ft<f;Ft++)for(var Nt=1;Nt<x;Nt++)Ae.push(Pe(Dt,D(Ft-1,st,Nt-1),D(Ft,st,Nt-1),D(Ft-1,st,Nt),D(Ft,st,Nt),ot,De,(Ft+st+Nt)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function ft(Dt,$e,ot,De,Ee){for(var Ae=[],Ie=0,tt=0;tt<$e.length;tt++)for(var st=$e[tt],Ft=1;Ft<p;Ft++)for(var Nt=1;Nt<f;Nt++)Ae.push(Pe(Dt,D(Nt-1,Ft-1,st),D(Nt-1,Ft,st),D(Nt,Ft-1,st),D(Nt,Ft,st),ot,De,(Nt+Ft+st)%2,Ee&&Ee[Ie]?Ee[Ie]:[])),Ie++;return Ae}function Wt(Dt,$e,ot){for(var De=1;De<x;De++)for(var Ee=1;Ee<p;Ee++)for(var Ae=1;Ae<f;Ae++)Ye(Dt,D(Ae-1,Ee-1,De-1),D(Ae-1,Ee-1,De),D(Ae-1,Ee,De-1),D(Ae-1,Ee,De),D(Ae,Ee-1,De-1),D(Ae,Ee-1,De),D(Ae,Ee,De-1),D(Ae,Ee,De),$e,ot,(Ae+Ee+De)%2)}function Zt(Dt,$e,ot){_=!0,Wt(Dt,$e,ot),_=!1}function cr(Dt,$e,ot){c=!0,Wt(Dt,$e,ot),c=!1}function pr(Dt,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Ft=$e[st],Nt=1;Nt<x;Nt++)for(var Xt=1;Xt<p;Xt++)Ie.push(be(Dt,Ft,Xt,Nt,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function Br(Dt,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Ft=$e[st],Nt=1;Nt<f;Nt++)for(var Xt=1;Xt<x;Xt++)Ie.push(be(Dt,Nt,Ft,Xt,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function Fr(Dt,$e,ot,De,Ee,Ae){for(var Ie=[],tt=0,st=0;st<$e.length;st++)for(var Ft=$e[st],Nt=1;Nt<p;Nt++)for(var Xt=1;Xt<f;Xt++)Ie.push(be(Dt,Xt,Nt,Ft,ot,De,Ee[st],Ae&&Ae[tt]?Ae[tt]:[])),tt++;return Ie}function cn(Dt,$e){for(var ot=[],De=Dt;De<$e;De++)ot.push(De);return ot}function Nr(){for(var Dt=0;Dt<f;Dt++)for(var $e=0;$e<p;$e++)for(var ot=0;ot<x;ot++){var De=D(Dt,$e,ot);me(d._x[De],d._y[De],d._z[De],d._value[De])}}function Jr(){de(),Nr();var Dt=null;if(y&&E&&(pe(E),Zt(Dt,V,q)),h&&m){pe(m);for(var $e=d.surface.pattern,ot=d.surface.count,De=0;De<ot;De++){var Ee=ot===1?.5:De/(ot-1),Ae=(1-Ee)*V+Ee*q,Ie=Math.abs(Ae-B),tt=Math.abs(Ae-U),st=Ie>tt?[B,Ae]:[Ae,U];cr($e,st[0],st[1])}}var Ft=[[Math.min(V,U),Math.max(V,U)],[Math.min(B,q),Math.max(B,q)]];["x","y","z"].forEach(function(Nt){for(var Xt=[],lr=0;lr<Ft.length;lr++){var Rr=0,Mr=Ft[lr][0],Sr=Ft[lr][1],Kr=d.slices[Nt];if(Kr.show&&Kr.fill){pe(Kr.fill);var qn=[],ha=[],ia=[];if(Kr.locations.length)for(var xa=0;xa<Kr.locations.length;xa++){var ba=a(Kr.locations[xa],Nt==="x"?b:Nt==="y"?A:g);ba.distRatio===0?qn.push(ba.id):ba.id>0&&(ha.push(ba.id),Nt==="x"?ia.push([ba.distRatio,0,0]):Nt==="y"?ia.push([0,ba.distRatio,0]):ia.push([0,0,ba.distRatio]))}else Nt==="x"?qn=cn(1,f-1):Nt==="y"?qn=cn(1,p-1):qn=cn(1,x-1);ha.length>0&&(Nt==="x"?Xt[Rr]=pr(Dt,ha,Mr,Sr,ia,Xt[Rr]):Nt==="y"?Xt[Rr]=Br(Dt,ha,Mr,Sr,ia,Xt[Rr]):Xt[Rr]=Fr(Dt,ha,Mr,Sr,ia,Xt[Rr]),Rr++),qn.length>0&&(Nt==="x"?Xt[Rr]=mt(Dt,qn,Mr,Sr,Xt[Rr]):Nt==="y"?Xt[Rr]=bt(Dt,qn,Mr,Sr,Xt[Rr]):Xt[Rr]=ft(Dt,qn,Mr,Sr,Xt[Rr]),Rr++)}var ea=d.caps[Nt];ea.show&&ea.fill&&(pe(ea.fill),Nt==="x"?Xt[Rr]=mt(Dt,[0,f-1],Mr,Sr,Xt[Rr]):Nt==="y"?Xt[Rr]=bt(Dt,[0,p-1],Mr,Sr,Xt[Rr]):Xt[Rr]=ft(Dt,[0,x-1],Mr,Sr,Xt[Rr]),Rr++)}}),T===0&&de(),d._meshX=z,d._meshY=H,d._meshZ=G,d._meshIntensity=J,d._Xs=b,d._Ys=A,d._Zs=g}return Jr(),d}function u(d,h){var y=d.glplot.gl,m=v({gl:y}),E=new l(d,m,h.uid);return m._trace=E,E.update(h),d.glplot.add(m),E}Z.exports={findNearestOnAxis:a,generateIsoMeshes:o,createIsosurfaceTrace:u}}}),JK=Ne({"src/traces/isosurface/index.js"(te,Z){Z.exports={attributes:dR(),supplyDefaults:aN().supplyDefaults,calc:iN(),colorbar:{min:"cmin",max:"cmax"},plot:pR().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:Rb(),categories:["gl3d","showLegend"],meta:{}}}}),QK=Ne({"lib/isosurface.js"(te,Z){Z.exports=JK()}}),oN=Ne({"src/traces/volume/attributes.js"(te,Z){var v=Vu(),w=dR(),C=i6(),P=ns(),t=co().extendFlat,r=Kc().overrideAll,a=Z.exports=r(t({x:w.x,y:w.y,z:w.z,value:w.value,isomin:w.isomin,isomax:w.isomax,surface:w.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:w.slices,caps:w.caps,text:w.text,hovertext:w.hovertext,xhoverformat:w.xhoverformat,yhoverformat:w.yhoverformat,zhoverformat:w.zhoverformat,valuehoverformat:w.valuehoverformat,hovertemplate:w.hovertemplate,hovertemplatefallback:w.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:w.colorbar,opacity:w.opacity,opacityscale:C.opacityscale,lightposition:w.lightposition,lighting:w.lighting,flatshading:w.flatshading,contour:w.contour,hoverinfo:t({},P.hoverinfo),showlegend:t({},P.showlegend,{dflt:!1})}),"calc","nested");a.x.editType=a.y.editType=a.z.editType=a.value.editType="calc+clearAxisTypes"}}),eJ=Ne({"src/traces/volume/defaults.js"(te,Z){var v=In(),w=oN(),C=aN().supplyIsoDefaults,P=nN().opacityscaleDefaults;Z.exports=function(r,a,l,i){function s(o,u){return v.coerce(r,a,w,o,u)}C(r,a,l,i,s),P(r,a,i,s)}}}),tJ=Ne({"src/traces/volume/convert.js"(te,Z){var v=Vv().gl_mesh3d,w=k_().parseColorScale,C=In().isArrayOrTypedArray,P=C_(),t=Dc().extractOpts,r=$S(),a=pR().findNearestOnAxis,l=pR().generateIsoMeshes;function i(u,d,h){this.scene=u,this.uid=h,this.mesh=d,this.name="",this.data=null,this.showContour=!1}var s=i.prototype;s.handlePick=function(u){if(u.object===this.mesh){var d=u.data.index,h=this.data._meshX[d],y=this.data._meshY[d],m=this.data._meshZ[d],E=this.data._Ys.length,c=this.data._Zs.length,_=a(h,this.data._Xs).id,T=a(y,this.data._Ys).id,M=a(m,this.data._Zs).id,k=u.index=M+c*T+c*E*_;u.traceCoordinate=[this.data._meshX[k],this.data._meshY[k],this.data._meshZ[k],this.data._value[k]];var b=this.data.hovertext||this.data.text;return C(b)&&b[k]!==void 0?u.textLabel=b[k]:b&&(u.textLabel=b),!0}},s.update=function(u){var d=this.scene,h=d.fullSceneLayout;this.data=l(u);function y(T,M,k,b){return M.map(function(A){return T.d2l(A,0,b)*k})}var m=r(y(h.xaxis,u._meshX,d.dataScale[0],u.xcalendar),y(h.yaxis,u._meshY,d.dataScale[1],u.ycalendar),y(h.zaxis,u._meshZ,d.dataScale[2],u.zcalendar)),E=r(u._meshI,u._meshJ,u._meshK),c={positions:m,cells:E,lightPosition:[u.lightposition.x,u.lightposition.y,u.lightposition.z],ambient:u.lighting.ambient,diffuse:u.lighting.diffuse,specular:u.lighting.specular,roughness:u.lighting.roughness,fresnel:u.lighting.fresnel,vertexNormalsEpsilon:u.lighting.vertexnormalsepsilon,faceNormalsEpsilon:u.lighting.facenormalsepsilon,opacity:u.opacity,opacityscale:u.opacityscale,contourEnable:u.contour.show,contourColor:P(u.contour.color).slice(0,3),contourWidth:u.contour.width,useFacetNormals:u.flatshading},_=t(u);c.vertexIntensity=u._meshIntensity,c.vertexIntensityBounds=[_.min,_.max],c.colormap=w(u),this.mesh.update(c)},s.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(u,d){var h=u.glplot.gl,y=v({gl:h}),m=new i(u,y,d.uid);return y._trace=m,m.update(d),u.glplot.add(y),m}Z.exports=o}}),rJ=Ne({"src/traces/volume/index.js"(te,Z){Z.exports={attributes:oN(),supplyDefaults:eJ(),calc:iN(),colorbar:{min:"cmin",max:"cmax"},plot:tJ(),moduleType:"trace",name:"volume",basePlotModule:Rb(),categories:["gl3d","showLegend"],meta:{}}}}),nJ=Ne({"lib/volume.js"(te,Z){Z.exports=rJ()}}),aJ=Ne({"src/traces/mesh3d/defaults.js"(te,Z){var v=Xo(),w=In(),C=Ph(),P=ZS();Z.exports=function(r,a,l,i){function s(y,m){return w.coerce(r,a,P,y,m)}function o(y){var m=y.map(function(E){var c=s(E);return c&&w.isArrayOrTypedArray(c)?c:null});return m.every(function(E){return E&&E.length===m[0].length})&&m}var u=o(["x","y","z"]);if(!u){a.visible=!1;return}if(o(["i","j","k"]),a.i&&(!a.j||!a.k)||a.j&&(!a.k||!a.i)||a.k&&(!a.i||!a.j)){a.visible=!1;return}var d=v.getComponentMethod("calendars","handleTraceDefaults");d(r,a,["x","y","z"],i),["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(y){s(y)});var h=s("contour.show");h&&(s("contour.color"),s("contour.width")),"intensity"in r?(s("intensity"),s("intensitymode"),C(r,a,i,s,{prefix:"",cLetter:"c"})):(a.showscale=!1,"facecolor"in r?s("facecolor"):"vertexcolor"in r?s("vertexcolor"):s("color",l)),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),a._length=null}}}),iJ=Ne({"src/traces/mesh3d/calc.js"(te,Z){var v=Nd();Z.exports=function(C,P){P.intensity&&v(C,P,{vals:P.intensity,containerStr:"",cLetter:"c"})}}}),oJ=Ne({"src/traces/mesh3d/convert.js"(te,Z){var v=Vv().gl_mesh3d,w=Vv().delaunay_triangulate,C=Vv().alpha_shape,P=Vv().convex_hull,t=k_().parseColorScale,r=In().isArrayOrTypedArray,a=C_(),l=Dc().extractOpts,i=$S();function s(c,_,T){this.scene=c,this.uid=T,this.mesh=_,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=s.prototype;o.handlePick=function(c){if(c.object===this.mesh){var _=c.index=c.data.index;c.data._cellCenter?c.traceCoordinate=c.data.dataCoordinate:c.traceCoordinate=[this.data.x[_],this.data.y[_],this.data.z[_]];var T=this.data.hovertext||this.data.text;return r(T)&&T[_]!==void 0?c.textLabel=T[_]:T&&(c.textLabel=T),!0}};function u(c){for(var _=[],T=c.length,M=0;M<T;M++)_[M]=a(c[M]);return _}function d(c,_,T,M){for(var k=[],b=_.length,A=0;A<b;A++)k[A]=c.d2l(_[A],0,M)*T;return k}function h(c){for(var _=[],T=c.length,M=0;M<T;M++)_[M]=Math.round(c[M]);return _}function y(c,_){for(var T=["x","y","z"].indexOf(c),M=[],k=_.length,b=0;b<k;b++)M[b]=[_[b][(T+1)%3],_[b][(T+2)%3]];return w(M)}function m(c,_){for(var T=c.length,M=0;M<T;M++)if(c[M]<=-.5||c[M]>=_-.5)return!1;return!0}o.update=function(c){var _=this.scene,T=_.fullSceneLayout;this.data=c;var M=c.x.length,k=i(d(T.xaxis,c.x,_.dataScale[0],c.xcalendar),d(T.yaxis,c.y,_.dataScale[1],c.ycalendar),d(T.zaxis,c.z,_.dataScale[2],c.zcalendar)),b;if(c.i&&c.j&&c.k){if(c.i.length!==c.j.length||c.j.length!==c.k.length||!m(c.i,M)||!m(c.j,M)||!m(c.k,M))return;b=i(h(c.i),h(c.j),h(c.k))}else c.alphahull===0?b=P(k):c.alphahull>0?b=C(c.alphahull,k):b=y(c.delaunayaxis,k);var A={positions:k,cells:b,lightPosition:[c.lightposition.x,c.lightposition.y,c.lightposition.z],ambient:c.lighting.ambient,diffuse:c.lighting.diffuse,specular:c.lighting.specular,roughness:c.lighting.roughness,fresnel:c.lighting.fresnel,vertexNormalsEpsilon:c.lighting.vertexnormalsepsilon,faceNormalsEpsilon:c.lighting.facenormalsepsilon,opacity:c.opacity,contourEnable:c.contour.show,contourColor:a(c.contour.color).slice(0,3),contourWidth:c.contour.width,useFacetNormals:c.flatshading};if(c.intensity){var g=l(c);this.color="#fff";var f=c.intensitymode;A[f+"Intensity"]=c.intensity,A[f+"IntensityBounds"]=[g.min,g.max],A.colormap=t(c)}else c.vertexcolor?(this.color=c.vertexcolor[0],A.vertexColors=u(c.vertexcolor)):c.facecolor?(this.color=c.facecolor[0],A.cellColors=u(c.facecolor)):(this.color=c.color,A.meshColor=a(c.color));this.mesh.update(A)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function E(c,_){var T=c.glplot.gl,M=v({gl:T}),k=new s(c,M,_.uid);return M._trace=k,k.update(_),c.glplot.add(M),k}Z.exports=E}}),sJ=Ne({"src/traces/mesh3d/index.js"(te,Z){Z.exports={attributes:ZS(),supplyDefaults:aJ(),calc:iJ(),colorbar:{min:"cmin",max:"cmax"},plot:oJ(),moduleType:"trace",name:"mesh3d",basePlotModule:Rb(),categories:["gl3d","showLegend"],meta:{}}}}),lJ=Ne({"lib/mesh3d.js"(te,Z){Z.exports=sJ()}}),sN=Ne({"src/traces/cone/attributes.js"(te,Z){var v=Vu(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=ZS(),r=ns(),a=co().extendFlat,l={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:C({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:P({editType:"calc"}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:a({},r.showlegend,{dflt:!1})};a(l,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var i=["opacity","lightposition","lighting"];i.forEach(function(s){l[s]=t[s]}),l.hoverinfo=a({},r.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=l}}),uJ=Ne({"src/traces/cone/defaults.js"(te,Z){var v=In(),w=Ph(),C=sN();Z.exports=function(t,r,a,l){function i(E,c){return v.coerce(t,r,C,E,c)}var s=i("u"),o=i("v"),u=i("w"),d=i("x"),h=i("y"),y=i("z");if(!s||!s.length||!o||!o.length||!u||!u.length||!d||!d.length||!h||!h.length||!y||!y.length){r.visible=!1;return}var m=i("sizemode");i("sizeref",m==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),w(t,r,l,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),cJ=Ne({"src/traces/cone/calc.js"(te,Z){var v=Nd();Z.exports=function(C,P){for(var t=P.u,r=P.v,a=P.w,l=Math.min(P.x.length,P.y.length,P.z.length,t.length,r.length,a.length),i=-1/0,s=1/0,o=0;o<l;o++){var u=t[o],d=r[o],h=a[o],y=Math.sqrt(u*u+d*d+h*h);i=Math.max(i,y),s=Math.min(s,y)}P._len=l,P._normMax=i,v(C,P,{vals:[s,i],containerStr:"",cLetter:"c"})}}}),fJ=Ne({"src/traces/cone/convert.js"(te,Z){var v=Vv().gl_cone3d,w=Vv().gl_cone3d.createConeMesh,C=In().simpleMap,P=k_().parseColorScale,t=Dc().extractOpts,r=In().isArrayOrTypedArray,a=$S();function l(y,m){this.scene=y,this.uid=m,this.mesh=null,this.data=null}var i=l.prototype;i.handlePick=function(y){if(y.object===this.mesh){var m=y.index=y.data.index,E=this.data.x[m],c=this.data.y[m],_=this.data.z[m],T=this.data.u[m],M=this.data.v[m],k=this.data.w[m];y.traceCoordinate=[E,c,_,T,M,k,Math.sqrt(T*T+M*M+k*k)];var b=this.data.hovertext||this.data.text;return r(b)&&b[m]!==void 0?y.textLabel=b[m]:b&&(y.textLabel=b),!0}};var s={xaxis:0,yaxis:1,zaxis:2},o={tip:1,tail:0,cm:.25,center:.5},u={tip:1,tail:1,cm:.75,center:.5};function d(y,m){var E=y.fullSceneLayout,c=y.dataScale,_={};function T(g,f){var p=E[f],x=c[s[f]];return C(g,function(N){return p.d2l(N)*x})}_.vectors=a(T(m.u,"xaxis"),T(m.v,"yaxis"),T(m.w,"zaxis"),m._len),_.positions=a(T(m.x,"xaxis"),T(m.y,"yaxis"),T(m.z,"zaxis"),m._len);var M=t(m);_.colormap=P(m),_.vertexIntensityBounds=[M.min/m._normMax,M.max/m._normMax],_.coneOffset=o[m.anchor];var k=m.sizemode;k==="scaled"?_.coneSize=m.sizeref||.5:k==="absolute"?_.coneSize=m.sizeref&&m._normMax?m.sizeref/m._normMax:.5:k==="raw"&&(_.coneSize=m.sizeref),_.coneSizemode=k;var b=v(_),A=m.lightposition;return b.lightPosition=[A.x,A.y,A.z],b.ambient=m.lighting.ambient,b.diffuse=m.lighting.diffuse,b.specular=m.lighting.specular,b.roughness=m.lighting.roughness,b.fresnel=m.lighting.fresnel,b.opacity=m.opacity,m._pad=u[m.anchor]*b.vectorScale*b.coneScale*m._normMax,b}i.update=function(y){this.data=y;var m=d(this.scene,y);this.mesh.update(m)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function h(y,m){var E=y.glplot.gl,c=d(y,m),_=w(E,c),T=new l(y,m.uid);return T.mesh=_,T.data=m,_._trace=T,y.glplot.add(_),T}Z.exports=h}}),hJ=Ne({"src/traces/cone/index.js"(te,Z){Z.exports={moduleType:"trace",name:"cone",basePlotModule:Rb(),categories:["gl3d","showLegend"],attributes:sN(),supplyDefaults:uJ(),colorbar:{min:"cmin",max:"cmax"},calc:cJ(),plot:fJ(),eventData:function(v,w){return v.norm=w.traceCoordinate[6],v},meta:{}}}}),dJ=Ne({"lib/cone.js"(te,Z){Z.exports=hJ()}}),lN=Ne({"src/traces/streamtube/attributes.js"(te,Z){var v=Vu(),w=bc().axisHoverFormat,{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=ZS(),r=ns(),a=co().extendFlat,l={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:C({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:P({editType:"calc"}),uhoverformat:w("u",1),vhoverformat:w("v",1),whoverformat:w("w",1),xhoverformat:w("x"),yhoverformat:w("y"),zhoverformat:w("z"),showlegend:a({},r.showlegend,{dflt:!1})};a(l,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var i=["opacity","lightposition","lighting"];i.forEach(function(s){l[s]=t[s]}),l.hoverinfo=a({},r.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),Z.exports=l}}),vJ=Ne({"src/traces/streamtube/defaults.js"(te,Z){var v=In(),w=Ph(),C=lN();Z.exports=function(t,r,a,l){function i(m,E){return v.coerce(t,r,C,m,E)}var s=i("u"),o=i("v"),u=i("w"),d=i("x"),h=i("y"),y=i("z");if(!s||!s.length||!o||!o.length||!u||!u.length||!d||!d.length||!h||!h.length||!y||!y.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),w(t,r,l,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}}}),pJ=Ne({"src/traces/streamtube/convert.js"(te,Z){var v=Vv().gl_streamtube3d,w=v.createTubeMesh,C=In(),P=k_().parseColorScale,t=Dc().extractOpts,r=$S(),a={xaxis:0,yaxis:1,zaxis:2};function l(h,y){this.scene=h,this.uid=y,this.mesh=null,this.data=null}var i=l.prototype;i.handlePick=function(h){var y=this.scene.fullSceneLayout,m=this.scene.dataScale;function E(T,M){var k=y[M],b=m[a[M]];return k.l2c(T)/b}if(h.object===this.mesh){var c=h.data.position,_=h.data.velocity;return h.traceCoordinate=[E(c[0],"xaxis"),E(c[1],"yaxis"),E(c[2],"zaxis"),E(_[0],"xaxis"),E(_[1],"yaxis"),E(_[2],"zaxis"),h.data.intensity*this.data._normMax,h.data.divergence],h.textLabel=this.data.hovertext||this.data.text,!0}};function s(h){var y=h.length,m;return y>2?m=h.slice(1,y-1):y===2?m=[(h[0]+h[1])/2]:m=h,m}function o(h){var y=h.length;return y===1?[.5,.5]:[h[1]-h[0],h[y-1]-h[y-2]]}function u(h,y){var m=h.fullSceneLayout,E=h.dataScale,c=y._len,_={};function T(me,W){var ie=m[W],se=E[a[W]];return C.simpleMap(me,function(ee){return ie.d2l(ee)*se})}if(_.vectors=r(T(y._u,"xaxis"),T(y._v,"yaxis"),T(y._w,"zaxis"),c),!c)return{positions:[],cells:[]};var M=T(y._Xs,"xaxis"),k=T(y._Ys,"yaxis"),b=T(y._Zs,"zaxis");_.meshgrid=[M,k,b],_.gridFill=y._gridFill;var A=y._slen;if(A)_.startingPositions=r(T(y._startsX,"xaxis"),T(y._startsY,"yaxis"),T(y._startsZ,"zaxis"));else{for(var g=k[0],f=s(M),p=s(b),x=new Array(f.length*p.length),N=0,D=0;D<f.length;D++)for(var B=0;B<p.length;B++)x[N++]=[f[D],g,p[B]];_.startingPositions=x}_.colormap=P(y),_.tubeSize=y.sizeref,_.maxLength=y.maxdisplayed;var U=T(y._xbnds,"xaxis"),V=T(y._ybnds,"yaxis"),q=T(y._zbnds,"zaxis"),z=o(M),H=o(k),G=o(b),J=[[U[0]-z[0],V[0]-H[0],q[0]-G[0]],[U[1]+z[1],V[1]+H[1],q[1]+G[1]]],le=v(_,J),ye=t(y);le.vertexIntensityBounds=[ye.min/y._normMax,ye.max/y._normMax];var de=y.lightposition;return le.lightPosition=[de.x,de.y,de.z],le.ambient=y.lighting.ambient,le.diffuse=y.lighting.diffuse,le.specular=y.lighting.specular,le.roughness=y.lighting.roughness,le.fresnel=y.lighting.fresnel,le.opacity=y.opacity,y._pad=le.tubeScale*y.sizeref*2,le}i.update=function(h){this.data=h;var y=u(this.scene,h);this.mesh.update(y)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function d(h,y){var m=h.glplot.gl,E=u(h,y),c=w(m,E),_=new l(h,y.uid);return _.mesh=c,_.data=y,c._trace=_,h.glplot.add(c),_}Z.exports=d}}),mJ=Ne({"src/traces/streamtube/index.js"(te,Z){Z.exports={moduleType:"trace",name:"streamtube",basePlotModule:Rb(),categories:["gl3d","showLegend"],attributes:lN(),supplyDefaults:vJ(),colorbar:{min:"cmin",max:"cmax"},calc:vR().calc,plot:pJ(),eventData:function(v,w){return v.tubex=v.x,v.tubey=v.y,v.tubez=v.z,v.tubeu=w.traceCoordinate[3],v.tubev=w.traceCoordinate[4],v.tubew=w.traceCoordinate[5],v.norm=w.traceCoordinate[6],v.divergence=w.traceCoordinate[7],delete v.x,delete v.y,delete v.z,v},meta:{}}}}),yJ=Ne({"lib/streamtube.js"(te,Z){Z.exports=mJ()}}),v3=Ne({"src/traces/scattergeo/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=jv(),t=Jc(),r=ns(),a=Vu(),l=Dd().dash,i=co().extendFlat,s=Kc().overrideAll,o=t.marker,u=t.line,d=o.line;Z.exports=s({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:i({},t.mode,{dflt:"markers"}),text:i({},t.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:i({},t.hovertext,{}),textfont:t.textfont,textposition:t.textposition,line:{color:u.color,width:u.width,dash:l},connectgaps:t.connectgaps,marker:i({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:i({},o.angleref,{values:["previous","up","north"]}),standoff:o.standoff,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,colorbar:o.colorbar,line:i({width:d.width},a("marker.line")),gradient:o.gradient},a("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:P(),selected:t.selected,unselected:t.unselected,hoverinfo:i({},r.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),gJ=Ne({"src/traces/scattergeo/defaults.js"(te,Z){var v=In(),w=vu(),C=xv(),P=Im(),t=Xp(),r=ov(),a=v3(),l=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(s,o,u,d){function h(k,b){return v.coerce(s,o,a,k,b)}var y=h("locations"),m;if(y&&y.length){var E=h("geojson"),c;(typeof E=="string"&&E!==""||v.isPlainObject(E))&&(c="geojson-id");var _=h("locationmode",c);_==="country names"&&v.warn(l),_==="geojson-id"&&h("featureidkey"),m=y.length}else{var T=h("lon")||[],M=h("lat")||[];m=Math.min(T.length,M.length)}if(!m){o.visible=!1;return}o._length=m,h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),w.hasMarkers(o)&&C(s,o,u,d,h,{gradient:!0}),w.hasLines(o)&&(P(s,o,u,d,h),h("connectgaps")),w.hasText(o)&&(h("texttemplate"),h("texttemplatefallback"),t(s,o,d,h)),h("fill"),o.fill!=="none"&&r(s,o,u,h),v.coerceSelectionMarkerOpacity(o,h)}}}),_J=Ne({"src/traces/scattergeo/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.geo]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),mR=Ne({"src/traces/scattergeo/calc.js"(te,Z){var v=la(),w=ja().BADNUM,C=Wp(),P=o0(),t=Vh(),r=In().isArrayOrTypedArray,a=In()._;function l(i){return i&&typeof i=="string"}Z.exports=function(s,o){var u=r(o.locations),d=u?o.locations.length:o._length,h=new Array(d),y;o.geojson?y=function(M){return l(M)||v(M)}:y=l;for(var m=0;m<d;m++){var E=h[m]={};if(u){var c=o.locations[m];E.loc=y(c)?c:null}else{var _=o.lon[m],T=o.lat[m];v(_)&&v(T)?E.lonlat=[+_,+T]:E.lonlat=[w,w]}}return P(h,o),C(s,o),t(h,o),d&&(h[0].t={labels:{lat:a(s,"lat:")+" ",lon:a(s,"lon:")+" "}}),h}}}),o6=Ne({"src/plots/geo/constants.js"(te){te.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"},te.axesNames=["lonaxis","lataxis"],te.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},te.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},te.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]}},te.clipPad=.001,te.precision=.1,te.landColor="#F0DC82",te.waterColor="#3399FF",te.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},te.sphereSVG={type:"Sphere"},te.fillLayers={ocean:1,land:1,lakes:1},te.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},te.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],te.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],te.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}}}),uN=Ne({"node_modules/topojson-client/dist/topojson-client.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.topojson=v.topojson||{}))})(te,function(v){function w(T){return T}function C(T){if(T==null)return w;var M,k,b=T.scale[0],A=T.scale[1],g=T.translate[0],f=T.translate[1];return function(p,x){x||(M=k=0);var N=2,D=p.length,B=new Array(D);for(B[0]=(M+=p[0])*b+g,B[1]=(k+=p[1])*A+f;N<D;)B[N]=p[N],++N;return B}}function P(T){var M=C(T.transform),k,b=1/0,A=b,g=-b,f=-b;function p(N){N=M(N),N[0]<b&&(b=N[0]),N[0]>g&&(g=N[0]),N[1]<A&&(A=N[1]),N[1]>f&&(f=N[1])}function x(N){switch(N.type){case"GeometryCollection":N.geometries.forEach(x);break;case"Point":p(N.coordinates);break;case"MultiPoint":N.coordinates.forEach(p);break}}T.arcs.forEach(function(N){for(var D=-1,B=N.length,U;++D<B;)U=M(N[D],D),U[0]<b&&(b=U[0]),U[0]>g&&(g=U[0]),U[1]<A&&(A=U[1]),U[1]>f&&(f=U[1])});for(k in T.objects)x(T.objects[k]);return[b,A,g,f]}function t(T,M){for(var k,b=T.length,A=b-M;A<--b;)k=T[A],T[A++]=T[b],T[b]=k}function r(T,M){return typeof M=="string"&&(M=T.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(k){return a(T,k)})}:a(T,M)}function a(T,M){var k=M.id,b=M.bbox,A=M.properties==null?{}:M.properties,g=l(T,M);return k==null&&b==null?{type:"Feature",properties:A,geometry:g}:b==null?{type:"Feature",id:k,properties:A,geometry:g}:{type:"Feature",id:k,bbox:b,properties:A,geometry:g}}function l(T,M){var k=C(T.transform),b=T.arcs;function A(D,B){B.length&&B.pop();for(var U=b[D<0?~D:D],V=0,q=U.length;V<q;++V)B.push(k(U[V],V));D<0&&t(B,q)}function g(D){return k(D)}function f(D){for(var B=[],U=0,V=D.length;U<V;++U)A(D[U],B);return B.length<2&&B.push(B[0]),B}function p(D){for(var B=f(D);B.length<4;)B.push(B[0]);return B}function x(D){return D.map(p)}function N(D){var B=D.type,U;switch(B){case"GeometryCollection":return{type:B,geometries:D.geometries.map(N)};case"Point":U=g(D.coordinates);break;case"MultiPoint":U=D.coordinates.map(g);break;case"LineString":U=f(D.arcs);break;case"MultiLineString":U=D.arcs.map(f);break;case"Polygon":U=x(D.arcs);break;case"MultiPolygon":U=D.arcs.map(x);break;default:return null}return{type:B,coordinates:U}}return N(M)}function i(T,M){var k={},b={},A={},g=[],f=-1;M.forEach(function(N,D){var B=T.arcs[N<0?~N:N],U;B.length<3&&!B[1][0]&&!B[1][1]&&(U=M[++f],M[f]=N,M[D]=U)}),M.forEach(function(N){var D=p(N),B=D[0],U=D[1],V,q;if(V=A[B])if(delete A[V.end],V.push(N),V.end=U,q=b[U]){delete b[q.start];var z=q===V?V:V.concat(q);b[z.start=V.start]=A[z.end=q.end]=z}else b[V.start]=A[V.end]=V;else if(V=b[U])if(delete b[V.start],V.unshift(N),V.start=B,q=A[B]){delete A[q.end];var H=q===V?V:q.concat(V);b[H.start=q.start]=A[H.end=V.end]=H}else b[V.start]=A[V.end]=V;else V=[N],b[V.start=B]=A[V.end=U]=V});function p(N){var D=T.arcs[N<0?~N:N],B=D[0],U;return T.transform?(U=[0,0],D.forEach(function(V){U[0]+=V[0],U[1]+=V[1]})):U=D[D.length-1],N<0?[U,B]:[B,U]}function x(N,D){for(var B in N){var U=N[B];delete D[U.start],delete U.start,delete U.end,U.forEach(function(V){k[V<0?~V:V]=1}),g.push(U)}}return x(A,b),x(b,A),M.forEach(function(N){k[N<0?~N:N]||g.push([N])}),g}function s(T){return l(T,o.apply(this,arguments))}function o(T,M,k){var b,A,g;if(arguments.length>1)b=u(T,M,k);else for(A=0,b=new Array(g=T.arcs.length);A<g;++A)b[A]=A;return{type:"MultiLineString",arcs:i(T,b)}}function u(T,M,k){var b=[],A=[],g;function f(B){var U=B<0?~B:B;(A[U]||(A[U]=[])).push({i:B,g})}function p(B){B.forEach(f)}function x(B){B.forEach(p)}function N(B){B.forEach(x)}function D(B){switch(g=B,B.type){case"GeometryCollection":B.geometries.forEach(D);break;case"LineString":p(B.arcs);break;case"MultiLineString":case"Polygon":x(B.arcs);break;case"MultiPolygon":N(B.arcs);break}}return D(M),A.forEach(k==null?function(B){b.push(B[0].i)}:function(B){k(B[0].g,B[B.length-1].g)&&b.push(B[0].i)}),b}function d(T){for(var M=-1,k=T.length,b,A=T[k-1],g=0;++M<k;)b=A,A=T[M],g+=b[0]*A[1]-b[1]*A[0];return Math.abs(g)}function h(T){return l(T,y.apply(this,arguments))}function y(T,M){var k={},b=[],A=[];M.forEach(g);function g(x){switch(x.type){case"GeometryCollection":x.geometries.forEach(g);break;case"Polygon":f(x.arcs);break;case"MultiPolygon":x.arcs.forEach(f);break}}function f(x){x.forEach(function(N){N.forEach(function(D){(k[D=D<0?~D:D]||(k[D]=[])).push(x)})}),b.push(x)}function p(x){return d(l(T,{type:"Polygon",arcs:[x]}).coordinates[0])}return b.forEach(function(x){if(!x._){var N=[],D=[x];for(x._=1,A.push(N);x=D.pop();)N.push(x),x.forEach(function(B){B.forEach(function(U){k[U<0?~U:U].forEach(function(V){V._||(V._=1,D.push(V))})})})}}),b.forEach(function(x){delete x._}),{type:"MultiPolygon",arcs:A.map(function(x){var N=[],D;if(x.forEach(function(z){z.forEach(function(H){H.forEach(function(G){k[G<0?~G:G].length<2&&N.push(G)})})}),N=i(T,N),(D=N.length)>1)for(var B=1,U=p(N[0]),V,q;B<D;++B)(V=p(N[B]))>U&&(q=N[0],N[0]=N[B],N[B]=q,U=V);return N}).filter(function(x){return x.length>0})}}function m(T,M){for(var k=0,b=T.length;k<b;){var A=k+b>>>1;T[A]<M?k=A+1:b=A}return k}function E(T){var M={},k=T.map(function(){return[]});function b(z,H){z.forEach(function(G){G<0&&(G=~G);var J=M[G];J?J.push(H):M[G]=[H]})}function A(z,H){z.forEach(function(G){b(G,H)})}function g(z,H){z.type==="GeometryCollection"?z.geometries.forEach(function(G){g(G,H)}):z.type in f&&f[z.type](z.arcs,H)}var f={LineString:b,MultiLineString:A,Polygon:A,MultiPolygon:function(z,H){z.forEach(function(G){A(G,H)})}};T.forEach(g);for(var p in M)for(var x=M[p],N=x.length,D=0;D<N;++D)for(var B=D+1;B<N;++B){var U=x[D],V=x[B],q;(q=k[U])[p=m(q,V)]!==V&&q.splice(p,0,V),(q=k[V])[p=m(q,U)]!==U&&q.splice(p,0,U)}return k}function c(T){if(T==null)return w;var M,k,b=T.scale[0],A=T.scale[1],g=T.translate[0],f=T.translate[1];return function(p,x){x||(M=k=0);var N=2,D=p.length,B=new Array(D),U=Math.round((p[0]-g)/b),V=Math.round((p[1]-f)/A);for(B[0]=U-M,M=U,B[1]=V-k,k=V;N<D;)B[N]=p[N],++N;return B}}function _(T,M){if(T.transform)throw new Error("already quantized");if(!M||!M.scale){if(!((f=Math.floor(M))>=2))throw new Error("n must be ≥2");x=T.bbox||P(T);var k=x[0],b=x[1],A=x[2],g=x[3],f;M={scale:[A-k?(A-k)/(f-1):1,g-b?(g-b)/(f-1):1],translate:[k,b]}}else x=T.bbox;var p=c(M),x,N,D=T.objects,B={};function U(z){return p(z)}function V(z){var H;switch(z.type){case"GeometryCollection":H={type:"GeometryCollection",geometries:z.geometries.map(V)};break;case"Point":H={type:"Point",coordinates:U(z.coordinates)};break;case"MultiPoint":H={type:"MultiPoint",coordinates:z.coordinates.map(U)};break;default:return z}return z.id!=null&&(H.id=z.id),z.bbox!=null&&(H.bbox=z.bbox),z.properties!=null&&(H.properties=z.properties),H}function q(z){var H=0,G=1,J=z.length,le,ye=new Array(J);for(ye[0]=p(z[0],0);++H<J;)((le=p(z[H],H))[0]||le[1])&&(ye[G++]=le);return G===1&&(ye[G++]=[0,0]),ye.length=G,ye}for(N in D)B[N]=V(D[N]);return{type:"Topology",bbox:x,transform:M,objects:B,arcs:T.arcs.map(q)}}v.bbox=P,v.feature=r,v.merge=h,v.mergeArcs=y,v.mesh=s,v.meshArcs=o,v.neighbors=E,v.quantize=_,v.transform=C,v.untransform=c,Object.defineProperty(v,"__esModule",{value:!0})})}}),yR=Ne({"src/lib/topojson_utils.js"(te,Z){var v=Z.exports={},w=o6().locationmodeToLayer,C=uN().feature;v.getTopojsonName=function(P){return[P.scope.replace(/ /g,"-"),"_",P.resolution.toString(),"m"].join("")},v.getTopojsonPath=function(P,t){return P+=P.endsWith("/")?"":"/",`${P}${t}.json`},v.getTopojsonFeatures=function(P,t){var r=w[P.locationmode],a=t.objects[r];return C(t,a).features}}}),Ib=Ne({"src/lib/geojson_utils.js"(te){var Z=ja().BADNUM;te.calcTraceToLineCoords=function(v){for(var w=v[0].trace,C=w.connectgaps,P=[],t=[],r=0;r<v.length;r++){var a=v[r],l=a.lonlat;l[0]!==Z?t.push(l):!C&&t.length>0&&(P.push(t),t=[])}return t.length>0&&P.push(t),P},te.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},te.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var w=new Array(v.length),C=0;C<v.length;C++)w[C]=[v[C]];return{type:"MultiPolygon",coordinates:w}},te.makeBlank=function(){return{type:"Point",coordinates:[]}}}}),xJ=Ne({"node_modules/country-regex/index.js"(te,Z){Z.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}}}),gR=Ne({"node_modules/@turf/helpers/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=63710088e-1,v={centimeters:Z*100,centimetres:Z*100,degrees:360/(2*Math.PI),feet:Z*3.28084,inches:Z*39.37,kilometers:Z/1e3,kilometres:Z/1e3,meters:Z,metres:Z,miles:Z/1609.344,millimeters:Z*1e3,millimetres:Z*1e3,nauticalmiles:Z/1852,radians:1,yards:Z*1.0936},w={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 C(D,B,U={}){const V={type:"Feature"};return(U.id===0||U.id)&&(V.id=U.id),U.bbox&&(V.bbox=U.bbox),V.properties=B||{},V.geometry=D,V}function P(D,B,U={}){switch(D){case"Point":return t(B).geometry;case"LineString":return i(B).geometry;case"Polygon":return a(B).geometry;case"MultiPoint":return d(B).geometry;case"MultiLineString":return u(B).geometry;case"MultiPolygon":return h(B).geometry;default:throw new Error(D+" is invalid")}}function t(D,B,U={}){if(!D)throw new Error("coordinates is required");if(!Array.isArray(D))throw new Error("coordinates must be an Array");if(D.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(D[0])||!f(D[1]))throw new Error("coordinates must contain numbers");return C({type:"Point",coordinates:D},B,U)}function r(D,B,U={}){return o(D.map(V=>t(V,B)),U)}function a(D,B,U={}){for(const q of D){if(q.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(q[q.length-1].length!==q[0].length)throw new Error("First and last Position are not equivalent.");for(let z=0;z<q[q.length-1].length;z++)if(q[q.length-1][z]!==q[0][z])throw new Error("First and last Position are not equivalent.")}return C({type:"Polygon",coordinates:D},B,U)}function l(D,B,U={}){return o(D.map(V=>a(V,B)),U)}function i(D,B,U={}){if(D.length<2)throw new Error("coordinates must be an array of two or more positions");return C({type:"LineString",coordinates:D},B,U)}function s(D,B,U={}){return o(D.map(V=>i(V,B)),U)}function o(D,B={}){const U={type:"FeatureCollection"};return B.id&&(U.id=B.id),B.bbox&&(U.bbox=B.bbox),U.features=D,U}function u(D,B,U={}){return C({type:"MultiLineString",coordinates:D},B,U)}function d(D,B,U={}){return C({type:"MultiPoint",coordinates:D},B,U)}function h(D,B,U={}){return C({type:"MultiPolygon",coordinates:D},B,U)}function y(D,B,U={}){return C({type:"GeometryCollection",geometries:D},B,U)}function m(D,B=0){if(B&&!(B>=0))throw new Error("precision must be a positive number");const U=Math.pow(10,B||0);return Math.round(D*U)/U}function E(D,B="kilometers"){const U=v[B];if(!U)throw new Error(B+" units is invalid");return D*U}function c(D,B="kilometers"){const U=v[B];if(!U)throw new Error(B+" units is invalid");return D/U}function _(D,B){return k(c(D,B))}function T(D){let B=D%360;return B<0&&(B+=360),B}function M(D){return D=D%360,D>180?D-360:D<-180?D+360:D}function k(D){return D%(2*Math.PI)*180/Math.PI}function b(D){return D%360*Math.PI/180}function A(D,B="kilometers",U="kilometers"){if(!(D>=0))throw new Error("length must be a positive number");return E(c(D,B),U)}function g(D,B="meters",U="kilometers"){if(!(D>=0))throw new Error("area must be a positive number");const V=w[B];if(!V)throw new Error("invalid original units");const q=w[U];if(!q)throw new Error("invalid final units");return D/V*q}function f(D){return!isNaN(D)&&D!==null&&!Array.isArray(D)}function p(D){return D!==null&&typeof D=="object"&&!Array.isArray(D)}function x(D){if(!D)throw new Error("bbox is required");if(!Array.isArray(D))throw new Error("bbox must be an Array");if(D.length!==4&&D.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");D.forEach(B=>{if(!f(B))throw new Error("bbox must only contain numbers")})}function N(D){if(!D)throw new Error("id is required");if(["string","number"].indexOf(typeof D)===-1)throw new Error("id must be a number or a string")}te.areaFactors=w,te.azimuthToBearing=M,te.bearingToAzimuth=T,te.convertArea=g,te.convertLength=A,te.degreesToRadians=b,te.earthRadius=Z,te.factors=v,te.feature=C,te.featureCollection=o,te.geometry=P,te.geometryCollection=y,te.isNumber=f,te.isObject=p,te.lengthToDegrees=_,te.lengthToRadians=c,te.lineString=i,te.lineStrings=s,te.multiLineString=u,te.multiPoint=d,te.multiPolygon=h,te.point=t,te.points=r,te.polygon=a,te.polygons=l,te.radiansToDegrees=k,te.radiansToLength=E,te.round=m,te.validateBBox=x,te.validateId=N}}),_R=Ne({"node_modules/@turf/meta/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=gR();function v(c,_,T){if(c!==null)for(var M,k,b,A,g,f,p,x=0,N=0,D,B=c.type,U=B==="FeatureCollection",V=B==="Feature",q=U?c.features.length:1,z=0;z<q;z++){p=U?c.features[z].geometry:V?c.geometry:c,D=p?p.type==="GeometryCollection":!1,g=D?p.geometries.length:1;for(var H=0;H<g;H++){var G=0,J=0;if(A=D?p.geometries[H]:p,A!==null){f=A.coordinates;var le=A.type;switch(x=T&&(le==="Polygon"||le==="MultiPolygon")?1:0,le){case null:break;case"Point":if(_(f,N,z,G,J)===!1)return!1;N++,G++;break;case"LineString":case"MultiPoint":for(M=0;M<f.length;M++){if(_(f[M],N,z,G,J)===!1)return!1;N++,le==="MultiPoint"&&G++}le==="LineString"&&G++;break;case"Polygon":case"MultiLineString":for(M=0;M<f.length;M++){for(k=0;k<f[M].length-x;k++){if(_(f[M][k],N,z,G,J)===!1)return!1;N++}le==="MultiLineString"&&G++,le==="Polygon"&&J++}le==="Polygon"&&G++;break;case"MultiPolygon":for(M=0;M<f.length;M++){for(J=0,k=0;k<f[M].length;k++){for(b=0;b<f[M][k].length-x;b++){if(_(f[M][k][b],N,z,G,J)===!1)return!1;N++}J++}G++}break;case"GeometryCollection":for(M=0;M<A.geometries.length;M++)if(v(A.geometries[M],_,T)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function w(c,_,T,M){var k=T;return v(c,function(b,A,g,f,p){A===0&&T===void 0?k=b:k=_(k,b,A,g,f,p)},M),k}function C(c,_){var T;switch(c.type){case"FeatureCollection":for(T=0;T<c.features.length&&_(c.features[T].properties,T)!==!1;T++);break;case"Feature":_(c.properties,0);break}}function P(c,_,T){var M=T;return C(c,function(k,b){b===0&&T===void 0?M=k:M=_(M,k,b)}),M}function t(c,_){if(c.type==="Feature")_(c,0);else if(c.type==="FeatureCollection")for(var T=0;T<c.features.length&&_(c.features[T],T)!==!1;T++);}function r(c,_,T){var M=T;return t(c,function(k,b){b===0&&T===void 0?M=k:M=_(M,k,b)}),M}function a(c){var _=[];return v(c,function(T){_.push(T)}),_}function l(c,_){var T,M,k,b,A,g,f,p,x,N,D=0,B=c.type==="FeatureCollection",U=c.type==="Feature",V=B?c.features.length:1;for(T=0;T<V;T++){for(g=B?c.features[T].geometry:U?c.geometry:c,p=B?c.features[T].properties:U?c.properties:{},x=B?c.features[T].bbox:U?c.bbox:void 0,N=B?c.features[T].id:U?c.id:void 0,f=g?g.type==="GeometryCollection":!1,A=f?g.geometries.length:1,k=0;k<A;k++){if(b=f?g.geometries[k]:g,b===null){if(_(null,D,p,x,N)===!1)return!1;continue}switch(b.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(_(b,D,p,x,N)===!1)return!1;break}case"GeometryCollection":{for(M=0;M<b.geometries.length;M++)if(_(b.geometries[M],D,p,x,N)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}D++}}function i(c,_,T){var M=T;return l(c,function(k,b,A,g,f){b===0&&T===void 0?M=k:M=_(M,k,b,A,g,f)}),M}function s(c,_){l(c,function(T,M,k,b,A){var g=T===null?null:T.type;switch(g){case null:case"Point":case"LineString":case"Polygon":return _(Z.feature.call(void 0,T,k,{bbox:b,id:A}),M,0)===!1?!1:void 0}var f;switch(g){case"MultiPoint":f="Point";break;case"MultiLineString":f="LineString";break;case"MultiPolygon":f="Polygon";break}for(var p=0;p<T.coordinates.length;p++){var x=T.coordinates[p],N={type:f,coordinates:x};if(_(Z.feature.call(void 0,N,k),M,p)===!1)return!1}})}function o(c,_,T){var M=T;return s(c,function(k,b,A){b===0&&A===0&&T===void 0?M=k:M=_(M,k,b,A)}),M}function u(c,_){s(c,function(T,M,k){var b=0;if(T.geometry){var A=T.geometry.type;if(!(A==="Point"||A==="MultiPoint")){var g,f=0,p=0,x=0;if(v(T,function(N,D,B,U,V){if(g===void 0||M>f||U>p||V>x){g=N,f=M,p=U,x=V,b=0;return}var q=Z.lineString.call(void 0,[g,N],T.properties);if(_(q,M,k,V,b)===!1)return!1;b++,g=N})===!1)return!1}}})}function d(c,_,T){var M=T,k=!1;return u(c,function(b,A,g,f,p){k===!1&&T===void 0?M=b:M=_(M,b,A,g,f,p),k=!0}),M}function h(c,_){if(!c)throw new Error("geojson is required");s(c,function(T,M,k){if(T.geometry!==null){var b=T.geometry.type,A=T.geometry.coordinates;switch(b){case"LineString":if(_(T,M,k,0,0)===!1)return!1;break;case"Polygon":for(var g=0;g<A.length;g++)if(_(Z.lineString.call(void 0,A[g],T.properties),M,k,g)===!1)return!1;break}}})}function y(c,_,T){var M=T;return h(c,function(k,b,A,g){b===0&&T===void 0?M=k:M=_(M,k,b,A,g)}),M}function m(c,_){if(_=_||{},!Z.isObject.call(void 0,_))throw new Error("options is invalid");var T=_.featureIndex||0,M=_.multiFeatureIndex||0,k=_.geometryIndex||0,b=_.segmentIndex||0,A=_.properties,g;switch(c.type){case"FeatureCollection":T<0&&(T=c.features.length+T),A=A||c.features[T].properties,g=c.features[T].geometry;break;case"Feature":A=A||c.properties,g=c.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":g=c;break;default:throw new Error("geojson is invalid")}if(g===null)return null;var f=g.coordinates;switch(g.type){case"Point":case"MultiPoint":return null;case"LineString":return b<0&&(b=f.length+b-1),Z.lineString.call(void 0,[f[b],f[b+1]],A,_);case"Polygon":return k<0&&(k=f.length+k),b<0&&(b=f[k].length+b-1),Z.lineString.call(void 0,[f[k][b],f[k][b+1]],A,_);case"MultiLineString":return M<0&&(M=f.length+M),b<0&&(b=f[M].length+b-1),Z.lineString.call(void 0,[f[M][b],f[M][b+1]],A,_);case"MultiPolygon":return M<0&&(M=f.length+M),k<0&&(k=f[M].length+k),b<0&&(b=f[M][k].length-b-1),Z.lineString.call(void 0,[f[M][k][b],f[M][k][b+1]],A,_)}throw new Error("geojson is invalid")}function E(c,_){if(_=_||{},!Z.isObject.call(void 0,_))throw new Error("options is invalid");var T=_.featureIndex||0,M=_.multiFeatureIndex||0,k=_.geometryIndex||0,b=_.coordIndex||0,A=_.properties,g;switch(c.type){case"FeatureCollection":T<0&&(T=c.features.length+T),A=A||c.features[T].properties,g=c.features[T].geometry;break;case"Feature":A=A||c.properties,g=c.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":g=c;break;default:throw new Error("geojson is invalid")}if(g===null)return null;var f=g.coordinates;switch(g.type){case"Point":return Z.point.call(void 0,f,A,_);case"MultiPoint":return M<0&&(M=f.length+M),Z.point.call(void 0,f[M],A,_);case"LineString":return b<0&&(b=f.length+b),Z.point.call(void 0,f[b],A,_);case"Polygon":return k<0&&(k=f.length+k),b<0&&(b=f[k].length+b),Z.point.call(void 0,f[k][b],A,_);case"MultiLineString":return M<0&&(M=f.length+M),b<0&&(b=f[M].length+b),Z.point.call(void 0,f[M][b],A,_);case"MultiPolygon":return M<0&&(M=f.length+M),k<0&&(k=f[M].length+k),b<0&&(b=f[M][k].length-b),Z.point.call(void 0,f[M][k][b],A,_)}throw new Error("geojson is invalid")}te.coordAll=a,te.coordEach=v,te.coordReduce=w,te.featureEach=t,te.featureReduce=r,te.findPoint=E,te.findSegment=m,te.flattenEach=s,te.flattenReduce=o,te.geomEach=l,te.geomReduce=i,te.lineEach=h,te.lineReduce=y,te.propEach=C,te.propReduce=P,te.segmentEach=u,te.segmentReduce=d}}),bJ=Ne({"node_modules/@turf/area/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=gR(),v=_R();function w(i){return v.geomReduce.call(void 0,i,(s,o)=>s+C(o),0)}function C(i){let s=0,o;switch(i.type){case"Polygon":return P(i.coordinates);case"MultiPolygon":for(o=0;o<i.coordinates.length;o++)s+=P(i.coordinates[o]);return s;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}function P(i){let s=0;if(i&&i.length>0){s+=Math.abs(a(i[0]));for(let o=1;o<i.length;o++)s-=Math.abs(a(i[o]))}return s}var t=Z.earthRadius*Z.earthRadius/2,r=Math.PI/180;function a(i){const s=i.length-1;if(s<=2)return 0;let o=0,u=0;for(;u<s;){const d=i[u],h=i[u+1===s?0:u+1],y=i[u+2>=s?(u+2)%s:u+2],m=d[0]*r,E=h[1]*r,c=y[0]*r;o+=(c-m)*Math.sin(E),u++}return o*t}var l=w;te.area=w,te.default=l}}),wJ=Ne({"node_modules/@turf/centroid/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=gR(),v=_R();function w(P,t={}){let r=0,a=0,l=0;return v.coordEach.call(void 0,P,function(i){r+=i[0],a+=i[1],l++},!0),Z.point.call(void 0,[r/l,a/l],t.properties)}var C=w;te.centroid=w,te.default=C}}),TJ=Ne({"node_modules/@turf/bbox/dist/cjs/index.cjs"(te){Object.defineProperty(te,"__esModule",{value:!0});var Z=_R();function v(C,P={}){if(C.bbox!=null&&P.recompute!==!0)return C.bbox;const t=[1/0,1/0,-1/0,-1/0];return Z.coordEach.call(void 0,C,r=>{t[0]>r[0]&&(t[0]=r[0]),t[1]>r[1]&&(t[1]=r[1]),t[2]<r[0]&&(t[2]=r[0]),t[3]<r[1]&&(t[3]=r[1])}),t}var w=v;te.bbox=v,te.default=w}}),Db=Ne({"src/lib/geo_location_utils.js"(te,Z){var v=xn(),w=xJ(),{area:C}=bJ(),{centroid:P}=wJ(),{bbox:t}=TJ(),r=O0(),a=yv(),l=Ra(),i=Pi(),s=j1(),o=Object.keys(w),u={"ISO-3":r,"USA-states":r,"country names":d};function d(M){for(var k=0;k<o.length;k++){var b=o[k],A=new RegExp(w[b]);if(A.test(M.trim().toLowerCase()))return b}return a.log("Unrecognized country name: "+M+"."),!1}function h(M,k,b){if(!k||typeof k!="string")return!1;var A=u[M](k),g,f,p;if(A){if(M==="USA-states")for(g=[],p=0;p<b.length;p++)f=b[p],f.properties&&f.properties.gu&&f.properties.gu==="USA"&&g.push(f);else g=b;for(p=0;p<g.length;p++)if(f=g[p],f.id===A)return f;a.log(["Location with id",A,"does not have a matching topojson feature at this resolution."].join(" "))}return!1}function y(M){var k=M.geometry,b=k.coordinates,A=M.id,g=[],f,p,x,N;function D(B){for(var U=0;U<B.length-1;U++)if(B[U][0]>0&&B[U+1][0]<0)return U;return null}switch(A==="RUS"||A==="FJI"?f=function(B){var U;if(D(B)===null)U=B;else for(U=new Array(B.length),N=0;N<B.length;N++)U[N]=[B[N][0]<0?B[N][0]+360:B[N][0],B[N][1]];g.push(s.tester(U))}:A==="ATA"?f=function(B){var U=D(B);if(U===null)return g.push(s.tester(B));var V=new Array(B.length+1),q=0;for(N=0;N<B.length;N++)N>U?V[q++]=[B[N][0]+360,B[N][1]]:N===U?(V[q++]=B[N],V[q++]=[B[N][0],-90]):V[q++]=B[N];var z=s.tester(V);z.pts.pop(),g.push(z)}:f=function(B){g.push(s.tester(B))},k.type){case"MultiPolygon":for(p=0;p<b.length;p++)for(x=0;x<b[p].length;x++)f(b[p][x]);break;case"Polygon":for(p=0;p<b.length;p++)f(b[p]);break}return g}function m(M){var k=M.geojson,b=window.PlotlyGeoAssets||{},A=typeof k=="string"?b[k]:k;return l(A)?A:(a.error("Oops ... something went wrong when fetching "+k),!1)}function E(M){var k=M[0].trace,b=m(k);if(!b)return!1;var A={},g=[],f;for(f=0;f<k._length;f++){var p=M[f];(p.loc||p.loc===0)&&(A[p.loc]=p)}function x(B){var U=i(B,k.featureidkey||"id").get(),V=A[U];if(V){var q=B.geometry;if(q.type==="Polygon"||q.type==="MultiPolygon"){var z={type:"Feature",id:U,geometry:q,properties:{}};z.geometry.coordinates.length>0?z.properties.ct=c(z):z.properties.ct=[NaN,NaN],V.fIn=B,V.fOut=z,g.push(z)}else a.log(["Location",V.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete A[U]}switch(b.type){case"FeatureCollection":var N=b.features;for(f=0;f<N.length;f++)x(N[f]);break;case"Feature":x(b);break;default:return a.warn(["Invalid GeoJSON type",(b.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var D in A)a.log(["Location *"+D+"*","does not have a matching feature with id-key","*"+k.featureidkey+"*."].join(" "));return g}function c(M){var k=M.geometry,b;if(k.type==="MultiPolygon")for(var A=k.coordinates,g=0,f=0;f<A.length;f++){var p={type:"Polygon",coordinates:A[f]},x=C(p);x>g&&(g=x,b=p)}else b=k;return P(b).geometry.coordinates}function _(M){var k=window.PlotlyGeoAssets||{},b=[];function A(N){return new Promise(function(D,B){v.json(N,function(U,V){if(U){delete k[N];var q=U.status===404?'GeoJSON at URL "'+N+'" does not exist.':"Unexpected error while fetching from "+N;return B(new Error(q))}return k[N]=V,D(V)})})}function g(N){return new Promise(function(D,B){var U=0,V=setInterval(function(){if(k[N]&&k[N]!=="pending")return clearInterval(V),D(k[N]);if(U>100)return clearInterval(V),B("Unexpected error while fetching from "+N);U++},50)})}for(var f=0;f<M.length;f++){var p=M[f][0].trace,x=p.geojson;typeof x=="string"&&(k[x]?k[x]==="pending"&&b.push(g(x)):(k[x]="pending",b.push(A(x))))}return b}function T(M){return t(M)}Z.exports={locationToFeature:h,feature2polygons:y,getTraceGeojson:m,extractTraceFeature:E,fetchTraceGeoData:_,computeBbox:T}}}),cN=Ne({"src/traces/scattergeo/style.js"(te,Z){var v=xn(),w=zs(),C=io(),P=Hh(),t=P.stylePoints,r=P.styleText;Z.exports=function(i,s){s&&a(i,s)};function a(l,i){var s=i[0].trace,o=i[0].node3;o.style("opacity",i[0].trace.opacity),t(o,s,l),r(o,s,l),o.selectAll("path.js-line").style("fill","none").each(function(u){var d=v.select(this),h=u.trace,y=h.line||{};d.call(C.stroke,y.color).call(w.dashLine,y.dash||"",y.width||0),h.fill!=="none"&&d.call(C.fill,h.fillcolor)})}}}),fN=Ne({"src/traces/scattergeo/plot.js"(te,Z){var v=xn(),w=In(),C=yR().getTopojsonFeatures,P=Ib(),t=Db(),r=Cm().findExtremes,a=ja().BADNUM,l=Uv().calcMarkerSize,i=vu(),s=cN();function o(d,h,y){var m=h.layers.frontplot.select(".scatterlayer"),E=w.makeTraceGroups(m,y,"trace scattergeo");function c(_,T){_.lonlat[0]===a&&v.select(T).remove()}E.selectAll("*").remove(),E.each(function(_){var T=v.select(this),M=_[0].trace;if(i.hasLines(M)||M.fill!=="none"){var k=P.calcTraceToLineCoords(_),b=M.fill!=="none"?P.makePolygon(k):P.makeLine(k);T.selectAll("path.js-line").data([{geojson:b,trace:M}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}i.hasMarkers(M)&&T.selectAll("path.point").data(w.identity).enter().append("path").classed("point",!0).each(function(A){c(A,this)}),i.hasText(M)&&T.selectAll("g").data(w.identity).enter().append("g").append("text").each(function(A){c(A,this)}),s(d,_)})}function u(d,h){var y=d[0].trace,m=h[y.geo],E=m._subplot,c=y._length,_,T;if(w.isArrayOrTypedArray(y.locations)){var M=y.locationmode,k=M==="geojson-id"?t.extractTraceFeature(d):C(y,E.topojson);for(_=0;_<c;_++){T=d[_];var b=M==="geojson-id"?T.fOut:t.locationToFeature(M,T.loc,k);T.lonlat=b?b.properties.ct:[a,a]}}var A={padded:!0},g,f;if(m.fitbounds==="geojson"&&y.locationmode==="geojson-id"){var p=t.computeBbox(t.getTraceGeojson(y));g=[p[0],p[2]],f=[p[1],p[3]]}else{for(g=new Array(c),f=new Array(c),_=0;_<c;_++)T=d[_],g[_]=T.lonlat[0],f[_]=T.lonlat[1];A.ppad=l(y,c)}y._extremes.lon=r(m.lonaxis._ax,g,A),y._extremes.lat=r(m.lataxis._ax,f,A)}Z.exports={calcGeoJSON:u,plot:o}}}),AJ=Ne({"src/traces/scattergeo/hover.js"(te,Z){var v=nh(),w=ja().BADNUM,C=G1(),P=In().fillText,t=v3();Z.exports=function(l,i,s){var o=l.cd,u=o[0].trace,d=l.xa,h=l.ya,y=l.subplot,m=y.projection.isLonLatOverEdges,E=y.project;function c(g){var f=g.lonlat;if(f[0]===w||m(f))return 1/0;var p=E(f),x=E([i,s]),N=Math.abs(p[0]-x[0]),D=Math.abs(p[1]-x[1]),B=Math.max(3,g.mrc||0);return Math.max(Math.sqrt(N*N+D*D)-B,1-3/B)}if(v.getClosest(o,c,l),l.index!==!1){var _=o[l.index],T=_.lonlat,M=[d.c2p(T),h.c2p(T)],k=_.mrc||1;l.x0=M[0]-k,l.x1=M[0]+k,l.y0=M[1]-k,l.y1=M[1]+k,l.loc=_.loc,l.lon=T[0],l.lat=T[1];var b={};b[u.geo]={_subplot:y};var A=u._module.formatLabels(_,u,b);return l.lonLabel=A.lonLabel,l.latLabel=A.latLabel,l.color=C(u,_),l.extraText=r(u,_,l,o[0].t.labels),l.hovertemplate=u.hovertemplate,[l]}};function r(a,l,i,s){if(a.hovertemplate)return;var o=l.hi||a.hoverinfo,u=o==="all"?t.hoverinfo.flags:o.split("+"),d=u.indexOf("location")!==-1&&Array.isArray(a.locations),h=u.indexOf("lon")!==-1,y=u.indexOf("lat")!==-1,m=u.indexOf("text")!==-1,E=[];function c(_){return _+"°"}return d?E.push(l.loc):h&&y?E.push("("+c(i.latLabel)+", "+c(i.lonLabel)+")"):h?E.push(s.lon+c(i.lonLabel)):y&&E.push(s.lat+c(i.latLabel)),m&&P(l,a,E),E.join("<br>")}}}),SJ=Ne({"src/traces/scattergeo/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){w.lon=C.lon,w.lat=C.lat,w.location=C.loc?C.loc:null;var a=t[r];return a.fIn&&a.fIn.properties&&(w.properties=a.fIn.properties),w}}}),EJ=Ne({"src/traces/scattergeo/select.js"(te,Z){var v=vu(),w=ja().BADNUM;Z.exports=function(P,t){var r=P.cd,a=P.xaxis,l=P.yaxis,i=[],s=r[0].trace,o,u,d,h,y,m=!v.hasMarkers(s)&&!v.hasText(s);if(m)return[];if(t===!1)for(y=0;y<r.length;y++)r[y].selected=0;else for(y=0;y<r.length;y++)o=r[y],u=o.lonlat,u[0]!==w&&(d=a.c2p(u),h=l.c2p(u),t.contains([d,h],null,y,P)?(i.push({pointNumber:y,lon:u[0],lat:u[1]}),o.selected=1):o.selected=0);return i}}}),s6=Ne({"node_modules/d3-array/dist/d3-array.js"(te,Z){(function(v,w){w(typeof te=="object"&&typeof Z<"u"?te:v.d3=v.d3||{})})(te,function(v){function w(se,ee){return se<ee?-1:se>ee?1:se>=ee?0:NaN}function C(se){return se.length===1&&(se=P(se)),{left:function(ee,pe,oe,Y){for(oe==null&&(oe=0),Y==null&&(Y=ee.length);oe<Y;){var ce=oe+Y>>>1;se(ee[ce],pe)<0?oe=ce+1:Y=ce}return oe},right:function(ee,pe,oe,Y){for(oe==null&&(oe=0),Y==null&&(Y=ee.length);oe<Y;){var ce=oe+Y>>>1;se(ee[ce],pe)>0?Y=ce:oe=ce+1}return oe}}}function P(se){return function(ee,pe){return w(se(ee),pe)}}var t=C(w),r=t.right,a=t.left;function l(se,ee){ee==null&&(ee=i);for(var pe=0,oe=se.length-1,Y=se[0],ce=new Array(oe<0?0:oe);pe<oe;)ce[pe]=ee(Y,Y=se[++pe]);return ce}function i(se,ee){return[se,ee]}function s(se,ee,pe){var oe=se.length,Y=ee.length,ce=new Array(oe*Y),ue,_e,Le,ze;for(pe==null&&(pe=i),ue=Le=0;ue<oe;++ue)for(ze=se[ue],_e=0;_e<Y;++_e,++Le)ce[Le]=pe(ze,ee[_e]);return ce}function o(se,ee){return ee<se?-1:ee>se?1:ee>=se?0:NaN}function u(se){return se===null?NaN:+se}function d(se,ee){var pe=se.length,oe=0,Y=-1,ce=0,ue,_e,Le=0;if(ee==null)for(;++Y<pe;)isNaN(ue=u(se[Y]))||(_e=ue-ce,ce+=_e/++oe,Le+=_e*(ue-ce));else for(;++Y<pe;)isNaN(ue=u(ee(se[Y],Y,se)))||(_e=ue-ce,ce+=_e/++oe,Le+=_e*(ue-ce));if(oe>1)return Le/(oe-1)}function h(se,ee){var pe=d(se,ee);return pe&&Math.sqrt(pe)}function y(se,ee){var pe=se.length,oe=-1,Y,ce,ue;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=ue=Y;++oe<pe;)(Y=se[oe])!=null&&(ce>Y&&(ce=Y),ue<Y&&(ue=Y))}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=ue=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&(ce>Y&&(ce=Y),ue<Y&&(ue=Y));return[ce,ue]}var m=Array.prototype,E=m.slice,c=m.map;function _(se){return function(){return se}}function T(se){return se}function M(se,ee,pe){se=+se,ee=+ee,pe=(Y=arguments.length)<2?(ee=se,se=0,1):Y<3?1:+pe;for(var oe=-1,Y=Math.max(0,Math.ceil((ee-se)/pe))|0,ce=new Array(Y);++oe<Y;)ce[oe]=se+oe*pe;return ce}var k=Math.sqrt(50),b=Math.sqrt(10),A=Math.sqrt(2);function g(se,ee,pe){var oe,Y=-1,ce,ue,_e;if(ee=+ee,se=+se,pe=+pe,se===ee&&pe>0)return[se];if((oe=ee<se)&&(ce=se,se=ee,ee=ce),(_e=f(se,ee,pe))===0||!isFinite(_e))return[];if(_e>0)for(se=Math.ceil(se/_e),ee=Math.floor(ee/_e),ue=new Array(ce=Math.ceil(ee-se+1));++Y<ce;)ue[Y]=(se+Y)*_e;else for(se=Math.floor(se*_e),ee=Math.ceil(ee*_e),ue=new Array(ce=Math.ceil(se-ee+1));++Y<ce;)ue[Y]=(se-Y)/_e;return oe&&ue.reverse(),ue}function f(se,ee,pe){var oe=(ee-se)/Math.max(0,pe),Y=Math.floor(Math.log(oe)/Math.LN10),ce=oe/Math.pow(10,Y);return Y>=0?(ce>=k?10:ce>=b?5:ce>=A?2:1)*Math.pow(10,Y):-Math.pow(10,-Y)/(ce>=k?10:ce>=b?5:ce>=A?2:1)}function p(se,ee,pe){var oe=Math.abs(ee-se)/Math.max(0,pe),Y=Math.pow(10,Math.floor(Math.log(oe)/Math.LN10)),ce=oe/Y;return ce>=k?Y*=10:ce>=b?Y*=5:ce>=A&&(Y*=2),ee<se?-Y:Y}function x(se){return Math.ceil(Math.log(se.length)/Math.LN2)+1}function N(){var se=T,ee=y,pe=x;function oe(Y){var ce,ue=Y.length,_e,Le=new Array(ue);for(ce=0;ce<ue;++ce)Le[ce]=se(Y[ce],ce,Y);var ze=ee(Le),Ge=ze[0],Ve=ze[1],rt=pe(Le,Ge,Ve);Array.isArray(rt)||(rt=p(Ge,Ve,rt),rt=M(Math.ceil(Ge/rt)*rt,Ve,rt));for(var pt=rt.length;rt[0]<=Ge;)rt.shift(),--pt;for(;rt[pt-1]>Ve;)rt.pop(),--pt;var gt=new Array(pt+1),ht;for(ce=0;ce<=pt;++ce)ht=gt[ce]=[],ht.x0=ce>0?rt[ce-1]:Ge,ht.x1=ce<pt?rt[ce]:Ve;for(ce=0;ce<ue;++ce)_e=Le[ce],Ge<=_e&&_e<=Ve&&gt[r(rt,_e,0,pt)].push(Y[ce]);return gt}return oe.value=function(Y){return arguments.length?(se=typeof Y=="function"?Y:_(Y),oe):se},oe.domain=function(Y){return arguments.length?(ee=typeof Y=="function"?Y:_([Y[0],Y[1]]),oe):ee},oe.thresholds=function(Y){return arguments.length?(pe=typeof Y=="function"?Y:Array.isArray(Y)?_(E.call(Y)):_(Y),oe):pe},oe}function D(se,ee,pe){if(pe==null&&(pe=u),!!(oe=se.length)){if((ee=+ee)<=0||oe<2)return+pe(se[0],0,se);if(ee>=1)return+pe(se[oe-1],oe-1,se);var oe,Y=(oe-1)*ee,ce=Math.floor(Y),ue=+pe(se[ce],ce,se),_e=+pe(se[ce+1],ce+1,se);return ue+(_e-ue)*(Y-ce)}}function B(se,ee,pe){return se=c.call(se,u).sort(w),Math.ceil((pe-ee)/(2*(D(se,.75)-D(se,.25))*Math.pow(se.length,-1/3)))}function U(se,ee,pe){return Math.ceil((pe-ee)/(3.5*h(se)*Math.pow(se.length,-1/3)))}function V(se,ee){var pe=se.length,oe=-1,Y,ce;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=se[oe])!=null&&Y>ce&&(ce=Y)}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&Y>ce&&(ce=Y);return ce}function q(se,ee){var pe=se.length,oe=pe,Y=-1,ce,ue=0;if(ee==null)for(;++Y<pe;)isNaN(ce=u(se[Y]))?--oe:ue+=ce;else for(;++Y<pe;)isNaN(ce=u(ee(se[Y],Y,se)))?--oe:ue+=ce;if(oe)return ue/oe}function z(se,ee){var pe=se.length,oe=-1,Y,ce=[];if(ee==null)for(;++oe<pe;)isNaN(Y=u(se[oe]))||ce.push(Y);else for(;++oe<pe;)isNaN(Y=u(ee(se[oe],oe,se)))||ce.push(Y);return D(ce.sort(w),.5)}function H(se){for(var ee=se.length,pe,oe=-1,Y=0,ce,ue;++oe<ee;)Y+=se[oe].length;for(ce=new Array(Y);--ee>=0;)for(ue=se[ee],pe=ue.length;--pe>=0;)ce[--Y]=ue[pe];return ce}function G(se,ee){var pe=se.length,oe=-1,Y,ce;if(ee==null){for(;++oe<pe;)if((Y=se[oe])!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=se[oe])!=null&&ce>Y&&(ce=Y)}else for(;++oe<pe;)if((Y=ee(se[oe],oe,se))!=null&&Y>=Y)for(ce=Y;++oe<pe;)(Y=ee(se[oe],oe,se))!=null&&ce>Y&&(ce=Y);return ce}function J(se,ee){for(var pe=ee.length,oe=new Array(pe);pe--;)oe[pe]=se[ee[pe]];return oe}function le(se,ee){if(pe=se.length){var pe,oe=0,Y=0,ce,ue=se[Y];for(ee==null&&(ee=w);++oe<pe;)(ee(ce=se[oe],ue)<0||ee(ue,ue)!==0)&&(ue=ce,Y=oe);if(ee(ue,ue)===0)return Y}}function ye(se,ee,pe){for(var oe=(pe??se.length)-(ee=ee==null?0:+ee),Y,ce;oe;)ce=Math.random()*oe--|0,Y=se[oe+ee],se[oe+ee]=se[ce+ee],se[ce+ee]=Y;return se}function de(se,ee){var pe=se.length,oe=-1,Y,ce=0;if(ee==null)for(;++oe<pe;)(Y=+se[oe])&&(ce+=Y);else for(;++oe<pe;)(Y=+ee(se[oe],oe,se))&&(ce+=Y);return ce}function me(se){if(!(ce=se.length))return[];for(var ee=-1,pe=G(se,W),oe=new Array(pe);++ee<pe;)for(var Y=-1,ce,ue=oe[ee]=new Array(ce);++Y<ce;)ue[Y]=se[Y][ee];return oe}function W(se){return se.length}function ie(){return me(arguments)}v.bisect=r,v.bisectRight=r,v.bisectLeft=a,v.ascending=w,v.bisector=C,v.cross=s,v.descending=o,v.deviation=h,v.extent=y,v.histogram=N,v.thresholdFreedmanDiaconis=B,v.thresholdScott=U,v.thresholdSturges=x,v.max=V,v.mean=q,v.median=z,v.merge=H,v.min=G,v.pairs=l,v.permute=J,v.quantile=D,v.range=M,v.scan=le,v.shuffle=ye,v.sum=de,v.ticks=g,v.tickIncrement=f,v.tickStep=p,v.transpose=me,v.variance=d,v.zip=ie,Object.defineProperty(v,"__esModule",{value:!0})})}}),hN=Ne({"node_modules/d3-geo/dist/d3-geo.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,s6()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(wr){r(t,wr,this.t),r(this,t.s,this.s),this.s?this.t+=t.t:this.s=t.t},valueOf:function(){return this.s}};var t=new P;function r(wr,Hr,kn){var _n=wr.s=Hr+kn,$n=_n-Hr,Ga=_n-$n;wr.t=Hr-Ga+(kn-$n)}var a=1e-6,l=1e-12,i=Math.PI,s=i/2,o=i/4,u=i*2,d=180/i,h=i/180,y=Math.abs,m=Math.atan,E=Math.atan2,c=Math.cos,_=Math.ceil,T=Math.exp,M=Math.log,k=Math.pow,b=Math.sin,A=Math.sign||function(wr){return wr>0?1:wr<0?-1:0},g=Math.sqrt,f=Math.tan;function p(wr){return wr>1?0:wr<-1?i:Math.acos(wr)}function x(wr){return wr>1?s:wr<-1?-s:Math.asin(wr)}function N(wr){return(wr=b(wr/2))*wr}function D(){}function B(wr,Hr){wr&&V.hasOwnProperty(wr.type)&&V[wr.type](wr,Hr)}var U={Feature:function(wr,Hr){B(wr.geometry,Hr)},FeatureCollection:function(wr,Hr){for(var kn=wr.features,_n=-1,$n=kn.length;++_n<$n;)B(kn[_n].geometry,Hr)}},V={Sphere:function(wr,Hr){Hr.sphere()},Point:function(wr,Hr){wr=wr.coordinates,Hr.point(wr[0],wr[1],wr[2])},MultiPoint:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)wr=kn[_n],Hr.point(wr[0],wr[1],wr[2])},LineString:function(wr,Hr){q(wr.coordinates,Hr,0)},MultiLineString:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)q(kn[_n],Hr,0)},Polygon:function(wr,Hr){z(wr.coordinates,Hr)},MultiPolygon:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)z(kn[_n],Hr)},GeometryCollection:function(wr,Hr){for(var kn=wr.geometries,_n=-1,$n=kn.length;++_n<$n;)B(kn[_n],Hr)}};function q(wr,Hr,kn){var _n=-1,$n=wr.length-kn,Ga;for(Hr.lineStart();++_n<$n;)Ga=wr[_n],Hr.point(Ga[0],Ga[1],Ga[2]);Hr.lineEnd()}function z(wr,Hr){var kn=-1,_n=wr.length;for(Hr.polygonStart();++kn<_n;)q(wr[kn],Hr,1);Hr.polygonEnd()}function H(wr,Hr){wr&&U.hasOwnProperty(wr.type)?U[wr.type](wr,Hr):B(wr,Hr)}var G=C(),J=C(),le,ye,de,me,W,ie={point:D,lineStart:D,lineEnd:D,polygonStart:function(){G.reset(),ie.lineStart=se,ie.lineEnd=ee},polygonEnd:function(){var wr=+G;J.add(wr<0?u+wr:wr),this.lineStart=this.lineEnd=this.point=D},sphere:function(){J.add(u)}};function se(){ie.point=pe}function ee(){oe(le,ye)}function pe(wr,Hr){ie.point=oe,le=wr,ye=Hr,wr*=h,Hr*=h,de=wr,me=c(Hr=Hr/2+o),W=b(Hr)}function oe(wr,Hr){wr*=h,Hr*=h,Hr=Hr/2+o;var kn=wr-de,_n=kn>=0?1:-1,$n=_n*kn,Ga=c(Hr),Ba=b(Hr),wi=W*Ba,ki=me*Ga+wi*c($n),to=wi*_n*b($n);G.add(E(to,ki)),de=wr,me=Ga,W=Ba}function Y(wr){return J.reset(),H(wr,ie),J*2}function ce(wr){return[E(wr[1],wr[0]),x(wr[2])]}function ue(wr){var Hr=wr[0],kn=wr[1],_n=c(kn);return[_n*c(Hr),_n*b(Hr),b(kn)]}function _e(wr,Hr){return wr[0]*Hr[0]+wr[1]*Hr[1]+wr[2]*Hr[2]}function Le(wr,Hr){return[wr[1]*Hr[2]-wr[2]*Hr[1],wr[2]*Hr[0]-wr[0]*Hr[2],wr[0]*Hr[1]-wr[1]*Hr[0]]}function ze(wr,Hr){wr[0]+=Hr[0],wr[1]+=Hr[1],wr[2]+=Hr[2]}function Ge(wr,Hr){return[wr[0]*Hr,wr[1]*Hr,wr[2]*Hr]}function Ve(wr){var Hr=g(wr[0]*wr[0]+wr[1]*wr[1]+wr[2]*wr[2]);wr[0]/=Hr,wr[1]/=Hr,wr[2]/=Hr}var rt,pt,gt,ht,lt,Fe,Pe,be,Ye=C(),mt,bt,ft={point:Wt,lineStart:cr,lineEnd:pr,polygonStart:function(){ft.point=Br,ft.lineStart=Fr,ft.lineEnd=cn,Ye.reset(),ie.polygonStart()},polygonEnd:function(){ie.polygonEnd(),ft.point=Wt,ft.lineStart=cr,ft.lineEnd=pr,G<0?(rt=-(gt=180),pt=-(ht=90)):Ye>a?ht=90:Ye<-a&&(pt=-90),bt[0]=rt,bt[1]=gt},sphere:function(){rt=-(gt=180),pt=-(ht=90)}};function Wt(wr,Hr){mt.push(bt=[rt=wr,gt=wr]),Hr<pt&&(pt=Hr),Hr>ht&&(ht=Hr)}function Zt(wr,Hr){var kn=ue([wr*h,Hr*h]);if(be){var _n=Le(be,kn),$n=[_n[1],-_n[0],0],Ga=Le($n,_n);Ve(Ga),Ga=ce(Ga);var Ba=wr-lt,wi=Ba>0?1:-1,ki=Ga[0]*d*wi,to,ci=y(Ba)>180;ci^(wi*lt<ki&&ki<wi*wr)?(to=Ga[1]*d,to>ht&&(ht=to)):(ki=(ki+360)%360-180,ci^(wi*lt<ki&&ki<wi*wr)?(to=-Ga[1]*d,to<pt&&(pt=to)):(Hr<pt&&(pt=Hr),Hr>ht&&(ht=Hr))),ci?wr<lt?Nr(rt,wr)>Nr(rt,gt)&&(gt=wr):Nr(wr,gt)>Nr(rt,gt)&&(rt=wr):gt>=rt?(wr<rt&&(rt=wr),wr>gt&&(gt=wr)):wr>lt?Nr(rt,wr)>Nr(rt,gt)&&(gt=wr):Nr(wr,gt)>Nr(rt,gt)&&(rt=wr)}else mt.push(bt=[rt=wr,gt=wr]);Hr<pt&&(pt=Hr),Hr>ht&&(ht=Hr),be=kn,lt=wr}function cr(){ft.point=Zt}function pr(){bt[0]=rt,bt[1]=gt,ft.point=Wt,be=null}function Br(wr,Hr){if(be){var kn=wr-lt;Ye.add(y(kn)>180?kn+(kn>0?360:-360):kn)}else Fe=wr,Pe=Hr;ie.point(wr,Hr),Zt(wr,Hr)}function Fr(){ie.lineStart()}function cn(){Br(Fe,Pe),ie.lineEnd(),y(Ye)>a&&(rt=-(gt=180)),bt[0]=rt,bt[1]=gt,be=null}function Nr(wr,Hr){return(Hr-=wr)<0?Hr+360:Hr}function Jr(wr,Hr){return wr[0]-Hr[0]}function Dt(wr,Hr){return wr[0]<=wr[1]?wr[0]<=Hr&&Hr<=wr[1]:Hr<wr[0]||wr[1]<Hr}function $e(wr){var Hr,kn,_n,$n,Ga,Ba,wi;if(ht=gt=-(rt=pt=1/0),mt=[],H(wr,ft),kn=mt.length){for(mt.sort(Jr),Hr=1,_n=mt[0],Ga=[_n];Hr<kn;++Hr)$n=mt[Hr],Dt(_n,$n[0])||Dt(_n,$n[1])?(Nr(_n[0],$n[1])>Nr(_n[0],_n[1])&&(_n[1]=$n[1]),Nr($n[0],_n[1])>Nr(_n[0],_n[1])&&(_n[0]=$n[0])):Ga.push(_n=$n);for(Ba=-1/0,kn=Ga.length-1,Hr=0,_n=Ga[kn];Hr<=kn;_n=$n,++Hr)$n=Ga[Hr],(wi=Nr(_n[1],$n[0]))>Ba&&(Ba=wi,rt=$n[0],gt=_n[1])}return mt=bt=null,rt===1/0||pt===1/0?[[NaN,NaN],[NaN,NaN]]:[[rt,pt],[gt,ht]]}var ot,De,Ee,Ae,Ie,tt,st,Ft,Nt,Xt,lr,Rr,Mr,Sr,Kr,qn,ha={sphere:D,point:ia,lineStart:ba,lineEnd:ui,polygonStart:function(){ha.lineStart=_r,ha.lineEnd=Qt},polygonEnd:function(){ha.lineStart=ba,ha.lineEnd=ui}};function ia(wr,Hr){wr*=h,Hr*=h;var kn=c(Hr);xa(kn*c(wr),kn*b(wr),b(Hr))}function xa(wr,Hr,kn){++ot,Ee+=(wr-Ee)/ot,Ae+=(Hr-Ae)/ot,Ie+=(kn-Ie)/ot}function ba(){ha.point=ea}function ea(wr,Hr){wr*=h,Hr*=h;var kn=c(Hr);Sr=kn*c(wr),Kr=kn*b(wr),qn=b(Hr),ha.point=Za,xa(Sr,Kr,qn)}function Za(wr,Hr){wr*=h,Hr*=h;var kn=c(Hr),_n=kn*c(wr),$n=kn*b(wr),Ga=b(Hr),Ba=E(g((Ba=Kr*Ga-qn*$n)*Ba+(Ba=qn*_n-Sr*Ga)*Ba+(Ba=Sr*$n-Kr*_n)*Ba),Sr*_n+Kr*$n+qn*Ga);De+=Ba,tt+=Ba*(Sr+(Sr=_n)),st+=Ba*(Kr+(Kr=$n)),Ft+=Ba*(qn+(qn=Ga)),xa(Sr,Kr,qn)}function ui(){ha.point=ia}function _r(){ha.point=yr}function Qt(){br(Rr,Mr),ha.point=ia}function yr(wr,Hr){Rr=wr,Mr=Hr,wr*=h,Hr*=h,ha.point=br;var kn=c(Hr);Sr=kn*c(wr),Kr=kn*b(wr),qn=b(Hr),xa(Sr,Kr,qn)}function br(wr,Hr){wr*=h,Hr*=h;var kn=c(Hr),_n=kn*c(wr),$n=kn*b(wr),Ga=b(Hr),Ba=Kr*Ga-qn*$n,wi=qn*_n-Sr*Ga,ki=Sr*$n-Kr*_n,to=g(Ba*Ba+wi*wi+ki*ki),ci=x(to),qi=to&&-ci/to;Nt+=qi*Ba,Xt+=qi*wi,lr+=qi*ki,De+=ci,tt+=ci*(Sr+(Sr=_n)),st+=ci*(Kr+(Kr=$n)),Ft+=ci*(qn+(qn=Ga)),xa(Sr,Kr,qn)}function nn(wr){ot=De=Ee=Ae=Ie=tt=st=Ft=Nt=Xt=lr=0,H(wr,ha);var Hr=Nt,kn=Xt,_n=lr,$n=Hr*Hr+kn*kn+_n*_n;return $n<l&&(Hr=tt,kn=st,_n=Ft,De<a&&(Hr=Ee,kn=Ae,_n=Ie),$n=Hr*Hr+kn*kn+_n*_n,$n<l)?[NaN,NaN]:[E(kn,Hr)*d,x(_n/g($n))*d]}function wn(wr){return function(){return wr}}function Ln(wr,Hr){function kn(_n,$n){return _n=wr(_n,$n),Hr(_n[0],_n[1])}return wr.invert&&Hr.invert&&(kn.invert=function(_n,$n){return _n=Hr.invert(_n,$n),_n&&wr.invert(_n[0],_n[1])}),kn}function Fn(wr,Hr){return[y(wr)>i?wr+Math.round(-wr/u)*u:wr,Hr]}Fn.invert=Fn;function va(wr,Hr,kn){return(wr%=u)?Hr||kn?Ln(Pa(wr),Fa(Hr,kn)):Pa(wr):Hr||kn?Fa(Hr,kn):Fn}function Da(wr){return function(Hr,kn){return Hr+=wr,[Hr>i?Hr-u:Hr<-i?Hr+u:Hr,kn]}}function Pa(wr){var Hr=Da(wr);return Hr.invert=Da(-wr),Hr}function Fa(wr,Hr){var kn=c(wr),_n=b(wr),$n=c(Hr),Ga=b(Hr);function Ba(wi,ki){var to=c(ki),ci=c(wi)*to,qi=b(wi)*to,xi=b(ki),oi=xi*kn+ci*_n;return[E(qi*$n-oi*Ga,ci*kn-xi*_n),x(oi*$n+qi*Ga)]}return Ba.invert=function(wi,ki){var to=c(ki),ci=c(wi)*to,qi=b(wi)*to,xi=b(ki),oi=xi*$n-qi*Ga;return[E(qi*$n+xi*Ga,ci*kn+oi*_n),x(oi*kn-ci*_n)]},Ba}function $a(wr){wr=va(wr[0]*h,wr[1]*h,wr.length>2?wr[2]*h:0);function Hr(kn){return kn=wr(kn[0]*h,kn[1]*h),kn[0]*=d,kn[1]*=d,kn}return Hr.invert=function(kn){return kn=wr.invert(kn[0]*h,kn[1]*h),kn[0]*=d,kn[1]*=d,kn},Hr}function oa(wr,Hr,kn,_n,$n,Ga){if(kn){var Ba=c(Hr),wi=b(Hr),ki=_n*kn;$n==null?($n=Hr+_n*u,Ga=Hr-ki/2):($n=zi(Ba,$n),Ga=zi(Ba,Ga),(_n>0?$n<Ga:$n>Ga)&&($n+=_n*u));for(var to,ci=$n;_n>0?ci>Ga:ci<Ga;ci-=ki)to=ce([Ba,-wi*c(ci),-wi*b(ci)]),wr.point(to[0],to[1])}}function zi(wr,Hr){Hr=ue(Hr),Hr[0]-=wr,Ve(Hr);var kn=p(-Hr[1]);return((-Hr[2]<0?-kn:kn)+u-a)%u}function Gi(){var wr=wn([0,0]),Hr=wn(90),kn=wn(6),_n,$n,Ga={point:Ba};function Ba(ki,to){_n.push(ki=$n(ki,to)),ki[0]*=d,ki[1]*=d}function wi(){var ki=wr.apply(this,arguments),to=Hr.apply(this,arguments)*h,ci=kn.apply(this,arguments)*h;return _n=[],$n=va(-ki[0]*h,-ki[1]*h,0).invert,oa(Ga,to,ci,1),ki={type:"Polygon",coordinates:[_n]},_n=$n=null,ki}return wi.center=function(ki){return arguments.length?(wr=typeof ki=="function"?ki:wn([+ki[0],+ki[1]]),wi):wr},wi.radius=function(ki){return arguments.length?(Hr=typeof ki=="function"?ki:wn(+ki),wi):Hr},wi.precision=function(ki){return arguments.length?(kn=typeof ki=="function"?ki:wn(+ki),wi):kn},wi}function qt(){var wr=[],Hr;return{point:function(kn,_n,$n){Hr.push([kn,_n,$n])},lineStart:function(){wr.push(Hr=[])},lineEnd:D,rejoin:function(){wr.length>1&&wr.push(wr.pop().concat(wr.shift()))},result:function(){var kn=wr;return wr=[],Hr=null,kn}}}function Ct(wr,Hr){return y(wr[0]-Hr[0])<a&&y(wr[1]-Hr[1])<a}function Ur(wr,Hr,kn,_n){this.x=wr,this.z=Hr,this.o=kn,this.e=_n,this.v=!1,this.n=this.p=null}function Qr(wr,Hr,kn,_n,$n){var Ga=[],Ba=[],wi,ki;if(wr.forEach(function(fo){if(!((Qo=fo.length-1)<=0)){var Qo,Yo=fo[0],is=fo[Qo],ts;if(Ct(Yo,is)){if(!Yo[2]&&!is[2]){for($n.lineStart(),wi=0;wi<Qo;++wi)$n.point((Yo=fo[wi])[0],Yo[1]);$n.lineEnd();return}is[0]+=2*a}Ga.push(ts=new Ur(Yo,fo,null,!0)),Ba.push(ts.o=new Ur(Yo,null,ts,!1)),Ga.push(ts=new Ur(is,fo,null,!1)),Ba.push(ts.o=new Ur(is,null,ts,!0))}}),!!Ga.length){for(Ba.sort(Hr),tn(Ga),tn(Ba),wi=0,ki=Ba.length;wi<ki;++wi)Ba[wi].e=kn=!kn;for(var to=Ga[0],ci,qi;;){for(var xi=to,oi=!0;xi.v;)if((xi=xi.n)===to)return;ci=xi.z,$n.lineStart();do{if(xi.v=xi.o.v=!0,xi.e){if(oi)for(wi=0,ki=ci.length;wi<ki;++wi)$n.point((qi=ci[wi])[0],qi[1]);else _n(xi.x,xi.n.x,1,$n);xi=xi.n}else{if(oi)for(ci=xi.p.z,wi=ci.length-1;wi>=0;--wi)$n.point((qi=ci[wi])[0],qi[1]);else _n(xi.x,xi.p.x,-1,$n);xi=xi.p}xi=xi.o,ci=xi.z,oi=!oi}while(!xi.v);$n.lineEnd()}}}function tn(wr){if(Hr=wr.length){for(var Hr,kn=0,_n=wr[0],$n;++kn<Hr;)_n.n=$n=wr[kn],$n.p=_n,_n=$n;_n.n=$n=wr[0],$n.p=_n}}var Xr=C();function en(wr){return y(wr[0])<=i?wr[0]:A(wr[0])*((y(wr[0])+i)%u-i)}function Tn(wr,Hr){var kn=en(Hr),_n=Hr[1],$n=b(_n),Ga=[b(kn),-c(kn),0],Ba=0,wi=0;Xr.reset(),$n===1?_n=s+a:$n===-1&&(_n=-s-a);for(var ki=0,to=wr.length;ki<to;++ki)if(qi=(ci=wr[ki]).length)for(var ci,qi,xi=ci[qi-1],oi=en(xi),fo=xi[1]/2+o,Qo=b(fo),Yo=c(fo),is=0;is<qi;++is,oi=vo,Qo=ys,Yo=Ys,xi=ts){var ts=ci[is],vo=en(ts),Yi=ts[1]/2+o,ys=b(Yi),Ys=c(Yi),Rl=vo-oi,Ql=Rl>=0?1:-1,Dl=Ql*Rl,eu=Dl>i,cl=Qo*ys;if(Xr.add(E(cl*Ql*b(Dl),Yo*Ys+cl*c(Dl))),Ba+=eu?Rl+Ql*u:Rl,eu^oi>=kn^vo>=kn){var Du=Le(ue(xi),ue(ts));Ve(Du);var Pu=Le(Ga,Du);Ve(Pu);var Zl=(eu^Rl>=0?-1:1)*x(Pu[2]);(_n>Zl||_n===Zl&&(Du[0]||Du[1]))&&(wi+=eu^Rl>=0?1:-1)}}return(Ba<-a||Ba<a&&Xr<-a)^wi&1}function hn(wr,Hr,kn,_n){return function($n){var Ga=Hr($n),Ba=qt(),wi=Hr(Ba),ki=!1,to,ci,qi,xi={point:oi,lineStart:Qo,lineEnd:Yo,polygonStart:function(){xi.point=is,xi.lineStart=ts,xi.lineEnd=vo,ci=[],to=[]},polygonEnd:function(){xi.point=oi,xi.lineStart=Qo,xi.lineEnd=Yo,ci=w.merge(ci);var Yi=Tn(to,_n);ci.length?(ki||($n.polygonStart(),ki=!0),Qr(ci,xr,Yi,kn,$n)):Yi&&(ki||($n.polygonStart(),ki=!0),$n.lineStart(),kn(null,null,1,$n),$n.lineEnd()),ki&&($n.polygonEnd(),ki=!1),ci=to=null},sphere:function(){$n.polygonStart(),$n.lineStart(),kn(null,null,1,$n),$n.lineEnd(),$n.polygonEnd()}};function oi(Yi,ys){wr(Yi,ys)&&$n.point(Yi,ys)}function fo(Yi,ys){Ga.point(Yi,ys)}function Qo(){xi.point=fo,Ga.lineStart()}function Yo(){xi.point=oi,Ga.lineEnd()}function is(Yi,ys){qi.push([Yi,ys]),wi.point(Yi,ys)}function ts(){wi.lineStart(),qi=[]}function vo(){is(qi[0][0],qi[0][1]),wi.lineEnd();var Yi=wi.clean(),ys=Ba.result(),Ys,Rl=ys.length,Ql,Dl,eu;if(qi.pop(),to.push(qi),qi=null,!!Rl){if(Yi&1){if(Dl=ys[0],(Ql=Dl.length-1)>0){for(ki||($n.polygonStart(),ki=!0),$n.lineStart(),Ys=0;Ys<Ql;++Ys)$n.point((eu=Dl[Ys])[0],eu[1]);$n.lineEnd()}return}Rl>1&&Yi&2&&ys.push(ys.pop().concat(ys.shift())),ci.push(ys.filter(Rt))}}return xi}}function Rt(wr){return wr.length>1}function xr(wr,Hr){return((wr=wr.x)[0]<0?wr[1]-s-a:s-wr[1])-((Hr=Hr.x)[0]<0?Hr[1]-s-a:s-Hr[1])}var Wr=hn(function(){return!0},An,na,[-i,-s]);function An(wr){var Hr=NaN,kn=NaN,_n=NaN,$n;return{lineStart:function(){wr.lineStart(),$n=1},point:function(Ga,Ba){var wi=Ga>0?i:-i,ki=y(Ga-Hr);y(ki-i)<a?(wr.point(Hr,kn=(kn+Ba)/2>0?s:-s),wr.point(_n,kn),wr.lineEnd(),wr.lineStart(),wr.point(wi,kn),wr.point(Ga,kn),$n=0):_n!==wi&&ki>=i&&(y(Hr-_n)<a&&(Hr-=_n*a),y(Ga-wi)<a&&(Ga-=wi*a),kn=Xn(Hr,kn,Ga,Ba),wr.point(_n,kn),wr.lineEnd(),wr.lineStart(),wr.point(wi,kn),$n=0),wr.point(Hr=Ga,kn=Ba),_n=wi},lineEnd:function(){wr.lineEnd(),Hr=kn=NaN},clean:function(){return 2-$n}}}function Xn(wr,Hr,kn,_n){var $n,Ga,Ba=b(wr-kn);return y(Ba)>a?m((b(Hr)*(Ga=c(_n))*b(kn)-b(_n)*($n=c(Hr))*b(wr))/($n*Ga*Ba)):(Hr+_n)/2}function na(wr,Hr,kn,_n){var $n;if(wr==null)$n=kn*s,_n.point(-i,$n),_n.point(0,$n),_n.point(i,$n),_n.point(i,0),_n.point(i,-$n),_n.point(0,-$n),_n.point(-i,-$n),_n.point(-i,0),_n.point(-i,$n);else if(y(wr[0]-Hr[0])>a){var Ga=wr[0]<Hr[0]?i:-i;$n=kn*Ga/2,_n.point(-Ga,$n),_n.point(0,$n),_n.point(Ga,$n)}else _n.point(Hr[0],Hr[1])}function ra(wr){var Hr=c(wr),kn=6*h,_n=Hr>0,$n=y(Hr)>a;function Ga(ci,qi,xi,oi){oa(oi,wr,kn,xi,ci,qi)}function Ba(ci,qi){return c(ci)*c(qi)>Hr}function wi(ci){var qi,xi,oi,fo,Qo;return{lineStart:function(){fo=oi=!1,Qo=1},point:function(Yo,is){var ts=[Yo,is],vo,Yi=Ba(Yo,is),ys=_n?Yi?0:to(Yo,is):Yi?to(Yo+(Yo<0?i:-i),is):0;if(!qi&&(fo=oi=Yi)&&ci.lineStart(),Yi!==oi&&(vo=ki(qi,ts),(!vo||Ct(qi,vo)||Ct(ts,vo))&&(ts[2]=1)),Yi!==oi)Qo=0,Yi?(ci.lineStart(),vo=ki(ts,qi),ci.point(vo[0],vo[1])):(vo=ki(qi,ts),ci.point(vo[0],vo[1],2),ci.lineEnd()),qi=vo;else if($n&&qi&&_n^Yi){var Ys;!(ys&xi)&&(Ys=ki(ts,qi,!0))&&(Qo=0,_n?(ci.lineStart(),ci.point(Ys[0][0],Ys[0][1]),ci.point(Ys[1][0],Ys[1][1]),ci.lineEnd()):(ci.point(Ys[1][0],Ys[1][1]),ci.lineEnd(),ci.lineStart(),ci.point(Ys[0][0],Ys[0][1],3)))}Yi&&(!qi||!Ct(qi,ts))&&ci.point(ts[0],ts[1]),qi=ts,oi=Yi,xi=ys},lineEnd:function(){oi&&ci.lineEnd(),qi=null},clean:function(){return Qo|(fo&&oi)<<1}}}function ki(ci,qi,xi){var oi=ue(ci),fo=ue(qi),Qo=[1,0,0],Yo=Le(oi,fo),is=_e(Yo,Yo),ts=Yo[0],vo=is-ts*ts;if(!vo)return!xi&&ci;var Yi=Hr*is/vo,ys=-Hr*ts/vo,Ys=Le(Qo,Yo),Rl=Ge(Qo,Yi),Ql=Ge(Yo,ys);ze(Rl,Ql);var Dl=Ys,eu=_e(Rl,Dl),cl=_e(Dl,Dl),Du=eu*eu-cl*(_e(Rl,Rl)-1);if(!(Du<0)){var Pu=g(Du),Zl=Ge(Dl,(-eu-Pu)/cl);if(ze(Zl,Rl),Zl=ce(Zl),!xi)return Zl;var Oo=ci[0],Ls=qi[0],ql=ci[1],Al=qi[1],Tc;Ls<Oo&&(Tc=Oo,Oo=Ls,Ls=Tc);var Ac=Ls-Oo,Pc=y(Ac-i)<a,oh=Pc||Ac<a;if(!Pc&&Al<ql&&(Tc=ql,ql=Al,Al=Tc),oh?Pc?ql+Al>0^Zl[1]<(y(Zl[0]-Oo)<a?ql:Al):ql<=Zl[1]&&Zl[1]<=Al:Ac>i^(Oo<=Zl[0]&&Zl[0]<=Ls)){var Sc=Ge(Dl,(-eu+Pu)/cl);return ze(Sc,Rl),[Zl,ce(Sc)]}}}function to(ci,qi){var xi=_n?wr:i-wr,oi=0;return ci<-xi?oi|=1:ci>xi&&(oi|=2),qi<-xi?oi|=4:qi>xi&&(oi|=8),oi}return hn(Ba,wi,Ga,_n?[0,-wr]:[-i,wr-i])}function Sn(wr,Hr,kn,_n,$n,Ga){var Ba=wr[0],wi=wr[1],ki=Hr[0],to=Hr[1],ci=0,qi=1,xi=ki-Ba,oi=to-wi,fo;if(fo=kn-Ba,!(!xi&&fo>0)){if(fo/=xi,xi<0){if(fo<ci)return;fo<qi&&(qi=fo)}else if(xi>0){if(fo>qi)return;fo>ci&&(ci=fo)}if(fo=$n-Ba,!(!xi&&fo<0)){if(fo/=xi,xi<0){if(fo>qi)return;fo>ci&&(ci=fo)}else if(xi>0){if(fo<ci)return;fo<qi&&(qi=fo)}if(fo=_n-wi,!(!oi&&fo>0)){if(fo/=oi,oi<0){if(fo<ci)return;fo<qi&&(qi=fo)}else if(oi>0){if(fo>qi)return;fo>ci&&(ci=fo)}if(fo=Ga-wi,!(!oi&&fo<0)){if(fo/=oi,oi<0){if(fo>qi)return;fo>ci&&(ci=fo)}else if(oi>0){if(fo<ci)return;fo<qi&&(qi=fo)}return ci>0&&(wr[0]=Ba+ci*xi,wr[1]=wi+ci*oi),qi<1&&(Hr[0]=Ba+qi*xi,Hr[1]=wi+qi*oi),!0}}}}}var Wn=1e9,Fi=-Wn;function Ya(wr,Hr,kn,_n){function $n(to,ci){return wr<=to&&to<=kn&&Hr<=ci&&ci<=_n}function Ga(to,ci,qi,xi){var oi=0,fo=0;if(to==null||(oi=Ba(to,qi))!==(fo=Ba(ci,qi))||ki(to,ci)<0^qi>0)do xi.point(oi===0||oi===3?wr:kn,oi>1?_n:Hr);while((oi=(oi+qi+4)%4)!==fo);else xi.point(ci[0],ci[1])}function Ba(to,ci){return y(to[0]-wr)<a?ci>0?0:3:y(to[0]-kn)<a?ci>0?2:1:y(to[1]-Hr)<a?ci>0?1:0:ci>0?3:2}function wi(to,ci){return ki(to.x,ci.x)}function ki(to,ci){var qi=Ba(to,1),xi=Ba(ci,1);return qi!==xi?qi-xi:qi===0?ci[1]-to[1]:qi===1?to[0]-ci[0]:qi===2?to[1]-ci[1]:ci[0]-to[0]}return function(to){var ci=to,qi=qt(),xi,oi,fo,Qo,Yo,is,ts,vo,Yi,ys,Ys,Rl={point:Ql,lineStart:Du,lineEnd:Pu,polygonStart:eu,polygonEnd:cl};function Ql(Oo,Ls){$n(Oo,Ls)&&ci.point(Oo,Ls)}function Dl(){for(var Oo=0,Ls=0,ql=oi.length;Ls<ql;++Ls)for(var Al=oi[Ls],Tc=1,Ac=Al.length,Pc=Al[0],oh,Sc,Ff=Pc[0],Ou=Pc[1];Tc<Ac;++Tc)oh=Ff,Sc=Ou,Pc=Al[Tc],Ff=Pc[0],Ou=Pc[1],Sc<=_n?Ou>_n&&(Ff-oh)*(_n-Sc)>(Ou-Sc)*(wr-oh)&&++Oo:Ou<=_n&&(Ff-oh)*(_n-Sc)<(Ou-Sc)*(wr-oh)&&--Oo;return Oo}function eu(){ci=qi,xi=[],oi=[],Ys=!0}function cl(){var Oo=Dl(),Ls=Ys&&Oo,ql=(xi=w.merge(xi)).length;(Ls||ql)&&(to.polygonStart(),Ls&&(to.lineStart(),Ga(null,null,1,to),to.lineEnd()),ql&&Qr(xi,wi,Oo,Ga,to),to.polygonEnd()),ci=to,xi=oi=fo=null}function Du(){Rl.point=Zl,oi&&oi.push(fo=[]),ys=!0,Yi=!1,ts=vo=NaN}function Pu(){xi&&(Zl(Qo,Yo),is&&Yi&&qi.rejoin(),xi.push(qi.result())),Rl.point=Ql,Yi&&ci.lineEnd()}function Zl(Oo,Ls){var ql=$n(Oo,Ls);if(oi&&fo.push([Oo,Ls]),ys)Qo=Oo,Yo=Ls,is=ql,ys=!1,ql&&(ci.lineStart(),ci.point(Oo,Ls));else if(ql&&Yi)ci.point(Oo,Ls);else{var Al=[ts=Math.max(Fi,Math.min(Wn,ts)),vo=Math.max(Fi,Math.min(Wn,vo))],Tc=[Oo=Math.max(Fi,Math.min(Wn,Oo)),Ls=Math.max(Fi,Math.min(Wn,Ls))];Sn(Al,Tc,wr,Hr,kn,_n)?(Yi||(ci.lineStart(),ci.point(Al[0],Al[1])),ci.point(Tc[0],Tc[1]),ql||ci.lineEnd(),Ys=!1):ql&&(ci.lineStart(),ci.point(Oo,Ls),Ys=!1)}ts=Oo,vo=Ls,Yi=ql}return Rl}}function Wi(){var wr=0,Hr=0,kn=960,_n=500,$n,Ga,Ba;return Ba={stream:function(wi){return $n&&Ga===wi?$n:$n=Ya(wr,Hr,kn,_n)(Ga=wi)},extent:function(wi){return arguments.length?(wr=+wi[0][0],Hr=+wi[0][1],kn=+wi[1][0],_n=+wi[1][1],$n=Ga=null,Ba):[[wr,Hr],[kn,_n]]}}}var uo=C(),Ao,wo,Uo,Ri={sphere:D,point:D,lineStart:ps,lineEnd:D,polygonStart:D,polygonEnd:D};function ps(){Ri.point=el,Ri.lineEnd=as}function as(){Ri.point=Ri.lineEnd=D}function el(wr,Hr){wr*=h,Hr*=h,Ao=wr,wo=b(Hr),Uo=c(Hr),Ri.point=As}function As(wr,Hr){wr*=h,Hr*=h;var kn=b(Hr),_n=c(Hr),$n=y(wr-Ao),Ga=c($n),Ba=b($n),wi=_n*Ba,ki=Uo*kn-wo*_n*Ga,to=wo*kn+Uo*_n*Ga;uo.add(E(g(wi*wi+ki*ki),to)),Ao=wr,wo=kn,Uo=_n}function hs(wr){return uo.reset(),H(wr,Ri),+uo}var es=[null,null],tl={type:"LineString",coordinates:es};function Ks(wr,Hr){return es[0]=wr,es[1]=Hr,hs(tl)}var pl={Feature:function(wr,Hr){return ls(wr.geometry,Hr)},FeatureCollection:function(wr,Hr){for(var kn=wr.features,_n=-1,$n=kn.length;++_n<$n;)if(ls(kn[_n].geometry,Hr))return!0;return!1}},Ss={Sphere:function(){return!0},Point:function(wr,Hr){return Lo(wr.coordinates,Hr)},MultiPoint:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)if(Lo(kn[_n],Hr))return!0;return!1},LineString:function(wr,Hr){return Es(wr.coordinates,Hr)},MultiLineString:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)if(Es(kn[_n],Hr))return!0;return!1},Polygon:function(wr,Hr){return ml(wr.coordinates,Hr)},MultiPolygon:function(wr,Hr){for(var kn=wr.coordinates,_n=-1,$n=kn.length;++_n<$n;)if(ml(kn[_n],Hr))return!0;return!1},GeometryCollection:function(wr,Hr){for(var kn=wr.geometries,_n=-1,$n=kn.length;++_n<$n;)if(ls(kn[_n],Hr))return!0;return!1}};function ls(wr,Hr){return wr&&Ss.hasOwnProperty(wr.type)?Ss[wr.type](wr,Hr):!1}function Lo(wr,Hr){return Ks(wr,Hr)===0}function Es(wr,Hr){for(var kn,_n,$n,Ga=0,Ba=wr.length;Ga<Ba;Ga++){if(_n=Ks(wr[Ga],Hr),_n===0||Ga>0&&($n=Ks(wr[Ga],wr[Ga-1]),$n>0&&kn<=$n&&_n<=$n&&(kn+_n-$n)*(1-Math.pow((kn-_n)/$n,2))<l*$n))return!0;kn=_n}return!1}function ml(wr,Hr){return!!Tn(wr.map(zl),Bl(Hr))}function zl(wr){return wr=wr.map(Bl),wr.pop(),wr}function Bl(wr){return[wr[0]*h,wr[1]*h]}function Fs(wr,Hr){return(wr&&pl.hasOwnProperty(wr.type)?pl[wr.type]:ls)(wr,Hr)}function Di(wr,Hr,kn){var _n=w.range(wr,Hr-a,kn).concat(Hr);return function($n){return _n.map(function(Ga){return[$n,Ga]})}}function _o(wr,Hr,kn){var _n=w.range(wr,Hr-a,kn).concat(Hr);return function($n){return _n.map(function(Ga){return[Ga,$n]})}}function Nl(){var wr,Hr,kn,_n,$n,Ga,Ba,wi,ki=10,to=ki,ci=90,qi=360,xi,oi,fo,Qo,Yo=2.5;function is(){return{type:"MultiLineString",coordinates:ts()}}function ts(){return w.range(_(_n/ci)*ci,kn,ci).map(fo).concat(w.range(_(wi/qi)*qi,Ba,qi).map(Qo)).concat(w.range(_(Hr/ki)*ki,wr,ki).filter(function(vo){return y(vo%ci)>a}).map(xi)).concat(w.range(_(Ga/to)*to,$n,to).filter(function(vo){return y(vo%qi)>a}).map(oi))}return is.lines=function(){return ts().map(function(vo){return{type:"LineString",coordinates:vo}})},is.outline=function(){return{type:"Polygon",coordinates:[fo(_n).concat(Qo(Ba).slice(1),fo(kn).reverse().slice(1),Qo(wi).reverse().slice(1))]}},is.extent=function(vo){return arguments.length?is.extentMajor(vo).extentMinor(vo):is.extentMinor()},is.extentMajor=function(vo){return arguments.length?(_n=+vo[0][0],kn=+vo[1][0],wi=+vo[0][1],Ba=+vo[1][1],_n>kn&&(vo=_n,_n=kn,kn=vo),wi>Ba&&(vo=wi,wi=Ba,Ba=vo),is.precision(Yo)):[[_n,wi],[kn,Ba]]},is.extentMinor=function(vo){return arguments.length?(Hr=+vo[0][0],wr=+vo[1][0],Ga=+vo[0][1],$n=+vo[1][1],Hr>wr&&(vo=Hr,Hr=wr,wr=vo),Ga>$n&&(vo=Ga,Ga=$n,$n=vo),is.precision(Yo)):[[Hr,Ga],[wr,$n]]},is.step=function(vo){return arguments.length?is.stepMajor(vo).stepMinor(vo):is.stepMinor()},is.stepMajor=function(vo){return arguments.length?(ci=+vo[0],qi=+vo[1],is):[ci,qi]},is.stepMinor=function(vo){return arguments.length?(ki=+vo[0],to=+vo[1],is):[ki,to]},is.precision=function(vo){return arguments.length?(Yo=+vo,xi=Di(Ga,$n,90),oi=_o(Hr,wr,Yo),fo=Di(wi,Ba,90),Qo=_o(_n,kn,Yo),is):Yo},is.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function Vs(){return Nl()()}function Ko(wr,Hr){var kn=wr[0]*h,_n=wr[1]*h,$n=Hr[0]*h,Ga=Hr[1]*h,Ba=c(_n),wi=b(_n),ki=c(Ga),to=b(Ga),ci=Ba*c(kn),qi=Ba*b(kn),xi=ki*c($n),oi=ki*b($n),fo=2*x(g(N(Ga-_n)+Ba*ki*N($n-kn))),Qo=b(fo),Yo=fo?function(is){var ts=b(is*=fo)/Qo,vo=b(fo-is)/Qo,Yi=vo*ci+ts*xi,ys=vo*qi+ts*oi,Ys=vo*wi+ts*to;return[E(ys,Yi)*d,E(Ys,g(Yi*Yi+ys*ys))*d]}:function(){return[kn*d,_n*d]};return Yo.distance=fo,Yo}function jl(wr){return wr}var rl=C(),yl=C(),Cu,yo,Ps,ms,Kl={point:D,lineStart:D,lineEnd:D,polygonStart:function(){Kl.lineStart=Jl,Kl.lineEnd=_u},polygonEnd:function(){Kl.lineStart=Kl.lineEnd=Kl.point=D,rl.add(y(yl)),yl.reset()},result:function(){var wr=rl/2;return rl.reset(),wr}};function Jl(){Kl.point=Wo}function Wo(wr,Hr){Kl.point=pu,Cu=Ps=wr,yo=ms=Hr}function pu(wr,Hr){yl.add(ms*wr-Ps*Hr),Ps=wr,ms=Hr}function _u(){pu(Cu,yo)}var Xs=1/0,Pl=Xs,Gl=-Xs,Yl=Gl,tc={point:bf,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var wr=[[Xs,Pl],[Gl,Yl]];return Gl=Yl=-(Pl=Xs=1/0),wr}};function bf(wr,Hr){wr<Xs&&(Xs=wr),wr>Gl&&(Gl=wr),Hr<Pl&&(Pl=Hr),Hr>Yl&&(Yl=Hr)}var Qc=0,ff=0,Wh=0,Dh=0,Ll=0,jc=0,Yh=0,hc=0,rc=0,dc,hf,au,nc,Js={point:Ul,lineStart:Df,lineEnd:mu,polygonStart:function(){Js.lineStart=Vd,Js.lineEnd=Ws},polygonEnd:function(){Js.point=Ul,Js.lineStart=Df,Js.lineEnd=mu},result:function(){var wr=rc?[Yh/rc,hc/rc]:jc?[Dh/jc,Ll/jc]:Wh?[Qc/Wh,ff/Wh]:[NaN,NaN];return Qc=ff=Wh=Dh=Ll=jc=Yh=hc=rc=0,wr}};function Ul(wr,Hr){Qc+=wr,ff+=Hr,++Wh}function Df(){Js.point=Cc}function Cc(wr,Hr){Js.point=Wf,Ul(au=wr,nc=Hr)}function Wf(wr,Hr){var kn=wr-au,_n=Hr-nc,$n=g(kn*kn+_n*_n);Dh+=$n*(au+wr)/2,Ll+=$n*(nc+Hr)/2,jc+=$n,Ul(au=wr,nc=Hr)}function mu(){Js.point=Ul}function Vd(){Js.point=cv}function Ws(){Tl(dc,hf)}function cv(wr,Hr){Js.point=Tl,Ul(dc=au=wr,hf=nc=Hr)}function Tl(wr,Hr){var kn=wr-au,_n=Hr-nc,$n=g(kn*kn+_n*_n);Dh+=$n*(au+wr)/2,Ll+=$n*(nc+Hr)/2,jc+=$n,$n=nc*wr-au*Hr,Yh+=$n*(au+wr),hc+=$n*(nc+Hr),rc+=$n*3,Ul(au=wr,nc=Hr)}function Zo(wr){this._context=wr}Zo.prototype={_radius:4.5,pointRadius:function(wr){return this._radius=wr,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(wr,Hr){switch(this._point){case 0:{this._context.moveTo(wr,Hr),this._point=1;break}case 1:{this._context.lineTo(wr,Hr);break}default:{this._context.moveTo(wr+this._radius,Hr),this._context.arc(wr,Hr,this._radius,0,u);break}}},result:D};var dh=C(),df,Hu,Zh,Yf,wh,ac={point:D,lineStart:function(){ac.point=Cd},lineEnd:function(){df&&ad(Hu,Zh),ac.point=D},polygonStart:function(){df=!0},polygonEnd:function(){df=null},result:function(){var wr=+dh;return dh.reset(),wr}};function Cd(wr,Hr){ac.point=ad,Hu=Yf=wr,Zh=wh=Hr}function ad(wr,Hr){Yf-=wr,wh-=Hr,dh.add(g(Yf*Yf+wh*wh)),Yf=wr,wh=Hr}function Th(){this._string=[]}Th.prototype={_radius:4.5,_circle:Zf(4.5),pointRadius:function(wr){return(wr=+wr)!==this._radius&&(this._radius=wr,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(wr,Hr){switch(this._point){case 0:{this._string.push("M",wr,",",Hr),this._point=1;break}case 1:{this._string.push("L",wr,",",Hr);break}default:{this._circle==null&&(this._circle=Zf(this._radius)),this._string.push("M",wr,",",Hr,this._circle);break}}},result:function(){if(this._string.length){var wr=this._string.join("");return this._string=[],wr}else return null}};function Zf(wr){return"m0,"+wr+"a"+wr+","+wr+" 0 1,1 0,"+-2*wr+"a"+wr+","+wr+" 0 1,1 0,"+2*wr+"z"}function $h(wr,Hr){var kn=4.5,_n,$n;function Ga(Ba){return Ba&&(typeof kn=="function"&&$n.pointRadius(+kn.apply(this,arguments)),H(Ba,_n($n))),$n.result()}return Ga.area=function(Ba){return H(Ba,_n(Kl)),Kl.result()},Ga.measure=function(Ba){return H(Ba,_n(ac)),ac.result()},Ga.bounds=function(Ba){return H(Ba,_n(tc)),tc.result()},Ga.centroid=function(Ba){return H(Ba,_n(Js)),Js.result()},Ga.projection=function(Ba){return arguments.length?(_n=Ba==null?(wr=null,jl):(wr=Ba).stream,Ga):wr},Ga.context=function(Ba){return arguments.length?($n=Ba==null?(Hr=null,new Th):new Zo(Hr=Ba),typeof kn!="function"&&$n.pointRadius(kn),Ga):Hr},Ga.pointRadius=function(Ba){return arguments.length?(kn=typeof Ba=="function"?Ba:($n.pointRadius(+Ba),+Ba),Ga):kn},Ga.projection(wr).context(Hr)}function Kh(wr){return{stream:vf(wr)}}function vf(wr){return function(Hr){var kn=new id;for(var _n in wr)kn[_n]=wr[_n];return kn.stream=Hr,kn}}function id(){}id.prototype={constructor:id,point:function(wr,Hr){this.stream.point(wr,Hr)},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 Of(wr,Hr,kn){var _n=wr.clipExtent&&wr.clipExtent();return wr.scale(150).translate([0,0]),_n!=null&&wr.clipExtent(null),H(kn,wr.stream(tc)),Hr(tc.result()),_n!=null&&wr.clipExtent(_n),wr}function wf(wr,Hr,kn){return Of(wr,function(_n){var $n=Hr[1][0]-Hr[0][0],Ga=Hr[1][1]-Hr[0][1],Ba=Math.min($n/(_n[1][0]-_n[0][0]),Ga/(_n[1][1]-_n[0][1])),wi=+Hr[0][0]+($n-Ba*(_n[1][0]+_n[0][0]))/2,ki=+Hr[0][1]+(Ga-Ba*(_n[1][1]+_n[0][1]))/2;wr.scale(150*Ba).translate([wi,ki])},kn)}function ic(wr,Hr,kn){return wf(wr,[[0,0],Hr],kn)}function ih(wr,Hr,kn){return Of(wr,function(_n){var $n=+Hr,Ga=$n/(_n[1][0]-_n[0][0]),Ba=($n-Ga*(_n[1][0]+_n[0][0]))/2,wi=-Ga*_n[0][1];wr.scale(150*Ga).translate([Ba,wi])},kn)}function Jh(wr,Hr,kn){return Of(wr,function(_n){var $n=+Hr,Ga=$n/(_n[1][1]-_n[0][1]),Ba=-Ga*_n[0][0],wi=($n-Ga*(_n[1][1]+_n[0][1]))/2;wr.scale(150*Ga).translate([Ba,wi])},kn)}var Xl=16,Oh=c(30*h);function Hd(wr,Hr){return+Hr?Ah(wr,Hr):od(wr)}function od(wr){return vf({point:function(Hr,kn){Hr=wr(Hr,kn),this.stream.point(Hr[0],Hr[1])}})}function Ah(wr,Hr){function kn(_n,$n,Ga,Ba,wi,ki,to,ci,qi,xi,oi,fo,Qo,Yo){var is=to-_n,ts=ci-$n,vo=is*is+ts*ts;if(vo>4*Hr&&Qo--){var Yi=Ba+xi,ys=wi+oi,Ys=ki+fo,Rl=g(Yi*Yi+ys*ys+Ys*Ys),Ql=x(Ys/=Rl),Dl=y(y(Ys)-1)<a||y(Ga-qi)<a?(Ga+qi)/2:E(ys,Yi),eu=wr(Dl,Ql),cl=eu[0],Du=eu[1],Pu=cl-_n,Zl=Du-$n,Oo=ts*Pu-is*Zl;(Oo*Oo/vo>Hr||y((is*Pu+ts*Zl)/vo-.5)>.3||Ba*xi+wi*oi+ki*fo<Oh)&&(kn(_n,$n,Ga,Ba,wi,ki,cl,Du,Dl,Yi/=Rl,ys/=Rl,Ys,Qo,Yo),Yo.point(cl,Du),kn(cl,Du,Dl,Yi,ys,Ys,to,ci,qi,xi,oi,fo,Qo,Yo))}}return function(_n){var $n,Ga,Ba,wi,ki,to,ci,qi,xi,oi,fo,Qo,Yo={point:is,lineStart:ts,lineEnd:Yi,polygonStart:function(){_n.polygonStart(),Yo.lineStart=ys},polygonEnd:function(){_n.polygonEnd(),Yo.lineStart=ts}};function is(Ql,Dl){Ql=wr(Ql,Dl),_n.point(Ql[0],Ql[1])}function ts(){qi=NaN,Yo.point=vo,_n.lineStart()}function vo(Ql,Dl){var eu=ue([Ql,Dl]),cl=wr(Ql,Dl);kn(qi,xi,ci,oi,fo,Qo,qi=cl[0],xi=cl[1],ci=Ql,oi=eu[0],fo=eu[1],Qo=eu[2],Xl,_n),_n.point(qi,xi)}function Yi(){Yo.point=is,_n.lineEnd()}function ys(){ts(),Yo.point=Ys,Yo.lineEnd=Rl}function Ys(Ql,Dl){vo($n=Ql,Dl),Ga=qi,Ba=xi,wi=oi,ki=fo,to=Qo,Yo.point=vo}function Rl(){kn(qi,xi,ci,oi,fo,Qo,Ga,Ba,$n,wi,ki,to,Xl,_n),Yo.lineEnd=Yi,Yi()}return Yo}}var sd=vf({point:function(wr,Hr){this.stream.point(wr*h,Hr*h)}});function Uc(wr){return vf({point:function(Hr,kn){var _n=wr(Hr,kn);return this.stream.point(_n[0],_n[1])}})}function ld(wr,Hr,kn,_n,$n){function Ga(Ba,wi){return Ba*=_n,wi*=$n,[Hr+wr*Ba,kn-wr*wi]}return Ga.invert=function(Ba,wi){return[(Ba-Hr)/wr*_n,(kn-wi)/wr*$n]},Ga}function Su(wr,Hr,kn,_n,$n,Ga){var Ba=c(Ga),wi=b(Ga),ki=Ba*wr,to=wi*wr,ci=Ba/wr,qi=wi/wr,xi=(wi*kn-Ba*Hr)/wr,oi=(wi*Hr+Ba*kn)/wr;function fo(Qo,Yo){return Qo*=_n,Yo*=$n,[ki*Qo-to*Yo+Hr,kn-to*Qo-ki*Yo]}return fo.invert=function(Qo,Yo){return[_n*(ci*Qo-qi*Yo+xi),$n*(oi-qi*Qo-ci*Yo)]},fo}function qc(wr){return $f(function(){return wr})()}function $f(wr){var Hr,kn=150,_n=480,$n=250,Ga=0,Ba=0,wi=0,ki=0,to=0,ci,qi=0,xi=1,oi=1,fo=null,Qo=Wr,Yo=null,is,ts,vo,Yi=jl,ys=.5,Ys,Rl,Ql,Dl,eu;function cl(Oo){return Ql(Oo[0]*h,Oo[1]*h)}function Du(Oo){return Oo=Ql.invert(Oo[0],Oo[1]),Oo&&[Oo[0]*d,Oo[1]*d]}cl.stream=function(Oo){return Dl&&eu===Oo?Dl:Dl=sd(Uc(ci)(Qo(Ys(Yi(eu=Oo)))))},cl.preclip=function(Oo){return arguments.length?(Qo=Oo,fo=void 0,Zl()):Qo},cl.postclip=function(Oo){return arguments.length?(Yi=Oo,Yo=is=ts=vo=null,Zl()):Yi},cl.clipAngle=function(Oo){return arguments.length?(Qo=+Oo?ra(fo=Oo*h):(fo=null,Wr),Zl()):fo*d},cl.clipExtent=function(Oo){return arguments.length?(Yi=Oo==null?(Yo=is=ts=vo=null,jl):Ya(Yo=+Oo[0][0],is=+Oo[0][1],ts=+Oo[1][0],vo=+Oo[1][1]),Zl()):Yo==null?null:[[Yo,is],[ts,vo]]},cl.scale=function(Oo){return arguments.length?(kn=+Oo,Pu()):kn},cl.translate=function(Oo){return arguments.length?(_n=+Oo[0],$n=+Oo[1],Pu()):[_n,$n]},cl.center=function(Oo){return arguments.length?(Ga=Oo[0]%360*h,Ba=Oo[1]%360*h,Pu()):[Ga*d,Ba*d]},cl.rotate=function(Oo){return arguments.length?(wi=Oo[0]%360*h,ki=Oo[1]%360*h,to=Oo.length>2?Oo[2]%360*h:0,Pu()):[wi*d,ki*d,to*d]},cl.angle=function(Oo){return arguments.length?(qi=Oo%360*h,Pu()):qi*d},cl.reflectX=function(Oo){return arguments.length?(xi=Oo?-1:1,Pu()):xi<0},cl.reflectY=function(Oo){return arguments.length?(oi=Oo?-1:1,Pu()):oi<0},cl.precision=function(Oo){return arguments.length?(Ys=Hd(Rl,ys=Oo*Oo),Zl()):g(ys)},cl.fitExtent=function(Oo,Ls){return wf(cl,Oo,Ls)},cl.fitSize=function(Oo,Ls){return ic(cl,Oo,Ls)},cl.fitWidth=function(Oo,Ls){return ih(cl,Oo,Ls)},cl.fitHeight=function(Oo,Ls){return Jh(cl,Oo,Ls)};function Pu(){var Oo=Su(kn,0,0,xi,oi,qi).apply(null,Hr(Ga,Ba)),Ls=(qi?Su:ld)(kn,_n-Oo[0],$n-Oo[1],xi,oi,qi);return ci=va(wi,ki,to),Rl=Ln(Hr,Ls),Ql=Ln(ci,Rl),Ys=Hd(Rl,ys),Zl()}function Zl(){return Dl=eu=null,cl}return function(){return Hr=wr.apply(this,arguments),cl.invert=Hr.invert&&Du,Pu()}}function iu(wr){var Hr=0,kn=i/3,_n=$f(wr),$n=_n(Hr,kn);return $n.parallels=function(Ga){return arguments.length?_n(Hr=Ga[0]*h,kn=Ga[1]*h):[Hr*d,kn*d]},$n}function zf(wr){var Hr=c(wr);function kn(_n,$n){return[_n*Hr,b($n)/Hr]}return kn.invert=function(_n,$n){return[_n/Hr,x($n*Hr)]},kn}function wc(wr,Hr){var kn=b(wr),_n=(kn+b(Hr))/2;if(y(_n)<a)return zf(wr);var $n=1+kn*(2*_n-kn),Ga=g($n)/_n;function Ba(wi,ki){var to=g($n-2*_n*b(ki))/_n;return[to*b(wi*=_n),Ga-to*c(wi)]}return Ba.invert=function(wi,ki){var to=Ga-ki,ci=E(wi,y(to))*A(to);return to*_n<0&&(ci-=i*A(wi)*A(to)),[ci/_n,x(($n-(wi*wi+to*to)*_n*_n)/(2*_n))]},Ba}function Vc(){return iu(wc).scale(155.424).center([0,33.6442])}function yu(){return Vc().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function vh(wr){var Hr=wr.length;return{point:function(kn,_n){for(var $n=-1;++$n<Hr;)wr[$n].point(kn,_n)},sphere:function(){for(var kn=-1;++kn<Hr;)wr[kn].sphere()},lineStart:function(){for(var kn=-1;++kn<Hr;)wr[kn].lineStart()},lineEnd:function(){for(var kn=-1;++kn<Hr;)wr[kn].lineEnd()},polygonStart:function(){for(var kn=-1;++kn<Hr;)wr[kn].polygonStart()},polygonEnd:function(){for(var kn=-1;++kn<Hr;)wr[kn].polygonEnd()}}}function Tf(){var wr,Hr,kn=yu(),_n,$n=Vc().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Ga,Ba=Vc().rotate([157,0]).center([-3,19.9]).parallels([8,18]),wi,ki,to={point:function(xi,oi){ki=[xi,oi]}};function ci(xi){var oi=xi[0],fo=xi[1];return ki=null,_n.point(oi,fo),ki||(Ga.point(oi,fo),ki)||(wi.point(oi,fo),ki)}ci.invert=function(xi){var oi=kn.scale(),fo=kn.translate(),Qo=(xi[0]-fo[0])/oi,Yo=(xi[1]-fo[1])/oi;return(Yo>=.12&&Yo<.234&&Qo>=-.425&&Qo<-.214?$n:Yo>=.166&&Yo<.234&&Qo>=-.214&&Qo<-.115?Ba:kn).invert(xi)},ci.stream=function(xi){return wr&&Hr===xi?wr:wr=vh([kn.stream(Hr=xi),$n.stream(xi),Ba.stream(xi)])},ci.precision=function(xi){return arguments.length?(kn.precision(xi),$n.precision(xi),Ba.precision(xi),qi()):kn.precision()},ci.scale=function(xi){return arguments.length?(kn.scale(xi),$n.scale(xi*.35),Ba.scale(xi),ci.translate(kn.translate())):kn.scale()},ci.translate=function(xi){if(!arguments.length)return kn.translate();var oi=kn.scale(),fo=+xi[0],Qo=+xi[1];return _n=kn.translate(xi).clipExtent([[fo-.455*oi,Qo-.238*oi],[fo+.455*oi,Qo+.238*oi]]).stream(to),Ga=$n.translate([fo-.307*oi,Qo+.201*oi]).clipExtent([[fo-.425*oi+a,Qo+.12*oi+a],[fo-.214*oi-a,Qo+.234*oi-a]]).stream(to),wi=Ba.translate([fo-.205*oi,Qo+.212*oi]).clipExtent([[fo-.214*oi+a,Qo+.166*oi+a],[fo-.115*oi-a,Qo+.234*oi-a]]).stream(to),qi()},ci.fitExtent=function(xi,oi){return wf(ci,xi,oi)},ci.fitSize=function(xi,oi){return ic(ci,xi,oi)},ci.fitWidth=function(xi,oi){return ih(ci,xi,oi)},ci.fitHeight=function(xi,oi){return Jh(ci,xi,oi)};function qi(){return wr=Hr=null,ci}return ci.scale(1070)}function Kf(wr){return function(Hr,kn){var _n=c(Hr),$n=c(kn),Ga=wr(_n*$n);return[Ga*$n*b(Hr),Ga*b(kn)]}}function zh(wr){return function(Hr,kn){var _n=g(Hr*Hr+kn*kn),$n=wr(_n),Ga=b($n),Ba=c($n);return[E(Hr*Ga,_n*Ba),x(_n&&kn*Ga/_n)]}}var Gd=Kf(function(wr){return g(2/(1+wr))});Gd.invert=zh(function(wr){return 2*x(wr/2)});function Tv(){return qc(Gd).scale(124.75).clipAngle(180-.001)}var ph=Kf(function(wr){return(wr=p(wr))&&wr/b(wr)});ph.invert=zh(function(wr){return wr});function Nh(){return qc(ph).scale(79.4188).clipAngle(180-.001)}function ef(wr,Hr){return[wr,M(f((s+Hr)/2))]}ef.invert=function(wr,Hr){return[wr,2*m(T(Hr))-s]};function Fh(){return vc(ef).scale(961/u)}function vc(wr){var Hr=qc(wr),kn=Hr.center,_n=Hr.scale,$n=Hr.translate,Ga=Hr.clipExtent,Ba=null,wi,ki,to;Hr.scale=function(qi){return arguments.length?(_n(qi),ci()):_n()},Hr.translate=function(qi){return arguments.length?($n(qi),ci()):$n()},Hr.center=function(qi){return arguments.length?(kn(qi),ci()):kn()},Hr.clipExtent=function(qi){return arguments.length?(qi==null?Ba=wi=ki=to=null:(Ba=+qi[0][0],wi=+qi[0][1],ki=+qi[1][0],to=+qi[1][1]),ci()):Ba==null?null:[[Ba,wi],[ki,to]]};function ci(){var qi=i*_n(),xi=Hr($a(Hr.rotate()).invert([0,0]));return Ga(Ba==null?[[xi[0]-qi,xi[1]-qi],[xi[0]+qi,xi[1]+qi]]:wr===ef?[[Math.max(xi[0]-qi,Ba),wi],[Math.min(xi[0]+qi,ki),to]]:[[Ba,Math.max(xi[1]-qi,wi)],[ki,Math.min(xi[1]+qi,to)]])}return ci()}function mh(wr){return f((s+wr)/2)}function ud(wr,Hr){var kn=c(wr),_n=wr===Hr?b(wr):M(kn/c(Hr))/M(mh(Hr)/mh(wr)),$n=kn*k(mh(wr),_n)/_n;if(!_n)return ef;function Ga(Ba,wi){$n>0?wi<-s+a&&(wi=-s+a):wi>s-a&&(wi=s-a);var ki=$n/k(mh(wi),_n);return[ki*b(_n*Ba),$n-ki*c(_n*Ba)]}return Ga.invert=function(Ba,wi){var ki=$n-wi,to=A(_n)*g(Ba*Ba+ki*ki),ci=E(Ba,y(ki))*A(ki);return ki*_n<0&&(ci-=i*A(Ba)*A(ki)),[ci/_n,2*m(k($n/to,1/_n))-s]},Ga}function yh(){return iu(ud).scale(109.5).parallels([30,30])}function uu(wr,Hr){return[wr,Hr]}uu.invert=uu;function Hc(){return qc(uu).scale(152.63)}function pf(wr,Hr){var kn=c(wr),_n=wr===Hr?b(wr):(kn-c(Hr))/(Hr-wr),$n=kn/_n+wr;if(y(_n)<a)return uu;function Ga(Ba,wi){var ki=$n-wi,to=_n*Ba;return[ki*b(to),$n-ki*c(to)]}return Ga.invert=function(Ba,wi){var ki=$n-wi,to=E(Ba,y(ki))*A(ki);return ki*_n<0&&(to-=i*A(Ba)*A(ki)),[to/_n,$n-A(_n)*g(Ba*Ba+ki*ki)]},Ga}function Qh(){return iu(pf).scale(131.154).center([0,13.9389])}var du=1.340264,Sh=-.081106,Jf=893e-6,tf=.003796,Eh=g(3)/2,Af=12;function Mh(wr,Hr){var kn=x(Eh*b(Hr)),_n=kn*kn,$n=_n*_n*_n;return[wr*c(kn)/(Eh*(du+3*Sh*_n+$n*(7*Jf+9*tf*_n))),kn*(du+Sh*_n+$n*(Jf+tf*_n))]}Mh.invert=function(wr,Hr){for(var kn=Hr,_n=kn*kn,$n=_n*_n*_n,Ga=0,Ba,wi,ki;Ga<Af&&(wi=kn*(du+Sh*_n+$n*(Jf+tf*_n))-Hr,ki=du+3*Sh*_n+$n*(7*Jf+9*tf*_n),kn-=Ba=wi/ki,_n=kn*kn,$n=_n*_n*_n,!(y(Ba)<l));++Ga);return[Eh*wr*(du+3*Sh*_n+$n*(7*Jf+9*tf*_n))/c(kn),x(b(kn)/Eh)]};function Xd(){return qc(Mh).scale(177.158)}function yc(wr,Hr){var kn=c(Hr),_n=c(wr)*kn;return[kn*b(wr)/_n,b(Hr)/_n]}yc.invert=zh(m);function cd(){return qc(yc).scale(144.049).clipAngle(60)}function rf(){var wr=1,Hr=0,kn=0,_n=1,$n=1,Ga=0,Ba,wi,ki=null,to,ci,qi,xi=1,oi=1,fo=vf({point:function(Yi,ys){var Ys=vo([Yi,ys]);this.stream.point(Ys[0],Ys[1])}}),Qo=jl,Yo,is;function ts(){return xi=wr*_n,oi=wr*$n,Yo=is=null,vo}function vo(Yi){var ys=Yi[0]*xi,Ys=Yi[1]*oi;if(Ga){var Rl=Ys*Ba-ys*wi;ys=ys*Ba+Ys*wi,Ys=Rl}return[ys+Hr,Ys+kn]}return vo.invert=function(Yi){var ys=Yi[0]-Hr,Ys=Yi[1]-kn;if(Ga){var Rl=Ys*Ba+ys*wi;ys=ys*Ba-Ys*wi,Ys=Rl}return[ys/xi,Ys/oi]},vo.stream=function(Yi){return Yo&&is===Yi?Yo:Yo=fo(Qo(is=Yi))},vo.postclip=function(Yi){return arguments.length?(Qo=Yi,ki=to=ci=qi=null,ts()):Qo},vo.clipExtent=function(Yi){return arguments.length?(Qo=Yi==null?(ki=to=ci=qi=null,jl):Ya(ki=+Yi[0][0],to=+Yi[0][1],ci=+Yi[1][0],qi=+Yi[1][1]),ts()):ki==null?null:[[ki,to],[ci,qi]]},vo.scale=function(Yi){return arguments.length?(wr=+Yi,ts()):wr},vo.translate=function(Yi){return arguments.length?(Hr=+Yi[0],kn=+Yi[1],ts()):[Hr,kn]},vo.angle=function(Yi){return arguments.length?(Ga=Yi%360*h,wi=b(Ga),Ba=c(Ga),ts()):Ga*d},vo.reflectX=function(Yi){return arguments.length?(_n=Yi?-1:1,ts()):_n<0},vo.reflectY=function(Yi){return arguments.length?($n=Yi?-1:1,ts()):$n<0},vo.fitExtent=function(Yi,ys){return wf(vo,Yi,ys)},vo.fitSize=function(Yi,ys){return ic(vo,Yi,ys)},vo.fitWidth=function(Yi,ys){return ih(vo,Yi,ys)},vo.fitHeight=function(Yi,ys){return Jh(vo,Yi,ys)},vo}function Nf(wr,Hr){var kn=Hr*Hr,_n=kn*kn;return[wr*(.8707-.131979*kn+_n*(-.013791+_n*(.003971*kn-.001529*_n))),Hr*(1.007226+kn*(.015085+_n*(-.044475+.028874*kn-.005916*_n)))]}Nf.invert=function(wr,Hr){var kn=Hr,_n=25,$n;do{var Ga=kn*kn,Ba=Ga*Ga;kn-=$n=(kn*(1.007226+Ga*(.015085+Ba*(-.044475+.028874*Ga-.005916*Ba)))-Hr)/(1.007226+Ga*(.015085*3+Ba*(-.044475*7+.028874*9*Ga-.005916*11*Ba)))}while(y($n)>a&&--_n>0);return[wr/(.8707+(Ga=kn*kn)*(-.131979+Ga*(-.013791+Ga*Ga*Ga*(.003971-.001529*Ga)))),kn]};function Sf(){return qc(Nf).scale(175.295)}function ku(wr,Hr){return[c(Hr)*b(wr),b(Hr)]}ku.invert=zh(x);function kc(){return qc(ku).scale(249.5).clipAngle(90+a)}function xu(wr,Hr){var kn=c(Hr),_n=1+c(wr)*kn;return[kn*b(wr)/_n,b(Hr)/_n]}xu.invert=zh(function(wr){return 2*m(wr)});function Qf(){return qc(xu).scale(250).clipAngle(142)}function Ef(wr,Hr){return[M(f((s+Hr)/2)),-wr]}Ef.invert=function(wr,Hr){return[-Hr,2*m(T(wr))-s]};function ed(){var wr=vc(Ef),Hr=wr.center,kn=wr.rotate;return wr.center=function(_n){return arguments.length?Hr([-_n[1],_n[0]]):(_n=Hr(),[_n[1],-_n[0]])},wr.rotate=function(_n){return arguments.length?kn([_n[0],_n[1],_n.length>2?_n[2]+90:90]):(_n=kn(),[_n[0],_n[1],_n[2]-90])},kn([0,0,90]).scale(159.155)}v.geoAlbers=yu,v.geoAlbersUsa=Tf,v.geoArea=Y,v.geoAzimuthalEqualArea=Tv,v.geoAzimuthalEqualAreaRaw=Gd,v.geoAzimuthalEquidistant=Nh,v.geoAzimuthalEquidistantRaw=ph,v.geoBounds=$e,v.geoCentroid=nn,v.geoCircle=Gi,v.geoClipAntimeridian=Wr,v.geoClipCircle=ra,v.geoClipExtent=Wi,v.geoClipRectangle=Ya,v.geoConicConformal=yh,v.geoConicConformalRaw=ud,v.geoConicEqualArea=Vc,v.geoConicEqualAreaRaw=wc,v.geoConicEquidistant=Qh,v.geoConicEquidistantRaw=pf,v.geoContains=Fs,v.geoDistance=Ks,v.geoEqualEarth=Xd,v.geoEqualEarthRaw=Mh,v.geoEquirectangular=Hc,v.geoEquirectangularRaw=uu,v.geoGnomonic=cd,v.geoGnomonicRaw=yc,v.geoGraticule=Nl,v.geoGraticule10=Vs,v.geoIdentity=rf,v.geoInterpolate=Ko,v.geoLength=hs,v.geoMercator=Fh,v.geoMercatorRaw=ef,v.geoNaturalEarth1=Sf,v.geoNaturalEarth1Raw=Nf,v.geoOrthographic=kc,v.geoOrthographicRaw=ku,v.geoPath=$h,v.geoProjection=qc,v.geoProjectionMutator=$f,v.geoRotation=$a,v.geoStereographic=Qf,v.geoStereographicRaw=xu,v.geoStream=H,v.geoTransform=Kh,v.geoTransverseMercator=ed,v.geoTransverseMercatorRaw=Ef,Object.defineProperty(v,"__esModule",{value:!0})})}}),MJ=Ne({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,hN(),s6()):w(v.d3=v.d3||{},v.d3,v.d3)})(te,function(v,w,C){var P=Math.abs,t=Math.atan,r=Math.atan2,a=Math.cos,l=Math.exp,i=Math.floor,s=Math.log,o=Math.max,u=Math.min,d=Math.pow,h=Math.round,y=Math.sign||function(nt){return nt>0?1:nt<0?-1:0},m=Math.sin,E=Math.tan,c=1e-6,_=1e-12,T=Math.PI,M=T/2,k=T/4,b=Math.SQRT1_2,A=U(2),g=U(T),f=T*2,p=180/T,x=T/180;function N(nt){return nt?nt/Math.sin(nt):1}function D(nt){return nt>1?M:nt<-1?-M:Math.asin(nt)}function B(nt){return nt>1?0:nt<-1?T:Math.acos(nt)}function U(nt){return nt>0?Math.sqrt(nt):0}function V(nt){return nt=l(2*nt),(nt-1)/(nt+1)}function q(nt){return(l(nt)-l(-nt))/2}function z(nt){return(l(nt)+l(-nt))/2}function H(nt){return s(nt+U(nt*nt+1))}function G(nt){return s(nt+U(nt*nt-1))}function J(nt){var ut=E(nt/2),wt=2*s(a(nt/2))/(ut*ut);function kt(Ht,Ot){var Kt=a(Ht),Cr=a(Ot),Or=m(Ot),Vr=Cr*Kt,sn=-((1-Vr?s((1+Vr)/2)/(1-Vr):-.5)+wt/(1+Vr));return[sn*Cr*m(Ht),sn*Or]}return kt.invert=function(Ht,Ot){var Kt=U(Ht*Ht+Ot*Ot),Cr=-nt/2,Or=50,Vr;if(!Kt)return[0,0];do{var sn=Cr/2,bn=a(sn),Un=m(sn),Gn=Un/bn,ua=-s(P(bn));Cr-=Vr=(2/Gn*ua-wt*Gn-Kt)/(-ua/(Un*Un)+1-wt/(2*bn*bn))*(bn<0?.7:1)}while(P(Vr)>c&&--Or>0);var Ha=m(Cr);return[r(Ht*Ha,Kt*a(Cr)),D(Ot*Ha/Kt)]},kt}function le(){var nt=M,ut=w.geoProjectionMutator(J),wt=ut(nt);return wt.radius=function(kt){return arguments.length?ut(nt=kt*x):nt*p},wt.scale(179.976).clipAngle(147)}function ye(nt,ut){var wt=a(ut),kt=N(B(wt*a(nt/=2)));return[2*wt*m(nt)*kt,m(ut)*kt]}ye.invert=function(nt,ut){if(!(nt*nt+4*ut*ut>T*T+c)){var wt=nt,kt=ut,Ht=25;do{var Ot=m(wt),Kt=m(wt/2),Cr=a(wt/2),Or=m(kt),Vr=a(kt),sn=m(2*kt),bn=Or*Or,Un=Vr*Vr,Gn=Kt*Kt,ua=1-Un*Cr*Cr,Ha=ua?B(Vr*Cr)*U(Ti=1/ua):Ti=0,Ti,mi=2*Ha*Vr*Kt-nt,Ai=Ha*Or-ut,po=Ti*(Un*Gn+Ha*Vr*Cr*bn),Fo=Ti*(.5*Ot*sn-Ha*2*Or*Kt),Po=Ti*.25*(sn*Kt-Ha*Or*Un*Ot),us=Ti*(bn*Cr+Ha*Gn*Vr),il=Fo*Po-us*po;if(!il)break;var ol=(Ai*Fo-mi*us)/il,Bs=(mi*Po-Ai*po)/il;wt-=ol,kt-=Bs}while((P(ol)>c||P(Bs)>c)&&--Ht>0);return[wt,kt]}};function de(){return w.geoProjection(ye).scale(152.63)}function me(nt){var ut=m(nt),wt=a(nt),kt=nt>=0?1:-1,Ht=E(kt*nt),Ot=(1+ut-wt)/2;function Kt(Cr,Or){var Vr=a(Or),sn=a(Cr/=2);return[(1+Vr)*m(Cr),(kt*Or>-r(sn,Ht)-.001?0:-kt*10)+Ot+m(Or)*wt-(1+Vr)*ut*sn]}return Kt.invert=function(Cr,Or){var Vr=0,sn=0,bn=50;do{var Un=a(Vr),Gn=m(Vr),ua=a(sn),Ha=m(sn),Ti=1+ua,mi=Ti*Gn-Cr,Ai=Ot+Ha*wt-Ti*ut*Un-Or,po=Ti*Un/2,Fo=-Gn*Ha,Po=ut*Ti*Gn/2,us=wt*ua+ut*Un*Ha,il=Fo*Po-us*po,ol=(Ai*Fo-mi*us)/il/2,Bs=(mi*Po-Ai*po)/il;P(Bs)>2&&(Bs/=2),Vr-=ol,sn-=Bs}while((P(ol)>c||P(Bs)>c)&&--bn>0);return kt*sn>-r(a(Vr),Ht)-.001?[Vr*2,sn]:null},Kt}function W(){var nt=20*x,ut=nt>=0?1:-1,wt=E(ut*nt),kt=w.geoProjectionMutator(me),Ht=kt(nt),Ot=Ht.stream;return Ht.parallel=function(Kt){return arguments.length?(wt=E((ut=(nt=Kt*x)>=0?1:-1)*nt),kt(nt)):nt*p},Ht.stream=function(Kt){var Cr=Ht.rotate(),Or=Ot(Kt),Vr=(Ht.rotate([0,0]),Ot(Kt)),sn=Ht.precision();return Ht.rotate(Cr),Or.sphere=function(){Vr.polygonStart(),Vr.lineStart();for(var bn=ut*-180;ut*bn<180;bn+=ut*90)Vr.point(bn,ut*90);if(nt)for(;ut*(bn-=3*ut*sn)>=-180;)Vr.point(bn,ut*-r(a(bn*x/2),wt)*p);Vr.lineEnd(),Vr.polygonEnd()},Or},Ht.scale(218.695).center([0,28.0974])}function ie(nt,ut){var wt=E(ut/2),kt=U(1-wt*wt),Ht=1+kt*a(nt/=2),Ot=m(nt)*kt/Ht,Kt=wt/Ht,Cr=Ot*Ot,Or=Kt*Kt;return[4/3*Ot*(3+Cr-3*Or),4/3*Kt*(3+3*Cr-Or)]}ie.invert=function(nt,ut){if(nt*=3/8,ut*=3/8,!nt&&P(ut)>1)return null;var wt=nt*nt,kt=ut*ut,Ht=1+wt+kt,Ot=U((Ht-U(Ht*Ht-4*ut*ut))/2),Kt=D(Ot)/3,Cr=Ot?G(P(ut/Ot))/3:H(P(nt))/3,Or=a(Kt),Vr=z(Cr),sn=Vr*Vr-Or*Or;return[y(nt)*2*r(q(Cr)*Or,.25-sn),y(ut)*2*r(Vr*m(Kt),.25+sn)]};function se(){return w.geoProjection(ie).scale(66.1603)}var ee=U(8),pe=s(1+A);function oe(nt,ut){var wt=P(ut);return wt<k?[nt,s(E(k+ut/2))]:[nt*a(wt)*(2*A-1/m(wt)),y(ut)*(2*A*(wt-k)-s(E(wt/2)))]}oe.invert=function(nt,ut){if((Ot=P(ut))<pe)return[nt,2*t(l(ut))-M];var wt=k,kt=25,Ht,Ot;do{var Kt=a(wt/2),Cr=E(wt/2);wt-=Ht=(ee*(wt-k)-s(Cr)-Ot)/(ee-Kt*Kt/(2*Cr))}while(P(Ht)>_&&--kt>0);return[nt/(a(wt)*(ee-1/m(wt))),y(ut)*wt]};function Y(){return w.geoProjection(oe).scale(112.314)}function ce(nt){var ut=2*T/nt;function wt(kt,Ht){var Ot=w.geoAzimuthalEquidistantRaw(kt,Ht);if(P(kt)>M){var Kt=r(Ot[1],Ot[0]),Cr=U(Ot[0]*Ot[0]+Ot[1]*Ot[1]),Or=ut*h((Kt-M)/ut)+M,Vr=r(m(Kt-=Or),2-a(Kt));Kt=Or+D(T/Cr*m(Vr))-Vr,Ot[0]=Cr*a(Kt),Ot[1]=Cr*m(Kt)}return Ot}return wt.invert=function(kt,Ht){var Ot=U(kt*kt+Ht*Ht);if(Ot>M){var Kt=r(Ht,kt),Cr=ut*h((Kt-M)/ut)+M,Or=Kt>Cr?-1:1,Vr=Ot*a(Cr-Kt),sn=1/E(Or*B((Vr-T)/U(T*(T-2*Vr)+Ot*Ot)));Kt=Cr+2*t((sn+Or*U(sn*sn-3))/3),kt=Ot*a(Kt),Ht=Ot*m(Kt)}return w.geoAzimuthalEquidistantRaw.invert(kt,Ht)},wt}function ue(){var nt=5,ut=w.geoProjectionMutator(ce),wt=ut(nt),kt=wt.stream,Ht=.01,Ot=-a(Ht*x),Kt=m(Ht*x);return wt.lobes=function(Cr){return arguments.length?ut(nt=+Cr):nt},wt.stream=function(Cr){var Or=wt.rotate(),Vr=kt(Cr),sn=(wt.rotate([0,0]),kt(Cr));return wt.rotate(Or),Vr.sphere=function(){sn.polygonStart(),sn.lineStart();for(var bn=0,Un=360/nt,Gn=2*T/nt,ua=90-180/nt,Ha=M;bn<nt;++bn,ua-=Un,Ha-=Gn)sn.point(r(Kt*a(Ha),Ot)*p,D(Kt*m(Ha))*p),ua<-90?(sn.point(-90,-180-ua-Ht),sn.point(-90,-180-ua+Ht)):(sn.point(90,ua+Ht),sn.point(90,ua-Ht));sn.lineEnd(),sn.polygonEnd()},Vr},wt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function _e(nt,ut){if(arguments.length<2&&(ut=nt),ut===1)return w.geoAzimuthalEqualAreaRaw;if(ut===1/0)return Le;function wt(kt,Ht){var Ot=w.geoAzimuthalEqualAreaRaw(kt/ut,Ht);return Ot[0]*=nt,Ot}return wt.invert=function(kt,Ht){var Ot=w.geoAzimuthalEqualAreaRaw.invert(kt/nt,Ht);return Ot[0]*=ut,Ot},wt}function Le(nt,ut){return[nt*a(ut)/a(ut/=2),2*m(ut)]}Le.invert=function(nt,ut){var wt=2*D(ut/2);return[nt*a(wt/2)/a(wt),wt]};function ze(){var nt=2,ut=w.geoProjectionMutator(_e),wt=ut(nt);return wt.coefficient=function(kt){return arguments.length?ut(nt=+kt):nt},wt.scale(169.529)}function Ge(nt,ut,wt){var kt=100,Ht,Ot,Kt;wt=wt===void 0?0:+wt,ut=+ut;do Ot=nt(wt),Kt=nt(wt+c),Ot===Kt&&(Kt=Ot+c),wt-=Ht=-1*c*(Ot-ut)/(Ot-Kt);while(kt-- >0&&P(Ht)>c);return kt<0?NaN:wt}function Ve(nt,ut,wt){return ut===void 0&&(ut=40),wt===void 0&&(wt=_),function(kt,Ht,Ot,Kt){var Cr,Or,Vr;Ot=Ot===void 0?0:+Ot,Kt=Kt===void 0?0:+Kt;for(var sn=0;sn<ut;sn++){var bn=nt(Ot,Kt),Un=bn[0]-kt,Gn=bn[1]-Ht;if(P(Un)<wt&&P(Gn)<wt)break;var ua=Un*Un+Gn*Gn;if(ua>Cr){Ot-=Or/=2,Kt-=Vr/=2;continue}Cr=ua;var Ha=(Ot>0?-1:1)*wt,Ti=(Kt>0?-1:1)*wt,mi=nt(Ot+Ha,Kt),Ai=nt(Ot,Kt+Ti),po=(mi[0]-bn[0])/Ha,Fo=(mi[1]-bn[1])/Ha,Po=(Ai[0]-bn[0])/Ti,us=(Ai[1]-bn[1])/Ti,il=us*po-Fo*Po,ol=(P(il)<.5?.5:1)/il;if(Or=(Gn*Po-Un*us)*ol,Vr=(Un*Fo-Gn*po)*ol,Ot+=Or,Kt+=Vr,P(Or)<wt&&P(Vr)<wt)break}return[Ot,Kt]}}function rt(){var nt=_e(1.68,2),ut=1.4,wt=12;function kt(Ht,Ot){if(Ht+Ot<-ut){var Kt=(Ht-Ot+1.6)*(Ht+Ot+ut)/8;Ht+=Kt,Ot-=.8*Kt*m(Ot+T/2)}var Cr=nt(Ht,Ot),Or=(1-a(Ht*Ot))/wt;return Cr[1]<0&&(Cr[0]*=1+Or),Cr[1]>0&&(Cr[1]*=1+Or/1.5*Cr[0]*Cr[0]),Cr}return kt.invert=Ve(kt),kt}function pt(){return w.geoProjection(rt()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function gt(nt,ut){var wt=nt*m(ut),kt=30,Ht;do ut-=Ht=(ut+m(ut)-wt)/(1+a(ut));while(P(Ht)>c&&--kt>0);return ut/2}function ht(nt,ut,wt){function kt(Ht,Ot){return[nt*Ht*a(Ot=gt(wt,Ot)),ut*m(Ot)]}return kt.invert=function(Ht,Ot){return Ot=D(Ot/ut),[Ht/(nt*a(Ot)),D((2*Ot+m(2*Ot))/wt)]},kt}var lt=ht(A/M,A,T);function Fe(){return w.geoProjection(lt).scale(169.529)}var Pe=2.00276,be=1.11072;function Ye(nt,ut){var wt=gt(T,ut);return[Pe*nt/(1/a(ut)+be/a(wt)),(ut+A*m(wt))/Pe]}Ye.invert=function(nt,ut){var wt=Pe*ut,kt=ut<0?-k:k,Ht=25,Ot,Kt;do Kt=wt-A*m(kt),kt-=Ot=(m(2*kt)+2*kt-T*m(Kt))/(2*a(2*kt)+2+T*a(Kt)*A*a(kt));while(P(Ot)>c&&--Ht>0);return Kt=wt-A*m(kt),[nt*(1/a(Kt)+be/a(kt))/Pe,Kt]};function mt(){return w.geoProjection(Ye).scale(160.857)}function bt(nt){var ut=0,wt=w.geoProjectionMutator(nt),kt=wt(ut);return kt.parallel=function(Ht){return arguments.length?wt(ut=Ht*x):ut*p},kt}function ft(nt,ut){return[nt*a(ut),ut]}ft.invert=function(nt,ut){return[nt/a(ut),ut]};function Wt(){return w.geoProjection(ft).scale(152.63)}function Zt(nt){if(!nt)return ft;var ut=1/E(nt);function wt(kt,Ht){var Ot=ut+nt-Ht,Kt=Ot&&kt*a(Ht)/Ot;return[Ot*m(Kt),ut-Ot*a(Kt)]}return wt.invert=function(kt,Ht){var Ot=U(kt*kt+(Ht=ut-Ht)*Ht),Kt=ut+nt-Ot;return[Ot/a(Kt)*r(kt,Ht),Kt]},wt}function cr(){return bt(Zt).scale(123.082).center([0,26.1441]).parallel(45)}function pr(nt){function ut(wt,kt){var Ht=M-kt,Ot=Ht&&wt*nt*m(Ht)/Ht;return[Ht*m(Ot)/nt,M-Ht*a(Ot)]}return ut.invert=function(wt,kt){var Ht=wt*nt,Ot=M-kt,Kt=U(Ht*Ht+Ot*Ot),Cr=r(Ht,Ot);return[(Kt?Kt/m(Kt):1)*Cr/nt,M-Kt]},ut}function Br(){var nt=.5,ut=w.geoProjectionMutator(pr),wt=ut(nt);return wt.fraction=function(kt){return arguments.length?ut(nt=+kt):nt},wt.scale(158.837)}var Fr=ht(1,4/T,T);function cn(){return w.geoProjection(Fr).scale(152.63)}function Nr(nt,ut,wt,kt,Ht,Ot){var Kt=a(Ot),Cr;if(P(nt)>1||P(Ot)>1)Cr=B(wt*Ht+ut*kt*Kt);else{var Or=m(nt/2),Vr=m(Ot/2);Cr=2*D(U(Or*Or+ut*kt*Vr*Vr))}return P(Cr)>c?[Cr,r(kt*m(Ot),ut*Ht-wt*kt*Kt)]:[0,0]}function Jr(nt,ut,wt){return B((nt*nt+ut*ut-wt*wt)/(2*nt*ut))}function Dt(nt){return nt-2*T*i((nt+T)/(2*T))}function $e(nt,ut,wt){for(var kt=[[nt[0],nt[1],m(nt[1]),a(nt[1])],[ut[0],ut[1],m(ut[1]),a(ut[1])],[wt[0],wt[1],m(wt[1]),a(wt[1])]],Ht=kt[2],Ot,Kt=0;Kt<3;++Kt,Ht=Ot)Ot=kt[Kt],Ht.v=Nr(Ot[1]-Ht[1],Ht[3],Ht[2],Ot[3],Ot[2],Ot[0]-Ht[0]),Ht.point=[0,0];var Cr=Jr(kt[0].v[0],kt[2].v[0],kt[1].v[0]),Or=Jr(kt[0].v[0],kt[1].v[0],kt[2].v[0]),Vr=T-Cr;kt[2].point[1]=0,kt[0].point[0]=-(kt[1].point[0]=kt[0].v[0]/2);var sn=[kt[2].point[0]=kt[0].point[0]+kt[2].v[0]*a(Cr),2*(kt[0].point[1]=kt[1].point[1]=kt[2].v[0]*m(Cr))];function bn(Un,Gn){var ua=m(Gn),Ha=a(Gn),Ti=new Array(3),mi;for(mi=0;mi<3;++mi){var Ai=kt[mi];if(Ti[mi]=Nr(Gn-Ai[1],Ai[3],Ai[2],Ha,ua,Un-Ai[0]),!Ti[mi][0])return Ai.point;Ti[mi][1]=Dt(Ti[mi][1]-Ai.v[1])}var po=sn.slice();for(mi=0;mi<3;++mi){var Fo=mi==2?0:mi+1,Po=Jr(kt[mi].v[0],Ti[mi][0],Ti[Fo][0]);Ti[mi][1]<0&&(Po=-Po),mi?mi==1?(Po=Or-Po,po[0]-=Ti[mi][0]*a(Po),po[1]-=Ti[mi][0]*m(Po)):(Po=Vr-Po,po[0]+=Ti[mi][0]*a(Po),po[1]+=Ti[mi][0]*m(Po)):(po[0]+=Ti[mi][0]*a(Po),po[1]-=Ti[mi][0]*m(Po))}return po[0]/=3,po[1]/=3,po}return bn}function ot(nt){return nt[0]*=x,nt[1]*=x,nt}function De(){return Ee([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ee(nt,ut,wt){var kt=w.geoCentroid({type:"MultiPoint",coordinates:[nt,ut,wt]}),Ht=[-kt[0],-kt[1]],Ot=w.geoRotation(Ht),Kt=$e(ot(Ot(nt)),ot(Ot(ut)),ot(Ot(wt)));Kt.invert=Ve(Kt);var Cr=w.geoProjection(Kt).rotate(Ht),Or=Cr.center;return delete Cr.rotate,Cr.center=function(Vr){return arguments.length?Or(Ot(Vr)):Ot.invert(Or())},Cr.clipAngle(90)}function Ae(nt,ut){var wt=U(1-m(ut));return[2/g*nt*wt,g*(1-wt)]}Ae.invert=function(nt,ut){var wt=(wt=ut/g-1)*wt;return[wt>0?nt*U(T/wt)/2:0,D(1-wt)]};function Ie(){return w.geoProjection(Ae).scale(95.6464).center([0,30])}function tt(nt){var ut=E(nt);function wt(kt,Ht){return[kt,(kt?kt/m(kt):1)*(m(Ht)*a(kt)-ut*a(Ht))]}return wt.invert=ut?function(kt,Ht){kt&&(Ht*=m(kt)/kt);var Ot=a(kt);return[kt,2*r(U(Ot*Ot+ut*ut-Ht*Ht)-Ot,ut-Ht)]}:function(kt,Ht){return[kt,D(kt?Ht*E(kt)/kt:Ht)]},wt}function st(){return bt(tt).scale(249.828).clipAngle(90)}var Ft=U(3);function Nt(nt,ut){return[Ft*nt*(2*a(2*ut/3)-1)/g,Ft*g*m(ut/3)]}Nt.invert=function(nt,ut){var wt=3*D(ut/(Ft*g));return[g*nt/(Ft*(2*a(2*wt/3)-1)),wt]};function Xt(){return w.geoProjection(Nt).scale(156.19)}function lr(nt){var ut=a(nt);function wt(kt,Ht){return[kt*ut,m(Ht)/ut]}return wt.invert=function(kt,Ht){return[kt/ut,D(Ht*ut)]},wt}function Rr(){return bt(lr).parallel(38.58).scale(195.044)}function Mr(nt){var ut=a(nt);function wt(kt,Ht){return[kt*ut,(1+ut)*E(Ht/2)]}return wt.invert=function(kt,Ht){return[kt/ut,t(Ht/(1+ut))*2]},wt}function Sr(){return bt(Mr).scale(124.75)}function Kr(nt,ut){var wt=U(8/(3*T));return[wt*nt*(1-P(ut)/T),wt*ut]}Kr.invert=function(nt,ut){var wt=U(8/(3*T)),kt=ut/wt;return[nt/(wt*(1-P(kt)/T)),kt]};function qn(){return w.geoProjection(Kr).scale(165.664)}function ha(nt,ut){var wt=U(4-3*m(P(ut)));return[2/U(6*T)*nt*wt,y(ut)*U(2*T/3)*(2-wt)]}ha.invert=function(nt,ut){var wt=2-P(ut)/U(2*T/3);return[nt*U(6*T)/(2*wt),y(ut)*D((4-wt*wt)/3)]};function ia(){return w.geoProjection(ha).scale(165.664)}function xa(nt,ut){var wt=U(T*(4+T));return[2/wt*nt*(1+U(1-4*ut*ut/(T*T))),4/wt*ut]}xa.invert=function(nt,ut){var wt=U(T*(4+T))/2;return[nt*wt/(1+U(1-ut*ut*(4+T)/(4*T))),ut*wt/2]};function ba(){return w.geoProjection(xa).scale(180.739)}function ea(nt,ut){var wt=(2+M)*m(ut);ut/=2;for(var kt=0,Ht=1/0;kt<10&&P(Ht)>c;kt++){var Ot=a(ut);ut-=Ht=(ut+m(ut)*(Ot+2)-wt)/(2*Ot*(1+Ot))}return[2/U(T*(4+T))*nt*(1+a(ut)),2*U(T/(4+T))*m(ut)]}ea.invert=function(nt,ut){var wt=ut*U((4+T)/T)/2,kt=D(wt),Ht=a(kt);return[nt/(2/U(T*(4+T))*(1+Ht)),D((kt+wt*(Ht+2))/(2+M))]};function Za(){return w.geoProjection(ea).scale(180.739)}function ui(nt,ut){return[nt*(1+a(ut))/U(2+T),2*ut/U(2+T)]}ui.invert=function(nt,ut){var wt=U(2+T),kt=ut*wt/2;return[wt*nt/(1+a(kt)),kt]};function _r(){return w.geoProjection(ui).scale(173.044)}function Qt(nt,ut){for(var wt=(1+M)*m(ut),kt=0,Ht=1/0;kt<10&&P(Ht)>c;kt++)ut-=Ht=(ut+m(ut)-wt)/(1+a(ut));return wt=U(2+T),[nt*(1+a(ut))/wt,2*ut/wt]}Qt.invert=function(nt,ut){var wt=1+M,kt=U(wt/2);return[nt*2*kt/(1+a(ut*=kt)),D((ut+m(ut))/wt)]};function yr(){return w.geoProjection(Qt).scale(173.044)}var br=3+2*A;function nn(nt,ut){var wt=m(nt/=2),kt=a(nt),Ht=U(a(ut)),Ot=a(ut/=2),Kt=m(ut)/(Ot+A*kt*Ht),Cr=U(2/(1+Kt*Kt)),Or=U((A*Ot+(kt+wt)*Ht)/(A*Ot+(kt-wt)*Ht));return[br*(Cr*(Or-1/Or)-2*s(Or)),br*(Cr*Kt*(Or+1/Or)-2*t(Kt))]}nn.invert=function(nt,ut){if(!(Ot=ie.invert(nt/1.2,ut*1.065)))return null;var wt=Ot[0],kt=Ot[1],Ht=20,Ot;nt/=br,ut/=br;do{var Kt=wt/2,Cr=kt/2,Or=m(Kt),Vr=a(Kt),sn=m(Cr),bn=a(Cr),Un=a(kt),Gn=U(Un),ua=sn/(bn+A*Vr*Gn),Ha=ua*ua,Ti=U(2/(1+Ha)),mi=A*bn+(Vr+Or)*Gn,Ai=A*bn+(Vr-Or)*Gn,po=mi/Ai,Fo=U(po),Po=Fo-1/Fo,us=Fo+1/Fo,il=Ti*Po-2*s(Fo)-nt,ol=Ti*ua*us-2*t(ua)-ut,Bs=sn&&b*Gn*Or*Ha/sn,hl=(A*Vr*bn+Gn)/(2*(bn+A*Vr*Gn)*(bn+A*Vr*Gn)*Gn),bu=-.5*ua*Ti*Ti*Ti,cu=bu*Bs,js=bu*hl,Us=(Us=2*bn+A*Gn*(Vr-Or))*Us*Fo,Bu=(A*Vr*bn*Gn+Un)/Us,pc=-(A*Or*sn)/(Gn*Us),Xc=Po*cu-2*Bu/Fo+Ti*(Bu+Bu/po),Te=Po*js-2*pc/Fo+Ti*(pc+pc/po),He=ua*us*cu-2*Bs/(1+Ha)+Ti*us*Bs+Ti*ua*(Bu-Bu/po),ct=ua*us*js-2*hl/(1+Ha)+Ti*us*hl+Ti*ua*(pc-pc/po),Pt=Te*He-ct*Xc;if(!Pt)break;var It=(ol*Te-il*ct)/Pt,Ut=(il*He-ol*Xc)/Pt;wt-=It,kt=o(-M,u(M,kt-Ut))}while((P(It)>c||P(Ut)>c)&&--Ht>0);return P(P(kt)-M)<c?[0,kt]:Ht&&[wt,kt]};function wn(){return w.geoProjection(nn).scale(62.5271)}var Ln=a(35*x);function Fn(nt,ut){var wt=E(ut/2);return[nt*Ln*U(1-wt*wt),(1+Ln)*wt]}Fn.invert=function(nt,ut){var wt=ut/(1+Ln);return[nt&&nt/(Ln*U(1-wt*wt)),2*t(wt)]};function va(){return w.geoProjection(Fn).scale(137.152)}function Da(nt,ut){var wt=ut/2,kt=a(wt);return[2*nt/g*a(ut)*kt*kt,g*E(wt)]}Da.invert=function(nt,ut){var wt=t(ut/g),kt=a(wt),Ht=2*wt;return[nt*g/2/(a(Ht)*kt*kt),Ht]};function Pa(){return w.geoProjection(Da).scale(135.264)}function Fa(nt){var ut=1-nt,wt=Ot(T,0)[0]-Ot(-T,0)[0],kt=Ot(0,M)[1]-Ot(0,-M)[1],Ht=U(2*kt/wt);function Ot(Or,Vr){var sn=a(Vr),bn=m(Vr);return[sn/(ut+nt*sn)*Or,ut*Vr+nt*bn]}function Kt(Or,Vr){var sn=Ot(Or,Vr);return[sn[0]*Ht,sn[1]/Ht]}function Cr(Or){return Kt(0,Or)[1]}return Kt.invert=function(Or,Vr){var sn=Ge(Cr,Vr),bn=Or/Ht*(nt+ut/a(sn));return[bn,sn]},Kt}function $a(){var nt=.5,ut=w.geoProjectionMutator(Fa),wt=ut(nt);return wt.alpha=function(kt){return arguments.length?ut(nt=+kt):nt},wt.scale(168.725)}function oa(nt){return[nt[0]/2,D(E(nt[1]/2*x))*p]}function zi(nt){return[nt[0]*2,2*t(m(nt[1]*x))*p]}function Gi(nt){nt==null&&(nt=w.geoOrthographic);var ut=nt(),wt=w.geoEquirectangular().scale(p).precision(0).clipAngle(null).translate([0,0]);function kt(Ot){return ut(oa(Ot))}ut.invert&&(kt.invert=function(Ot){return zi(ut.invert(Ot))}),kt.stream=function(Ot){var Kt=ut.stream(Ot),Cr=wt.stream({point:function(Or,Vr){Kt.point(Or/2,D(E(-Vr/2*x))*p)},lineStart:function(){Kt.lineStart()},lineEnd:function(){Kt.lineEnd()},polygonStart:function(){Kt.polygonStart()},polygonEnd:function(){Kt.polygonEnd()}});return Cr.sphere=Kt.sphere,Cr};function Ht(Ot){kt[Ot]=function(){return arguments.length?(ut[Ot].apply(ut,arguments),kt):ut[Ot]()}}return kt.rotate=function(Ot){return arguments.length?(wt.rotate(Ot),kt):wt.rotate()},kt.center=function(Ot){return arguments.length?(ut.center(oa(Ot)),kt):zi(ut.center())},Ht("angle"),Ht("clipAngle"),Ht("clipExtent"),Ht("fitExtent"),Ht("fitHeight"),Ht("fitSize"),Ht("fitWidth"),Ht("scale"),Ht("translate"),Ht("precision"),kt.scale(249.5)}function qt(nt,ut){var wt=2*T/ut,kt=nt*nt;function Ht(Ot,Kt){var Cr=w.geoAzimuthalEquidistantRaw(Ot,Kt),Or=Cr[0],Vr=Cr[1],sn=Or*Or+Vr*Vr;if(sn>kt){var bn=U(sn),Un=r(Vr,Or),Gn=wt*h(Un/wt),ua=Un-Gn,Ha=nt*a(ua),Ti=(nt*m(ua)-ua*m(Ha))/(M-Ha),mi=Ct(ua,Ti),Ai=(T-nt)/Ur(mi,Ha,T);Or=bn;var po=50,Fo;do Or-=Fo=(nt+Ur(mi,Ha,Or)*Ai-bn)/(mi(Or)*Ai);while(P(Fo)>c&&--po>0);Vr=ua*m(Or),Or<M&&(Vr-=Ti*(Or-M));var Po=m(Gn),us=a(Gn);Cr[0]=Or*us-Vr*Po,Cr[1]=Or*Po+Vr*us}return Cr}return Ht.invert=function(Ot,Kt){var Cr=Ot*Ot+Kt*Kt;if(Cr>kt){var Or=U(Cr),Vr=r(Kt,Ot),sn=wt*h(Vr/wt),bn=Vr-sn;Ot=Or*a(bn),Kt=Or*m(bn);for(var Un=Ot-M,Gn=m(Ot),ua=Kt/Gn,Ha=Ot<M?1/0:0,Ti=10;;){var mi=nt*m(ua),Ai=nt*a(ua),po=m(Ai),Fo=M-Ai,Po=(mi-ua*po)/Fo,us=Ct(ua,Po);if(P(Ha)<_||!--Ti)break;ua-=Ha=(ua*Gn-Po*Un-Kt)/(Gn-Un*2*(Fo*(Ai+ua*mi*a(Ai)-po)-mi*(mi-ua*po))/(Fo*Fo))}Or=nt+Ur(us,Ai,Ot)*(T-nt)/Ur(us,Ai,T),Vr=sn+ua,Ot=Or*a(Vr),Kt=Or*m(Vr)}return w.geoAzimuthalEquidistantRaw.invert(Ot,Kt)},Ht}function Ct(nt,ut){return function(wt){var kt=nt*a(wt);return wt<M&&(kt-=ut),U(1+kt*kt)}}function Ur(nt,ut,wt){for(var kt=50,Ht=(wt-ut)/kt,Ot=nt(ut)+nt(wt),Kt=1,Cr=ut;Kt<kt;++Kt)Ot+=2*nt(Cr+=Ht);return Ot*.5*Ht}function Qr(){var nt=6,ut=30*x,wt=a(ut),kt=m(ut),Ht=w.geoProjectionMutator(qt),Ot=Ht(ut,nt),Kt=Ot.stream,Cr=.01,Or=-a(Cr*x),Vr=m(Cr*x);return Ot.radius=function(sn){return arguments.length?(wt=a(ut=sn*x),kt=m(ut),Ht(ut,nt)):ut*p},Ot.lobes=function(sn){return arguments.length?Ht(ut,nt=+sn):nt},Ot.stream=function(sn){var bn=Ot.rotate(),Un=Kt(sn),Gn=(Ot.rotate([0,0]),Kt(sn));return Ot.rotate(bn),Un.sphere=function(){Gn.polygonStart(),Gn.lineStart();for(var ua=0,Ha=2*T/nt,Ti=0;ua<nt;++ua,Ti-=Ha)Gn.point(r(Vr*a(Ti),Or)*p,D(Vr*m(Ti))*p),Gn.point(r(kt*a(Ti-Ha/2),wt)*p,D(kt*m(Ti-Ha/2))*p);Gn.lineEnd(),Gn.polygonEnd()},Un},Ot.rotate([90,-40]).scale(91.7095).clipAngle(180-.001)}function tn(nt,ut,wt,kt,Ht,Ot,Kt,Cr){arguments.length<8&&(Cr=0);function Or(Vr,sn){if(!sn)return[nt*Vr/T,0];var bn=sn*sn,Un=nt+bn*(ut+bn*(wt+bn*kt)),Gn=sn*(Ht-1+bn*(Ot-Cr+bn*Kt)),ua=(Un*Un+Gn*Gn)/(2*Gn),Ha=Vr*D(Un/ua)/T;return[ua*m(Ha),sn*(1+bn*Cr)+ua*(1-a(Ha))]}return Or.invert=function(Vr,sn){var bn=T*Vr/nt,Un=sn,Gn,ua,Ha=50;do{var Ti=Un*Un,mi=nt+Ti*(ut+Ti*(wt+Ti*kt)),Ai=Un*(Ht-1+Ti*(Ot-Cr+Ti*Kt)),po=mi*mi+Ai*Ai,Fo=2*Ai,Po=po/Fo,us=Po*Po,il=D(mi/Po)/T,ol=bn*il,Bs=mi*mi,hl=(2*ut+Ti*(4*wt+Ti*6*kt))*Un,bu=Ht+Ti*(3*Ot+Ti*5*Kt),cu=2*(mi*hl+Ai*(bu-1)),js=2*(bu-1),Us=(cu*Fo-po*js)/(Fo*Fo),Bu=a(ol),pc=m(ol),Xc=Po*Bu,Te=Po*pc,He=bn/T*(1/U(1-Bs/us))*(hl*Po-mi*Us)/us,ct=Te-Vr,Pt=Un*(1+Ti*Cr)+Po-Xc-sn,It=Us*pc+Xc*He,Ut=Xc*il,hr=1+Us-(Us*Bu-Te*He),fr=Te*il,Pr=It*fr-hr*Ut;if(!Pr)break;bn-=Gn=(Pt*It-ct*hr)/Pr,Un-=ua=(ct*fr-Pt*Ut)/Pr}while((P(Gn)>c||P(ua)>c)&&--Ha>0);return[bn,Un]},Or}var Xr=tn(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function en(){return w.geoProjection(Xr).scale(149.995)}var Tn=tn(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function hn(){return w.geoProjection(Tn).scale(153.93)}var Rt=tn(5/6*T,-.62636,-.0344,0,1.3493,-.05524,0,.045);function xr(){return w.geoProjection(Rt).scale(130.945)}function Wr(nt,ut){var wt=nt*nt,kt=ut*ut;return[nt*(1-.162388*kt)*(.87-952426e-9*wt*wt),ut*(1+kt/12)]}Wr.invert=function(nt,ut){var wt=nt,kt=ut,Ht=50,Ot;do{var Kt=kt*kt;kt-=Ot=(kt*(1+Kt/12)-ut)/(1+Kt/4)}while(P(Ot)>c&&--Ht>0);Ht=50,nt/=1-.162388*Kt;do{var Cr=(Cr=wt*wt)*Cr;wt-=Ot=(wt*(.87-952426e-9*Cr)-nt)/(.87-.00476213*Cr)}while(P(Ot)>c&&--Ht>0);return[wt,kt]};function An(){return w.geoProjection(Wr).scale(131.747)}var Xn=tn(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function na(){return w.geoProjection(Xn).scale(131.087)}function ra(nt){var ut=nt(M,0)[0]-nt(-M,0)[0];function wt(kt,Ht){var Ot=kt>0?-.5:.5,Kt=nt(kt+Ot*T,Ht);return Kt[0]-=Ot*ut,Kt}return nt.invert&&(wt.invert=function(kt,Ht){var Ot=kt>0?-.5:.5,Kt=nt.invert(kt+Ot*ut,Ht),Cr=Kt[0]-Ot*T;return Cr<-T?Cr+=2*T:Cr>T&&(Cr-=2*T),Kt[0]=Cr,Kt}),wt}function Sn(nt,ut){var wt=y(nt),kt=y(ut),Ht=a(ut),Ot=a(nt)*Ht,Kt=m(nt)*Ht,Cr=m(kt*ut);nt=P(r(Kt,Cr)),ut=D(Ot),P(nt-M)>c&&(nt%=M);var Or=Wn(nt>T/4?M-nt:nt,ut);return nt>T/4&&(Cr=Or[0],Or[0]=-Or[1],Or[1]=-Cr),Or[0]*=wt,Or[1]*=-kt,Or}Sn.invert=function(nt,ut){P(nt)>1&&(nt=y(nt)*2-nt),P(ut)>1&&(ut=y(ut)*2-ut);var wt=y(nt),kt=y(ut),Ht=-wt*nt,Ot=-kt*ut,Kt=Ot/Ht<1,Cr=Fi(Kt?Ot:Ht,Kt?Ht:Ot),Or=Cr[0],Vr=Cr[1],sn=a(Vr);return Kt&&(Or=-M-Or),[wt*(r(m(Or)*sn,-m(Vr))+T),kt*D(a(Or)*sn)]};function Wn(nt,ut){if(ut===M)return[0,0];var wt=m(ut),kt=wt*wt,Ht=kt*kt,Ot=1+Ht,Kt=1+3*Ht,Cr=1-Ht,Or=D(1/U(Ot)),Vr=Cr+kt*Ot*Or,sn=(1-wt)/Vr,bn=U(sn),Un=sn*Ot,Gn=U(Un),ua=bn*Cr,Ha,Ti;if(nt===0)return[0,-(ua+kt*Gn)];var mi=a(ut),Ai=1/mi,po=2*wt*mi,Fo=(-3*kt+Or*Kt)*po,Po=(-Vr*mi-(1-wt)*Fo)/(Vr*Vr),us=.5*Po/bn,il=Cr*us-2*kt*bn*po,ol=kt*Ot*Po+sn*Kt*po,Bs=-Ai*po,hl=-Ai*ol,bu=-2*Ai*il,cu=4*nt/T,js;if(nt>.222*T||ut<T/4&&nt>.175*T){if(Ha=(ua+kt*U(Un*(1+Ht)-ua*ua))/(1+Ht),nt>T/4)return[Ha,Ha];var Us=Ha,Bu=.5*Ha;Ha=.5*(Bu+Us),Ti=50;do{var pc=U(Un-Ha*Ha),Xc=Ha*(bu+Bs*pc)+hl*D(Ha/Gn)-cu;if(!Xc)break;Xc<0?Bu=Ha:Us=Ha,Ha=.5*(Bu+Us)}while(P(Us-Bu)>c&&--Ti>0)}else{Ha=c,Ti=25;do{var Te=Ha*Ha,He=U(Un-Te),ct=bu+Bs*He,Pt=Ha*ct+hl*D(Ha/Gn)-cu,It=ct+(hl-Bs*Te)/He;Ha-=js=He?Pt/It:0}while(P(js)>c&&--Ti>0)}return[Ha,-ua-kt*U(Un-Ha*Ha)]}function Fi(nt,ut){for(var wt=0,kt=1,Ht=.5,Ot=50;;){var Kt=Ht*Ht,Cr=U(Ht),Or=D(1/U(1+Kt)),Vr=1-Kt+Ht*(1+Kt)*Or,sn=(1-Cr)/Vr,bn=U(sn),Un=sn*(1+Kt),Gn=bn*(1-Kt),ua=Un-nt*nt,Ha=U(ua),Ti=ut+Gn+Ht*Ha;if(P(kt-wt)<_||--Ot===0||Ti===0)break;Ti>0?wt=Ht:kt=Ht,Ht=.5*(wt+kt)}if(!Ot)return null;var mi=D(Cr),Ai=a(mi),po=1/Ai,Fo=2*Cr*Ai,Po=(-3*Ht+Or*(1+3*Kt))*Fo,us=(-Vr*Ai-(1-Cr)*Po)/(Vr*Vr),il=.5*us/bn,ol=(1-Kt)*il-2*Ht*bn*Fo,Bs=-2*po*ol,hl=-po*Fo,bu=-po*(Ht*(1+Kt)*us+sn*(1+3*Kt)*Fo);return[T/4*(nt*(Bs+hl*Ha)+bu*D(nt/U(Un))),mi]}function Ya(){return w.geoProjection(ra(Sn)).scale(239.75)}function Wi(nt,ut,wt){var kt,Ht,Ot;return nt?(kt=uo(nt,wt),ut?(Ht=uo(ut,1-wt),Ot=Ht[1]*Ht[1]+wt*kt[0]*kt[0]*Ht[0]*Ht[0],[[kt[0]*Ht[2]/Ot,kt[1]*kt[2]*Ht[0]*Ht[1]/Ot],[kt[1]*Ht[1]/Ot,-kt[0]*kt[2]*Ht[0]*Ht[2]/Ot],[kt[2]*Ht[1]*Ht[2]/Ot,-wt*kt[0]*kt[1]*Ht[0]/Ot]]):[[kt[0],0],[kt[1],0],[kt[2],0]]):(Ht=uo(ut,1-wt),[[0,Ht[0]/Ht[1]],[1/Ht[1],0],[Ht[2]/Ht[1],0]])}function uo(nt,ut){var wt,kt,Ht,Ot,Kt;if(ut<c)return Ot=m(nt),kt=a(nt),wt=ut*(nt-Ot*kt)/4,[Ot-wt*kt,kt+wt*Ot,1-ut*Ot*Ot/2,nt-wt];if(ut>=1-c)return wt=(1-ut)/4,kt=z(nt),Ot=V(nt),Ht=1/kt,Kt=kt*q(nt),[Ot+wt*(Kt-nt)/(kt*kt),Ht-wt*Ot*Ht*(Kt-nt),Ht+wt*Ot*Ht*(Kt+nt),2*t(l(nt))-M+wt*(Kt-nt)/kt];var Cr=[1,0,0,0,0,0,0,0,0],Or=[U(ut),0,0,0,0,0,0,0,0],Vr=0;for(kt=U(1-ut),Kt=1;P(Or[Vr]/Cr[Vr])>c&&Vr<8;)wt=Cr[Vr++],Or[Vr]=(wt-kt)/2,Cr[Vr]=(wt+kt)/2,kt=U(wt*kt),Kt*=2;Ht=Kt*Cr[Vr]*nt;do Ot=Or[Vr]*m(kt=Ht)/Cr[Vr],Ht=(D(Ot)+Ht)/2;while(--Vr);return[m(Ht),Ot=a(Ht),Ot/a(Ht-kt),Ht]}function Ao(nt,ut,wt){var kt=P(nt),Ht=P(ut),Ot=q(Ht);if(kt){var Kt=1/m(kt),Cr=1/(E(kt)*E(kt)),Or=-(Cr+wt*(Ot*Ot*Kt*Kt)-1+wt),Vr=(wt-1)*Cr,sn=(-Or+U(Or*Or-4*Vr))/2;return[wo(t(1/U(sn)),wt)*y(nt),wo(t(U((sn/Cr-1)/wt)),1-wt)*y(ut)]}return[0,wo(t(Ot),1-wt)*y(ut)]}function wo(nt,ut){if(!ut)return nt;if(ut===1)return s(E(nt/2+k));for(var wt=1,kt=U(1-ut),Ht=U(ut),Ot=0;P(Ht)>c;Ot++){if(nt%T){var Kt=t(kt*E(nt)/wt);Kt<0&&(Kt+=T),nt+=Kt+~~(nt/T)*T}else nt+=nt;Ht=(wt+kt)/2,kt=U(wt*kt),Ht=((wt=Ht)-kt)/2}return nt/(d(2,Ot)*wt)}function Uo(nt,ut){var wt=(A-1)/(A+1),kt=U(1-wt*wt),Ht=wo(M,kt*kt),Ot=-1,Kt=s(E(T/4+P(ut)/2)),Cr=l(Ot*Kt)/U(wt),Or=Ri(Cr*a(Ot*nt),Cr*m(Ot*nt)),Vr=Ao(Or[0],Or[1],kt*kt);return[-Vr[1],(ut>=0?1:-1)*(.5*Ht-Vr[0])]}function Ri(nt,ut){var wt=nt*nt,kt=ut+1,Ht=1-wt-ut*ut;return[.5*((nt>=0?M:-M)-r(Ht,2*nt)),-.25*s(Ht*Ht+4*wt)+.5*s(kt*kt+wt)]}function ps(nt,ut){var wt=ut[0]*ut[0]+ut[1]*ut[1];return[(nt[0]*ut[0]+nt[1]*ut[1])/wt,(nt[1]*ut[0]-nt[0]*ut[1])/wt]}Uo.invert=function(nt,ut){var wt=(A-1)/(A+1),kt=U(1-wt*wt),Ht=wo(M,kt*kt),Ot=-1,Kt=Wi(.5*Ht-ut,-nt,kt*kt),Cr=ps(Kt[0],Kt[1]),Or=r(Cr[1],Cr[0])/Ot;return[Or,2*t(l(.5/Ot*s(wt*Cr[0]*Cr[0]+wt*Cr[1]*Cr[1])))-M]};function as(){return w.geoProjection(ra(Uo)).scale(151.496)}function el(nt){var ut=m(nt),wt=a(nt),kt=As(nt);kt.invert=As(-nt);function Ht(Ot,Kt){var Cr=kt(Ot,Kt);Ot=Cr[0],Kt=Cr[1];var Or=m(Kt),Vr=a(Kt),sn=a(Ot),bn=B(ut*Or+wt*Vr*sn),Un=m(bn),Gn=P(Un)>c?bn/Un:1;return[Gn*wt*m(Ot),(P(Ot)>M?Gn:-Gn)*(ut*Vr-wt*Or*sn)]}return Ht.invert=function(Ot,Kt){var Cr=U(Ot*Ot+Kt*Kt),Or=-m(Cr),Vr=a(Cr),sn=Cr*Vr,bn=-Kt*Or,Un=Cr*ut,Gn=U(sn*sn+bn*bn-Un*Un),ua=r(sn*Un+bn*Gn,bn*Un-sn*Gn),Ha=(Cr>M?-1:1)*r(Ot*Or,Cr*a(ua)*Vr+Kt*m(ua)*Or);return kt.invert(Ha,ua)},Ht}function As(nt){var ut=m(nt),wt=a(nt);return function(kt,Ht){var Ot=a(Ht),Kt=a(kt)*Ot,Cr=m(kt)*Ot,Or=m(Ht);return[r(Cr,Kt*wt-Or*ut),D(Or*wt+Kt*ut)]}}function hs(){var nt=0,ut=w.geoProjectionMutator(el),wt=ut(nt),kt=wt.rotate,Ht=wt.stream,Ot=w.geoCircle();return wt.parallel=function(Kt){if(!arguments.length)return nt*p;var Cr=wt.rotate();return ut(nt=Kt*x).rotate(Cr)},wt.rotate=function(Kt){return arguments.length?(kt.call(wt,[Kt[0],Kt[1]-nt*p]),Ot.center([-Kt[0],-Kt[1]]),wt):(Kt=kt.call(wt),Kt[1]+=nt*p,Kt)},wt.stream=function(Kt){return Kt=Ht(Kt),Kt.sphere=function(){Kt.polygonStart();var Cr=.01,Or=Ot.radius(90-Cr)().coordinates[0],Vr=Or.length-1,sn=-1,bn;for(Kt.lineStart();++sn<Vr;)Kt.point((bn=Or[sn])[0],bn[1]);for(Kt.lineEnd(),Or=Ot.radius(90+Cr)().coordinates[0],Vr=Or.length-1,Kt.lineStart();--sn>=0;)Kt.point((bn=Or[sn])[0],bn[1]);Kt.lineEnd(),Kt.polygonEnd()},Kt},wt.scale(79.4187).parallel(45).clipAngle(180-.001)}var es=3,tl=D(1-1/es)*p,Ks=lr(0);function pl(nt){var ut=tl*x,wt=Ae(T,ut)[0]-Ae(-T,ut)[0],kt=Ks(0,ut)[1],Ht=Ae(0,ut)[1],Ot=g-Ht,Kt=f/nt,Cr=4/f,Or=kt+Ot*Ot*4/f;function Vr(sn,bn){var Un,Gn=P(bn);if(Gn>ut){var ua=u(nt-1,o(0,i((sn+T)/Kt)));sn+=T*(nt-1)/nt-ua*Kt,Un=Ae(sn,Gn),Un[0]=Un[0]*f/wt-f*(nt-1)/(2*nt)+ua*f/nt,Un[1]=kt+(Un[1]-Ht)*4*Ot/f,bn<0&&(Un[1]=-Un[1])}else Un=Ks(sn,bn);return Un[0]*=Cr,Un[1]/=Or,Un}return Vr.invert=function(sn,bn){sn/=Cr,bn*=Or;var Un=P(bn);if(Un>kt){var Gn=u(nt-1,o(0,i((sn+T)/Kt)));sn=(sn+T*(nt-1)/nt-Gn*Kt)*wt/f;var ua=Ae.invert(sn,.25*(Un-kt)*f/Ot+Ht);return ua[0]-=T*(nt-1)/nt-Gn*Kt,bn<0&&(ua[1]=-ua[1]),ua}return Ks.invert(sn,bn)},Vr}function Ss(nt,ut){return[nt,ut&1?90-c:tl]}function ls(nt,ut){return[nt,ut&1?-90+c:-tl]}function Lo(nt){return[nt[0]*(1-c),nt[1]]}function Es(nt){var ut=[].concat(C.range(-180,180+nt/2,nt).map(Ss),C.range(180,-180-nt/2,-nt).map(ls));return{type:"Polygon",coordinates:[nt===180?ut.map(Lo):ut]}}function ml(){var nt=4,ut=w.geoProjectionMutator(pl),wt=ut(nt),kt=wt.stream;return wt.lobes=function(Ht){return arguments.length?ut(nt=+Ht):nt},wt.stream=function(Ht){var Ot=wt.rotate(),Kt=kt(Ht),Cr=(wt.rotate([0,0]),kt(Ht));return wt.rotate(Ot),Kt.sphere=function(){w.geoStream(Es(180/nt),Cr)},Kt},wt.scale(239.75)}function zl(nt){var ut=1+nt,wt=m(1/ut),kt=D(wt),Ht=2*U(T/(Ot=T+4*kt*ut)),Ot,Kt=.5*Ht*(ut+U(nt*(2+nt))),Cr=nt*nt,Or=ut*ut;function Vr(sn,bn){var Un=1-m(bn),Gn,ua;if(Un&&Un<2){var Ha=M-bn,Ti=25,mi;do{var Ai=m(Ha),po=a(Ha),Fo=kt+r(Ai,ut-po),Po=1+Or-2*ut*po;Ha-=mi=(Ha-Cr*kt-ut*Ai+Po*Fo-.5*Un*Ot)/(2*ut*Ai*Fo)}while(P(mi)>_&&--Ti>0);Gn=Ht*U(Po),ua=sn*Fo/T}else Gn=Ht*(nt+Un),ua=sn*kt/T;return[Gn*m(ua),Kt-Gn*a(ua)]}return Vr.invert=function(sn,bn){var Un=sn*sn+(bn-=Kt)*bn,Gn=(1+Or-Un/(Ht*Ht))/(2*ut),ua=B(Gn),Ha=m(ua),Ti=kt+r(Ha,ut-Gn);return[D(sn/U(Un))*T/Ti,D(1-2*(ua-Cr*kt-ut*Ha+(1+Or-2*ut*Gn)*Ti)/Ot)]},Vr}function Bl(){var nt=1,ut=w.geoProjectionMutator(zl),wt=ut(nt);return wt.ratio=function(kt){return arguments.length?ut(nt=+kt):nt},wt.scale(167.774).center([0,18.67])}var Fs=.7109889596207567,Di=.0528035274542;function _o(nt,ut){return ut>-Fs?(nt=lt(nt,ut),nt[1]+=Di,nt):ft(nt,ut)}_o.invert=function(nt,ut){return ut>-Fs?lt.invert(nt,ut-Di):ft.invert(nt,ut)};function Nl(){return w.geoProjection(_o).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Vs(nt,ut){return P(ut)>Fs?(nt=lt(nt,ut),nt[1]-=ut>0?Di:-Di,nt):ft(nt,ut)}Vs.invert=function(nt,ut){return P(ut)>Fs?lt.invert(nt,ut+(ut>0?Di:-Di)):ft.invert(nt,ut)};function Ko(){return w.geoProjection(Vs).scale(152.63)}function jl(nt,ut,wt,kt){var Ht=U(4*T/(2*wt+(1+nt-ut/2)*m(2*wt)+(nt+ut)/2*m(4*wt)+ut/2*m(6*wt))),Ot=U(kt*m(wt)*U((1+nt*a(2*wt)+ut*a(4*wt))/(1+nt+ut))),Kt=wt*Or(1);function Cr(bn){return U(1+nt*a(2*bn)+ut*a(4*bn))}function Or(bn){var Un=bn*wt;return(2*Un+(1+nt-ut/2)*m(2*Un)+(nt+ut)/2*m(4*Un)+ut/2*m(6*Un))/wt}function Vr(bn){return Cr(bn)*m(bn)}var sn=function(bn,Un){var Gn=wt*Ge(Or,Kt*m(Un)/wt,Un/T);isNaN(Gn)&&(Gn=wt*y(Un));var ua=Ht*Cr(Gn);return[ua*Ot*bn/T*a(Gn),ua/Ot*m(Gn)]};return sn.invert=function(bn,Un){var Gn=Ge(Vr,Un*Ot/Ht);return[bn*T/(a(Gn)*Ht*Ot*Cr(Gn)),D(wt*Or(Gn/wt)/Kt)]},wt===0&&(Ht=U(kt/T),sn=function(bn,Un){return[bn*Ht,m(Un)/Ht]},sn.invert=function(bn,Un){return[bn/Ht,D(Un*Ht)]}),sn}function rl(){var nt=1,ut=0,wt=45*x,kt=2,Ht=w.geoProjectionMutator(jl),Ot=Ht(nt,ut,wt,kt);return Ot.a=function(Kt){return arguments.length?Ht(nt=+Kt,ut,wt,kt):nt},Ot.b=function(Kt){return arguments.length?Ht(nt,ut=+Kt,wt,kt):ut},Ot.psiMax=function(Kt){return arguments.length?Ht(nt,ut,wt=+Kt*x,kt):wt*p},Ot.ratio=function(Kt){return arguments.length?Ht(nt,ut,wt,kt=+Kt):kt},Ot.scale(180.739)}function yl(nt,ut,wt,kt,Ht,Ot,Kt,Cr,Or,Vr,sn){if(sn.nanEncountered)return NaN;var bn,Un,Gn,ua,Ha,Ti,mi,Ai,po,Fo;if(bn=wt-ut,Un=nt(ut+bn*.25),Gn=nt(wt-bn*.25),isNaN(Un)){sn.nanEncountered=!0;return}if(isNaN(Gn)){sn.nanEncountered=!0;return}return ua=bn*(kt+4*Un+Ht)/12,Ha=bn*(Ht+4*Gn+Ot)/12,Ti=ua+Ha,Fo=(Ti-Kt)/15,Vr>Or?(sn.maxDepthCount++,Ti+Fo):Math.abs(Fo)<Cr?Ti+Fo:(mi=ut+bn*.5,Ai=yl(nt,ut,mi,kt,Un,Ht,ua,Cr*.5,Or,Vr+1,sn),isNaN(Ai)?(sn.nanEncountered=!0,NaN):(po=yl(nt,mi,wt,Ht,Gn,Ot,Ha,Cr*.5,Or,Vr+1,sn),isNaN(po)?(sn.nanEncountered=!0,NaN):Ai+po))}function Cu(nt,ut,wt,kt,Ht){var Ot={maxDepthCount:0,nanEncountered:!1};Ht===void 0&&(Ht=20);var Kt=nt(ut),Cr=nt(.5*(ut+wt)),Or=nt(wt),Vr=(Kt+4*Cr+Or)*(wt-ut)/6,sn=yl(nt,ut,wt,Kt,Cr,Or,Vr,kt,Ht,1,Ot);return sn}function yo(nt,ut,wt){function kt(Gn){return nt+(1-nt)*d(1-d(Gn,ut),1/ut)}function Ht(Gn){return Cu(kt,0,Gn,1e-4)}for(var Ot=1/Ht(1),Kt=1e3,Cr=(1+1e-8)*Ot,Or=[],Vr=0;Vr<=Kt;Vr++)Or.push(Ht(Vr/Kt)*Cr);function sn(Gn){var ua=0,Ha=Kt,Ti=Kt>>1;do Or[Ti]>Gn?Ha=Ti:ua=Ti,Ti=ua+Ha>>1;while(Ti>ua);var mi=Or[Ti+1]-Or[Ti];return mi&&(mi=(Gn-Or[Ti+1])/mi),(Ti+1+mi)/Kt}var bn=2*sn(1)/T*Ot/wt,Un=function(Gn,ua){var Ha=sn(P(m(ua))),Ti=kt(Ha)*Gn;return Ha/=bn,[Ti,ua>=0?Ha:-Ha]};return Un.invert=function(Gn,ua){var Ha;return ua*=bn,P(ua)<1&&(Ha=y(ua)*D(Ht(P(ua))*Ot)),[Gn/kt(P(ua)),Ha]},Un}function Ps(){var nt=0,ut=2.5,wt=1.183136,kt=w.geoProjectionMutator(yo),Ht=kt(nt,ut,wt);return Ht.alpha=function(Ot){return arguments.length?kt(nt=+Ot,ut,wt):nt},Ht.k=function(Ot){return arguments.length?kt(nt,ut=+Ot,wt):ut},Ht.gamma=function(Ot){return arguments.length?kt(nt,ut,wt=+Ot):wt},Ht.scale(152.63)}function ms(nt,ut){return P(nt[0]-ut[0])<c&&P(nt[1]-ut[1])<c}function Kl(nt,ut){for(var wt=-1,kt=nt.length,Ht=nt[0],Ot,Kt,Cr,Or=[];++wt<kt;){Ot=nt[wt],Kt=(Ot[0]-Ht[0])/ut,Cr=(Ot[1]-Ht[1])/ut;for(var Vr=0;Vr<ut;++Vr)Or.push([Ht[0]+Vr*Kt,Ht[1]+Vr*Cr]);Ht=Ot}return Or.push(Ot),Or}function Jl(nt){var ut=[],wt,kt,Ht,Ot,Kt,Cr,Or,Vr=nt[0].length;for(Or=0;Or<Vr;++Or)wt=nt[0][Or],kt=wt[0][0],Ht=wt[0][1],Ot=wt[1][1],Kt=wt[2][0],Cr=wt[2][1],ut.push(Kl([[kt+c,Ht+c],[kt+c,Ot-c],[Kt-c,Ot-c],[Kt-c,Cr+c]],30));for(Or=nt[1].length-1;Or>=0;--Or)wt=nt[1][Or],kt=wt[0][0],Ht=wt[0][1],Ot=wt[1][1],Kt=wt[2][0],Cr=wt[2][1],ut.push(Kl([[Kt-c,Cr-c],[Kt-c,Ot+c],[kt+c,Ot+c],[kt+c,Ht-c]],30));return{type:"Polygon",coordinates:[C.merge(ut)]}}function Wo(nt,ut,wt){var kt,Ht;function Ot(Or,Vr){for(var sn=Vr<0?-1:1,bn=ut[+(Vr<0)],Un=0,Gn=bn.length-1;Un<Gn&&Or>bn[Un][2][0];++Un);var ua=nt(Or-bn[Un][1][0],Vr);return ua[0]+=nt(bn[Un][1][0],sn*Vr>sn*bn[Un][0][1]?bn[Un][0][1]:Vr)[0],ua}wt?Ot.invert=wt(Ot):nt.invert&&(Ot.invert=function(Or,Vr){for(var sn=Ht[+(Vr<0)],bn=ut[+(Vr<0)],Un=0,Gn=sn.length;Un<Gn;++Un){var ua=sn[Un];if(ua[0][0]<=Or&&Or<ua[1][0]&&ua[0][1]<=Vr&&Vr<ua[1][1]){var Ha=nt.invert(Or-nt(bn[Un][1][0],0)[0],Vr);return Ha[0]+=bn[Un][1][0],ms(Ot(Ha[0],Ha[1]),[Or,Vr])?Ha:null}}});var Kt=w.geoProjection(Ot),Cr=Kt.stream;return Kt.stream=function(Or){var Vr=Kt.rotate(),sn=Cr(Or),bn=(Kt.rotate([0,0]),Cr(Or));return Kt.rotate(Vr),sn.sphere=function(){w.geoStream(kt,bn)},sn},Kt.lobes=function(Or){return arguments.length?(kt=Jl(Or),ut=Or.map(function(Vr){return Vr.map(function(sn){return[[sn[0][0]*x,sn[0][1]*x],[sn[1][0]*x,sn[1][1]*x],[sn[2][0]*x,sn[2][1]*x]]})}),Ht=ut.map(function(Vr){return Vr.map(function(sn){var bn=nt(sn[0][0],sn[0][1])[0],Un=nt(sn[2][0],sn[2][1])[0],Gn=nt(sn[1][0],sn[0][1])[1],ua=nt(sn[1][0],sn[1][1])[1],Ha;return Gn>ua&&(Ha=Gn,Gn=ua,ua=Ha),[[bn,Gn],[Un,ua]]})}),Kt):ut.map(function(Vr){return Vr.map(function(sn){return[[sn[0][0]*p,sn[0][1]*p],[sn[1][0]*p,sn[1][1]*p],[sn[2][0]*p,sn[2][1]*p]]})})},ut!=null&&Kt.lobes(ut),Kt}var pu=[[[[-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 _u(){return Wo(Ye,pu).scale(160.857)}var Xs=[[[[-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 Pl(){return Wo(Vs,Xs).scale(152.63)}var Gl=[[[[-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 Yl(){return Wo(lt,Gl).scale(169.529)}var tc=[[[[-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 bf(){return Wo(lt,tc).scale(169.529).rotate([20,0])}var Qc=[[[[-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 ff(){return Wo(_o,Qc,Ve).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Wh=[[[[-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 Dh(){return Wo(ft,Wh).scale(152.63).rotate([-20,0])}function Ll(nt,ut){return[3/f*nt*U(T*T/3-ut*ut),ut]}Ll.invert=function(nt,ut){return[f/3*nt/U(T*T/3-ut*ut),ut]};function jc(){return w.geoProjection(Ll).scale(158.837)}function Yh(nt){function ut(wt,kt){if(P(P(kt)-M)<c)return[0,kt<0?-2:2];var Ht=m(kt),Ot=d((1+Ht)/(1-Ht),nt/2),Kt=.5*(Ot+1/Ot)+a(wt*=nt);return[2*m(wt)/Kt,(Ot-1/Ot)/Kt]}return ut.invert=function(wt,kt){var Ht=P(kt);if(P(Ht-2)<c)return wt?null:[0,y(kt)*M];if(Ht>2)return null;wt/=2,kt/=2;var Ot=wt*wt,Kt=kt*kt,Cr=2*kt/(1+Ot+Kt);return Cr=d((1+Cr)/(1-Cr),1/nt),[r(2*wt,1-Ot-Kt)/nt,D((Cr-1)/(Cr+1))]},ut}function hc(){var nt=.5,ut=w.geoProjectionMutator(Yh),wt=ut(nt);return wt.spacing=function(kt){return arguments.length?ut(nt=+kt):nt},wt.scale(124.75)}var rc=T/A;function dc(nt,ut){return[nt*(1+U(a(ut)))/2,ut/(a(ut/2)*a(nt/6))]}dc.invert=function(nt,ut){var wt=P(nt),kt=P(ut),Ht=c,Ot=M;kt<rc?Ot*=kt/rc:Ht+=6*B(rc/kt);for(var Kt=0;Kt<25;Kt++){var Cr=m(Ot),Or=U(a(Ot)),Vr=m(Ot/2),sn=a(Ot/2),bn=m(Ht/6),Un=a(Ht/6),Gn=.5*Ht*(1+Or)-wt,ua=Ot/(sn*Un)-kt,Ha=Or?-.25*Ht*Cr/Or:0,Ti=.5*(1+Or),mi=(1+.5*Ot*Vr/sn)/(sn*Un),Ai=Ot/sn*(bn/6)/(Un*Un),po=Ha*Ai-mi*Ti,Fo=(Gn*Ai-ua*Ti)/po,Po=(ua*Ha-Gn*mi)/po;if(Ot-=Fo,Ht-=Po,P(Fo)<c&&P(Po)<c)break}return[nt<0?-Ht:Ht,ut<0?-Ot:Ot]};function hf(){return w.geoProjection(dc).scale(97.2672)}function au(nt,ut){var wt=nt*nt,kt=ut*ut;return[nt*(.975534+kt*(-.119161+wt*-.0143059+kt*-.0547009)),ut*(1.00384+wt*(.0802894+kt*-.02855+wt*199025e-9)+kt*(.0998909+kt*-.0491032))]}au.invert=function(nt,ut){var wt=y(nt)*T,kt=ut/2,Ht=50;do{var Ot=wt*wt,Kt=kt*kt,Cr=wt*kt,Or=wt*(.975534+Kt*(-.119161+Ot*-.0143059+Kt*-.0547009))-nt,Vr=kt*(1.00384+Ot*(.0802894+Kt*-.02855+Ot*199025e-9)+Kt*(.0998909+Kt*-.0491032))-ut,sn=.975534-Kt*(.119161+3*Ot*.0143059+Kt*.0547009),bn=-Cr*(2*.119161+4*.0547009*Kt+2*.0143059*Ot),Un=Cr*(2*.0802894+4*199025e-9*Ot+2*-.02855*Kt),Gn=1.00384+Ot*(.0802894+199025e-9*Ot)+Kt*(3*(.0998909-.02855*Ot)-5*.0491032*Kt),ua=bn*Un-Gn*sn,Ha=(Vr*bn-Or*Gn)/ua,Ti=(Or*Un-Vr*sn)/ua;wt-=Ha,kt-=Ti}while((P(Ha)>c||P(Ti)>c)&&--Ht>0);return Ht&&[wt,kt]};function nc(){return w.geoProjection(au).scale(139.98)}function Js(nt,ut){return[m(nt)/a(ut),E(ut)*a(nt)]}Js.invert=function(nt,ut){var wt=nt*nt,kt=ut*ut,Ht=kt+1,Ot=wt+Ht,Kt=nt?b*U((Ot-U(Ot*Ot-4*wt))/wt):1/U(Ht);return[D(nt*Kt),y(ut)*B(Kt)]};function Ul(){return w.geoProjection(Js).scale(144.049).clipAngle(90-.001)}function Df(nt){var ut=a(nt),wt=E(k+nt/2);function kt(Ht,Ot){var Kt=Ot-nt,Cr=P(Kt)<c?Ht*ut:P(Cr=k+Ot/2)<c||P(P(Cr)-M)<c?0:Ht*Kt/s(E(Cr)/wt);return[Cr,Kt]}return kt.invert=function(Ht,Ot){var Kt,Cr=Ot+nt;return[P(Ot)<c?Ht/ut:P(Kt=k+Cr/2)<c||P(P(Kt)-M)<c?0:Ht*s(E(Kt)/wt)/Ot,Cr]},kt}function Cc(){return bt(Df).parallel(40).scale(158.837)}function Wf(nt,ut){return[nt,1.25*s(E(k+.4*ut))]}Wf.invert=function(nt,ut){return[nt,2.5*t(l(.8*ut))-.625*T]};function mu(){return w.geoProjection(Wf).scale(108.318)}function Vd(nt){var ut=nt.length-1;function wt(kt,Ht){for(var Ot=a(Ht),Kt=2/(1+Ot*a(kt)),Cr=Kt*Ot*m(kt),Or=Kt*m(Ht),Vr=ut,sn=nt[Vr],bn=sn[0],Un=sn[1],Gn;--Vr>=0;)sn=nt[Vr],bn=sn[0]+Cr*(Gn=bn)-Or*Un,Un=sn[1]+Cr*Un+Or*Gn;return bn=Cr*(Gn=bn)-Or*Un,Un=Cr*Un+Or*Gn,[bn,Un]}return wt.invert=function(kt,Ht){var Ot=20,Kt=kt,Cr=Ht;do{for(var Or=ut,Vr=nt[Or],sn=Vr[0],bn=Vr[1],Un=0,Gn=0,ua;--Or>=0;)Vr=nt[Or],Un=sn+Kt*(ua=Un)-Cr*Gn,Gn=bn+Kt*Gn+Cr*ua,sn=Vr[0]+Kt*(ua=sn)-Cr*bn,bn=Vr[1]+Kt*bn+Cr*ua;Un=sn+Kt*(ua=Un)-Cr*Gn,Gn=bn+Kt*Gn+Cr*ua,sn=Kt*(ua=sn)-Cr*bn-kt,bn=Kt*bn+Cr*ua-Ht;var Ha=Un*Un+Gn*Gn,Ti,mi;Kt-=Ti=(sn*Un+bn*Gn)/Ha,Cr-=mi=(bn*Un-sn*Gn)/Ha}while(P(Ti)+P(mi)>c*c&&--Ot>0);if(Ot){var Ai=U(Kt*Kt+Cr*Cr),po=2*t(Ai*.5),Fo=m(po);return[r(Kt*Fo,Ai*a(po)),Ai?D(Cr*Fo/Ai):0]}},wt}var Ws=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],cv=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Tl=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Zo=[[.9245,0],[0,0],[.01943,0]],dh=[[.721316,0],[0,0],[-.00881625,-.00617325]];function df(){return ac(Ws,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Hu(){return ac(cv,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Zh(){return ac(Tl,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Yf(){return ac(Zo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function wh(){return ac(dh,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ac(nt,ut){var wt=w.geoProjection(Vd(nt)).rotate(ut).clipAngle(90),kt=w.geoRotation(ut),Ht=wt.center;return delete wt.rotate,wt.center=function(Ot){return arguments.length?Ht(kt(Ot)):kt.invert(Ht())},wt}var Cd=U(6),ad=U(7);function Th(nt,ut){var wt=D(7*m(ut)/(3*Cd));return[Cd*nt*(2*a(2*wt/3)-1)/ad,9*m(wt/3)/ad]}Th.invert=function(nt,ut){var wt=3*D(ut*ad/9);return[nt*ad/(Cd*(2*a(2*wt/3)-1)),D(m(wt)*3*Cd/7)]};function Zf(){return w.geoProjection(Th).scale(164.859)}function $h(nt,ut){for(var wt=(1+b)*m(ut),kt=ut,Ht=0,Ot;Ht<25&&(kt-=Ot=(m(kt/2)+m(kt)-wt)/(.5*a(kt/2)+a(kt)),!(P(Ot)<c));Ht++);return[nt*(1+2*a(kt)/a(kt/2))/(3*A),2*U(3)*m(kt/2)/U(2+A)]}$h.invert=function(nt,ut){var wt=ut*U(2+A)/(2*U(3)),kt=2*D(wt);return[3*A*nt/(1+2*a(kt)/a(kt/2)),D((wt+m(kt))/(1+b))]};function Kh(){return w.geoProjection($h).scale(188.209)}function vf(nt,ut){for(var wt=U(6/(4+T)),kt=(1+T/4)*m(ut),Ht=ut/2,Ot=0,Kt;Ot<25&&(Ht-=Kt=(Ht/2+m(Ht)-kt)/(.5+a(Ht)),!(P(Kt)<c));Ot++);return[wt*(.5+a(Ht))*nt/1.5,wt*Ht]}vf.invert=function(nt,ut){var wt=U(6/(4+T)),kt=ut/wt;return P(P(kt)-M)<c&&(kt=kt<0?-M:M),[1.5*nt/(wt*(.5+a(kt))),D((kt/2+m(kt))/(1+T/4))]};function id(){return w.geoProjection(vf).scale(166.518)}function Of(nt,ut){var wt=ut*ut,kt=wt*wt,Ht=wt*kt;return[nt*(.84719-.13063*wt+Ht*Ht*(-.04515+.05494*wt-.02326*kt+.00331*Ht)),ut*(1.01183+kt*kt*(-.02625+.01926*wt-.00396*kt))]}Of.invert=function(nt,ut){var wt=ut,kt=25,Ht,Ot,Kt,Cr;do Ot=wt*wt,Kt=Ot*Ot,wt-=Ht=(wt*(1.01183+Kt*Kt*(-.02625+.01926*Ot-.00396*Kt))-ut)/(1.01183+Kt*Kt*(9*-.02625+11*.01926*Ot+13*-.00396*Kt));while(P(Ht)>_&&--kt>0);return Ot=wt*wt,Kt=Ot*Ot,Cr=Ot*Kt,[nt/(.84719-.13063*Ot+Cr*Cr*(-.04515+.05494*Ot-.02326*Kt+.00331*Cr)),wt]};function wf(){return w.geoProjection(Of).scale(175.295)}function ic(nt,ut){return[nt*(1+a(ut))/2,2*(ut-E(ut/2))]}ic.invert=function(nt,ut){for(var wt=ut/2,kt=0,Ht=1/0;kt<10&&P(Ht)>c;++kt){var Ot=a(ut/2);ut-=Ht=(ut-E(ut/2)-wt)/(1-.5/(Ot*Ot))}return[2*nt/(1+a(ut)),ut]};function ih(){return w.geoProjection(ic).scale(152.63)}var Jh=[[[[-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 Xl(){return Wo(_e(1/0),Jh).rotate([20,0]).scale(152.63)}function Oh(nt,ut){var wt=m(ut),kt=a(ut),Ht=y(nt);if(nt===0||P(ut)===M)return[0,ut];if(ut===0)return[nt,0];if(P(nt)===M)return[nt*kt,M*wt];var Ot=T/(2*nt)-2*nt/T,Kt=2*ut/T,Cr=(1-Kt*Kt)/(wt-Kt),Or=Ot*Ot,Vr=Cr*Cr,sn=1+Or/Vr,bn=1+Vr/Or,Un=(Ot*wt/Cr-Ot/2)/sn,Gn=(Vr*wt/Or+Cr/2)/bn,ua=Un*Un+kt*kt/sn,Ha=Gn*Gn-(Vr*wt*wt/Or+Cr*wt-1)/bn;return[M*(Un+U(ua)*Ht),M*(Gn+U(Ha<0?0:Ha)*y(-ut*Ot)*Ht)]}Oh.invert=function(nt,ut){nt/=M,ut/=M;var wt=nt*nt,kt=ut*ut,Ht=wt+kt,Ot=T*T;return[nt?(Ht-1+U((1-Ht)*(1-Ht)+4*wt))/(2*nt)*M:0,Ge(function(Kt){return Ht*(T*m(Kt)-2*Kt)*T+4*Kt*Kt*(ut-m(Kt))+2*T*Kt-Ot*ut},0)]};function Hd(){return w.geoProjection(Oh).scale(127.267)}var od=1.0148,Ah=.23185,sd=-.14499,Uc=.02406,ld=od,Su=5*Ah,qc=7*sd,$f=9*Uc,iu=1.790857183;function zf(nt,ut){var wt=ut*ut;return[nt,ut*(od+wt*wt*(Ah+wt*(sd+Uc*wt)))]}zf.invert=function(nt,ut){ut>iu?ut=iu:ut<-iu&&(ut=-iu);var wt=ut,kt;do{var Ht=wt*wt;wt-=kt=(wt*(od+Ht*Ht*(Ah+Ht*(sd+Uc*Ht)))-ut)/(ld+Ht*Ht*(Su+Ht*(qc+$f*Ht)))}while(P(kt)>c);return[nt,wt]};function wc(){return w.geoProjection(zf).scale(139.319)}function Vc(nt,ut){if(P(ut)<c)return[nt,0];var wt=E(ut),kt=nt*m(ut);return[m(kt)/wt,ut+(1-a(kt))/wt]}Vc.invert=function(nt,ut){if(P(ut)<c)return[nt,0];var wt=nt*nt+ut*ut,kt=ut*.5,Ht=10,Ot;do{var Kt=E(kt),Cr=1/a(kt),Or=wt-2*ut*kt+kt*kt;kt-=Ot=(Kt*Or+2*(kt-ut))/(2+Or*Cr*Cr+2*(kt-ut)*Kt)}while(P(Ot)>c&&--Ht>0);return Kt=E(kt),[(P(ut)<P(kt+1/Kt)?D(nt*Kt):y(ut)*y(nt)*(B(P(nt*Kt))+M))/m(kt),kt]};function yu(){return w.geoProjection(Vc).scale(103.74)}function vh(nt,ut){var wt=zh(nt[1],nt[0]),kt=zh(ut[1],ut[0]),Ht=Tv(wt,kt),Ot=Gd(wt)/Gd(kt);return Kf([1,0,nt[0][0],0,1,nt[0][1]],Kf([Ot,0,0,0,Ot,0],Kf([a(Ht),m(Ht),0,-m(Ht),a(Ht),0],[1,0,-ut[0][0],0,1,-ut[0][1]])))}function Tf(nt){var ut=1/(nt[0]*nt[4]-nt[1]*nt[3]);return[ut*nt[4],-ut*nt[1],ut*(nt[1]*nt[5]-nt[2]*nt[4]),-ut*nt[3],ut*nt[0],ut*(nt[2]*nt[3]-nt[0]*nt[5])]}function Kf(nt,ut){return[nt[0]*ut[0]+nt[1]*ut[3],nt[0]*ut[1]+nt[1]*ut[4],nt[0]*ut[2]+nt[1]*ut[5]+nt[2],nt[3]*ut[0]+nt[4]*ut[3],nt[3]*ut[1]+nt[4]*ut[4],nt[3]*ut[2]+nt[4]*ut[5]+nt[5]]}function zh(nt,ut){return[nt[0]-ut[0],nt[1]-ut[1]]}function Gd(nt){return U(nt[0]*nt[0]+nt[1]*nt[1])}function Tv(nt,ut){return r(nt[0]*ut[1]-nt[1]*ut[0],nt[0]*ut[0]+nt[1]*ut[1])}function ph(nt,ut,wt){kt(nt,{transform:null});function kt(Vr,sn){if(Vr.edges=vc(Vr.face),sn.face){var bn=Vr.shared=Fh(Vr.face,sn.face),Un=vh(bn.map(sn.project),bn.map(Vr.project));Vr.transform=sn.transform?Kf(sn.transform,Un):Un;for(var Gn=sn.edges,ua=0,Ha=Gn.length;ua<Ha;++ua)ef(bn[0],Gn[ua][1])&&ef(bn[1],Gn[ua][0])&&(Gn[ua]=Vr),ef(bn[0],Gn[ua][0])&&ef(bn[1],Gn[ua][1])&&(Gn[ua]=Vr);for(Gn=Vr.edges,ua=0,Ha=Gn.length;ua<Ha;++ua)ef(bn[0],Gn[ua][0])&&ef(bn[1],Gn[ua][1])&&(Gn[ua]=sn),ef(bn[0],Gn[ua][1])&&ef(bn[1],Gn[ua][0])&&(Gn[ua]=sn)}else Vr.transform=sn.transform;return Vr.children&&Vr.children.forEach(function(Ti){kt(Ti,Vr)}),Vr}function Ht(Vr,sn){var bn=ut(Vr,sn),Un=bn.project([Vr*p,sn*p]),Gn;return(Gn=bn.transform)?[Gn[0]*Un[0]+Gn[1]*Un[1]+Gn[2],-(Gn[3]*Un[0]+Gn[4]*Un[1]+Gn[5])]:(Un[1]=-Un[1],Un)}mh(nt)&&(Ht.invert=function(Vr,sn){var bn=Ot(nt,[Vr,-sn]);return bn&&(bn[0]*=x,bn[1]*=x,bn)});function Ot(Vr,sn){var bn=Vr.project.invert,Un=Vr.transform,Gn=sn;if(Un&&(Un=Tf(Un),Gn=[Un[0]*Gn[0]+Un[1]*Gn[1]+Un[2],Un[3]*Gn[0]+Un[4]*Gn[1]+Un[5]]),bn&&Vr===Kt(ua=bn(Gn)))return ua;for(var ua,Ha=Vr.children,Ti=0,mi=Ha&&Ha.length;Ti<mi;++Ti)if(ua=Ot(Ha[Ti],sn))return ua}function Kt(Vr){return ut(Vr[0]*x,Vr[1]*x)}var Cr=w.geoProjection(Ht),Or=Cr.stream;return Cr.stream=function(Vr){var sn=Cr.rotate(),bn=Or(Vr),Un=(Cr.rotate([0,0]),Or(Vr));return Cr.rotate(sn),bn.sphere=function(){Un.polygonStart(),Un.lineStart(),Nh(Un,nt),Un.lineEnd(),Un.polygonEnd()},bn},Cr.angle(wt==null?-30:wt*p)}function Nh(nt,ut,wt){var kt,Ht=ut.edges,Ot=Ht.length,Kt,Cr={type:"MultiPoint",coordinates:ut.face},Or=ut.face.filter(function(Ha){return P(Ha[1])!==90}),Vr=w.geoBounds({type:"MultiPoint",coordinates:Or}),sn=!1,bn=-1,Un=Vr[1][0]-Vr[0][0],Gn=Un===180||Un===360?[(Vr[0][0]+Vr[1][0])/2,(Vr[0][1]+Vr[1][1])/2]:w.geoCentroid(Cr);if(wt)for(;++bn<Ot&&Ht[bn]!==wt;);++bn;for(var ua=0;ua<Ot;++ua)Kt=Ht[(ua+bn)%Ot],Array.isArray(Kt)?(sn||(nt.point((kt=w.geoInterpolate(Kt[0],Gn)(c))[0],kt[1]),sn=!0),nt.point((kt=w.geoInterpolate(Kt[1],Gn)(c))[0],kt[1])):(sn=!1,Kt!==wt&&Nh(nt,Kt,ut))}function ef(nt,ut){return nt&&ut&&nt[0]===ut[0]&&nt[1]===ut[1]}function Fh(nt,ut){for(var wt,kt,Ht=nt.length,Ot=null,Kt=0;Kt<Ht;++Kt){wt=nt[Kt];for(var Cr=ut.length;--Cr>=0;)if(kt=ut[Cr],wt[0]===kt[0]&&wt[1]===kt[1]){if(Ot)return[Ot,wt];Ot=wt}}}function vc(nt){for(var ut=nt.length,wt=[],kt=nt[ut-1],Ht=0;Ht<ut;++Ht)wt.push([kt,kt=nt[Ht]]);return wt}function mh(nt){return nt.project.invert||nt.children&&nt.children.some(mh)}var ud=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],yh=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(nt){return nt.map(function(ut){return ud[ut]})});function uu(nt){nt=nt||function(wt){var kt=w.geoCentroid({type:"MultiPoint",coordinates:wt});return w.geoGnomonic().scale(1).translate([0,0]).rotate([-kt[0],-kt[1]])};var ut=yh.map(function(wt){return{face:wt,project:nt(wt)}});return[-1,0,0,1,0,1,4,5].forEach(function(wt,kt){var Ht=ut[wt];Ht&&(Ht.children||(Ht.children=[])).push(ut[kt])}),ph(ut[0],function(wt,kt){return ut[wt<-T/2?kt<0?6:4:wt<0?kt<0?2:0:wt<T/2?kt<0?3:1:kt<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Hc=2/U(3);function pf(nt,ut){var wt=Ae(nt,ut);return[wt[0]*Hc,wt[1]]}pf.invert=function(nt,ut){return Ae.invert(nt/Hc,ut)};function Qh(nt){nt=nt||function(wt){var kt=w.geoCentroid({type:"MultiPoint",coordinates:wt});return w.geoProjection(pf).translate([0,0]).scale(1).rotate(kt[1]>0?[-kt[0],0]:[180-kt[0],180])};var ut=yh.map(function(wt){return{face:wt,project:nt(wt)}});return[-1,0,0,1,0,1,4,5].forEach(function(wt,kt){var Ht=ut[wt];Ht&&(Ht.children||(Ht.children=[])).push(ut[kt])}),ph(ut[0],function(wt,kt){return ut[wt<-T/2?kt<0?6:4:wt<0?kt<0?2:0:wt<T/2?kt<0?3:1:kt<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function du(nt){nt=nt||function(Kt){var Cr=Kt.length===6?w.geoCentroid({type:"MultiPoint",coordinates:Kt}):Kt[0];return w.geoGnomonic().scale(1).translate([0,0]).rotate([-Cr[0],-Cr[1]])};var ut=yh.map(function(Kt){for(var Cr=Kt.map(Eh),Or=Cr.length,Vr=Cr[Or-1],sn,bn=[],Un=0;Un<Or;++Un)sn=Cr[Un],bn.push(tf([Vr[0]*.9486832980505138+sn[0]*.31622776601683794,Vr[1]*.9486832980505138+sn[1]*.31622776601683794,Vr[2]*.9486832980505138+sn[2]*.31622776601683794]),tf([sn[0]*.9486832980505138+Vr[0]*.31622776601683794,sn[1]*.9486832980505138+Vr[1]*.31622776601683794,sn[2]*.9486832980505138+Vr[2]*.31622776601683794])),Vr=sn;return bn}),wt=[],kt=[-1,0,0,1,0,1,4,5];ut.forEach(function(Kt,Cr){for(var Or=yh[Cr],Vr=Or.length,sn=wt[Cr]=[],bn=0;bn<Vr;++bn)ut.push([Or[bn],Kt[(bn*2+2)%(2*Vr)],Kt[(bn*2+1)%(2*Vr)]]),kt.push(Cr),sn.push(Jf(Eh(Kt[(bn*2+2)%(2*Vr)]),Eh(Kt[(bn*2+1)%(2*Vr)])))});var Ht=ut.map(function(Kt){return{project:nt(Kt),face:Kt}});kt.forEach(function(Kt,Cr){var Or=Ht[Kt];Or&&(Or.children||(Or.children=[])).push(Ht[Cr])});function Ot(Kt,Cr){var Or=a(Cr),Vr=[Or*a(Kt),Or*m(Kt),m(Cr)],sn=Kt<-T/2?Cr<0?6:4:Kt<0?Cr<0?2:0:Kt<T/2?Cr<0?3:1:Cr<0?7:5,bn=wt[sn];return Ht[Sh(bn[0],Vr)<0?8+3*sn:Sh(bn[1],Vr)<0?8+3*sn+1:Sh(bn[2],Vr)<0?8+3*sn+2:sn]}return ph(Ht[0],Ot).angle(-30).scale(110.625).center([0,45])}function Sh(nt,ut){for(var wt=0,kt=nt.length,Ht=0;wt<kt;++wt)Ht+=nt[wt]*ut[wt];return Ht}function Jf(nt,ut){return[nt[1]*ut[2]-nt[2]*ut[1],nt[2]*ut[0]-nt[0]*ut[2],nt[0]*ut[1]-nt[1]*ut[0]]}function tf(nt){return[r(nt[1],nt[0])*p,D(o(-1,u(1,nt[2])))*p]}function Eh(nt){var ut=nt[0]*x,wt=nt[1]*x,kt=a(wt);return[kt*a(ut),kt*m(ut),m(wt)]}function Af(){}function Mh(nt){if((wt=nt.length)<4)return!1;for(var ut=0,wt,kt=nt[wt-1][1]*nt[0][0]-nt[wt-1][0]*nt[0][1];++ut<wt;)kt+=nt[ut-1][1]*nt[ut][0]-nt[ut-1][0]*nt[ut][1];return kt<=0}function Xd(nt,ut){for(var wt=ut[0],kt=ut[1],Ht=!1,Ot=0,Kt=nt.length,Cr=Kt-1;Ot<Kt;Cr=Ot++){var Or=nt[Ot],Vr=Or[0],sn=Or[1],bn=nt[Cr],Un=bn[0],Gn=bn[1];sn>kt^Gn>kt&&wt<(Un-Vr)*(kt-sn)/(Gn-sn)+Vr&&(Ht=!Ht)}return Ht}function yc(nt,ut){var wt=ut.stream,kt;if(!wt)throw new Error("invalid projection");switch(nt&&nt.type){case"Feature":kt=rf;break;case"FeatureCollection":kt=cd;break;default:kt=Sf;break}return kt(nt,wt)}function cd(nt,ut){return{type:"FeatureCollection",features:nt.features.map(function(wt){return rf(wt,ut)})}}function rf(nt,ut){return{type:"Feature",id:nt.id,properties:nt.properties,geometry:Sf(nt.geometry,ut)}}function Nf(nt,ut){return{type:"GeometryCollection",geometries:nt.geometries.map(function(wt){return Sf(wt,ut)})}}function Sf(nt,ut){if(!nt)return null;if(nt.type==="GeometryCollection")return Nf(nt,ut);var wt;switch(nt.type){case"Point":wt=xu;break;case"MultiPoint":wt=xu;break;case"LineString":wt=Qf;break;case"MultiLineString":wt=Qf;break;case"Polygon":wt=Ef;break;case"MultiPolygon":wt=Ef;break;case"Sphere":wt=Ef;break;default:return null}return w.geoStream(nt,ut(wt)),wt.result()}var ku=[],kc=[],xu={point:function(nt,ut){ku.push([nt,ut])},result:function(){var nt=ku.length?ku.length<2?{type:"Point",coordinates:ku[0]}:{type:"MultiPoint",coordinates:ku}:null;return ku=[],nt}},Qf={lineStart:Af,point:function(nt,ut){ku.push([nt,ut])},lineEnd:function(){ku.length&&(kc.push(ku),ku=[])},result:function(){var nt=kc.length?kc.length<2?{type:"LineString",coordinates:kc[0]}:{type:"MultiLineString",coordinates:kc}:null;return kc=[],nt}},Ef={polygonStart:Af,lineStart:Af,point:function(nt,ut){ku.push([nt,ut])},lineEnd:function(){var nt=ku.length;if(nt){do ku.push(ku[0].slice());while(++nt<4);kc.push(ku),ku=[]}},polygonEnd:Af,result:function(){if(!kc.length)return null;var nt=[],ut=[];return kc.forEach(function(wt){Mh(wt)?nt.push([wt]):ut.push(wt)}),ut.forEach(function(wt){var kt=wt[0];nt.some(function(Ht){if(Xd(Ht[0],kt))return Ht.push(wt),!0})||nt.push([wt])}),kc=[],nt.length?nt.length>1?{type:"MultiPolygon",coordinates:nt}:{type:"Polygon",coordinates:nt[0]}:null}};function ed(nt){var ut=nt(M,0)[0]-nt(-M,0)[0];function wt(kt,Ht){var Ot=P(kt)<M,Kt=nt(Ot?kt:kt>0?kt-T:kt+T,Ht),Cr=(Kt[0]-Kt[1])*b,Or=(Kt[0]+Kt[1])*b;if(Ot)return[Cr,Or];var Vr=ut*b,sn=Cr>0^Or>0?-1:1;return[sn*Cr-y(Or)*Vr,sn*Or-y(Cr)*Vr]}return nt.invert&&(wt.invert=function(kt,Ht){var Ot=(kt+Ht)*b,Kt=(Ht-kt)*b,Cr=P(Ot)<.5*ut&&P(Kt)<.5*ut;if(!Cr){var Or=ut*b,Vr=Ot>0^Kt>0?-1:1,sn=-Vr*kt+(Kt>0?1:-1)*Or,bn=-Vr*Ht+(Ot>0?1:-1)*Or;Ot=(-sn-bn)*b,Kt=(sn-bn)*b}var Un=nt.invert(Ot,Kt);return Cr||(Un[0]+=Ot>0?T:-T),Un}),w.geoProjection(wt).rotate([-90,-90,45]).clipAngle(180-.001)}function wr(){return ed(Sn).scale(176.423)}function Hr(){return ed(Uo).scale(111.48)}function kn(nt,ut){if(!(0<=(ut=+ut)&&ut<=20))throw new Error("invalid digits");function wt(Vr){var sn=Vr.length,bn=2,Un=new Array(sn);for(Un[0]=+Vr[0].toFixed(ut),Un[1]=+Vr[1].toFixed(ut);bn<sn;)Un[bn]=Vr[bn],++bn;return Un}function kt(Vr){return Vr.map(wt)}function Ht(Vr){for(var sn=wt(Vr[0]),bn=[sn],Un=1;Un<Vr.length;Un++){var Gn=wt(Vr[Un]);(Gn.length>2||Gn[0]!=sn[0]||Gn[1]!=sn[1])&&(bn.push(Gn),sn=Gn)}return bn.length===1&&Vr.length>1&&bn.push(wt(Vr[Vr.length-1])),bn}function Ot(Vr){return Vr.map(Ht)}function Kt(Vr){if(Vr==null)return Vr;var sn;switch(Vr.type){case"GeometryCollection":sn={type:"GeometryCollection",geometries:Vr.geometries.map(Kt)};break;case"Point":sn={type:"Point",coordinates:wt(Vr.coordinates)};break;case"MultiPoint":sn={type:Vr.type,coordinates:kt(Vr.coordinates)};break;case"LineString":sn={type:Vr.type,coordinates:Ht(Vr.coordinates)};break;case"MultiLineString":case"Polygon":sn={type:Vr.type,coordinates:Ot(Vr.coordinates)};break;case"MultiPolygon":sn={type:"MultiPolygon",coordinates:Vr.coordinates.map(Ot)};break;default:return Vr}return Vr.bbox!=null&&(sn.bbox=Vr.bbox),sn}function Cr(Vr){var sn={type:"Feature",properties:Vr.properties,geometry:Kt(Vr.geometry)};return Vr.id!=null&&(sn.id=Vr.id),Vr.bbox!=null&&(sn.bbox=Vr.bbox),sn}if(nt!=null)switch(nt.type){case"Feature":return Cr(nt);case"FeatureCollection":{var Or={type:"FeatureCollection",features:nt.features.map(Cr)};return nt.bbox!=null&&(Or.bbox=nt.bbox),Or}default:return Kt(nt)}return nt}function _n(nt){var ut=m(nt);function wt(kt,Ht){var Ot=ut?E(kt*ut/2)/ut:kt/2;if(!Ht)return[2*Ot,-nt];var Kt=2*t(Ot*m(Ht)),Cr=1/E(Ht);return[m(Kt)*Cr,Ht+(1-a(Kt))*Cr-nt]}return wt.invert=function(kt,Ht){if(P(Ht+=nt)<c)return[ut?2*t(ut*kt/2)/ut:kt,0];var Ot=kt*kt+Ht*Ht,Kt=0,Cr=10,Or;do{var Vr=E(Kt),sn=1/a(Kt),bn=Ot-2*Ht*Kt+Kt*Kt;Kt-=Or=(Vr*bn+2*(Kt-Ht))/(2+bn*sn*sn+2*(Kt-Ht)*Vr)}while(P(Or)>c&&--Cr>0);var Un=kt*(Vr=E(Kt)),Gn=E(P(Ht)<P(Kt+1/Vr)?D(Un)*.5:B(Un)*.5+T/4)/m(Kt);return[ut?2*t(ut*Gn)/ut:2*Gn,Kt]},wt}function $n(){return bt(_n).scale(131.215)}var Ga=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];Ga.forEach(function(nt){nt[1]*=1.0144});function Ba(nt,ut){var wt=u(18,P(ut)*36/T),kt=i(wt),Ht=wt-kt,Ot=(bn=Ga[kt])[0],Kt=bn[1],Cr=(bn=Ga[++kt])[0],Or=bn[1],Vr=(bn=Ga[u(19,++kt)])[0],sn=bn[1],bn;return[nt*(Cr+Ht*(Vr-Ot)/2+Ht*Ht*(Vr-2*Cr+Ot)/2),(ut>0?M:-M)*(Or+Ht*(sn-Kt)/2+Ht*Ht*(sn-2*Or+Kt)/2)]}Ba.invert=function(nt,ut){var wt=ut/M,kt=wt*90,Ht=u(18,P(kt/5)),Ot=o(0,i(Ht));do{var Kt=Ga[Ot][1],Cr=Ga[Ot+1][1],Or=Ga[u(19,Ot+2)][1],Vr=Or-Kt,sn=Or-2*Cr+Kt,bn=2*(P(wt)-Cr)/Vr,Un=sn/Vr,Gn=bn*(1-Un*bn*(1-2*Un*bn));if(Gn>=0||Ot===1){kt=(ut>=0?5:-5)*(Gn+Ht);var ua=50,Ha;do Ht=u(18,P(kt)/5),Ot=i(Ht),Gn=Ht-Ot,Kt=Ga[Ot][1],Cr=Ga[Ot+1][1],Or=Ga[u(19,Ot+2)][1],kt-=(Ha=(ut>=0?M:-M)*(Cr+Gn*(Or-Kt)/2+Gn*Gn*(Or-2*Cr+Kt)/2)-ut)*p;while(P(Ha)>_&&--ua>0);break}}while(--Ot>=0);var Ti=Ga[Ot][0],mi=Ga[Ot+1][0],Ai=Ga[u(19,Ot+2)][0];return[nt/(mi+Gn*(Ai-Ti)/2+Gn*Gn*(Ai-2*mi+Ti)/2),kt*x]};function wi(){return w.geoProjection(Ba).scale(152.63)}function ki(nt){function ut(wt,kt){var Ht=a(kt),Ot=(nt-1)/(nt-Ht*a(wt));return[Ot*Ht*m(wt),Ot*m(kt)]}return ut.invert=function(wt,kt){var Ht=wt*wt+kt*kt,Ot=U(Ht),Kt=(nt-U(1-Ht*(nt+1)/(nt-1)))/((nt-1)/Ot+Ot/(nt-1));return[r(wt*Kt,Ot*U(1-Kt*Kt)),Ot?D(kt*Kt/Ot):0]},ut}function to(nt,ut){var wt=ki(nt);if(!ut)return wt;var kt=a(ut),Ht=m(ut);function Ot(Kt,Cr){var Or=wt(Kt,Cr),Vr=Or[1],sn=Vr*Ht/(nt-1)+kt;return[Or[0]*kt/sn,Vr/sn]}return Ot.invert=function(Kt,Cr){var Or=(nt-1)/(nt-1-Cr*Ht);return wt.invert(Or*Kt,Or*Cr*kt)},Ot}function ci(){var nt=2,ut=0,wt=w.geoProjectionMutator(to),kt=wt(nt,ut);return kt.distance=function(Ht){return arguments.length?wt(nt=+Ht,ut):nt},kt.tilt=function(Ht){return arguments.length?wt(nt,ut=Ht*x):ut*p},kt.scale(432.147).clipAngle(B(1/nt)*p-1e-6)}var qi=1e-4,xi=1e4,oi=-180,fo=oi+qi,Qo=180,Yo=Qo-qi,is=-90,ts=is+qi,vo=90,Yi=vo-qi;function ys(nt){return nt.length>0}function Ys(nt){return Math.floor(nt*xi)/xi}function Rl(nt){return nt===is||nt===vo?[0,nt]:[oi,Ys(nt)]}function Ql(nt){var ut=nt[0],wt=nt[1],kt=!1;return ut<=fo?(ut=oi,kt=!0):ut>=Yo&&(ut=Qo,kt=!0),wt<=ts?(wt=is,kt=!0):wt>=Yi&&(wt=vo,kt=!0),kt?[ut,wt]:nt}function Dl(nt){return nt.map(Ql)}function eu(nt,ut,wt){for(var kt=0,Ht=nt.length;kt<Ht;++kt){var Ot=nt[kt].slice();wt.push({index:-1,polygon:ut,ring:Ot});for(var Kt=0,Cr=Ot.length;Kt<Cr;++Kt){var Or=Ot[Kt],Vr=Or[0],sn=Or[1];if(Vr<=fo||Vr>=Yo||sn<=ts||sn>=Yi){Ot[Kt]=Ql(Or);for(var bn=Kt+1;bn<Cr;++bn){var Un=Ot[bn],Gn=Un[0],ua=Un[1];if(Gn>fo&&Gn<Yo&&ua>ts&&ua<Yi)break}if(bn===Kt+1)continue;if(Kt){var Ha={index:-1,polygon:ut,ring:Ot.slice(0,Kt+1)};Ha.ring[Ha.ring.length-1]=Rl(sn),wt[wt.length-1]=Ha}else wt.pop();if(bn>=Cr)break;wt.push({index:-1,polygon:ut,ring:Ot=Ot.slice(bn-1)}),Ot[0]=Rl(Ot[0][1]),Kt=-1,Cr=Ot.length}}}}function cl(nt){var ut,wt=nt.length,kt={},Ht={},Ot,Kt,Cr,Or,Vr;for(ut=0;ut<wt;++ut){if(Ot=nt[ut],Kt=Ot.ring[0],Or=Ot.ring[Ot.ring.length-1],Kt[0]===Or[0]&&Kt[1]===Or[1]){Ot.polygon.push(Ot.ring),nt[ut]=null;continue}Ot.index=ut,kt[Kt]=Ht[Or]=Ot}for(ut=0;ut<wt;++ut)if(Ot=nt[ut],Ot){if(Kt=Ot.ring[0],Or=Ot.ring[Ot.ring.length-1],Cr=Ht[Kt],Vr=kt[Or],delete kt[Kt],delete Ht[Or],Kt[0]===Or[0]&&Kt[1]===Or[1]){Ot.polygon.push(Ot.ring);continue}Cr?(delete Ht[Kt],delete kt[Cr.ring[0]],Cr.ring.pop(),nt[Cr.index]=null,Ot={index:-1,polygon:Cr.polygon,ring:Cr.ring.concat(Ot.ring)},Cr===Vr?Ot.polygon.push(Ot.ring):(Ot.index=wt++,nt.push(kt[Ot.ring[0]]=Ht[Ot.ring[Ot.ring.length-1]]=Ot))):Vr?(delete kt[Or],delete Ht[Vr.ring[Vr.ring.length-1]],Ot.ring.pop(),Ot={index:wt++,polygon:Vr.polygon,ring:Ot.ring.concat(Vr.ring)},nt[Vr.index]=null,nt.push(kt[Ot.ring[0]]=Ht[Ot.ring[Ot.ring.length-1]]=Ot)):(Ot.ring.push(Ot.ring[0]),Ot.polygon.push(Ot.ring))}}function Du(nt){var ut={type:"Feature",geometry:Pu(nt.geometry)};return nt.id!=null&&(ut.id=nt.id),nt.bbox!=null&&(ut.bbox=nt.bbox),nt.properties!=null&&(ut.properties=nt.properties),ut}function Pu(nt){if(nt==null)return nt;var ut,wt,kt,Ht;switch(nt.type){case"GeometryCollection":ut={type:"GeometryCollection",geometries:nt.geometries.map(Pu)};break;case"Point":ut={type:"Point",coordinates:Ql(nt.coordinates)};break;case"MultiPoint":case"LineString":ut={type:nt.type,coordinates:Dl(nt.coordinates)};break;case"MultiLineString":ut={type:"MultiLineString",coordinates:nt.coordinates.map(Dl)};break;case"Polygon":{var Ot=[];eu(nt.coordinates,Ot,wt=[]),cl(wt),ut={type:"Polygon",coordinates:Ot};break}case"MultiPolygon":{wt=[],kt=-1,Ht=nt.coordinates.length;for(var Kt=new Array(Ht);++kt<Ht;)eu(nt.coordinates[kt],Kt[kt]=[],wt);cl(wt),ut={type:"MultiPolygon",coordinates:Kt.filter(ys)};break}default:return nt}return nt.bbox!=null&&(ut.bbox=nt.bbox),ut}function Zl(nt){if(nt==null)return nt;switch(nt.type){case"Feature":return Du(nt);case"FeatureCollection":{var ut={type:"FeatureCollection",features:nt.features.map(Du)};return nt.bbox!=null&&(ut.bbox=nt.bbox),ut}default:return Pu(nt)}}function Oo(nt,ut){var wt=E(ut/2),kt=m(k*wt);return[nt*(.74482-.34588*kt*kt),1.70711*wt]}Oo.invert=function(nt,ut){var wt=ut/1.70711,kt=m(k*wt);return[nt/(.74482-.34588*kt*kt),2*t(wt)]};function Ls(){return w.geoProjection(Oo).scale(146.153)}function ql(nt,ut,wt){var kt=w.geoInterpolate(ut,wt),Ht=kt(.5),Ot=w.geoRotation([-Ht[0],-Ht[1]])(ut),Kt=kt.distance/2,Cr=-D(m(Ot[1]*x)/m(Kt)),Or=[-Ht[0],-Ht[1],-(Ot[0]>0?T-Cr:Cr)*p],Vr=w.geoProjection(nt(Kt)).rotate(Or),sn=w.geoRotation(Or),bn=Vr.center;return delete Vr.rotate,Vr.center=function(Un){return arguments.length?bn(sn(Un)):sn.invert(bn())},Vr.clipAngle(90)}function Al(nt){var ut=a(nt);function wt(kt,Ht){var Ot=w.geoGnomonicRaw(kt,Ht);return Ot[0]*=ut,Ot}return wt.invert=function(kt,Ht){return w.geoGnomonicRaw.invert(kt/ut,Ht)},wt}function Tc(){return Ac([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Ac(nt,ut){return ql(Al,nt,ut)}function Pc(nt){if(!(nt*=2))return w.geoAzimuthalEquidistantRaw;var ut=-nt/2,wt=-ut,kt=nt*nt,Ht=E(wt),Ot=.5/m(wt);function Kt(Cr,Or){var Vr=B(a(Or)*a(Cr-ut)),sn=B(a(Or)*a(Cr-wt)),bn=Or<0?-1:1;return Vr*=Vr,sn*=sn,[(Vr-sn)/(2*nt),bn*U(4*kt*sn-(kt-Vr+sn)*(kt-Vr+sn))/(2*nt)]}return Kt.invert=function(Cr,Or){var Vr=Or*Or,sn=a(U(Vr+(Un=Cr+ut)*Un)),bn=a(U(Vr+(Un=Cr+wt)*Un)),Un,Gn;return[r(Gn=sn-bn,Un=(sn+bn)*Ht),(Or<0?-1:1)*B(U(Un*Un+Gn*Gn)*Ot)]},Kt}function oh(){return Sc([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Sc(nt,ut){return ql(Pc,nt,ut)}function Ff(nt,ut){if(P(ut)<c)return[nt,0];var wt=P(ut/M),kt=D(wt);if(P(nt)<c||P(P(ut)-M)<c)return[0,y(ut)*T*E(kt/2)];var Ht=a(kt),Ot=P(T/nt-nt/T)/2,Kt=Ot*Ot,Cr=Ht/(wt+Ht-1),Or=Cr*(2/wt-1),Vr=Or*Or,sn=Vr+Kt,bn=Cr-Vr,Un=Kt+Cr;return[y(nt)*T*(Ot*bn+U(Kt*bn*bn-sn*(Cr*Cr-Vr)))/sn,y(ut)*T*(Or*Un-Ot*U((Kt+1)*sn-Un*Un))/sn]}Ff.invert=function(nt,ut){if(P(ut)<c)return[nt,0];if(P(nt)<c)return[0,M*m(2*t(ut/T))];var wt=(nt/=T)*nt,kt=(ut/=T)*ut,Ht=wt+kt,Ot=Ht*Ht,Kt=-P(ut)*(1+Ht),Cr=Kt-2*kt+wt,Or=-2*Kt+1+2*kt+Ot,Vr=kt/Or+(2*Cr*Cr*Cr/(Or*Or*Or)-9*Kt*Cr/(Or*Or))/27,sn=(Kt-Cr*Cr/(3*Or))/Or,bn=2*U(-sn/3),Un=B(3*Vr/(sn*bn))/3;return[T*(Ht-1+U(1+2*(wt-kt)+Ot))/(2*nt),y(ut)*T*(-bn*a(Un+T/3)-Cr/(3*Or))]};function Ou(){return w.geoProjection(Ff).scale(79.4183)}function Bf(nt,ut){if(P(ut)<c)return[nt,0];var wt=P(ut/M),kt=D(wt);if(P(nt)<c||P(P(ut)-M)<c)return[0,y(ut)*T*E(kt/2)];var Ht=a(kt),Ot=P(T/nt-nt/T)/2,Kt=Ot*Ot,Cr=Ht*(U(1+Kt)-Ot*Ht)/(1+Kt*wt*wt);return[y(nt)*T*Cr,y(ut)*T*U(1-Cr*(2*Ot+Cr))]}Bf.invert=function(nt,ut){if(!nt)return[0,M*m(2*t(ut/T))];var wt=P(nt/T),kt=(1-wt*wt-(ut/=T)*ut)/(2*wt),Ht=kt*kt,Ot=U(Ht+1);return[y(nt)*T*(Ot-kt),y(ut)*M*m(2*r(U((1-2*kt*wt)*(kt+Ot)-wt),U(Ot+kt+wt)))]};function os(){return w.geoProjection(Bf).scale(79.4183)}function _s(nt,ut){if(P(ut)<c)return[nt,0];var wt=ut/M,kt=D(wt);if(P(nt)<c||P(P(ut)-M)<c)return[0,T*E(kt/2)];var Ht=(T/nt-nt/T)/2,Ot=wt/(1+a(kt));return[T*(y(nt)*U(Ht*Ht+1-Ot*Ot)-Ht),T*Ot]}_s.invert=function(nt,ut){if(!ut)return[nt,0];var wt=ut/T,kt=(T*T*(1-wt*wt)-nt*nt)/(2*T*nt);return[nt?T*(y(nt)*U(kt*kt+1)-kt):0,M*m(2*t(wt))]};function jf(){return w.geoProjection(_s).scale(79.4183)}function nf(nt,ut){if(!ut)return[nt,0];var wt=P(ut);if(!nt||wt===M)return[0,ut];var kt=wt/M,Ht=kt*kt,Ot=(8*kt-Ht*(Ht+2)-5)/(2*Ht*(kt-1)),Kt=Ot*Ot,Cr=kt*Ot,Or=Ht+Kt+2*Cr,Vr=kt+3*Ot,sn=nt/M,bn=sn+1/sn,Un=y(P(nt)-M)*U(bn*bn-4),Gn=Un*Un,ua=Or*(Ht+Kt*Gn-1)+(1-Ht)*(Ht*(Vr*Vr+4*Kt)+12*Cr*Kt+4*Kt*Kt),Ha=(Un*(Or+Kt-1)+2*U(ua))/(4*Or+Gn);return[y(nt)*M*Ha,y(ut)*M*U(1+Un*P(Ha)-Ha*Ha)]}nf.invert=function(nt,ut){var wt;if(!nt||!ut)return[nt,ut];ut/=T;var kt=y(nt)*nt/M,Ht=(kt*kt-1+4*ut*ut)/P(kt),Ot=Ht*Ht,Kt=2*ut,Cr=50;do{var Or=Kt*Kt,Vr=(8*Kt-Or*(Or+2)-5)/(2*Or*(Kt-1)),sn=(3*Kt-Or*Kt-10)/(2*Or*Kt),bn=Vr*Vr,Un=Kt*Vr,Gn=Kt+Vr,ua=Gn*Gn,Ha=Kt+3*Vr,Ti=ua*(Or+bn*Ot-1)+(1-Or)*(Or*(Ha*Ha+4*bn)+bn*(12*Un+4*bn)),mi=-2*Gn*(4*Un*bn+(1-4*Or+3*Or*Or)*(1+sn)+bn*(-6+14*Or-Ot+(-8+8*Or-2*Ot)*sn)+Un*(-8+12*Or+(-10+10*Or-Ot)*sn)),Ai=U(Ti),po=Ht*(ua+bn-1)+2*Ai-kt*(4*ua+Ot),Fo=Ht*(2*Vr*sn+2*Gn*(1+sn))+mi/Ai-8*Gn*(Ht*(-1+bn+ua)+2*Ai)*(1+sn)/(Ot+4*ua);Kt-=wt=po/Fo}while(wt>c&&--Cr>0);return[y(nt)*(U(Ht*Ht+4)+Ht)*T/4,M*Kt]};function Gc(){return w.geoProjection(nf).scale(127.16)}function Ze(nt,ut,wt,kt,Ht){function Ot(Kt,Cr){var Or=wt*m(kt*Cr),Vr=U(1-Or*Or),sn=U(2/(1+Vr*a(Kt*=Ht)));return[nt*Vr*sn*m(Kt),ut*Or*sn]}return Ot.invert=function(Kt,Cr){var Or=Kt/nt,Vr=Cr/ut,sn=U(Or*Or+Vr*Vr),bn=2*D(sn/2);return[r(Kt*E(bn),nt*sn)/Ht,sn&&D(Cr*m(bn)/(ut*wt*sn))/kt]},Ot}function O(nt,ut,wt,kt){var Ht=T/3;nt=o(nt,c),ut=o(ut,c),nt=u(nt,M),ut=u(ut,T-c),wt=o(wt,0),wt=u(wt,100-c),kt=o(kt,c);var Ot=wt/100+1,Kt=kt/100,Cr=B(Ot*a(Ht))/Ht,Or=m(nt)/m(Cr*M),Vr=ut/T,sn=U(Kt*m(nt/2)/m(ut/2)),bn=sn/U(Vr*Or*Cr),Un=1/(sn*U(Vr*Or*Cr));return Ze(bn,Un,Or,Cr,Vr)}function fe(){var nt=65*x,ut=60*x,wt=20,kt=200,Ht=w.geoProjectionMutator(O),Ot=Ht(nt,ut,wt,kt);return Ot.poleline=function(Kt){return arguments.length?Ht(nt=+Kt*x,ut,wt,kt):nt*p},Ot.parallels=function(Kt){return arguments.length?Ht(nt,ut=+Kt*x,wt,kt):ut*p},Ot.inflation=function(Kt){return arguments.length?Ht(nt,ut,wt=+Kt,kt):wt},Ot.ratio=function(Kt){return arguments.length?Ht(nt,ut,wt,kt=+Kt):kt},Ot.scale(163.775)}function Re(){return fe().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Oe=4*T+3*U(3),We=2*U(2*T*U(3)/Oe),Mt=ht(We*U(3)/T,We,Oe/6);function zt(){return w.geoProjection(Mt).scale(176.84)}function rr(nt,ut){return[nt*U(1-3*ut*ut/(T*T)),ut]}rr.invert=function(nt,ut){return[nt/U(1-3*ut*ut/(T*T)),ut]};function Tr(){return w.geoProjection(rr).scale(152.63)}function zr(nt,ut){var wt=a(ut),kt=a(nt)*wt,Ht=1-kt,Ot=a(nt=r(m(nt)*wt,-m(ut))),Kt=m(nt);return wt=U(1-kt*kt),[Kt*wt-Ot*Ht,-Ot*wt-Kt*Ht]}zr.invert=function(nt,ut){var wt=(nt*nt+ut*ut)/-2,kt=U(-wt*(2+wt)),Ht=ut*wt+nt*kt,Ot=nt*wt-ut*kt,Kt=U(Ot*Ot+Ht*Ht);return[r(kt*Ht,Kt*(1+wt)),Kt?-D(kt*Ot/Kt):0]};function qr(){return w.geoProjection(zr).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function pn(nt,ut){var wt=ye(nt,ut);return[(wt[0]+nt/M)/2,(wt[1]+ut)/2]}pn.invert=function(nt,ut){var wt=nt,kt=ut,Ht=25;do{var Ot=a(kt),Kt=m(kt),Cr=m(2*kt),Or=Kt*Kt,Vr=Ot*Ot,sn=m(wt),bn=a(wt/2),Un=m(wt/2),Gn=Un*Un,ua=1-Vr*bn*bn,Ha=ua?B(Ot*bn)*U(Ti=1/ua):Ti=0,Ti,mi=.5*(2*Ha*Ot*Un+wt/M)-nt,Ai=.5*(Ha*Kt+kt)-ut,po=.5*Ti*(Vr*Gn+Ha*Ot*bn*Or)+.5/M,Fo=Ti*(sn*Cr/4-Ha*Kt*Un),Po=.125*Ti*(Cr*Un-Ha*Kt*Vr*sn),us=.5*Ti*(Or*bn+Ha*Gn*Ot)+.5,il=Fo*Po-us*po,ol=(Ai*Fo-mi*us)/il,Bs=(mi*Po-Ai*po)/il;wt-=ol,kt-=Bs}while((P(ol)>c||P(Bs)>c)&&--Ht>0);return[wt,kt]};function Dn(){return w.geoProjection(pn).scale(158.837)}v.geoNaturalEarth=w.geoNaturalEarth1,v.geoNaturalEarthRaw=w.geoNaturalEarth1Raw,v.geoAiry=le,v.geoAiryRaw=J,v.geoAitoff=de,v.geoAitoffRaw=ye,v.geoArmadillo=W,v.geoArmadilloRaw=me,v.geoAugust=se,v.geoAugustRaw=ie,v.geoBaker=Y,v.geoBakerRaw=oe,v.geoBerghaus=ue,v.geoBerghausRaw=ce,v.geoBertin1953=pt,v.geoBertin1953Raw=rt,v.geoBoggs=mt,v.geoBoggsRaw=Ye,v.geoBonne=cr,v.geoBonneRaw=Zt,v.geoBottomley=Br,v.geoBottomleyRaw=pr,v.geoBromley=cn,v.geoBromleyRaw=Fr,v.geoChamberlin=Ee,v.geoChamberlinRaw=$e,v.geoChamberlinAfrica=De,v.geoCollignon=Ie,v.geoCollignonRaw=Ae,v.geoCraig=st,v.geoCraigRaw=tt,v.geoCraster=Xt,v.geoCrasterRaw=Nt,v.geoCylindricalEqualArea=Rr,v.geoCylindricalEqualAreaRaw=lr,v.geoCylindricalStereographic=Sr,v.geoCylindricalStereographicRaw=Mr,v.geoEckert1=qn,v.geoEckert1Raw=Kr,v.geoEckert2=ia,v.geoEckert2Raw=ha,v.geoEckert3=ba,v.geoEckert3Raw=xa,v.geoEckert4=Za,v.geoEckert4Raw=ea,v.geoEckert5=_r,v.geoEckert5Raw=ui,v.geoEckert6=yr,v.geoEckert6Raw=Qt,v.geoEisenlohr=wn,v.geoEisenlohrRaw=nn,v.geoFahey=va,v.geoFaheyRaw=Fn,v.geoFoucaut=Pa,v.geoFoucautRaw=Da,v.geoFoucautSinusoidal=$a,v.geoFoucautSinusoidalRaw=Fa,v.geoGilbert=Gi,v.geoGingery=Qr,v.geoGingeryRaw=qt,v.geoGinzburg4=en,v.geoGinzburg4Raw=Xr,v.geoGinzburg5=hn,v.geoGinzburg5Raw=Tn,v.geoGinzburg6=xr,v.geoGinzburg6Raw=Rt,v.geoGinzburg8=An,v.geoGinzburg8Raw=Wr,v.geoGinzburg9=na,v.geoGinzburg9Raw=Xn,v.geoGringorten=Ya,v.geoGringortenRaw=Sn,v.geoGuyou=as,v.geoGuyouRaw=Uo,v.geoHammer=ze,v.geoHammerRaw=_e,v.geoHammerRetroazimuthal=hs,v.geoHammerRetroazimuthalRaw=el,v.geoHealpix=ml,v.geoHealpixRaw=pl,v.geoHill=Bl,v.geoHillRaw=zl,v.geoHomolosine=Ko,v.geoHomolosineRaw=Vs,v.geoHufnagel=rl,v.geoHufnagelRaw=jl,v.geoHyperelliptical=Ps,v.geoHyperellipticalRaw=yo,v.geoInterrupt=Wo,v.geoInterruptedBoggs=_u,v.geoInterruptedHomolosine=Pl,v.geoInterruptedMollweide=Yl,v.geoInterruptedMollweideHemispheres=bf,v.geoInterruptedSinuMollweide=ff,v.geoInterruptedSinusoidal=Dh,v.geoKavrayskiy7=jc,v.geoKavrayskiy7Raw=Ll,v.geoLagrange=hc,v.geoLagrangeRaw=Yh,v.geoLarrivee=hf,v.geoLarriveeRaw=dc,v.geoLaskowski=nc,v.geoLaskowskiRaw=au,v.geoLittrow=Ul,v.geoLittrowRaw=Js,v.geoLoximuthal=Cc,v.geoLoximuthalRaw=Df,v.geoMiller=mu,v.geoMillerRaw=Wf,v.geoModifiedStereographic=ac,v.geoModifiedStereographicRaw=Vd,v.geoModifiedStereographicAlaska=df,v.geoModifiedStereographicGs48=Hu,v.geoModifiedStereographicGs50=Zh,v.geoModifiedStereographicMiller=Yf,v.geoModifiedStereographicLee=wh,v.geoMollweide=Fe,v.geoMollweideRaw=lt,v.geoMtFlatPolarParabolic=Zf,v.geoMtFlatPolarParabolicRaw=Th,v.geoMtFlatPolarQuartic=Kh,v.geoMtFlatPolarQuarticRaw=$h,v.geoMtFlatPolarSinusoidal=id,v.geoMtFlatPolarSinusoidalRaw=vf,v.geoNaturalEarth2=wf,v.geoNaturalEarth2Raw=Of,v.geoNellHammer=ih,v.geoNellHammerRaw=ic,v.geoInterruptedQuarticAuthalic=Xl,v.geoNicolosi=Hd,v.geoNicolosiRaw=Oh,v.geoPatterson=wc,v.geoPattersonRaw=zf,v.geoPolyconic=yu,v.geoPolyconicRaw=Vc,v.geoPolyhedral=ph,v.geoPolyhedralButterfly=uu,v.geoPolyhedralCollignon=Qh,v.geoPolyhedralWaterman=du,v.geoProject=yc,v.geoGringortenQuincuncial=wr,v.geoPeirceQuincuncial=Hr,v.geoPierceQuincuncial=Hr,v.geoQuantize=kn,v.geoQuincuncial=ed,v.geoRectangularPolyconic=$n,v.geoRectangularPolyconicRaw=_n,v.geoRobinson=wi,v.geoRobinsonRaw=Ba,v.geoSatellite=ci,v.geoSatelliteRaw=to,v.geoSinuMollweide=Nl,v.geoSinuMollweideRaw=_o,v.geoSinusoidal=Wt,v.geoSinusoidalRaw=ft,v.geoStitch=Zl,v.geoTimes=Ls,v.geoTimesRaw=Oo,v.geoTwoPointAzimuthal=Ac,v.geoTwoPointAzimuthalRaw=Al,v.geoTwoPointAzimuthalUsa=Tc,v.geoTwoPointEquidistant=Sc,v.geoTwoPointEquidistantRaw=Pc,v.geoTwoPointEquidistantUsa=oh,v.geoVanDerGrinten=Ou,v.geoVanDerGrintenRaw=Ff,v.geoVanDerGrinten2=os,v.geoVanDerGrinten2Raw=Bf,v.geoVanDerGrinten3=jf,v.geoVanDerGrinten3Raw=_s,v.geoVanDerGrinten4=Gc,v.geoVanDerGrinten4Raw=nf,v.geoWagner=fe,v.geoWagner7=Re,v.geoWagnerRaw=O,v.geoWagner4=zt,v.geoWagner4Raw=Mt,v.geoWagner6=Tr,v.geoWagner6Raw=rr,v.geoWiechel=qr,v.geoWiechelRaw=zr,v.geoWinkel3=Dn,v.geoWinkel3Raw=pn,Object.defineProperty(v,"__esModule",{value:!0})})}}),CJ=Ne({"src/plots/geo/zoom.js"(te,Z){var v=xn(),w=In(),C=Xo(),P=Math.PI/180,t=180/Math.PI,r={cursor:"pointer"},a={cursor:"auto"};function l(p,x){var N=p.projection,D;return x._isScoped?D=o:x._isClipped?D=d:D=u,D(p,N)}Z.exports=l;function i(p,x){return v.behavior.zoom().translate(x.translate()).scale(x.scale())}function s(p,x,N){var D=p.id,B=p.graphDiv,U=B.layout,V=U[D],q=B._fullLayout,z=q[D],H={},G={};function J(le,ye){H[D+"."+le]=w.nestedProperty(V,le).get(),C.call("_storeDirectGUIEdit",U,q._preGUI,H);var de=w.nestedProperty(z,le);de.get()!==ye&&(de.set(ye),w.nestedProperty(V,le).set(ye),G[D+"."+le]=ye)}N(J),J("projection.scale",x.scale()/p.fitScale),J("fitbounds",!1),B.emit("plotly_relayout",G)}function o(p,x){var N=i(p,x);function D(){v.select(this).style(r)}function B(){x.scale(v.event.scale).translate(v.event.translate),p.render(!0);var q=x.invert(p.midPt);p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.center.lon":q[0],"geo.center.lat":q[1]})}function U(q){var z=x.invert(p.midPt);q("center.lon",z[0]),q("center.lat",z[1])}function V(){v.select(this).style(a),s(p,x,U)}return N.on("zoomstart",D).on("zoom",B).on("zoomend",V),N}function u(p,x){var N=i(p,x),D=2,B,U,V,q,z,H,G,J,le;function ye(ee){return x.invert(ee)}function de(ee){var pe=ye(ee);if(!pe)return!0;var oe=x(pe);return Math.abs(oe[0]-ee[0])>D||Math.abs(oe[1]-ee[1])>D}function me(){v.select(this).style(r),B=v.mouse(this),U=x.rotate(),V=x.translate(),q=U,z=ye(B)}function W(){if(H=v.mouse(this),de(B)){N.scale(x.scale()),N.translate(x.translate());return}x.scale(v.event.scale),x.translate([V[0],v.event.translate[1]]),z?ye(H)&&(J=ye(H),G=[q[0]+(J[0]-z[0]),U[1],U[2]],x.rotate(G),q=G):(B=H,z=ye(B)),le=!0,p.render(!0);var ee=x.rotate(),pe=x.invert(p.midPt);p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.center.lon":pe[0],"geo.center.lat":pe[1],"geo.projection.rotation.lon":-ee[0]})}function ie(){v.select(this).style(a),le&&s(p,x,se)}function se(ee){var pe=x.rotate(),oe=x.invert(p.midPt);ee("projection.rotation.lon",-pe[0]),ee("center.lon",oe[0]),ee("center.lat",oe[1])}return N.on("zoomstart",me).on("zoom",W).on("zoomend",ie),N}function d(p,x){x.rotate(),x.scale();var N=i(p,x),D=f(N,"zoomstart","zoom","zoomend"),B=0,U=N.on,V;N.on("zoomstart",function(){v.select(this).style(r);var J=v.mouse(this),le=x.rotate(),ye=le,de=x.translate(),me=y(le);V=h(x,J),U.call(N,"zoom",function(){var W=v.mouse(this);if(x.scale(v.event.scale),!V)J=W,V=h(x,J);else if(h(x,W)){x.rotate(le).translate(de);var ie=h(x,W),se=E(V,ie),ee=k(m(me,se)),pe=c(ee,V,ye);(!isFinite(pe[0])||!isFinite(pe[1])||!isFinite(pe[2]))&&(pe=ye),x.rotate(pe),ye=pe}z(D.of(this,arguments))}),q(D.of(this,arguments))}).on("zoomend",function(){v.select(this).style(a),U.call(N,"zoom",null),H(D.of(this,arguments)),s(p,x,G)}).on("zoom.redraw",function(){p.render(!0);var J=x.rotate();p.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/p.fitScale,"geo.projection.rotation.lon":-J[0],"geo.projection.rotation.lat":-J[1]})});function q(J){B++||J({type:"zoomstart"})}function z(J){J({type:"zoom"})}function H(J){--B||J({type:"zoomend"})}function G(J){var le=x.rotate();J("projection.rotation.lon",-le[0]),J("projection.rotation.lat",-le[1])}return v.rebind(N,D,"on")}function h(p,x){var N=p.invert(x);return N&&isFinite(N[0])&&isFinite(N[1])&&b(N)}function y(p){var x=.5*p[0]*P,N=.5*p[1]*P,D=.5*p[2]*P,B=Math.sin(x),U=Math.cos(x),V=Math.sin(N),q=Math.cos(N),z=Math.sin(D),H=Math.cos(D);return[U*q*H+B*V*z,B*q*H-U*V*z,U*V*H+B*q*z,U*q*z-B*V*H]}function m(p,x){var N=p[0],D=p[1],B=p[2],U=p[3],V=x[0],q=x[1],z=x[2],H=x[3];return[N*V-D*q-B*z-U*H,N*q+D*V+B*H-U*z,N*z-D*H+B*V+U*q,N*H+D*z-B*q+U*V]}function E(p,x){if(!(!p||!x)){var N=g(p,x),D=Math.sqrt(A(N,N)),B=.5*Math.acos(Math.max(-1,Math.min(1,A(p,x)))),U=Math.sin(B)/D;return D&&[Math.cos(B),N[2]*U,-N[1]*U,N[0]*U]}}function c(p,x,N){var D=M(x,2,p[0]);D=M(D,1,p[1]),D=M(D,0,p[2]-N[2]);var B=x[0],U=x[1],V=x[2],q=D[0],z=D[1],H=D[2],G=Math.atan2(U,B)*t,J=Math.sqrt(B*B+U*U),le,ye;Math.abs(z)>J?(ye=(z>0?90:-90)-G,le=0):(ye=Math.asin(z/J)*t-G,le=Math.sqrt(J*J-z*z));var de=180-ye-2*G,me=(Math.atan2(H,q)-Math.atan2(V,le))*t,W=(Math.atan2(H,q)-Math.atan2(V,-le))*t,ie=_(N[0],N[1],ye,me),se=_(N[0],N[1],de,W);return ie<=se?[ye,me,N[2]]:[de,W,N[2]]}function _(p,x,N,D){var B=T(N-p),U=T(D-x);return Math.sqrt(B*B+U*U)}function T(p){return(p%360+540)%360-180}function M(p,x,N){var D=N*P,B=p.slice(),U=x===0?1:0,V=x===2?1:2,q=Math.cos(D),z=Math.sin(D);return B[U]=p[U]*q-p[V]*z,B[V]=p[V]*q+p[U]*z,B}function k(p){return[Math.atan2(2*(p[0]*p[1]+p[2]*p[3]),1-2*(p[1]*p[1]+p[2]*p[2]))*t,Math.asin(Math.max(-1,Math.min(1,2*(p[0]*p[2]-p[3]*p[1]))))*t,Math.atan2(2*(p[0]*p[3]+p[1]*p[2]),1-2*(p[2]*p[2]+p[3]*p[3]))*t]}function b(p){var x=p[0]*P,N=p[1]*P,D=Math.cos(N);return[D*Math.cos(x),D*Math.sin(x),Math.sin(N)]}function A(p,x){for(var N=0,D=0,B=p.length;D<B;++D)N+=p[D]*x[D];return N}function g(p,x){return[p[1]*x[2]-p[2]*x[1],p[2]*x[0]-p[0]*x[2],p[0]*x[1]-p[1]*x[0]]}function f(p){for(var x=0,N=arguments.length,D=[];++x<N;)D.push(arguments[x]);var B=v.dispatch.apply(null,D);return B.of=function(U,V){return function(q){var z;try{z=q.sourceEvent=v.event,q.target=p,v.event=q,B[q.type].apply(U,V)}finally{v.event=z}}},B}}}),kJ=Ne({"src/plots/geo/geo.js"(te,Z){var v=xn(),w=hN(),C=w.geoPath,P=w.geoDistance,t=MJ(),r=Xo(),a=In(),l=a.strTranslate,i=io(),s=zs(),o=nh(),u=uf(),d=Os(),h=Cm().getAutoRange,y=Bv(),m=fh().prepSelect,E=fh().clearOutline,c=fh().selectOnClick,_=CJ(),T=o6(),M=Db(),k=yR(),b=uN().feature;function A(N){this.id=N.id,this.graphDiv=N.graphDiv,this.container=N.container,this.topojsonURL=N.topojsonURL,this.isStatic=N.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 g=A.prototype;Z.exports=function(D){return new A(D)},g.plot=function(N,D,B,U){var V=this;if(U)return V.update(N,D,!0);V._geoCalcData=N,V._fullLayout=D;var q=D[this.id],z=[],H=!1;for(var G in T.layerNameToAdjective)if(G!=="frame"&&q["show"+G]){H=!0;break}for(var J=!1,le=0;le<N.length;le++){var ye=N[0][0].trace;ye._geo=V,ye.locationmode&&(H=!0);var de=ye.marker;if(de){var me=de.angle,W=de.angleref;(me||W==="north"||W==="previous")&&(J=!0)}}if(this._hasMarkerAngles=J,H){var ie=k.getTopojsonName(q);(V.topojson===null||ie!==V.topojsonName)&&(V.topojsonName=ie,PlotlyGeoAssets.topojson[V.topojsonName]===void 0&&z.push(V.fetchTopojson()))}z=z.concat(M.fetchTraceGeoData(N)),B.push(new Promise(function(se,ee){Promise.all(z).then(function(){V.topojson=PlotlyGeoAssets.topojson[V.topojsonName],V.update(N,D),se()}).catch(ee)}))},g.fetchTopojson=function(){var N=this,D=k.getTopojsonPath(N.topojsonURL,N.topojsonName);return new Promise(function(B,U){v.json(D,function(V,q){if(V)return V.status===404?U(new Error(["plotly.js could not find topojson file at",D+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" "))):U(new Error(["unexpected error while fetching topojson file at",D].join(" ")));PlotlyGeoAssets.topojson[N.topojsonName]=q,B()})})},g.update=function(N,D,B){var U=D[this.id];this.hasChoropleth=!1;for(var V=0;V<N.length;V++){var q=N[V],z=q[0].trace;z.type==="choropleth"&&(this.hasChoropleth=!0),z.visible===!0&&z._length>0&&z._module.calcGeoJSON(q,D)}if(!B){var H=this.updateProjection(N,D);if(H)return;(!this.viewInitial||this.scope!==U.scope)&&this.saveViewInitial(U)}this.scope=U.scope,this.updateBaseLayers(D,U),this.updateDims(D,U),this.updateFx(D,U),u.generalUpdatePerTraceModule(this.graphDiv,this,N,U);var G=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=G.selectAll(".point"),this.dataPoints.text=G.selectAll("text"),this.dataPaths.line=G.selectAll(".js-line");var J=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=J.selectAll("path"),this._render()},g.updateProjection=function(N,D){var B=this.graphDiv,U=D[this.id],V=D._size,q=U.domain,z=U.projection,H=U.lonaxis,G=U.lataxis,J=H._ax,le=G._ax,ye=this.projection=f(U),de=[[V.l+V.w*q.x[0],V.t+V.h*(1-q.y[1])],[V.l+V.w*q.x[1],V.t+V.h*(1-q.y[0])]],me=U.center||{},W=z.rotation||{},ie=H.range||[],se=G.range||[];if(U.fitbounds){J._length=de[1][0]-de[0][0],le._length=de[1][1]-de[0][1],J.range=h(B,J),le.range=h(B,le);var ee=(J.range[0]+J.range[1])/2,pe=(le.range[0]+le.range[1])/2;if(U._isScoped)me={lon:ee,lat:pe};else if(U._isClipped){me={lon:ee,lat:pe},W={lon:ee,lat:pe,roll:W.roll};var oe=z.type,Y=T.lonaxisSpan[oe]/2||180,ce=T.lataxisSpan[oe]/2||90;ie=[ee-Y,ee+Y],se=[pe-ce,pe+ce]}else me={lon:ee,lat:pe},W={lon:ee,lat:W.lat,roll:W.roll}}ye.center([me.lon-W.lon,me.lat-W.lat]).rotate([-W.lon,-W.lat,W.roll]).parallels(z.parallels);var ue=x(ie,se);ye.fitExtent(de,ue);var _e=this.bounds=ye.getBounds(ue),Le=this.fitScale=ye.scale(),ze=ye.translate();if(U.fitbounds){var Ge=ye.getBounds(x(J.range,le.range)),Ve=Math.min((_e[1][0]-_e[0][0])/(Ge[1][0]-Ge[0][0]),(_e[1][1]-_e[0][1])/(Ge[1][1]-Ge[0][1]));isFinite(Ve)?ye.scale(Ve*Le):a.warn("Something went wrong during"+this.id+"fitbounds computations.")}else ye.scale(z.scale*Le);var rt=this.midPt=[(_e[0][0]+_e[1][0])/2,(_e[0][1]+_e[1][1])/2];if(ye.translate([ze[0]+(rt[0]-ze[0]),ze[1]+(rt[1]-ze[1])]).clipExtent(_e),U._isAlbersUsa){var pt=ye([me.lon,me.lat]),gt=ye.translate();ye.translate([gt[0]-(pt[0]-gt[0]),gt[1]-(pt[1]-gt[1])])}},g.updateBaseLayers=function(N,D){var B=this,U=B.topojson,V=B.layers,q=B.basePaths;function z(de){return de==="lonaxis"||de==="lataxis"}function H(de){return!!T.lineLayers[de]}function G(de){return!!T.fillLayers[de]}var J=this.hasChoropleth?T.layersForChoropleth:T.layers,le=J.filter(function(de){return H(de)||G(de)?D["show"+de]:z(de)?D[de].showgrid:!0}),ye=B.framework.selectAll(".layer").data(le,String);ye.exit().each(function(de){delete V[de],delete q[de],v.select(this).remove()}),ye.enter().append("g").attr("class",function(de){return"layer "+de}).each(function(de){var me=V[de]=v.select(this);de==="bg"?B.bgRect=me.append("rect").style("pointer-events","all"):z(de)?q[de]=me.append("path").style("fill","none"):de==="backplot"?me.append("g").classed("choroplethlayer",!0):de==="frontplot"?me.append("g").classed("scatterlayer",!0):H(de)?q[de]=me.append("path").style("fill","none").style("stroke-miterlimit",2):G(de)&&(q[de]=me.append("path").style("stroke","none"))}),ye.order(),ye.each(function(de){var me=q[de],W=T.layerNameToAdjective[de];de==="frame"?me.datum(T.sphereSVG):H(de)||G(de)?me.datum(b(U,U.objects[de])):z(de)&&me.datum(p(de,D,N)).call(i.stroke,D[de].gridcolor).call(s.dashLine,D[de].griddash,D[de].gridwidth),H(de)?me.call(i.stroke,D[W+"color"]).call(s.dashLine,"",D[W+"width"]):G(de)&&me.call(i.fill,D[W+"color"])})},g.updateDims=function(N,D){var B=this.bounds,U=(D.framewidth||0)/2,V=B[0][0]-U,q=B[0][1]-U,z=B[1][0]-V+U,H=B[1][1]-q+U;s.setRect(this.clipRect,V,q,z,H),this.bgRect.call(s.setRect,V,q,z,H).call(i.fill,D.bgcolor),this.xaxis._offset=V,this.xaxis._length=z,this.yaxis._offset=q,this.yaxis._length=H},g.updateFx=function(N,D){var B=this,U=B.graphDiv,V=B.bgRect,q=N.dragmode,z=N.clickmode;if(B.isStatic)return;function H(){var ye=B.viewInitial,de={};for(var me in ye)de[B.id+"."+me]=ye[me];r.call("_guiRelayout",U,de),U.emit("plotly_doubleclick",null)}function G(ye){return B.projection.invert([ye[0]+B.xaxis._offset,ye[1]+B.yaxis._offset])}var J=function(ye,de){if(de.isRect){var me=ye.range={};me[B.id]=[G([de.xmin,de.ymin]),G([de.xmax,de.ymax])]}else{var W=ye.lassoPoints={};W[B.id]=de.map(G)}},le={element:B.bgRect.node(),gd:U,plotinfo:{id:B.id,xaxis:B.xaxis,yaxis:B.yaxis,fillRangeItems:J},xaxes:[B.xaxis],yaxes:[B.yaxis],subplot:B.id,clickFn:function(ye){ye===2&&E(U)}};q==="pan"?(V.node().onmousedown=null,V.call(_(B,D)),V.on("dblclick.zoom",H),U._context._scrollZoom.geo||V.on("wheel.zoom",null)):(q==="select"||q==="lasso")&&(V.on(".zoom",null),le.prepFn=function(ye,de,me){m(ye,de,me,le,q)},y.init(le)),V.on("mousemove",function(){var ye=B.projection.invert(a.getPositionFromD3Event());if(!ye)return y.unhover(U,v.event);B.xaxis.p2c=function(){return ye[0]},B.yaxis.p2c=function(){return ye[1]},o.hover(U,v.event,B.id)}),V.on("mouseout",function(){U._dragging||y.unhover(U,v.event)}),V.on("click",function(){q!=="select"&&q!=="lasso"&&(z.indexOf("select")>-1&&c(v.event,U,[B.xaxis],[B.yaxis],B.id,le),z.indexOf("event")>-1&&o.click(U,v.event))})},g.makeFramework=function(){var N=this,D=N.graphDiv,B=D._fullLayout,U="clip"+B._uid+N.id;N.clipDef=B._clips.append("clipPath").attr("id",U),N.clipRect=N.clipDef.append("rect"),N.framework=v.select(N.container).append("g").attr("class","geo "+N.id).call(s.setClipUrl,U,D),N.project=function(V){var q=N.projection(V);return q?[q[0]-N.xaxis._offset,q[1]-N.yaxis._offset]:[null,null]},N.xaxis={_id:"x",c2p:function(V){return N.project(V)[0]}},N.yaxis={_id:"y",c2p:function(V){return N.project(V)[1]}},N.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(N.mockAxis,B)},g.saveViewInitial=function(N){var D=N.center||{},B=N.projection,U=B.rotation||{};this.viewInitial={fitbounds:N.fitbounds,"projection.scale":B.scale};var V;N._isScoped?V={"center.lon":D.lon,"center.lat":D.lat}:N._isClipped?V={"projection.rotation.lon":U.lon,"projection.rotation.lat":U.lat}:V={"center.lon":D.lon,"center.lat":D.lat,"projection.rotation.lon":U.lon},a.extendFlat(this.viewInitial,V)},g.render=function(N){this._hasMarkerAngles&&N?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},g._render=function(){var N=this.projection,D=N.getPath(),B;function U(q){var z=N(q.lonlat);return z?l(z[0],z[1]):null}function V(q){return N.isLonLatOverEdges(q.lonlat)?"none":null}for(B in this.basePaths)this.basePaths[B].attr("d",D);for(B in this.dataPaths)this.dataPaths[B].attr("d",function(q){return D(q.geojson)});for(B in this.dataPoints)this.dataPoints[B].attr("display",V).attr("transform",U)};function f(N){var D=N.projection,B=D.type,U=T.projNames[B];U="geo"+a.titleCase(U);for(var V=w[U]||t[U],q=V(),z=N._isSatellite?Math.acos(1/D.distance)*180/Math.PI:N._isClipped?T.lonaxisSpan[B]/2:null,H=["center","rotate","parallels","clipExtent"],G=function(ye){return ye?q:[]},J=0;J<H.length;J++){var le=H[J];typeof q[le]!="function"&&(q[le]=G)}return q.isLonLatOverEdges=function(ye){if(q(ye)===null)return!0;if(z){var de=q.rotate(),me=P(ye,[-de[0],-de[1]]),W=z*Math.PI/180;return me>W}else return!1},q.getPath=function(){return C().projection(q)},q.getBounds=function(ye){return q.getPath().bounds(ye)},q.precision(T.precision),N._isSatellite&&q.tilt(D.tilt).distance(D.distance),z&&q.clipAngle(z-T.clipPad),q}function p(N,D,B){var U=1e-6,V=2.5,q=D[N],z=T.scopeDefaults[D.scope],H,G,J;N==="lonaxis"?(H=z.lonaxisRange,G=z.lataxisRange,J=function(pe,oe){return[pe,oe]}):N==="lataxis"&&(H=z.lataxisRange,G=z.lonaxisRange,J=function(pe,oe){return[oe,pe]});var le={type:"linear",range:[H[0],H[1]-U],tick0:q.tick0,dtick:q.dtick};d.setConvert(le,B);var ye=d.calcTicks(le);!D.isScoped&&N==="lonaxis"&&ye.pop();for(var de=ye.length,me=new Array(de),W=0;W<de;W++)for(var ie=ye[W].x,se=me[W]=[],ee=G[0];ee<G[1]+V;ee+=V)se.push(J(ie,ee));return{type:"MultiLineString",coordinates:me}}function x(N,D){var B=T.clipPad,U=N[0]+B,V=N[1]-B,q=D[0]+B,z=D[1]-B;U>0&&V<0&&(V+=360);var H=(V-U)/4;return{type:"Polygon",coordinates:[[[U,q],[U,z],[U+H,z],[U+2*H,z],[U+3*H,z],[V,z],[V,q],[V-H,q],[V-2*H,q],[V-3*H,q],[U,q]]]}}}}),dN=Ne({"src/plots/geo/layout_attributes.js"(te,Z){var v=lu(),w=Oc().attributes,C=Dd().dash,P=o6(),t=Kc().overrideAll,r=Sm(),a={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:v.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:C},l=Z.exports=t({domain:w({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:r(P.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:r(P.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:v.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:P.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:P.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:P.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:P.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:v.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:v.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:v.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:v.background},lonaxis:a,lataxis:a},"plot","from-root");l.uirevision={valType:"any",editType:"none"}}}),PJ=Ne({"src/plots/geo/layout_defaults.js"(te,Z){var v=In(),w=X0(),C=iv().getSubplotData,P=o6(),t=dN(),r=P.axesNames;Z.exports=function(i,s,o){w(i,s,o,{type:"geo",attributes:t,handleDefaults:a,fullData:o,partition:"y"})};function a(l,i,s,o){var u=C(o.fullData,"geo",o.id),d=u.map(function(se){return se.index}),h=s("resolution"),y=s("scope"),m=P.scopeDefaults[y],E=s("projection.type",m.projType),c=i._isAlbersUsa=E==="albers usa";c&&(y=i.scope="usa");var _=i._isScoped=y!=="world",T=i._isSatellite=E==="satellite",M=i._isConic=E.indexOf("conic")!==-1||E==="albers",k=i._isClipped=!!P.lonaxisSpan[E];if(l.visible===!1){var b=v.extendDeep({},i._template);b.showcoastlines=!1,b.showcountries=!1,b.showframe=!1,b.showlakes=!1,b.showland=!1,b.showocean=!1,b.showrivers=!1,b.showsubunits=!1,b.lonaxis&&(b.lonaxis.showgrid=!1),b.lataxis&&(b.lataxis.showgrid=!1),i._template=b}for(var A=s("visible"),g,f=0;f<r.length;f++){var p=r[f],x=[30,10][f],N;if(_)N=m[p+"Range"];else{var D=P[p+"Span"],B=(D[E]||D["*"])/2,U=s("projection.rotation."+p.substr(0,3),m.projRotate[f]);N=[U-B,U+B]}var V=s(p+".range",N);s(p+".tick0"),s(p+".dtick",x),g=s(p+".showgrid",A?void 0:!1),g&&(s(p+".gridcolor"),s(p+".gridwidth"),s(p+".griddash")),i[p]._ax={type:"linear",_id:p.slice(0,3),_traceIndices:d,setScale:v.identity,c2l:v.identity,r2l:v.identity,autorange:!0,range:V.slice(),_m:1,_input:{}}}var q=i.lonaxis.range,z=i.lataxis.range,H=q[0],G=q[1];H>0&&G<0&&(G+=360);var J=(H+G)/2,le;if(!c){var ye=_?m.projRotate:[J,0,0];le=s("projection.rotation.lon",ye[0]),s("projection.rotation.lat",ye[1]),s("projection.rotation.roll",ye[2]),g=s("showcoastlines",!_&&A),g&&(s("coastlinecolor"),s("coastlinewidth")),g=s("showocean",A?void 0:!1),g&&s("oceancolor")}var de,me;if(c?(de=-96.6,me=38.7):(de=_?J:le,me=(z[0]+z[1])/2),s("center.lon",de),s("center.lat",me),T&&(s("projection.tilt"),s("projection.distance")),M){var W=m.projParallels||[0,60];s("projection.parallels",W)}s("projection.scale"),g=s("showland",A?void 0:!1),g&&s("landcolor"),g=s("showlakes",A?void 0:!1),g&&s("lakecolor"),g=s("showrivers",A?void 0:!1),g&&(s("rivercolor"),s("riverwidth")),g=s("showcountries",_&&y!=="usa"&&A),g&&(s("countrycolor"),s("countrywidth")),(y==="usa"||y==="north america"&&h===50)&&(s("showsubunits",A),s("subunitcolor"),s("subunitwidth")),_||(g=s("showframe",A),g&&(s("framecolor"),s("framewidth"))),s("bgcolor");var ie=s("fitbounds");ie&&(delete i.projection.scale,_?(delete i.center.lon,delete i.center.lat):k?(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon,delete i.projection.rotation.lat,delete i.lonaxis.range,delete i.lataxis.range):(delete i.center.lon,delete i.center.lat,delete i.projection.rotation.lon))}}}),vN=Ne({"src/plots/geo/index.js"(te,Z){var v=iv().getSubplotCalcData,w=In().counterRegex,C=kJ(),P="geo",t=w(P),r={};r[P]={valType:"subplotid",dflt:P,editType:"calc"};function a(s){for(var o=s._fullLayout,u=s.calcdata,d=o._subplots[P],h=0;h<d.length;h++){var y=d[h],m=v(u,P,y),E=o[y],c=E._subplot;c||(c=C({id:y,graphDiv:s,container:o._geolayer.node(),topojsonURL:s._context.topojsonURL,staticPlot:s._context.staticPlot}),o[y]._subplot=c),c.plot(m,o,s._promises)}}function l(s,o,u,d){for(var h=d._subplots[P]||[],y=0;y<h.length;y++){var m=h[y],E=d[m]._subplot;!o[m]&&E&&(E.framework.remove(),E.clipDef.remove())}}function i(s){for(var o=s._fullLayout,u=o._subplots[P],d=0;d<u.length;d++){var h=o[u[d]],y=h._subplot;y.updateFx(o,h)}}Z.exports={attr:P,name:P,idRoot:P,idRegex:t,attrRegex:t,attributes:r,layoutAttributes:dN(),supplyLayoutDefaults:PJ(),plot:a,updateFx:i,clean:l}}}),LJ=Ne({"src/traces/scattergeo/index.js"(te,Z){Z.exports={attributes:v3(),supplyDefaults:gJ(),colorbar:ah(),formatLabels:_J(),calc:mR(),calcGeoJSON:fN().calcGeoJSON,plot:fN().plot,style:cN(),styleOnSelect:Hh().styleOnSelect,hoverPoints:AJ(),eventData:SJ(),selectPoints:EJ(),moduleType:"trace",name:"scattergeo",basePlotModule:vN(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}}}),RJ=Ne({"lib/scattergeo.js"(te,Z){Z.exports=LJ()}}),KS=Ne({"src/traces/choropleth/attributes.js"(te,Z){var{hovertemplateAttrs:v,templatefallbackAttrs:w}=Il(),C=v3(),P=Vu(),t=ns(),r=lu().defaultLine,a=co().extendFlat,l=C.marker.line;Z.exports=a({locations:{valType:"data_array",editType:"calc"},locationmode:C.locationmode,z:{valType:"data_array",editType:"calc"},geojson:a({},C.geojson,{}),featureidkey:C.featureidkey,text:a({},C.text,{}),hovertext:a({},C.hovertext,{}),marker:{line:{color:a({},l.color,{dflt:r}),width:a({},l.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:C.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:C.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:a({},t.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:v(),hovertemplatefallback:w(),showlegend:a({},t.showlegend,{dflt:!1})},P("",{cLetter:"z",editTypeOverride:"calc"}))}}),IJ=Ne({"src/traces/choropleth/defaults.js"(te,Z){var v=In(),w=Ph(),C=KS(),P=["The library used by the *country names* `locationmode` option is changing in the next major version.","Some country names in existing plots may not work in the new version.","To ensure consistent behavior, consider setting `locationmode` to *ISO-3*."].join(" ");Z.exports=function(r,a,l,i){function s(E,c){return v.coerce(r,a,C,E,c)}var o=s("locations"),u=s("z");if(!(o&&o.length&&v.isArrayOrTypedArray(u)&&u.length)){a.visible=!1;return}a._length=Math.min(o.length,u.length);var d=s("geojson"),h;(typeof d=="string"&&d!==""||v.isPlainObject(d))&&(h="geojson-id");var y=s("locationmode",h);y==="country names"&&v.warn(P),y==="geojson-id"&&s("featureidkey"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback");var m=s("marker.line.width");m&&s("marker.line.color"),s("marker.opacity"),w(r,a,i,s,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(a,s)}}}),xR=Ne({"src/traces/choropleth/calc.js"(te,Z){var v=la(),w=ja().BADNUM,C=Nd(),P=o0(),t=Vh();function r(a){return a&&typeof a=="string"}Z.exports=function(l,i){var s=i._length,o=new Array(s),u;i.geojson?u=function(E){return r(E)||v(E)}:u=r;for(var d=0;d<s;d++){var h=o[d]={},y=i.locations[d],m=i.z[d];u(y)&&v(m)?(h.loc=y,h.z=m):(h.loc=null,h.z=w),h.index=d}return P(o,i),C(l,i,{vals:i.z,containerStr:"",cLetter:"z"}),t(o,i),o}}}),bR=Ne({"src/traces/choropleth/style.js"(te,Z){var v=xn(),w=io(),C=zs(),P=Dc();function t(l,i){i&&r(l,i)}function r(l,i){var s=i[0].trace,o=i[0].node3,u=o.selectAll(".choroplethlocation"),d=s.marker||{},h=d.line||{},y=P.makeColorScaleFuncFromTrace(s);u.each(function(m){v.select(this).attr("fill",y(m.z)).call(w.stroke,m.mlc||h.color).call(C.dashLine,"",m.mlw||h.width||0).style("opacity",d.opacity)}),C.selectedPointStyle(u,s)}function a(l,i){var s=i[0].node3,o=i[0].trace;o.selectedpoints?C.selectedPointStyle(s.selectAll(".choroplethlocation"),o):r(l,i)}Z.exports={style:t,styleOnSelect:a}}}),pN=Ne({"src/traces/choropleth/plot.js"(te,Z){var v=xn(),w=In(),C=Db(),P=yR().getTopojsonFeatures,t=Cm().findExtremes,r=bR().style;function a(i,s,o){var u=s.layers.backplot.select(".choroplethlayer");w.makeTraceGroups(u,o,"trace choropleth").each(function(d){var h=v.select(this),y=h.selectAll("path.choroplethlocation").data(w.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),r(i,d)})}function l(i,s){for(var o=i[0].trace,u=s[o.geo],d=u._subplot,h=o.locationmode,y=o._length,m=h==="geojson-id"?C.extractTraceFeature(i):P(o,d.topojson),E=[],c=[],_=0;_<y;_++){var T=i[_],M=h==="geojson-id"?T.fOut:C.locationToFeature(h,T.loc,m);if(M){T.geojson=M,T.ct=M.properties.ct,T._polygons=C.feature2polygons(M);var k=C.computeBbox(M);E.push(k[0],k[2]),c.push(k[1],k[3])}else T.geojson=null}if(u.fitbounds==="geojson"&&h==="geojson-id"){var b=C.computeBbox(C.getTraceGeojson(o));E=[b[0],b[2]],c=[b[1],b[3]]}var A={padded:!0};o._extremes.lon=t(u.lonaxis._ax,E,A),o._extremes.lat=t(u.lataxis._ax,c,A)}Z.exports={calcGeoJSON:l,plot:a}}}),wR=Ne({"src/traces/choropleth/hover.js"(te,Z){var v=Os(),w=KS(),C=In().fillText;Z.exports=function(r,a,l){var i=r.cd,s=i[0].trace,o=r.subplot,u,d,h,y,m=[a,l],E=[a+360,l];for(d=0;d<i.length;d++)if(u=i[d],y=!1,u._polygons){for(h=0;h<u._polygons.length;h++)u._polygons[h].contains(m)&&(y=!y),u._polygons[h].contains(E)&&(y=!y);if(y)break}if(!(!y||!u))return r.x0=r.x1=r.xa.c2p(u.ct),r.y0=r.y1=r.ya.c2p(u.ct),r.index=u.index,r.location=u.loc,r.z=u.z,r.zLabel=v.tickText(o.mockAxis,o.mockAxis.c2l(u.z),"hover").text,r.hovertemplate=u.hovertemplate,P(r,s,u),[r]};function P(t,r,a){if(!r.hovertemplate){var l=a.hi||r.hoverinfo,i=String(a.loc),s=l==="all"?w.hoverinfo.flags:l.split("+"),o=s.indexOf("name")!==-1,u=s.indexOf("location")!==-1,d=s.indexOf("z")!==-1,h=s.indexOf("text")!==-1,y=!o&&u,m=[];y?t.nameOverride=i:(o&&(t.nameOverride=r.name),u&&m.push(i)),d&&m.push(t.zLabel),h&&C(a,r,m),t.extraText=m.join("<br>")}}}}),TR=Ne({"src/traces/choropleth/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){w.location=C.location,w.z=C.z;var a=t[r];return a.fIn&&a.fIn.properties&&(w.properties=a.fIn.properties),w.ct=a.ct,w}}}),AR=Ne({"src/traces/choropleth/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i,s,o,u;if(C===!1)for(l=0;l<P.length;l++)P[l].selected=0;else for(l=0;l<P.length;l++)i=P[l],s=i.ct,s&&(o=t.c2p(s),u=r.c2p(s),C.contains([o,u],null,l,w)?(a.push({pointNumber:l,lon:s[0],lat:s[1]}),i.selected=1):i.selected=0);return a}}}),DJ=Ne({"src/traces/choropleth/index.js"(te,Z){Z.exports={attributes:KS(),supplyDefaults:IJ(),colorbar:Fy(),calc:xR(),calcGeoJSON:pN().calcGeoJSON,plot:pN().plot,style:bR().style,styleOnSelect:bR().styleOnSelect,hoverPoints:wR(),eventData:TR(),selectPoints:AR(),moduleType:"trace",name:"choropleth",basePlotModule:vN(),categories:["geo","noOpacity","showLegend"],meta:{}}}}),OJ=Ne({"lib/choropleth.js"(te,Z){Z.exports=DJ()}}),SR=Ne({"src/traces/scattergl/hover.js"(te,Z){var v=Xo(),w=In(),C=G1();function P(r,a,l,i){var s=r.cd,o=s[0].t,u=s[0].trace,d=r.xa,h=r.ya,y=o.x,m=o.y,E=d.c2p(a),c=h.c2p(l),_=r.distance,T;if(o.tree){var M=d.p2c(E-_),k=d.p2c(E+_),b=h.p2c(c-_),A=h.p2c(c+_);i==="x"?T=o.tree.range(Math.min(M,k),Math.min(h._rl[0],h._rl[1]),Math.max(M,k),Math.max(h._rl[0],h._rl[1])):T=o.tree.range(Math.min(M,k),Math.min(b,A),Math.max(M,k),Math.max(b,A))}else T=o.ids;var g,f,p,x,N,D,B,U,V,q=_;if(i==="x"){var z=!!u.xperiodalignment,H=!!u.yperiodalignment;for(N=0;N<T.length;N++){if(g=T[N],p=y[g],D=Math.abs(d.c2p(p)-E),z){var G=d.c2p(u._xStarts[g]),J=d.c2p(u._xEnds[g]);D=E>=Math.min(G,J)&&E<=Math.max(G,J)?0:1/0}if(D<q){if(q=D,x=m[g],B=h.c2p(x)-c,H){var le=h.c2p(u._yStarts[g]),ye=h.c2p(u._yEnds[g]);B=c>=Math.min(le,ye)&&c<=Math.max(le,ye)?0:1/0}V=Math.sqrt(D*D+B*B),f=T[N]}}}else for(N=T.length-1;N>-1;N--)g=T[N],p=y[g],x=m[g],D=d.c2p(p)-E,B=h.c2p(x)-c,U=Math.sqrt(D*D+B*B),U<q&&(q=V=U,f=g);return r.index=f,r.distance=q,r.dxy=V,f===void 0?[r]:[t(r,y,m,u)]}function t(r,a,l,i){var s=r.xa,o=r.ya,u=r.distance,d=r.dxy,h=r.index,y={pointNumber:h,x:a[h],y:l[h]};y.tx=w.isArrayOrTypedArray(i.text)?i.text[h]:i.text,y.htx=Array.isArray(i.hovertext)?i.hovertext[h]:i.hovertext,y.data=Array.isArray(i.customdata)?i.customdata[h]:i.customdata,y.tp=Array.isArray(i.textposition)?i.textposition[h]:i.textposition;var m=i.textfont;m&&(y.ts=w.isArrayOrTypedArray(m.size)?m.size[h]:m.size,y.tc=w.isArrayOrTypedArray(m.color)?m.color[h]:m.color,y.tf=Array.isArray(m.family)?m.family[h]:m.family,y.tw=Array.isArray(m.weight)?m.weight[h]:m.weight,y.ty=Array.isArray(m.style)?m.style[h]:m.style,y.tv=Array.isArray(m.variant)?m.variant[h]:m.variant);var E=i.marker;E&&(y.ms=w.isArrayOrTypedArray(E.size)?E.size[h]:E.size,y.mo=w.isArrayOrTypedArray(E.opacity)?E.opacity[h]:E.opacity,y.mx=w.isArrayOrTypedArray(E.symbol)?E.symbol[h]:E.symbol,y.ma=w.isArrayOrTypedArray(E.angle)?E.angle[h]:E.angle,y.mc=w.isArrayOrTypedArray(E.color)?E.color[h]:E.color);var c=E&&E.line;c&&(y.mlc=Array.isArray(c.color)?c.color[h]:c.color,y.mlw=w.isArrayOrTypedArray(c.width)?c.width[h]:c.width);var _=E&&E.gradient;_&&_.type!=="none"&&(y.mgt=Array.isArray(_.type)?_.type[h]:_.type,y.mgc=Array.isArray(_.color)?_.color[h]:_.color);var T=s.c2p(y.x,!0),M=o.c2p(y.y,!0),k=y.mrc||1,b=i.hoverlabel;b&&(y.hbg=Array.isArray(b.bgcolor)?b.bgcolor[h]:b.bgcolor,y.hbc=Array.isArray(b.bordercolor)?b.bordercolor[h]:b.bordercolor,y.hts=w.isArrayOrTypedArray(b.font.size)?b.font.size[h]:b.font.size,y.htc=Array.isArray(b.font.color)?b.font.color[h]:b.font.color,y.htf=Array.isArray(b.font.family)?b.font.family[h]:b.font.family,y.hnl=w.isArrayOrTypedArray(b.namelength)?b.namelength[h]:b.namelength);var A=i.hoverinfo;A&&(y.hi=Array.isArray(A)?A[h]:A);var g=i.hovertemplate;g&&(y.ht=Array.isArray(g)?g[h]:g);var f={};f[r.index]=y;var p=i._origX,x=i._origY,N=w.extendFlat({},r,{color:C(i,y),x0:T-k,x1:T+k,xLabelVal:p?p[h]:y.x,y0:M-k,y1:M+k,yLabelVal:x?x[h]:y.y,cd:f,distance:u,spikeDistance:d,hovertemplate:y.ht});return y.htx?N.text=y.htx:y.tx?N.text=y.tx:i.text&&(N.text=i.text),w.fillText(y,i,N),v.getComponentMethod("errorbars","hoverInfo")(y,i,N),N}Z.exports={hoverPoints:P,calcHover:t}}}),Ob=Ne({"src/traces/scattergl/constants.js"(te,Z){var v=20;Z.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:v,SYMBOL_STROKE:v/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]}}}}),l6=Ne({"src/traces/scattergl/attributes.js"(te,Z){var v=ns(),w=$o(),C=jv(),P=Jc(),t=bc().axisHoverFormat,r=Vu(),a=Sm(),l=co().extendFlat,i=Kc().overrideAll,s=Ob().DASHES,o=P.line,u=P.marker,d=u.line,h=Z.exports=i({x:P.x,x0:P.x0,dx:P.dx,y:P.y,y0:P.y0,dy:P.dy,xperiod:P.xperiod,yperiod:P.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:P.xperiodalignment,yperiodalignment:P.yperiodalignment,xhoverformat:t("x"),yhoverformat:t("y"),text:P.text,hovertext:P.hovertext,textposition:P.textposition,textfont:w({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:o.color,width:o.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:a(s),dflt:"solid"}},marker:l({},r("marker"),{symbol:u.symbol,angle:u.angle,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:l({},r("marker.line"),{width:d.width})}),connectgaps:P.connectgaps,fill:l({},P.fill,{dflt:"none"}),fillcolor:C(),selected:{marker:P.selected.marker,textfont:P.selected.textfont},unselected:{marker:P.unselected.marker,textfont:P.unselected.textfont},opacity:v.opacity},"calc","nested");h.x.editType=h.y.editType=h.x0.editType=h.y0.editType="calc+clearAxisTypes",h.hovertemplate=P.hovertemplate,h.hovertemplatefallback=P.hovertemplatefallback,h.texttemplate=P.texttemplate,h.texttemplatefallback=P.texttemplatefallback}}),ER=Ne({"src/traces/scattergl/helpers.js"(te){var Z=Ob();te.isOpenSymbol=function(v){return typeof v=="string"?Z.OPEN_RE.test(v):v%200>100},te.isDotSymbol=function(v){return typeof v=="string"?Z.DOT_RE.test(v):v>200}}}),zJ=Ne({"src/traces/scattergl/defaults.js"(te,Z){var v=In(),w=Xo(),C=ER(),P=l6(),t=a0(),r=vu(),a=Lm(),l=Rm(),i=xv(),s=Im(),o=ov(),u=Xp();Z.exports=function(h,y,m,E){function c(f,p){return v.coerce(h,y,P,f,p)}var _=h.marker?C.isOpenSymbol(h.marker.symbol):!1,T=r.isBubble(h),M=a(h,y,E,c);if(!M){y.visible=!1;return}l(h,y,E,c),c("xhoverformat"),c("yhoverformat");var k=M<t.PTS_LINESONLY?"lines+markers":"lines";c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback"),c("mode",k),r.hasMarkers(y)&&(i(h,y,m,E,c,{noAngleRef:!0,noStandOff:!0}),c("marker.line.width",_||T?1:0)),r.hasLines(y)&&(c("connectgaps"),s(h,y,m,E,c),c("line.shape")),r.hasText(y)&&(c("texttemplate"),c("texttemplatefallback"),u(h,y,E,c,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var b=(y.line||{}).color,A=(y.marker||{}).color;c("fill"),y.fill!=="none"&&o(h,y,m,c);var g=w.getComponentMethod("errorbars","supplyDefaults");g(h,y,b||A||m,{axis:"y"}),g(h,y,b||A||m,{axis:"x",inherit:"y"}),v.coerceSelectionMarkerOpacity(y,c)}}}),NJ=Ne({"src/traces/scattergl/format_labels.js"(te,Z){var v=sm();Z.exports=function(C,P,t){var r=C.i;return"x"in C||(C.x=P._x[r]),"y"in C||(C.y=P._y[r]),v(C,P,t)}}}),FJ=Ne({"node_modules/binary-search-bounds/search-bounds.js"(te,Z){function v(a,l,i,s,o){for(var u=o+1;s<=o;){var d=s+o>>>1,h=a[d],y=i!==void 0?i(h,l):h-l;y>=0?(u=d,o=d-1):s=d+1}return u}function w(a,l,i,s,o){for(var u=o+1;s<=o;){var d=s+o>>>1,h=a[d],y=i!==void 0?i(h,l):h-l;y>0?(u=d,o=d-1):s=d+1}return u}function C(a,l,i,s,o){for(var u=s-1;s<=o;){var d=s+o>>>1,h=a[d],y=i!==void 0?i(h,l):h-l;y<0?(u=d,s=d+1):o=d-1}return u}function P(a,l,i,s,o){for(var u=s-1;s<=o;){var d=s+o>>>1,h=a[d],y=i!==void 0?i(h,l):h-l;y<=0?(u=d,s=d+1):o=d-1}return u}function t(a,l,i,s,o){for(;s<=o;){var u=s+o>>>1,d=a[u],h=i!==void 0?i(d,l):d-l;if(h===0)return u;h<=0?s=u+1:o=u-1}return-1}function r(a,l,i,s,o,u){return typeof i=="function"?u(a,l,i,s===void 0?0:s|0,o===void 0?a.length-1:o|0):u(a,l,void 0,i===void 0?0:i|0,s===void 0?a.length-1:s|0)}Z.exports={ge:function(a,l,i,s,o){return r(a,l,i,s,o,v)},gt:function(a,l,i,s,o){return r(a,l,i,s,o,w)},lt:function(a,l,i,s,o){return r(a,l,i,s,o,C)},le:function(a,l,i,s,o){return r(a,l,i,s,o,P)},eq:function(a,l,i,s,o){return r(a,l,i,s,o,t)}}}}),n1=Ne({"node_modules/pick-by-alias/index.js"(te,Z){Z.exports=function(P,t,r){var a={},l,i;if(typeof t=="string"&&(t=w(t)),Array.isArray(t)){var s={};for(i=0;i<t.length;i++)s[t[i]]=!0;t=s}for(l in t)t[l]=w(t[l]);var o={};for(l in t){var u=t[l];if(Array.isArray(u))for(i=0;i<u.length;i++){var d=u[i];if(r&&(o[d]=!0),d in P){if(a[l]=P[d],r)for(var h=i;h<u.length;h++)o[u[h]]=!0;break}}else l in P&&(t[l]&&(a[l]=P[l]),r&&(o[l]=!0))}if(r)for(l in P)o[l]||(a[l]=P[l]);return a};var v={};function w(C){return v[C]?v[C]:(typeof C=="string"&&(C=v[C]=C.split(/\s*,\s*|\s+/)),C)}}}),JS=Ne({"node_modules/parse-rect/index.js"(te,Z){var v=n1();Z.exports=w;function w(C){var P;return arguments.length>1&&(C=arguments),typeof C=="string"?C=C.split(/\s/).map(parseFloat):typeof C=="number"&&(C=[C]),C.length&&typeof C[0]=="number"?C.length===1?P={width:C[0],height:C[0],x:0,y:0}:C.length===2?P={width:C[0],height:C[1],x:0,y:0}:P={x:C[0],y:C[1],width:C[2]-C[0]||0,height:C[3]-C[1]||0}:C&&(C=v(C,{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"}),P={x:C.left||0,y:C.top||0},C.width==null?C.right?P.width=C.right-P.x:P.width=0:P.width=C.width,C.height==null?C.bottom?P.height=C.bottom-P.y:P.height=0:P.height=C.height),P}}}),p3=Ne({"node_modules/array-bounds/index.js"(te,Z){Z.exports=v;function v(w,C){if(!w||w.length==null)throw Error("Argument should be an array");C==null?C=1:C=Math.floor(C);for(var P=Array(C*2),t=0;t<C;t++){for(var r=-1/0,a=1/0,l=t,i=w.length;l<i;l+=C)w[l]>r&&(r=w[l]),w[l]<a&&(a=w[l]);P[t]=a,P[C+t]=r}return P}}}),BJ=Ne({"node_modules/defined/index.js"(te,Z){Z.exports=function(){for(var v=0;v<arguments.length;v++)if(arguments[v]!==void 0)return arguments[v]}}}),m3=Ne({"node_modules/flatten-vertex-data/index.js"(te,Z){var v=fR();Z.exports=w;function w(C,P,t){if(!C)throw new TypeError("must specify data as first parameter");if(t=+(t||0)|0,Array.isArray(C)&&C[0]&&typeof C[0][0]=="number"){var r=C[0].length,a=C.length*r,l,i,s,o;(!P||typeof P=="string")&&(P=new(v(P||"float32"))(a+t));var u=P.length-t;if(a!==u)throw new Error("source length "+a+" ("+r+"x"+C.length+") does not match destination length "+u);for(l=0,s=t;l<C.length;l++)for(i=0;i<r;i++)P[s++]=C[l][i]===null?NaN:C[l][i]}else if(!P||typeof P=="string"){var d=v(P||"float32");if(Array.isArray(C)||P==="array")for(P=new d(C.length+t),l=0,s=t,o=P.length;s<o;s++,l++)P[s]=C[l]===null?NaN:C[l];else t===0?P=new d(C):(P=new d(C.length+t),P.set(C,t))}else P.set(C,t);return P}}}),jJ=Ne({"node_modules/is-obj/index.js"(te,Z){Z.exports=function(v){var w=typeof v;return v!==null&&(w==="object"||w==="function")}}}),UJ=Ne({"node_modules/math-log2/index.js"(te,Z){Z.exports=Math.log2||function(v){return Math.log(v)*Math.LOG2E}}}),qJ=Ne({"node_modules/@plotly/point-cluster/quad.js"(te,Z){var v=FJ(),w=a6(),C=JS(),P=p3(),t=n1(),r=BJ(),a=m3(),l=jJ(),i=fR(),s=UJ(),o=1073741824;Z.exports=function(h,y){y||(y={}),h=a(h,"float64"),y=t(y,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let m=r(y.maxDepth,255),E=r(y.bounds,P(h,2));E[0]===E[2]&&E[2]++,E[1]===E[3]&&E[3]++;let c=u(h,E),_=h.length>>>1,T;y.dtype||(y.dtype="array"),typeof y.dtype=="string"?T=new(i(y.dtype))(_):y.dtype&&(T=y.dtype,Array.isArray(T)&&(T.length=_));for(let D=0;D<_;++D)T[D]=D;let M=[],k=[],b=[],A=[];f(0,0,1,T,0,1);let g=0;for(let D=0;D<M.length;D++){let B=M[D];if(T.set)T.set(B,g);else for(let V=0,q=B.length;V<q;V++)T[V+g]=B[V];let U=g+M[D].length;A[D]=[g,U],g=U}return T.range=p,T;function f(D,B,U,V,q,z){if(!V.length)return null;let H=M[q]||(M[q]=[]),G=b[q]||(b[q]=[]),J=k[q]||(k[q]=[]),le=H.length;if(q++,q>m||z>o){for(let pe=0;pe<V.length;pe++)H.push(V[pe]),G.push(z),J.push(null,null,null,null);return le}if(H.push(V[0]),G.push(z),V.length<=1)return J.push(null,null,null,null),le;let ye=U*.5,de=D+ye,me=B+ye,W=[],ie=[],se=[],ee=[];for(let pe=1,oe=V.length;pe<oe;pe++){let Y=V[pe],ce=c[Y*2],ue=c[Y*2+1];ce<de?ue<me?W.push(Y):ie.push(Y):ue<me?se.push(Y):ee.push(Y)}return z<<=2,J.push(f(D,B,ye,W,q,z),f(D,me,ye,ie,q,z+1),f(de,B,ye,se,q,z+2),f(de,me,ye,ee,q,z+3)),le}function p(...D){let B;if(l(D[D.length-1])){let se=D.pop();!D.length&&(se.x!=null||se.l!=null||se.left!=null)&&(D=[se],B={}),B=t(se,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else B={};D.length||(D=E);let U=C(...D),[V,q,z,H]=[Math.min(U.x,U.x+U.width),Math.min(U.y,U.y+U.height),Math.max(U.x,U.x+U.width),Math.max(U.y,U.y+U.height)],[G,J,le,ye]=u([V,q,z,H],E),de=r(B.level,M.length);if(B.d!=null){let se;typeof B.d=="number"?se=[B.d,B.d]:B.d.length&&(se=B.d),de=Math.min(Math.max(Math.ceil(-s(Math.abs(se[0])/(E[2]-E[0]))),Math.ceil(-s(Math.abs(se[1])/(E[3]-E[1])))),de)}if(de=Math.min(de,M.length),B.lod)return x(G,J,le,ye,de);let me=[];W(0,0,1,0,0,1);function W(se,ee,pe,oe,Y,ce){if(Y===null||ce===null)return;let ue=se+pe,_e=ee+pe;if(G>ue||J>_e||le<se||ye<ee||oe>=de||Y===ce)return;let Le=M[oe];ce===void 0&&(ce=Le.length);for(let Fe=Y;Fe<ce;Fe++){let Pe=Le[Fe],be=h[Pe*2],Ye=h[Pe*2+1];be>=V&&be<=z&&Ye>=q&&Ye<=H&&me.push(Pe)}let ze=k[oe],Ge=ze[Y*4+0],Ve=ze[Y*4+1],rt=ze[Y*4+2],pt=ze[Y*4+3],gt=ie(ze,Y+1),ht=pe*.5,lt=oe+1;W(se,ee,ht,lt,Ge,Ve||rt||pt||gt),W(se,ee+ht,ht,lt,Ve,rt||pt||gt),W(se+ht,ee,ht,lt,rt,pt||gt),W(se+ht,ee+ht,ht,lt,pt,gt)}function ie(se,ee){let pe=null,oe=0;for(;pe===null;)if(pe=se[ee*4+oe],oe++,oe>se.length)return null;return pe}return me}function x(D,B,U,V,q){let z=[];for(let H=0;H<q;H++){let G=b[H],J=A[H][0],le=N(D,B,H),ye=N(U,V,H),de=v.ge(G,le),me=v.gt(G,ye,de,G.length-1);z[H]=[de+J,me+J]}return z}function N(D,B,U){let V=1,q=.5,z=.5,H=.5;for(let G=0;G<U;G++)V<<=2,V+=D<q?B<z?0:1:B<z?2:3,H*=.5,q+=D<q?-H:H,z+=B<z?-H:H;return V}};function u(d,h){let[y,m,E,c]=h,_=1/(E-y),T=1/(c-m),M=new Array(d.length);for(let k=0,b=d.length/2;k<b;k++)M[2*k]=w((d[2*k]-y)*_,0,1),M[2*k+1]=w((d[2*k+1]-m)*T,0,1);return M}}}),MR=Ne({"node_modules/@plotly/point-cluster/index.js"(te,Z){Z.exports=qJ()}}),mN=Ne({"node_modules/abs-svg-path/index.js"(te,Z){Z.exports=v;function v(w){var C=0,P=0,t=0,r=0;return w.map(function(a){a=a.slice();var l=a[0],i=l.toUpperCase();if(l!=i)switch(a[0]=i,l){case"a":a[6]+=t,a[7]+=r;break;case"v":a[1]+=r;break;case"h":a[1]+=t;break;default:for(var s=1;s<a.length;)a[s++]+=t,a[s++]+=r}switch(i){case"Z":t=C,r=P;break;case"H":t=a[1];break;case"V":r=a[1];break;case"M":t=C=a[1],r=P=a[2];break;default:t=a[a.length-2],r=a[a.length-1]}return a})}}}),VJ=Ne({"node_modules/svg-arc-to-cubic-bezier/cjs/index.js"(te,Z){Object.defineProperty(te,"__esModule",{value:!0});var v=(function(){function l(i,s){var o=[],u=!0,d=!1,h=void 0;try{for(var y=i[Symbol.iterator](),m;!(u=(m=y.next()).done)&&(o.push(m.value),!(s&&o.length===s));u=!0);}catch(E){d=!0,h=E}finally{try{!u&&y.return&&y.return()}finally{if(d)throw h}}return o}return function(i,s){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return l(i,s);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),w=Math.PI*2,C=function(i,s,o,u,d,h,y){var m=i.x,E=i.y;m*=s,E*=o;var c=u*m-d*E,_=d*m+u*E;return{x:c+h,y:_+y}},P=function(i,s){var o=s===1.5707963267948966?.551915024494:s===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(s/4),u=Math.cos(i),d=Math.sin(i),h=Math.cos(i+s),y=Math.sin(i+s);return[{x:u-d*o,y:d+u*o},{x:h+y*o,y:y-h*o},{x:h,y}]},t=function(i,s,o,u){var d=i*u-s*o<0?-1:1,h=i*o+s*u;return h>1&&(h=1),h<-1&&(h=-1),d*Math.acos(h)},r=function(i,s,o,u,d,h,y,m,E,c,_,T){var M=Math.pow(d,2),k=Math.pow(h,2),b=Math.pow(_,2),A=Math.pow(T,2),g=M*k-M*A-k*b;g<0&&(g=0),g/=M*A+k*b,g=Math.sqrt(g)*(y===m?-1:1);var f=g*d/h*T,p=g*-h/d*_,x=c*f-E*p+(i+o)/2,N=E*f+c*p+(s+u)/2,D=(_-f)/d,B=(T-p)/h,U=(-_-f)/d,V=(-T-p)/h,q=t(1,0,D,B),z=t(D,B,U,V);return m===0&&z>0&&(z-=w),m===1&&z<0&&(z+=w),[x,N,q,z]},a=function(i){var s=i.px,o=i.py,u=i.cx,d=i.cy,h=i.rx,y=i.ry,m=i.xAxisRotation,E=m===void 0?0:m,c=i.largeArcFlag,_=c===void 0?0:c,T=i.sweepFlag,M=T===void 0?0:T,k=[];if(h===0||y===0)return[];var b=Math.sin(E*w/360),A=Math.cos(E*w/360),g=A*(s-u)/2+b*(o-d)/2,f=-b*(s-u)/2+A*(o-d)/2;if(g===0&&f===0)return[];h=Math.abs(h),y=Math.abs(y);var p=Math.pow(g,2)/Math.pow(h,2)+Math.pow(f,2)/Math.pow(y,2);p>1&&(h*=Math.sqrt(p),y*=Math.sqrt(p));var x=r(s,o,u,d,h,y,_,M,b,A,g,f),N=v(x,4),D=N[0],B=N[1],U=N[2],V=N[3],q=Math.abs(V)/(w/4);Math.abs(1-q)<1e-7&&(q=1);var z=Math.max(Math.ceil(q),1);V/=z;for(var H=0;H<z;H++)k.push(P(U,V)),U+=V;return k.map(function(G){var J=C(G[0],h,y,A,b,D,B),le=J.x,ye=J.y,de=C(G[1],h,y,A,b,D,B),me=de.x,W=de.y,ie=C(G[2],h,y,A,b,D,B),se=ie.x,ee=ie.y;return{x1:le,y1:ye,x2:me,y2:W,x:se,y:ee}})};te.default=a,Z.exports=te.default}}),HJ=Ne({"node_modules/svg-path-bounds/node_modules/normalize-svg-path/index.js"(te,Z){Z.exports=w;var v=VJ();function w(t){for(var r,a=[],l=0,i=0,s=0,o=0,u=null,d=null,h=0,y=0,m=0,E=t.length;m<E;m++){var c=t[m],_=c[0];switch(_){case"M":s=c[1],o=c[2];break;case"A":var T=v({px:h,py:y,cx:c[6],cy:c[7],rx:c[1],ry:c[2],xAxisRotation:c[3],largeArcFlag:c[4],sweepFlag:c[5]});if(!T.length)continue;for(var M=0,k;M<T.length;M++)k=T[M],c=["C",k.x1,k.y1,k.x2,k.y2,k.x,k.y],M<T.length-1&&a.push(c);break;case"S":var b=h,A=y;(r=="C"||r=="S")&&(b+=b-l,A+=A-i),c=["C",b,A,c[1],c[2],c[3],c[4]];break;case"T":r=="Q"||r=="T"?(u=h*2-u,d=y*2-d):(u=h,d=y),c=P(h,y,u,d,c[1],c[2]);break;case"Q":u=c[1],d=c[2],c=P(h,y,c[1],c[2],c[3],c[4]);break;case"L":c=C(h,y,c[1],c[2]);break;case"H":c=C(h,y,c[1],y);break;case"V":c=C(h,y,h,c[1]);break;case"Z":c=C(h,y,s,o);break}r=_,h=c[c.length-2],y=c[c.length-1],c.length>4?(l=c[c.length-4],i=c[c.length-3]):(l=h,i=y),a.push(c)}return a}function C(t,r,a,l){return["C",t,r,a,l,a,l]}function P(t,r,a,l,i,s){return["C",t/3+2/3*a,r/3+2/3*l,i/3+2/3*a,s/3+2/3*l,i,s]}}}),yN=Ne({"node_modules/is-svg-path/index.js"(te,Z){Z.exports=function(w){return typeof w!="string"?!1:(w=w.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(w)&&/[\dz]$/i.test(w)&&w.length>4))}}}),GJ=Ne({"node_modules/svg-path-bounds/index.js"(te,Z){var v=by(),w=mN(),C=HJ(),P=yN(),t=c_();Z.exports=r;function r(a){if(Array.isArray(a)&&a.length===1&&typeof a[0]=="string"&&(a=a[0]),typeof a=="string"&&(t(P(a),"String is not an SVG path."),a=v(a)),t(Array.isArray(a),"Argument should be a string or an array of path segments."),a=w(a),a=C(a),!a.length)return[0,0,0,0];for(var l=[1/0,1/0,-1/0,-1/0],i=0,s=a.length;i<s;i++)for(var o=a[i].slice(1),u=0;u<o.length;u+=2)o[u+0]<l[0]&&(l[0]=o[u+0]),o[u+1]<l[1]&&(l[1]=o[u+1]),o[u+0]>l[2]&&(l[2]=o[u+0]),o[u+1]>l[3]&&(l[3]=o[u+1]);return l}}}),XJ=Ne({"node_modules/normalize-svg-path/index.js"(te,Z){var v=Math.PI,w=l(120);Z.exports=C;function C(i){for(var s,o=[],u=0,d=0,h=0,y=0,m=null,E=null,c=0,_=0,T=0,M=i.length;T<M;T++){var k=i[T],b=k[0];switch(b){case"M":h=k[1],y=k[2];break;case"A":k=r(c,_,k[1],k[2],l(k[3]),k[4],k[5],k[6],k[7]),k.unshift("C"),k.length>7&&(o.push(k.splice(0,7)),k.unshift("C"));break;case"S":var A=c,g=_;(s=="C"||s=="S")&&(A+=A-u,g+=g-d),k=["C",A,g,k[1],k[2],k[3],k[4]];break;case"T":s=="Q"||s=="T"?(m=c*2-m,E=_*2-E):(m=c,E=_),k=t(c,_,m,E,k[1],k[2]);break;case"Q":m=k[1],E=k[2],k=t(c,_,k[1],k[2],k[3],k[4]);break;case"L":k=P(c,_,k[1],k[2]);break;case"H":k=P(c,_,k[1],_);break;case"V":k=P(c,_,c,k[1]);break;case"Z":k=P(c,_,h,y);break}s=b,c=k[k.length-2],_=k[k.length-1],k.length>4?(u=k[k.length-4],d=k[k.length-3]):(u=c,d=_),o.push(k)}return o}function P(i,s,o,u){return["C",i,s,o,u,o,u]}function t(i,s,o,u,d,h){return["C",i/3+2/3*o,s/3+2/3*u,d/3+2/3*o,h/3+2/3*u,d,h]}function r(i,s,o,u,d,h,y,m,E,c){if(c)x=c[0],N=c[1],f=c[2],p=c[3];else{var _=a(i,s,-d);i=_.x,s=_.y,_=a(m,E,-d),m=_.x,E=_.y;var T=(i-m)/2,M=(s-E)/2,k=T*T/(o*o)+M*M/(u*u);k>1&&(k=Math.sqrt(k),o=k*o,u=k*u);var b=o*o,A=u*u,g=(h==y?-1:1)*Math.sqrt(Math.abs((b*A-b*M*M-A*T*T)/(b*M*M+A*T*T)));g==1/0&&(g=1);var f=g*o*M/u+(i+m)/2,p=g*-u*T/o+(s+E)/2,x=Math.asin(((s-p)/u).toFixed(9)),N=Math.asin(((E-p)/u).toFixed(9));x=i<f?v-x:x,N=m<f?v-N:N,x<0&&(x=v*2+x),N<0&&(N=v*2+N),y&&x>N&&(x=x-v*2),!y&&N>x&&(N=N-v*2)}if(Math.abs(N-x)>w){var D=N,B=m,U=E;N=x+w*(y&&N>x?1:-1),m=f+o*Math.cos(N),E=p+u*Math.sin(N);var V=r(m,E,o,u,d,0,y,B,U,[N,D,f,p])}var q=Math.tan((N-x)/4),z=4/3*o*q,H=4/3*u*q,G=[2*i-(i+z*Math.sin(x)),2*s-(s-H*Math.cos(x)),m+z*Math.sin(N),E-H*Math.cos(N),m,E];if(c)return G;V&&(G=G.concat(V));for(var J=0;J<G.length;){var le=a(G[J],G[J+1],d);G[J++]=le.x,G[J++]=le.y}return G}function a(i,s,o){return{x:i*Math.cos(o)-s*Math.sin(o),y:i*Math.sin(o)+s*Math.cos(o)}}function l(i){return i*(v/180)}}}),WJ=Ne({"node_modules/draw-svg-path/index.js"(te,Z){var v=mN(),w=XJ(),C={M:"moveTo",C:"bezierCurveTo"};Z.exports=function(P,t){P.beginPath(),w(v(t)).forEach(function(r){var a=r[0],l=r.slice(1);P[C[a]].apply(P,l)}),P.closePath()}}}),YJ=Ne({"node_modules/bitmap-sdf/index.js"(te,Z){var v=a6();Z.exports=C;var w=1e20;function C(r,a){a||(a={});var l=a.cutoff==null?.25:a.cutoff,i=a.radius==null?8:a.radius,s=a.channel||0,o,u,d,h,y,m,E,c,_,T,M;if(ArrayBuffer.isView(r)||Array.isArray(r)){if(!a.width||!a.height)throw Error("For raw data width and height should be provided by options");o=a.width,u=a.height,h=r,a.stride?m=a.stride:m=Math.floor(r.length/o/u)}else window.HTMLCanvasElement&&r instanceof window.HTMLCanvasElement?(c=r,E=c.getContext("2d"),o=c.width,u=c.height,_=E.getImageData(0,0,o,u),h=_.data,m=4):window.CanvasRenderingContext2D&&r instanceof window.CanvasRenderingContext2D?(c=r.canvas,E=r,o=c.width,u=c.height,_=E.getImageData(0,0,o,u),h=_.data,m=4):window.ImageData&&r instanceof window.ImageData&&(_=r,o=r.width,u=r.height,h=_.data,m=4);if(d=Math.max(o,u),window.Uint8ClampedArray&&h instanceof window.Uint8ClampedArray||window.Uint8Array&&h instanceof window.Uint8Array)for(y=h,h=Array(o*u),T=0,M=y.length;T<M;T++)h[T]=y[T*m+s]/255;else if(m!==1)throw Error("Raw data can have only 1 value per pixel");var k=Array(o*u),b=Array(o*u),A=Array(d),g=Array(d),f=Array(d+1),p=Array(d);for(T=0,M=o*u;T<M;T++){var x=h[T];k[T]=x===1?0:x===0?w:Math.pow(Math.max(0,.5-x),2),b[T]=x===1?w:x===0?0:Math.pow(Math.max(0,x-.5),2)}P(k,o,u,A,g,p,f),P(b,o,u,A,g,p,f);var N=window.Float32Array?new Float32Array(o*u):new Array(o*u);for(T=0,M=o*u;T<M;T++)N[T]=v(1-((k[T]-b[T])/i+l),0,1);return N}function P(r,a,l,i,s,o,u){for(var d=0;d<a;d++){for(var h=0;h<l;h++)i[h]=r[h*a+d];for(t(i,s,o,u,l),h=0;h<l;h++)r[h*a+d]=s[h]}for(h=0;h<l;h++){for(d=0;d<a;d++)i[d]=r[h*a+d];for(t(i,s,o,u,a),d=0;d<a;d++)r[h*a+d]=Math.sqrt(s[d])}}function t(r,a,l,i,s){l[0]=0,i[0]=-w,i[1]=+w;for(var o=1,u=0;o<s;o++){for(var d=(r[o]+o*o-(r[l[u]]+l[u]*l[u]))/(2*o-2*l[u]);d<=i[u];)u--,d=(r[o]+o*o-(r[l[u]]+l[u]*l[u]))/(2*o-2*l[u]);u++,l[u]=o,i[u]=d,i[u+1]=+w}for(o=0,u=0;o<s;o++){for(;i[u+1]<o;)u++;a[o]=(o-l[u])*(o-l[u])+r[l[u]]}}}}),ZJ=Ne({"node_modules/svg-path-sdf/index.js"(te,Z){var v=GJ(),w=by(),C=WJ(),P=yN(),t=YJ(),r=document.createElement("canvas"),a=r.getContext("2d");Z.exports=l;function l(o,u){if(!P(o))throw Error("Argument should be valid svg path string");u||(u={});var d,h;u.shape?(d=u.shape[0],h=u.shape[1]):(d=r.width=u.w||u.width||200,h=r.height=u.h||u.height||200);var y=Math.min(d,h),m=u.stroke||0,E=u.viewbox||u.viewBox||v(o),c=[d/(E[2]-E[0]),h/(E[3]-E[1])],_=Math.min(c[0]||0,c[1]||0)/2;if(a.fillStyle="black",a.fillRect(0,0,d,h),a.fillStyle="white",m&&(typeof m!="number"&&(m=1),m>0?a.strokeStyle="white":a.strokeStyle="black",a.lineWidth=Math.abs(m)),a.translate(d*.5,h*.5),a.scale(_,_),s()){var T=new Path2D(o);a.fill(T),m&&a.stroke(T)}else{var M=w(o);C(a,M),a.fill(),m&&a.stroke()}a.setTransform(1,0,0,1,0,0);var k=t(a,{cutoff:u.cutoff!=null?u.cutoff:.5,radius:u.radius!=null?u.radius:y*.5});return k}var i;function s(){if(i!=null)return i;var o=document.createElement("canvas").getContext("2d");if(o.canvas.width=o.canvas.height=1,!window.Path2D)return i=!1;var u=new Path2D("M0,0h1v1h-1v-1Z");o.fillStyle="black",o.fill(u);var d=o.getImageData(0,0,1,1);return i=d&&d.data&&d.data[3]===255}}}),y3=Ne({"src/traces/scattergl/convert.js"(te,Z){var v=la(),w=ZJ(),C=Lb(),P=Xo(),t=In(),r=t.isArrayOrTypedArray,a=zs(),l=Hf(),i=k_().formatColor,s=vu(),o=Mm(),u=ER(),d=Ob(),h=$c().DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},m=_v().appendArrayPointValue;function E(V,q){var z,H={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},G=V._context.plotGlPixelRatio;if(q.visible!==!0)return H;if(s.hasText(q)&&(H.text=c(V,q),H.textSel=k(V,q,q.selected),H.textUnsel=k(V,q,q.unselected)),s.hasMarkers(q)&&(H.marker=T(V,q),H.markerSel=M(V,q,q.selected),H.markerUnsel=M(V,q,q.unselected),!q.unselected&&r(q.marker.opacity))){var J=q.marker.opacity;for(H.markerUnsel.opacity=new Array(J.length),z=0;z<J.length;z++)H.markerUnsel.opacity[z]=h*J[z]}if(s.hasLines(q)){H.line={overlay:!0,thickness:q.line.width*G,color:q.line.color,opacity:q.opacity};var le=(d.DASHES[q.line.dash]||[1]).slice();for(z=0;z<le.length;++z)le[z]*=q.line.width*G;H.line.dashes=le}return q.error_x&&q.error_x.visible&&(H.errorX=b(q,q.error_x,G)),q.error_y&&q.error_y.visible&&(H.errorY=b(q,q.error_y,G)),q.fill&&q.fill!=="none"&&(H.fill={closed:!0,fill:q.fillcolor,thickness:0}),H}function c(V,q){var z=V._fullLayout,H=q._length,G=q.textfont,J=q.textposition,le=r(J)?J:[J],ye=G.color,de=G.size,me=G.family,W=G.weight,ie=G.style,se=G.variant,ee={},pe,oe=V._context.plotGlPixelRatio,Y=q.texttemplate;if(Y){ee.text=[];var ce=z._d3locale,ue=Array.isArray(Y),_e=ue?Math.min(Y.length,H):H,Le=ue?function(gt){return Y[gt]}:function(){return Y};for(pe=0;pe<_e;pe++){var ze={i:pe},Ge=q._module.formatLabels(ze,q,z),Ve={};m(Ve,q,pe),ee.text.push(t.texttemplateString({data:[Ve,ze,q._meta],fallback:q.texttemplatefallback,labels:Ge,locale:ce,template:Le(pe)}))}}else r(q.text)&&q.text.length<H?ee.text=q.text.slice():ee.text=q.text;if(r(ee.text))for(pe=ee.text.length;pe<H;pe++)ee.text[pe]="";for(ee.opacity=q.opacity,ee.font={},ee.align=[],ee.baseline=[],pe=0;pe<le.length;pe++){var rt=le[pe].split(/\s+/);switch(rt[1]){case"left":ee.align.push("right");break;case"right":ee.align.push("left");break;default:ee.align.push(rt[1])}switch(rt[0]){case"top":ee.baseline.push("bottom");break;case"bottom":ee.baseline.push("top");break;default:ee.baseline.push(rt[0])}}if(r(ye))for(ee.color=new Array(H),pe=0;pe<H;pe++)ee.color[pe]=ye[pe];else ee.color=ye;if(r(de)||Array.isArray(me)||r(W)||Array.isArray(ie)||Array.isArray(se))for(ee.font=new Array(H),pe=0;pe<H;pe++){var pt=ee.font[pe]={};pt.size=(t.isTypedArray(de)?de[pe]:r(de)?v(de[pe])?de[pe]:0:de)*oe,pt.family=Array.isArray(me)?me[pe]:me,pt.weight=_(r(W)?W[pe]:W),pt.style=Array.isArray(ie)?ie[pe]:ie,pt.variant=Array.isArray(se)?se[pe]:se}else ee.font={size:de*oe,family:me,weight:_(W),style:ie,variant:se};return ee}function _(V){return V<=1e3?V>500?"bold":"normal":V}function T(V,q){var z=q._length,H=q.marker,G={},J,le=r(H.symbol),ye=r(H.angle),de=r(H.color),me=r(H.line.color),W=r(H.opacity),ie=r(H.size),se=r(H.line.width),ee;if(le||(ee=u.isOpenSymbol(H.symbol)),le||de||me||W||ye){G.symbols=new Array(z),G.angles=new Array(z),G.colors=new Array(z),G.borderColors=new Array(z);var pe=H.symbol,oe=H.angle,Y=i(H,H.opacity,z),ce=i(H.line,H.opacity,z);if(!r(ce[0])){var ue=ce;for(ce=Array(z),J=0;J<z;J++)ce[J]=ue}if(!r(Y[0])){var _e=Y;for(Y=Array(z),J=0;J<z;J++)Y[J]=_e}if(!r(pe)){var Le=pe;for(pe=Array(z),J=0;J<z;J++)pe[J]=Le}if(!r(oe)){var ze=oe;for(oe=Array(z),J=0;J<z;J++)oe[J]=ze}for(G.symbols=pe,G.angles=oe,G.colors=Y,G.borderColors=ce,J=0;J<z;J++)le&&(ee=u.isOpenSymbol(H.symbol[J])),ee&&(ce[J]=Y[J].slice(),Y[J]=Y[J].slice(),Y[J][3]=0);for(G.opacity=q.opacity,G.markers=new Array(z),J=0;J<z;J++)G.markers[J]=N({mx:G.symbols[J],ma:G.angles[J]},q)}else ee?(G.color=C(H.color,"uint8"),G.color[3]=0,G.borderColor=C(H.color,"uint8")):(G.color=C(H.color,"uint8"),G.borderColor=C(H.line.color,"uint8")),G.opacity=q.opacity*H.opacity,G.marker=N({mx:H.symbol,ma:H.angle},q);var Ge=1,Ve=o(q,Ge),rt;if(ie||se){var pt=G.sizes=new Array(z),gt=G.borderSizes=new Array(z),ht=0,lt;if(ie){for(J=0;J<z;J++)pt[J]=Ve(H.size[J]),ht+=pt[J];lt=ht/z}else for(rt=Ve(H.size),J=0;J<z;J++)pt[J]=rt;if(se)for(J=0;J<z;J++)gt[J]=H.line.width[J];else for(rt=H.line.width,J=0;J<z;J++)gt[J]=rt;G.sizeAvg=lt}else G.size=Ve(H&&H.size||10),G.borderSizes=Ve(H.line.width);return G}function M(V,q,z){var H=q.marker,G={};return z&&(z.marker&&z.marker.symbol?G=T(V,t.extendFlat({},H,z.marker)):z.marker&&(z.marker.size&&(G.size=z.marker.size),z.marker.color&&(G.colors=z.marker.color),z.marker.opacity!==void 0&&(G.opacity=z.marker.opacity))),G}function k(V,q,z){var H={};if(!z)return H;if(z.textfont){var G={opacity:1,text:q.text,texttemplate:q.texttemplate,textposition:q.textposition,textfont:t.extendFlat({},q.textfont)};z.textfont&&t.extendFlat(G.textfont,z.textfont),H=c(V,G)}return H}function b(V,q,z){var H={capSize:q.width*2*z,lineWidth:q.thickness*z,color:q.color};return q.copy_ystyle&&(H=V.error_y),H}var A=d.SYMBOL_SDF_SIZE,g=d.SYMBOL_SIZE,f=d.SYMBOL_STROKE,p={},x=a.symbolFuncs[0](g*.05);function N(V,q){var z=V.mx;if(z==="circle")return null;var H,G,J=a.symbolNumber(z),le=a.symbolFuncs[J%100],ye=!!a.symbolNoDot[J%100],de=!!a.symbolNoFill[J%100],me=u.isDotSymbol(z);if(V.ma&&(z+="_"+V.ma),p[z])return p[z];var W=a.getMarkerAngle(V,q);return me&&!ye?H=le(g*1.1,W)+x:H=le(g,W),G=w(H,{w:A,h:A,viewBox:[-g,-g,g,g],stroke:de?f:-f}),p[z]=G,G||null}function D(V,q,z){var H=z.length,G=H/2,J,le;if(s.hasLines(q)&&G)if(q.line.shape==="hv"){for(J=[],le=0;le<G-1;le++)isNaN(z[le*2])||isNaN(z[le*2+1])?J.push(NaN,NaN,NaN,NaN):(J.push(z[le*2],z[le*2+1]),!isNaN(z[le*2+2])&&!isNaN(z[le*2+3])?J.push(z[le*2+2],z[le*2+1]):J.push(NaN,NaN));J.push(z[H-2],z[H-1])}else if(q.line.shape==="hvh"){for(J=[],le=0;le<G-1;le++)if(isNaN(z[le*2])||isNaN(z[le*2+1])||isNaN(z[le*2+2])||isNaN(z[le*2+3]))!isNaN(z[le*2])&&!isNaN(z[le*2+1])?J.push(z[le*2],z[le*2+1]):J.push(NaN,NaN),J.push(NaN,NaN);else{var ye=(z[le*2]+z[le*2+2])/2;J.push(z[le*2],z[le*2+1],ye,z[le*2+1],ye,z[le*2+3])}J.push(z[H-2],z[H-1])}else if(q.line.shape==="vhv"){for(J=[],le=0;le<G-1;le++)if(isNaN(z[le*2])||isNaN(z[le*2+1])||isNaN(z[le*2+2])||isNaN(z[le*2+3]))!isNaN(z[le*2])&&!isNaN(z[le*2+1])?J.push(z[le*2],z[le*2+1]):J.push(NaN,NaN),J.push(NaN,NaN);else{var de=(z[le*2+1]+z[le*2+3])/2;J.push(z[le*2],z[le*2+1],z[le*2],de,z[le*2+2],de)}J.push(z[H-2],z[H-1])}else if(q.line.shape==="vh"){for(J=[],le=0;le<G-1;le++)isNaN(z[le*2])||isNaN(z[le*2+1])?J.push(NaN,NaN,NaN,NaN):(J.push(z[le*2],z[le*2+1]),!isNaN(z[le*2+2])&&!isNaN(z[le*2+3])?J.push(z[le*2],z[le*2+3]):J.push(NaN,NaN));J.push(z[H-2],z[H-1])}else J=z;var me=!1;for(le=0;le<J.length;le++)if(isNaN(J[le])){me=!0;break}var W=me||J.length>d.TOO_MANY_POINTS||s.hasMarkers(q)?"rect":"round";if(me&&q.connectgaps){var ie=J[0],se=J[1];for(le=0;le<J.length;le+=2)isNaN(J[le])||isNaN(J[le+1])?(J[le]=ie,J[le+1]=se):(ie=J[le],se=J[le+1])}return{join:W,positions:J}}function B(V,q,z,H,G){var J=P.getComponentMethod("errorbars","makeComputeError"),le=l.getFromId(V,q.xaxis,"x"),ye=l.getFromId(V,q.yaxis,"y"),de=z.length/2,me={};function W(ie,se){var ee=se._id.charAt(0),pe=q["error_"+ee];if(pe&&pe.visible&&(se.type==="linear"||se.type==="log")){for(var oe=J(pe),Y={x:0,y:1}[ee],ce={x:[0,1,2,3],y:[2,3,0,1]}[ee],ue=new Float64Array(4*de),_e=1/0,Le=-1/0,ze=0,Ge=0;ze<de;ze++,Ge+=4){var Ve=ie[ze];if(v(Ve)){var rt=z[ze*2+Y],pt=oe(Ve,ze),gt=pt[0],ht=pt[1];if(v(gt)&&v(ht)){var lt=Ve-gt,Fe=Ve+ht;ue[Ge+ce[0]]=rt-se.c2l(lt),ue[Ge+ce[1]]=se.c2l(Fe)-rt,ue[Ge+ce[2]]=0,ue[Ge+ce[3]]=0,_e=Math.min(_e,Ve-gt),Le=Math.max(Le,Ve+ht)}}}me[ee]={positions:z,errors:ue,_bnds:[_e,Le]}}}return W(H,le),W(G,ye),me}function U(V,q,z,H){var G=q._length,J={},le;if(s.hasMarkers(q)){var ye=z.font,de=z.align,me=z.baseline;for(J.offset=new Array(G),le=0;le<G;le++){var W=H.sizes?H.sizes[le]:H.size,ie=r(ye)?ye[le].size:ye.size,se=r(de)?de.length>1?de[le]:de[0]:de,ee=r(me)?me.length>1?me[le]:me[0]:me,pe=y[se],oe=y[ee],Y=W?W/.8+1:0,ce=-oe*Y-oe*.5;J.offset[le]=[pe*Y/ie,ce/ie]}}return J}Z.exports={style:E,markerStyle:T,markerSelection:M,linePositions:D,errorBarPositions:B,textPosition:U}}}),gN=Ne({"src/traces/scattergl/scene_update.js"(te,Z){var v=In();Z.exports=function(C,P){var t=P._scene,r={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 P._scene||(t=P._scene={},t.init=function(){v.extendFlat(t,a,r)},t.init(),t.update=function(i){var s=v.repeat(i,t.count);if(t.fill2d&&t.fill2d.update(s),t.scatter2d&&t.scatter2d.update(s),t.line2d&&t.line2d.update(s),t.error2d&&t.error2d.update(s.concat(s)),t.select2d&&t.select2d.update(s),t.glText)for(var o=0;o<t.count;o++)t.glText[o].update(i)},t.draw=function(){for(var i=t.count,s=t.fill2d,o=t.error2d,u=t.line2d,d=t.scatter2d,h=t.glText,y=t.select2d,m=t.selectBatch,E=t.unselectBatch,c=0;c<i;c++){if(s&&t.fillOrder[c]&&s.draw(t.fillOrder[c]),u&&t.lineOptions[c]&&u.draw(c),o&&(t.errorXOptions[c]&&o.draw(c),t.errorYOptions[c]&&o.draw(c+i)),d&&t.markerOptions[c])if(E[c].length){var _=v.repeat([],t.count);_[c]=E[c],d.draw(_)}else m[c].length||d.draw(c);h[c]&&t.textOptions[c]&&h[c].render()}y&&y.draw(m),t.dirty=!1},t.destroy=function(){t.fill2d&&t.fill2d.destroy&&t.fill2d.destroy(),t.scatter2d&&t.scatter2d.destroy&&t.scatter2d.destroy(),t.error2d&&t.error2d.destroy&&t.error2d.destroy(),t.line2d&&t.line2d.destroy&&t.line2d.destroy(),t.select2d&&t.select2d.destroy&&t.select2d.destroy(),t.glText&&t.glText.forEach(function(i){i.destroy&&i.destroy()}),t.lineOptions=null,t.fillOptions=null,t.markerOptions=null,t.markerSelectedOptions=null,t.markerUnselectedOptions=null,t.errorXOptions=null,t.errorYOptions=null,t.textOptions=null,t.textSelectedOptions=null,t.textUnselectedOptions=null,t.selectBatch=null,t.unselectBatch=null,P._scene=null}),t.dirty||v.extendFlat(t,r),t}}}),$J=Ne({"src/traces/scattergl/calc.js"(te,Z){var v=MR(),w=In(),C=Hf(),P=Cm().findExtremes,t=Dm(),r=Uv(),a=r.calcMarkerSize,l=r.calcAxisExpansion,i=r.setFirstScatter,s=Wp(),o=y3(),u=gN(),d=ja().BADNUM,h=Ob().TOO_MANY_POINTS;Z.exports=function(c,_){var T=c._fullLayout,M=_._xA=C.getFromId(c,_.xaxis,"x"),k=_._yA=C.getFromId(c,_.yaxis,"y"),b=T._plots[_.xaxis+_.yaxis],A=_._length,g=A>=h,f=A*2,p={},x,N=M.makeCalcdata(_,"x"),D=k.makeCalcdata(_,"y"),B=t(_,M,"x",N),U=t(_,k,"y",D),V=B.vals,q=U.vals;_._x=V,_._y=q,_.xperiodalignment&&(_._origX=N,_._xStarts=B.starts,_._xEnds=B.ends),_.yperiodalignment&&(_._origY=D,_._yStarts=U.starts,_._yEnds=U.ends);var z=new Array(f),H=new Array(A);for(x=0;x<A;x++)z[x*2]=V[x]===d?NaN:V[x],z[x*2+1]=q[x]===d?NaN:q[x],H[x]=x;if(M.type==="log")for(x=0;x<f;x+=2)z[x]=M.c2l(z[x]);if(k.type==="log")for(x=1;x<f;x+=2)z[x]=k.c2l(z[x]);g&&M.type!=="log"&&k.type!=="log"?p.tree=v(z):p.ids=H,s(c,_);var G=m(c,b,_,z,V,q),J=u(c,b);i(T,_);var le;return g?G.marker&&(le=G.marker.sizeAvg||Math.max(G.marker.size,3)):le=a(_,A),l(c,_,M,k,V,q,le),G.errorX&&y(_,M,G.errorX),G.errorY&&y(_,k,G.errorY),G.fill&&!J.fill2d&&(J.fill2d=!0),G.marker&&!J.scatter2d&&(J.scatter2d=!0),G.line&&!J.line2d&&(J.line2d=!0),(G.errorX||G.errorY)&&!J.error2d&&(J.error2d=!0),G.text&&!J.glText&&(J.glText=!0),G.marker&&(G.marker.snap=A),J.lineOptions.push(G.line),J.errorXOptions.push(G.errorX),J.errorYOptions.push(G.errorY),J.fillOptions.push(G.fill),J.markerOptions.push(G.marker),J.markerSelectedOptions.push(G.markerSel),J.markerUnselectedOptions.push(G.markerUnsel),J.textOptions.push(G.text),J.textSelectedOptions.push(G.textSel),J.textUnselectedOptions.push(G.textUnsel),J.selectBatch.push([]),J.unselectBatch.push([]),p._scene=J,p.index=J.count,p.x=V,p.y=q,p.positions=z,J.count++,[{x:!1,y:!1,t:p,trace:_}]};function y(E,c,_){var T=E._extremes[c._id],M=P(c,_._bnds,{padded:!0});T.min=T.min.concat(M.min),T.max=T.max.concat(M.max)}function m(E,c,_,T,M,k){var b=o.style(E,_);if(b.marker&&(b.marker.positions=T),b.line&&T.length>1&&w.extendFlat(b.line,o.linePositions(E,_,T)),b.errorX||b.errorY){var A=o.errorBarPositions(E,_,T,M,k);b.errorX&&w.extendFlat(b.errorX,A.x),b.errorY&&w.extendFlat(b.errorY,A.y)}return b.text&&(w.extendFlat(b.text,{positions:T},o.textPosition(E,_,b.text,b.marker)),w.extendFlat(b.textSel,{positions:T},o.textPosition(E,_,b.text,b.markerSel)),w.extendFlat(b.textUnsel,{positions:T},o.textPosition(E,_,b.text,b.markerUnsel))),b}}}),_N=Ne({"src/traces/scattergl/edit_style.js"(te,Z){var v=In(),w=io(),C=$c().DESELECTDIM;function P(t){var r=t[0],a=r.trace,l=r.t,i=l._scene,s=l.index,o=i.selectBatch[s],u=i.unselectBatch[s],d=i.textOptions[s],h=i.textSelectedOptions[s]||{},y=i.textUnselectedOptions[s]||{},m=v.extendFlat({},d),E,c;if(o.length||u.length){var _=h.color,T=y.color,M=d.color,k=v.isArrayOrTypedArray(M);for(m.color=new Array(a._length),E=0;E<o.length;E++)c=o[E],m.color[c]=_||(k?M[c]:M);for(E=0;E<u.length;E++){c=u[E];var b=k?M[c]:M;m.color[c]=T||(_?b:w.addOpacity(b,C))}}i.glText[s].update(m)}Z.exports={styleTextSelection:P}}}),xN=Ne({"src/traces/scattergl/select.js"(te,Z){var v=vu(),w=_N().styleTextSelection;Z.exports=function(P,t){var r=P.cd,a=P.xaxis,l=P.yaxis,i=[],s=r[0].trace,o=r[0].t,u=s._length,d=o.x,h=o.y,y=o._scene,m=o.index;if(!y)return i;var E=v.hasText(s),c=v.hasMarkers(s),_=!c&&!E;if(s.visible!==!0||_)return i;var T=[],M=[];if(t!==!1&&!t.degenerate)for(var k=0;k<u;k++)t.contains([o.xpx[k],o.ypx[k]],!1,k,P)?(T.push(k),i.push({pointNumber:k,x:a.c2d(d[k]),y:l.c2d(h[k])})):M.push(k);if(c){var b=y.scatter2d;if(!T.length&&!M.length){var A=new Array(y.count);A[m]=y.markerOptions[m],b.update.apply(b,A)}else if(!y.selectBatch[m].length&&!y.unselectBatch[m].length){var g=new Array(y.count);g[m]=y.markerUnselectedOptions[m],b.update.apply(b,g)}}return y.selectBatch[m]=T,y.unselectBatch[m]=M,E&&w(r),i}}}),KJ=Ne({"src/traces/scattergl/base_index.js"(te,Z){var v=SR();Z.exports={moduleType:"trace",name:"scattergl",basePlotModule:Lh(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:l6(),supplyDefaults:zJ(),crossTraceDefaults:My(),colorbar:ah(),formatLabels:NJ(),calc:$J(),hoverPoints:v.hoverPoints,selectPoints:xN(),meta:{}}}}),JJ=Ne({"node_modules/color-id/index.js"(te,Z){var v=a6();Z.exports=w,Z.exports.to=w,Z.exports.from=C;function w(P,t){t==null&&(t=!0);var r=P[0],a=P[1],l=P[2],i=P[3];i==null&&(i=t?1:255),t&&(r*=255,a*=255,l*=255,i*=255),r=v(r,0,255)&255,a=v(a,0,255)&255,l=v(l,0,255)&255,i=v(i,0,255)&255;var s=r*16777216+(a<<16)+(l<<8)+i;return s}function C(P,t){P=+P;var r=P>>>24,a=(P&16711680)>>>16,l=(P&65280)>>>8,i=P&255;return t===!1?[r,a,l,i]:[r/255,a/255,l/255,i/255]}}}),qd=Ne({"node_modules/object-assign/index.js"(te,Z){var v=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;function P(r){if(r==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(r)}function t(){try{if(!Object.assign)return!1;var r=new String("abc");if(r[5]="de",Object.getOwnPropertyNames(r)[0]==="5")return!1;for(var a={},l=0;l<10;l++)a["_"+String.fromCharCode(l)]=l;var i=Object.getOwnPropertyNames(a).map(function(o){return a[o]});if(i.join("")!=="0123456789")return!1;var s={};return"abcdefghijklmnopqrst".split("").forEach(function(o){s[o]=o}),Object.keys(Object.assign({},s)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Z.exports=t()?Object.assign:function(r,a){for(var l,i=P(r),s,o=1;o<arguments.length;o++){l=Object(arguments[o]);for(var u in l)w.call(l,u)&&(i[u]=l[u]);if(v){s=v(l);for(var d=0;d<s.length;d++)C.call(l,s[d])&&(i[s[d]]=l[s[d]])}}return i}}}),QJ=Ne({"node_modules/glslify/browser.js"(te,Z){Z.exports=function(v){typeof v=="string"&&(v=[v]);for(var w=[].slice.call(arguments,1),C=[],P=0;P<v.length-1;P++)C.push(v[P],w[P]||"");return C.push(v[P]),C.join("")}}}),bN=Ne({"node_modules/update-diff/index.js"(te,Z){Z.exports=function(w,C,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var t=0,r=P.length;t<r;t++){var a=P[t];for(var l in a)if(!(C[l]!==void 0&&!Array.isArray(C[l])&&w[l]===C[l])&&l in C){var i;if(a[l]===!0)i=C[l];else{if(a[l]===!1)continue;if(typeof a[l]=="function"&&(i=a[l](C[l],w,C),i===void 0))continue}w[l]=i}}return w}}}),eQ=Ne({"node_modules/is-iexplorer/index.js"(te,Z){Z.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),CR=Ne({"node_modules/to-float32/index.js"(te,Z){Z.exports=C,Z.exports.float32=Z.exports.float=C,Z.exports.fract32=Z.exports.fract=w;var v=new Float32Array(1);function w(P,t){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);t instanceof Float32Array||(t=C(P));for(var r=0,a=t.length;r<a;r++)t[r]=P[r]-t[r];return t}return C(P-C(P))}function C(P){return P.length?P instanceof Float32Array?P:new Float32Array(P):(v[0]=P,v[0])}}}),wN=Ne({"node_modules/regl-scatter2d/bundle.js"(te,Z){function v(p,x){var N=p==null?null:typeof Symbol<"u"&&p[Symbol.iterator]||p["@@iterator"];if(N!=null){var D,B,U,V,q=[],z=!0,H=!1;try{if(U=(N=N.call(p)).next,x!==0)for(;!(z=(D=U.call(N)).done)&&(q.push(D.value),q.length!==x);z=!0);}catch(G){H=!0,B=G}finally{try{if(!z&&N.return!=null&&(V=N.return(),Object(V)!==V))return}finally{if(H)throw B}}return q}}function w(p,x){return t(p)||v(p,x)||a(p,x)||s()}function C(p){return P(p)||r(p)||a(p)||i()}function P(p){if(Array.isArray(p))return l(p)}function t(p){if(Array.isArray(p))return p}function r(p){if(typeof Symbol<"u"&&p[Symbol.iterator]!=null||p["@@iterator"]!=null)return Array.from(p)}function a(p,x){if(p){if(typeof p=="string")return l(p,x);var N=Object.prototype.toString.call(p).slice(8,-1);if(N==="Object"&&p.constructor&&(N=p.constructor.name),N==="Map"||N==="Set")return Array.from(p);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return l(p,x)}}function l(p,x){(x==null||x>p.length)&&(x=p.length);for(var N=0,D=new Array(x);N<x;N++)D[N]=p[N];return D}function i(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=Lb(),u=p3(),d=JJ(),h=MR(),y=qd(),m=QJ(),E=n1(),c=bN(),_=m3(),T=eQ(),M=CR(),k=JS(),b=A;function A(p,x){var N=this;if(!(this instanceof A))return new A(p,x);typeof p=="function"?(x||(x={}),x.regl=p):(x=p,p=null),x&&x.length&&(x.positions=x),p=x.regl;var D=p._gl,B,U=[],V={},q=[],z=[null],H=[null],G=255,J=100;this.tooManyColors=T,B=p.texture({data:new Uint8Array(G*4),width:G,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),y(this,{regl:p,gl:D,groups:q,markerCache:H,markerTextures:z,palette:U,paletteIds:V,paletteTexture:B,maxColors:G,maxSize:J,canvas:D.canvas}),this.update(x);var le={uniforms:{constPointSize:!!x.constPointSize,opacity:p.prop("opacity"),paletteSize:function(W,ie){return[N.tooManyColors?0:G,B.height]},pixelRatio:p.context("pixelRatio"),scale:p.prop("scale"),scaleFract:p.prop("scaleFract"),translate:p.prop("translate"),translateFract:p.prop("translateFract"),markerTexture:p.prop("markerTexture"),paletteTexture:B},attributes:{x:function(W,ie){return ie.xAttr||{buffer:ie.positionBuffer,stride:8,offset:0}},y:function(W,ie){return ie.yAttr||{buffer:ie.positionBuffer,stride:8,offset:4}},xFract:function(W,ie){return ie.xAttr?{constant:[0,0]}:{buffer:ie.positionFractBuffer,stride:8,offset:0}},yFract:function(W,ie){return ie.yAttr?{constant:[0,0]}:{buffer:ie.positionFractBuffer,stride:8,offset:4}},size:function(W,ie){return ie.size.length?{buffer:ie.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(ie.size*255/N.maxSize)]}},borderSize:function(W,ie){return ie.borderSize.length?{buffer:ie.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(ie.borderSize*255/N.maxSize)]}},colorId:function(W,ie){return ie.color.length?{buffer:ie.colorBuffer,stride:N.tooManyColors?8:4,offset:0}:{constant:N.tooManyColors?U.slice(ie.color*4,ie.color*4+4):[ie.color]}},borderColorId:function(W,ie){return ie.borderColor.length?{buffer:ie.colorBuffer,stride:N.tooManyColors?8:4,offset:N.tooManyColors?4:2}:{constant:N.tooManyColors?U.slice(ie.borderColor*4,ie.borderColor*4+4):[ie.borderColor]}},isActive:function(W,ie){return ie.activation===!0?{constant:[1]}:ie.activation?ie.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:p.prop("viewport")},viewport:p.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:p.prop("elements"),count:p.prop("count"),offset:p.prop("offset"),primitive:"points"},ye=y({},le);ye.frag=m([`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;
  }

}
`]),ye.vert=m([`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=p(ye);var de=y({},le);de.frag=m([`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;
}
`]),de.vert=m([`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;
}
`]),T&&(de.frag=de.frag.replace("smoothstep","smoothStep"),ye.frag=ye.frag.replace("smoothstep","smoothStep")),this.drawCircle=p(de)}A.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},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var p=this,x=arguments.length,N=new Array(x),D=0;D<x;D++)N[D]=arguments[D];var B=this.groups;if(N.length===1&&Array.isArray(N[0])&&(N[0][0]===null||Array.isArray(N[0][0]))&&(N=N[0]),this.regl._refresh(),N.length)for(var U=0;U<N.length;U++)this.drawItem(U,N[U]);else B.forEach(function(V,q){p.drawItem(q)});return this},A.prototype.drawItem=function(p,x){var N=this.groups,D=N[p];if(typeof x=="number"&&(p=x,D=N[x],x=null),!!(D&&D.count&&D.opacity)){D.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,D,x));for(var B=[],U=1;U<D.activation.length;U++)!D.activation[U]||D.activation[U]!==!0&&!D.activation[U].data.length||B.push.apply(B,C(this.getMarkerDrawOptions(U,D,x)));B.length&&this.drawMarker(B)}},A.prototype.getMarkerDrawOptions=function(p,x,N){var D=x.range,B=x.tree,U=x.viewport,V=x.activation,q=x.selectionBuffer,z=x.count;if(this.regl,!B)return N?[y({},x,{markerTexture:this.markerTextures[p],activation:V[p],count:N.length,elements:N,offset:0})]:[y({},x,{markerTexture:this.markerTextures[p],activation:V[p],offset:0})];var H=[],G=B.range(D,{lod:!0,px:[(D[2]-D[0])/U.width,(D[3]-D[1])/U.height]});if(N){for(var J=V[p],le=J.data,ye=new Uint8Array(z),de=0;de<N.length;de++){var me=N[de];ye[me]=le?le[me]:1}q.subdata(ye)}for(var W=G.length;W--;){var ie=w(G[W],2),se=ie[0],ee=ie[1];H.push(y({},x,{markerTexture:this.markerTextures[p],activation:N?q:V[p],offset:se,count:ee-se}))}return H},A.prototype.update=function(){for(var p=this,x=arguments.length,N=new Array(x),D=0;D<x;D++)N[D]=arguments[D];if(N.length){N.length===1&&Array.isArray(N[0])&&(N=N[0]);var B=this.groups,U=this.gl,V=this.regl,q=this.maxSize,z=this.maxColors,H=this.palette;this.groups=B=N.map(function(G,J){var le=B[J];if(G===void 0)return le;G===null?G={positions:null}:typeof G=="function"?G={ondraw:G}:typeof G[0]=="number"&&(G={positions:G}),G=E(G,{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"}),G.positions===null&&(G.positions=[]),G.tooManyColors!=null&&(p.tooManyColors=G.tooManyColors),le||(B[J]=le={id:J,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:V.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:V.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},G=y({},A.defaults,G)),G.positions&&!("marker"in G)&&(G.marker=le.marker,delete le.marker),G.marker&&!("positions"in G)&&(G.positions=le.positions,delete le.positions);var ye=0,de=0;if(c(le,G,[{snap:!0,size:function(ht,lt){return ht==null&&(ht=A.defaults.size),ye+=ht&&ht.length?1:0,ht},borderSize:function(ht,lt){return ht==null&&(ht=A.defaults.borderSize),ye+=ht&&ht.length?1:0,ht},opacity:parseFloat,color:function(ht,lt){return ht==null&&(ht=A.defaults.color),ht=p.updateColor(ht),de++,ht},borderColor:function(ht,lt){return ht==null&&(ht=A.defaults.borderColor),ht=p.updateColor(ht),de++,ht},bounds:function(ht,lt,Fe){return"range"in Fe||(Fe.range=null),ht},positions:function(ht,lt,Fe){var Pe=lt.snap,be=lt.positionBuffer,Ye=lt.positionFractBuffer,mt=lt.selectionBuffer;if(ht.x||ht.y)return ht.x.length?lt.xAttr={buffer:V.buffer(ht.x),offset:0,stride:4,count:ht.x.length}:lt.xAttr={buffer:ht.x.buffer,offset:ht.x.offset*4||0,stride:(ht.x.stride||1)*4,count:ht.x.count},ht.y.length?lt.yAttr={buffer:V.buffer(ht.y),offset:0,stride:4,count:ht.y.length}:lt.yAttr={buffer:ht.y.buffer,offset:ht.y.offset*4||0,stride:(ht.y.stride||1)*4,count:ht.y.count},lt.count=Math.max(lt.xAttr.count,lt.yAttr.count),ht;ht=_(ht,"float64");var bt=lt.count=Math.floor(ht.length/2),ft=lt.bounds=bt?u(ht,2):null;if(!Fe.range&&!lt.range&&(delete lt.range,Fe.range=ft),!Fe.marker&&!lt.marker&&(delete lt.marker,Fe.marker=null),Pe&&(Pe===!0||bt>Pe)?lt.tree=h(ht,{bounds:ft}):Pe&&Pe.length&&(lt.tree=Pe),lt.tree){var Wt={primitive:"points",usage:"static",data:lt.tree,type:"uint32"};lt.elements?lt.elements(Wt):lt.elements=V.elements(Wt)}var Zt=M.float32(ht);be({data:Zt,usage:"dynamic"});var cr=M.fract32(ht,Zt);return Ye({data:cr,usage:"dynamic"}),mt({data:new Uint8Array(bt),type:"uint8",usage:"stream"}),ht}},{marker:function(ht,lt,Fe){var Pe=lt.activation;if(Pe.forEach(function(cr){return cr&&cr.destroy&&cr.destroy()}),Pe.length=0,!ht||typeof ht[0]=="number"){var be=p.addMarker(ht);Pe[be]=!0}else{for(var Ye=[],mt=0,bt=Math.min(ht.length,lt.count);mt<bt;mt++){var ft=p.addMarker(ht[mt]);Ye[ft]||(Ye[ft]=new Uint8Array(lt.count)),Ye[ft][mt]=1}for(var Wt=0;Wt<Ye.length;Wt++)if(Ye[Wt]){var Zt={data:Ye[Wt],type:"uint8",usage:"static"};Pe[Wt]?Pe[Wt](Zt):Pe[Wt]=V.buffer(Zt),Pe[Wt].data=Ye[Wt]}}return ht},range:function(ht,lt,Fe){var Pe=lt.bounds;if(Pe)return ht||(ht=Pe),lt.scale=[1/(ht[2]-ht[0]),1/(ht[3]-ht[1])],lt.translate=[-ht[0],-ht[1]],lt.scaleFract=M.fract(lt.scale),lt.translateFract=M.fract(lt.translate),ht},viewport:function(ht){var lt=k(ht||[U.drawingBufferWidth,U.drawingBufferHeight]);return lt}}]),ye){var me=le,W=me.count,ie=me.size,se=me.borderSize,ee=me.sizeBuffer,pe=new Uint8Array(W*2);if(ie.length||se.length)for(var oe=0;oe<W;oe++)pe[oe*2]=Math.round((ie[oe]==null?ie:ie[oe])*255/q),pe[oe*2+1]=Math.round((se[oe]==null?se:se[oe])*255/q);ee({data:pe,usage:"dynamic"})}if(de){var Y=le,ce=Y.count,ue=Y.color,_e=Y.borderColor,Le=Y.colorBuffer,ze;if(p.tooManyColors){if(ue.length||_e.length){ze=new Uint8Array(ce*8);for(var Ge=0;Ge<ce;Ge++){var Ve=ue[Ge];ze[Ge*8]=H[Ve*4],ze[Ge*8+1]=H[Ve*4+1],ze[Ge*8+2]=H[Ve*4+2],ze[Ge*8+3]=H[Ve*4+3];var rt=_e[Ge];ze[Ge*8+4]=H[rt*4],ze[Ge*8+5]=H[rt*4+1],ze[Ge*8+6]=H[rt*4+2],ze[Ge*8+7]=H[rt*4+3]}}}else if(ue.length||_e.length){ze=new Uint8Array(ce*4+2);for(var pt=0;pt<ce;pt++)ue[pt]!=null&&(ze[pt*4]=ue[pt]%z,ze[pt*4+1]=Math.floor(ue[pt]/z)),_e[pt]!=null&&(ze[pt*4+2]=_e[pt]%z,ze[pt*4+3]=Math.floor(_e[pt]/z))}Le({data:ze||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return le})}},A.prototype.addMarker=function(p){var x=this.markerTextures,N=this.regl,D=this.markerCache,B=p==null?0:D.indexOf(p);if(B>=0)return B;var U;if(p instanceof Uint8Array||p instanceof Uint8ClampedArray)U=p;else{U=new Uint8Array(p.length);for(var V=0,q=p.length;V<q;V++)U[V]=p[V]*255}var z=Math.floor(Math.sqrt(U.length));return B=x.length,D.push(p),x.push(N.texture({channels:1,data:U,radius:z,mag:"linear",min:"linear"})),B},A.prototype.updateColor=function(p){var x=this.paletteIds,N=this.palette,D=this.maxColors;Array.isArray(p)||(p=[p]);var B=[];if(typeof p[0]=="number"){var U=[];if(Array.isArray(p))for(var V=0;V<p.length;V+=4)U.push(p.slice(V,V+4));else for(var q=0;q<p.length;q+=4)U.push(p.subarray(q,q+4));p=U}for(var z=0;z<p.length;z++){var H=p[z];H=o(H,"uint8");var G=d(H,!1);if(x[G]==null){var J=N.length;x[G]=Math.floor(J/4),N[J]=H[0],N[J+1]=H[1],N[J+2]=H[2],N[J+3]=H[3]}B[z]=x[G]}return!this.tooManyColors&&N.length>D*4&&(this.tooManyColors=!0),this.updatePalette(N),B.length===1?B[0]:B},A.prototype.updatePalette=function(p){if(!this.tooManyColors){var x=this.maxColors,N=this.paletteTexture,D=Math.ceil(p.length*.25/x);if(D>1){p=p.slice();for(var B=p.length*.25%x;B<D*x;B++)p.push(0,0,0,0)}N.height<D&&N.resize(x,D),N.subimage({width:Math.min(p.length*.25,x),height:D,data:p},0,0)}},A.prototype.destroy=function(){return this.groups.forEach(function(p){p.sizeBuffer.destroy(),p.positionBuffer.destroy(),p.positionFractBuffer.destroy(),p.colorBuffer.destroy(),p.activation.forEach(function(x){return x&&x.destroy&&x.destroy()}),p.selectionBuffer.destroy(),p.elements&&p.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(p){return p&&p.destroy&&p.destroy()}),this};var g=qd(),f=function(x,N){var D=new b(x,N),B=D.render.bind(D);return g(B,{render:B,update:D.update.bind(D),draw:D.draw.bind(D),destroy:D.destroy.bind(D),regl:D.regl,gl:D.gl,canvas:D.gl.canvas,groups:D.groups,markers:D.markerCache,palette:D.palette}),B};Z.exports=f}}),tQ=Ne({"node_modules/earcut/src/earcut.js"(te,Z){Z.exports=v,Z.exports.default=v;function v(V,q,z){z=z||2;var H=q&&q.length,G=H?q[0]*z:V.length,J=w(V,0,G,z,!0),le=[];if(!J||J.next===J.prev)return le;var ye,de,me,W,ie,se,ee;if(H&&(J=i(V,q,J,z)),V.length>80*z){ye=me=V[0],de=W=V[1];for(var pe=z;pe<G;pe+=z)ie=V[pe],se=V[pe+1],ie<ye&&(ye=ie),se<de&&(de=se),ie>me&&(me=ie),se>W&&(W=se);ee=Math.max(me-ye,W-de),ee=ee!==0?32767/ee:0}return P(J,le,z,ye,de,ee,0),le}function w(V,q,z,H,G){var J,le;if(G===U(V,q,z,H)>0)for(J=q;J<z;J+=H)le=N(J,V[J],V[J+1],le);else for(J=z-H;J>=q;J-=H)le=N(J,V[J],V[J+1],le);return le&&M(le,le.next)&&(D(le),le=le.next),le}function C(V,q){if(!V)return V;q||(q=V);var z=V,H;do if(H=!1,!z.steiner&&(M(z,z.next)||T(z.prev,z,z.next)===0)){if(D(z),z=q=z.prev,z===z.next)break;H=!0}else z=z.next;while(H||z!==q);return q}function P(V,q,z,H,G,J,le){if(V){!le&&J&&h(V,H,G,J);for(var ye=V,de,me;V.prev!==V.next;){if(de=V.prev,me=V.next,J?r(V,H,G,J):t(V)){q.push(de.i/z|0),q.push(V.i/z|0),q.push(me.i/z|0),D(V),V=me.next,ye=me.next;continue}if(V=me,V===ye){le?le===1?(V=a(C(V),q,z),P(V,q,z,H,G,J,2)):le===2&&l(V,q,z,H,G,J):P(C(V),q,z,H,G,J,1);break}}}}function t(V){var q=V.prev,z=V,H=V.next;if(T(q,z,H)>=0)return!1;for(var G=q.x,J=z.x,le=H.x,ye=q.y,de=z.y,me=H.y,W=G<J?G<le?G:le:J<le?J:le,ie=ye<de?ye<me?ye:me:de<me?de:me,se=G>J?G>le?G:le:J>le?J:le,ee=ye>de?ye>me?ye:me:de>me?de:me,pe=H.next;pe!==q;){if(pe.x>=W&&pe.x<=se&&pe.y>=ie&&pe.y<=ee&&c(G,ye,J,de,le,me,pe.x,pe.y)&&T(pe.prev,pe,pe.next)>=0)return!1;pe=pe.next}return!0}function r(V,q,z,H){var G=V.prev,J=V,le=V.next;if(T(G,J,le)>=0)return!1;for(var ye=G.x,de=J.x,me=le.x,W=G.y,ie=J.y,se=le.y,ee=ye<de?ye<me?ye:me:de<me?de:me,pe=W<ie?W<se?W:se:ie<se?ie:se,oe=ye>de?ye>me?ye:me:de>me?de:me,Y=W>ie?W>se?W:se:ie>se?ie:se,ce=m(ee,pe,q,z,H),ue=m(oe,Y,q,z,H),_e=V.prevZ,Le=V.nextZ;_e&&_e.z>=ce&&Le&&Le.z<=ue;){if(_e.x>=ee&&_e.x<=oe&&_e.y>=pe&&_e.y<=Y&&_e!==G&&_e!==le&&c(ye,W,de,ie,me,se,_e.x,_e.y)&&T(_e.prev,_e,_e.next)>=0||(_e=_e.prevZ,Le.x>=ee&&Le.x<=oe&&Le.y>=pe&&Le.y<=Y&&Le!==G&&Le!==le&&c(ye,W,de,ie,me,se,Le.x,Le.y)&&T(Le.prev,Le,Le.next)>=0))return!1;Le=Le.nextZ}for(;_e&&_e.z>=ce;){if(_e.x>=ee&&_e.x<=oe&&_e.y>=pe&&_e.y<=Y&&_e!==G&&_e!==le&&c(ye,W,de,ie,me,se,_e.x,_e.y)&&T(_e.prev,_e,_e.next)>=0)return!1;_e=_e.prevZ}for(;Le&&Le.z<=ue;){if(Le.x>=ee&&Le.x<=oe&&Le.y>=pe&&Le.y<=Y&&Le!==G&&Le!==le&&c(ye,W,de,ie,me,se,Le.x,Le.y)&&T(Le.prev,Le,Le.next)>=0)return!1;Le=Le.nextZ}return!0}function a(V,q,z){var H=V;do{var G=H.prev,J=H.next.next;!M(G,J)&&k(G,H,H.next,J)&&f(G,J)&&f(J,G)&&(q.push(G.i/z|0),q.push(H.i/z|0),q.push(J.i/z|0),D(H),D(H.next),H=V=J),H=H.next}while(H!==V);return C(H)}function l(V,q,z,H,G,J){var le=V;do{for(var ye=le.next.next;ye!==le.prev;){if(le.i!==ye.i&&_(le,ye)){var de=x(le,ye);le=C(le,le.next),de=C(de,de.next),P(le,q,z,H,G,J,0),P(de,q,z,H,G,J,0);return}ye=ye.next}le=le.next}while(le!==V)}function i(V,q,z,H){var G=[],J,le,ye,de,me;for(J=0,le=q.length;J<le;J++)ye=q[J]*H,de=J<le-1?q[J+1]*H:V.length,me=w(V,ye,de,H,!1),me===me.next&&(me.steiner=!0),G.push(E(me));for(G.sort(s),J=0;J<G.length;J++)z=o(G[J],z);return z}function s(V,q){return V.x-q.x}function o(V,q){var z=u(V,q);if(!z)return q;var H=x(z,V);return C(H,H.next),C(z,z.next)}function u(V,q){var z=q,H=V.x,G=V.y,J=-1/0,le;do{if(G<=z.y&&G>=z.next.y&&z.next.y!==z.y){var ye=z.x+(G-z.y)*(z.next.x-z.x)/(z.next.y-z.y);if(ye<=H&&ye>J&&(J=ye,le=z.x<z.next.x?z:z.next,ye===H))return le}z=z.next}while(z!==q);if(!le)return null;var de=le,me=le.x,W=le.y,ie=1/0,se;z=le;do H>=z.x&&z.x>=me&&H!==z.x&&c(G<W?H:J,G,me,W,G<W?J:H,G,z.x,z.y)&&(se=Math.abs(G-z.y)/(H-z.x),f(z,V)&&(se<ie||se===ie&&(z.x>le.x||z.x===le.x&&d(le,z)))&&(le=z,ie=se)),z=z.next;while(z!==de);return le}function d(V,q){return T(V.prev,V,q.prev)<0&&T(q.next,V,V.next)<0}function h(V,q,z,H){var G=V;do G.z===0&&(G.z=m(G.x,G.y,q,z,H)),G.prevZ=G.prev,G.nextZ=G.next,G=G.next;while(G!==V);G.prevZ.nextZ=null,G.prevZ=null,y(G)}function y(V){var q,z,H,G,J,le,ye,de,me=1;do{for(z=V,V=null,J=null,le=0;z;){for(le++,H=z,ye=0,q=0;q<me&&(ye++,H=H.nextZ,!!H);q++);for(de=me;ye>0||de>0&&H;)ye!==0&&(de===0||!H||z.z<=H.z)?(G=z,z=z.nextZ,ye--):(G=H,H=H.nextZ,de--),J?J.nextZ=G:V=G,G.prevZ=J,J=G;z=H}J.nextZ=null,me*=2}while(le>1);return V}function m(V,q,z,H,G){return V=(V-z)*G|0,q=(q-H)*G|0,V=(V|V<<8)&16711935,V=(V|V<<4)&252645135,V=(V|V<<2)&858993459,V=(V|V<<1)&1431655765,q=(q|q<<8)&16711935,q=(q|q<<4)&252645135,q=(q|q<<2)&858993459,q=(q|q<<1)&1431655765,V|q<<1}function E(V){var q=V,z=V;do(q.x<z.x||q.x===z.x&&q.y<z.y)&&(z=q),q=q.next;while(q!==V);return z}function c(V,q,z,H,G,J,le,ye){return(G-le)*(q-ye)>=(V-le)*(J-ye)&&(V-le)*(H-ye)>=(z-le)*(q-ye)&&(z-le)*(J-ye)>=(G-le)*(H-ye)}function _(V,q){return V.next.i!==q.i&&V.prev.i!==q.i&&!g(V,q)&&(f(V,q)&&f(q,V)&&p(V,q)&&(T(V.prev,V,q.prev)||T(V,q.prev,q))||M(V,q)&&T(V.prev,V,V.next)>0&&T(q.prev,q,q.next)>0)}function T(V,q,z){return(q.y-V.y)*(z.x-q.x)-(q.x-V.x)*(z.y-q.y)}function M(V,q){return V.x===q.x&&V.y===q.y}function k(V,q,z,H){var G=A(T(V,q,z)),J=A(T(V,q,H)),le=A(T(z,H,V)),ye=A(T(z,H,q));return!!(G!==J&&le!==ye||G===0&&b(V,z,q)||J===0&&b(V,H,q)||le===0&&b(z,V,H)||ye===0&&b(z,q,H))}function b(V,q,z){return q.x<=Math.max(V.x,z.x)&&q.x>=Math.min(V.x,z.x)&&q.y<=Math.max(V.y,z.y)&&q.y>=Math.min(V.y,z.y)}function A(V){return V>0?1:V<0?-1:0}function g(V,q){var z=V;do{if(z.i!==V.i&&z.next.i!==V.i&&z.i!==q.i&&z.next.i!==q.i&&k(z,z.next,V,q))return!0;z=z.next}while(z!==V);return!1}function f(V,q){return T(V.prev,V,V.next)<0?T(V,q,V.next)>=0&&T(V,V.prev,q)>=0:T(V,q,V.prev)<0||T(V,V.next,q)<0}function p(V,q){var z=V,H=!1,G=(V.x+q.x)/2,J=(V.y+q.y)/2;do z.y>J!=z.next.y>J&&z.next.y!==z.y&&G<(z.next.x-z.x)*(J-z.y)/(z.next.y-z.y)+z.x&&(H=!H),z=z.next;while(z!==V);return H}function x(V,q){var z=new B(V.i,V.x,V.y),H=new B(q.i,q.x,q.y),G=V.next,J=q.prev;return V.next=q,q.prev=V,z.next=G,G.prev=z,H.next=z,z.prev=H,J.next=H,H.prev=J,H}function N(V,q,z,H){var G=new B(V,q,z);return H?(G.next=H.next,G.prev=H,H.next.prev=G,H.next=G):(G.prev=G,G.next=G),G}function D(V){V.next.prev=V.prev,V.prev.next=V.next,V.prevZ&&(V.prevZ.nextZ=V.nextZ),V.nextZ&&(V.nextZ.prevZ=V.prevZ)}function B(V,q,z){this.i=V,this.x=q,this.y=z,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(V,q,z,H){var G=q&&q.length,J=G?q[0]*z:V.length,le=Math.abs(U(V,0,J,z));if(G)for(var ye=0,de=q.length;ye<de;ye++){var me=q[ye]*z,W=ye<de-1?q[ye+1]*z:V.length;le-=Math.abs(U(V,me,W,z))}var ie=0;for(ye=0;ye<H.length;ye+=3){var se=H[ye]*z,ee=H[ye+1]*z,pe=H[ye+2]*z;ie+=Math.abs((V[se]-V[pe])*(V[ee+1]-V[se+1])-(V[se]-V[ee])*(V[pe+1]-V[se+1]))}return le===0&&ie===0?0:Math.abs((ie-le)/le)};function U(V,q,z,H){for(var G=0,J=q,le=z-H;J<z;J+=H)G+=(V[le]-V[J])*(V[J+1]+V[le+1]),le=J;return G}v.flatten=function(V){for(var q=V[0][0].length,z={vertices:[],holes:[],dimensions:q},H=0,G=0;G<V.length;G++){for(var J=0;J<V[G].length;J++)for(var le=0;le<q;le++)z.vertices.push(V[G][J][le]);G>0&&(H+=V[G-1].length,z.holes.push(H))}return z}}}),rQ=Ne({"node_modules/array-normalize/index.js"(te,Z){var v=p3();Z.exports=w;function w(C,P,t){if(!C||C.length==null)throw Error("Argument should be an array");P==null&&(P=1),t==null&&(t=v(C,P));for(var r=0;r<P;r++){var a=t[P+r],l=t[r],i=r,s=C.length;if(a===1/0&&l===-1/0)for(i=r;i<s;i+=P)C[i]=C[i]===a?1:C[i]===l?0:.5;else if(a===1/0)for(i=r;i<s;i+=P)C[i]=C[i]===a?1:0;else if(l===-1/0)for(i=r;i<s;i+=P)C[i]=C[i]===l?0:1;else{var o=a-l;for(i=r;i<s;i+=P)isNaN(C[i])||(C[i]=o===0?.5:(C[i]-l)/o)}}return C}}}),nQ=Ne({"node_modules/es6-weak-map/is-implemented.js"(te,Z){Z.exports=function(){var v,w;if(typeof WeakMap!="function")return!1;try{v=new WeakMap([[w={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return!(String(v)!=="[object WeakMap]"||typeof v.set!="function"||v.set({},1)!==v||typeof v.delete!="function"||typeof v.has!="function"||v.get(w)!=="one")}}}),aQ=Ne({"node_modules/es5-ext/function/noop.js"(te,Z){Z.exports=function(){}}}),zb=Ne({"node_modules/es5-ext/object/is-value.js"(te,Z){var v=aQ()();Z.exports=function(w){return w!==v&&w!==null}}}),TN=Ne({"node_modules/es5-ext/object/set-prototype-of/is-implemented.js"(te,Z){var v=Object.create,w=Object.getPrototypeOf,C={};Z.exports=function(){var P=Object.setPrototypeOf,t=arguments[0]||v;return typeof P!="function"?!1:w(P(t(null),C))===C}}}),AN=Ne({"node_modules/es5-ext/object/is-object.js"(te,Z){var v=zb(),w={function:!0,object:!0};Z.exports=function(C){return v(C)&&w[typeof C]||!1}}}),P_=Ne({"node_modules/es5-ext/object/valid-value.js"(te,Z){var v=zb();Z.exports=function(w){if(!v(w))throw new TypeError("Cannot use null or undefined");return w}}}),iQ=Ne({"node_modules/es5-ext/object/create.js"(te,Z){var v=Object.create,w;TN()()||(w=SN()),Z.exports=(function(){var C,P,t;return!w||w.level!==1?v:(C={},P={},t={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(r){if(r==="__proto__"){P[r]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}P[r]=t}),Object.defineProperties(C,P),Object.defineProperty(w,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:C}),function(r,a){return v(r===null?C:r,a)})})()}}),SN=Ne({"node_modules/es5-ext/object/set-prototype-of/shim.js"(te,Z){var v=AN(),w=P_(),C=Object.prototype.isPrototypeOf,P=Object.defineProperty,t={configurable:!0,enumerable:!1,writable:!0,value:void 0},r;r=function(a,l){if(w(a),l===null||v(l))return a;throw new TypeError("Prototype must be null or an object")},Z.exports=(function(a){var l,i;return a?(a.level===2?a.set?(i=a.set,l=function(s,o){return i.call(r(s,o),o),s}):l=function(s,o){return r(s,o).__proto__=o,s}:l=function s(o,u){var d;return r(o,u),d=C.call(s.nullPolyfill,o),d&&delete s.nullPolyfill.__proto__,u===null&&(u=s.nullPolyfill),o.__proto__=u,d&&P(s.nullPolyfill,"__proto__",t),o},Object.defineProperty(l,"level",{configurable:!1,enumerable:!1,writable:!1,value:a.level})):null})((function(){var a=Object.create(null),l={},i,s=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(s){try{i=s.set,i.call(a,l)}catch{}if(Object.getPrototypeOf(a)===l)return{set:i,level:2}}return a.__proto__=l,Object.getPrototypeOf(a)===l?{level:2}:(a={},a.__proto__=l,Object.getPrototypeOf(a)===l?{level:1}:!1)})()),iQ()}}),kR=Ne({"node_modules/es5-ext/object/set-prototype-of/index.js"(te,Z){Z.exports=TN()()?Object.setPrototypeOf:SN()}}),oQ=Ne({"node_modules/es5-ext/object/valid-object.js"(te,Z){var v=AN();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not an Object");return w}}}),sQ=Ne({"node_modules/es5-ext/string/random-uniq.js"(te,Z){var v=Object.create(null),w=Math.random;Z.exports=function(){var C;do C=w().toString(36).slice(2);while(v[C]);return C}}}),g3=Ne({"node_modules/type/value/is.js"(te,Z){var v=void 0;Z.exports=function(w){return w!==v&&w!==null}}}),PR=Ne({"node_modules/type/object/is.js"(te,Z){var v=g3(),w={object:!0,function:!0,undefined:!0};Z.exports=function(C){return v(C)?hasOwnProperty.call(w,typeof C):!1}}}),lQ=Ne({"node_modules/type/prototype/is.js"(te,Z){var v=PR();Z.exports=function(w){if(!v(w))return!1;try{return w.constructor?w.constructor.prototype===w:!1}catch{return!1}}}}),uQ=Ne({"node_modules/type/function/is.js"(te,Z){var v=lQ();Z.exports=function(w){if(typeof w!="function"||!hasOwnProperty.call(w,"length"))return!1;try{if(typeof w.length!="number"||typeof w.call!="function"||typeof w.apply!="function")return!1}catch{return!1}return!v(w)}}}),EN=Ne({"node_modules/type/plain-function/is.js"(te,Z){var v=uQ(),w=/^\s*class[\s{/}]/,C=Function.prototype.toString;Z.exports=function(P){return!(!v(P)||w.test(C.call(P)))}}}),cQ=Ne({"node_modules/es5-ext/object/assign/is-implemented.js"(te,Z){Z.exports=function(){var v=Object.assign,w;return typeof v!="function"?!1:(w={foo:"raz"},v(w,{bar:"dwa"},{trzy:"trzy"}),w.foo+w.bar+w.trzy==="razdwatrzy")}}}),fQ=Ne({"node_modules/es5-ext/object/keys/is-implemented.js"(te,Z){Z.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}}}),hQ=Ne({"node_modules/es5-ext/object/keys/shim.js"(te,Z){var v=zb(),w=Object.keys;Z.exports=function(C){return w(v(C)?Object(C):C)}}}),dQ=Ne({"node_modules/es5-ext/object/keys/index.js"(te,Z){Z.exports=fQ()()?Object.keys:hQ()}}),vQ=Ne({"node_modules/es5-ext/object/assign/shim.js"(te,Z){var v=dQ(),w=P_(),C=Math.max;Z.exports=function(P,t){var r,a,l=C(arguments.length,2),i;for(P=Object(w(P)),i=function(s){try{P[s]=t[s]}catch(o){r||(r=o)}},a=1;a<l;++a)t=arguments[a],v(t).forEach(i);if(r!==void 0)throw r;return P}}}),LR=Ne({"node_modules/es5-ext/object/assign/index.js"(te,Z){Z.exports=cQ()()?Object.assign:vQ()}}),MN=Ne({"node_modules/es5-ext/object/normalize-options.js"(te,Z){var v=zb(),w=Array.prototype.forEach,C=Object.create,P=function(t,r){var a;for(a in t)r[a]=t[a]};Z.exports=function(t){var r=C(null);return w.call(arguments,function(a){v(a)&&P(Object(a),r)}),r}}}),pQ=Ne({"node_modules/es5-ext/string/#/contains/is-implemented.js"(te,Z){var v="razdwatrzy";Z.exports=function(){return typeof v.contains!="function"?!1:v.contains("dwa")===!0&&v.contains("foo")===!1}}}),mQ=Ne({"node_modules/es5-ext/string/#/contains/shim.js"(te,Z){var v=String.prototype.indexOf;Z.exports=function(w){return v.call(this,w,arguments[1])>-1}}}),CN=Ne({"node_modules/es5-ext/string/#/contains/index.js"(te,Z){Z.exports=pQ()()?String.prototype.contains:mQ()}}),L_=Ne({"node_modules/d/index.js"(te,Z){var v=g3(),w=EN(),C=LR(),P=MN(),t=CN(),r=Z.exports=function(a,l){var i,s,o,u,d;return arguments.length<2||typeof a!="string"?(u=l,l=a,a=null):u=arguments[2],v(a)?(i=t.call(a,"c"),s=t.call(a,"e"),o=t.call(a,"w")):(i=o=!0,s=!1),d={value:l,configurable:i,enumerable:s,writable:o},u?C(P(u),d):d};r.gs=function(a,l,i){var s,o,u,d;return typeof a!="string"?(u=i,i=l,l=a,a=null):u=arguments[3],v(l)?w(l)?v(i)?w(i)||(u=i,i=void 0):i=void 0:(u=l,l=i=void 0):l=void 0,v(a)?(s=t.call(a,"c"),o=t.call(a,"e")):(s=!0,o=!1),d={get:l,set:i,configurable:s,enumerable:o},u?C(P(u),d):d}}}),u6=Ne({"node_modules/es5-ext/function/is-arguments.js"(te,Z){var v=Object.prototype.toString,w=v.call((function(){return arguments})());Z.exports=function(C){return v.call(C)===w}}}),c6=Ne({"node_modules/es5-ext/string/is-string.js"(te,Z){var v=Object.prototype.toString,w=v.call("");Z.exports=function(C){return typeof C=="string"||C&&typeof C=="object"&&(C instanceof String||v.call(C)===w)||!1}}}),yQ=Ne({"node_modules/ext/global-this/is-implemented.js"(te,Z){Z.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),gQ=Ne({"node_modules/ext/global-this/implementation.js"(te,Z){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};Z.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}})()}}),f6=Ne({"node_modules/ext/global-this/index.js"(te,Z){Z.exports=yQ()()?globalThis:gQ()}}),_Q=Ne({"node_modules/es6-symbol/is-implemented.js"(te,Z){var v=f6(),w={object:!0,symbol:!0};Z.exports=function(){var C=v.Symbol,P;if(typeof C!="function")return!1;P=C("test symbol");try{String(P)}catch{return!1}return!(!w[typeof C.iterator]||!w[typeof C.toPrimitive]||!w[typeof C.toStringTag])}}}),xQ=Ne({"node_modules/es6-symbol/is-symbol.js"(te,Z){Z.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),kN=Ne({"node_modules/es6-symbol/validate-symbol.js"(te,Z){var v=xQ();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not a symbol");return w}}}),bQ=Ne({"node_modules/es6-symbol/lib/private/generate-name.js"(te,Z){var v=L_(),w=Object.create,C=Object.defineProperty,P=Object.prototype,t=w(null);Z.exports=function(r){for(var a=0,l,i;t[r+(a||"")];)++a;return r+=a||"",t[r]=!0,l="@@"+r,C(P,l,v.gs(null,function(s){i||(i=!0,C(this,l,v(s)),i=!1)})),l}}}),wQ=Ne({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(te,Z){var v=L_(),w=f6().Symbol;Z.exports=function(C){return Object.defineProperties(C,{hasInstance:v("",w&&w.hasInstance||C("hasInstance")),isConcatSpreadable:v("",w&&w.isConcatSpreadable||C("isConcatSpreadable")),iterator:v("",w&&w.iterator||C("iterator")),match:v("",w&&w.match||C("match")),replace:v("",w&&w.replace||C("replace")),search:v("",w&&w.search||C("search")),species:v("",w&&w.species||C("species")),split:v("",w&&w.split||C("split")),toPrimitive:v("",w&&w.toPrimitive||C("toPrimitive")),toStringTag:v("",w&&w.toStringTag||C("toStringTag")),unscopables:v("",w&&w.unscopables||C("unscopables"))})}}}),TQ=Ne({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(te,Z){var v=L_(),w=kN(),C=Object.create(null);Z.exports=function(P){return Object.defineProperties(P,{for:v(function(t){return C[t]?C[t]:C[t]=P(String(t))}),keyFor:v(function(t){var r;w(t);for(r in C)if(C[r]===t)return r})})}}}),AQ=Ne({"node_modules/es6-symbol/polyfill.js"(te,Z){var v=L_(),w=kN(),C=f6().Symbol,P=bQ(),t=wQ(),r=TQ(),a=Object.create,l=Object.defineProperties,i=Object.defineProperty,s,o,u;if(typeof C=="function")try{String(C()),u=!0}catch{}else C=null;o=function(h){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return s(h)},Z.exports=s=function d(h){var y;if(this instanceof d)throw new TypeError("Symbol is not a constructor");return u?C(h):(y=a(o.prototype),h=h===void 0?"":String(h),l(y,{__description__:v("",h),__name__:v("",P(h))}))},t(s),r(s),l(o.prototype,{constructor:v(s),toString:v("",function(){return this.__name__})}),l(s.prototype,{toString:v(function(){return"Symbol ("+w(this).__description__+")"}),valueOf:v(function(){return w(this)})}),i(s.prototype,s.toPrimitive,v("",function(){var d=w(this);return typeof d=="symbol"?d:d.toString()})),i(s.prototype,s.toStringTag,v("c","Symbol")),i(o.prototype,s.toStringTag,v("c",s.prototype[s.toStringTag])),i(o.prototype,s.toPrimitive,v("c",s.prototype[s.toPrimitive]))}}),Nb=Ne({"node_modules/es6-symbol/index.js"(te,Z){Z.exports=_Q()()?f6().Symbol:AQ()}}),SQ=Ne({"node_modules/es5-ext/array/#/clear.js"(te,Z){var v=P_();Z.exports=function(){return v(this).length=0,this}}}),QS=Ne({"node_modules/es5-ext/object/valid-callable.js"(te,Z){Z.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),EQ=Ne({"node_modules/type/string/coerce.js"(te,Z){var v=g3(),w=PR(),C=Object.prototype.toString;Z.exports=function(P){if(!v(P))return null;if(w(P)){var t=P.toString;if(typeof t!="function"||t===C)return null}try{return""+P}catch{return null}}}}),MQ=Ne({"node_modules/type/lib/safe-to-string.js"(te,Z){Z.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),CQ=Ne({"node_modules/type/lib/to-short-string.js"(te,Z){var v=MQ(),w=/[\n\r\u2028\u2029]/g;Z.exports=function(C){var P=v(C);return P===null?"<Non-coercible to string value>":(P.length>100&&(P=P.slice(0,99)+"…"),P=P.replace(w,function(t){switch(t){case`
`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),P)}}}),PN=Ne({"node_modules/type/lib/resolve-exception.js"(te,Z){var v=g3(),w=PR(),C=EQ(),P=CQ(),t=function(r,a){return r.replace("%v",P(a))};Z.exports=function(r,a,l){if(!w(l))throw new TypeError(t(a,r));if(!v(r)){if("default"in l)return l.default;if(l.isOptional)return null}var i=C(l.errorMessage);throw v(i)||(i=a),new TypeError(t(i,r))}}}),kQ=Ne({"node_modules/type/value/ensure.js"(te,Z){var v=PN(),w=g3();Z.exports=function(C){return w(C)?C:v(C,"Cannot use %v",arguments[1])}}}),PQ=Ne({"node_modules/type/plain-function/ensure.js"(te,Z){var v=PN(),w=EN();Z.exports=function(C){return w(C)?C:v(C,"%v is not a plain function",arguments[1])}}}),LQ=Ne({"node_modules/es5-ext/array/from/is-implemented.js"(te,Z){Z.exports=function(){var v=Array.from,w,C;return typeof v!="function"?!1:(w=["raz","dwa"],C=v(w),!!(C&&C!==w&&C[1]==="dwa"))}}}),RQ=Ne({"node_modules/es5-ext/function/is-function.js"(te,Z){var v=Object.prototype.toString,w=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);Z.exports=function(C){return typeof C=="function"&&w(v.call(C))}}}),IQ=Ne({"node_modules/es5-ext/math/sign/is-implemented.js"(te,Z){Z.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),DQ=Ne({"node_modules/es5-ext/math/sign/shim.js"(te,Z){Z.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),OQ=Ne({"node_modules/es5-ext/math/sign/index.js"(te,Z){Z.exports=IQ()()?Math.sign:DQ()}}),zQ=Ne({"node_modules/es5-ext/number/to-integer.js"(te,Z){var v=OQ(),w=Math.abs,C=Math.floor;Z.exports=function(P){return isNaN(P)?0:(P=Number(P),P===0||!isFinite(P)?P:v(P)*C(w(P)))}}}),NQ=Ne({"node_modules/es5-ext/number/to-pos-integer.js"(te,Z){var v=zQ(),w=Math.max;Z.exports=function(C){return w(0,v(C))}}}),FQ=Ne({"node_modules/es5-ext/array/from/shim.js"(te,Z){var v=Nb().iterator,w=u6(),C=RQ(),P=NQ(),t=QS(),r=P_(),a=zb(),l=c6(),i=Array.isArray,s=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},u=Object.defineProperty;Z.exports=function(d){var h=arguments[1],y=arguments[2],m,E,c,_,T,M,k,b,A,g;if(d=Object(r(d)),a(h)&&t(h),!this||this===Array||!C(this)){if(!h){if(w(d))return T=d.length,T!==1?Array.apply(null,d):(_=new Array(1),_[0]=d[0],_);if(i(d)){for(_=new Array(T=d.length),E=0;E<T;++E)_[E]=d[E];return _}}_=[]}else m=this;if(!i(d)){if((A=d[v])!==void 0){for(k=t(A).call(d),m&&(_=new m),b=k.next(),E=0;!b.done;)g=h?s.call(h,y,b.value,E):b.value,m?(o.value=g,u(_,E,o)):_[E]=g,b=k.next(),++E;T=E}else if(l(d)){for(T=d.length,m&&(_=new m),E=0,c=0;E<T;++E)g=d[E],E+1<T&&(M=g.charCodeAt(0),M>=55296&&M<=56319&&(g+=d[++E])),g=h?s.call(h,y,g,c):g,m?(o.value=g,u(_,c,o)):_[c]=g,++c;T=c}}if(T===void 0)for(T=P(d.length),m&&(_=new m(T)),E=0;E<T;++E)g=h?s.call(h,y,d[E],E):d[E],m?(o.value=g,u(_,E,o)):_[E]=g;return m&&(o.value=null,_.length=T),_}}}),BQ=Ne({"node_modules/es5-ext/array/from/index.js"(te,Z){Z.exports=LQ()()?Array.from:FQ()}}),jQ=Ne({"node_modules/es5-ext/object/copy.js"(te,Z){var v=BQ(),w=LR(),C=P_();Z.exports=function(P){var t=Object(C(P)),r=arguments[1],a=Object(arguments[2]);if(t!==P&&!r)return t;var l={};return r?v(r,function(i){(a.ensure||i in P)&&(l[i]=P[i])}):w(l,P),l}}}),UQ=Ne({"node_modules/es5-ext/object/_iterate.js"(te,Z){var v=QS(),w=P_(),C=Function.prototype.bind,P=Function.prototype.call,t=Object.keys,r=Object.prototype.propertyIsEnumerable;Z.exports=function(a,l){return function(i,s){var o,u=arguments[2],d=arguments[3];return i=Object(w(i)),v(s),o=t(i),d&&o.sort(typeof d=="function"?C.call(d,i):void 0),typeof a!="function"&&(a=o[a]),P.call(a,o,function(h,y){return r.call(i,h)?P.call(s,u,i[h],h,i,y):l})}}}}),qQ=Ne({"node_modules/es5-ext/object/for-each.js"(te,Z){Z.exports=UQ()("forEach")}}),VQ=Ne({"node_modules/es5-ext/object/map.js"(te,Z){var v=QS(),w=qQ(),C=Function.prototype.call;Z.exports=function(P,t){var r={},a=arguments[2];return v(t),w(P,function(l,i,s,o){r[i]=C.call(t,a,l,i,s,o)}),r}}}),HQ=Ne({"node_modules/d/auto-bind.js"(te,Z){var v=g3(),w=kQ(),C=PQ(),P=jQ(),t=MN(),r=VQ(),a=Function.prototype.bind,l=Object.defineProperty,i=Object.prototype.hasOwnProperty,s;s=function(o,u,d){var h=w(u)&&C(u.value),y;return y=P(u),delete y.writable,delete y.value,y.get=function(){return!d.overwriteDefinition&&i.call(this,o)?h:(u.value=a.call(h,d.resolveContext?d.resolveContext(this):this),l(this,o,u),this[o])},y},Z.exports=function(o){var u=t(arguments[1]);return v(u.resolveContext)&&C(u.resolveContext),r(o,function(d,h){return s(h,d,u)})}}}),LN=Ne({"node_modules/es6-iterator/index.js"(te,Z){var v=SQ(),w=LR(),C=QS(),P=P_(),t=L_(),r=HQ(),a=Nb(),l=Object.defineProperty,i=Object.defineProperties,s;Z.exports=s=function(o,u){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");i(this,{__list__:t("w",P(o)),__context__:t("w",u),__nextIndex__:t("w",0)}),u&&(C(u.on),u.on("_add",this._onAdd),u.on("_delete",this._onDelete),u.on("_clear",this._onClear))},delete s.prototype.constructor,i(s.prototype,w({_next:t(function(){var o;if(this.__list__){if(this.__redo__&&(o=this.__redo__.shift(),o!==void 0))return o;if(this.__nextIndex__<this.__list__.length)return this.__nextIndex__++;this._unBind()}}),next:t(function(){return this._createResult(this._next())}),_createResult:t(function(o){return o===void 0?{done:!0,value:void 0}:{done:!1,value:this._resolve(o)}}),_resolve:t(function(o){return this.__list__[o]}),_unBind:t(function(){this.__list__=null,delete this.__redo__,this.__context__&&(this.__context__.off("_add",this._onAdd),this.__context__.off("_delete",this._onDelete),this.__context__.off("_clear",this._onClear),this.__context__=null)}),toString:t(function(){return"[object "+(this[a.toStringTag]||"Object")+"]"})},r({_onAdd:t(function(o){if(!(o>=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){l(this,"__redo__",t("c",[o]));return}this.__redo__.forEach(function(u,d){u>=o&&(this.__redo__[d]=++u)},this),this.__redo__.push(o)}}),_onDelete:t(function(o){var u;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(u=this.__redo__.indexOf(o),u!==-1&&this.__redo__.splice(u,1),this.__redo__.forEach(function(d,h){d>o&&(this.__redo__[h]=--d)},this)))}),_onClear:t(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),l(s.prototype,a.iterator,t(function(){return this}))}}),GQ=Ne({"node_modules/es6-iterator/array.js"(te,Z){var v=kR(),w=CN(),C=L_(),P=Nb(),t=LN(),r=Object.defineProperty,a;a=Z.exports=function(l,i){if(!(this instanceof a))throw new TypeError("Constructor requires 'new'");t.call(this,l),i?w.call(i,"key+value")?i="key+value":w.call(i,"key")?i="key":i="value":i="value",r(this,"__kind__",C("",i))},v&&v(a,t),delete a.prototype.constructor,a.prototype=Object.create(t.prototype,{_resolve:C(function(l){return this.__kind__==="value"?this.__list__[l]:this.__kind__==="key+value"?[l,this.__list__[l]]:l})}),r(a.prototype,P.toStringTag,C("c","Array Iterator"))}}),XQ=Ne({"node_modules/es6-iterator/string.js"(te,Z){var v=kR(),w=L_(),C=Nb(),P=LN(),t=Object.defineProperty,r;r=Z.exports=function(a){if(!(this instanceof r))throw new TypeError("Constructor requires 'new'");a=String(a),P.call(this,a),t(this,"__length__",w("",a.length))},v&&v(r,P),delete r.prototype.constructor,r.prototype=Object.create(P.prototype,{_next:w(function(){if(this.__list__){if(this.__nextIndex__<this.__length__)return this.__nextIndex__++;this._unBind()}}),_resolve:w(function(a){var l=this.__list__[a],i;return this.__nextIndex__===this.__length__?l:(i=l.charCodeAt(0),i>=55296&&i<=56319?l+this.__list__[this.__nextIndex__++]:l)})}),t(r.prototype,C.toStringTag,w("c","String Iterator"))}}),WQ=Ne({"node_modules/es6-iterator/is-iterable.js"(te,Z){var v=u6(),w=zb(),C=c6(),P=Nb().iterator,t=Array.isArray;Z.exports=function(r){return w(r)?t(r)||C(r)||v(r)?!0:typeof r[P]=="function":!1}}}),YQ=Ne({"node_modules/es6-iterator/valid-iterable.js"(te,Z){var v=WQ();Z.exports=function(w){if(!v(w))throw new TypeError(w+" is not iterable");return w}}}),RN=Ne({"node_modules/es6-iterator/get.js"(te,Z){var v=u6(),w=c6(),C=GQ(),P=XQ(),t=YQ(),r=Nb().iterator;Z.exports=function(a){return typeof t(a)[r]=="function"?a[r]():v(a)?new C(a):w(a)?new P(a):new C(a)}}}),ZQ=Ne({"node_modules/es6-iterator/for-of.js"(te,Z){var v=u6(),w=QS(),C=c6(),P=RN(),t=Array.isArray,r=Function.prototype.call,a=Array.prototype.some;Z.exports=function(l,i){var s,o=arguments[2],u,d,h,y,m,E,c;if(t(l)||v(l)?s="array":C(l)?s="string":l=P(l),w(i),d=function(){h=!0},s==="array"){a.call(l,function(_){return r.call(i,o,_,d),h});return}if(s==="string"){for(m=l.length,y=0;y<m&&(E=l[y],y+1<m&&(c=E.charCodeAt(0),c>=55296&&c<=56319&&(E+=l[++y])),r.call(i,o,E,d),!h);++y);return}for(u=l.next();!u.done;){if(r.call(i,o,u.value,d),h)return;u=l.next()}}}}),$Q=Ne({"node_modules/es6-weak-map/is-native-implemented.js"(te,Z){Z.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()}}),KQ=Ne({"node_modules/es6-weak-map/polyfill.js"(te,Z){var v=zb(),w=kR(),C=oQ(),P=P_(),t=sQ(),r=L_(),a=RN(),l=ZQ(),i=Nb().toStringTag,s=$Q(),o=Array.isArray,u=Object.defineProperty,d=Object.prototype.hasOwnProperty,h=Object.getPrototypeOf,y;Z.exports=y=function(){var m=arguments[0],E;if(!(this instanceof y))throw new TypeError("Constructor requires 'new'");return E=s&&w&&WeakMap!==y?w(new WeakMap,h(this)):this,v(m)&&(o(m)||(m=a(m))),u(E,"__weakMapData__",r("c","$weakMap$"+t())),m&&l(m,function(c){P(c),E.set(c[0],c[1])}),E},s&&(w&&w(y,WeakMap),y.prototype=Object.create(WeakMap.prototype,{constructor:r(y)})),Object.defineProperties(y.prototype,{delete:r(function(m){return d.call(C(m),this.__weakMapData__)?(delete m[this.__weakMapData__],!0):!1}),get:r(function(m){if(d.call(C(m),this.__weakMapData__))return m[this.__weakMapData__]}),has:r(function(m){return d.call(C(m),this.__weakMapData__)}),set:r(function(m,E){return u(C(m),this.__weakMapData__,r("c",E)),this}),toString:r(function(){return"[object WeakMap]"})}),u(y.prototype,i,r("c","WeakMap"))}}),IN=Ne({"node_modules/es6-weak-map/index.js"(te,Z){Z.exports=nQ()()?WeakMap:KQ()}}),JQ=Ne({"node_modules/array-find-index/index.js"(te,Z){Z.exports=function(v,w,C){if(typeof Array.prototype.findIndex=="function")return v.findIndex(w,C);if(typeof w!="function")throw new TypeError("predicate must be a function");var P=Object(v),t=P.length;if(t===0)return-1;for(var r=0;r<t;r++)if(w.call(C,P[r],r,P))return r;return-1}}}),DN=Ne({"node_modules/regl-line2d/index.js"(te,Z){var v=Lb(),w=p3(),C=qd(),P=n1(),t=m3(),r=tQ(),a=rQ(),{float32:l,fract32:i}=CR(),s=IN(),o=JS(),u=JQ(),d=`
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.;
}
`,h=`
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;
}
`,y=`
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;
}
`,m=`
precision highp float;
varying vec4 fragColor;

void main() {
	gl_FragColor = fragColor;
}
`,E=`
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;
		}
	}
}
`,c=`
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;
}
`;Z.exports=_;function _(T,M){if(!(this instanceof _))return new _(T,M);if(typeof T=="function"?(M||(M={}),M.regl=T):M=T,M.length&&(M.positions=M),T=M.regl,!T.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=T._gl,this.regl=T,this.passes=[],this.shaders=_.shaders.has(T)?_.shaders.get(T):_.shaders.set(T,_.createShaders(T)).get(T),this.update(M)}_.dashMult=2,_.maxPatternLength=256,_.precisionThreshold=3e6,_.maxPoints=1e4,_.maxLines=2048,_.shaders=new s,_.createShaders=function(T){let M=T.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),k={primitive:"triangle strip",instances:T.prop("count"),count:4,offset:0,uniforms:{miterMode:(f,p)=>p.join==="round"?2:1,miterLimit:T.prop("miterLimit"),scale:T.prop("scale"),scaleFract:T.prop("scaleFract"),translateFract:T.prop("translateFract"),translate:T.prop("translate"),thickness:T.prop("thickness"),dashTexture:T.prop("dashTexture"),opacity:T.prop("opacity"),pixelRatio:T.context("pixelRatio"),id:T.prop("id"),dashLength:T.prop("dashLength"),viewport:(f,p)=>[p.viewport.x,p.viewport.y,f.viewportWidth,f.viewportHeight],depth:T.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:(f,p)=>!p.overlay},stencil:{enable:!1},scissor:{enable:!0,box:T.prop("viewport")},viewport:T.prop("viewport")},b=T(C({vert:d,frag:h,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:T.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},k)),A;try{A=T(C({cull:{enable:!0,face:"back"},vert:E,frag:c,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:T.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:T.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:T.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},k))}catch{A=b}return{fill:T({primitive:"triangle",elements:(f,p)=>p.triangles,offset:0,vert:y,frag:m,uniforms:{scale:T.prop("scale"),color:T.prop("fill"),scaleFract:T.prop("scaleFract"),translateFract:T.prop("translateFract"),translate:T.prop("translate"),opacity:T.prop("opacity"),pixelRatio:T.context("pixelRatio"),id:T.prop("id"),viewport:(f,p)=>[p.viewport.x,p.viewport.y,f.viewportWidth,f.viewportHeight]},attributes:{position:{buffer:T.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:T.prop("positionFractBuffer"),stride:8,offset:8}},blend:k.blend,depth:{enable:!1},scissor:k.scissor,stencil:k.stencil,viewport:k.viewport}),rect:b,miter:A}},_.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},_.prototype.render=function(...T){T.length&&this.update(...T),this.draw()},_.prototype.draw=function(...T){return(T.length?T:this.passes).forEach((M,k)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>_.precisionThreshold||M.scale[1]*M.viewport.height>_.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=_.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},_.prototype.update=function(T){if(!T)return;T.length!=null?typeof T[0]=="number"&&(T=[{positions:T}]):Array.isArray(T)||(T=[T]);let{regl:M,gl:k}=this;if(T.forEach((A,g)=>{let f=this.passes[g];if(A!==void 0){if(A===null){this.passes[g]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=P(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),f||(this.passes[g]=f={id:g,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=C({},_.defaults,A)),A.thickness!=null&&(f.thickness=parseFloat(A.thickness)),A.opacity!=null&&(f.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(f.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(f.overlay=!!A.overlay,g<_.maxLines&&(f.depth=2*(_.maxLines-1-g%_.maxLines)/_.maxLines-1)),A.join!=null&&(f.join=A.join),A.hole!=null&&(f.hole=A.hole),A.fill!=null&&(f.fill=A.fill?v(A.fill,"uint8"):null),A.viewport!=null&&(f.viewport=o(A.viewport)),f.viewport||(f.viewport=o([k.drawingBufferWidth,k.drawingBufferHeight])),A.close!=null&&(f.close=A.close),A.positions===null&&(A.positions=[]),A.positions){let N,D;if(A.positions.x&&A.positions.y){let q=A.positions.x,z=A.positions.y;D=f.count=Math.max(q.length,z.length),N=new Float64Array(D*2);for(let H=0;H<D;H++)N[H*2]=q[H],N[H*2+1]=z[H]}else N=t(A.positions,"float64"),D=f.count=Math.floor(N.length/2);let B=f.bounds=w(N,2);if(f.fill){let q=[],z={},H=0;for(let G=0,J=0,le=f.count;G<le;G++){let ye=N[G*2],de=N[G*2+1];isNaN(ye)||isNaN(de)||ye==null||de==null?(ye=N[H*2],de=N[H*2+1],z[G]=H):H=G,q[J++]=ye,q[J++]=de}if(A.splitNull){f.count-1 in z||(z[f.count]=f.count-1);let G=Object.keys(z).map(Number).sort((de,me)=>de-me),J=[],le=0,ye=f.hole!=null?f.hole[0]:null;if(ye!=null){let de=u(G,me=>me>=ye);G=G.slice(0,de),G.push(ye)}for(let de=0;de<G.length;de++){let me=q.slice(le*2,G[de]*2).concat(ye?q.slice(ye*2):[]),W=(f.hole||[]).map(se=>se-ye+(G[de]-le)),ie=r(me,W);ie=ie.map(se=>se+le+(se+le<G[de]?0:ye-G[de])),J.push(...ie),le=G[de]+1}for(let de=0,me=J.length;de<me;de++)z[J[de]]!=null&&(J[de]=z[J[de]]);f.triangles=J}else{let G=r(q,f.hole||[]);for(let J=0,le=G.length;J<le;J++)z[G[J]]!=null&&(G[J]=z[G[J]]);f.triangles=G}}let U=new Float64Array(N);a(U,2,B);let V=new Float64Array(D*2+6);f.close?N[0]===N[D*2-2]&&N[1]===N[D*2-1]?(V[0]=U[D*2-4],V[1]=U[D*2-3]):(V[0]=U[D*2-2],V[1]=U[D*2-1]):(V[0]=U[0],V[1]=U[1]),V.set(U,2),f.close?N[0]===N[D*2-2]&&N[1]===N[D*2-1]?(V[D*2+2]=U[2],V[D*2+3]=U[3],f.count-=1):(V[D*2+2]=U[0],V[D*2+3]=U[1],V[D*2+4]=U[2],V[D*2+5]=U[3]):(V[D*2+2]=U[D*2-2],V[D*2+3]=U[D*2-1],V[D*2+4]=U[D*2-2],V[D*2+5]=U[D*2-1]);var p=l(V);f.positionBuffer(p);var x=i(V,p);f.positionFractBuffer(x)}if(A.range?f.range=A.range:f.range||(f.range=f.bounds),(A.range||A.positions)&&f.count){let N=f.bounds,D=N[2]-N[0],B=N[3]-N[1],U=f.range[2]-f.range[0],V=f.range[3]-f.range[1];f.scale=[D/U,B/V],f.translate=[-f.range[0]/U+N[0]/U||0,-f.range[1]/V+N[1]/V||0],f.scaleFract=i(f.scale),f.translateFract=i(f.translate)}if(A.dashes){let N=0,D;if(!A.dashes||A.dashes.length<2)N=1,D=new Uint8Array([255,255,255,255,255,255,255,255]);else{N=0;for(let V=0;V<A.dashes.length;++V)N+=A.dashes[V];D=new Uint8Array(N*_.dashMult);let B=0,U=255;for(let V=0;V<2;V++)for(let q=0;q<A.dashes.length;++q){for(let z=0,H=A.dashes[q]*_.dashMult*.5;z<H;++z)D[B++]=U;U^=255}}f.dashLength=N,f.dashTexture({channels:1,data:D,width:D.length,height:1,mag:"linear",min:"linear"},0,0)}if(A.color){let N=f.count,D=A.color;D||(D="transparent");let B=new Uint8Array(N*4+4);if(!Array.isArray(D)||typeof D[0]=="number"){let U=v(D,"uint8");for(let V=0;V<N+1;V++)B.set(U,V*4)}else{for(let U=0;U<N;U++){let V=v(D[U],"uint8");B.set(V,U*4)}B.set(v(D[0],"uint8"),N*4)}f.colorBuffer({usage:"dynamic",type:"uint8",data:B})}}}),T.length<this.passes.length){for(let A=T.length;A<this.passes.length;A++){let g=this.passes[A];g&&(g.colorBuffer.destroy(),g.positionBuffer.destroy(),g.dashTexture.destroy())}this.passes.length=T.length}let b=[];for(let A=0;A<this.passes.length;A++)this.passes[A]!==null&&b.push(this.passes[A]);return this.passes=b,this},_.prototype.destroy=function(){return this.passes.forEach(T=>{T.colorBuffer.destroy(),T.positionBuffer.destroy(),T.dashTexture.destroy()}),this.passes.length=0,this}}}),QQ=Ne({"node_modules/regl-error2d/index.js"(te,Z){var v=p3(),w=Lb(),C=bN(),P=n1(),t=qd(),r=m3(),{float32:a,fract32:l}=CR();Z.exports=s;var i=[[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 s(o,u){if(typeof o=="function"?(u||(u={}),u.regl=o):u=o,u.length&&(u.positions=u),o=u.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let d=o._gl,h,y,m,E,c,_,T={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return E=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),y=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),c=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),_=o.buffer({usage:"static",type:"float",data:i}),g(u),h=o({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:o.prop("range"),lineWidth:o.prop("lineWidth"),capSize:o.prop("capSize"),opacity:o.prop("opacity"),scale:o.prop("scale"),translate:o.prop("translate"),scaleFract:o.prop("scaleFract"),translateFract:o.prop("translateFract"),viewport:(p,x)=>[x.viewport.x,x.viewport.y,p.viewportWidth,p.viewportHeight]},attributes:{color:{buffer:E,offset:(p,x)=>x.offset*4,divisor:1},position:{buffer:y,offset:(p,x)=>x.offset*8,divisor:1},positionFract:{buffer:m,offset:(p,x)=>x.offset*8,divisor:1},error:{buffer:c,offset:(p,x)=>x.offset*16,divisor:1},direction:{buffer:_,stride:24,offset:0},lineOffset:{buffer:_,stride:24,offset:8},capOffset:{buffer:_,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:i.length}),t(k,{update:g,draw:b,destroy:f,regl:o,gl:d,canvas:d.canvas,groups:M}),k;function k(p){p?g(p):p===null&&f(),b()}function b(p){if(typeof p=="number")return A(p);p&&!Array.isArray(p)&&(p=[p]),o._refresh(),M.forEach((x,N)=>{if(x){if(p&&(p[N]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}A(N)}})}function A(p){typeof p=="number"&&(p=M[p]),p!=null&&p&&p.count&&p.color&&p.opacity&&p.positions&&p.positions.length>1&&(p.scaleRatio=[p.scale[0]*p.viewport.width,p.scale[1]*p.viewport.height],h(p),p.after&&p.after(p))}function g(p){if(!p)return;p.length!=null?typeof p[0]=="number"&&(p=[{positions:p}]):Array.isArray(p)||(p=[p]);let x=0,N=0;if(k.groups=M=p.map((U,V)=>{let q=M[V];if(U)typeof U=="function"?U={after:U}:typeof U[0]=="number"&&(U={positions:U});else return q;return U=P(U,{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"}),q||(M[V]=q={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},U=t({},T,U)),C(q,U,[{lineWidth:z=>+z*.5,capSize:z=>+z*.5,opacity:parseFloat,errors:z=>(z=r(z),N+=z.length,z),positions:(z,H)=>(z=r(z,"float64"),H.count=Math.floor(z.length/2),H.bounds=v(z,2),H.offset=x,x+=H.count,z)},{color:(z,H)=>{let G=H.count;if(z||(z="transparent"),!Array.isArray(z)||typeof z[0]=="number"){let le=z;z=Array(G);for(let ye=0;ye<G;ye++)z[ye]=le}if(z.length<G)throw Error("Not enough colors");let J=new Uint8Array(G*4);for(let le=0;le<G;le++){let ye=w(z[le],"uint8");J.set(ye,le*4)}return J},range:(z,H,G)=>{let J=H.bounds;return z||(z=J),H.scale=[1/(z[2]-z[0]),1/(z[3]-z[1])],H.translate=[-z[0],-z[1]],H.scaleFract=l(H.scale),H.translateFract=l(H.translate),z},viewport:z=>{let H;return Array.isArray(z)?H={x:z[0],y:z[1],width:z[2]-z[0],height:z[3]-z[1]}:z?(H={x:z.x||z.left||0,y:z.y||z.top||0},z.right?H.width=z.right-H.x:H.width=z.w||z.width||0,z.bottom?H.height=z.bottom-H.y:H.height=z.h||z.height||0):H={x:0,y:0,width:d.drawingBufferWidth,height:d.drawingBufferHeight},H}}]),q}),x||N){let U=M.reduce((H,G,J)=>H+(G?G.count:0),0),V=new Float64Array(U*2),q=new Uint8Array(U*4),z=new Float32Array(U*4);M.forEach((H,G)=>{if(!H)return;let{positions:J,count:le,offset:ye,color:de,errors:me}=H;le&&(q.set(de,ye*4),z.set(me,ye*4),V.set(J,ye*2))});var D=a(V);y(D);var B=l(V,D);m(B),E(q),c(z)}}function f(){y.destroy(),m.destroy(),E.destroy(),c.destroy(),_.destroy()}}}}),eee=Ne({"node_modules/unquote/index.js"(te,Z){var v=/[\'\"]/;Z.exports=function(C){return C?(v.test(C.charAt(0))&&(C=C.substr(1)),v.test(C.charAt(C.length-1))&&(C=C.substr(0,C.length-1)),C):""}}}),ON=Ne({"node_modules/css-global-keywords/index.json"(te,Z){Z.exports=["inherit","initial","unset"]}}),zN=Ne({"node_modules/css-system-font-keywords/index.json"(te,Z){Z.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),NN=Ne({"node_modules/css-font-weight-keywords/index.json"(te,Z){Z.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),FN=Ne({"node_modules/css-font-style-keywords/index.json"(te,Z){Z.exports=["normal","italic","oblique"]}}),BN=Ne({"node_modules/css-font-stretch-keywords/index.json"(te,Z){Z.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),tee=Ne({"node_modules/parenthesis/index.js"(te,Z){function v(P,t){if(typeof P!="string")return[P];var r=[P];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var a=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],l=t.escape||"___",i=!!t.flat;a.forEach(function(u){var d=new RegExp(["\\",u[0],"[^\\",u[0],"\\",u[1],"]*\\",u[1]].join("")),h=[];function y(m,E,c){var _=r.push(m.slice(u[0].length,-u[1].length))-1;return h.push(_),l+_+l}r.forEach(function(m,E){for(var c,_=0;m!=c;)if(c=m,m=m.replace(d,y),_++>1e4)throw Error("References have circular dependency. Please, check them.");r[E]=m}),h=h.reverse(),r=r.map(function(m){return h.forEach(function(E){m=m.replace(new RegExp("(\\"+l+E+"\\"+l+")","g"),u[0]+"$1"+u[1])}),m})});var s=new RegExp("\\"+l+"([0-9]+)\\"+l);function o(u,d,h){for(var y=[],m,E=0;m=s.exec(u);){if(E++>1e4)throw Error("Circular references in parenthesis");y.push(u.slice(0,m.index)),y.push(o(d[m[1]],d)),u=u.slice(m.index+m[0].length)}return y.push(u),y}return i?r:o(r[0],r)}function w(P,t){if(t&&t.flat){var r=t&&t.escape||"___",a=P[0],l;if(!a)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),s=0;a!=l;){if(s++>1e4)throw Error("Circular references in "+P);l=a,a=a.replace(i,o)}return a}return P.reduce(function u(d,h){return Array.isArray(h)&&(h=h.reduce(u,"")),d+h},"");function o(u,d){if(P[d]==null)throw Error("Reference "+d+"is undefined");return P[d]}}function C(P,t){return Array.isArray(P)?w(P,t):v(P,t)}C.parse=v,C.stringify=w,Z.exports=C}}),ree=Ne({"node_modules/string-split-by/index.js"(te,Z){var v=tee();Z.exports=function(C,P,t){if(C==null)throw Error("First argument should be a string");if(P==null)throw Error("Separator should be a string or a RegExp");t?(typeof t=="string"||Array.isArray(t))&&(t={ignore:t}):t={},t.escape==null&&(t.escape=!0),t.ignore==null?t.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:(typeof t.ignore=="string"&&(t.ignore=[t.ignore]),t.ignore=t.ignore.map(function(d){return d.length===1&&(d=d+d),d}));var r=v.parse(C,{flat:!0,brackets:t.ignore}),a=r[0],l=a.split(P);if(t.escape){for(var i=[],s=0;s<l.length;s++){var o=l[s],u=l[s+1];o[o.length-1]==="\\"&&o[o.length-2]!=="\\"?(i.push(o+P+u),s++):i.push(o)}l=i}for(var s=0;s<l.length;s++)r[0]=l[s],l[s]=v.stringify(r,{flat:!0});return l}}}),nee=Ne({"node_modules/css-font-size-keywords/index.json"(te,Z){Z.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]}}),jN=Ne({"node_modules/css-font/lib/util.js"(te,Z){var v=nee();Z.exports={isSize:function(C){return/^[\d\.]/.test(C)||C.indexOf("/")!==-1||v.indexOf(C)!==-1}}}}),aee=Ne({"node_modules/css-font/parse.js"(te,Z){var v=eee(),w=ON(),C=zN(),P=NN(),t=FN(),r=BN(),a=ree(),l=jN().isSize;Z.exports=s;var i=s.cache={};function s(u){if(typeof u!="string")throw new Error("Font argument must be a string.");if(i[u])return i[u];if(u==="")throw new Error("Cannot parse an empty string.");if(C.indexOf(u)!==-1)return i[u]={system:u};for(var d={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=a(u,/\s+/),y;y=h.shift();){if(w.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(E){d[E]=y}),i[u]=d;if(t.indexOf(y)!==-1){d.style=y;continue}if(y==="normal"||y==="small-caps"){d.variant=y;continue}if(r.indexOf(y)!==-1){d.stretch=y;continue}if(P.indexOf(y)!==-1){d.weight=y;continue}if(l(y)){var m=a(y,"/");if(d.size=m[0],m[1]!=null?d.lineHeight=o(m[1]):h[0]==="/"&&(h.shift(),d.lineHeight=o(h.shift())),!h.length)throw new Error("Missing required font-family.");return d.family=a(h.join(" "),/\s*,\s*/).map(v),i[u]=d}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function o(u){var d=parseFloat(u);return d.toString()===u?d:u}}}),UN=Ne({"node_modules/css-font/stringify.js"(te,Z){var v=n1(),w=jN().isSize,C=u(ON()),P=u(zN()),t=u(NN()),r=u(FN()),a=u(BN()),l={normal:1,"small-caps":1},i={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s={size:"1rem",family:"serif"};Z.exports=function(h){if(h=v(h,{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"}),h.system)return h.system&&o(h.system,P),h.system;if(o(h.style,r),o(h.variant,l),o(h.weight,t),o(h.stretch,a),h.size==null&&(h.size=s.size),typeof h.size=="number"&&(h.size+="px"),!w)throw Error("Bad size value `"+h.size+"`");h.family||(h.family=s.family),Array.isArray(h.family)&&(h.family.length||(h.family=[s.family]),h.family=h.family.map(function(m){return i[m]?m:'"'+m+'"'}).join(", "));var y=[];return y.push(h.style),h.variant!==h.style&&y.push(h.variant),h.weight!==h.variant&&h.weight!==h.style&&y.push(h.weight),h.stretch!==h.weight&&h.stretch!==h.variant&&h.stretch!==h.style&&y.push(h.stretch),y.push(h.size+(h.lineHeight==null||h.lineHeight==="normal"||h.lineHeight+""=="1"?"":"/"+h.lineHeight)),y.push(h.family),y.filter(Boolean).join(" ")};function o(d,h){if(d&&!h[d]&&!C[d])throw Error("Unknown keyword `"+d+"`");return d}function u(d){for(var h={},y=0;y<d.length;y++)h[d[y]]=1;return h}}}),iee=Ne({"node_modules/css-font/index.js"(te,Z){Z.exports={parse:aee(),stringify:UN()}}}),oee=Ne({"node_modules/regl/dist/regl.unchecked.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():v.createREGL=w()})(te,function(){var v=function(At,kr){for(var Dr=Object.keys(kr),Hn=0;Hn<Dr.length;++Hn)At[Dr[Hn]]=kr[Dr[Hn]];return At},w=0,C=0,P=5,t=6;function r(At,kr){this.id=w++,this.type=At,this.data=kr}function a(At){return At.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function l(At){if(At.length===0)return[];var kr=At.charAt(0),Dr=At.charAt(At.length-1);if(At.length>1&&kr===Dr&&(kr==='"'||kr==="'"))return['"'+a(At.substr(1,At.length-2))+'"'];var Hn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(At);if(Hn)return l(At.substr(0,Hn.index)).concat(l(Hn[1])).concat(l(At.substr(Hn.index+Hn[0].length)));var Ca=At.split(".");if(Ca.length===1)return['"'+a(At)+'"'];for(var Rn=[],Pn=0;Pn<Ca.length;++Pn)Rn=Rn.concat(l(Ca[Pn]));return Rn}function i(At){return"["+l(At).join("][")+"]"}function s(At,kr){return new r(At,i(kr+""))}function o(At){return typeof At=="function"&&!At._reglType||At instanceof r}function u(At,kr){if(typeof At=="function")return new r(C,At);if(typeof At=="number"||typeof At=="boolean")return new r(P,At);if(Array.isArray(At))return new r(t,At.map(function(Dr,Hn){return u(Dr)}));if(At instanceof r)return At}var d={DynamicVariable:r,define:s,isDynamic:o,unbox:u,accessor:i},h={next:typeof requestAnimationFrame=="function"?function(At){return requestAnimationFrame(At)}:function(At){return setTimeout(At,16)},cancel:typeof cancelAnimationFrame=="function"?function(At){return cancelAnimationFrame(At)}:clearTimeout},y=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var At={"":0},kr=[""];return{id:function(Dr){var Hn=At[Dr];return Hn||(Hn=At[Dr]=kr.length,kr.push(Dr),Hn)},str:function(Dr){return kr[Dr]}}}function E(At,kr,Dr){var Hn=document.createElement("canvas");v(Hn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),At.appendChild(Hn),At===document.body&&(Hn.style.position="absolute",v(At.style,{margin:0,padding:0}));function Ca(){var ri=window.innerWidth,ei=window.innerHeight;if(At!==document.body){var ti=Hn.getBoundingClientRect();ri=ti.right-ti.left,ei=ti.bottom-ti.top}Hn.width=Dr*ri,Hn.height=Dr*ei}var Rn;At!==document.body&&typeof ResizeObserver=="function"?(Rn=new ResizeObserver(function(){setTimeout(Ca)}),Rn.observe(At)):window.addEventListener("resize",Ca,!1);function Pn(){Rn?Rn.disconnect():window.removeEventListener("resize",Ca),At.removeChild(Hn)}return Ca(),{canvas:Hn,onDestroy:Pn}}function c(At,kr){function Dr(Hn){try{return At.getContext(Hn,kr)}catch{return null}}return Dr("webgl")||Dr("experimental-webgl")||Dr("webgl-experimental")}function _(At){return typeof At.nodeName=="string"&&typeof At.appendChild=="function"&&typeof At.getBoundingClientRect=="function"}function T(At){return typeof At.drawArrays=="function"||typeof At.drawElements=="function"}function M(At){return typeof At=="string"?At.split():At}function k(At){return typeof At=="string"?document.querySelector(At):At}function b(At){var kr=At||{},Dr,Hn,Ca,Rn,Pn={},ri=[],ei=[],ti=typeof window>"u"?1:window.devicePixelRatio,pi=!1,eo={},Bi=function(gn){},fi=function(){};if(typeof kr=="string"?Dr=document.querySelector(kr):typeof kr=="object"&&(_(kr)?Dr=kr:T(kr)?(Rn=kr,Ca=Rn.canvas):("gl"in kr?Rn=kr.gl:"canvas"in kr?Ca=k(kr.canvas):"container"in kr&&(Hn=k(kr.container)),"attributes"in kr&&(Pn=kr.attributes),"extensions"in kr&&(ri=M(kr.extensions)),"optionalExtensions"in kr&&(ei=M(kr.optionalExtensions)),"onDone"in kr&&(Bi=kr.onDone),"profile"in kr&&(pi=!!kr.profile),"pixelRatio"in kr&&(ti=+kr.pixelRatio),"cachedCode"in kr&&(eo=kr.cachedCode))),Dr&&(Dr.nodeName.toLowerCase()==="canvas"?Ca=Dr:Hn=Dr),!Rn){if(!Ca){var Oa=E(Hn||document.body,Bi,ti);if(!Oa)return null;Ca=Oa.canvas,fi=Oa.onDestroy}Pn.premultipliedAlpha===void 0&&(Pn.premultipliedAlpha=!0),Rn=c(Ca,Pn)}return Rn?{gl:Rn,canvas:Ca,container:Hn,extensions:ri,optionalExtensions:ei,pixelRatio:ti,profile:pi,cachedCode:eo,onDone:Bi,onDestroy:fi}:(fi(),Bi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(At,kr){var Dr={};function Hn(Pn){var ri=Pn.toLowerCase(),ei;try{ei=Dr[ri]=At.getExtension(ri)}catch{}return!!ei}for(var Ca=0;Ca<kr.extensions.length;++Ca){var Rn=kr.extensions[Ca];if(!Hn(Rn))return kr.onDestroy(),kr.onDone('"'+Rn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return kr.optionalExtensions.forEach(Hn),{extensions:Dr,restore:function(){Object.keys(Dr).forEach(function(Pn){if(Dr[Pn]&&!Hn(Pn))throw new Error("(regl): error restoring extension "+Pn)})}}}function g(At,kr){for(var Dr=Array(At),Hn=0;Hn<At;++Hn)Dr[Hn]=kr(Hn);return Dr}var f=5120,p=5121,x=5122,N=5123,D=5124,B=5125,U=5126;function V(At){for(var kr=16;kr<=1<<28;kr*=16)if(At<=kr)return kr;return 0}function q(At){var kr,Dr;return kr=(At>65535)<<4,At>>>=kr,Dr=(At>255)<<3,At>>>=Dr,kr|=Dr,Dr=(At>15)<<2,At>>>=Dr,kr|=Dr,Dr=(At>3)<<1,At>>>=Dr,kr|=Dr,kr|At>>1}function z(){var At=g(8,function(){return[]});function kr(Rn){var Pn=V(Rn),ri=At[q(Pn)>>2];return ri.length>0?ri.pop():new ArrayBuffer(Pn)}function Dr(Rn){At[q(Rn.byteLength)>>2].push(Rn)}function Hn(Rn,Pn){var ri=null;switch(Rn){case f:ri=new Int8Array(kr(Pn),0,Pn);break;case p:ri=new Uint8Array(kr(Pn),0,Pn);break;case x:ri=new Int16Array(kr(2*Pn),0,Pn);break;case N:ri=new Uint16Array(kr(2*Pn),0,Pn);break;case D:ri=new Int32Array(kr(4*Pn),0,Pn);break;case B:ri=new Uint32Array(kr(4*Pn),0,Pn);break;case U:ri=new Float32Array(kr(4*Pn),0,Pn);break;default:return null}return ri.length!==Pn?ri.subarray(0,Pn):ri}function Ca(Rn){Dr(Rn.buffer)}return{alloc:kr,free:Dr,allocType:Hn,freeType:Ca}}var H=z();H.zero=z();var G=3408,J=3410,le=3411,ye=3412,de=3413,me=3414,W=3415,ie=33901,se=33902,ee=3379,pe=3386,oe=34921,Y=36347,ce=36348,ue=35661,_e=35660,Le=34930,ze=36349,Ge=34076,Ve=34024,rt=7936,pt=7937,gt=7938,ht=35724,lt=34047,Fe=36063,Pe=34852,be=3553,Ye=34067,mt=34069,bt=33984,ft=6408,Wt=5126,Zt=5121,cr=36160,pr=36053,Br=36064,Fr=16384,cn=function(At,kr){var Dr=1;kr.ext_texture_filter_anisotropic&&(Dr=At.getParameter(lt));var Hn=1,Ca=1;kr.webgl_draw_buffers&&(Hn=At.getParameter(Pe),Ca=At.getParameter(Fe));var Rn=!!kr.oes_texture_float;if(Rn){var Pn=At.createTexture();At.bindTexture(be,Pn),At.texImage2D(be,0,ft,1,1,0,ft,Wt,null);var ri=At.createFramebuffer();if(At.bindFramebuffer(cr,ri),At.framebufferTexture2D(cr,Br,be,Pn,0),At.bindTexture(be,null),At.checkFramebufferStatus(cr)!==pr)Rn=!1;else{At.viewport(0,0,1,1),At.clearColor(1,0,0,1),At.clear(Fr);var ei=H.allocType(Wt,4);At.readPixels(0,0,1,1,ft,Wt,ei),At.getError()?Rn=!1:(At.deleteFramebuffer(ri),At.deleteTexture(Pn),Rn=ei[0]===1),H.freeType(ei)}}var ti=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),pi=!0;if(!ti){var eo=At.createTexture(),Bi=H.allocType(Zt,36);At.activeTexture(bt),At.bindTexture(Ye,eo),At.texImage2D(mt,0,ft,3,3,0,ft,Zt,Bi),H.freeType(Bi),At.bindTexture(Ye,null),At.deleteTexture(eo),pi=!At.getError()}return{colorBits:[At.getParameter(J),At.getParameter(le),At.getParameter(ye),At.getParameter(de)],depthBits:At.getParameter(me),stencilBits:At.getParameter(W),subpixelBits:At.getParameter(G),extensions:Object.keys(kr).filter(function(fi){return!!kr[fi]}),maxAnisotropic:Dr,maxDrawbuffers:Hn,maxColorAttachments:Ca,pointSizeDims:At.getParameter(ie),lineWidthDims:At.getParameter(se),maxViewportDims:At.getParameter(pe),maxCombinedTextureUnits:At.getParameter(ue),maxCubeMapSize:At.getParameter(Ge),maxRenderbufferSize:At.getParameter(Ve),maxTextureUnits:At.getParameter(Le),maxTextureSize:At.getParameter(ee),maxAttributes:At.getParameter(oe),maxVertexUniforms:At.getParameter(Y),maxVertexTextureUnits:At.getParameter(_e),maxVaryingVectors:At.getParameter(ce),maxFragmentUniforms:At.getParameter(ze),glsl:At.getParameter(ht),renderer:At.getParameter(pt),vendor:At.getParameter(rt),version:At.getParameter(gt),readFloat:Rn,npotTextureCube:pi}},Nr=function(At){return At instanceof Uint8Array||At instanceof Uint16Array||At instanceof Uint32Array||At instanceof Int8Array||At instanceof Int16Array||At instanceof Int32Array||At instanceof Float32Array||At instanceof Float64Array||At instanceof Uint8ClampedArray};function Jr(At){return!!At&&typeof At=="object"&&Array.isArray(At.shape)&&Array.isArray(At.stride)&&typeof At.offset=="number"&&At.shape.length===At.stride.length&&(Array.isArray(At.data)||Nr(At.data))}var Dt=function(At){return Object.keys(At).map(function(kr){return At[kr]})},$e={shape:tt,flatten:Ie};function ot(At,kr,Dr){for(var Hn=0;Hn<kr;++Hn)Dr[Hn]=At[Hn]}function De(At,kr,Dr,Hn){for(var Ca=0,Rn=0;Rn<kr;++Rn)for(var Pn=At[Rn],ri=0;ri<Dr;++ri)Hn[Ca++]=Pn[ri]}function Ee(At,kr,Dr,Hn,Ca,Rn){for(var Pn=Rn,ri=0;ri<kr;++ri)for(var ei=At[ri],ti=0;ti<Dr;++ti)for(var pi=ei[ti],eo=0;eo<Hn;++eo)Ca[Pn++]=pi[eo]}function Ae(At,kr,Dr,Hn,Ca){for(var Rn=1,Pn=Dr+1;Pn<kr.length;++Pn)Rn*=kr[Pn];var ri=kr[Dr];if(kr.length-Dr===4){var ei=kr[Dr+1],ti=kr[Dr+2],pi=kr[Dr+3];for(Pn=0;Pn<ri;++Pn)Ee(At[Pn],ei,ti,pi,Hn,Ca),Ca+=Rn}else for(Pn=0;Pn<ri;++Pn)Ae(At[Pn],kr,Dr+1,Hn,Ca),Ca+=Rn}function Ie(At,kr,Dr,Hn){var Ca=1;if(kr.length)for(var Rn=0;Rn<kr.length;++Rn)Ca*=kr[Rn];else Ca=0;var Pn=Hn||H.allocType(Dr,Ca);switch(kr.length){case 0:break;case 1:ot(At,kr[0],Pn);break;case 2:De(At,kr[0],kr[1],Pn);break;case 3:Ee(At,kr[0],kr[1],kr[2],Pn,0);break;default:Ae(At,kr,0,Pn,0)}return Pn}function tt(At){for(var kr=[],Dr=At;Dr.length;Dr=Dr[0])kr.push(Dr.length);return kr}var st={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ft=5120,Nt=5122,Xt=5124,lr=5121,Rr=5123,Mr=5125,Sr=5126,Kr=5126,qn={int8:Ft,int16:Nt,int32:Xt,uint8:lr,uint16:Rr,uint32:Mr,float:Sr,float32:Kr},ha=35048,ia=35040,xa={dynamic:ha,stream:ia,static:35044},ba=$e.flatten,ea=$e.shape,Za=35044,ui=35040,_r=5121,Qt=5126,yr=[];yr[5120]=1,yr[5122]=2,yr[5124]=4,yr[5121]=1,yr[5123]=2,yr[5125]=4,yr[5126]=4;function br(At){return st[Object.prototype.toString.call(At)]|0}function nn(At,kr){for(var Dr=0;Dr<kr.length;++Dr)At[Dr]=kr[Dr]}function wn(At,kr,Dr,Hn,Ca,Rn,Pn){for(var ri=0,ei=0;ei<Dr;++ei)for(var ti=0;ti<Hn;++ti)At[ri++]=kr[Ca*ei+Rn*ti+Pn]}function Ln(At,kr,Dr,Hn){var Ca=0,Rn={};function Pn(gn){this.id=Ca++,this.buffer=At.createBuffer(),this.type=gn,this.usage=Za,this.byteLength=0,this.dimension=1,this.dtype=_r,this.persistentData=null,Dr.profile&&(this.stats={size:0})}Pn.prototype.bind=function(){At.bindBuffer(this.type,this.buffer)},Pn.prototype.destroy=function(){Bi(this)};var ri=[];function ei(gn,Kn){var ga=ri.pop();return ga||(ga=new Pn(gn)),ga.bind(),eo(ga,Kn,ui,0,1,!1),ga}function ti(gn){ri.push(gn)}function pi(gn,Kn,ga){gn.byteLength=Kn.byteLength,At.bufferData(gn.type,Kn,ga)}function eo(gn,Kn,ga,za,wa,Ii){var si;if(gn.usage=ga,Array.isArray(Kn)){if(gn.dtype=za||Qt,Kn.length>0){var $i;if(Array.isArray(Kn[0])){si=ea(Kn);for(var Ta=1,ca=1;ca<si.length;++ca)Ta*=si[ca];gn.dimension=Ta,$i=ba(Kn,si,gn.dtype),pi(gn,$i,ga),Ii?gn.persistentData=$i:H.freeType($i)}else if(typeof Kn[0]=="number"){gn.dimension=wa;var Ei=H.allocType(gn.dtype,Kn.length);nn(Ei,Kn),pi(gn,Ei,ga),Ii?gn.persistentData=Ei:H.freeType(Ei)}else Nr(Kn[0])&&(gn.dimension=Kn[0].length,gn.dtype=za||br(Kn[0])||Qt,$i=ba(Kn,[Kn.length,Kn[0].length],gn.dtype),pi(gn,$i,ga),Ii?gn.persistentData=$i:H.freeType($i))}}else if(Nr(Kn))gn.dtype=za||br(Kn),gn.dimension=wa,pi(gn,Kn,ga),Ii&&(gn.persistentData=new Uint8Array(new Uint8Array(Kn.buffer)));else if(Jr(Kn)){si=Kn.shape;var Yn=Kn.stride,yi=Kn.offset,ni=0,Ji=0,Ho=0,ji=0;si.length===1?(ni=si[0],Ji=1,Ho=Yn[0],ji=0):si.length===2&&(ni=si[0],Ji=si[1],Ho=Yn[0],ji=Yn[1]),gn.dtype=za||br(Kn.data)||Qt,gn.dimension=Ji;var no=H.allocType(gn.dtype,ni*Ji);wn(no,Kn.data,ni,Ji,Ho,ji,yi),pi(gn,no,ga),Ii?gn.persistentData=no:H.freeType(no)}else Kn instanceof ArrayBuffer&&(gn.dtype=_r,gn.dimension=wa,pi(gn,Kn,ga),Ii&&(gn.persistentData=new Uint8Array(new Uint8Array(Kn))))}function Bi(gn){kr.bufferCount--,Hn(gn);var Kn=gn.buffer;At.deleteBuffer(Kn),gn.buffer=null,delete Rn[gn.id]}function fi(gn,Kn,ga,za){kr.bufferCount++;var wa=new Pn(Kn);Rn[wa.id]=wa;function Ii(Ta){var ca=Za,Ei=null,Yn=0,yi=0,ni=1;return Array.isArray(Ta)||Nr(Ta)||Jr(Ta)||Ta instanceof ArrayBuffer?Ei=Ta:typeof Ta=="number"?Yn=Ta|0:Ta&&("data"in Ta&&(Ei=Ta.data),"usage"in Ta&&(ca=xa[Ta.usage]),"type"in Ta&&(yi=qn[Ta.type]),"dimension"in Ta&&(ni=Ta.dimension|0),"length"in Ta&&(Yn=Ta.length|0)),wa.bind(),Ei?eo(wa,Ei,ca,yi,ni,za):(Yn&&At.bufferData(wa.type,Yn,ca),wa.dtype=yi||_r,wa.usage=ca,wa.dimension=ni,wa.byteLength=Yn),Dr.profile&&(wa.stats.size=wa.byteLength*yr[wa.dtype]),Ii}function si(Ta,ca){At.bufferSubData(wa.type,ca,Ta)}function $i(Ta,ca){var Ei=(ca||0)|0,Yn;if(wa.bind(),Nr(Ta)||Ta instanceof ArrayBuffer)si(Ta,Ei);else if(Array.isArray(Ta)){if(Ta.length>0){if(typeof Ta[0]=="number"){var yi=H.allocType(wa.dtype,Ta.length);nn(yi,Ta),si(yi,Ei),H.freeType(yi)}else if(Array.isArray(Ta[0])||Nr(Ta[0])){Yn=ea(Ta);var ni=ba(Ta,Yn,wa.dtype);si(ni,Ei),H.freeType(ni)}}}else if(Jr(Ta)){Yn=Ta.shape;var Ji=Ta.stride,Ho=0,ji=0,no=0,di=0;Yn.length===1?(Ho=Yn[0],ji=1,no=Ji[0],di=0):Yn.length===2&&(Ho=Yn[0],ji=Yn[1],no=Ji[0],di=Ji[1]);var jo=Array.isArray(Ta.data)?wa.dtype:br(Ta.data),rs=H.allocType(jo,Ho*ji);wn(rs,Ta.data,Ho,ji,no,di,Ta.offset),si(rs,Ei),H.freeType(rs)}return Ii}return ga||Ii(gn),Ii._reglType="buffer",Ii._buffer=wa,Ii.subdata=$i,Dr.profile&&(Ii.stats=wa.stats),Ii.destroy=function(){Bi(wa)},Ii}function Oa(){Dt(Rn).forEach(function(gn){gn.buffer=At.createBuffer(),At.bindBuffer(gn.type,gn.buffer),At.bufferData(gn.type,gn.persistentData||gn.byteLength,gn.usage)})}return Dr.profile&&(kr.getTotalBufferSize=function(){var gn=0;return Object.keys(Rn).forEach(function(Kn){gn+=Rn[Kn].stats.size}),gn}),{create:fi,createStream:ei,destroyStream:ti,clear:function(){Dt(Rn).forEach(Bi),ri.forEach(Bi)},getBuffer:function(gn){return gn&&gn._buffer instanceof Pn?gn._buffer:null},restore:Oa,_initBuffer:eo}}var Fn=0,va=0,Da=1,Pa=1,Fa=4,$a=4,oa={points:Fn,point:va,lines:Da,line:Pa,triangles:Fa,triangle:$a,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},zi=0,Gi=1,qt=4,Ct=5120,Ur=5121,Qr=5122,tn=5123,Xr=5124,en=5125,Tn=34963,hn=35040,Rt=35044;function xr(At,kr,Dr,Hn){var Ca={},Rn=0,Pn={uint8:Ur,uint16:tn};kr.oes_element_index_uint&&(Pn.uint32=en);function ri(Oa){this.id=Rn++,Ca[this.id]=this,this.buffer=Oa,this.primType=qt,this.vertCount=0,this.type=0}ri.prototype.bind=function(){this.buffer.bind()};var ei=[];function ti(Oa){var gn=ei.pop();return gn||(gn=new ri(Dr.create(null,Tn,!0,!1)._buffer)),eo(gn,Oa,hn,-1,-1,0,0),gn}function pi(Oa){ei.push(Oa)}function eo(Oa,gn,Kn,ga,za,wa,Ii){Oa.buffer.bind();var si;if(gn){var $i=Ii;!Ii&&(!Nr(gn)||Jr(gn)&&!Nr(gn.data))&&($i=kr.oes_element_index_uint?en:tn),Dr._initBuffer(Oa.buffer,gn,Kn,$i,3)}else At.bufferData(Tn,wa,Kn),Oa.buffer.dtype=si||Ur,Oa.buffer.usage=Kn,Oa.buffer.dimension=3,Oa.buffer.byteLength=wa;if(si=Ii,!Ii){switch(Oa.buffer.dtype){case Ur:case Ct:si=Ur;break;case tn:case Qr:si=tn;break;case en:case Xr:si=en;break}Oa.buffer.dtype=si}Oa.type=si;var Ta=za;Ta<0&&(Ta=Oa.buffer.byteLength,si===tn?Ta>>=1:si===en&&(Ta>>=2)),Oa.vertCount=Ta;var ca=ga;if(ga<0){ca=qt;var Ei=Oa.buffer.dimension;Ei===1&&(ca=zi),Ei===2&&(ca=Gi),Ei===3&&(ca=qt)}Oa.primType=ca}function Bi(Oa){Hn.elementsCount--,delete Ca[Oa.id],Oa.buffer.destroy(),Oa.buffer=null}function fi(Oa,gn){var Kn=Dr.create(null,Tn,!0),ga=new ri(Kn._buffer);Hn.elementsCount++;function za(wa){if(!wa)Kn(),ga.primType=qt,ga.vertCount=0,ga.type=Ur;else if(typeof wa=="number")Kn(wa),ga.primType=qt,ga.vertCount=wa|0,ga.type=Ur;else{var Ii=null,si=Rt,$i=-1,Ta=-1,ca=0,Ei=0;Array.isArray(wa)||Nr(wa)||Jr(wa)?Ii=wa:("data"in wa&&(Ii=wa.data),"usage"in wa&&(si=xa[wa.usage]),"primitive"in wa&&($i=oa[wa.primitive]),"count"in wa&&(Ta=wa.count|0),"type"in wa&&(Ei=Pn[wa.type]),"length"in wa?ca=wa.length|0:(ca=Ta,Ei===tn||Ei===Qr?ca*=2:(Ei===en||Ei===Xr)&&(ca*=4))),eo(ga,Ii,si,$i,Ta,ca,Ei)}return za}return za(Oa),za._reglType="elements",za._elements=ga,za.subdata=function(wa,Ii){return Kn.subdata(wa,Ii),za},za.destroy=function(){Bi(ga)},za}return{create:fi,createStream:ti,destroyStream:pi,getElements:function(Oa){return typeof Oa=="function"&&Oa._elements instanceof ri?Oa._elements:null},clear:function(){Dt(Ca).forEach(Bi)}}}var Wr=new Float32Array(1),An=new Uint32Array(Wr.buffer),Xn=5123;function na(At){for(var kr=H.allocType(Xn,At.length),Dr=0;Dr<At.length;++Dr)if(isNaN(At[Dr]))kr[Dr]=65535;else if(At[Dr]===1/0)kr[Dr]=31744;else if(At[Dr]===-1/0)kr[Dr]=64512;else{Wr[0]=At[Dr];var Hn=An[0],Ca=Hn>>>31<<15,Rn=(Hn<<1>>>24)-127,Pn=Hn>>13&1023;if(Rn<-24)kr[Dr]=Ca;else if(Rn<-14){var ri=-14-Rn;kr[Dr]=Ca+(Pn+1024>>ri)}else Rn>15?kr[Dr]=Ca+31744:kr[Dr]=Ca+(Rn+15<<10)+Pn}return kr}function ra(At){return Array.isArray(At)||Nr(At)}var Sn=34467,Wn=3553,Fi=34067,Ya=34069,Wi=6408,uo=6406,Ao=6407,wo=6409,Uo=6410,Ri=32854,ps=32855,as=36194,el=32819,As=32820,hs=33635,es=34042,tl=6402,Ks=34041,pl=35904,Ss=35906,ls=36193,Lo=33776,Es=33777,ml=33778,zl=33779,Bl=35986,Fs=35987,Di=34798,_o=35840,Nl=35841,Vs=35842,Ko=35843,jl=36196,rl=5121,yl=5123,Cu=5125,yo=5126,Ps=10242,ms=10243,Kl=10497,Jl=33071,Wo=33648,pu=10240,_u=10241,Xs=9728,Pl=9729,Gl=9984,Yl=9985,tc=9986,bf=9987,Qc=33170,ff=4352,Wh=4353,Dh=4354,Ll=34046,jc=3317,Yh=37440,hc=37441,rc=37443,dc=37444,hf=33984,au=[Gl,tc,Yl,bf],nc=[0,wo,Uo,Ao,Wi],Js={};Js[wo]=Js[uo]=Js[tl]=1,Js[Ks]=Js[Uo]=2,Js[Ao]=Js[pl]=3,Js[Wi]=Js[Ss]=4;function Ul(At){return"[object "+At+"]"}var Df=Ul("HTMLCanvasElement"),Cc=Ul("OffscreenCanvas"),Wf=Ul("CanvasRenderingContext2D"),mu=Ul("ImageBitmap"),Vd=Ul("HTMLImageElement"),Ws=Ul("HTMLVideoElement"),cv=Object.keys(st).concat([Df,Cc,Wf,mu,Vd,Ws]),Tl=[];Tl[rl]=1,Tl[yo]=4,Tl[ls]=2,Tl[yl]=2,Tl[Cu]=4;var Zo=[];Zo[Ri]=2,Zo[ps]=2,Zo[as]=2,Zo[Ks]=4,Zo[Lo]=.5,Zo[Es]=.5,Zo[ml]=1,Zo[zl]=1,Zo[Bl]=.5,Zo[Fs]=1,Zo[Di]=1,Zo[_o]=.5,Zo[Nl]=.25,Zo[Vs]=.5,Zo[Ko]=.25,Zo[jl]=.5;function dh(At){return Array.isArray(At)&&(At.length===0||typeof At[0]=="number")}function df(At){if(!Array.isArray(At))return!1;var kr=At.length;return!(kr===0||!ra(At[0]))}function Hu(At){return Object.prototype.toString.call(At)}function Zh(At){return Hu(At)===Df}function Yf(At){return Hu(At)===Cc}function wh(At){return Hu(At)===Wf}function ac(At){return Hu(At)===mu}function Cd(At){return Hu(At)===Vd}function ad(At){return Hu(At)===Ws}function Th(At){if(!At)return!1;var kr=Hu(At);return cv.indexOf(kr)>=0?!0:dh(At)||df(At)||Jr(At)}function Zf(At){return st[Object.prototype.toString.call(At)]|0}function $h(At,kr){var Dr=kr.length;switch(At.type){case rl:case yl:case Cu:case yo:var Hn=H.allocType(At.type,Dr);Hn.set(kr),At.data=Hn;break;case ls:At.data=na(kr);break}}function Kh(At,kr){return H.allocType(At.type===ls?yo:At.type,kr)}function vf(At,kr){At.type===ls?(At.data=na(kr),H.freeType(kr)):At.data=kr}function id(At,kr,Dr,Hn,Ca,Rn){for(var Pn=At.width,ri=At.height,ei=At.channels,ti=Pn*ri*ei,pi=Kh(At,ti),eo=0,Bi=0;Bi<ri;++Bi)for(var fi=0;fi<Pn;++fi)for(var Oa=0;Oa<ei;++Oa)pi[eo++]=kr[Dr*fi+Hn*Bi+Ca*Oa+Rn];vf(At,pi)}function Of(At,kr,Dr,Hn,Ca,Rn){var Pn;if(typeof Zo[At]<"u"?Pn=Zo[At]:Pn=Js[At]*Tl[kr],Rn&&(Pn*=6),Ca){for(var ri=0,ei=Dr;ei>=1;)ri+=Pn*ei*ei,ei/=2;return ri}else return Pn*Dr*Hn}function wf(At,kr,Dr,Hn,Ca,Rn,Pn){var ri={"don't care":ff,"dont care":ff,nice:Dh,fast:Wh},ei={repeat:Kl,clamp:Jl,mirror:Wo},ti={nearest:Xs,linear:Pl},pi=v({mipmap:bf,"nearest mipmap nearest":Gl,"linear mipmap nearest":Yl,"nearest mipmap linear":tc,"linear mipmap linear":bf},ti),eo={none:0,browser:dc},Bi={uint8:rl,rgba4:el,rgb565:hs,"rgb5 a1":As},fi={alpha:uo,luminance:wo,"luminance alpha":Uo,rgb:Ao,rgba:Wi,rgba4:Ri,"rgb5 a1":ps,rgb565:as},Oa={};kr.ext_srgb&&(fi.srgb=pl,fi.srgba=Ss),kr.oes_texture_float&&(Bi.float32=Bi.float=yo),kr.oes_texture_half_float&&(Bi.float16=Bi["half float"]=ls),kr.webgl_depth_texture&&(v(fi,{depth:tl,"depth stencil":Ks}),v(Bi,{uint16:yl,uint32:Cu,"depth stencil":es})),kr.webgl_compressed_texture_s3tc&&v(Oa,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":Es,"rgba s3tc dxt3":ml,"rgba s3tc dxt5":zl}),kr.webgl_compressed_texture_atc&&v(Oa,{"rgb atc":Bl,"rgba atc explicit alpha":Fs,"rgba atc interpolated alpha":Di}),kr.webgl_compressed_texture_pvrtc&&v(Oa,{"rgb pvrtc 4bppv1":_o,"rgb pvrtc 2bppv1":Nl,"rgba pvrtc 4bppv1":Vs,"rgba pvrtc 2bppv1":Ko}),kr.webgl_compressed_texture_etc1&&(Oa["rgb etc1"]=jl);var gn=Array.prototype.slice.call(At.getParameter(Sn));Object.keys(Oa).forEach(function(X){var ge=Oa[X];gn.indexOf(ge)>=0&&(fi[X]=ge)});var Kn=Object.keys(fi);Dr.textureFormats=Kn;var ga=[];Object.keys(fi).forEach(function(X){var ge=fi[X];ga[ge]=X});var za=[];Object.keys(Bi).forEach(function(X){var ge=Bi[X];za[ge]=X});var wa=[];Object.keys(ti).forEach(function(X){var ge=ti[X];wa[ge]=X});var Ii=[];Object.keys(pi).forEach(function(X){var ge=pi[X];Ii[ge]=X});var si=[];Object.keys(ei).forEach(function(X){var ge=ei[X];si[ge]=X});var $i=Kn.reduce(function(X,ge){var ne=fi[ge];return ne===wo||ne===uo||ne===wo||ne===Uo||ne===tl||ne===Ks||kr.ext_srgb&&(ne===pl||ne===Ss)?X[ne]=ne:ne===ps||ge.indexOf("rgba")>=0?X[ne]=Wi:X[ne]=Ao,X},{});function Ta(){this.internalformat=Wi,this.format=Wi,this.type=rl,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=dc,this.width=0,this.height=0,this.channels=0}function ca(X,ge){X.internalformat=ge.internalformat,X.format=ge.format,X.type=ge.type,X.compressed=ge.compressed,X.premultiplyAlpha=ge.premultiplyAlpha,X.flipY=ge.flipY,X.unpackAlignment=ge.unpackAlignment,X.colorSpace=ge.colorSpace,X.width=ge.width,X.height=ge.height,X.channels=ge.channels}function Ei(X,ge){if(!(typeof ge!="object"||!ge)){if("premultiplyAlpha"in ge&&(X.premultiplyAlpha=ge.premultiplyAlpha),"flipY"in ge&&(X.flipY=ge.flipY),"alignment"in ge&&(X.unpackAlignment=ge.alignment),"colorSpace"in ge&&(X.colorSpace=eo[ge.colorSpace]),"type"in ge){var ne=ge.type;X.type=Bi[ne]}var Se=X.width,Je=X.height,_t=X.channels,Tt=!1;"shape"in ge?(Se=ge.shape[0],Je=ge.shape[1],ge.shape.length===3&&(_t=ge.shape[2],Tt=!0)):("radius"in ge&&(Se=Je=ge.radius),"width"in ge&&(Se=ge.width),"height"in ge&&(Je=ge.height),"channels"in ge&&(_t=ge.channels,Tt=!0)),X.width=Se|0,X.height=Je|0,X.channels=_t|0;var it=!1;if("format"in ge){var dt=ge.format,Lt=X.internalformat=fi[dt];X.format=$i[Lt],dt in Bi&&("type"in ge||(X.type=Bi[dt])),dt in Oa&&(X.compressed=!0),it=!0}!Tt&&it?X.channels=Js[X.format]:Tt&&!it&&X.channels!==nc[X.format]&&(X.format=X.internalformat=nc[X.channels])}}function Yn(X){At.pixelStorei(Yh,X.flipY),At.pixelStorei(hc,X.premultiplyAlpha),At.pixelStorei(rc,X.colorSpace),At.pixelStorei(jc,X.unpackAlignment)}function yi(){Ta.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function ni(X,ge){var ne=null;if(Th(ge)?ne=ge:ge&&(Ei(X,ge),"x"in ge&&(X.xOffset=ge.x|0),"y"in ge&&(X.yOffset=ge.y|0),Th(ge.data)&&(ne=ge.data)),ge.copy){var Se=Ca.viewportWidth,Je=Ca.viewportHeight;X.width=X.width||Se-X.xOffset,X.height=X.height||Je-X.yOffset,X.needsCopy=!0}else if(!ne)X.width=X.width||1,X.height=X.height||1,X.channels=X.channels||4;else if(Nr(ne))X.channels=X.channels||4,X.data=ne,!("type"in ge)&&X.type===rl&&(X.type=Zf(ne));else if(dh(ne))X.channels=X.channels||4,$h(X,ne),X.alignment=1,X.needsFree=!0;else if(Jr(ne)){var _t=ne.data;!Array.isArray(_t)&&X.type===rl&&(X.type=Zf(_t));var Tt=ne.shape,it=ne.stride,dt,Lt,or,er,ur,mr;Tt.length===3?(or=Tt[2],mr=it[2]):(or=1,mr=1),dt=Tt[0],Lt=Tt[1],er=it[0],ur=it[1],X.alignment=1,X.width=dt,X.height=Lt,X.channels=or,X.format=X.internalformat=nc[or],X.needsFree=!0,id(X,_t,er,ur,mr,ne.offset)}else if(Zh(ne)||Yf(ne)||wh(ne))Zh(ne)||Yf(ne)?X.element=ne:X.element=ne.canvas,X.width=X.element.width,X.height=X.element.height,X.channels=4;else if(ac(ne))X.element=ne,X.width=ne.width,X.height=ne.height,X.channels=4;else if(Cd(ne))X.element=ne,X.width=ne.naturalWidth,X.height=ne.naturalHeight,X.channels=4;else if(ad(ne))X.element=ne,X.width=ne.videoWidth,X.height=ne.videoHeight,X.channels=4;else if(df(ne)){var dr=X.width||ne[0].length,Yt=X.height||ne.length,ar=X.channels;ra(ne[0][0])?ar=ar||ne[0][0].length:ar=ar||1;for(var tr=$e.shape(ne),Yr=1,un=0;un<tr.length;++un)Yr*=tr[un];var En=Kh(X,Yr);$e.flatten(ne,tr,"",En),vf(X,En),X.alignment=1,X.width=dr,X.height=Yt,X.channels=ar,X.format=X.internalformat=nc[ar],X.needsFree=!0}X.type===yo||X.type}function Ji(X,ge,ne){var Se=X.element,Je=X.data,_t=X.internalformat,Tt=X.format,it=X.type,dt=X.width,Lt=X.height;Yn(X),Se?At.texImage2D(ge,ne,Tt,Tt,it,Se):X.compressed?At.compressedTexImage2D(ge,ne,_t,dt,Lt,0,Je):X.needsCopy?(Hn(),At.copyTexImage2D(ge,ne,Tt,X.xOffset,X.yOffset,dt,Lt,0)):At.texImage2D(ge,ne,Tt,dt,Lt,0,Tt,it,Je||null)}function Ho(X,ge,ne,Se,Je){var _t=X.element,Tt=X.data,it=X.internalformat,dt=X.format,Lt=X.type,or=X.width,er=X.height;Yn(X),_t?At.texSubImage2D(ge,Je,ne,Se,dt,Lt,_t):X.compressed?At.compressedTexSubImage2D(ge,Je,ne,Se,it,or,er,Tt):X.needsCopy?(Hn(),At.copyTexSubImage2D(ge,Je,ne,Se,X.xOffset,X.yOffset,or,er)):At.texSubImage2D(ge,Je,ne,Se,or,er,dt,Lt,Tt)}var ji=[];function no(){return ji.pop()||new yi}function di(X){X.needsFree&&H.freeType(X.data),yi.call(X),ji.push(X)}function jo(){Ta.call(this),this.genMipmaps=!1,this.mipmapHint=ff,this.mipmask=0,this.images=Array(16)}function rs(X,ge,ne){var Se=X.images[0]=no();X.mipmask=1,Se.width=X.width=ge,Se.height=X.height=ne,Se.channels=X.channels=4}function ds(X,ge){var ne=null;if(Th(ge))ne=X.images[0]=no(),ca(ne,X),ni(ne,ge),X.mipmask=1;else if(Ei(X,ge),Array.isArray(ge.mipmap))for(var Se=ge.mipmap,Je=0;Je<Se.length;++Je)ne=X.images[Je]=no(),ca(ne,X),ne.width>>=Je,ne.height>>=Je,ni(ne,Se[Je]),X.mipmask|=1<<Je;else ne=X.images[0]=no(),ca(ne,X),ni(ne,ge),X.mipmask=1;ca(X,X.images[0]),X.compressed&&(X.internalformat===Lo||X.internalformat===Es||X.internalformat===ml||X.internalformat)}function _l(X,ge){for(var ne=X.images,Se=0;Se<ne.length;++Se){if(!ne[Se])return;Ji(ne[Se],ge,Se)}}var vs=[];function Lu(){var X=vs.pop()||new jo;Ta.call(X),X.mipmask=0;for(var ge=0;ge<16;++ge)X.images[ge]=null;return X}function ll(X){for(var ge=X.images,ne=0;ne<ge.length;++ne)ge[ne]&&di(ge[ne]),ge[ne]=null;vs.push(X)}function wu(){this.minFilter=Xs,this.magFilter=Xs,this.wrapS=Jl,this.wrapT=Jl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=ff}function Gu(X,ge){if("min"in ge){var ne=ge.min;X.minFilter=pi[ne],au.indexOf(X.minFilter)>=0&&!("faces"in ge)&&(X.genMipmaps=!0)}if("mag"in ge){var Se=ge.mag;X.magFilter=ti[Se]}var Je=X.wrapS,_t=X.wrapT;if("wrap"in ge){var Tt=ge.wrap;typeof Tt=="string"?Je=_t=ei[Tt]:Array.isArray(Tt)&&(Je=ei[Tt[0]],_t=ei[Tt[1]])}else{if("wrapS"in ge){var it=ge.wrapS;Je=ei[it]}if("wrapT"in ge){var dt=ge.wrapT;_t=ei[dt]}}if(X.wrapS=Je,X.wrapT=_t,"anisotropic"in ge&&(ge.anisotropic,X.anisotropic=ge.anisotropic),"mipmap"in ge){var Lt=!1;switch(typeof ge.mipmap){case"string":X.mipmapHint=ri[ge.mipmap],X.genMipmaps=!0,Lt=!0;break;case"boolean":Lt=X.genMipmaps=ge.mipmap;break;case"object":X.genMipmaps=!1,Lt=!0;break}Lt&&!("min"in ge)&&(X.minFilter=Gl)}}function oc(X,ge){At.texParameteri(ge,_u,X.minFilter),At.texParameteri(ge,pu,X.magFilter),At.texParameteri(ge,Ps,X.wrapS),At.texParameteri(ge,ms,X.wrapT),kr.ext_texture_filter_anisotropic&&At.texParameteri(ge,Ll,X.anisotropic),X.genMipmaps&&(At.hint(Qc,X.mipmapHint),At.generateMipmap(ge))}var Mf=0,su={},gu=Dr.maxTextureUnits,ko=Array(gu).map(function(){return null});function sc(X){Ta.call(this),this.mipmask=0,this.internalformat=Wi,this.id=Mf++,this.refCount=1,this.target=X,this.texture=At.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new wu,Pn.profile&&(this.stats={size:0})}function $s(X){At.activeTexture(hf),At.bindTexture(X.target,X.texture)}function Hl(){var X=ko[0];X?At.bindTexture(X.target,X.texture):At.bindTexture(Wn,null)}function gc(X){var ge=X.texture,ne=X.unit,Se=X.target;ne>=0&&(At.activeTexture(hf+ne),At.bindTexture(Se,null),ko[ne]=null),At.deleteTexture(ge),X.texture=null,X.params=null,X.pixels=null,X.refCount=0,delete su[X.id],Rn.textureCount--}v(sc.prototype,{bind:function(){var X=this;X.bindCount+=1;var ge=X.unit;if(ge<0){for(var ne=0;ne<gu;++ne){var Se=ko[ne];if(Se){if(Se.bindCount>0)continue;Se.unit=-1}ko[ne]=X,ge=ne;break}Pn.profile&&Rn.maxTextureUnits<ge+1&&(Rn.maxTextureUnits=ge+1),X.unit=ge,At.activeTexture(hf+ge),At.bindTexture(X.target,X.texture)}return ge},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&gc(this)}});function _c(X,ge){var ne=new sc(Wn);su[ne.id]=ne,Rn.textureCount++;function Se(Tt,it){var dt=ne.texInfo;wu.call(dt);var Lt=Lu();return typeof Tt=="number"?typeof it=="number"?rs(Lt,Tt|0,it|0):rs(Lt,Tt|0,Tt|0):Tt?(Gu(dt,Tt),ds(Lt,Tt)):rs(Lt,1,1),dt.genMipmaps&&(Lt.mipmask=(Lt.width<<1)-1),ne.mipmask=Lt.mipmask,ca(ne,Lt),ne.internalformat=Lt.internalformat,Se.width=Lt.width,Se.height=Lt.height,$s(ne),_l(Lt,Wn),oc(dt,Wn),Hl(),ll(Lt),Pn.profile&&(ne.stats.size=Of(ne.internalformat,ne.type,Lt.width,Lt.height,dt.genMipmaps,!1)),Se.format=ga[ne.internalformat],Se.type=za[ne.type],Se.mag=wa[dt.magFilter],Se.min=Ii[dt.minFilter],Se.wrapS=si[dt.wrapS],Se.wrapT=si[dt.wrapT],Se}function Je(Tt,it,dt,Lt){var or=it|0,er=dt|0,ur=Lt|0,mr=no();return ca(mr,ne),mr.width=0,mr.height=0,ni(mr,Tt),mr.width=mr.width||(ne.width>>ur)-or,mr.height=mr.height||(ne.height>>ur)-er,$s(ne),Ho(mr,Wn,or,er,ur),Hl(),di(mr),Se}function _t(Tt,it){var dt=Tt|0,Lt=it|0||dt;if(dt===ne.width&&Lt===ne.height)return Se;Se.width=ne.width=dt,Se.height=ne.height=Lt,$s(ne);for(var or=0;ne.mipmask>>or;++or){var er=dt>>or,ur=Lt>>or;if(!er||!ur)break;At.texImage2D(Wn,or,ne.format,er,ur,0,ne.format,ne.type,null)}return Hl(),Pn.profile&&(ne.stats.size=Of(ne.internalformat,ne.type,dt,Lt,!1,!1)),Se}return Se(X,ge),Se.subimage=Je,Se.resize=_t,Se._reglType="texture2d",Se._texture=ne,Pn.profile&&(Se.stats=ne.stats),Se.destroy=function(){ne.decRef()},Se}function Vo(X,ge,ne,Se,Je,_t){var Tt=new sc(Fi);su[Tt.id]=Tt,Rn.cubeCount++;var it=new Array(6);function dt(er,ur,mr,dr,Yt,ar){var tr,Yr=Tt.texInfo;for(wu.call(Yr),tr=0;tr<6;++tr)it[tr]=Lu();if(typeof er=="number"||!er){var un=er|0||1;for(tr=0;tr<6;++tr)rs(it[tr],un,un)}else if(typeof er=="object")if(ur)ds(it[0],er),ds(it[1],ur),ds(it[2],mr),ds(it[3],dr),ds(it[4],Yt),ds(it[5],ar);else if(Gu(Yr,er),Ei(Tt,er),"faces"in er){var En=er.faces;for(tr=0;tr<6;++tr)ca(it[tr],Tt),ds(it[tr],En[tr])}else for(tr=0;tr<6;++tr)ds(it[tr],er);for(ca(Tt,it[0]),Yr.genMipmaps?Tt.mipmask=(it[0].width<<1)-1:Tt.mipmask=it[0].mipmask,Tt.internalformat=it[0].internalformat,dt.width=it[0].width,dt.height=it[0].height,$s(Tt),tr=0;tr<6;++tr)_l(it[tr],Ya+tr);for(oc(Yr,Fi),Hl(),Pn.profile&&(Tt.stats.size=Of(Tt.internalformat,Tt.type,dt.width,dt.height,Yr.genMipmaps,!0)),dt.format=ga[Tt.internalformat],dt.type=za[Tt.type],dt.mag=wa[Yr.magFilter],dt.min=Ii[Yr.minFilter],dt.wrapS=si[Yr.wrapS],dt.wrapT=si[Yr.wrapT],tr=0;tr<6;++tr)ll(it[tr]);return dt}function Lt(er,ur,mr,dr,Yt){var ar=mr|0,tr=dr|0,Yr=Yt|0,un=no();return ca(un,Tt),un.width=0,un.height=0,ni(un,ur),un.width=un.width||(Tt.width>>Yr)-ar,un.height=un.height||(Tt.height>>Yr)-tr,$s(Tt),Ho(un,Ya+er,ar,tr,Yr),Hl(),di(un),dt}function or(er){var ur=er|0;if(ur!==Tt.width){dt.width=Tt.width=ur,dt.height=Tt.height=ur,$s(Tt);for(var mr=0;mr<6;++mr)for(var dr=0;Tt.mipmask>>dr;++dr)At.texImage2D(Ya+mr,dr,Tt.format,ur>>dr,ur>>dr,0,Tt.format,Tt.type,null);return Hl(),Pn.profile&&(Tt.stats.size=Of(Tt.internalformat,Tt.type,dt.width,dt.height,!1,!0)),dt}}return dt(X,ge,ne,Se,Je,_t),dt.subimage=Lt,dt.resize=or,dt._reglType="textureCube",dt._texture=Tt,Pn.profile&&(dt.stats=Tt.stats),dt.destroy=function(){Tt.decRef()},dt}function Ms(){for(var X=0;X<gu;++X)At.activeTexture(hf+X),At.bindTexture(Wn,null),ko[X]=null;Dt(su).forEach(gc),Rn.cubeCount=0,Rn.textureCount=0}Pn.profile&&(Rn.getTotalTextureSize=function(){var X=0;return Object.keys(su).forEach(function(ge){X+=su[ge].stats.size}),X});function Rs(){for(var X=0;X<gu;++X){var ge=ko[X];ge&&(ge.bindCount=0,ge.unit=-1,ko[X]=null)}Dt(su).forEach(function(ne){ne.texture=At.createTexture(),At.bindTexture(ne.target,ne.texture);for(var Se=0;Se<32;++Se)if((ne.mipmask&1<<Se)!==0)if(ne.target===Wn)At.texImage2D(Wn,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);else for(var Je=0;Je<6;++Je)At.texImage2D(Ya+Je,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);oc(ne.texInfo,ne.target)})}function Me(){for(var X=0;X<gu;++X){var ge=ko[X];ge&&(ge.bindCount=0,ge.unit=-1,ko[X]=null),At.activeTexture(hf+X),At.bindTexture(Wn,null),At.bindTexture(Fi,null)}}return{create2D:_c,createCube:Vo,clear:Ms,getTexture:function(X){return null},restore:Rs,refresh:Me}}var ic=36161,ih=32854,Jh=32855,Xl=36194,Oh=33189,Hd=36168,od=34041,Ah=35907,sd=34836,Uc=34842,ld=34843,Su=[];Su[ih]=2,Su[Jh]=2,Su[Xl]=2,Su[Oh]=2,Su[Hd]=1,Su[od]=4,Su[Ah]=4,Su[sd]=16,Su[Uc]=8,Su[ld]=6;function qc(At,kr,Dr){return Su[At]*kr*Dr}var $f=function(At,kr,Dr,Hn,Ca){var Rn={rgba4:ih,rgb565:Xl,"rgb5 a1":Jh,depth:Oh,stencil:Hd,"depth stencil":od};kr.ext_srgb&&(Rn.srgba=Ah),kr.ext_color_buffer_half_float&&(Rn.rgba16f=Uc,Rn.rgb16f=ld),kr.webgl_color_buffer_float&&(Rn.rgba32f=sd);var Pn=[];Object.keys(Rn).forEach(function(fi){var Oa=Rn[fi];Pn[Oa]=fi});var ri=0,ei={};function ti(fi){this.id=ri++,this.refCount=1,this.renderbuffer=fi,this.format=ih,this.width=0,this.height=0,Ca.profile&&(this.stats={size:0})}ti.prototype.decRef=function(){--this.refCount<=0&&pi(this)};function pi(fi){var Oa=fi.renderbuffer;At.bindRenderbuffer(ic,null),At.deleteRenderbuffer(Oa),fi.renderbuffer=null,fi.refCount=0,delete ei[fi.id],Hn.renderbufferCount--}function eo(fi,Oa){var gn=new ti(At.createRenderbuffer());ei[gn.id]=gn,Hn.renderbufferCount++;function Kn(za,wa){var Ii=0,si=0,$i=ih;if(typeof za=="object"&&za){var Ta=za;if("shape"in Ta){var ca=Ta.shape;Ii=ca[0]|0,si=ca[1]|0}else"radius"in Ta&&(Ii=si=Ta.radius|0),"width"in Ta&&(Ii=Ta.width|0),"height"in Ta&&(si=Ta.height|0);"format"in Ta&&($i=Rn[Ta.format])}else typeof za=="number"?(Ii=za|0,typeof wa=="number"?si=wa|0:si=Ii):za||(Ii=si=1);if(!(Ii===gn.width&&si===gn.height&&$i===gn.format))return Kn.width=gn.width=Ii,Kn.height=gn.height=si,gn.format=$i,At.bindRenderbuffer(ic,gn.renderbuffer),At.renderbufferStorage(ic,$i,Ii,si),Ca.profile&&(gn.stats.size=qc(gn.format,gn.width,gn.height)),Kn.format=Pn[gn.format],Kn}function ga(za,wa){var Ii=za|0,si=wa|0||Ii;return Ii===gn.width&&si===gn.height||(Kn.width=gn.width=Ii,Kn.height=gn.height=si,At.bindRenderbuffer(ic,gn.renderbuffer),At.renderbufferStorage(ic,gn.format,Ii,si),Ca.profile&&(gn.stats.size=qc(gn.format,gn.width,gn.height))),Kn}return Kn(fi,Oa),Kn.resize=ga,Kn._reglType="renderbuffer",Kn._renderbuffer=gn,Ca.profile&&(Kn.stats=gn.stats),Kn.destroy=function(){gn.decRef()},Kn}Ca.profile&&(Hn.getTotalRenderbufferSize=function(){var fi=0;return Object.keys(ei).forEach(function(Oa){fi+=ei[Oa].stats.size}),fi});function Bi(){Dt(ei).forEach(function(fi){fi.renderbuffer=At.createRenderbuffer(),At.bindRenderbuffer(ic,fi.renderbuffer),At.renderbufferStorage(ic,fi.format,fi.width,fi.height)}),At.bindRenderbuffer(ic,null)}return{create:eo,clear:function(){Dt(ei).forEach(pi)},restore:Bi}},iu=36160,zf=36161,wc=3553,Vc=34069,yu=36064,vh=36096,Tf=36128,Kf=33306,zh=36053,Gd=36193,Tv=5121,ph=5126,Nh=6407,ef=6408,Fh=[];Fh[ef]=4,Fh[Nh]=3;var vc=[];vc[Tv]=1,vc[ph]=4,vc[Gd]=2;function mh(At,kr,Dr,Hn,Ca,Rn){var Pn={cur:null,next:null,dirty:!1,setFBO:null},ri=["rgba"],ei=["rgba4","rgb565","rgb5 a1"];kr.ext_srgb&&ei.push("srgba"),kr.ext_color_buffer_half_float&&ei.push("rgba16f","rgb16f"),kr.webgl_color_buffer_float&&ei.push("rgba32f"),kr.oes_texture_half_float,kr.oes_texture_float;function ti(Yn,yi,ni){this.target=Yn,this.texture=yi,this.renderbuffer=ni;var Ji=0,Ho=0;yi?(Ji=yi.width,Ho=yi.height):ni&&(Ji=ni.width,Ho=ni.height),this.width=Ji,this.height=Ho}function pi(Yn){Yn&&(Yn.texture&&Yn.texture._texture.decRef(),Yn.renderbuffer&&Yn.renderbuffer._renderbuffer.decRef())}function eo(Yn,yi,ni){if(Yn)if(Yn.texture){var Ji=Yn.texture._texture;Math.max(1,Ji.width),Math.max(1,Ji.height),Ji.refCount+=1}else{var Ho=Yn.renderbuffer._renderbuffer;Ho.refCount+=1}}function Bi(Yn,yi){yi&&(yi.texture?At.framebufferTexture2D(iu,Yn,yi.target,yi.texture._texture.texture,0):At.framebufferRenderbuffer(iu,Yn,zf,yi.renderbuffer._renderbuffer.renderbuffer))}function fi(Yn){var yi=wc,ni=null,Ji=null,Ho=Yn;typeof Yn=="object"&&(Ho=Yn.data,"target"in Yn&&(yi=Yn.target|0));var ji=Ho._reglType;return ji==="texture2d"||ji==="textureCube"?ni=Ho:ji==="renderbuffer"&&(Ji=Ho,yi=zf),new ti(yi,ni,Ji)}function Oa(Yn,yi,ni,Ji,Ho){if(ni){var ji=Hn.create2D({width:Yn,height:yi,format:Ji,type:Ho});return ji._texture.refCount=0,new ti(wc,ji,null)}else{var no=Ca.create({width:Yn,height:yi,format:Ji});return no._renderbuffer.refCount=0,new ti(zf,null,no)}}function gn(Yn){return Yn&&(Yn.texture||Yn.renderbuffer)}function Kn(Yn,yi,ni){Yn&&(Yn.texture?Yn.texture.resize(yi,ni):Yn.renderbuffer&&Yn.renderbuffer.resize(yi,ni),Yn.width=yi,Yn.height=ni)}var ga=0,za={};function wa(){this.id=ga++,za[this.id]=this,this.framebuffer=At.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Ii(Yn){Yn.colorAttachments.forEach(pi),pi(Yn.depthAttachment),pi(Yn.stencilAttachment),pi(Yn.depthStencilAttachment)}function si(Yn){var yi=Yn.framebuffer;At.deleteFramebuffer(yi),Yn.framebuffer=null,Rn.framebufferCount--,delete za[Yn.id]}function $i(Yn){var yi;At.bindFramebuffer(iu,Yn.framebuffer);var ni=Yn.colorAttachments;for(yi=0;yi<ni.length;++yi)Bi(yu+yi,ni[yi]);for(yi=ni.length;yi<Dr.maxColorAttachments;++yi)At.framebufferTexture2D(iu,yu+yi,wc,null,0);At.framebufferTexture2D(iu,Kf,wc,null,0),At.framebufferTexture2D(iu,vh,wc,null,0),At.framebufferTexture2D(iu,Tf,wc,null,0),Bi(vh,Yn.depthAttachment),Bi(Tf,Yn.stencilAttachment),Bi(Kf,Yn.depthStencilAttachment);var Ji=At.checkFramebufferStatus(iu);At.isContextLost(),At.bindFramebuffer(iu,Pn.next?Pn.next.framebuffer:null),Pn.cur=Pn.next,At.getError()}function Ta(Yn,yi){var ni=new wa;Rn.framebufferCount++;function Ji(ji,no){var di,jo=0,rs=0,ds=!0,_l=!0,vs=null,Lu=!0,ll="rgba",wu="uint8",Gu=1,oc=null,Mf=null,su=null,gu=!1;if(typeof ji=="number")jo=ji|0,rs=no|0||jo;else if(!ji)jo=rs=1;else{var ko=ji;if("shape"in ko){var sc=ko.shape;jo=sc[0],rs=sc[1]}else"radius"in ko&&(jo=rs=ko.radius),"width"in ko&&(jo=ko.width),"height"in ko&&(rs=ko.height);("color"in ko||"colors"in ko)&&(vs=ko.color||ko.colors),vs||("colorCount"in ko&&(Gu=ko.colorCount|0),"colorTexture"in ko&&(Lu=!!ko.colorTexture,ll="rgba4"),"colorType"in ko&&(wu=ko.colorType,Lu||(wu==="half float"||wu==="float16"?ll="rgba16f":(wu==="float"||wu==="float32")&&(ll="rgba32f"))),"colorFormat"in ko&&(ll=ko.colorFormat,ri.indexOf(ll)>=0?Lu=!0:ei.indexOf(ll)>=0&&(Lu=!1))),("depthTexture"in ko||"depthStencilTexture"in ko)&&(gu=!!(ko.depthTexture||ko.depthStencilTexture)),"depth"in ko&&(typeof ko.depth=="boolean"?ds=ko.depth:(oc=ko.depth,_l=!1)),"stencil"in ko&&(typeof ko.stencil=="boolean"?_l=ko.stencil:(Mf=ko.stencil,ds=!1)),"depthStencil"in ko&&(typeof ko.depthStencil=="boolean"?ds=_l=ko.depthStencil:(su=ko.depthStencil,ds=!1,_l=!1))}var $s=null,Hl=null,gc=null,_c=null;if(Array.isArray(vs))$s=vs.map(fi);else if(vs)$s=[fi(vs)];else for($s=new Array(Gu),di=0;di<Gu;++di)$s[di]=Oa(jo,rs,Lu,ll,wu);for(jo=jo||$s[0].width,rs=rs||$s[0].height,oc?Hl=fi(oc):ds&&!_l&&(Hl=Oa(jo,rs,gu,"depth","uint32")),Mf?gc=fi(Mf):_l&&!ds&&(gc=Oa(jo,rs,!1,"stencil","uint8")),su?_c=fi(su):!oc&&!Mf&&_l&&ds&&(_c=Oa(jo,rs,gu,"depth stencil","depth stencil")),di=0;di<$s.length;++di)eo($s[di]),$s[di]&&$s[di].texture&&Fh[$s[di].texture._texture.format]*vc[$s[di].texture._texture.type];return eo(Hl),eo(gc),eo(_c),Ii(ni),ni.width=jo,ni.height=rs,ni.colorAttachments=$s,ni.depthAttachment=Hl,ni.stencilAttachment=gc,ni.depthStencilAttachment=_c,Ji.color=$s.map(gn),Ji.depth=gn(Hl),Ji.stencil=gn(gc),Ji.depthStencil=gn(_c),Ji.width=ni.width,Ji.height=ni.height,$i(ni),Ji}function Ho(ji,no){var di=Math.max(ji|0,1),jo=Math.max(no|0||di,1);if(di===ni.width&&jo===ni.height)return Ji;for(var rs=ni.colorAttachments,ds=0;ds<rs.length;++ds)Kn(rs[ds],di,jo);return Kn(ni.depthAttachment,di,jo),Kn(ni.stencilAttachment,di,jo),Kn(ni.depthStencilAttachment,di,jo),ni.width=Ji.width=di,ni.height=Ji.height=jo,$i(ni),Ji}return Ji(Yn,yi),v(Ji,{resize:Ho,_reglType:"framebuffer",_framebuffer:ni,destroy:function(){si(ni),Ii(ni)},use:function(ji){Pn.setFBO({framebuffer:Ji},ji)}})}function ca(Yn){var yi=Array(6);function ni(Ho){var ji,no={color:null},di=0,jo=null,rs="rgba",ds="uint8",_l=1;if(typeof Ho=="number")di=Ho|0;else if(!Ho)di=1;else{var vs=Ho;if("shape"in vs){var Lu=vs.shape;di=Lu[0]}else"radius"in vs&&(di=vs.radius|0),"width"in vs?di=vs.width|0:"height"in vs&&(di=vs.height|0);("color"in vs||"colors"in vs)&&(jo=vs.color||vs.colors),jo||("colorCount"in vs&&(_l=vs.colorCount|0),"colorType"in vs&&(ds=vs.colorType),"colorFormat"in vs&&(rs=vs.colorFormat)),"depth"in vs&&(no.depth=vs.depth),"stencil"in vs&&(no.stencil=vs.stencil),"depthStencil"in vs&&(no.depthStencil=vs.depthStencil)}var ll;if(jo)if(Array.isArray(jo))for(ll=[],ji=0;ji<jo.length;++ji)ll[ji]=jo[ji];else ll=[jo];else{ll=Array(_l);var wu={radius:di,format:rs,type:ds};for(ji=0;ji<_l;++ji)ll[ji]=Hn.createCube(wu)}for(no.color=Array(ll.length),ji=0;ji<ll.length;++ji){var Gu=ll[ji];di=di||Gu.width,no.color[ji]={target:Vc,data:ll[ji]}}for(ji=0;ji<6;++ji){for(var oc=0;oc<ll.length;++oc)no.color[oc].target=Vc+ji;ji>0&&(no.depth=yi[0].depth,no.stencil=yi[0].stencil,no.depthStencil=yi[0].depthStencil),yi[ji]?yi[ji](no):yi[ji]=Ta(no)}return v(ni,{width:di,height:di,color:ll})}function Ji(Ho){var ji,no=Ho|0;if(no===ni.width)return ni;var di=ni.color;for(ji=0;ji<di.length;++ji)di[ji].resize(no);for(ji=0;ji<6;++ji)yi[ji].resize(no);return ni.width=ni.height=no,ni}return ni(Yn),v(ni,{faces:yi,resize:Ji,_reglType:"framebufferCube",destroy:function(){yi.forEach(function(Ho){Ho.destroy()})}})}function Ei(){Pn.cur=null,Pn.next=null,Pn.dirty=!0,Dt(za).forEach(function(Yn){Yn.framebuffer=At.createFramebuffer(),$i(Yn)})}return v(Pn,{getFramebuffer:function(Yn){if(typeof Yn=="function"&&Yn._reglType==="framebuffer"){var yi=Yn._framebuffer;if(yi instanceof wa)return yi}return null},create:Ta,createCube:ca,clear:function(){Dt(za).forEach(si)},restore:Ei})}var ud=5126,yh=34962,uu=34963;function Hc(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=ud,this.offset=0,this.stride=0,this.divisor=0}function pf(At,kr,Dr,Hn,Ca,Rn,Pn){for(var ri=Dr.maxAttributes,ei=new Array(ri),ti=0;ti<ri;++ti)ei[ti]=new Hc;var pi=0,eo={},Bi={Record:Hc,scope:{},state:ei,currentVAO:null,targetVAO:null,restore:Oa()?si:function(){},createVAO:$i,getVAO:Kn,destroyBuffer:fi,setVAO:Oa()?ga:za,clear:Oa()?wa:function(){}};function fi(Ta){for(var ca=0;ca<ei.length;++ca){var Ei=ei[ca];Ei.buffer===Ta&&(At.disableVertexAttribArray(ca),Ei.buffer=null)}}function Oa(){return kr.oes_vertex_array_object}function gn(){return kr.angle_instanced_arrays}function Kn(Ta){return typeof Ta=="function"&&Ta._vao?Ta._vao:null}function ga(Ta){if(Ta!==Bi.currentVAO){var ca=Oa();Ta?ca.bindVertexArrayOES(Ta.vao):ca.bindVertexArrayOES(null),Bi.currentVAO=Ta}}function za(Ta){if(Ta!==Bi.currentVAO){if(Ta)Ta.bindAttrs();else{for(var ca=gn(),Ei=0;Ei<ei.length;++Ei){var Yn=ei[Ei];Yn.buffer?(At.enableVertexAttribArray(Ei),Yn.buffer.bind(),At.vertexAttribPointer(Ei,Yn.size,Yn.type,Yn.normalized,Yn.stride,Yn.offfset),ca&&Yn.divisor&&ca.vertexAttribDivisorANGLE(Ei,Yn.divisor)):(At.disableVertexAttribArray(Ei),At.vertexAttrib4f(Ei,Yn.x,Yn.y,Yn.z,Yn.w))}Pn.elements?At.bindBuffer(uu,Pn.elements.buffer.buffer):At.bindBuffer(uu,null)}Bi.currentVAO=Ta}}function wa(){Dt(eo).forEach(function(Ta){Ta.destroy()})}function Ii(){this.id=++pi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ta=Oa();Ta?this.vao=Ta.createVertexArrayOES():this.vao=null,eo[this.id]=this,this.buffers=[]}Ii.prototype.bindAttrs=function(){for(var Ta=gn(),ca=this.attributes,Ei=0;Ei<ca.length;++Ei){var Yn=ca[Ei];Yn.buffer?(At.enableVertexAttribArray(Ei),At.bindBuffer(yh,Yn.buffer.buffer),At.vertexAttribPointer(Ei,Yn.size,Yn.type,Yn.normalized,Yn.stride,Yn.offset),Ta&&Yn.divisor&&Ta.vertexAttribDivisorANGLE(Ei,Yn.divisor)):(At.disableVertexAttribArray(Ei),At.vertexAttrib4f(Ei,Yn.x,Yn.y,Yn.z,Yn.w))}for(var yi=ca.length;yi<ri;++yi)At.disableVertexAttribArray(yi);var ni=Rn.getElements(this.elements);ni?At.bindBuffer(uu,ni.buffer.buffer):At.bindBuffer(uu,null)},Ii.prototype.refresh=function(){var Ta=Oa();Ta&&(Ta.bindVertexArrayOES(this.vao),this.bindAttrs(),Bi.currentVAO=null,Ta.bindVertexArrayOES(null))},Ii.prototype.destroy=function(){if(this.vao){var Ta=Oa();this===Bi.currentVAO&&(Bi.currentVAO=null,Ta.bindVertexArrayOES(null)),Ta.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),eo[this.id]&&(delete eo[this.id],Hn.vaoCount-=1)};function si(){var Ta=Oa();Ta&&Dt(eo).forEach(function(ca){ca.refresh()})}function $i(Ta){var ca=new Ii;Hn.vaoCount+=1;function Ei(Yn){var yi;if(Array.isArray(Yn))yi=Yn,ca.elements&&ca.ownsElements&&ca.elements.destroy(),ca.elements=null,ca.ownsElements=!1,ca.offset=0,ca.count=0,ca.instances=-1,ca.primitive=4;else{if(Yn.elements){var ni=Yn.elements;ca.ownsElements?typeof ni=="function"&&ni._reglType==="elements"?(ca.elements.destroy(),ca.ownsElements=!1):(ca.elements(ni),ca.ownsElements=!1):Rn.getElements(Yn.elements)?(ca.elements=Yn.elements,ca.ownsElements=!1):(ca.elements=Rn.create(Yn.elements),ca.ownsElements=!0)}else ca.elements=null,ca.ownsElements=!1;yi=Yn.attributes,ca.offset=0,ca.count=-1,ca.instances=-1,ca.primitive=4,ca.elements&&(ca.count=ca.elements._elements.vertCount,ca.primitive=ca.elements._elements.primType),"offset"in Yn&&(ca.offset=Yn.offset|0),"count"in Yn&&(ca.count=Yn.count|0),"instances"in Yn&&(ca.instances=Yn.instances|0),"primitive"in Yn&&(ca.primitive=oa[Yn.primitive])}var Ji={},Ho=ca.attributes;Ho.length=yi.length;for(var ji=0;ji<yi.length;++ji){var no=yi[ji],di=Ho[ji]=new Hc,jo=no.data||no;if(Array.isArray(jo)||Nr(jo)||Jr(jo)){var rs;ca.buffers[ji]&&(rs=ca.buffers[ji],Nr(jo)&&rs._buffer.byteLength>=jo.byteLength?rs.subdata(jo):(rs.destroy(),ca.buffers[ji]=null)),ca.buffers[ji]||(rs=ca.buffers[ji]=Ca.create(no,yh,!1,!0)),di.buffer=Ca.getBuffer(rs),di.size=di.buffer.dimension|0,di.normalized=!1,di.type=di.buffer.dtype,di.offset=0,di.stride=0,di.divisor=0,di.state=1,Ji[ji]=1}else Ca.getBuffer(no)?(di.buffer=Ca.getBuffer(no),di.size=di.buffer.dimension|0,di.normalized=!1,di.type=di.buffer.dtype,di.offset=0,di.stride=0,di.divisor=0,di.state=1):Ca.getBuffer(no.buffer)?(di.buffer=Ca.getBuffer(no.buffer),di.size=(+no.size||di.buffer.dimension)|0,di.normalized=!!no.normalized||!1,"type"in no?di.type=qn[no.type]:di.type=di.buffer.dtype,di.offset=(no.offset||0)|0,di.stride=(no.stride||0)|0,di.divisor=(no.divisor||0)|0,di.state=1):"x"in no&&(di.x=+no.x||0,di.y=+no.y||0,di.z=+no.z||0,di.w=+no.w||0,di.state=2)}for(var ds=0;ds<ca.buffers.length;++ds)!Ji[ds]&&ca.buffers[ds]&&(ca.buffers[ds].destroy(),ca.buffers[ds]=null);return ca.refresh(),Ei}return Ei.destroy=function(){for(var Yn=0;Yn<ca.buffers.length;++Yn)ca.buffers[Yn]&&ca.buffers[Yn].destroy();ca.buffers.length=0,ca.ownsElements&&(ca.elements.destroy(),ca.elements=null,ca.ownsElements=!1),ca.destroy()},Ei._vao=ca,Ei._reglType="vao",Ei(Ta)}return Bi}var Qh=35632,du=35633,Sh=35718,Jf=35721;function tf(At,kr,Dr,Hn){var Ca={},Rn={};function Pn(gn,Kn,ga,za){this.name=gn,this.id=Kn,this.location=ga,this.info=za}function ri(gn,Kn){for(var ga=0;ga<gn.length;++ga)if(gn[ga].id===Kn.id){gn[ga].location=Kn.location;return}gn.push(Kn)}function ei(gn,Kn,ga){var za=gn===Qh?Ca:Rn,wa=za[Kn];if(!wa){var Ii=kr.str(Kn);wa=At.createShader(gn),At.shaderSource(wa,Ii),At.compileShader(wa),za[Kn]=wa}return wa}var ti={},pi=[],eo=0;function Bi(gn,Kn){this.id=eo++,this.fragId=gn,this.vertId=Kn,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Hn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function fi(gn,Kn,ga){var za,wa,Ii=ei(Qh,gn.fragId),si=ei(du,gn.vertId),$i=gn.program=At.createProgram();if(At.attachShader($i,Ii),At.attachShader($i,si),ga)for(za=0;za<ga.length;++za){var Ta=ga[za];At.bindAttribLocation($i,Ta[0],Ta[1])}At.linkProgram($i);var ca=At.getProgramParameter($i,Sh);Hn.profile&&(gn.stats.uniformsCount=ca);var Ei=gn.uniforms;for(za=0;za<ca;++za)if(wa=At.getActiveUniform($i,za),wa)if(wa.size>1)for(var Yn=0;Yn<wa.size;++Yn){var yi=wa.name.replace("[0]","["+Yn+"]");ri(Ei,new Pn(yi,kr.id(yi),At.getUniformLocation($i,yi),wa))}else ri(Ei,new Pn(wa.name,kr.id(wa.name),At.getUniformLocation($i,wa.name),wa));var ni=At.getProgramParameter($i,Jf);Hn.profile&&(gn.stats.attributesCount=ni);var Ji=gn.attributes;for(za=0;za<ni;++za)wa=At.getActiveAttrib($i,za),wa&&ri(Ji,new Pn(wa.name,kr.id(wa.name),At.getAttribLocation($i,wa.name),wa))}Hn.profile&&(Dr.getMaxUniformsCount=function(){var gn=0;return pi.forEach(function(Kn){Kn.stats.uniformsCount>gn&&(gn=Kn.stats.uniformsCount)}),gn},Dr.getMaxAttributesCount=function(){var gn=0;return pi.forEach(function(Kn){Kn.stats.attributesCount>gn&&(gn=Kn.stats.attributesCount)}),gn});function Oa(){Ca={},Rn={};for(var gn=0;gn<pi.length;++gn)fi(pi[gn],null,pi[gn].attributes.map(function(Kn){return[Kn.location,Kn.name]}))}return{clear:function(){var gn=At.deleteShader.bind(At);Dt(Ca).forEach(gn),Ca={},Dt(Rn).forEach(gn),Rn={},pi.forEach(function(Kn){At.deleteProgram(Kn.program)}),pi.length=0,ti={},Dr.shaderCount=0},program:function(gn,Kn,ga,za){var wa=ti[Kn];wa||(wa=ti[Kn]={});var Ii=wa[gn];if(Ii&&(Ii.refCount++,!za))return Ii;var si=new Bi(Kn,gn);return Dr.shaderCount++,fi(si,ga,za),Ii||(wa[gn]=si),pi.push(si),v(si,{destroy:function(){if(si.refCount--,si.refCount<=0){At.deleteProgram(si.program);var $i=pi.indexOf(si);pi.splice($i,1),Dr.shaderCount--}wa[si.vertId].refCount<=0&&(At.deleteShader(Rn[si.vertId]),delete Rn[si.vertId],delete ti[si.fragId][si.vertId]),Object.keys(ti[si.fragId]).length||(At.deleteShader(Ca[si.fragId]),delete Ca[si.fragId],delete ti[si.fragId])}})},restore:Oa,shader:ei,frag:-1,vert:-1}}var Eh=6408,Af=5121,Mh=3333,Xd=5126;function yc(At,kr,Dr,Hn,Ca,Rn,Pn){function ri(pi){var eo;kr.next===null?eo=Af:eo=kr.next.colorAttachments[0].texture._texture.type;var Bi=0,fi=0,Oa=Hn.framebufferWidth,gn=Hn.framebufferHeight,Kn=null;Nr(pi)?Kn=pi:pi&&(Bi=pi.x|0,fi=pi.y|0,Oa=(pi.width||Hn.framebufferWidth-Bi)|0,gn=(pi.height||Hn.framebufferHeight-fi)|0,Kn=pi.data||null),Dr();var ga=Oa*gn*4;return Kn||(eo===Af?Kn=new Uint8Array(ga):eo===Xd&&(Kn=Kn||new Float32Array(ga))),At.pixelStorei(Mh,4),At.readPixels(Bi,fi,Oa,gn,Eh,eo,Kn),Kn}function ei(pi){var eo;return kr.setFBO({framebuffer:pi.framebuffer},function(){eo=ri(pi)}),eo}function ti(pi){return!pi||!("framebuffer"in pi)?ri(pi):ei(pi)}return ti}function cd(At){return Nf(rf(Sf(At)))}function rf(At){return kc(Ga(ku(At),At.length*8))}function Nf(At){for(var kr="0123456789abcdef",Dr="",Hn,Ca=0;Ca<At.length;Ca++)Hn=At.charCodeAt(Ca),Dr+=kr.charAt(Hn>>>4&15)+kr.charAt(Hn&15);return Dr}function Sf(At){for(var kr="",Dr=-1,Hn,Ca;++Dr<At.length;)Hn=At.charCodeAt(Dr),Ca=Dr+1<At.length?At.charCodeAt(Dr+1):0,55296<=Hn&&Hn<=56319&&56320<=Ca&&Ca<=57343&&(Hn=65536+((Hn&1023)<<10)+(Ca&1023),Dr++),Hn<=127?kr+=String.fromCharCode(Hn):Hn<=2047?kr+=String.fromCharCode(192|Hn>>>6&31,128|Hn&63):Hn<=65535?kr+=String.fromCharCode(224|Hn>>>12&15,128|Hn>>>6&63,128|Hn&63):Hn<=2097151&&(kr+=String.fromCharCode(240|Hn>>>18&7,128|Hn>>>12&63,128|Hn>>>6&63,128|Hn&63));return kr}function ku(At){for(var kr=Array(At.length>>2),Dr=0;Dr<kr.length;Dr++)kr[Dr]=0;for(var Dr=0;Dr<At.length*8;Dr+=8)kr[Dr>>5]|=(At.charCodeAt(Dr/8)&255)<<24-Dr%32;return kr}function kc(At){for(var kr="",Dr=0;Dr<At.length*32;Dr+=8)kr+=String.fromCharCode(At[Dr>>5]>>>24-Dr%32&255);return kr}function xu(At,kr){return At>>>kr|At<<32-kr}function Qf(At,kr){return At>>>kr}function Ef(At,kr,Dr){return At&kr^~At&Dr}function ed(At,kr,Dr){return At&kr^At&Dr^kr&Dr}function wr(At){return xu(At,2)^xu(At,13)^xu(At,22)}function Hr(At){return xu(At,6)^xu(At,11)^xu(At,25)}function kn(At){return xu(At,7)^xu(At,18)^Qf(At,3)}function _n(At){return xu(At,17)^xu(At,19)^Qf(At,10)}var $n=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 Ga(At,kr){var Dr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Hn=new Array(64),Ca,Rn,Pn,ri,ei,ti,pi,eo,Bi,fi,Oa,gn;for(At[kr>>5]|=128<<24-kr%32,At[(kr+64>>9<<4)+15]=kr,Bi=0;Bi<At.length;Bi+=16){for(Ca=Dr[0],Rn=Dr[1],Pn=Dr[2],ri=Dr[3],ei=Dr[4],ti=Dr[5],pi=Dr[6],eo=Dr[7],fi=0;fi<64;fi++)fi<16?Hn[fi]=At[fi+Bi]:Hn[fi]=Ba(Ba(Ba(_n(Hn[fi-2]),Hn[fi-7]),kn(Hn[fi-15])),Hn[fi-16]),Oa=Ba(Ba(Ba(Ba(eo,Hr(ei)),Ef(ei,ti,pi)),$n[fi]),Hn[fi]),gn=Ba(wr(Ca),ed(Ca,Rn,Pn)),eo=pi,pi=ti,ti=ei,ei=Ba(ri,Oa),ri=Pn,Pn=Rn,Rn=Ca,Ca=Ba(Oa,gn);Dr[0]=Ba(Ca,Dr[0]),Dr[1]=Ba(Rn,Dr[1]),Dr[2]=Ba(Pn,Dr[2]),Dr[3]=Ba(ri,Dr[3]),Dr[4]=Ba(ei,Dr[4]),Dr[5]=Ba(ti,Dr[5]),Dr[6]=Ba(pi,Dr[6]),Dr[7]=Ba(eo,Dr[7])}return Dr}function Ba(At,kr){var Dr=(At&65535)+(kr&65535),Hn=(At>>16)+(kr>>16)+(Dr>>16);return Hn<<16|Dr&65535}function wi(At){return Array.prototype.slice.call(At)}function ki(At){return wi(At).join("")}function to(At){var kr=At&&At.cache,Dr=0,Hn=[],Ca=[],Rn=[];function Pn(Oa,gn){var Kn=gn&&gn.stable;if(!Kn){for(var ga=0;ga<Ca.length;++ga)if(Ca[ga]===Oa&&!Rn[ga])return Hn[ga]}var za="g"+Dr++;return Hn.push(za),Ca.push(Oa),Rn.push(Kn),za}function ri(){var Oa=[];function gn(){Oa.push.apply(Oa,wi(arguments))}var Kn=[];function ga(){var za="v"+Dr++;return Kn.push(za),arguments.length>0&&(Oa.push(za,"="),Oa.push.apply(Oa,wi(arguments)),Oa.push(";")),za}return v(gn,{def:ga,toString:function(){return ki([Kn.length>0?"var "+Kn.join(",")+";":"",ki(Oa)])}})}function ei(){var Oa=ri(),gn=ri(),Kn=Oa.toString,ga=gn.toString;function za(wa,Ii){gn(wa,Ii,"=",Oa.def(wa,Ii),";")}return v(function(){Oa.apply(Oa,wi(arguments))},{def:Oa.def,entry:Oa,exit:gn,save:za,set:function(wa,Ii,si){za(wa,Ii),Oa(wa,Ii,"=",si,";")},toString:function(){return Kn()+ga()}})}function ti(){var Oa=ki(arguments),gn=ei(),Kn=ei(),ga=gn.toString,za=Kn.toString;return v(gn,{then:function(){return gn.apply(gn,wi(arguments)),this},else:function(){return Kn.apply(Kn,wi(arguments)),this},toString:function(){var wa=za();return wa&&(wa="else{"+wa+"}"),ki(["if(",Oa,"){",ga(),"}",wa])}})}var pi=ri(),eo={};function Bi(Oa,gn){var Kn=[];function ga(){var $i="a"+Kn.length;return Kn.push($i),$i}gn=gn||0;for(var za=0;za<gn;++za)ga();var wa=ei(),Ii=wa.toString,si=eo[Oa]=v(wa,{arg:ga,toString:function(){return ki(["function(",Kn.join(),"){",Ii(),"}"])}});return si}function fi(){var Oa=['"use strict";',pi,"return {"];Object.keys(eo).forEach(function(za){Oa.push('"',za,'":',eo[za].toString(),",")}),Oa.push("}");var gn=ki(Oa).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Kn;if(kr&&(Kn=cd(gn),kr[Kn]))return kr[Kn].apply(null,Ca);var ga=Function.apply(null,Hn.concat(gn));return kr&&(kr[Kn]=ga),ga.apply(null,Ca)}return{global:pi,link:Pn,block:ri,proc:Bi,scope:ei,cond:ti,compile:fi}}var ci="xyzw".split(""),qi=5121,xi=1,oi=2,fo=0,Qo=1,Yo=2,is=3,ts=4,vo=5,Yi=6,ys="dither",Ys="blend.enable",Rl="blend.color",Ql="blend.equation",Dl="blend.func",eu="depth.enable",cl="depth.func",Du="depth.range",Pu="depth.mask",Zl="colorMask",Oo="cull.enable",Ls="cull.face",ql="frontFace",Al="lineWidth",Tc="polygonOffset.enable",Ac="polygonOffset.offset",Pc="sample.alpha",oh="sample.enable",Sc="sample.coverage",Ff="stencil.enable",Ou="stencil.mask",Bf="stencil.func",os="stencil.opFront",_s="stencil.opBack",jf="scissor.enable",nf="scissor.box",Gc="viewport",Ze="profile",O="framebuffer",fe="vert",Re="frag",Oe="elements",We="primitive",Mt="count",zt="offset",rr="instances",Tr="vao",zr="Width",qr="Height",pn=O+zr,Dn=O+qr,nt=Gc+zr,ut=Gc+qr,wt="drawingBuffer",kt=wt+zr,Ht=wt+qr,Ot=[Dl,Ql,Bf,os,_s,Sc,Gc,nf,Ac],Kt=34962,Cr=34963,Or=2884,Vr=3042,sn=3024,bn=2960,Un=2929,Gn=3089,ua=32823,Ha=32926,Ti=32928,mi=5126,Ai=35664,po=35665,Fo=35666,Po=5124,us=35667,il=35668,ol=35669,Bs=35670,hl=35671,bu=35672,cu=35673,js=35674,Us=35675,Bu=35676,pc=35678,Xc=35680,Te=4,He=1028,ct=1029,Pt=2304,It=2305,Ut=32775,hr=32776,fr=519,Pr=7680,ln=0,on=1,Mn=32774,jn=513,Vn=36160,Ka=36064,Zn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ya={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Sa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:Pt,ccw:It};function Qa(At){return Array.isArray(At)||Nr(At)||Jr(At)}function Aa(At){return At.sort(function(kr,Dr){return kr===Gc?-1:Dr===Gc?1:kr<Dr?-1:1})}function Si(At,kr,Dr,Hn){this.thisDep=At,this.contextDep=kr,this.propDep=Dr,this.append=Hn}function ho(At){return At&&!(At.thisDep||At.contextDep||At.propDep)}function Ki(At){return new Si(!1,!1,!1,At)}function lo(At,kr){var Dr=At.type;if(Dr===fo){var Hn=At.data.length;return new Si(!0,Hn>=1,Hn>=2,kr)}else if(Dr===ts){var Ca=At.data;return new Si(Ca.thisDep,Ca.contextDep,Ca.propDep,kr)}else{if(Dr===vo)return new Si(!1,!1,!1,kr);if(Dr===Yi){for(var Rn=!1,Pn=!1,ri=!1,ei=0;ei<At.data.length;++ei){var ti=At.data[ei];if(ti.type===Qo)ri=!0;else if(ti.type===Yo)Pn=!0;else if(ti.type===is)Rn=!0;else if(ti.type===fo){Rn=!0;var pi=ti.data;pi>=1&&(Pn=!0),pi>=2&&(ri=!0)}else ti.type===ts&&(Rn=Rn||ti.data.thisDep,Pn=Pn||ti.data.contextDep,ri=ri||ti.data.propDep)}return new Si(Rn,Pn,ri,kr)}else return new Si(Dr===is,Dr===Yo,Dr===Qo,kr)}}var zo=new Si(!1,!1,!1,function(){});function qo(At,kr,Dr,Hn,Ca,Rn,Pn,ri,ei,ti,pi,eo,Bi,fi,Oa,gn){var Kn=ti.Record,ga={add:32774,subtract:32778,"reverse subtract":32779};Dr.ext_blend_minmax&&(ga.min=Ut,ga.max=hr);var za=Dr.angle_instanced_arrays,wa=Dr.webgl_draw_buffers,Ii=Dr.oes_vertex_array_object,si={dirty:!0,profile:gn.profile},$i={},Ta=[],ca={},Ei={};function Yn(it){return it.replace(".","_")}function yi(it,dt,Lt){var or=Yn(it);Ta.push(it),$i[or]=si[or]=!!Lt,ca[or]=dt}function ni(it,dt,Lt){var or=Yn(it);Ta.push(it),Array.isArray(Lt)?(si[or]=Lt.slice(),$i[or]=Lt.slice()):si[or]=$i[or]=Lt,Ei[or]=dt}function Ji(it){return!!isNaN(it)}yi(ys,sn),yi(Ys,Vr),ni(Rl,"blendColor",[0,0,0,0]),ni(Ql,"blendEquationSeparate",[Mn,Mn]),ni(Dl,"blendFuncSeparate",[on,ln,on,ln]),yi(eu,Un,!0),ni(cl,"depthFunc",jn),ni(Du,"depthRange",[0,1]),ni(Pu,"depthMask",!0),ni(Zl,Zl,[!0,!0,!0,!0]),yi(Oo,Or),ni(Ls,"cullFace",ct),ni(ql,ql,It),ni(Al,Al,1),yi(Tc,ua),ni(Ac,"polygonOffset",[0,0]),yi(Pc,Ha),yi(oh,Ti),ni(Sc,"sampleCoverage",[1,!1]),yi(Ff,bn),ni(Ou,"stencilMask",-1),ni(Bf,"stencilFunc",[fr,0,-1]),ni(os,"stencilOpSeparate",[He,Pr,Pr,Pr]),ni(_s,"stencilOpSeparate",[ct,Pr,Pr,Pr]),yi(jf,Gn),ni(nf,"scissor",[0,0,At.drawingBufferWidth,At.drawingBufferHeight]),ni(Gc,Gc,[0,0,At.drawingBufferWidth,At.drawingBufferHeight]);var Ho={gl:At,context:Bi,strings:kr,next:$i,current:si,draw:eo,elements:Rn,buffer:Ca,shader:pi,attributes:ti.state,vao:ti,uniforms:ei,framebuffer:ri,extensions:Dr,timer:fi,isBufferArgs:Qa},ji={primTypes:oa,compareFuncs:ya,blendFuncs:Zn,blendEquations:ga,stencilOps:Sa,glTypes:qn,orientationType:Xa};wa&&(ji.backBuffer=[ct],ji.drawBuffer=g(Hn.maxDrawbuffers,function(it){return it===0?[0]:g(it,function(dt){return Ka+dt})}));var no=0;function di(){var it=to({cache:Oa}),dt=it.link,Lt=it.global;it.id=no++,it.batchId="0";var or=dt(Ho),er=it.shared={props:"a0"};Object.keys(Ho).forEach(function(ar){er[ar]=Lt.def(or,".",ar)});var ur=it.next={},mr=it.current={};Object.keys(Ei).forEach(function(ar){Array.isArray(si[ar])&&(ur[ar]=Lt.def(er.next,".",ar),mr[ar]=Lt.def(er.current,".",ar))});var dr=it.constants={};Object.keys(ji).forEach(function(ar){dr[ar]=Lt.def(JSON.stringify(ji[ar]))}),it.invoke=function(ar,tr){switch(tr.type){case fo:var Yr=["this",er.context,er.props,it.batchId];return ar.def(dt(tr.data),".call(",Yr.slice(0,Math.max(tr.data.length+1,4)),")");case Qo:return ar.def(er.props,tr.data);case Yo:return ar.def(er.context,tr.data);case is:return ar.def("this",tr.data);case ts:return tr.data.append(it,ar),tr.data.ref;case vo:return tr.data.toString();case Yi:return tr.data.map(function(un){return it.invoke(ar,un)})}},it.attribCache={};var Yt={};return it.scopeAttrib=function(ar){var tr=kr.id(ar);if(tr in Yt)return Yt[tr];var Yr=ti.scope[tr];Yr||(Yr=ti.scope[tr]=new Kn);var un=Yt[tr]=dt(Yr);return un},it}function jo(it){var dt=it.static,Lt=it.dynamic,or;if(Ze in dt){var er=!!dt[Ze];or=Ki(function(mr,dr){return er}),or.enable=er}else if(Ze in Lt){var ur=Lt[Ze];or=lo(ur,function(mr,dr){return mr.invoke(dr,ur)})}return or}function rs(it,dt){var Lt=it.static,or=it.dynamic;if(O in Lt){var er=Lt[O];return er?(er=ri.getFramebuffer(er),Ki(function(mr,dr){var Yt=mr.link(er),ar=mr.shared;dr.set(ar.framebuffer,".next",Yt);var tr=ar.context;return dr.set(tr,"."+pn,Yt+".width"),dr.set(tr,"."+Dn,Yt+".height"),Yt})):Ki(function(mr,dr){var Yt=mr.shared;dr.set(Yt.framebuffer,".next","null");var ar=Yt.context;return dr.set(ar,"."+pn,ar+"."+kt),dr.set(ar,"."+Dn,ar+"."+Ht),"null"})}else if(O in or){var ur=or[O];return lo(ur,function(mr,dr){var Yt=mr.invoke(dr,ur),ar=mr.shared,tr=ar.framebuffer,Yr=dr.def(tr,".getFramebuffer(",Yt,")");dr.set(tr,".next",Yr);var un=ar.context;return dr.set(un,"."+pn,Yr+"?"+Yr+".width:"+un+"."+kt),dr.set(un,"."+Dn,Yr+"?"+Yr+".height:"+un+"."+Ht),Yr})}else return null}function ds(it,dt,Lt){var or=it.static,er=it.dynamic;function ur(Yt){if(Yt in or){var ar=or[Yt],tr=!0,Yr=ar.x|0,un=ar.y|0,En,Ea;return"width"in ar?En=ar.width|0:tr=!1,"height"in ar?Ea=ar.height|0:tr=!1,new Si(!tr&&dt&&dt.thisDep,!tr&&dt&&dt.contextDep,!tr&&dt&&dt.propDep,function(Ma,La){var Ja=Ma.shared.context,ka=En;"width"in ar||(ka=La.def(Ja,".",pn,"-",Yr));var ai=Ea;return"height"in ar||(ai=La.def(Ja,".",Dn,"-",un)),[Yr,un,ka,ai]})}else if(Yt in er){var fa=er[Yt],sa=lo(fa,function(Ma,La){var Ja=Ma.invoke(La,fa),ka=Ma.shared.context,ai=La.def(Ja,".x|0"),gi=La.def(Ja,".y|0"),Vi=La.def('"width" in ',Ja,"?",Ja,".width|0:","(",ka,".",pn,"-",ai,")"),oo=La.def('"height" in ',Ja,"?",Ja,".height|0:","(",ka,".",Dn,"-",gi,")");return[ai,gi,Vi,oo]});return dt&&(sa.thisDep=sa.thisDep||dt.thisDep,sa.contextDep=sa.contextDep||dt.contextDep,sa.propDep=sa.propDep||dt.propDep),sa}else return dt?new Si(dt.thisDep,dt.contextDep,dt.propDep,function(Ma,La){var Ja=Ma.shared.context;return[0,0,La.def(Ja,".",pn),La.def(Ja,".",Dn)]}):null}var mr=ur(Gc);if(mr){var dr=mr;mr=new Si(mr.thisDep,mr.contextDep,mr.propDep,function(Yt,ar){var tr=dr.append(Yt,ar),Yr=Yt.shared.context;return ar.set(Yr,"."+nt,tr[2]),ar.set(Yr,"."+ut,tr[3]),tr})}return{viewport:mr,scissor_box:ur(nf)}}function _l(it,dt){var Lt=it.static,or=typeof Lt[Re]=="string"&&typeof Lt[fe]=="string";if(or){if(Object.keys(dt.dynamic).length>0)return null;var er=dt.static,ur=Object.keys(er);if(ur.length>0&&typeof er[ur[0]]=="number"){for(var mr=[],dr=0;dr<ur.length;++dr)mr.push([er[ur[dr]]|0,ur[dr]]);return mr}}return null}function vs(it,dt,Lt){var or=it.static,er=it.dynamic;function ur(tr){if(tr in or){var Yr=kr.id(or[tr]),un=Ki(function(){return Yr});return un.id=Yr,un}else if(tr in er){var En=er[tr];return lo(En,function(Ea,fa){var sa=Ea.invoke(fa,En),Ma=fa.def(Ea.shared.strings,".id(",sa,")");return Ma})}return null}var mr=ur(Re),dr=ur(fe),Yt=null,ar;return ho(mr)&&ho(dr)?(Yt=pi.program(dr.id,mr.id,null,Lt),ar=Ki(function(tr,Yr){return tr.link(Yt)})):ar=new Si(mr&&mr.thisDep||dr&&dr.thisDep,mr&&mr.contextDep||dr&&dr.contextDep,mr&&mr.propDep||dr&&dr.propDep,function(tr,Yr){var un=tr.shared.shader,En;mr?En=mr.append(tr,Yr):En=Yr.def(un,".",Re);var Ea;dr?Ea=dr.append(tr,Yr):Ea=Yr.def(un,".",fe);var fa=un+".program("+Ea+","+En;return Yr.def(fa+")")}),{frag:mr,vert:dr,progVar:ar,program:Yt}}function Lu(it,dt){var Lt=it.static,or=it.dynamic,er={},ur=!1;function mr(){if(Tr in Lt){var La=Lt[Tr];return La!==null&&ti.getVAO(La)===null&&(La=ti.createVAO(La)),ur=!0,er.vao=La,Ki(function(ka){var ai=ti.getVAO(La);return ai?ka.link(ai):"null"})}else if(Tr in or){ur=!0;var Ja=or[Tr];return lo(Ja,function(ka,ai){var gi=ka.invoke(ai,Ja);return ai.def(ka.shared.vao+".getVAO("+gi+")")})}return null}var dr=mr(),Yt=!1;function ar(){if(Oe in Lt){var La=Lt[Oe];if(er.elements=La,Qa(La)){var Ja=er.elements=Rn.create(La,!0);La=Rn.getElements(Ja),Yt=!0}else La&&(La=Rn.getElements(La),Yt=!0);var ka=Ki(function(gi,Vi){if(La){var oo=gi.link(La);return gi.ELEMENTS=oo,oo}return gi.ELEMENTS=null,null});return ka.value=La,ka}else if(Oe in or){Yt=!0;var ai=or[Oe];return lo(ai,function(gi,Vi){var oo=gi.shared,Is=oo.isBufferArgs,Cs=oo.elements,Sl=gi.invoke(Vi,ai),xl=Vi.def("null"),Cl=Vi.def(Is,"(",Sl,")"),El=gi.cond(Cl).then(xl,"=",Cs,".createStream(",Sl,");").else(xl,"=",Cs,".getElements(",Sl,");");return Vi.entry(El),Vi.exit(gi.cond(Cl).then(Cs,".destroyStream(",xl,");")),gi.ELEMENTS=xl,xl})}else if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.elements+".getElements("+gi.shared.vao+".currentVAO.elements):null")});return null}var tr=ar();function Yr(){if(We in Lt){var La=Lt[We];return er.primitive=La,Ki(function(ka,ai){return oa[La]})}else if(We in or){var Ja=or[We];return lo(Ja,function(ka,ai){var gi=ka.constants.primTypes,Vi=ka.invoke(ai,Ja);return ai.def(gi,"[",Vi,"]")})}else{if(Yt)return ho(tr)?tr.value?Ki(function(ka,ai){return ai.def(ka.ELEMENTS,".primType")}):Ki(function(){return Te}):new Si(tr.thisDep,tr.contextDep,tr.propDep,function(ka,ai){var gi=ka.ELEMENTS;return ai.def(gi,"?",gi,".primType:",Te)});if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(ka,ai){return ai.def(ka.shared.vao+".currentVAO?"+ka.shared.vao+".currentVAO.primitive:"+Te)})}return null}function un(La,Ja){if(La in Lt){var ka=Lt[La]|0;return Ja?er.offset=ka:er.instances=ka,Ki(function(gi,Vi){return Ja&&(gi.OFFSET=ka),ka})}else if(La in or){var ai=or[La];return lo(ai,function(gi,Vi){var oo=gi.invoke(Vi,ai);return Ja&&(gi.OFFSET=oo),oo})}else if(Ja){if(Yt)return Ki(function(gi,Vi){return gi.OFFSET=0,0});if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.vao+".currentVAO.offset:0")})}else if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.vao+".currentVAO.instances:-1")});return null}var En=un(zt,!0);function Ea(){if(Mt in Lt){var La=Lt[Mt]|0;return er.count=La,Ki(function(){return La})}else if(Mt in or){var Ja=or[Mt];return lo(Ja,function(Vi,oo){var Is=Vi.invoke(oo,Ja);return Is})}else if(Yt)if(ho(tr)){if(tr)return En?new Si(En.thisDep,En.contextDep,En.propDep,function(Vi,oo){var Is=oo.def(Vi.ELEMENTS,".vertCount-",Vi.OFFSET);return Is}):Ki(function(Vi,oo){return oo.def(Vi.ELEMENTS,".vertCount")});var ka=Ki(function(){return-1});return ka}else{var ai=new Si(tr.thisDep||En.thisDep,tr.contextDep||En.contextDep,tr.propDep||En.propDep,function(Vi,oo){var Is=Vi.ELEMENTS;return Vi.OFFSET?oo.def(Is,"?",Is,".vertCount-",Vi.OFFSET,":-1"):oo.def(Is,"?",Is,".vertCount:-1")});return ai}else if(ur){var gi=new Si(dr.thisDep,dr.contextDep,dr.propDep,function(Vi,oo){return oo.def(Vi.shared.vao,".currentVAO?",Vi.shared.vao,".currentVAO.count:-1")});return gi}return null}var fa=Yr(),sa=Ea(),Ma=un(rr,!1);return{elements:tr,primitive:fa,count:sa,instances:Ma,offset:En,vao:dr,vaoActive:ur,elementsActive:Yt,static:er}}function ll(it,dt){var Lt=it.static,or=it.dynamic,er={};return Ta.forEach(function(ur){var mr=Yn(ur);function dr(Yt,ar){if(ur in Lt){var tr=Yt(Lt[ur]);er[mr]=Ki(function(){return tr})}else if(ur in or){var Yr=or[ur];er[mr]=lo(Yr,function(un,En){return ar(un,En,un.invoke(En,Yr))})}}switch(ur){case Oo:case Ys:case ys:case Ff:case eu:case jf:case Tc:case Pc:case oh:case Pu:return dr(function(Yt){return Yt},function(Yt,ar,tr){return tr});case cl:return dr(function(Yt){return ya[Yt]},function(Yt,ar,tr){var Yr=Yt.constants.compareFuncs;return ar.def(Yr,"[",tr,"]")});case Du:return dr(function(Yt){return Yt},function(Yt,ar,tr){var Yr=ar.def("+",tr,"[0]"),un=ar.def("+",tr,"[1]");return[Yr,un]});case Dl:return dr(function(Yt){var ar="srcRGB"in Yt?Yt.srcRGB:Yt.src,tr="srcAlpha"in Yt?Yt.srcAlpha:Yt.src,Yr="dstRGB"in Yt?Yt.dstRGB:Yt.dst,un="dstAlpha"in Yt?Yt.dstAlpha:Yt.dst;return[Zn[ar],Zn[Yr],Zn[tr],Zn[un]]},function(Yt,ar,tr){var Yr=Yt.constants.blendFuncs;function un(Ja,ka){var ai=ar.def('"',Ja,ka,'" in ',tr,"?",tr,".",Ja,ka,":",tr,".",Ja);return ai}var En=un("src","RGB"),Ea=un("dst","RGB"),fa=ar.def(Yr,"[",En,"]"),sa=ar.def(Yr,"[",un("src","Alpha"),"]"),Ma=ar.def(Yr,"[",Ea,"]"),La=ar.def(Yr,"[",un("dst","Alpha"),"]");return[fa,Ma,sa,La]});case Ql:return dr(function(Yt){if(typeof Yt=="string")return[ga[Yt],ga[Yt]];if(typeof Yt=="object")return[ga[Yt.rgb],ga[Yt.alpha]]},function(Yt,ar,tr){var Yr=Yt.constants.blendEquations,un=ar.def(),En=ar.def(),Ea=Yt.cond("typeof ",tr,'==="string"');return Ea.then(un,"=",En,"=",Yr,"[",tr,"];"),Ea.else(un,"=",Yr,"[",tr,".rgb];",En,"=",Yr,"[",tr,".alpha];"),ar(Ea),[un,En]});case Rl:return dr(function(Yt){return g(4,function(ar){return+Yt[ar]})},function(Yt,ar,tr){return g(4,function(Yr){return ar.def("+",tr,"[",Yr,"]")})});case Ou:return dr(function(Yt){return Yt|0},function(Yt,ar,tr){return ar.def(tr,"|0")});case Bf:return dr(function(Yt){var ar=Yt.cmp||"keep",tr=Yt.ref||0,Yr="mask"in Yt?Yt.mask:-1;return[ya[ar],tr,Yr]},function(Yt,ar,tr){var Yr=Yt.constants.compareFuncs,un=ar.def('"cmp" in ',tr,"?",Yr,"[",tr,".cmp]",":",Pr),En=ar.def(tr,".ref|0"),Ea=ar.def('"mask" in ',tr,"?",tr,".mask|0:-1");return[un,En,Ea]});case os:case _s:return dr(function(Yt){var ar=Yt.fail||"keep",tr=Yt.zfail||"keep",Yr=Yt.zpass||"keep";return[ur===_s?ct:He,Sa[ar],Sa[tr],Sa[Yr]]},function(Yt,ar,tr){var Yr=Yt.constants.stencilOps;function un(En){return ar.def('"',En,'" in ',tr,"?",Yr,"[",tr,".",En,"]:",Pr)}return[ur===_s?ct:He,un("fail"),un("zfail"),un("zpass")]});case Ac:return dr(function(Yt){var ar=Yt.factor|0,tr=Yt.units|0;return[ar,tr]},function(Yt,ar,tr){var Yr=ar.def(tr,".factor|0"),un=ar.def(tr,".units|0");return[Yr,un]});case Ls:return dr(function(Yt){var ar=0;return Yt==="front"?ar=He:Yt==="back"&&(ar=ct),ar},function(Yt,ar,tr){return ar.def(tr,'==="front"?',He,":",ct)});case Al:return dr(function(Yt){return Yt},function(Yt,ar,tr){return tr});case ql:return dr(function(Yt){return Xa[Yt]},function(Yt,ar,tr){return ar.def(tr+'==="cw"?'+Pt+":"+It)});case Zl:return dr(function(Yt){return Yt.map(function(ar){return!!ar})},function(Yt,ar,tr){return g(4,function(Yr){return"!!"+tr+"["+Yr+"]"})});case Sc:return dr(function(Yt){var ar="value"in Yt?Yt.value:1,tr=!!Yt.invert;return[ar,tr]},function(Yt,ar,tr){var Yr=ar.def('"value" in ',tr,"?+",tr,".value:1"),un=ar.def("!!",tr,".invert");return[Yr,un]})}}),er}function wu(it,dt){var Lt=it.static,or=it.dynamic,er={};return Object.keys(Lt).forEach(function(ur){var mr=Lt[ur],dr;if(typeof mr=="number"||typeof mr=="boolean")dr=Ki(function(){return mr});else if(typeof mr=="function"){var Yt=mr._reglType;Yt==="texture2d"||Yt==="textureCube"?dr=Ki(function(ar){return ar.link(mr)}):(Yt==="framebuffer"||Yt==="framebufferCube")&&(dr=Ki(function(ar){return ar.link(mr.color[0])}))}else ra(mr)&&(dr=Ki(function(ar){var tr=ar.global.def("[",g(mr.length,function(Yr){return mr[Yr]}),"]");return tr}));dr.value=mr,er[ur]=dr}),Object.keys(or).forEach(function(ur){var mr=or[ur];er[ur]=lo(mr,function(dr,Yt){return dr.invoke(Yt,mr)})}),er}function Gu(it,dt){var Lt=it.static,or=it.dynamic,er={};return Object.keys(Lt).forEach(function(ur){var mr=Lt[ur],dr=kr.id(ur),Yt=new Kn;if(Qa(mr))Yt.state=xi,Yt.buffer=Ca.getBuffer(Ca.create(mr,Kt,!1,!0)),Yt.type=0;else{var ar=Ca.getBuffer(mr);if(ar)Yt.state=xi,Yt.buffer=ar,Yt.type=0;else if("constant"in mr){var tr=mr.constant;Yt.buffer="null",Yt.state=oi,typeof tr=="number"?Yt.x=tr:ci.forEach(function(Ma,La){La<tr.length&&(Yt[Ma]=tr[La])})}else{Qa(mr.buffer)?ar=Ca.getBuffer(Ca.create(mr.buffer,Kt,!1,!0)):ar=Ca.getBuffer(mr.buffer);var Yr=mr.offset|0,un=mr.stride|0,En=mr.size|0,Ea=!!mr.normalized,fa=0;"type"in mr&&(fa=qn[mr.type]);var sa=mr.divisor|0;Yt.buffer=ar,Yt.state=xi,Yt.size=En,Yt.normalized=Ea,Yt.type=fa||ar.dtype,Yt.offset=Yr,Yt.stride=un,Yt.divisor=sa}}er[ur]=Ki(function(Ma,La){var Ja=Ma.attribCache;if(dr in Ja)return Ja[dr];var ka={isStream:!1};return Object.keys(Yt).forEach(function(ai){ka[ai]=Yt[ai]}),Yt.buffer&&(ka.buffer=Ma.link(Yt.buffer),ka.type=ka.type||ka.buffer+".dtype"),Ja[dr]=ka,ka})}),Object.keys(or).forEach(function(ur){var mr=or[ur];function dr(Yt,ar){var tr=Yt.invoke(ar,mr),Yr=Yt.shared,un=Yt.constants,En=Yr.isBufferArgs,Ea=Yr.buffer,fa={isStream:ar.def(!1)},sa=new Kn;sa.state=xi,Object.keys(sa).forEach(function(ka){fa[ka]=ar.def(""+sa[ka])});var Ma=fa.buffer,La=fa.type;ar("if(",En,"(",tr,")){",fa.isStream,"=true;",Ma,"=",Ea,".createStream(",Kt,",",tr,");",La,"=",Ma,".dtype;","}else{",Ma,"=",Ea,".getBuffer(",tr,");","if(",Ma,"){",La,"=",Ma,".dtype;",'}else if("constant" in ',tr,"){",fa.state,"=",oi,";","if(typeof "+tr+'.constant === "number"){',fa[ci[0]],"=",tr,".constant;",ci.slice(1).map(function(ka){return fa[ka]}).join("="),"=0;","}else{",ci.map(function(ka,ai){return fa[ka]+"="+tr+".constant.length>"+ai+"?"+tr+".constant["+ai+"]:0;"}).join(""),"}}else{","if(",En,"(",tr,".buffer)){",Ma,"=",Ea,".createStream(",Kt,",",tr,".buffer);","}else{",Ma,"=",Ea,".getBuffer(",tr,".buffer);","}",La,'="type" in ',tr,"?",un.glTypes,"[",tr,".type]:",Ma,".dtype;",fa.normalized,"=!!",tr,".normalized;");function Ja(ka){ar(fa[ka],"=",tr,".",ka,"|0;")}return Ja("size"),Ja("offset"),Ja("stride"),Ja("divisor"),ar("}}"),ar.exit("if(",fa.isStream,"){",Ea,".destroyStream(",Ma,");","}"),fa}er[ur]=lo(mr,dr)}),er}function oc(it){var dt=it.static,Lt=it.dynamic,or={};return Object.keys(dt).forEach(function(er){var ur=dt[er];or[er]=Ki(function(mr,dr){return typeof ur=="number"||typeof ur=="boolean"?""+ur:mr.link(ur)})}),Object.keys(Lt).forEach(function(er){var ur=Lt[er];or[er]=lo(ur,function(mr,dr){return mr.invoke(dr,ur)})}),or}function Mf(it,dt,Lt,or,er){it.static,it.dynamic;var ur=_l(it,dt),mr=rs(it),dr=ds(it,mr),Yt=Lu(it),ar=ll(it),tr=vs(it,er,ur);function Yr(Ma){var La=dr[Ma];La&&(ar[Ma]=La)}Yr(Gc),Yr(Yn(nf));var un=Object.keys(ar).length>0,En={framebuffer:mr,draw:Yt,shader:tr,state:ar,dirty:un,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(En.profile=jo(it),En.uniforms=wu(Lt),En.drawVAO=En.scopeVAO=Yt.vao,!En.drawVAO&&tr.program&&!ur&&Dr.angle_instanced_arrays&&Yt.static.elements){var Ea=!0,fa=tr.program.attributes.map(function(Ma){var La=dt.static[Ma];return Ea=Ea&&!!La,La});if(Ea&&fa.length>0){var sa=ti.getVAO(ti.createVAO({attributes:fa,elements:Yt.static.elements}));En.drawVAO=new Si(null,null,null,function(Ma,La){return Ma.link(sa)}),En.useVAO=!0}}return ur?En.useVAO=!0:En.attributes=Gu(dt),En.context=oc(or),En}function su(it,dt,Lt){var or=it.shared,er=or.context,ur=it.scope();Object.keys(Lt).forEach(function(mr){dt.save(er,"."+mr);var dr=Lt[mr],Yt=dr.append(it,dt);Array.isArray(Yt)?ur(er,".",mr,"=[",Yt.join(),"];"):ur(er,".",mr,"=",Yt,";")}),dt(ur)}function gu(it,dt,Lt,or){var er=it.shared,ur=er.gl,mr=er.framebuffer,dr;wa&&(dr=dt.def(er.extensions,".webgl_draw_buffers"));var Yt=it.constants,ar=Yt.drawBuffer,tr=Yt.backBuffer,Yr;Lt?Yr=Lt.append(it,dt):Yr=dt.def(mr,".next"),or||dt("if(",Yr,"!==",mr,".cur){"),dt("if(",Yr,"){",ur,".bindFramebuffer(",Vn,",",Yr,".framebuffer);"),wa&&dt(dr,".drawBuffersWEBGL(",ar,"[",Yr,".colorAttachments.length]);"),dt("}else{",ur,".bindFramebuffer(",Vn,",null);"),wa&&dt(dr,".drawBuffersWEBGL(",tr,");"),dt("}",mr,".cur=",Yr,";"),or||dt("}")}function ko(it,dt,Lt){var or=it.shared,er=or.gl,ur=it.current,mr=it.next,dr=or.current,Yt=or.next,ar=it.cond(dr,".dirty");Ta.forEach(function(tr){var Yr=Yn(tr);if(!(Yr in Lt.state)){var un,En;if(Yr in mr){un=mr[Yr],En=ur[Yr];var Ea=g(si[Yr].length,function(sa){return ar.def(un,"[",sa,"]")});ar(it.cond(Ea.map(function(sa,Ma){return sa+"!=="+En+"["+Ma+"]"}).join("||")).then(er,".",Ei[Yr],"(",Ea,");",Ea.map(function(sa,Ma){return En+"["+Ma+"]="+sa}).join(";"),";"))}else{un=ar.def(Yt,".",Yr);var fa=it.cond(un,"!==",dr,".",Yr);ar(fa),Yr in ca?fa(it.cond(un).then(er,".enable(",ca[Yr],");").else(er,".disable(",ca[Yr],");"),dr,".",Yr,"=",un,";"):fa(er,".",Ei[Yr],"(",un,");",dr,".",Yr,"=",un,";")}}}),Object.keys(Lt.state).length===0&&ar(dr,".dirty=false;"),dt(ar)}function sc(it,dt,Lt,or){var er=it.shared,ur=it.current,mr=er.current,dr=er.gl,Yt;Aa(Object.keys(Lt)).forEach(function(ar){var tr=Lt[ar];if(!(or&&!or(tr))){var Yr=tr.append(it,dt);if(ca[ar]){var un=ca[ar];ho(tr)?(Yt=it.link(Yr,{stable:!0}),dt(it.cond(Yt).then(dr,".enable(",un,");").else(dr,".disable(",un,");")),dt(mr,".",ar,"=",Yt,";")):(dt(it.cond(Yr).then(dr,".enable(",un,");").else(dr,".disable(",un,");")),dt(mr,".",ar,"=",Yr,";"))}else if(ra(Yr)){var En=ur[ar];dt(dr,".",Ei[ar],"(",Yr,");",Yr.map(function(Ea,fa){return En+"["+fa+"]="+Ea}).join(";"),";")}else ho(tr)?(Yt=it.link(Yr,{stable:!0}),dt(dr,".",Ei[ar],"(",Yt,");",mr,".",ar,"=",Yt,";")):dt(dr,".",Ei[ar],"(",Yr,");",mr,".",ar,"=",Yr,";")}})}function $s(it,dt){za&&(it.instancing=dt.def(it.shared.extensions,".angle_instanced_arrays"))}function Hl(it,dt,Lt,or,er){var ur=it.shared,mr=it.stats,dr=ur.current,Yt=ur.timer,ar=Lt.profile;function tr(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Yr,un;function En(Ja){Yr=dt.def(),Ja(Yr,"=",tr(),";"),typeof er=="string"?Ja(mr,".count+=",er,";"):Ja(mr,".count++;"),fi&&(or?(un=dt.def(),Ja(un,"=",Yt,".getNumPendingQueries();")):Ja(Yt,".beginQuery(",mr,");"))}function Ea(Ja){Ja(mr,".cpuTime+=",tr(),"-",Yr,";"),fi&&(or?Ja(Yt,".pushScopeStats(",un,",",Yt,".getNumPendingQueries(),",mr,");"):Ja(Yt,".endQuery();"))}function fa(Ja){var ka=dt.def(dr,".profile");dt(dr,".profile=",Ja,";"),dt.exit(dr,".profile=",ka,";")}var sa;if(ar){if(ho(ar)){ar.enable?(En(dt),Ea(dt.exit),fa("true")):fa("false");return}sa=ar.append(it,dt),fa(sa)}else sa=dt.def(dr,".profile");var Ma=it.block();En(Ma),dt("if(",sa,"){",Ma,"}");var La=it.block();Ea(La),dt.exit("if(",sa,"){",La,"}")}function gc(it,dt,Lt,or,er){var ur=it.shared;function mr(Yt){switch(Yt){case Ai:case us:case hl:return 2;case po:case il:case bu:return 3;case Fo:case ol:case cu:return 4;default:return 1}}function dr(Yt,ar,tr){var Yr=ur.gl,un=dt.def(Yt,".location"),En=dt.def(ur.attributes,"[",un,"]"),Ea=tr.state,fa=tr.buffer,sa=[tr.x,tr.y,tr.z,tr.w],Ma=["buffer","normalized","offset","stride"];function La(){dt("if(!",En,".buffer){",Yr,".enableVertexAttribArray(",un,");}");var ka=tr.type,ai;if(tr.size?ai=dt.def(tr.size,"||",ar):ai=ar,dt("if(",En,".type!==",ka,"||",En,".size!==",ai,"||",Ma.map(function(Vi){return En+"."+Vi+"!=="+tr[Vi]}).join("||"),"){",Yr,".bindBuffer(",Kt,",",fa,".buffer);",Yr,".vertexAttribPointer(",[un,ai,ka,tr.normalized,tr.stride,tr.offset],");",En,".type=",ka,";",En,".size=",ai,";",Ma.map(function(Vi){return En+"."+Vi+"="+tr[Vi]+";"}).join(""),"}"),za){var gi=tr.divisor;dt("if(",En,".divisor!==",gi,"){",it.instancing,".vertexAttribDivisorANGLE(",[un,gi],");",En,".divisor=",gi,";}")}}function Ja(){dt("if(",En,".buffer){",Yr,".disableVertexAttribArray(",un,");",En,".buffer=null;","}if(",ci.map(function(ka,ai){return En+"."+ka+"!=="+sa[ai]}).join("||"),"){",Yr,".vertexAttrib4f(",un,",",sa,");",ci.map(function(ka,ai){return En+"."+ka+"="+sa[ai]+";"}).join(""),"}")}Ea===xi?La():Ea===oi?Ja():(dt("if(",Ea,"===",xi,"){"),La(),dt("}else{"),Ja(),dt("}"))}or.forEach(function(Yt){var ar=Yt.name,tr=Lt.attributes[ar],Yr;if(tr){if(!er(tr))return;Yr=tr.append(it,dt)}else{if(!er(zo))return;var un=it.scopeAttrib(ar);Yr={},Object.keys(new Kn).forEach(function(En){Yr[En]=dt.def(un,".",En)})}dr(it.link(Yt),mr(Yt.info.type),Yr)})}function _c(it,dt,Lt,or,er,ur){for(var mr=it.shared,dr=mr.gl,Yt,ar=0;ar<or.length;++ar){var tr=or[ar],Yr=tr.name,un=tr.info.type,En=Lt.uniforms[Yr],Ea=it.link(tr),fa=Ea+".location",sa;if(En){if(!er(En))continue;if(ho(En)){var Ma=En.value;if(un===pc||un===Xc){var La=it.link(Ma._texture||Ma.color[0]._texture);dt(dr,".uniform1i(",fa,",",La+".bind());"),dt.exit(La,".unbind();")}else if(un===js||un===Us||un===Bu){var Ja=it.global.def("new Float32Array(["+Array.prototype.slice.call(Ma)+"])"),ka=2;un===Us?ka=3:un===Bu&&(ka=4),dt(dr,".uniformMatrix",ka,"fv(",fa,",false,",Ja,");")}else{switch(un){case mi:Yt="1f";break;case Ai:Yt="2f";break;case po:Yt="3f";break;case Fo:Yt="4f";break;case Bs:Yt="1i";break;case Po:Yt="1i";break;case hl:Yt="2i";break;case us:Yt="2i";break;case bu:Yt="3i";break;case il:Yt="3i";break;case cu:Yt="4i";break;case ol:Yt="4i";break}dt(dr,".uniform",Yt,"(",fa,",",ra(Ma)?Array.prototype.slice.call(Ma):Ma,");")}continue}else sa=En.append(it,dt)}else{if(!er(zo))continue;sa=dt.def(mr.uniforms,"[",kr.id(Yr),"]")}un===pc?dt("if(",sa,"&&",sa,'._reglType==="framebuffer"){',sa,"=",sa,".color[0];","}"):un===Xc&&dt("if(",sa,"&&",sa,'._reglType==="framebufferCube"){',sa,"=",sa,".color[0];","}");var ai=1;switch(un){case pc:case Xc:var gi=dt.def(sa,"._texture");dt(dr,".uniform1i(",fa,",",gi,".bind());"),dt.exit(gi,".unbind();");continue;case Po:case Bs:Yt="1i";break;case us:case hl:Yt="2i",ai=2;break;case il:case bu:Yt="3i",ai=3;break;case ol:case cu:Yt="4i",ai=4;break;case mi:Yt="1f";break;case Ai:Yt="2f",ai=2;break;case po:Yt="3f",ai=3;break;case Fo:Yt="4f",ai=4;break;case js:Yt="Matrix2fv";break;case Us:Yt="Matrix3fv";break;case Bu:Yt="Matrix4fv";break}if(Yt.charAt(0)==="M"){dt(dr,".uniform",Yt,"(",fa,",");var Vi=Math.pow(un-js+2,2),oo=it.global.def("new Float32Array(",Vi,")");Array.isArray(sa)?dt("false,(",g(Vi,function(Cl){return oo+"["+Cl+"]="+sa[Cl]}),",",oo,")"):dt("false,(Array.isArray(",sa,")||",sa," instanceof Float32Array)?",sa,":(",g(Vi,function(Cl){return oo+"["+Cl+"]="+sa+"["+Cl+"]"}),",",oo,")"),dt(");")}else if(ai>1){for(var Is=[],Cs=[],Sl=0;Sl<ai;++Sl)Array.isArray(sa)?Cs.push(sa[Sl]):Cs.push(dt.def(sa+"["+Sl+"]")),ur&&Is.push(dt.def());ur&&dt("if(!",it.batchId,"||",Is.map(function(Cl,El){return Cl+"!=="+Cs[El]}).join("||"),"){",Is.map(function(Cl,El){return Cl+"="+Cs[El]+";"}).join("")),dt(dr,".uniform",Yt,"(",fa,",",Cs.join(","),");"),ur&&dt("}")}else{if(ur){var xl=dt.def();dt("if(!",it.batchId,"||",xl,"!==",sa,"){",xl,"=",sa,";")}dt(dr,".uniform",Yt,"(",fa,",",sa,");"),ur&&dt("}")}}}function Vo(it,dt,Lt,or){var er=it.shared,ur=er.gl,mr=er.draw,dr=or.draw;function Yt(){var ai=dr.elements,gi,Vi=dt;return ai?((ai.contextDep&&or.contextDynamic||ai.propDep)&&(Vi=Lt),gi=ai.append(it,Vi),dr.elementsActive&&Vi("if("+gi+")"+ur+".bindBuffer("+Cr+","+gi+".buffer.buffer);")):(gi=Vi.def(),Vi(gi,"=",mr,".",Oe,";","if(",gi,"){",ur,".bindBuffer(",Cr,",",gi,".buffer.buffer);}","else if(",er.vao,".currentVAO){",gi,"=",it.shared.elements+".getElements("+er.vao,".currentVAO.elements);",Ii?"":"if("+gi+")"+ur+".bindBuffer("+Cr+","+gi+".buffer.buffer);","}")),gi}function ar(){var ai=dr.count,gi,Vi=dt;return ai?((ai.contextDep&&or.contextDynamic||ai.propDep)&&(Vi=Lt),gi=ai.append(it,Vi)):gi=Vi.def(mr,".",Mt),gi}var tr=Yt();function Yr(ai){var gi=dr[ai];return gi?gi.contextDep&&or.contextDynamic||gi.propDep?gi.append(it,Lt):gi.append(it,dt):dt.def(mr,".",ai)}var un=Yr(We),En=Yr(zt),Ea=ar();if(typeof Ea=="number"){if(Ea===0)return}else Lt("if(",Ea,"){"),Lt.exit("}");var fa,sa;za&&(fa=Yr(rr),sa=it.instancing);var Ma=tr+".type",La=dr.elements&&ho(dr.elements)&&!dr.vaoActive;function Ja(){function ai(){Lt(sa,".drawElementsInstancedANGLE(",[un,Ea,Ma,En+"<<(("+Ma+"-"+qi+")>>1)",fa],");")}function gi(){Lt(sa,".drawArraysInstancedANGLE(",[un,En,Ea,fa],");")}tr&&tr!=="null"?La?ai():(Lt("if(",tr,"){"),ai(),Lt("}else{"),gi(),Lt("}")):gi()}function ka(){function ai(){Lt(ur+".drawElements("+[un,Ea,Ma,En+"<<(("+Ma+"-"+qi+")>>1)"]+");")}function gi(){Lt(ur+".drawArrays("+[un,En,Ea]+");")}tr&&tr!=="null"?La?ai():(Lt("if(",tr,"){"),ai(),Lt("}else{"),gi(),Lt("}")):gi()}za&&(typeof fa!="number"||fa>=0)?typeof fa=="string"?(Lt("if(",fa,">0){"),Ja(),Lt("}else if(",fa,"<0){"),ka(),Lt("}")):Ja():ka()}function Ms(it,dt,Lt,or,er){var ur=di(),mr=ur.proc("body",er);return za&&(ur.instancing=mr.def(ur.shared.extensions,".angle_instanced_arrays")),it(ur,mr,Lt,or),ur.compile().body}function Rs(it,dt,Lt,or){$s(it,dt),Lt.useVAO?Lt.drawVAO?dt(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,dt),");"):dt(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(dt(it.shared.vao,".setVAO(null);"),gc(it,dt,Lt,or.attributes,function(){return!0})),_c(it,dt,Lt,or.uniforms,function(){return!0},!1),Vo(it,dt,dt,Lt)}function Me(it,dt){var Lt=it.proc("draw",1);$s(it,Lt),su(it,Lt,dt.context),gu(it,Lt,dt.framebuffer),ko(it,Lt,dt),sc(it,Lt,dt.state),Hl(it,Lt,dt,!1,!0);var or=dt.shader.progVar.append(it,Lt);if(Lt(it.shared.gl,".useProgram(",or,".program);"),dt.shader.program)Rs(it,Lt,dt,dt.shader.program);else{Lt(it.shared.vao,".setVAO(null);");var er=it.global.def("{}"),ur=Lt.def(or,".id"),mr=Lt.def(er,"[",ur,"]");Lt(it.cond(mr).then(mr,".call(this,a0);").else(mr,"=",er,"[",ur,"]=",it.link(function(dr){return Ms(Rs,it,dt,dr,1)}),"(",or,");",mr,".call(this,a0);"))}Object.keys(dt.state).length>0&&Lt(it.shared.current,".dirty=true;"),it.shared.vao&&Lt(it.shared.vao,".setVAO(null);")}function X(it,dt,Lt,or){it.batchId="a1",$s(it,dt);function er(){return!0}gc(it,dt,Lt,or.attributes,er),_c(it,dt,Lt,or.uniforms,er,!1),Vo(it,dt,dt,Lt)}function ge(it,dt,Lt,or){$s(it,dt);var er=Lt.contextDep,ur=dt.def(),mr="a0",dr="a1",Yt=dt.def();it.shared.props=Yt,it.batchId=ur;var ar=it.scope(),tr=it.scope();dt(ar.entry,"for(",ur,"=0;",ur,"<",dr,";++",ur,"){",Yt,"=",mr,"[",ur,"];",tr,"}",ar.exit);function Yr(Ma){return Ma.contextDep&&er||Ma.propDep}function un(Ma){return!Yr(Ma)}if(Lt.needsContext&&su(it,tr,Lt.context),Lt.needsFramebuffer&&gu(it,tr,Lt.framebuffer),sc(it,tr,Lt.state,Yr),Lt.profile&&Yr(Lt.profile)&&Hl(it,tr,Lt,!1,!0),or)Lt.useVAO?Lt.drawVAO?Yr(Lt.drawVAO)?tr(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,tr),");"):ar(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,ar),");"):ar(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(ar(it.shared.vao,".setVAO(null);"),gc(it,ar,Lt,or.attributes,un),gc(it,tr,Lt,or.attributes,Yr)),_c(it,ar,Lt,or.uniforms,un,!1),_c(it,tr,Lt,or.uniforms,Yr,!0),Vo(it,ar,tr,Lt);else{var En=it.global.def("{}"),Ea=Lt.shader.progVar.append(it,tr),fa=tr.def(Ea,".id"),sa=tr.def(En,"[",fa,"]");tr(it.shared.gl,".useProgram(",Ea,".program);","if(!",sa,"){",sa,"=",En,"[",fa,"]=",it.link(function(Ma){return Ms(X,it,Lt,Ma,2)}),"(",Ea,");}",sa,".call(this,a0[",ur,"],",ur,");")}}function ne(it,dt){var Lt=it.proc("batch",2);it.batchId="0",$s(it,Lt);var or=!1,er=!0;Object.keys(dt.context).forEach(function(En){or=or||dt.context[En].propDep}),or||(su(it,Lt,dt.context),er=!1);var ur=dt.framebuffer,mr=!1;ur?(ur.propDep?or=mr=!0:ur.contextDep&&or&&(mr=!0),mr||gu(it,Lt,ur)):gu(it,Lt,null),dt.state.viewport&&dt.state.viewport.propDep&&(or=!0);function dr(En){return En.contextDep&&or||En.propDep}ko(it,Lt,dt),sc(it,Lt,dt.state,function(En){return!dr(En)}),(!dt.profile||!dr(dt.profile))&&Hl(it,Lt,dt,!1,"a1"),dt.contextDep=or,dt.needsContext=er,dt.needsFramebuffer=mr;var Yt=dt.shader.progVar;if(Yt.contextDep&&or||Yt.propDep)ge(it,Lt,dt,null);else{var ar=Yt.append(it,Lt);if(Lt(it.shared.gl,".useProgram(",ar,".program);"),dt.shader.program)ge(it,Lt,dt,dt.shader.program);else{Lt(it.shared.vao,".setVAO(null);");var tr=it.global.def("{}"),Yr=Lt.def(ar,".id"),un=Lt.def(tr,"[",Yr,"]");Lt(it.cond(un).then(un,".call(this,a0,a1);").else(un,"=",tr,"[",Yr,"]=",it.link(function(En){return Ms(ge,it,dt,En,2)}),"(",ar,");",un,".call(this,a0,a1);"))}}Object.keys(dt.state).length>0&&Lt(it.shared.current,".dirty=true;"),it.shared.vao&&Lt(it.shared.vao,".setVAO(null);")}function Se(it,dt){var Lt=it.proc("scope",3);it.batchId="a2";var or=it.shared,er=or.current;if(su(it,Lt,dt.context),dt.framebuffer&&dt.framebuffer.append(it,Lt),Aa(Object.keys(dt.state)).forEach(function(dr){var Yt=dt.state[dr],ar=Yt.append(it,Lt);ra(ar)?ar.forEach(function(tr,Yr){Ji(tr)?Lt.set(it.next[dr],"["+Yr+"]",tr):Lt.set(it.next[dr],"["+Yr+"]",it.link(tr,{stable:!0}))}):ho(Yt)?Lt.set(or.next,"."+dr,it.link(ar,{stable:!0})):Lt.set(or.next,"."+dr,ar)}),Hl(it,Lt,dt,!0,!0),[Oe,zt,Mt,rr,We].forEach(function(dr){var Yt=dt.draw[dr];if(Yt){var ar=Yt.append(it,Lt);Ji(ar)?Lt.set(or.draw,"."+dr,ar):Lt.set(or.draw,"."+dr,it.link(ar),{stable:!0})}}),Object.keys(dt.uniforms).forEach(function(dr){var Yt=dt.uniforms[dr].append(it,Lt);Array.isArray(Yt)&&(Yt="["+Yt.map(function(ar){return Ji(ar)?ar:it.link(ar,{stable:!0})})+"]"),Lt.set(or.uniforms,"["+it.link(kr.id(dr),{stable:!0})+"]",Yt)}),Object.keys(dt.attributes).forEach(function(dr){var Yt=dt.attributes[dr].append(it,Lt),ar=it.scopeAttrib(dr);Object.keys(new Kn).forEach(function(tr){Lt.set(ar,"."+tr,Yt[tr])})}),dt.scopeVAO){var ur=dt.scopeVAO.append(it,Lt);Ji(ur)?Lt.set(or.vao,".targetVAO",ur):Lt.set(or.vao,".targetVAO",it.link(ur,{stable:!0}))}function mr(dr){var Yt=dt.shader[dr];if(Yt){var ar=Yt.append(it,Lt);Ji(ar)?Lt.set(or.shader,"."+dr,ar):Lt.set(or.shader,"."+dr,it.link(ar,{stable:!0}))}}mr(fe),mr(Re),Object.keys(dt.state).length>0&&(Lt(er,".dirty=true;"),Lt.exit(er,".dirty=true;")),Lt("a1(",it.shared.context,",a0,",it.batchId,");")}function Je(it){if(!(typeof it!="object"||ra(it))){for(var dt=Object.keys(it),Lt=0;Lt<dt.length;++Lt)if(d.isDynamic(it[dt[Lt]]))return!0;return!1}}function _t(it,dt,Lt){var or=dt.static[Lt];if(!or||!Je(or))return;var er=it.global,ur=Object.keys(or),mr=!1,dr=!1,Yt=!1,ar=it.global.def("{}");ur.forEach(function(Yr){var un=or[Yr];if(d.isDynamic(un)){typeof un=="function"&&(un=or[Yr]=d.unbox(un));var En=lo(un,null);mr=mr||En.thisDep,Yt=Yt||En.propDep,dr=dr||En.contextDep}else{switch(er(ar,".",Yr,"="),typeof un){case"number":er(un);break;case"string":er('"',un,'"');break;case"object":Array.isArray(un)&&er("[",un.join(),"]");break;default:er(it.link(un));break}er(";")}});function tr(Yr,un){ur.forEach(function(En){var Ea=or[En];if(d.isDynamic(Ea)){var fa=Yr.invoke(un,Ea);un(ar,".",En,"=",fa,";")}})}dt.dynamic[Lt]=new d.DynamicVariable(ts,{thisDep:mr,contextDep:dr,propDep:Yt,ref:ar,append:tr}),delete dt.static[Lt]}function Tt(it,dt,Lt,or,er){var ur=di();ur.stats=ur.link(er),Object.keys(dt.static).forEach(function(dr){_t(ur,dt,dr)}),Ot.forEach(function(dr){_t(ur,it,dr)});var mr=Mf(it,dt,Lt,or,ur);return mr.shader.program&&(mr.shader.program.attributes.sort(function(dr,Yt){return dr.name<Yt.name?-1:1}),mr.shader.program.uniforms.sort(function(dr,Yt){return dr.name<Yt.name?-1:1})),Me(ur,mr),Se(ur,mr),ne(ur,mr),v(ur.compile(),{destroy:function(){mr.shader.program.destroy()}})}return{next:$i,current:si,procs:(function(){var it=di(),dt=it.proc("poll"),Lt=it.proc("refresh"),or=it.block();dt(or),Lt(or);var er=it.shared,ur=er.gl,mr=er.next,dr=er.current;or(dr,".dirty=false;"),gu(it,dt),gu(it,Lt,null,!0);var Yt;za&&(Yt=it.link(za)),Dr.oes_vertex_array_object&&Lt(it.link(Dr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ar=Lt.def(er.attributes),tr=Lt.def(0),Yr=it.cond(tr,".buffer");Yr.then(ur,".enableVertexAttribArray(i);",ur,".bindBuffer(",Kt,",",tr,".buffer.buffer);",ur,".vertexAttribPointer(i,",tr,".size,",tr,".type,",tr,".normalized,",tr,".stride,",tr,".offset);").else(ur,".disableVertexAttribArray(i);",ur,".vertexAttrib4f(i,",tr,".x,",tr,".y,",tr,".z,",tr,".w);",tr,".buffer=null;");var un=it.link(Hn.maxAttributes,{stable:!0});return Lt("for(var i=0;i<",un,";++i){",tr,"=",ar,"[i];",Yr,"}"),za&&Lt("for(var i=0;i<",un,";++i){",Yt,".vertexAttribDivisorANGLE(i,",ar,"[i].divisor);","}"),Lt(it.shared.vao,".currentVAO=null;",it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"),Object.keys(ca).forEach(function(En){var Ea=ca[En],fa=or.def(mr,".",En),sa=it.block();sa("if(",fa,"){",ur,".enable(",Ea,")}else{",ur,".disable(",Ea,")}",dr,".",En,"=",fa,";"),Lt(sa),dt("if(",fa,"!==",dr,".",En,"){",sa,"}")}),Object.keys(Ei).forEach(function(En){var Ea=Ei[En],fa=si[En],sa,Ma,La=it.block();if(La(ur,".",Ea,"("),ra(fa)){var Ja=fa.length;sa=it.global.def(mr,".",En),Ma=it.global.def(dr,".",En),La(g(Ja,function(ka){return sa+"["+ka+"]"}),");",g(Ja,function(ka){return Ma+"["+ka+"]="+sa+"["+ka+"];"}).join("")),dt("if(",g(Ja,function(ka){return sa+"["+ka+"]!=="+Ma+"["+ka+"]"}).join("||"),"){",La,"}")}else sa=or.def(mr,".",En),Ma=or.def(dr,".",En),La(sa,");",dr,".",En,"=",sa,";"),dt("if(",sa,"!==",Ma,"){",La,"}");Lt(La)}),it.compile()})(),compile:Tt}}function nl(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Go=34918,bs=34919,fl=35007,ju=function(At,kr){if(!kr.ext_disjoint_timer_query)return null;var Dr=[];function Hn(){return Dr.pop()||kr.ext_disjoint_timer_query.createQueryEXT()}function Ca(ga){Dr.push(ga)}var Rn=[];function Pn(ga){var za=Hn();kr.ext_disjoint_timer_query.beginQueryEXT(fl,za),Rn.push(za),fi(Rn.length-1,Rn.length,ga)}function ri(){kr.ext_disjoint_timer_query.endQueryEXT(fl)}function ei(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var ti=[];function pi(){return ti.pop()||new ei}function eo(ga){ti.push(ga)}var Bi=[];function fi(ga,za,wa){var Ii=pi();Ii.startQueryIndex=ga,Ii.endQueryIndex=za,Ii.sum=0,Ii.stats=wa,Bi.push(Ii)}var Oa=[],gn=[];function Kn(){var ga,za,wa=Rn.length;if(wa!==0){gn.length=Math.max(gn.length,wa+1),Oa.length=Math.max(Oa.length,wa+1),Oa[0]=0,gn[0]=0;var Ii=0;for(ga=0,za=0;za<Rn.length;++za){var si=Rn[za];kr.ext_disjoint_timer_query.getQueryObjectEXT(si,bs)?(Ii+=kr.ext_disjoint_timer_query.getQueryObjectEXT(si,Go),Ca(si)):Rn[ga++]=si,Oa[za+1]=Ii,gn[za+1]=ga}for(Rn.length=ga,ga=0,za=0;za<Bi.length;++za){var $i=Bi[za],Ta=$i.startQueryIndex,ca=$i.endQueryIndex;$i.sum+=Oa[ca]-Oa[Ta];var Ei=gn[Ta],Yn=gn[ca];Yn===Ei?($i.stats.gpuTime+=$i.sum/1e6,eo($i)):($i.startQueryIndex=Ei,$i.endQueryIndex=Yn,Bi[ga++]=$i)}Bi.length=ga}}return{beginQuery:Pn,endQuery:ri,pushScopeStats:fi,update:Kn,getNumPendingQueries:function(){return Rn.length},clear:function(){Dr.push.apply(Dr,Rn);for(var ga=0;ga<Dr.length;ga++)kr.ext_disjoint_timer_query.deleteQueryEXT(Dr[ga]);Rn.length=0,Dr.length=0},restore:function(){Rn.length=0,Dr.length=0}}},ou=16384,So=256,qs=1024,sl=34962,tu="webglcontextlost",Vl="webglcontextrestored",Lc=1,Ol=2,ru=3;function af(At,kr){for(var Dr=0;Dr<At.length;++Dr)if(At[Dr]===kr)return Dr;return-1}function zu(At){var kr=b(At);if(!kr)return null;var Dr=kr.gl,Hn=Dr.getContextAttributes();Dr.isContextLost();var Ca=A(Dr,kr);if(!Ca)return null;var Rn=m(),Pn=nl(),ri=kr.cachedCode||{},ei=Ca.extensions,ti=ju(Dr,ei),pi=y(),eo=Dr.drawingBufferWidth,Bi=Dr.drawingBufferHeight,fi={tick:0,time:0,viewportWidth:eo,viewportHeight:Bi,framebufferWidth:eo,framebufferHeight:Bi,drawingBufferWidth:eo,drawingBufferHeight:Bi,pixelRatio:kr.pixelRatio},Oa={},gn={elements:null,primitive:4,count:-1,offset:0,instances:-1},Kn=cn(Dr,ei),ga=Ln(Dr,Pn,kr,Ii),za=xr(Dr,ei,ga,Pn),wa=pf(Dr,ei,Kn,Pn,ga,za,gn);function Ii(Vo){return wa.destroyBuffer(Vo)}var si=tf(Dr,Rn,Pn,kr),$i=wf(Dr,ei,Kn,function(){Ei.procs.poll()},fi,Pn,kr),Ta=$f(Dr,ei,Kn,Pn,kr),ca=mh(Dr,ei,Kn,$i,Ta,Pn),Ei=qo(Dr,Rn,ei,Kn,ga,za,$i,ca,Oa,wa,si,gn,fi,ti,ri,kr),Yn=yc(Dr,ca,Ei.procs.poll,fi),yi=Ei.next,ni=Dr.canvas,Ji=[],Ho=[],ji=[],no=[kr.onDestroy],di=null;function jo(){if(Ji.length===0){ti&&ti.update(),di=null;return}di=h.next(jo),gu();for(var Vo=Ji.length-1;Vo>=0;--Vo){var Ms=Ji[Vo];Ms&&Ms(fi,null,0)}Dr.flush(),ti&&ti.update()}function rs(){!di&&Ji.length>0&&(di=h.next(jo))}function ds(){di&&(h.cancel(jo),di=null)}function _l(Vo){Vo.preventDefault(),ds(),Ho.forEach(function(Ms){Ms()})}function vs(Vo){Dr.getError(),Ca.restore(),si.restore(),ga.restore(),$i.restore(),Ta.restore(),ca.restore(),wa.restore(),ti&&ti.restore(),Ei.procs.refresh(),rs(),ji.forEach(function(Ms){Ms()})}ni&&(ni.addEventListener(tu,_l,!1),ni.addEventListener(Vl,vs,!1));function Lu(){Ji.length=0,ds(),ni&&(ni.removeEventListener(tu,_l),ni.removeEventListener(Vl,vs)),si.clear(),ca.clear(),Ta.clear(),wa.clear(),$i.clear(),za.clear(),ga.clear(),ti&&ti.clear(),no.forEach(function(Vo){Vo()})}function ll(Vo){function Ms(er){var ur=v({},er);delete ur.uniforms,delete ur.attributes,delete ur.context,delete ur.vao,"stencil"in ur&&ur.stencil.op&&(ur.stencil.opBack=ur.stencil.opFront=ur.stencil.op,delete ur.stencil.op);function mr(dr){if(dr in ur){var Yt=ur[dr];delete ur[dr],Object.keys(Yt).forEach(function(ar){ur[dr+"."+ar]=Yt[ar]})}}return mr("blend"),mr("depth"),mr("cull"),mr("stencil"),mr("polygonOffset"),mr("scissor"),mr("sample"),"vao"in er&&(ur.vao=er.vao),ur}function Rs(er,ur){var mr={},dr={};return Object.keys(er).forEach(function(Yt){var ar=er[Yt];if(d.isDynamic(ar)){dr[Yt]=d.unbox(ar,Yt);return}else if(ur&&Array.isArray(ar)){for(var tr=0;tr<ar.length;++tr)if(d.isDynamic(ar[tr])){dr[Yt]=d.unbox(ar,Yt);return}}mr[Yt]=ar}),{dynamic:dr,static:mr}}var Me=Rs(Vo.context||{},!0),X=Rs(Vo.uniforms||{},!0),ge=Rs(Vo.attributes||{},!1),ne=Rs(Ms(Vo),!1),Se={gpuTime:0,cpuTime:0,count:0},Je=Ei.compile(ne,ge,X,Me,Se),_t=Je.draw,Tt=Je.batch,it=Je.scope,dt=[];function Lt(er){for(;dt.length<er;)dt.push(null);return dt}function or(er,ur){var mr;if(typeof er=="function")return it.call(this,null,er,0);if(typeof ur=="function")if(typeof er=="number")for(mr=0;mr<er;++mr)it.call(this,null,ur,mr);else if(Array.isArray(er))for(mr=0;mr<er.length;++mr)it.call(this,er[mr],ur,mr);else return it.call(this,er,ur,0);else if(typeof er=="number"){if(er>0)return Tt.call(this,Lt(er|0),er|0)}else if(Array.isArray(er)){if(er.length)return Tt.call(this,er,er.length)}else return _t.call(this,er)}return v(or,{stats:Se,destroy:function(){Je.destroy()}})}var wu=ca.setFBO=ll({framebuffer:d.define.call(null,Lc,"framebuffer")});function Gu(Vo,Ms){var Rs=0;Ei.procs.poll();var Me=Ms.color;Me&&(Dr.clearColor(+Me[0]||0,+Me[1]||0,+Me[2]||0,+Me[3]||0),Rs|=ou),"depth"in Ms&&(Dr.clearDepth(+Ms.depth),Rs|=So),"stencil"in Ms&&(Dr.clearStencil(Ms.stencil|0),Rs|=qs),Dr.clear(Rs)}function oc(Vo){if("framebuffer"in Vo)if(Vo.framebuffer&&Vo.framebuffer_reglType==="framebufferCube")for(var Ms=0;Ms<6;++Ms)wu(v({framebuffer:Vo.framebuffer.faces[Ms]},Vo),Gu);else wu(Vo,Gu);else Gu(null,Vo)}function Mf(Vo){Ji.push(Vo);function Ms(){var Rs=af(Ji,Vo);function Me(){var X=af(Ji,Me);Ji[X]=Ji[Ji.length-1],Ji.length-=1,Ji.length<=0&&ds()}Ji[Rs]=Me}return rs(),{cancel:Ms}}function su(){var Vo=yi.viewport,Ms=yi.scissor_box;Vo[0]=Vo[1]=Ms[0]=Ms[1]=0,fi.viewportWidth=fi.framebufferWidth=fi.drawingBufferWidth=Vo[2]=Ms[2]=Dr.drawingBufferWidth,fi.viewportHeight=fi.framebufferHeight=fi.drawingBufferHeight=Vo[3]=Ms[3]=Dr.drawingBufferHeight}function gu(){fi.tick+=1,fi.time=sc(),su(),Ei.procs.poll()}function ko(){$i.refresh(),su(),Ei.procs.refresh(),ti&&ti.update()}function sc(){return(y()-pi)/1e3}ko();function $s(Vo,Ms){var Rs;switch(Vo){case"frame":return Mf(Ms);case"lost":Rs=Ho;break;case"restore":Rs=ji;break;case"destroy":Rs=no;break}return Rs.push(Ms),{cancel:function(){for(var Me=0;Me<Rs.length;++Me)if(Rs[Me]===Ms){Rs[Me]=Rs[Rs.length-1],Rs.pop();return}}}}function Hl(){return ri}function gc(Vo){Object.entries(Vo).forEach(function(Ms){ri[Ms[0]]=Ms[1]})}var _c=v(ll,{clear:oc,prop:d.define.bind(null,Lc),context:d.define.bind(null,Ol),this:d.define.bind(null,ru),draw:ll({}),buffer:function(Vo){return ga.create(Vo,sl,!1,!1)},elements:function(Vo){return za.create(Vo,!1)},texture:$i.create2D,cube:$i.createCube,renderbuffer:Ta.create,framebuffer:ca.create,framebufferCube:ca.createCube,vao:wa.createVAO,attributes:Hn,frame:Mf,on:$s,limits:Kn,hasExtension:function(Vo){return Kn.extensions.indexOf(Vo.toLowerCase())>=0},read:Yn,destroy:Lu,_gl:Dr,_refresh:ko,poll:function(){gu(),ti&&ti.update()},now:sc,stats:Pn,getCachedCode:Hl,preloadCachedCode:gc});return kr.onDone(null,_c),_c}return zu})}}),see=Ne({"node_modules/gl-util/context.js"(te,Z){var v=n1();Z.exports=function(l){if(l?typeof l=="string"&&(l={container:l}):l={},C(l)?l={container:l}:P(l)?l={container:l}:t(l)?l={gl:l}:l=v(l,{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),l.pixelRatio||(l.pixelRatio=window.pixelRatio||1),l.gl)return l.gl;if(l.canvas&&(l.container=l.canvas.parentNode),l.container){if(typeof l.container=="string"){var i=document.querySelector(l.container);if(!i)throw Error("Element "+l.container+" is not found");l.container=i}C(l.container)?(l.canvas=l.container,l.container=l.canvas.parentNode):l.canvas||(l.canvas=r(),l.container.appendChild(l.canvas),w(l))}else if(!l.canvas)if(typeof document<"u")l.container=document.body||document.documentElement,l.canvas=r(),l.container.appendChild(l.canvas),w(l);else throw Error("Not DOM environment. Use headless-gl.");return l.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(s){try{l.gl=l.canvas.getContext(s,l.attrs)}catch{}return l.gl}),l.gl};function w(a){if(a.container)if(a.container==document.body)document.body.style.width||(a.canvas.width=a.width||a.pixelRatio*window.innerWidth),document.body.style.height||(a.canvas.height=a.height||a.pixelRatio*window.innerHeight);else{var l=a.container.getBoundingClientRect();a.canvas.width=a.width||l.right-l.left,a.canvas.height=a.height||l.bottom-l.top}}function C(a){return typeof a.getContext=="function"&&"width"in a&&"height"in a}function P(a){return typeof a.nodeName=="string"&&typeof a.appendChild=="function"&&typeof a.getBoundingClientRect=="function"}function t(a){return typeof a.drawArrays=="function"||typeof a.drawElements=="function"}function r(){var a=document.createElement("canvas");return a.style.position="absolute",a.style.top=0,a.style.left=0,a}}}),lee=Ne({"node_modules/font-atlas/index.js"(te,Z){var v=UN(),w=[32,126];Z.exports=C;function C(P){P=P||{};var t=P.shape?P.shape:P.canvas?[P.canvas.width,P.canvas.height]:[512,512],r=P.canvas||document.createElement("canvas"),a=P.font,l=typeof P.step=="number"?[P.step,P.step]:P.step||[32,32],i=P.chars||w;if(a&&typeof a!="string"&&(a=v(a)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var s=[],o=i[0],u=0;o<=i[1];o++)s[u++]=String.fromCharCode(o);i=s}t=t.slice(),r.width=t[0],r.height=t[1];var d=r.getContext("2d");d.fillStyle="#000",d.fillRect(0,0,r.width,r.height),d.font=a,d.textAlign="center",d.textBaseline="middle",d.fillStyle="#fff";for(var h=l[0]/2,y=l[1]/2,o=0;o<i.length;o++)d.fillText(i[o],h,y),(h+=l[0])>t[0]-l[0]/2&&(h=l[0]/2,y+=l[1]);return r}}}),qN=Ne({"node_modules/bit-twiddle/twiddle.js"(te){"use restrict";var Z=32;te.INT_BITS=Z,te.INT_MAX=2147483647,te.INT_MIN=-1<<Z-1,te.sign=function(C){return(C>0)-(C<0)},te.abs=function(C){var P=C>>Z-1;return(C^P)-P},te.min=function(C,P){return P^(C^P)&-(C<P)},te.max=function(C,P){return C^(C^P)&-(C<P)},te.isPow2=function(C){return!(C&C-1)&&!!C},te.log2=function(C){var P,t;return P=(C>65535)<<4,C>>>=P,t=(C>255)<<3,C>>>=t,P|=t,t=(C>15)<<2,C>>>=t,P|=t,t=(C>3)<<1,C>>>=t,P|=t,P|C>>1},te.log10=function(C){return C>=1e9?9:C>=1e8?8:C>=1e7?7:C>=1e6?6:C>=1e5?5:C>=1e4?4:C>=1e3?3:C>=100?2:C>=10?1:0},te.popCount=function(C){return C=C-(C>>>1&1431655765),C=(C&858993459)+(C>>>2&858993459),(C+(C>>>4)&252645135)*16843009>>>24};function v(C){var P=32;return C&=-C,C&&P--,C&65535&&(P-=16),C&16711935&&(P-=8),C&252645135&&(P-=4),C&858993459&&(P-=2),C&1431655765&&(P-=1),P}te.countTrailingZeros=v,te.nextPow2=function(C){return C+=C===0,--C,C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C+1},te.prevPow2=function(C){return C|=C>>>1,C|=C>>>2,C|=C>>>4,C|=C>>>8,C|=C>>>16,C-(C>>>1)},te.parity=function(C){return C^=C>>>16,C^=C>>>8,C^=C>>>4,C&=15,27030>>>C&1};var w=new Array(256);(function(C){for(var P=0;P<256;++P){var t=P,r=P,a=7;for(t>>>=1;t;t>>>=1)r<<=1,r|=t&1,--a;C[P]=r<<a&255}})(w),te.reverse=function(C){return w[C&255]<<24|w[C>>>8&255]<<16|w[C>>>16&255]<<8|w[C>>>24&255]},te.interleave2=function(C,P){return C&=65535,C=(C|C<<8)&16711935,C=(C|C<<4)&252645135,C=(C|C<<2)&858993459,C=(C|C<<1)&1431655765,P&=65535,P=(P|P<<8)&16711935,P=(P|P<<4)&252645135,P=(P|P<<2)&858993459,P=(P|P<<1)&1431655765,C|P<<1},te.deinterleave2=function(C,P){return C=C>>>P&1431655765,C=(C|C>>>1)&858993459,C=(C|C>>>2)&252645135,C=(C|C>>>4)&16711935,C=(C|C>>>16)&65535,C<<16>>16},te.interleave3=function(C,P,t){return C&=1023,C=(C|C<<16)&4278190335,C=(C|C<<8)&251719695,C=(C|C<<4)&3272356035,C=(C|C<<2)&1227133513,P&=1023,P=(P|P<<16)&4278190335,P=(P|P<<8)&251719695,P=(P|P<<4)&3272356035,P=(P|P<<2)&1227133513,C|=P<<1,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,C|t<<2},te.deinterleave3=function(C,P){return C=C>>>P&1227133513,C=(C|C>>>2)&3272356035,C=(C|C>>>4)&251719695,C=(C|C>>>8)&4278190335,C=(C|C>>>16)&1023,C<<22>>22},te.nextCombination=function(C){var P=C|C-1;return P+1|(~P&-~P)-1>>>v(C)+1}}}),uee=Ne({"node_modules/dup/dup.js"(te,Z){function v(P,t,r){var a=P[r]|0;if(a<=0)return[];var l=new Array(a),i;if(r===P.length-1)for(i=0;i<a;++i)l[i]=t;else for(i=0;i<a;++i)l[i]=v(P,t,r+1);return l}function w(P,t){var r,a;for(r=new Array(P),a=0;a<P;++a)r[a]=t;return r}function C(P,t){switch(typeof t>"u"&&(t=0),typeof P){case"number":if(P>0)return w(P|0,t);break;case"object":if(typeof P.length=="number")return v(P,t,0);break}return[]}Z.exports=C}}),cee=Ne({"node_modules/typedarray-pool/pool.js"(te){var Z=qN(),v=uee(),w=Ug().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var C=typeof Uint8ClampedArray<"u",P=typeof BigUint64Array<"u",t=typeof BigInt64Array<"u",r=window.__TYPEDARRAY_POOL;r.UINT8C||(r.UINT8C=v([32,0])),r.BIGUINT64||(r.BIGUINT64=v([32,0])),r.BIGINT64||(r.BIGINT64=v([32,0])),r.BUFFER||(r.BUFFER=v([32,0]));var a=r.DATA,l=r.BUFFER;te.free=function(f){if(w.isBuffer(f))l[Z.log2(f.length)].push(f);else{if(Object.prototype.toString.call(f)!=="[object ArrayBuffer]"&&(f=f.buffer),!f)return;var p=f.length||f.byteLength,x=Z.log2(p)|0;a[x].push(f)}};function i(g){if(g){var f=g.length||g.byteLength,p=Z.log2(f);a[p].push(g)}}function s(g){i(g.buffer)}te.freeUint8=te.freeUint16=te.freeUint32=te.freeBigUint64=te.freeInt8=te.freeInt16=te.freeInt32=te.freeBigInt64=te.freeFloat32=te.freeFloat=te.freeFloat64=te.freeDouble=te.freeUint8Clamped=te.freeDataView=s,te.freeArrayBuffer=i,te.freeBuffer=function(f){l[Z.log2(f.length)].push(f)},te.malloc=function(f,p){if(p===void 0||p==="arraybuffer")return o(f);switch(p){case"uint8":return u(f);case"uint16":return d(f);case"uint32":return h(f);case"int8":return y(f);case"int16":return m(f);case"int32":return E(f);case"float":case"float32":return c(f);case"double":case"float64":return _(f);case"uint8_clamped":return T(f);case"bigint64":return k(f);case"biguint64":return M(f);case"buffer":return A(f);case"data":case"dataview":return b(f);default:return null}return null};function o(f){var f=Z.nextPow2(f),p=Z.log2(f),x=a[p];return x.length>0?x.pop():new ArrayBuffer(f)}te.mallocArrayBuffer=o;function u(g){return new Uint8Array(o(g),0,g)}te.mallocUint8=u;function d(g){return new Uint16Array(o(2*g),0,g)}te.mallocUint16=d;function h(g){return new Uint32Array(o(4*g),0,g)}te.mallocUint32=h;function y(g){return new Int8Array(o(g),0,g)}te.mallocInt8=y;function m(g){return new Int16Array(o(2*g),0,g)}te.mallocInt16=m;function E(g){return new Int32Array(o(4*g),0,g)}te.mallocInt32=E;function c(g){return new Float32Array(o(4*g),0,g)}te.mallocFloat32=te.mallocFloat=c;function _(g){return new Float64Array(o(8*g),0,g)}te.mallocFloat64=te.mallocDouble=_;function T(g){return C?new Uint8ClampedArray(o(g),0,g):u(g)}te.mallocUint8Clamped=T;function M(g){return P?new BigUint64Array(o(8*g),0,g):null}te.mallocBigUint64=M;function k(g){return t?new BigInt64Array(o(8*g),0,g):null}te.mallocBigInt64=k;function b(g){return new DataView(o(g),0,g)}te.mallocDataView=b;function A(g){g=Z.nextPow2(g);var f=Z.log2(g),p=l[f];return p.length>0?p.pop():new w(g)}te.mallocBuffer=A,te.clearCache=function(){for(var f=0;f<32;++f)r.UINT8[f].length=0,r.UINT16[f].length=0,r.UINT32[f].length=0,r.INT8[f].length=0,r.INT16[f].length=0,r.INT32[f].length=0,r.FLOAT[f].length=0,r.DOUBLE[f].length=0,r.BIGUINT64[f].length=0,r.BIGINT64[f].length=0,r.UINT8C[f].length=0,a[f].length=0,l[f].length=0}}}),fee=Ne({"node_modules/is-plain-obj/index.js"(te,Z){var v=Object.prototype.toString;Z.exports=function(w){var C;return v.call(w)==="[object Object]"&&(C=Object.getPrototypeOf(w),C===null||C===Object.getPrototypeOf({}))}}}),VN=Ne({"node_modules/parse-unit/index.js"(te,Z){Z.exports=function(w,C){C||(C=[0,""]),w=String(w);var P=parseFloat(w,10);return C[0]=P,C[1]=w.match(/[\d.\-\+]*\s*(.*)/)[1]||"",C}}}),hee=Ne({"node_modules/to-px/topx.js"(te,Z){var v=VN();Z.exports=t;var w=96;function C(r,a){var l=v(getComputedStyle(r).getPropertyValue(a));return l[0]*t(l[1],r)}function P(r,a){var l=document.createElement("div");l.style["font-size"]="128"+r,a.appendChild(l);var i=C(l,"font-size")/128;return a.removeChild(l),i}function t(r,a){switch(a=a||document.body,r=(r||"px").trim().toLowerCase(),(a===window||a===document)&&(a=document.body),r){case"%":return a.clientHeight/100;case"ch":case"ex":return P(r,a);case"em":return C(a,"font-size");case"rem":return C(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 w;case"cm":return w/2.54;case"mm":return w/25.4;case"pt":return w/72;case"pc":return w/6}return 1}}}),dee=Ne({"node_modules/detect-kerning/index.js"(te,Z){Z.exports=P;var v=P.canvas=document.createElement("canvas"),w=v.getContext("2d"),C=t([32,126]);P.createPairs=t,P.ascii=C;function P(r,a){Array.isArray(r)&&(r=r.join(", "));var l={},i,s=16,o=.05;a&&(a.length===2&&typeof a[0]=="number"?i=t(a):Array.isArray(a)?i=a:(a.o?i=t(a.o):a.pairs&&(i=a.pairs),a.fontSize&&(s=a.fontSize),a.threshold!=null&&(o=a.threshold))),i||(i=C),w.font=s+"px "+r;for(var u=0;u<i.length;u++){var d=i[u],h=w.measureText(d[0]).width+w.measureText(d[1]).width,y=w.measureText(d).width;if(Math.abs(h-y)>s*o){var m=(y-h)/s;l[d]=m*1e3}}return l}function t(r){for(var a=[],l=r[0];l<=r[1];l++)for(var i=String.fromCharCode(l),s=r[0];s<r[1];s++){var o=String.fromCharCode(s),u=i+o;a.push(u)}return a}}}),vee=Ne({"node_modules/font-measure/index.js"(te,Z){Z.exports=v,v.canvas=document.createElement("canvas"),v.cache={};function v(o,r){r||(r={}),(typeof o=="string"||Array.isArray(o))&&(r.family=o);var a=Array.isArray(r.family)?r.family.join(", "):r.family;if(!a)throw Error("`family` must be defined");var l=r.size||r.fontSize||r.em||48,i=r.weight||r.fontWeight||"",s=r.style||r.fontStyle||"",o=[s,i,l].join(" ")+"px "+a,u=r.origin||"top";if(v.cache[a]&&l<=v.cache[a].em)return w(v.cache[a],u);var d=r.canvas||v.canvas,h=d.getContext("2d"),y={upper:r.upper!==void 0?r.upper:"H",lower:r.lower!==void 0?r.lower:"x",descent:r.descent!==void 0?r.descent:"p",ascent:r.ascent!==void 0?r.ascent:"h",tittle:r.tittle!==void 0?r.tittle:"i",overshoot:r.overshoot!==void 0?r.overshoot:"O"},m=Math.ceil(l*1.5);d.height=m,d.width=m*.5,h.font=o;var E="H",c={top:0};h.clearRect(0,0,m,m),h.textBaseline="top",h.fillStyle="black",h.fillText(E,0,0);var _=C(h.getImageData(0,0,m,m));h.clearRect(0,0,m,m),h.textBaseline="bottom",h.fillText(E,0,m);var T=C(h.getImageData(0,0,m,m));c.lineHeight=c.bottom=m-T+_,h.clearRect(0,0,m,m),h.textBaseline="alphabetic",h.fillText(E,0,m);var M=C(h.getImageData(0,0,m,m)),k=m-M-1+_;c.baseline=c.alphabetic=k,h.clearRect(0,0,m,m),h.textBaseline="middle",h.fillText(E,0,m*.5);var b=C(h.getImageData(0,0,m,m));c.median=c.middle=m-b-1+_-m*.5,h.clearRect(0,0,m,m),h.textBaseline="hanging",h.fillText(E,0,m*.5);var A=C(h.getImageData(0,0,m,m));c.hanging=m-A-1+_-m*.5,h.clearRect(0,0,m,m),h.textBaseline="ideographic",h.fillText(E,0,m);var g=C(h.getImageData(0,0,m,m));if(c.ideographic=m-g-1+_,y.upper&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.upper,0,0),c.upper=C(h.getImageData(0,0,m,m)),c.capHeight=c.baseline-c.upper),y.lower&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.lower,0,0),c.lower=C(h.getImageData(0,0,m,m)),c.xHeight=c.baseline-c.lower),y.tittle&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.tittle,0,0),c.tittle=C(h.getImageData(0,0,m,m))),y.ascent&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.ascent,0,0),c.ascent=C(h.getImageData(0,0,m,m))),y.descent&&(h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.descent,0,0),c.descent=P(h.getImageData(0,0,m,m))),y.overshoot){h.clearRect(0,0,m,m),h.textBaseline="top",h.fillText(y.overshoot,0,0);var f=P(h.getImageData(0,0,m,m));c.overshoot=f-k}for(var p in c)c[p]/=l;return c.em=l,v.cache[a]=c,w(c,u)}function w(t,r){var a={};typeof r=="string"&&(r=t[r]);for(var l in t)l!=="em"&&(a[l]=t[l]-r);return a}function C(t){for(var r=t.height,a=t.data,l=3;l<a.length;l+=4)if(a[l]!==0)return Math.floor((l-3)*.25/r)}function P(t){for(var r=t.height,a=t.data,l=a.length-1;l>0;l-=4)if(a[l]!==0)return Math.floor((l-3)*.25/r)}}}),pee=Ne({"node_modules/gl-text/dist.js"(te,Z){var v=iee(),w=n1(),C=oee(),P=see(),t=IN(),r=Lb(),a=lee(),l=cee(),i=JS(),s=fee(),o=VN(),u=hee(),d=dee(),h=qd(),y=vee(),m=m3(),E=qN(),c=E.nextPow2,_=new t,T=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(T=!0),document.body.removeChild(M));var M,k=function(g){b(g)?(g={regl:g},this.gl=g.regl._gl):this.gl=P(g),this.shader=_.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=g.regl||C({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),_.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(s(g)?g:{})};k.prototype.createShader=function(){var g=this.regl,f=g({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:g.prop("count"),offset:g.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:g.this("sizeBuffer")},width:{offset:0,stride:8,buffer:g.this("sizeBuffer")},char:g.this("charBuffer"),position:g.this("position")},uniforms:{atlasSize:function(x,N){return[N.atlas.width,N.atlas.height]},atlasDim:function(x,N){return[N.atlas.cols,N.atlas.rows]},atlas:function(x,N){return N.atlas.texture},charStep:function(x,N){return N.atlas.step},em:function(x,N){return N.atlas.em},color:g.prop("color"),opacity:g.prop("opacity"),viewport:g.this("viewportArray"),scale:g.this("scale"),align:g.prop("align"),baseline:g.prop("baseline"),translate:g.this("translate"),positionOffset:g.prop("positionOffset")},primitive:"points",viewport:g.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;
			}`}),p={};return{regl:g,draw:f,atlas:p}},k.prototype.update=function(g){var f=this;if(typeof g=="string")g={text:g};else if(!g)return;g=w(g,{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),g.opacity!=null&&(Array.isArray(g.opacity)?this.opacity=g.opacity.map(function(be){return parseFloat(be)}):this.opacity=parseFloat(g.opacity)),g.viewport!=null&&(this.viewport=i(g.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]),g.kerning!=null&&(this.kerning=g.kerning),g.offset!=null&&(typeof g.offset=="number"&&(g.offset=[g.offset,0]),this.positionOffset=m(g.offset)),g.direction&&(this.direction=g.direction),g.range&&(this.range=g.range,this.scale=[1/(g.range[2]-g.range[0]),1/(g.range[3]-g.range[1])],this.translate=[-g.range[0],-g.range[1]]),g.scale&&(this.scale=g.scale),g.translate&&(this.translate=g.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!g.font&&(g.font=k.baseFontSize+"px sans-serif");var p=!1,x=!1;if(g.font&&(Array.isArray(g.font)?g.font:[g.font]).forEach(function(be,Ye){if(typeof be=="string")try{be=v.parse(be)}catch{be=v.parse(k.baseFontSize+"px "+be)}else{var mt=be.style,bt=be.weight,ft=be.stretch,Wt=be.variant;be=v.parse(v.stringify(be)),mt&&(be.style=mt),bt&&(be.weight=bt),ft&&(be.stretch=ft),Wt&&(be.variant=Wt)}var Zt=v.stringify({size:k.baseFontSize,family:be.family,stretch:T?be.stretch:void 0,variant:be.variant,weight:be.weight,style:be.style}),cr=o(be.size),pr=Math.round(cr[0]*u(cr[1]));if(pr!==f.fontSize[Ye]&&(x=!0,f.fontSize[Ye]=pr),(!f.font[Ye]||Zt!=f.font[Ye].baseString)&&(p=!0,f.font[Ye]=k.fonts[Zt],!f.font[Ye])){var Br=be.family.join(", "),Fr=[be.style];be.style!=be.variant&&Fr.push(be.variant),be.variant!=be.weight&&Fr.push(be.weight),T&&be.weight!=be.stretch&&Fr.push(be.stretch),f.font[Ye]={baseString:Zt,family:Br,weight:be.weight,stretch:be.stretch,style:be.style,variant:be.variant,width:{},kerning:{},metrics:y(Br,{origin:"top",fontSize:k.baseFontSize,fontStyle:Fr.join(" ")})},k.fonts[Zt]=f.font[Ye]}}),(p||x)&&this.font.forEach(function(be,Ye){var mt=v.stringify({size:f.fontSize[Ye],family:be.family,stretch:T?be.stretch:void 0,variant:be.variant,weight:be.weight,style:be.style});if(f.fontAtlas[Ye]=f.shader.atlas[mt],!f.fontAtlas[Ye]){var bt=be.metrics;f.shader.atlas[mt]=f.fontAtlas[Ye]={fontString:mt,step:Math.ceil(f.fontSize[Ye]*bt.bottom*.5)*2,em:f.fontSize[Ye],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:f.regl.texture()}}g.text==null&&(g.text=f.text)}),typeof g.text=="string"&&g.position&&g.position.length>2){for(var N=Array(g.position.length*.5),D=0;D<N.length;D++)N[D]=g.text;g.text=N}var B;if(g.text!=null||p){if(this.textOffsets=[0],Array.isArray(g.text)){this.count=g.text[0].length,this.counts=[this.count];for(var U=1;U<g.text.length;U++)this.textOffsets[U]=this.textOffsets[U-1]+g.text[U-1].length,this.count+=g.text[U].length,this.counts.push(g.text[U].length);this.text=g.text.join("")}else this.text=g.text,this.count=this.text.length,this.counts=[this.count];B=[],this.font.forEach(function(be,Ye){k.atlasContext.font=be.baseString;for(var mt=f.fontAtlas[Ye],bt=0;bt<f.text.length;bt++){var ft=f.text.charAt(bt);if(mt.ids[ft]==null&&(mt.ids[ft]=mt.chars.length,mt.chars.push(ft),B.push(ft)),be.width[ft]==null&&(be.width[ft]=k.atlasContext.measureText(ft).width/k.baseFontSize,f.kerning)){var Wt=[];for(var Zt in be.width)Wt.push(Zt+ft,ft+Zt);h(be.kerning,d(be.family,{pairs:Wt}))}}})}if(g.position)if(g.position.length>2){for(var V=!g.position[0].length,q=l.mallocFloat(this.count*2),z=0,H=0;z<this.counts.length;z++){var G=this.counts[z];if(V)for(var J=0;J<G;J++)q[H++]=g.position[z*2],q[H++]=g.position[z*2+1];else for(var le=0;le<G;le++)q[H++]=g.position[z][0],q[H++]=g.position[z][1]}this.position.call?this.position({type:"float",data:q}):this.position=this.regl.buffer({type:"float",data:q}),l.freeFloat(q)}else this.position.destroy&&this.position.destroy(),this.position={constant:g.position};if(g.text||p){var ye=l.mallocUint8(this.count),de=l.mallocFloat(this.count*2);this.textWidth=[];for(var me=0,W=0;me<this.counts.length;me++){for(var ie=this.counts[me],se=this.font[me]||this.font[0],ee=this.fontAtlas[me]||this.fontAtlas[0],pe=0;pe<ie;pe++){var oe=this.text.charAt(W),Y=this.text.charAt(W-1);if(ye[W]=ee.ids[oe],de[W*2]=se.width[oe],pe){var ce=de[W*2-2],ue=de[W*2],_e=de[W*2-1],Le=_e+ce*.5+ue*.5;if(this.kerning){var ze=se.kerning[Y+oe];ze&&(Le+=ze*.001)}de[W*2+1]=Le}else de[W*2+1]=de[W*2]*.5;W++}this.textWidth.push(de.length?de[W*2-2]*.5+de[W*2-1]:0)}g.align||(g.align=this.align),this.charBuffer({data:ye,type:"uint8",usage:"stream"}),this.sizeBuffer({data:de,type:"float",usage:"stream"}),l.freeUint8(ye),l.freeFloat(de),B.length&&this.font.forEach(function(be,Ye){var mt=f.fontAtlas[Ye],bt=mt.step,ft=Math.floor(k.maxAtlasSize/bt),Wt=Math.min(ft,mt.chars.length),Zt=Math.ceil(mt.chars.length/Wt),cr=c(Wt*bt),pr=c(Zt*bt);mt.width=cr,mt.height=pr,mt.rows=Zt,mt.cols=Wt,mt.em&&mt.texture({data:a({canvas:k.atlasCanvas,font:mt.fontString,chars:mt.chars,shape:[cr,pr],step:[bt,bt]})})})}if(g.align&&(this.align=g.align,this.alignOffset=this.textWidth.map(function(be,Ye){var mt=Array.isArray(f.align)?f.align.length>1?f.align[Ye]:f.align[0]:f.align;if(typeof mt=="number")return mt;switch(mt){case"right":case"end":return-be;case"center":case"centre":case"middle":return-be*.5}return 0})),this.baseline==null&&g.baseline==null&&(g.baseline=0),g.baseline!=null&&(this.baseline=g.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(be,Ye){var mt=(f.font[Ye]||f.font[0]).metrics,bt=0;return bt+=mt.bottom*.5,typeof be=="number"?bt+=be-mt.baseline:bt+=-mt[be],bt*=-1,bt})),g.color!=null)if(g.color||(g.color="transparent"),typeof g.color=="string"||!isNaN(g.color))this.color=r(g.color,"uint8");else{var Ge;if(typeof g.color[0]=="number"&&g.color.length>this.counts.length){var Ve=g.color.length;Ge=l.mallocUint8(Ve);for(var rt=(g.color.subarray||g.color.slice).bind(g.color),pt=0;pt<Ve;pt+=4)Ge.set(r(rt(pt,pt+4),"uint8"),pt)}else{var gt=g.color.length;Ge=l.mallocUint8(gt*4);for(var ht=0;ht<gt;ht++)Ge.set(r(g.color[ht]||0,"uint8"),ht*4)}this.color=Ge}if(g.position||g.text||g.color||g.baseline||g.align||g.font||g.offset||g.opacity){var lt=this.color.length>4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(lt){var Fe=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(Fe);for(var Pe=0;Pe<this.batch.length;Pe++)this.batch[Pe]={count:this.counts.length>1?this.counts[Pe]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Pe]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(Pe*4,Pe*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Pe]:this.opacity,baseline:this.baselineOffset[Pe]!=null?this.baselineOffset[Pe]:this.baselineOffset[0],align:this.align?this.alignOffset[Pe]!=null?this.alignOffset[Pe]:this.alignOffset[0]:0,atlas:this.fontAtlas[Pe]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(Pe*2,Pe*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=[]}},k.prototype.destroy=function(){},k.prototype.kerning=!0,k.prototype.position={constant:new Float32Array(2)},k.prototype.translate=null,k.prototype.scale=null,k.prototype.font=null,k.prototype.text="",k.prototype.positionOffset=[0,0],k.prototype.opacity=1,k.prototype.color=new Uint8Array([0,0,0,255]),k.prototype.alignOffset=[0,0],k.maxAtlasSize=1024,k.atlasCanvas=document.createElement("canvas"),k.atlasContext=k.atlasCanvas.getContext("2d",{alpha:!1}),k.baseFontSize=64,k.fonts={};function b(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}Z.exports=k}}),mee=Ne({"node_modules/@plotly/regl/dist/regl.unchecked.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():v.createREGL=w()})(te,function(){var v=function(At,kr){for(var Dr=Object.keys(kr),Hn=0;Hn<Dr.length;++Hn)At[Dr[Hn]]=kr[Dr[Hn]];return At},w=0,C=0,P=5,t=6;function r(At,kr){this.id=w++,this.type=At,this.data=kr}function a(At){return At.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function l(At){if(At.length===0)return[];var kr=At.charAt(0),Dr=At.charAt(At.length-1);if(At.length>1&&kr===Dr&&(kr==='"'||kr==="'"))return['"'+a(At.substr(1,At.length-2))+'"'];var Hn=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(At);if(Hn)return l(At.substr(0,Hn.index)).concat(l(Hn[1])).concat(l(At.substr(Hn.index+Hn[0].length)));var Ca=At.split(".");if(Ca.length===1)return['"'+a(At)+'"'];for(var Rn=[],Pn=0;Pn<Ca.length;++Pn)Rn=Rn.concat(l(Ca[Pn]));return Rn}function i(At){return"["+l(At).join("][")+"]"}function s(At,kr){return new r(At,i(kr+""))}function o(At){return typeof At=="function"&&!At._reglType||At instanceof r}function u(At,kr){if(typeof At=="function")return new r(C,At);if(typeof At=="number"||typeof At=="boolean")return new r(P,At);if(Array.isArray(At))return new r(t,At.map(function(Dr,Hn){return u(Dr)}));if(At instanceof r)return At}var d={DynamicVariable:r,define:s,isDynamic:o,unbox:u,accessor:i},h={next:typeof requestAnimationFrame=="function"?function(At){return requestAnimationFrame(At)}:function(At){return setTimeout(At,16)},cancel:typeof cancelAnimationFrame=="function"?function(At){return cancelAnimationFrame(At)}:clearTimeout},y=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date};function m(){var At={"":0},kr=[""];return{id:function(Dr){var Hn=At[Dr];return Hn||(Hn=At[Dr]=kr.length,kr.push(Dr),Hn)},str:function(Dr){return kr[Dr]}}}function E(At,kr,Dr){var Hn=document.createElement("canvas");v(Hn.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),At.appendChild(Hn),At===document.body&&(Hn.style.position="absolute",v(At.style,{margin:0,padding:0}));function Ca(){var ri=window.innerWidth,ei=window.innerHeight;if(At!==document.body){var ti=Hn.getBoundingClientRect();ri=ti.right-ti.left,ei=ti.bottom-ti.top}Hn.width=Dr*ri,Hn.height=Dr*ei}var Rn;At!==document.body&&typeof ResizeObserver=="function"?(Rn=new ResizeObserver(function(){setTimeout(Ca)}),Rn.observe(At)):window.addEventListener("resize",Ca,!1);function Pn(){Rn?Rn.disconnect():window.removeEventListener("resize",Ca),At.removeChild(Hn)}return Ca(),{canvas:Hn,onDestroy:Pn}}function c(At,kr){function Dr(Hn){try{return At.getContext(Hn,kr)}catch{return null}}return Dr("webgl")||Dr("experimental-webgl")||Dr("webgl-experimental")}function _(At){return typeof At.nodeName=="string"&&typeof At.appendChild=="function"&&typeof At.getBoundingClientRect=="function"}function T(At){return typeof At.drawArrays=="function"||typeof At.drawElements=="function"}function M(At){return typeof At=="string"?At.split():At}function k(At){return typeof At=="string"?document.querySelector(At):At}function b(At){var kr=At||{},Dr,Hn,Ca,Rn,Pn={},ri=[],ei=[],ti=typeof window>"u"?1:window.devicePixelRatio,pi=!1,eo={},Bi=function(gn){},fi=function(){};if(typeof kr=="string"?Dr=document.querySelector(kr):typeof kr=="object"&&(_(kr)?Dr=kr:T(kr)?(Rn=kr,Ca=Rn.canvas):("gl"in kr?Rn=kr.gl:"canvas"in kr?Ca=k(kr.canvas):"container"in kr&&(Hn=k(kr.container)),"attributes"in kr&&(Pn=kr.attributes),"extensions"in kr&&(ri=M(kr.extensions)),"optionalExtensions"in kr&&(ei=M(kr.optionalExtensions)),"onDone"in kr&&(Bi=kr.onDone),"profile"in kr&&(pi=!!kr.profile),"pixelRatio"in kr&&(ti=+kr.pixelRatio),"cachedCode"in kr&&(eo=kr.cachedCode))),Dr&&(Dr.nodeName.toLowerCase()==="canvas"?Ca=Dr:Hn=Dr),!Rn){if(!Ca){var Oa=E(Hn||document.body,Bi,ti);if(!Oa)return null;Ca=Oa.canvas,fi=Oa.onDestroy}Pn.premultipliedAlpha===void 0&&(Pn.premultipliedAlpha=!0),Rn=c(Ca,Pn)}return Rn?{gl:Rn,canvas:Ca,container:Hn,extensions:ri,optionalExtensions:ei,pixelRatio:ti,profile:pi,cachedCode:eo,onDone:Bi,onDestroy:fi}:(fi(),Bi("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(At,kr){var Dr={};function Hn(Pn){var ri=Pn.toLowerCase(),ei;try{ei=Dr[ri]=At.getExtension(ri)}catch{}return!!ei}for(var Ca=0;Ca<kr.extensions.length;++Ca){var Rn=kr.extensions[Ca];if(!Hn(Rn))return kr.onDestroy(),kr.onDone('"'+Rn+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return kr.optionalExtensions.forEach(Hn),{extensions:Dr,restore:function(){Object.keys(Dr).forEach(function(Pn){if(Dr[Pn]&&!Hn(Pn))throw new Error("(regl): error restoring extension "+Pn)})}}}function g(At,kr){for(var Dr=Array(At),Hn=0;Hn<At;++Hn)Dr[Hn]=kr(Hn);return Dr}var f=5120,p=5121,x=5122,N=5123,D=5124,B=5125,U=5126;function V(At){for(var kr=16;kr<=1<<28;kr*=16)if(At<=kr)return kr;return 0}function q(At){var kr,Dr;return kr=(At>65535)<<4,At>>>=kr,Dr=(At>255)<<3,At>>>=Dr,kr|=Dr,Dr=(At>15)<<2,At>>>=Dr,kr|=Dr,Dr=(At>3)<<1,At>>>=Dr,kr|=Dr,kr|At>>1}function z(){var At=g(8,function(){return[]});function kr(Rn){var Pn=V(Rn),ri=At[q(Pn)>>2];return ri.length>0?ri.pop():new ArrayBuffer(Pn)}function Dr(Rn){At[q(Rn.byteLength)>>2].push(Rn)}function Hn(Rn,Pn){var ri=null;switch(Rn){case f:ri=new Int8Array(kr(Pn),0,Pn);break;case p:ri=new Uint8Array(kr(Pn),0,Pn);break;case x:ri=new Int16Array(kr(2*Pn),0,Pn);break;case N:ri=new Uint16Array(kr(2*Pn),0,Pn);break;case D:ri=new Int32Array(kr(4*Pn),0,Pn);break;case B:ri=new Uint32Array(kr(4*Pn),0,Pn);break;case U:ri=new Float32Array(kr(4*Pn),0,Pn);break;default:return null}return ri.length!==Pn?ri.subarray(0,Pn):ri}function Ca(Rn){Dr(Rn.buffer)}return{alloc:kr,free:Dr,allocType:Hn,freeType:Ca}}var H=z();H.zero=z();var G=3408,J=3410,le=3411,ye=3412,de=3413,me=3414,W=3415,ie=33901,se=33902,ee=3379,pe=3386,oe=34921,Y=36347,ce=36348,ue=35661,_e=35660,Le=34930,ze=36349,Ge=34076,Ve=34024,rt=7936,pt=7937,gt=7938,ht=35724,lt=34047,Fe=36063,Pe=34852,be=3553,Ye=34067,mt=34069,bt=33984,ft=6408,Wt=5126,Zt=5121,cr=36160,pr=36053,Br=36064,Fr=16384,cn=function(At,kr){var Dr=1;kr.ext_texture_filter_anisotropic&&(Dr=At.getParameter(lt));var Hn=1,Ca=1;kr.webgl_draw_buffers&&(Hn=At.getParameter(Pe),Ca=At.getParameter(Fe));var Rn=!!kr.oes_texture_float;if(Rn){var Pn=At.createTexture();At.bindTexture(be,Pn),At.texImage2D(be,0,ft,1,1,0,ft,Wt,null);var ri=At.createFramebuffer();if(At.bindFramebuffer(cr,ri),At.framebufferTexture2D(cr,Br,be,Pn,0),At.bindTexture(be,null),At.checkFramebufferStatus(cr)!==pr)Rn=!1;else{At.viewport(0,0,1,1),At.clearColor(1,0,0,1),At.clear(Fr);var ei=H.allocType(Wt,4);At.readPixels(0,0,1,1,ft,Wt,ei),At.getError()?Rn=!1:(At.deleteFramebuffer(ri),At.deleteTexture(Pn),Rn=ei[0]===1),H.freeType(ei)}}var ti=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),pi=!0;if(!ti){var eo=At.createTexture(),Bi=H.allocType(Zt,36);At.activeTexture(bt),At.bindTexture(Ye,eo),At.texImage2D(mt,0,ft,3,3,0,ft,Zt,Bi),H.freeType(Bi),At.bindTexture(Ye,null),At.deleteTexture(eo),pi=!At.getError()}return{colorBits:[At.getParameter(J),At.getParameter(le),At.getParameter(ye),At.getParameter(de)],depthBits:At.getParameter(me),stencilBits:At.getParameter(W),subpixelBits:At.getParameter(G),extensions:Object.keys(kr).filter(function(fi){return!!kr[fi]}),maxAnisotropic:Dr,maxDrawbuffers:Hn,maxColorAttachments:Ca,pointSizeDims:At.getParameter(ie),lineWidthDims:At.getParameter(se),maxViewportDims:At.getParameter(pe),maxCombinedTextureUnits:At.getParameter(ue),maxCubeMapSize:At.getParameter(Ge),maxRenderbufferSize:At.getParameter(Ve),maxTextureUnits:At.getParameter(Le),maxTextureSize:At.getParameter(ee),maxAttributes:At.getParameter(oe),maxVertexUniforms:At.getParameter(Y),maxVertexTextureUnits:At.getParameter(_e),maxVaryingVectors:At.getParameter(ce),maxFragmentUniforms:At.getParameter(ze),glsl:At.getParameter(ht),renderer:At.getParameter(pt),vendor:At.getParameter(rt),version:At.getParameter(gt),readFloat:Rn,npotTextureCube:pi}},Nr=function(At){return At instanceof Uint8Array||At instanceof Uint16Array||At instanceof Uint32Array||At instanceof Int8Array||At instanceof Int16Array||At instanceof Int32Array||At instanceof Float32Array||At instanceof Float64Array||At instanceof Uint8ClampedArray};function Jr(At){return!!At&&typeof At=="object"&&Array.isArray(At.shape)&&Array.isArray(At.stride)&&typeof At.offset=="number"&&At.shape.length===At.stride.length&&(Array.isArray(At.data)||Nr(At.data))}var Dt=function(At){return Object.keys(At).map(function(kr){return At[kr]})},$e={shape:tt,flatten:Ie};function ot(At,kr,Dr){for(var Hn=0;Hn<kr;++Hn)Dr[Hn]=At[Hn]}function De(At,kr,Dr,Hn){for(var Ca=0,Rn=0;Rn<kr;++Rn)for(var Pn=At[Rn],ri=0;ri<Dr;++ri)Hn[Ca++]=Pn[ri]}function Ee(At,kr,Dr,Hn,Ca,Rn){for(var Pn=Rn,ri=0;ri<kr;++ri)for(var ei=At[ri],ti=0;ti<Dr;++ti)for(var pi=ei[ti],eo=0;eo<Hn;++eo)Ca[Pn++]=pi[eo]}function Ae(At,kr,Dr,Hn,Ca){for(var Rn=1,Pn=Dr+1;Pn<kr.length;++Pn)Rn*=kr[Pn];var ri=kr[Dr];if(kr.length-Dr===4){var ei=kr[Dr+1],ti=kr[Dr+2],pi=kr[Dr+3];for(Pn=0;Pn<ri;++Pn)Ee(At[Pn],ei,ti,pi,Hn,Ca),Ca+=Rn}else for(Pn=0;Pn<ri;++Pn)Ae(At[Pn],kr,Dr+1,Hn,Ca),Ca+=Rn}function Ie(At,kr,Dr,Hn){var Ca=1;if(kr.length)for(var Rn=0;Rn<kr.length;++Rn)Ca*=kr[Rn];else Ca=0;var Pn=Hn||H.allocType(Dr,Ca);switch(kr.length){case 0:break;case 1:ot(At,kr[0],Pn);break;case 2:De(At,kr[0],kr[1],Pn);break;case 3:Ee(At,kr[0],kr[1],kr[2],Pn,0);break;default:Ae(At,kr,0,Pn,0)}return Pn}function tt(At){for(var kr=[],Dr=At;Dr.length;Dr=Dr[0])kr.push(Dr.length);return kr}var st={"[object Int8Array]":5120,"[object Int16Array]":5122,"[object Int32Array]":5124,"[object Uint8Array]":5121,"[object Uint8ClampedArray]":5121,"[object Uint16Array]":5123,"[object Uint32Array]":5125,"[object Float32Array]":5126,"[object Float64Array]":5121,"[object ArrayBuffer]":5121},Ft=5120,Nt=5122,Xt=5124,lr=5121,Rr=5123,Mr=5125,Sr=5126,Kr=5126,qn={int8:Ft,int16:Nt,int32:Xt,uint8:lr,uint16:Rr,uint32:Mr,float:Sr,float32:Kr},ha=35048,ia=35040,xa={dynamic:ha,stream:ia,static:35044},ba=$e.flatten,ea=$e.shape,Za=35044,ui=35040,_r=5121,Qt=5126,yr=[];yr[5120]=1,yr[5122]=2,yr[5124]=4,yr[5121]=1,yr[5123]=2,yr[5125]=4,yr[5126]=4;function br(At){return st[Object.prototype.toString.call(At)]|0}function nn(At,kr){for(var Dr=0;Dr<kr.length;++Dr)At[Dr]=kr[Dr]}function wn(At,kr,Dr,Hn,Ca,Rn,Pn){for(var ri=0,ei=0;ei<Dr;++ei)for(var ti=0;ti<Hn;++ti)At[ri++]=kr[Ca*ei+Rn*ti+Pn]}function Ln(At,kr,Dr,Hn){var Ca=0,Rn={};function Pn(gn){this.id=Ca++,this.buffer=At.createBuffer(),this.type=gn,this.usage=Za,this.byteLength=0,this.dimension=1,this.dtype=_r,this.persistentData=null,Dr.profile&&(this.stats={size:0})}Pn.prototype.bind=function(){At.bindBuffer(this.type,this.buffer)},Pn.prototype.destroy=function(){Bi(this)};var ri=[];function ei(gn,Kn){var ga=ri.pop();return ga||(ga=new Pn(gn)),ga.bind(),eo(ga,Kn,ui,0,1,!1),ga}function ti(gn){ri.push(gn)}function pi(gn,Kn,ga){gn.byteLength=Kn.byteLength,At.bufferData(gn.type,Kn,ga)}function eo(gn,Kn,ga,za,wa,Ii){var si;if(gn.usage=ga,Array.isArray(Kn)){if(gn.dtype=za||Qt,Kn.length>0){var $i;if(Array.isArray(Kn[0])){si=ea(Kn);for(var Ta=1,ca=1;ca<si.length;++ca)Ta*=si[ca];gn.dimension=Ta,$i=ba(Kn,si,gn.dtype),pi(gn,$i,ga),Ii?gn.persistentData=$i:H.freeType($i)}else if(typeof Kn[0]=="number"){gn.dimension=wa;var Ei=H.allocType(gn.dtype,Kn.length);nn(Ei,Kn),pi(gn,Ei,ga),Ii?gn.persistentData=Ei:H.freeType(Ei)}else Nr(Kn[0])&&(gn.dimension=Kn[0].length,gn.dtype=za||br(Kn[0])||Qt,$i=ba(Kn,[Kn.length,Kn[0].length],gn.dtype),pi(gn,$i,ga),Ii?gn.persistentData=$i:H.freeType($i))}}else if(Nr(Kn))gn.dtype=za||br(Kn),gn.dimension=wa,pi(gn,Kn,ga),Ii&&(gn.persistentData=new Uint8Array(new Uint8Array(Kn.buffer)));else if(Jr(Kn)){si=Kn.shape;var Yn=Kn.stride,yi=Kn.offset,ni=0,Ji=0,Ho=0,ji=0;si.length===1?(ni=si[0],Ji=1,Ho=Yn[0],ji=0):si.length===2&&(ni=si[0],Ji=si[1],Ho=Yn[0],ji=Yn[1]),gn.dtype=za||br(Kn.data)||Qt,gn.dimension=Ji;var no=H.allocType(gn.dtype,ni*Ji);wn(no,Kn.data,ni,Ji,Ho,ji,yi),pi(gn,no,ga),Ii?gn.persistentData=no:H.freeType(no)}else Kn instanceof ArrayBuffer&&(gn.dtype=_r,gn.dimension=wa,pi(gn,Kn,ga),Ii&&(gn.persistentData=new Uint8Array(new Uint8Array(Kn))))}function Bi(gn){kr.bufferCount--,Hn(gn);var Kn=gn.buffer;At.deleteBuffer(Kn),gn.buffer=null,delete Rn[gn.id]}function fi(gn,Kn,ga,za){kr.bufferCount++;var wa=new Pn(Kn);Rn[wa.id]=wa;function Ii(Ta){var ca=Za,Ei=null,Yn=0,yi=0,ni=1;return Array.isArray(Ta)||Nr(Ta)||Jr(Ta)||Ta instanceof ArrayBuffer?Ei=Ta:typeof Ta=="number"?Yn=Ta|0:Ta&&("data"in Ta&&(Ei=Ta.data),"usage"in Ta&&(ca=xa[Ta.usage]),"type"in Ta&&(yi=qn[Ta.type]),"dimension"in Ta&&(ni=Ta.dimension|0),"length"in Ta&&(Yn=Ta.length|0)),wa.bind(),Ei?eo(wa,Ei,ca,yi,ni,za):(Yn&&At.bufferData(wa.type,Yn,ca),wa.dtype=yi||_r,wa.usage=ca,wa.dimension=ni,wa.byteLength=Yn),Dr.profile&&(wa.stats.size=wa.byteLength*yr[wa.dtype]),Ii}function si(Ta,ca){At.bufferSubData(wa.type,ca,Ta)}function $i(Ta,ca){var Ei=(ca||0)|0,Yn;if(wa.bind(),Nr(Ta)||Ta instanceof ArrayBuffer)si(Ta,Ei);else if(Array.isArray(Ta)){if(Ta.length>0){if(typeof Ta[0]=="number"){var yi=H.allocType(wa.dtype,Ta.length);nn(yi,Ta),si(yi,Ei),H.freeType(yi)}else if(Array.isArray(Ta[0])||Nr(Ta[0])){Yn=ea(Ta);var ni=ba(Ta,Yn,wa.dtype);si(ni,Ei),H.freeType(ni)}}}else if(Jr(Ta)){Yn=Ta.shape;var Ji=Ta.stride,Ho=0,ji=0,no=0,di=0;Yn.length===1?(Ho=Yn[0],ji=1,no=Ji[0],di=0):Yn.length===2&&(Ho=Yn[0],ji=Yn[1],no=Ji[0],di=Ji[1]);var jo=Array.isArray(Ta.data)?wa.dtype:br(Ta.data),rs=H.allocType(jo,Ho*ji);wn(rs,Ta.data,Ho,ji,no,di,Ta.offset),si(rs,Ei),H.freeType(rs)}return Ii}return ga||Ii(gn),Ii._reglType="buffer",Ii._buffer=wa,Ii.subdata=$i,Dr.profile&&(Ii.stats=wa.stats),Ii.destroy=function(){Bi(wa)},Ii}function Oa(){Dt(Rn).forEach(function(gn){gn.buffer=At.createBuffer(),At.bindBuffer(gn.type,gn.buffer),At.bufferData(gn.type,gn.persistentData||gn.byteLength,gn.usage)})}return Dr.profile&&(kr.getTotalBufferSize=function(){var gn=0;return Object.keys(Rn).forEach(function(Kn){gn+=Rn[Kn].stats.size}),gn}),{create:fi,createStream:ei,destroyStream:ti,clear:function(){Dt(Rn).forEach(Bi),ri.forEach(Bi)},getBuffer:function(gn){return gn&&gn._buffer instanceof Pn?gn._buffer:null},restore:Oa,_initBuffer:eo}}var Fn=0,va=0,Da=1,Pa=1,Fa=4,$a=4,oa={points:Fn,point:va,lines:Da,line:Pa,triangles:Fa,triangle:$a,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},zi=0,Gi=1,qt=4,Ct=5120,Ur=5121,Qr=5122,tn=5123,Xr=5124,en=5125,Tn=34963,hn=35040,Rt=35044;function xr(At,kr,Dr,Hn){var Ca={},Rn=0,Pn={uint8:Ur,uint16:tn};kr.oes_element_index_uint&&(Pn.uint32=en);function ri(Oa){this.id=Rn++,Ca[this.id]=this,this.buffer=Oa,this.primType=qt,this.vertCount=0,this.type=0}ri.prototype.bind=function(){this.buffer.bind()};var ei=[];function ti(Oa){var gn=ei.pop();return gn||(gn=new ri(Dr.create(null,Tn,!0,!1)._buffer)),eo(gn,Oa,hn,-1,-1,0,0),gn}function pi(Oa){ei.push(Oa)}function eo(Oa,gn,Kn,ga,za,wa,Ii){Oa.buffer.bind();var si;if(gn){var $i=Ii;!Ii&&(!Nr(gn)||Jr(gn)&&!Nr(gn.data))&&($i=kr.oes_element_index_uint?en:tn),Dr._initBuffer(Oa.buffer,gn,Kn,$i,3)}else At.bufferData(Tn,wa,Kn),Oa.buffer.dtype=si||Ur,Oa.buffer.usage=Kn,Oa.buffer.dimension=3,Oa.buffer.byteLength=wa;if(si=Ii,!Ii){switch(Oa.buffer.dtype){case Ur:case Ct:si=Ur;break;case tn:case Qr:si=tn;break;case en:case Xr:si=en;break}Oa.buffer.dtype=si}Oa.type=si;var Ta=za;Ta<0&&(Ta=Oa.buffer.byteLength,si===tn?Ta>>=1:si===en&&(Ta>>=2)),Oa.vertCount=Ta;var ca=ga;if(ga<0){ca=qt;var Ei=Oa.buffer.dimension;Ei===1&&(ca=zi),Ei===2&&(ca=Gi),Ei===3&&(ca=qt)}Oa.primType=ca}function Bi(Oa){Hn.elementsCount--,delete Ca[Oa.id],Oa.buffer.destroy(),Oa.buffer=null}function fi(Oa,gn){var Kn=Dr.create(null,Tn,!0),ga=new ri(Kn._buffer);Hn.elementsCount++;function za(wa){if(!wa)Kn(),ga.primType=qt,ga.vertCount=0,ga.type=Ur;else if(typeof wa=="number")Kn(wa),ga.primType=qt,ga.vertCount=wa|0,ga.type=Ur;else{var Ii=null,si=Rt,$i=-1,Ta=-1,ca=0,Ei=0;Array.isArray(wa)||Nr(wa)||Jr(wa)?Ii=wa:("data"in wa&&(Ii=wa.data),"usage"in wa&&(si=xa[wa.usage]),"primitive"in wa&&($i=oa[wa.primitive]),"count"in wa&&(Ta=wa.count|0),"type"in wa&&(Ei=Pn[wa.type]),"length"in wa?ca=wa.length|0:(ca=Ta,Ei===tn||Ei===Qr?ca*=2:(Ei===en||Ei===Xr)&&(ca*=4))),eo(ga,Ii,si,$i,Ta,ca,Ei)}return za}return za(Oa),za._reglType="elements",za._elements=ga,za.subdata=function(wa,Ii){return Kn.subdata(wa,Ii),za},za.destroy=function(){Bi(ga)},za}return{create:fi,createStream:ti,destroyStream:pi,getElements:function(Oa){return typeof Oa=="function"&&Oa._elements instanceof ri?Oa._elements:null},clear:function(){Dt(Ca).forEach(Bi)}}}var Wr=new Float32Array(1),An=new Uint32Array(Wr.buffer),Xn=5123;function na(At){for(var kr=H.allocType(Xn,At.length),Dr=0;Dr<At.length;++Dr)if(isNaN(At[Dr]))kr[Dr]=65535;else if(At[Dr]===1/0)kr[Dr]=31744;else if(At[Dr]===-1/0)kr[Dr]=64512;else{Wr[0]=At[Dr];var Hn=An[0],Ca=Hn>>>31<<15,Rn=(Hn<<1>>>24)-127,Pn=Hn>>13&1023;if(Rn<-24)kr[Dr]=Ca;else if(Rn<-14){var ri=-14-Rn;kr[Dr]=Ca+(Pn+1024>>ri)}else Rn>15?kr[Dr]=Ca+31744:kr[Dr]=Ca+(Rn+15<<10)+Pn}return kr}function ra(At){return Array.isArray(At)||Nr(At)}var Sn=34467,Wn=3553,Fi=34067,Ya=34069,Wi=6408,uo=6406,Ao=6407,wo=6409,Uo=6410,Ri=32854,ps=32855,as=36194,el=32819,As=32820,hs=33635,es=34042,tl=6402,Ks=34041,pl=35904,Ss=35906,ls=36193,Lo=33776,Es=33777,ml=33778,zl=33779,Bl=35986,Fs=35987,Di=34798,_o=35840,Nl=35841,Vs=35842,Ko=35843,jl=36196,rl=5121,yl=5123,Cu=5125,yo=5126,Ps=10242,ms=10243,Kl=10497,Jl=33071,Wo=33648,pu=10240,_u=10241,Xs=9728,Pl=9729,Gl=9984,Yl=9985,tc=9986,bf=9987,Qc=33170,ff=4352,Wh=4353,Dh=4354,Ll=34046,jc=3317,Yh=37440,hc=37441,rc=37443,dc=37444,hf=33984,au=[Gl,tc,Yl,bf],nc=[0,wo,Uo,Ao,Wi],Js={};Js[wo]=Js[uo]=Js[tl]=1,Js[Ks]=Js[Uo]=2,Js[Ao]=Js[pl]=3,Js[Wi]=Js[Ss]=4;function Ul(At){return"[object "+At+"]"}var Df=Ul("HTMLCanvasElement"),Cc=Ul("OffscreenCanvas"),Wf=Ul("CanvasRenderingContext2D"),mu=Ul("ImageBitmap"),Vd=Ul("HTMLImageElement"),Ws=Ul("HTMLVideoElement"),cv=Object.keys(st).concat([Df,Cc,Wf,mu,Vd,Ws]),Tl=[];Tl[rl]=1,Tl[yo]=4,Tl[ls]=2,Tl[yl]=2,Tl[Cu]=4;var Zo=[];Zo[Ri]=2,Zo[ps]=2,Zo[as]=2,Zo[Ks]=4,Zo[Lo]=.5,Zo[Es]=.5,Zo[ml]=1,Zo[zl]=1,Zo[Bl]=.5,Zo[Fs]=1,Zo[Di]=1,Zo[_o]=.5,Zo[Nl]=.25,Zo[Vs]=.5,Zo[Ko]=.25,Zo[jl]=.5;function dh(At){return Array.isArray(At)&&(At.length===0||typeof At[0]=="number")}function df(At){if(!Array.isArray(At))return!1;var kr=At.length;return!(kr===0||!ra(At[0]))}function Hu(At){return Object.prototype.toString.call(At)}function Zh(At){return Hu(At)===Df}function Yf(At){return Hu(At)===Cc}function wh(At){return Hu(At)===Wf}function ac(At){return Hu(At)===mu}function Cd(At){return Hu(At)===Vd}function ad(At){return Hu(At)===Ws}function Th(At){if(!At)return!1;var kr=Hu(At);return cv.indexOf(kr)>=0?!0:dh(At)||df(At)||Jr(At)}function Zf(At){return st[Object.prototype.toString.call(At)]|0}function $h(At,kr){var Dr=kr.length;switch(At.type){case rl:case yl:case Cu:case yo:var Hn=H.allocType(At.type,Dr);Hn.set(kr),At.data=Hn;break;case ls:At.data=na(kr);break}}function Kh(At,kr){return H.allocType(At.type===ls?yo:At.type,kr)}function vf(At,kr){At.type===ls?(At.data=na(kr),H.freeType(kr)):At.data=kr}function id(At,kr,Dr,Hn,Ca,Rn){for(var Pn=At.width,ri=At.height,ei=At.channels,ti=Pn*ri*ei,pi=Kh(At,ti),eo=0,Bi=0;Bi<ri;++Bi)for(var fi=0;fi<Pn;++fi)for(var Oa=0;Oa<ei;++Oa)pi[eo++]=kr[Dr*fi+Hn*Bi+Ca*Oa+Rn];vf(At,pi)}function Of(At,kr,Dr,Hn,Ca,Rn){var Pn;if(typeof Zo[At]<"u"?Pn=Zo[At]:Pn=Js[At]*Tl[kr],Rn&&(Pn*=6),Ca){for(var ri=0,ei=Dr;ei>=1;)ri+=Pn*ei*ei,ei/=2;return ri}else return Pn*Dr*Hn}function wf(At,kr,Dr,Hn,Ca,Rn,Pn){var ri={"don't care":ff,"dont care":ff,nice:Dh,fast:Wh},ei={repeat:Kl,clamp:Jl,mirror:Wo},ti={nearest:Xs,linear:Pl},pi=v({mipmap:bf,"nearest mipmap nearest":Gl,"linear mipmap nearest":Yl,"nearest mipmap linear":tc,"linear mipmap linear":bf},ti),eo={none:0,browser:dc},Bi={uint8:rl,rgba4:el,rgb565:hs,"rgb5 a1":As},fi={alpha:uo,luminance:wo,"luminance alpha":Uo,rgb:Ao,rgba:Wi,rgba4:Ri,"rgb5 a1":ps,rgb565:as},Oa={};kr.ext_srgb&&(fi.srgb=pl,fi.srgba=Ss),kr.oes_texture_float&&(Bi.float32=Bi.float=yo),kr.oes_texture_half_float&&(Bi.float16=Bi["half float"]=ls),kr.webgl_depth_texture&&(v(fi,{depth:tl,"depth stencil":Ks}),v(Bi,{uint16:yl,uint32:Cu,"depth stencil":es})),kr.webgl_compressed_texture_s3tc&&v(Oa,{"rgb s3tc dxt1":Lo,"rgba s3tc dxt1":Es,"rgba s3tc dxt3":ml,"rgba s3tc dxt5":zl}),kr.webgl_compressed_texture_atc&&v(Oa,{"rgb atc":Bl,"rgba atc explicit alpha":Fs,"rgba atc interpolated alpha":Di}),kr.webgl_compressed_texture_pvrtc&&v(Oa,{"rgb pvrtc 4bppv1":_o,"rgb pvrtc 2bppv1":Nl,"rgba pvrtc 4bppv1":Vs,"rgba pvrtc 2bppv1":Ko}),kr.webgl_compressed_texture_etc1&&(Oa["rgb etc1"]=jl);var gn=Array.prototype.slice.call(At.getParameter(Sn));Object.keys(Oa).forEach(function(X){var ge=Oa[X];gn.indexOf(ge)>=0&&(fi[X]=ge)});var Kn=Object.keys(fi);Dr.textureFormats=Kn;var ga=[];Object.keys(fi).forEach(function(X){var ge=fi[X];ga[ge]=X});var za=[];Object.keys(Bi).forEach(function(X){var ge=Bi[X];za[ge]=X});var wa=[];Object.keys(ti).forEach(function(X){var ge=ti[X];wa[ge]=X});var Ii=[];Object.keys(pi).forEach(function(X){var ge=pi[X];Ii[ge]=X});var si=[];Object.keys(ei).forEach(function(X){var ge=ei[X];si[ge]=X});var $i=Kn.reduce(function(X,ge){var ne=fi[ge];return ne===wo||ne===uo||ne===wo||ne===Uo||ne===tl||ne===Ks||kr.ext_srgb&&(ne===pl||ne===Ss)?X[ne]=ne:ne===ps||ge.indexOf("rgba")>=0?X[ne]=Wi:X[ne]=Ao,X},{});function Ta(){this.internalformat=Wi,this.format=Wi,this.type=rl,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=dc,this.width=0,this.height=0,this.channels=0}function ca(X,ge){X.internalformat=ge.internalformat,X.format=ge.format,X.type=ge.type,X.compressed=ge.compressed,X.premultiplyAlpha=ge.premultiplyAlpha,X.flipY=ge.flipY,X.unpackAlignment=ge.unpackAlignment,X.colorSpace=ge.colorSpace,X.width=ge.width,X.height=ge.height,X.channels=ge.channels}function Ei(X,ge){if(!(typeof ge!="object"||!ge)){if("premultiplyAlpha"in ge&&(X.premultiplyAlpha=ge.premultiplyAlpha),"flipY"in ge&&(X.flipY=ge.flipY),"alignment"in ge&&(X.unpackAlignment=ge.alignment),"colorSpace"in ge&&(X.colorSpace=eo[ge.colorSpace]),"type"in ge){var ne=ge.type;X.type=Bi[ne]}var Se=X.width,Je=X.height,_t=X.channels,Tt=!1;"shape"in ge?(Se=ge.shape[0],Je=ge.shape[1],ge.shape.length===3&&(_t=ge.shape[2],Tt=!0)):("radius"in ge&&(Se=Je=ge.radius),"width"in ge&&(Se=ge.width),"height"in ge&&(Je=ge.height),"channels"in ge&&(_t=ge.channels,Tt=!0)),X.width=Se|0,X.height=Je|0,X.channels=_t|0;var it=!1;if("format"in ge){var dt=ge.format,Lt=X.internalformat=fi[dt];X.format=$i[Lt],dt in Bi&&("type"in ge||(X.type=Bi[dt])),dt in Oa&&(X.compressed=!0),it=!0}!Tt&&it?X.channels=Js[X.format]:Tt&&!it&&X.channels!==nc[X.format]&&(X.format=X.internalformat=nc[X.channels])}}function Yn(X){At.pixelStorei(Yh,X.flipY),At.pixelStorei(hc,X.premultiplyAlpha),At.pixelStorei(rc,X.colorSpace),At.pixelStorei(jc,X.unpackAlignment)}function yi(){Ta.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function ni(X,ge){var ne=null;if(Th(ge)?ne=ge:ge&&(Ei(X,ge),"x"in ge&&(X.xOffset=ge.x|0),"y"in ge&&(X.yOffset=ge.y|0),Th(ge.data)&&(ne=ge.data)),ge.copy){var Se=Ca.viewportWidth,Je=Ca.viewportHeight;X.width=X.width||Se-X.xOffset,X.height=X.height||Je-X.yOffset,X.needsCopy=!0}else if(!ne)X.width=X.width||1,X.height=X.height||1,X.channels=X.channels||4;else if(Nr(ne))X.channels=X.channels||4,X.data=ne,!("type"in ge)&&X.type===rl&&(X.type=Zf(ne));else if(dh(ne))X.channels=X.channels||4,$h(X,ne),X.alignment=1,X.needsFree=!0;else if(Jr(ne)){var _t=ne.data;!Array.isArray(_t)&&X.type===rl&&(X.type=Zf(_t));var Tt=ne.shape,it=ne.stride,dt,Lt,or,er,ur,mr;Tt.length===3?(or=Tt[2],mr=it[2]):(or=1,mr=1),dt=Tt[0],Lt=Tt[1],er=it[0],ur=it[1],X.alignment=1,X.width=dt,X.height=Lt,X.channels=or,X.format=X.internalformat=nc[or],X.needsFree=!0,id(X,_t,er,ur,mr,ne.offset)}else if(Zh(ne)||Yf(ne)||wh(ne))Zh(ne)||Yf(ne)?X.element=ne:X.element=ne.canvas,X.width=X.element.width,X.height=X.element.height,X.channels=4;else if(ac(ne))X.element=ne,X.width=ne.width,X.height=ne.height,X.channels=4;else if(Cd(ne))X.element=ne,X.width=ne.naturalWidth,X.height=ne.naturalHeight,X.channels=4;else if(ad(ne))X.element=ne,X.width=ne.videoWidth,X.height=ne.videoHeight,X.channels=4;else if(df(ne)){var dr=X.width||ne[0].length,Yt=X.height||ne.length,ar=X.channels;ra(ne[0][0])?ar=ar||ne[0][0].length:ar=ar||1;for(var tr=$e.shape(ne),Yr=1,un=0;un<tr.length;++un)Yr*=tr[un];var En=Kh(X,Yr);$e.flatten(ne,tr,"",En),vf(X,En),X.alignment=1,X.width=dr,X.height=Yt,X.channels=ar,X.format=X.internalformat=nc[ar],X.needsFree=!0}X.type===yo||X.type}function Ji(X,ge,ne){var Se=X.element,Je=X.data,_t=X.internalformat,Tt=X.format,it=X.type,dt=X.width,Lt=X.height;Yn(X),Se?At.texImage2D(ge,ne,Tt,Tt,it,Se):X.compressed?At.compressedTexImage2D(ge,ne,_t,dt,Lt,0,Je):X.needsCopy?(Hn(),At.copyTexImage2D(ge,ne,Tt,X.xOffset,X.yOffset,dt,Lt,0)):At.texImage2D(ge,ne,Tt,dt,Lt,0,Tt,it,Je||null)}function Ho(X,ge,ne,Se,Je){var _t=X.element,Tt=X.data,it=X.internalformat,dt=X.format,Lt=X.type,or=X.width,er=X.height;Yn(X),_t?At.texSubImage2D(ge,Je,ne,Se,dt,Lt,_t):X.compressed?At.compressedTexSubImage2D(ge,Je,ne,Se,it,or,er,Tt):X.needsCopy?(Hn(),At.copyTexSubImage2D(ge,Je,ne,Se,X.xOffset,X.yOffset,or,er)):At.texSubImage2D(ge,Je,ne,Se,or,er,dt,Lt,Tt)}var ji=[];function no(){return ji.pop()||new yi}function di(X){X.needsFree&&H.freeType(X.data),yi.call(X),ji.push(X)}function jo(){Ta.call(this),this.genMipmaps=!1,this.mipmapHint=ff,this.mipmask=0,this.images=Array(16)}function rs(X,ge,ne){var Se=X.images[0]=no();X.mipmask=1,Se.width=X.width=ge,Se.height=X.height=ne,Se.channels=X.channels=4}function ds(X,ge){var ne=null;if(Th(ge))ne=X.images[0]=no(),ca(ne,X),ni(ne,ge),X.mipmask=1;else if(Ei(X,ge),Array.isArray(ge.mipmap))for(var Se=ge.mipmap,Je=0;Je<Se.length;++Je)ne=X.images[Je]=no(),ca(ne,X),ne.width>>=Je,ne.height>>=Je,ni(ne,Se[Je]),X.mipmask|=1<<Je;else ne=X.images[0]=no(),ca(ne,X),ni(ne,ge),X.mipmask=1;ca(X,X.images[0]),X.compressed&&(X.internalformat===Lo||X.internalformat===Es||X.internalformat===ml||X.internalformat)}function _l(X,ge){for(var ne=X.images,Se=0;Se<ne.length;++Se){if(!ne[Se])return;Ji(ne[Se],ge,Se)}}var vs=[];function Lu(){var X=vs.pop()||new jo;Ta.call(X),X.mipmask=0;for(var ge=0;ge<16;++ge)X.images[ge]=null;return X}function ll(X){for(var ge=X.images,ne=0;ne<ge.length;++ne)ge[ne]&&di(ge[ne]),ge[ne]=null;vs.push(X)}function wu(){this.minFilter=Xs,this.magFilter=Xs,this.wrapS=Jl,this.wrapT=Jl,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=ff}function Gu(X,ge){if("min"in ge){var ne=ge.min;X.minFilter=pi[ne],au.indexOf(X.minFilter)>=0&&!("faces"in ge)&&(X.genMipmaps=!0)}if("mag"in ge){var Se=ge.mag;X.magFilter=ti[Se]}var Je=X.wrapS,_t=X.wrapT;if("wrap"in ge){var Tt=ge.wrap;typeof Tt=="string"?Je=_t=ei[Tt]:Array.isArray(Tt)&&(Je=ei[Tt[0]],_t=ei[Tt[1]])}else{if("wrapS"in ge){var it=ge.wrapS;Je=ei[it]}if("wrapT"in ge){var dt=ge.wrapT;_t=ei[dt]}}if(X.wrapS=Je,X.wrapT=_t,"anisotropic"in ge&&(ge.anisotropic,X.anisotropic=ge.anisotropic),"mipmap"in ge){var Lt=!1;switch(typeof ge.mipmap){case"string":X.mipmapHint=ri[ge.mipmap],X.genMipmaps=!0,Lt=!0;break;case"boolean":Lt=X.genMipmaps=ge.mipmap;break;case"object":X.genMipmaps=!1,Lt=!0;break}Lt&&!("min"in ge)&&(X.minFilter=Gl)}}function oc(X,ge){At.texParameteri(ge,_u,X.minFilter),At.texParameteri(ge,pu,X.magFilter),At.texParameteri(ge,Ps,X.wrapS),At.texParameteri(ge,ms,X.wrapT),kr.ext_texture_filter_anisotropic&&At.texParameteri(ge,Ll,X.anisotropic),X.genMipmaps&&(At.hint(Qc,X.mipmapHint),At.generateMipmap(ge))}var Mf=0,su={},gu=Dr.maxTextureUnits,ko=Array(gu).map(function(){return null});function sc(X){Ta.call(this),this.mipmask=0,this.internalformat=Wi,this.id=Mf++,this.refCount=1,this.target=X,this.texture=At.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new wu,Pn.profile&&(this.stats={size:0})}function $s(X){At.activeTexture(hf),At.bindTexture(X.target,X.texture)}function Hl(){var X=ko[0];X?At.bindTexture(X.target,X.texture):At.bindTexture(Wn,null)}function gc(X){var ge=X.texture,ne=X.unit,Se=X.target;ne>=0&&(At.activeTexture(hf+ne),At.bindTexture(Se,null),ko[ne]=null),At.deleteTexture(ge),X.texture=null,X.params=null,X.pixels=null,X.refCount=0,delete su[X.id],Rn.textureCount--}v(sc.prototype,{bind:function(){var X=this;X.bindCount+=1;var ge=X.unit;if(ge<0){for(var ne=0;ne<gu;++ne){var Se=ko[ne];if(Se){if(Se.bindCount>0)continue;Se.unit=-1}ko[ne]=X,ge=ne;break}Pn.profile&&Rn.maxTextureUnits<ge+1&&(Rn.maxTextureUnits=ge+1),X.unit=ge,At.activeTexture(hf+ge),At.bindTexture(X.target,X.texture)}return ge},unbind:function(){this.bindCount-=1},decRef:function(){--this.refCount<=0&&gc(this)}});function _c(X,ge){var ne=new sc(Wn);su[ne.id]=ne,Rn.textureCount++;function Se(Tt,it){var dt=ne.texInfo;wu.call(dt);var Lt=Lu();return typeof Tt=="number"?typeof it=="number"?rs(Lt,Tt|0,it|0):rs(Lt,Tt|0,Tt|0):Tt?(Gu(dt,Tt),ds(Lt,Tt)):rs(Lt,1,1),dt.genMipmaps&&(Lt.mipmask=(Lt.width<<1)-1),ne.mipmask=Lt.mipmask,ca(ne,Lt),ne.internalformat=Lt.internalformat,Se.width=Lt.width,Se.height=Lt.height,$s(ne),_l(Lt,Wn),oc(dt,Wn),Hl(),ll(Lt),Pn.profile&&(ne.stats.size=Of(ne.internalformat,ne.type,Lt.width,Lt.height,dt.genMipmaps,!1)),Se.format=ga[ne.internalformat],Se.type=za[ne.type],Se.mag=wa[dt.magFilter],Se.min=Ii[dt.minFilter],Se.wrapS=si[dt.wrapS],Se.wrapT=si[dt.wrapT],Se}function Je(Tt,it,dt,Lt){var or=it|0,er=dt|0,ur=Lt|0,mr=no();return ca(mr,ne),mr.width=0,mr.height=0,ni(mr,Tt),mr.width=mr.width||(ne.width>>ur)-or,mr.height=mr.height||(ne.height>>ur)-er,$s(ne),Ho(mr,Wn,or,er,ur),Hl(),di(mr),Se}function _t(Tt,it){var dt=Tt|0,Lt=it|0||dt;if(dt===ne.width&&Lt===ne.height)return Se;Se.width=ne.width=dt,Se.height=ne.height=Lt,$s(ne);for(var or=0;ne.mipmask>>or;++or){var er=dt>>or,ur=Lt>>or;if(!er||!ur)break;At.texImage2D(Wn,or,ne.format,er,ur,0,ne.format,ne.type,null)}return Hl(),Pn.profile&&(ne.stats.size=Of(ne.internalformat,ne.type,dt,Lt,!1,!1)),Se}return Se(X,ge),Se.subimage=Je,Se.resize=_t,Se._reglType="texture2d",Se._texture=ne,Pn.profile&&(Se.stats=ne.stats),Se.destroy=function(){ne.decRef()},Se}function Vo(X,ge,ne,Se,Je,_t){var Tt=new sc(Fi);su[Tt.id]=Tt,Rn.cubeCount++;var it=new Array(6);function dt(er,ur,mr,dr,Yt,ar){var tr,Yr=Tt.texInfo;for(wu.call(Yr),tr=0;tr<6;++tr)it[tr]=Lu();if(typeof er=="number"||!er){var un=er|0||1;for(tr=0;tr<6;++tr)rs(it[tr],un,un)}else if(typeof er=="object")if(ur)ds(it[0],er),ds(it[1],ur),ds(it[2],mr),ds(it[3],dr),ds(it[4],Yt),ds(it[5],ar);else if(Gu(Yr,er),Ei(Tt,er),"faces"in er){var En=er.faces;for(tr=0;tr<6;++tr)ca(it[tr],Tt),ds(it[tr],En[tr])}else for(tr=0;tr<6;++tr)ds(it[tr],er);for(ca(Tt,it[0]),Yr.genMipmaps?Tt.mipmask=(it[0].width<<1)-1:Tt.mipmask=it[0].mipmask,Tt.internalformat=it[0].internalformat,dt.width=it[0].width,dt.height=it[0].height,$s(Tt),tr=0;tr<6;++tr)_l(it[tr],Ya+tr);for(oc(Yr,Fi),Hl(),Pn.profile&&(Tt.stats.size=Of(Tt.internalformat,Tt.type,dt.width,dt.height,Yr.genMipmaps,!0)),dt.format=ga[Tt.internalformat],dt.type=za[Tt.type],dt.mag=wa[Yr.magFilter],dt.min=Ii[Yr.minFilter],dt.wrapS=si[Yr.wrapS],dt.wrapT=si[Yr.wrapT],tr=0;tr<6;++tr)ll(it[tr]);return dt}function Lt(er,ur,mr,dr,Yt){var ar=mr|0,tr=dr|0,Yr=Yt|0,un=no();return ca(un,Tt),un.width=0,un.height=0,ni(un,ur),un.width=un.width||(Tt.width>>Yr)-ar,un.height=un.height||(Tt.height>>Yr)-tr,$s(Tt),Ho(un,Ya+er,ar,tr,Yr),Hl(),di(un),dt}function or(er){var ur=er|0;if(ur!==Tt.width){dt.width=Tt.width=ur,dt.height=Tt.height=ur,$s(Tt);for(var mr=0;mr<6;++mr)for(var dr=0;Tt.mipmask>>dr;++dr)At.texImage2D(Ya+mr,dr,Tt.format,ur>>dr,ur>>dr,0,Tt.format,Tt.type,null);return Hl(),Pn.profile&&(Tt.stats.size=Of(Tt.internalformat,Tt.type,dt.width,dt.height,!1,!0)),dt}}return dt(X,ge,ne,Se,Je,_t),dt.subimage=Lt,dt.resize=or,dt._reglType="textureCube",dt._texture=Tt,Pn.profile&&(dt.stats=Tt.stats),dt.destroy=function(){Tt.decRef()},dt}function Ms(){for(var X=0;X<gu;++X)At.activeTexture(hf+X),At.bindTexture(Wn,null),ko[X]=null;Dt(su).forEach(gc),Rn.cubeCount=0,Rn.textureCount=0}Pn.profile&&(Rn.getTotalTextureSize=function(){var X=0;return Object.keys(su).forEach(function(ge){X+=su[ge].stats.size}),X});function Rs(){for(var X=0;X<gu;++X){var ge=ko[X];ge&&(ge.bindCount=0,ge.unit=-1,ko[X]=null)}Dt(su).forEach(function(ne){ne.texture=At.createTexture(),At.bindTexture(ne.target,ne.texture);for(var Se=0;Se<32;++Se)if((ne.mipmask&1<<Se)!==0)if(ne.target===Wn)At.texImage2D(Wn,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);else for(var Je=0;Je<6;++Je)At.texImage2D(Ya+Je,Se,ne.internalformat,ne.width>>Se,ne.height>>Se,0,ne.internalformat,ne.type,null);oc(ne.texInfo,ne.target)})}function Me(){for(var X=0;X<gu;++X){var ge=ko[X];ge&&(ge.bindCount=0,ge.unit=-1,ko[X]=null),At.activeTexture(hf+X),At.bindTexture(Wn,null),At.bindTexture(Fi,null)}}return{create2D:_c,createCube:Vo,clear:Ms,getTexture:function(X){return null},restore:Rs,refresh:Me}}var ic=36161,ih=32854,Jh=32855,Xl=36194,Oh=33189,Hd=36168,od=34041,Ah=35907,sd=34836,Uc=34842,ld=34843,Su=[];Su[ih]=2,Su[Jh]=2,Su[Xl]=2,Su[Oh]=2,Su[Hd]=1,Su[od]=4,Su[Ah]=4,Su[sd]=16,Su[Uc]=8,Su[ld]=6;function qc(At,kr,Dr){return Su[At]*kr*Dr}var $f=function(At,kr,Dr,Hn,Ca){var Rn={rgba4:ih,rgb565:Xl,"rgb5 a1":Jh,depth:Oh,stencil:Hd,"depth stencil":od};kr.ext_srgb&&(Rn.srgba=Ah),kr.ext_color_buffer_half_float&&(Rn.rgba16f=Uc,Rn.rgb16f=ld),kr.webgl_color_buffer_float&&(Rn.rgba32f=sd);var Pn=[];Object.keys(Rn).forEach(function(fi){var Oa=Rn[fi];Pn[Oa]=fi});var ri=0,ei={};function ti(fi){this.id=ri++,this.refCount=1,this.renderbuffer=fi,this.format=ih,this.width=0,this.height=0,Ca.profile&&(this.stats={size:0})}ti.prototype.decRef=function(){--this.refCount<=0&&pi(this)};function pi(fi){var Oa=fi.renderbuffer;At.bindRenderbuffer(ic,null),At.deleteRenderbuffer(Oa),fi.renderbuffer=null,fi.refCount=0,delete ei[fi.id],Hn.renderbufferCount--}function eo(fi,Oa){var gn=new ti(At.createRenderbuffer());ei[gn.id]=gn,Hn.renderbufferCount++;function Kn(za,wa){var Ii=0,si=0,$i=ih;if(typeof za=="object"&&za){var Ta=za;if("shape"in Ta){var ca=Ta.shape;Ii=ca[0]|0,si=ca[1]|0}else"radius"in Ta&&(Ii=si=Ta.radius|0),"width"in Ta&&(Ii=Ta.width|0),"height"in Ta&&(si=Ta.height|0);"format"in Ta&&($i=Rn[Ta.format])}else typeof za=="number"?(Ii=za|0,typeof wa=="number"?si=wa|0:si=Ii):za||(Ii=si=1);if(!(Ii===gn.width&&si===gn.height&&$i===gn.format))return Kn.width=gn.width=Ii,Kn.height=gn.height=si,gn.format=$i,At.bindRenderbuffer(ic,gn.renderbuffer),At.renderbufferStorage(ic,$i,Ii,si),Ca.profile&&(gn.stats.size=qc(gn.format,gn.width,gn.height)),Kn.format=Pn[gn.format],Kn}function ga(za,wa){var Ii=za|0,si=wa|0||Ii;return Ii===gn.width&&si===gn.height||(Kn.width=gn.width=Ii,Kn.height=gn.height=si,At.bindRenderbuffer(ic,gn.renderbuffer),At.renderbufferStorage(ic,gn.format,Ii,si),Ca.profile&&(gn.stats.size=qc(gn.format,gn.width,gn.height))),Kn}return Kn(fi,Oa),Kn.resize=ga,Kn._reglType="renderbuffer",Kn._renderbuffer=gn,Ca.profile&&(Kn.stats=gn.stats),Kn.destroy=function(){gn.decRef()},Kn}Ca.profile&&(Hn.getTotalRenderbufferSize=function(){var fi=0;return Object.keys(ei).forEach(function(Oa){fi+=ei[Oa].stats.size}),fi});function Bi(){Dt(ei).forEach(function(fi){fi.renderbuffer=At.createRenderbuffer(),At.bindRenderbuffer(ic,fi.renderbuffer),At.renderbufferStorage(ic,fi.format,fi.width,fi.height)}),At.bindRenderbuffer(ic,null)}return{create:eo,clear:function(){Dt(ei).forEach(pi)},restore:Bi}},iu=36160,zf=36161,wc=3553,Vc=34069,yu=36064,vh=36096,Tf=36128,Kf=33306,zh=36053,Gd=36193,Tv=5121,ph=5126,Nh=6407,ef=6408,Fh=[];Fh[ef]=4,Fh[Nh]=3;var vc=[];vc[Tv]=1,vc[ph]=4,vc[Gd]=2;function mh(At,kr,Dr,Hn,Ca,Rn){var Pn={cur:null,next:null,dirty:!1,setFBO:null},ri=["rgba"],ei=["rgba4","rgb565","rgb5 a1"];kr.ext_srgb&&ei.push("srgba"),kr.ext_color_buffer_half_float&&ei.push("rgba16f","rgb16f"),kr.webgl_color_buffer_float&&ei.push("rgba32f"),kr.oes_texture_half_float,kr.oes_texture_float;function ti(Yn,yi,ni){this.target=Yn,this.texture=yi,this.renderbuffer=ni;var Ji=0,Ho=0;yi?(Ji=yi.width,Ho=yi.height):ni&&(Ji=ni.width,Ho=ni.height),this.width=Ji,this.height=Ho}function pi(Yn){Yn&&(Yn.texture&&Yn.texture._texture.decRef(),Yn.renderbuffer&&Yn.renderbuffer._renderbuffer.decRef())}function eo(Yn,yi,ni){if(Yn)if(Yn.texture){var Ji=Yn.texture._texture;Math.max(1,Ji.width),Math.max(1,Ji.height),Ji.refCount+=1}else{var Ho=Yn.renderbuffer._renderbuffer;Ho.refCount+=1}}function Bi(Yn,yi){yi&&(yi.texture?At.framebufferTexture2D(iu,Yn,yi.target,yi.texture._texture.texture,0):At.framebufferRenderbuffer(iu,Yn,zf,yi.renderbuffer._renderbuffer.renderbuffer))}function fi(Yn){var yi=wc,ni=null,Ji=null,Ho=Yn;typeof Yn=="object"&&(Ho=Yn.data,"target"in Yn&&(yi=Yn.target|0));var ji=Ho._reglType;return ji==="texture2d"||ji==="textureCube"?ni=Ho:ji==="renderbuffer"&&(Ji=Ho,yi=zf),new ti(yi,ni,Ji)}function Oa(Yn,yi,ni,Ji,Ho){if(ni){var ji=Hn.create2D({width:Yn,height:yi,format:Ji,type:Ho});return ji._texture.refCount=0,new ti(wc,ji,null)}else{var no=Ca.create({width:Yn,height:yi,format:Ji});return no._renderbuffer.refCount=0,new ti(zf,null,no)}}function gn(Yn){return Yn&&(Yn.texture||Yn.renderbuffer)}function Kn(Yn,yi,ni){Yn&&(Yn.texture?Yn.texture.resize(yi,ni):Yn.renderbuffer&&Yn.renderbuffer.resize(yi,ni),Yn.width=yi,Yn.height=ni)}var ga=0,za={};function wa(){this.id=ga++,za[this.id]=this,this.framebuffer=At.createFramebuffer(),this.width=0,this.height=0,this.colorAttachments=[],this.depthAttachment=null,this.stencilAttachment=null,this.depthStencilAttachment=null}function Ii(Yn){Yn.colorAttachments.forEach(pi),pi(Yn.depthAttachment),pi(Yn.stencilAttachment),pi(Yn.depthStencilAttachment)}function si(Yn){var yi=Yn.framebuffer;At.deleteFramebuffer(yi),Yn.framebuffer=null,Rn.framebufferCount--,delete za[Yn.id]}function $i(Yn){var yi;At.bindFramebuffer(iu,Yn.framebuffer);var ni=Yn.colorAttachments;for(yi=0;yi<ni.length;++yi)Bi(yu+yi,ni[yi]);for(yi=ni.length;yi<Dr.maxColorAttachments;++yi)At.framebufferTexture2D(iu,yu+yi,wc,null,0);At.framebufferTexture2D(iu,Kf,wc,null,0),At.framebufferTexture2D(iu,vh,wc,null,0),At.framebufferTexture2D(iu,Tf,wc,null,0),Bi(vh,Yn.depthAttachment),Bi(Tf,Yn.stencilAttachment),Bi(Kf,Yn.depthStencilAttachment);var Ji=At.checkFramebufferStatus(iu);At.isContextLost(),At.bindFramebuffer(iu,Pn.next?Pn.next.framebuffer:null),Pn.cur=Pn.next,At.getError()}function Ta(Yn,yi){var ni=new wa;Rn.framebufferCount++;function Ji(ji,no){var di,jo=0,rs=0,ds=!0,_l=!0,vs=null,Lu=!0,ll="rgba",wu="uint8",Gu=1,oc=null,Mf=null,su=null,gu=!1;if(typeof ji=="number")jo=ji|0,rs=no|0||jo;else if(!ji)jo=rs=1;else{var ko=ji;if("shape"in ko){var sc=ko.shape;jo=sc[0],rs=sc[1]}else"radius"in ko&&(jo=rs=ko.radius),"width"in ko&&(jo=ko.width),"height"in ko&&(rs=ko.height);("color"in ko||"colors"in ko)&&(vs=ko.color||ko.colors),vs||("colorCount"in ko&&(Gu=ko.colorCount|0),"colorTexture"in ko&&(Lu=!!ko.colorTexture,ll="rgba4"),"colorType"in ko&&(wu=ko.colorType,Lu||(wu==="half float"||wu==="float16"?ll="rgba16f":(wu==="float"||wu==="float32")&&(ll="rgba32f"))),"colorFormat"in ko&&(ll=ko.colorFormat,ri.indexOf(ll)>=0?Lu=!0:ei.indexOf(ll)>=0&&(Lu=!1))),("depthTexture"in ko||"depthStencilTexture"in ko)&&(gu=!!(ko.depthTexture||ko.depthStencilTexture)),"depth"in ko&&(typeof ko.depth=="boolean"?ds=ko.depth:(oc=ko.depth,_l=!1)),"stencil"in ko&&(typeof ko.stencil=="boolean"?_l=ko.stencil:(Mf=ko.stencil,ds=!1)),"depthStencil"in ko&&(typeof ko.depthStencil=="boolean"?ds=_l=ko.depthStencil:(su=ko.depthStencil,ds=!1,_l=!1))}var $s=null,Hl=null,gc=null,_c=null;if(Array.isArray(vs))$s=vs.map(fi);else if(vs)$s=[fi(vs)];else for($s=new Array(Gu),di=0;di<Gu;++di)$s[di]=Oa(jo,rs,Lu,ll,wu);for(jo=jo||$s[0].width,rs=rs||$s[0].height,oc?Hl=fi(oc):ds&&!_l&&(Hl=Oa(jo,rs,gu,"depth","uint32")),Mf?gc=fi(Mf):_l&&!ds&&(gc=Oa(jo,rs,!1,"stencil","uint8")),su?_c=fi(su):!oc&&!Mf&&_l&&ds&&(_c=Oa(jo,rs,gu,"depth stencil","depth stencil")),di=0;di<$s.length;++di)eo($s[di]),$s[di]&&$s[di].texture&&Fh[$s[di].texture._texture.format]*vc[$s[di].texture._texture.type];return eo(Hl),eo(gc),eo(_c),Ii(ni),ni.width=jo,ni.height=rs,ni.colorAttachments=$s,ni.depthAttachment=Hl,ni.stencilAttachment=gc,ni.depthStencilAttachment=_c,Ji.color=$s.map(gn),Ji.depth=gn(Hl),Ji.stencil=gn(gc),Ji.depthStencil=gn(_c),Ji.width=ni.width,Ji.height=ni.height,$i(ni),Ji}function Ho(ji,no){var di=Math.max(ji|0,1),jo=Math.max(no|0||di,1);if(di===ni.width&&jo===ni.height)return Ji;for(var rs=ni.colorAttachments,ds=0;ds<rs.length;++ds)Kn(rs[ds],di,jo);return Kn(ni.depthAttachment,di,jo),Kn(ni.stencilAttachment,di,jo),Kn(ni.depthStencilAttachment,di,jo),ni.width=Ji.width=di,ni.height=Ji.height=jo,$i(ni),Ji}return Ji(Yn,yi),v(Ji,{resize:Ho,_reglType:"framebuffer",_framebuffer:ni,destroy:function(){si(ni),Ii(ni)},use:function(ji){Pn.setFBO({framebuffer:Ji},ji)}})}function ca(Yn){var yi=Array(6);function ni(Ho){var ji,no={color:null},di=0,jo=null,rs="rgba",ds="uint8",_l=1;if(typeof Ho=="number")di=Ho|0;else if(!Ho)di=1;else{var vs=Ho;if("shape"in vs){var Lu=vs.shape;di=Lu[0]}else"radius"in vs&&(di=vs.radius|0),"width"in vs?di=vs.width|0:"height"in vs&&(di=vs.height|0);("color"in vs||"colors"in vs)&&(jo=vs.color||vs.colors),jo||("colorCount"in vs&&(_l=vs.colorCount|0),"colorType"in vs&&(ds=vs.colorType),"colorFormat"in vs&&(rs=vs.colorFormat)),"depth"in vs&&(no.depth=vs.depth),"stencil"in vs&&(no.stencil=vs.stencil),"depthStencil"in vs&&(no.depthStencil=vs.depthStencil)}var ll;if(jo)if(Array.isArray(jo))for(ll=[],ji=0;ji<jo.length;++ji)ll[ji]=jo[ji];else ll=[jo];else{ll=Array(_l);var wu={radius:di,format:rs,type:ds};for(ji=0;ji<_l;++ji)ll[ji]=Hn.createCube(wu)}for(no.color=Array(ll.length),ji=0;ji<ll.length;++ji){var Gu=ll[ji];di=di||Gu.width,no.color[ji]={target:Vc,data:ll[ji]}}for(ji=0;ji<6;++ji){for(var oc=0;oc<ll.length;++oc)no.color[oc].target=Vc+ji;ji>0&&(no.depth=yi[0].depth,no.stencil=yi[0].stencil,no.depthStencil=yi[0].depthStencil),yi[ji]?yi[ji](no):yi[ji]=Ta(no)}return v(ni,{width:di,height:di,color:ll})}function Ji(Ho){var ji,no=Ho|0;if(no===ni.width)return ni;var di=ni.color;for(ji=0;ji<di.length;++ji)di[ji].resize(no);for(ji=0;ji<6;++ji)yi[ji].resize(no);return ni.width=ni.height=no,ni}return ni(Yn),v(ni,{faces:yi,resize:Ji,_reglType:"framebufferCube",destroy:function(){yi.forEach(function(Ho){Ho.destroy()})}})}function Ei(){Pn.cur=null,Pn.next=null,Pn.dirty=!0,Dt(za).forEach(function(Yn){Yn.framebuffer=At.createFramebuffer(),$i(Yn)})}return v(Pn,{getFramebuffer:function(Yn){if(typeof Yn=="function"&&Yn._reglType==="framebuffer"){var yi=Yn._framebuffer;if(yi instanceof wa)return yi}return null},create:Ta,createCube:ca,clear:function(){Dt(za).forEach(si)},restore:Ei})}var ud=5126,yh=34962,uu=34963;function Hc(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=ud,this.offset=0,this.stride=0,this.divisor=0}function pf(At,kr,Dr,Hn,Ca,Rn,Pn){for(var ri=Dr.maxAttributes,ei=new Array(ri),ti=0;ti<ri;++ti)ei[ti]=new Hc;var pi=0,eo={},Bi={Record:Hc,scope:{},state:ei,currentVAO:null,targetVAO:null,restore:Oa()?si:function(){},createVAO:$i,getVAO:Kn,destroyBuffer:fi,setVAO:Oa()?ga:za,clear:Oa()?wa:function(){}};function fi(Ta){for(var ca=0;ca<ei.length;++ca){var Ei=ei[ca];Ei.buffer===Ta&&(At.disableVertexAttribArray(ca),Ei.buffer=null)}}function Oa(){return kr.oes_vertex_array_object}function gn(){return kr.angle_instanced_arrays}function Kn(Ta){return typeof Ta=="function"&&Ta._vao?Ta._vao:null}function ga(Ta){if(Ta!==Bi.currentVAO){var ca=Oa();Ta?ca.bindVertexArrayOES(Ta.vao):ca.bindVertexArrayOES(null),Bi.currentVAO=Ta}}function za(Ta){if(Ta!==Bi.currentVAO){if(Ta)Ta.bindAttrs();else{for(var ca=gn(),Ei=0;Ei<ei.length;++Ei){var Yn=ei[Ei];Yn.buffer?(At.enableVertexAttribArray(Ei),Yn.buffer.bind(),At.vertexAttribPointer(Ei,Yn.size,Yn.type,Yn.normalized,Yn.stride,Yn.offfset),ca&&Yn.divisor&&ca.vertexAttribDivisorANGLE(Ei,Yn.divisor)):(At.disableVertexAttribArray(Ei),At.vertexAttrib4f(Ei,Yn.x,Yn.y,Yn.z,Yn.w))}Pn.elements?At.bindBuffer(uu,Pn.elements.buffer.buffer):At.bindBuffer(uu,null)}Bi.currentVAO=Ta}}function wa(){Dt(eo).forEach(function(Ta){Ta.destroy()})}function Ii(){this.id=++pi,this.attributes=[],this.elements=null,this.ownsElements=!1,this.count=0,this.offset=0,this.instances=-1,this.primitive=4;var Ta=Oa();Ta?this.vao=Ta.createVertexArrayOES():this.vao=null,eo[this.id]=this,this.buffers=[]}Ii.prototype.bindAttrs=function(){for(var Ta=gn(),ca=this.attributes,Ei=0;Ei<ca.length;++Ei){var Yn=ca[Ei];Yn.buffer?(At.enableVertexAttribArray(Ei),At.bindBuffer(yh,Yn.buffer.buffer),At.vertexAttribPointer(Ei,Yn.size,Yn.type,Yn.normalized,Yn.stride,Yn.offset),Ta&&Yn.divisor&&Ta.vertexAttribDivisorANGLE(Ei,Yn.divisor)):(At.disableVertexAttribArray(Ei),At.vertexAttrib4f(Ei,Yn.x,Yn.y,Yn.z,Yn.w))}for(var yi=ca.length;yi<ri;++yi)At.disableVertexAttribArray(yi);var ni=Rn.getElements(this.elements);ni?At.bindBuffer(uu,ni.buffer.buffer):At.bindBuffer(uu,null)},Ii.prototype.refresh=function(){var Ta=Oa();Ta&&(Ta.bindVertexArrayOES(this.vao),this.bindAttrs(),Bi.currentVAO=null,Ta.bindVertexArrayOES(null))},Ii.prototype.destroy=function(){if(this.vao){var Ta=Oa();this===Bi.currentVAO&&(Bi.currentVAO=null,Ta.bindVertexArrayOES(null)),Ta.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),eo[this.id]&&(delete eo[this.id],Hn.vaoCount-=1)};function si(){var Ta=Oa();Ta&&Dt(eo).forEach(function(ca){ca.refresh()})}function $i(Ta){var ca=new Ii;Hn.vaoCount+=1;function Ei(Yn){var yi;if(Array.isArray(Yn))yi=Yn,ca.elements&&ca.ownsElements&&ca.elements.destroy(),ca.elements=null,ca.ownsElements=!1,ca.offset=0,ca.count=0,ca.instances=-1,ca.primitive=4;else{if(Yn.elements){var ni=Yn.elements;ca.ownsElements?typeof ni=="function"&&ni._reglType==="elements"?(ca.elements.destroy(),ca.ownsElements=!1):(ca.elements(ni),ca.ownsElements=!1):Rn.getElements(Yn.elements)?(ca.elements=Yn.elements,ca.ownsElements=!1):(ca.elements=Rn.create(Yn.elements),ca.ownsElements=!0)}else ca.elements=null,ca.ownsElements=!1;yi=Yn.attributes,ca.offset=0,ca.count=-1,ca.instances=-1,ca.primitive=4,ca.elements&&(ca.count=ca.elements._elements.vertCount,ca.primitive=ca.elements._elements.primType),"offset"in Yn&&(ca.offset=Yn.offset|0),"count"in Yn&&(ca.count=Yn.count|0),"instances"in Yn&&(ca.instances=Yn.instances|0),"primitive"in Yn&&(ca.primitive=oa[Yn.primitive])}var Ji={},Ho=ca.attributes;Ho.length=yi.length;for(var ji=0;ji<yi.length;++ji){var no=yi[ji],di=Ho[ji]=new Hc,jo=no.data||no;if(Array.isArray(jo)||Nr(jo)||Jr(jo)){var rs;ca.buffers[ji]&&(rs=ca.buffers[ji],Nr(jo)&&rs._buffer.byteLength>=jo.byteLength?rs.subdata(jo):(rs.destroy(),ca.buffers[ji]=null)),ca.buffers[ji]||(rs=ca.buffers[ji]=Ca.create(no,yh,!1,!0)),di.buffer=Ca.getBuffer(rs),di.size=di.buffer.dimension|0,di.normalized=!1,di.type=di.buffer.dtype,di.offset=0,di.stride=0,di.divisor=0,di.state=1,Ji[ji]=1}else Ca.getBuffer(no)?(di.buffer=Ca.getBuffer(no),di.size=di.buffer.dimension|0,di.normalized=!1,di.type=di.buffer.dtype,di.offset=0,di.stride=0,di.divisor=0,di.state=1):Ca.getBuffer(no.buffer)?(di.buffer=Ca.getBuffer(no.buffer),di.size=(+no.size||di.buffer.dimension)|0,di.normalized=!!no.normalized||!1,"type"in no?di.type=qn[no.type]:di.type=di.buffer.dtype,di.offset=(no.offset||0)|0,di.stride=(no.stride||0)|0,di.divisor=(no.divisor||0)|0,di.state=1):"x"in no&&(di.x=+no.x||0,di.y=+no.y||0,di.z=+no.z||0,di.w=+no.w||0,di.state=2)}for(var ds=0;ds<ca.buffers.length;++ds)!Ji[ds]&&ca.buffers[ds]&&(ca.buffers[ds].destroy(),ca.buffers[ds]=null);return ca.refresh(),Ei}return Ei.destroy=function(){for(var Yn=0;Yn<ca.buffers.length;++Yn)ca.buffers[Yn]&&ca.buffers[Yn].destroy();ca.buffers.length=0,ca.ownsElements&&(ca.elements.destroy(),ca.elements=null,ca.ownsElements=!1),ca.destroy()},Ei._vao=ca,Ei._reglType="vao",Ei(Ta)}return Bi}var Qh=35632,du=35633,Sh=35718,Jf=35721;function tf(At,kr,Dr,Hn){var Ca={},Rn={};function Pn(gn,Kn,ga,za){this.name=gn,this.id=Kn,this.location=ga,this.info=za}function ri(gn,Kn){for(var ga=0;ga<gn.length;++ga)if(gn[ga].id===Kn.id){gn[ga].location=Kn.location;return}gn.push(Kn)}function ei(gn,Kn,ga){var za=gn===Qh?Ca:Rn,wa=za[Kn];if(!wa){var Ii=kr.str(Kn);wa=At.createShader(gn),At.shaderSource(wa,Ii),At.compileShader(wa),za[Kn]=wa}return wa}var ti={},pi=[],eo=0;function Bi(gn,Kn){this.id=eo++,this.fragId=gn,this.vertId=Kn,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Hn.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function fi(gn,Kn,ga){var za,wa,Ii=ei(Qh,gn.fragId),si=ei(du,gn.vertId),$i=gn.program=At.createProgram();if(At.attachShader($i,Ii),At.attachShader($i,si),ga)for(za=0;za<ga.length;++za){var Ta=ga[za];At.bindAttribLocation($i,Ta[0],Ta[1])}At.linkProgram($i);var ca=At.getProgramParameter($i,Sh);Hn.profile&&(gn.stats.uniformsCount=ca);var Ei=gn.uniforms;for(za=0;za<ca;++za)if(wa=At.getActiveUniform($i,za),wa)if(wa.size>1)for(var Yn=0;Yn<wa.size;++Yn){var yi=wa.name.replace("[0]","["+Yn+"]");ri(Ei,new Pn(yi,kr.id(yi),At.getUniformLocation($i,yi),wa))}else ri(Ei,new Pn(wa.name,kr.id(wa.name),At.getUniformLocation($i,wa.name),wa));var ni=At.getProgramParameter($i,Jf);Hn.profile&&(gn.stats.attributesCount=ni);var Ji=gn.attributes;for(za=0;za<ni;++za)wa=At.getActiveAttrib($i,za),wa&&ri(Ji,new Pn(wa.name,kr.id(wa.name),At.getAttribLocation($i,wa.name),wa))}Hn.profile&&(Dr.getMaxUniformsCount=function(){var gn=0;return pi.forEach(function(Kn){Kn.stats.uniformsCount>gn&&(gn=Kn.stats.uniformsCount)}),gn},Dr.getMaxAttributesCount=function(){var gn=0;return pi.forEach(function(Kn){Kn.stats.attributesCount>gn&&(gn=Kn.stats.attributesCount)}),gn});function Oa(){Ca={},Rn={};for(var gn=0;gn<pi.length;++gn)fi(pi[gn],null,pi[gn].attributes.map(function(Kn){return[Kn.location,Kn.name]}))}return{clear:function(){var gn=At.deleteShader.bind(At);Dt(Ca).forEach(gn),Ca={},Dt(Rn).forEach(gn),Rn={},pi.forEach(function(Kn){At.deleteProgram(Kn.program)}),pi.length=0,ti={},Dr.shaderCount=0},program:function(gn,Kn,ga,za){var wa=ti[Kn];wa||(wa=ti[Kn]={});var Ii=wa[gn];if(Ii&&(Ii.refCount++,!za))return Ii;var si=new Bi(Kn,gn);return Dr.shaderCount++,fi(si,ga,za),Ii||(wa[gn]=si),pi.push(si),v(si,{destroy:function(){if(si.refCount--,si.refCount<=0){At.deleteProgram(si.program);var $i=pi.indexOf(si);pi.splice($i,1),Dr.shaderCount--}wa[si.vertId].refCount<=0&&(At.deleteShader(Rn[si.vertId]),delete Rn[si.vertId],delete ti[si.fragId][si.vertId]),Object.keys(ti[si.fragId]).length||(At.deleteShader(Ca[si.fragId]),delete Ca[si.fragId],delete ti[si.fragId])}})},restore:Oa,shader:ei,frag:-1,vert:-1}}var Eh=6408,Af=5121,Mh=3333,Xd=5126;function yc(At,kr,Dr,Hn,Ca,Rn,Pn){function ri(pi){var eo;kr.next===null?eo=Af:eo=kr.next.colorAttachments[0].texture._texture.type;var Bi=0,fi=0,Oa=Hn.framebufferWidth,gn=Hn.framebufferHeight,Kn=null;Nr(pi)?Kn=pi:pi&&(Bi=pi.x|0,fi=pi.y|0,Oa=(pi.width||Hn.framebufferWidth-Bi)|0,gn=(pi.height||Hn.framebufferHeight-fi)|0,Kn=pi.data||null),Dr();var ga=Oa*gn*4;return Kn||(eo===Af?Kn=new Uint8Array(ga):eo===Xd&&(Kn=Kn||new Float32Array(ga))),At.pixelStorei(Mh,4),At.readPixels(Bi,fi,Oa,gn,Eh,eo,Kn),Kn}function ei(pi){var eo;return kr.setFBO({framebuffer:pi.framebuffer},function(){eo=ri(pi)}),eo}function ti(pi){return!pi||!("framebuffer"in pi)?ri(pi):ei(pi)}return ti}function cd(At){return Nf(rf(Sf(At)))}function rf(At){return kc(Ga(ku(At),At.length*8))}function Nf(At){for(var kr="0123456789abcdef",Dr="",Hn,Ca=0;Ca<At.length;Ca++)Hn=At.charCodeAt(Ca),Dr+=kr.charAt(Hn>>>4&15)+kr.charAt(Hn&15);return Dr}function Sf(At){for(var kr="",Dr=-1,Hn,Ca;++Dr<At.length;)Hn=At.charCodeAt(Dr),Ca=Dr+1<At.length?At.charCodeAt(Dr+1):0,55296<=Hn&&Hn<=56319&&56320<=Ca&&Ca<=57343&&(Hn=65536+((Hn&1023)<<10)+(Ca&1023),Dr++),Hn<=127?kr+=String.fromCharCode(Hn):Hn<=2047?kr+=String.fromCharCode(192|Hn>>>6&31,128|Hn&63):Hn<=65535?kr+=String.fromCharCode(224|Hn>>>12&15,128|Hn>>>6&63,128|Hn&63):Hn<=2097151&&(kr+=String.fromCharCode(240|Hn>>>18&7,128|Hn>>>12&63,128|Hn>>>6&63,128|Hn&63));return kr}function ku(At){for(var kr=Array(At.length>>2),Dr=0;Dr<kr.length;Dr++)kr[Dr]=0;for(var Dr=0;Dr<At.length*8;Dr+=8)kr[Dr>>5]|=(At.charCodeAt(Dr/8)&255)<<24-Dr%32;return kr}function kc(At){for(var kr="",Dr=0;Dr<At.length*32;Dr+=8)kr+=String.fromCharCode(At[Dr>>5]>>>24-Dr%32&255);return kr}function xu(At,kr){return At>>>kr|At<<32-kr}function Qf(At,kr){return At>>>kr}function Ef(At,kr,Dr){return At&kr^~At&Dr}function ed(At,kr,Dr){return At&kr^At&Dr^kr&Dr}function wr(At){return xu(At,2)^xu(At,13)^xu(At,22)}function Hr(At){return xu(At,6)^xu(At,11)^xu(At,25)}function kn(At){return xu(At,7)^xu(At,18)^Qf(At,3)}function _n(At){return xu(At,17)^xu(At,19)^Qf(At,10)}var $n=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 Ga(At,kr){var Dr=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Hn=new Array(64),Ca,Rn,Pn,ri,ei,ti,pi,eo,Bi,fi,Oa,gn;for(At[kr>>5]|=128<<24-kr%32,At[(kr+64>>9<<4)+15]=kr,Bi=0;Bi<At.length;Bi+=16){for(Ca=Dr[0],Rn=Dr[1],Pn=Dr[2],ri=Dr[3],ei=Dr[4],ti=Dr[5],pi=Dr[6],eo=Dr[7],fi=0;fi<64;fi++)fi<16?Hn[fi]=At[fi+Bi]:Hn[fi]=Ba(Ba(Ba(_n(Hn[fi-2]),Hn[fi-7]),kn(Hn[fi-15])),Hn[fi-16]),Oa=Ba(Ba(Ba(Ba(eo,Hr(ei)),Ef(ei,ti,pi)),$n[fi]),Hn[fi]),gn=Ba(wr(Ca),ed(Ca,Rn,Pn)),eo=pi,pi=ti,ti=ei,ei=Ba(ri,Oa),ri=Pn,Pn=Rn,Rn=Ca,Ca=Ba(Oa,gn);Dr[0]=Ba(Ca,Dr[0]),Dr[1]=Ba(Rn,Dr[1]),Dr[2]=Ba(Pn,Dr[2]),Dr[3]=Ba(ri,Dr[3]),Dr[4]=Ba(ei,Dr[4]),Dr[5]=Ba(ti,Dr[5]),Dr[6]=Ba(pi,Dr[6]),Dr[7]=Ba(eo,Dr[7])}return Dr}function Ba(At,kr){var Dr=(At&65535)+(kr&65535),Hn=(At>>16)+(kr>>16)+(Dr>>16);return Hn<<16|Dr&65535}function wi(At){return Array.prototype.slice.call(At)}function ki(At){return wi(At).join("")}function to(At){var kr=At&&At.cache,Dr=0,Hn=[],Ca=[],Rn=[];function Pn(Oa,gn){var Kn=gn&&gn.stable;if(!Kn){for(var ga=0;ga<Ca.length;++ga)if(Ca[ga]===Oa&&!Rn[ga])return Hn[ga]}var za="g"+Dr++;return Hn.push(za),Ca.push(Oa),Rn.push(Kn),za}function ri(){var Oa=[];function gn(){Oa.push.apply(Oa,wi(arguments))}var Kn=[];function ga(){var za="v"+Dr++;return Kn.push(za),arguments.length>0&&(Oa.push(za,"="),Oa.push.apply(Oa,wi(arguments)),Oa.push(";")),za}return v(gn,{def:ga,toString:function(){return ki([Kn.length>0?"var "+Kn.join(",")+";":"",ki(Oa)])}})}function ei(){var Oa=ri(),gn=ri(),Kn=Oa.toString,ga=gn.toString;function za(wa,Ii){gn(wa,Ii,"=",Oa.def(wa,Ii),";")}return v(function(){Oa.apply(Oa,wi(arguments))},{def:Oa.def,entry:Oa,exit:gn,save:za,set:function(wa,Ii,si){za(wa,Ii),Oa(wa,Ii,"=",si,";")},toString:function(){return Kn()+ga()}})}function ti(){var Oa=ki(arguments),gn=ei(),Kn=ei(),ga=gn.toString,za=Kn.toString;return v(gn,{then:function(){return gn.apply(gn,wi(arguments)),this},else:function(){return Kn.apply(Kn,wi(arguments)),this},toString:function(){var wa=za();return wa&&(wa="else{"+wa+"}"),ki(["if(",Oa,"){",ga(),"}",wa])}})}var pi=ri(),eo={};function Bi(Oa,gn){var Kn=[];function ga(){var $i="a"+Kn.length;return Kn.push($i),$i}gn=gn||0;for(var za=0;za<gn;++za)ga();var wa=ei(),Ii=wa.toString,si=eo[Oa]=v(wa,{arg:ga,toString:function(){return ki(["function(",Kn.join(),"){",Ii(),"}"])}});return si}function fi(){var Oa=['"use strict";',pi,"return {"];Object.keys(eo).forEach(function(za){Oa.push('"',za,'":',eo[za].toString(),",")}),Oa.push("}");var gn=ki(Oa).replace(/;/g,`;
`).replace(/}/g,`}
`).replace(/{/g,`{
`),Kn;if(kr&&(Kn=cd(gn),kr[Kn]))return kr[Kn].apply(null,Ca);var ga=Function.apply(null,Hn.concat(gn));return kr&&(kr[Kn]=ga),ga.apply(null,Ca)}return{global:pi,link:Pn,block:ri,proc:Bi,scope:ei,cond:ti,compile:fi}}var ci="xyzw".split(""),qi=5121,xi=1,oi=2,fo=0,Qo=1,Yo=2,is=3,ts=4,vo=5,Yi=6,ys="dither",Ys="blend.enable",Rl="blend.color",Ql="blend.equation",Dl="blend.func",eu="depth.enable",cl="depth.func",Du="depth.range",Pu="depth.mask",Zl="colorMask",Oo="cull.enable",Ls="cull.face",ql="frontFace",Al="lineWidth",Tc="polygonOffset.enable",Ac="polygonOffset.offset",Pc="sample.alpha",oh="sample.enable",Sc="sample.coverage",Ff="stencil.enable",Ou="stencil.mask",Bf="stencil.func",os="stencil.opFront",_s="stencil.opBack",jf="scissor.enable",nf="scissor.box",Gc="viewport",Ze="profile",O="framebuffer",fe="vert",Re="frag",Oe="elements",We="primitive",Mt="count",zt="offset",rr="instances",Tr="vao",zr="Width",qr="Height",pn=O+zr,Dn=O+qr,nt=Gc+zr,ut=Gc+qr,wt="drawingBuffer",kt=wt+zr,Ht=wt+qr,Ot=[Dl,Ql,Bf,os,_s,Sc,Gc,nf,Ac],Kt=34962,Cr=34963,Or=2884,Vr=3042,sn=3024,bn=2960,Un=2929,Gn=3089,ua=32823,Ha=32926,Ti=32928,mi=5126,Ai=35664,po=35665,Fo=35666,Po=5124,us=35667,il=35668,ol=35669,Bs=35670,hl=35671,bu=35672,cu=35673,js=35674,Us=35675,Bu=35676,pc=35678,Xc=35680,Te=4,He=1028,ct=1029,Pt=2304,It=2305,Ut=32775,hr=32776,fr=519,Pr=7680,ln=0,on=1,Mn=32774,jn=513,Vn=36160,Ka=36064,Zn={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},ya={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Sa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Xa={cw:Pt,ccw:It};function Qa(At){return Array.isArray(At)||Nr(At)||Jr(At)}function Aa(At){return At.sort(function(kr,Dr){return kr===Gc?-1:Dr===Gc?1:kr<Dr?-1:1})}function Si(At,kr,Dr,Hn){this.thisDep=At,this.contextDep=kr,this.propDep=Dr,this.append=Hn}function ho(At){return At&&!(At.thisDep||At.contextDep||At.propDep)}function Ki(At){return new Si(!1,!1,!1,At)}function lo(At,kr){var Dr=At.type;if(Dr===fo){var Hn=At.data.length;return new Si(!0,Hn>=1,Hn>=2,kr)}else if(Dr===ts){var Ca=At.data;return new Si(Ca.thisDep,Ca.contextDep,Ca.propDep,kr)}else{if(Dr===vo)return new Si(!1,!1,!1,kr);if(Dr===Yi){for(var Rn=!1,Pn=!1,ri=!1,ei=0;ei<At.data.length;++ei){var ti=At.data[ei];if(ti.type===Qo)ri=!0;else if(ti.type===Yo)Pn=!0;else if(ti.type===is)Rn=!0;else if(ti.type===fo){Rn=!0;var pi=ti.data;pi>=1&&(Pn=!0),pi>=2&&(ri=!0)}else ti.type===ts&&(Rn=Rn||ti.data.thisDep,Pn=Pn||ti.data.contextDep,ri=ri||ti.data.propDep)}return new Si(Rn,Pn,ri,kr)}else return new Si(Dr===is,Dr===Yo,Dr===Qo,kr)}}var zo=new Si(!1,!1,!1,function(){});function qo(At,kr,Dr,Hn,Ca,Rn,Pn,ri,ei,ti,pi,eo,Bi,fi,Oa,gn){var Kn=ti.Record,ga={add:32774,subtract:32778,"reverse subtract":32779};Dr.ext_blend_minmax&&(ga.min=Ut,ga.max=hr);var za=Dr.angle_instanced_arrays,wa=Dr.webgl_draw_buffers,Ii=Dr.oes_vertex_array_object,si={dirty:!0,profile:gn.profile},$i={},Ta=[],ca={},Ei={};function Yn(it){return it.replace(".","_")}function yi(it,dt,Lt){var or=Yn(it);Ta.push(it),$i[or]=si[or]=!!Lt,ca[or]=dt}function ni(it,dt,Lt){var or=Yn(it);Ta.push(it),Array.isArray(Lt)?(si[or]=Lt.slice(),$i[or]=Lt.slice()):si[or]=$i[or]=Lt,Ei[or]=dt}function Ji(it){return!!isNaN(it)}yi(ys,sn),yi(Ys,Vr),ni(Rl,"blendColor",[0,0,0,0]),ni(Ql,"blendEquationSeparate",[Mn,Mn]),ni(Dl,"blendFuncSeparate",[on,ln,on,ln]),yi(eu,Un,!0),ni(cl,"depthFunc",jn),ni(Du,"depthRange",[0,1]),ni(Pu,"depthMask",!0),ni(Zl,Zl,[!0,!0,!0,!0]),yi(Oo,Or),ni(Ls,"cullFace",ct),ni(ql,ql,It),ni(Al,Al,1),yi(Tc,ua),ni(Ac,"polygonOffset",[0,0]),yi(Pc,Ha),yi(oh,Ti),ni(Sc,"sampleCoverage",[1,!1]),yi(Ff,bn),ni(Ou,"stencilMask",-1),ni(Bf,"stencilFunc",[fr,0,-1]),ni(os,"stencilOpSeparate",[He,Pr,Pr,Pr]),ni(_s,"stencilOpSeparate",[ct,Pr,Pr,Pr]),yi(jf,Gn),ni(nf,"scissor",[0,0,At.drawingBufferWidth,At.drawingBufferHeight]),ni(Gc,Gc,[0,0,At.drawingBufferWidth,At.drawingBufferHeight]);var Ho={gl:At,context:Bi,strings:kr,next:$i,current:si,draw:eo,elements:Rn,buffer:Ca,shader:pi,attributes:ti.state,vao:ti,uniforms:ei,framebuffer:ri,extensions:Dr,timer:fi,isBufferArgs:Qa},ji={primTypes:oa,compareFuncs:ya,blendFuncs:Zn,blendEquations:ga,stencilOps:Sa,glTypes:qn,orientationType:Xa};wa&&(ji.backBuffer=[ct],ji.drawBuffer=g(Hn.maxDrawbuffers,function(it){return it===0?[0]:g(it,function(dt){return Ka+dt})}));var no=0;function di(){var it=to({cache:Oa}),dt=it.link,Lt=it.global;it.id=no++,it.batchId="0";var or=dt(Ho),er=it.shared={props:"a0"};Object.keys(Ho).forEach(function(ar){er[ar]=Lt.def(or,".",ar)});var ur=it.next={},mr=it.current={};Object.keys(Ei).forEach(function(ar){Array.isArray(si[ar])&&(ur[ar]=Lt.def(er.next,".",ar),mr[ar]=Lt.def(er.current,".",ar))});var dr=it.constants={};Object.keys(ji).forEach(function(ar){dr[ar]=Lt.def(JSON.stringify(ji[ar]))}),it.invoke=function(ar,tr){switch(tr.type){case fo:var Yr=["this",er.context,er.props,it.batchId];return ar.def(dt(tr.data),".call(",Yr.slice(0,Math.max(tr.data.length+1,4)),")");case Qo:return ar.def(er.props,tr.data);case Yo:return ar.def(er.context,tr.data);case is:return ar.def("this",tr.data);case ts:return tr.data.append(it,ar),tr.data.ref;case vo:return tr.data.toString();case Yi:return tr.data.map(function(un){return it.invoke(ar,un)})}},it.attribCache={};var Yt={};return it.scopeAttrib=function(ar){var tr=kr.id(ar);if(tr in Yt)return Yt[tr];var Yr=ti.scope[tr];Yr||(Yr=ti.scope[tr]=new Kn);var un=Yt[tr]=dt(Yr);return un},it}function jo(it){var dt=it.static,Lt=it.dynamic,or;if(Ze in dt){var er=!!dt[Ze];or=Ki(function(mr,dr){return er}),or.enable=er}else if(Ze in Lt){var ur=Lt[Ze];or=lo(ur,function(mr,dr){return mr.invoke(dr,ur)})}return or}function rs(it,dt){var Lt=it.static,or=it.dynamic;if(O in Lt){var er=Lt[O];return er?(er=ri.getFramebuffer(er),Ki(function(mr,dr){var Yt=mr.link(er),ar=mr.shared;dr.set(ar.framebuffer,".next",Yt);var tr=ar.context;return dr.set(tr,"."+pn,Yt+".width"),dr.set(tr,"."+Dn,Yt+".height"),Yt})):Ki(function(mr,dr){var Yt=mr.shared;dr.set(Yt.framebuffer,".next","null");var ar=Yt.context;return dr.set(ar,"."+pn,ar+"."+kt),dr.set(ar,"."+Dn,ar+"."+Ht),"null"})}else if(O in or){var ur=or[O];return lo(ur,function(mr,dr){var Yt=mr.invoke(dr,ur),ar=mr.shared,tr=ar.framebuffer,Yr=dr.def(tr,".getFramebuffer(",Yt,")");dr.set(tr,".next",Yr);var un=ar.context;return dr.set(un,"."+pn,Yr+"?"+Yr+".width:"+un+"."+kt),dr.set(un,"."+Dn,Yr+"?"+Yr+".height:"+un+"."+Ht),Yr})}else return null}function ds(it,dt,Lt){var or=it.static,er=it.dynamic;function ur(Yt){if(Yt in or){var ar=or[Yt],tr=!0,Yr=ar.x|0,un=ar.y|0,En,Ea;return"width"in ar?En=ar.width|0:tr=!1,"height"in ar?Ea=ar.height|0:tr=!1,new Si(!tr&&dt&&dt.thisDep,!tr&&dt&&dt.contextDep,!tr&&dt&&dt.propDep,function(Ma,La){var Ja=Ma.shared.context,ka=En;"width"in ar||(ka=La.def(Ja,".",pn,"-",Yr));var ai=Ea;return"height"in ar||(ai=La.def(Ja,".",Dn,"-",un)),[Yr,un,ka,ai]})}else if(Yt in er){var fa=er[Yt],sa=lo(fa,function(Ma,La){var Ja=Ma.invoke(La,fa),ka=Ma.shared.context,ai=La.def(Ja,".x|0"),gi=La.def(Ja,".y|0"),Vi=La.def('"width" in ',Ja,"?",Ja,".width|0:","(",ka,".",pn,"-",ai,")"),oo=La.def('"height" in ',Ja,"?",Ja,".height|0:","(",ka,".",Dn,"-",gi,")");return[ai,gi,Vi,oo]});return dt&&(sa.thisDep=sa.thisDep||dt.thisDep,sa.contextDep=sa.contextDep||dt.contextDep,sa.propDep=sa.propDep||dt.propDep),sa}else return dt?new Si(dt.thisDep,dt.contextDep,dt.propDep,function(Ma,La){var Ja=Ma.shared.context;return[0,0,La.def(Ja,".",pn),La.def(Ja,".",Dn)]}):null}var mr=ur(Gc);if(mr){var dr=mr;mr=new Si(mr.thisDep,mr.contextDep,mr.propDep,function(Yt,ar){var tr=dr.append(Yt,ar),Yr=Yt.shared.context;return ar.set(Yr,"."+nt,tr[2]),ar.set(Yr,"."+ut,tr[3]),tr})}return{viewport:mr,scissor_box:ur(nf)}}function _l(it,dt){var Lt=it.static,or=typeof Lt[Re]=="string"&&typeof Lt[fe]=="string";if(or){if(Object.keys(dt.dynamic).length>0)return null;var er=dt.static,ur=Object.keys(er);if(ur.length>0&&typeof er[ur[0]]=="number"){for(var mr=[],dr=0;dr<ur.length;++dr)mr.push([er[ur[dr]]|0,ur[dr]]);return mr}}return null}function vs(it,dt,Lt){var or=it.static,er=it.dynamic;function ur(tr){if(tr in or){var Yr=kr.id(or[tr]),un=Ki(function(){return Yr});return un.id=Yr,un}else if(tr in er){var En=er[tr];return lo(En,function(Ea,fa){var sa=Ea.invoke(fa,En),Ma=fa.def(Ea.shared.strings,".id(",sa,")");return Ma})}return null}var mr=ur(Re),dr=ur(fe),Yt=null,ar;return ho(mr)&&ho(dr)?(Yt=pi.program(dr.id,mr.id,null,Lt),ar=Ki(function(tr,Yr){return tr.link(Yt)})):ar=new Si(mr&&mr.thisDep||dr&&dr.thisDep,mr&&mr.contextDep||dr&&dr.contextDep,mr&&mr.propDep||dr&&dr.propDep,function(tr,Yr){var un=tr.shared.shader,En;mr?En=mr.append(tr,Yr):En=Yr.def(un,".",Re);var Ea;dr?Ea=dr.append(tr,Yr):Ea=Yr.def(un,".",fe);var fa=un+".program("+Ea+","+En;return Yr.def(fa+")")}),{frag:mr,vert:dr,progVar:ar,program:Yt}}function Lu(it,dt){var Lt=it.static,or=it.dynamic,er={},ur=!1;function mr(){if(Tr in Lt){var La=Lt[Tr];return La!==null&&ti.getVAO(La)===null&&(La=ti.createVAO(La)),ur=!0,er.vao=La,Ki(function(ka){var ai=ti.getVAO(La);return ai?ka.link(ai):"null"})}else if(Tr in or){ur=!0;var Ja=or[Tr];return lo(Ja,function(ka,ai){var gi=ka.invoke(ai,Ja);return ai.def(ka.shared.vao+".getVAO("+gi+")")})}return null}var dr=mr(),Yt=!1;function ar(){if(Oe in Lt){var La=Lt[Oe];if(er.elements=La,Qa(La)){var Ja=er.elements=Rn.create(La,!0);La=Rn.getElements(Ja),Yt=!0}else La&&(La=Rn.getElements(La),Yt=!0);var ka=Ki(function(gi,Vi){if(La){var oo=gi.link(La);return gi.ELEMENTS=oo,oo}return gi.ELEMENTS=null,null});return ka.value=La,ka}else if(Oe in or){Yt=!0;var ai=or[Oe];return lo(ai,function(gi,Vi){var oo=gi.shared,Is=oo.isBufferArgs,Cs=oo.elements,Sl=gi.invoke(Vi,ai),xl=Vi.def("null"),Cl=Vi.def(Is,"(",Sl,")"),El=gi.cond(Cl).then(xl,"=",Cs,".createStream(",Sl,");").else(xl,"=",Cs,".getElements(",Sl,");");return Vi.entry(El),Vi.exit(gi.cond(Cl).then(Cs,".destroyStream(",xl,");")),gi.ELEMENTS=xl,xl})}else if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.elements+".getElements("+gi.shared.vao+".currentVAO.elements):null")});return null}var tr=ar();function Yr(){if(We in Lt){var La=Lt[We];return er.primitive=La,Ki(function(ka,ai){return oa[La]})}else if(We in or){var Ja=or[We];return lo(Ja,function(ka,ai){var gi=ka.constants.primTypes,Vi=ka.invoke(ai,Ja);return ai.def(gi,"[",Vi,"]")})}else{if(Yt)return ho(tr)?tr.value?Ki(function(ka,ai){return ai.def(ka.ELEMENTS,".primType")}):Ki(function(){return Te}):new Si(tr.thisDep,tr.contextDep,tr.propDep,function(ka,ai){var gi=ka.ELEMENTS;return ai.def(gi,"?",gi,".primType:",Te)});if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(ka,ai){return ai.def(ka.shared.vao+".currentVAO?"+ka.shared.vao+".currentVAO.primitive:"+Te)})}return null}function un(La,Ja){if(La in Lt){var ka=Lt[La]|0;return Ja?er.offset=ka:er.instances=ka,Ki(function(gi,Vi){return Ja&&(gi.OFFSET=ka),ka})}else if(La in or){var ai=or[La];return lo(ai,function(gi,Vi){var oo=gi.invoke(Vi,ai);return Ja&&(gi.OFFSET=oo),oo})}else if(Ja){if(Yt)return Ki(function(gi,Vi){return gi.OFFSET=0,0});if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.vao+".currentVAO.offset:0")})}else if(ur)return new Si(dr.thisDep,dr.contextDep,dr.propDep,function(gi,Vi){return Vi.def(gi.shared.vao+".currentVAO?"+gi.shared.vao+".currentVAO.instances:-1")});return null}var En=un(zt,!0);function Ea(){if(Mt in Lt){var La=Lt[Mt]|0;return er.count=La,Ki(function(){return La})}else if(Mt in or){var Ja=or[Mt];return lo(Ja,function(Vi,oo){var Is=Vi.invoke(oo,Ja);return Is})}else if(Yt)if(ho(tr)){if(tr)return En?new Si(En.thisDep,En.contextDep,En.propDep,function(Vi,oo){var Is=oo.def(Vi.ELEMENTS,".vertCount-",Vi.OFFSET);return Is}):Ki(function(Vi,oo){return oo.def(Vi.ELEMENTS,".vertCount")});var ka=Ki(function(){return-1});return ka}else{var ai=new Si(tr.thisDep||En.thisDep,tr.contextDep||En.contextDep,tr.propDep||En.propDep,function(Vi,oo){var Is=Vi.ELEMENTS;return Vi.OFFSET?oo.def(Is,"?",Is,".vertCount-",Vi.OFFSET,":-1"):oo.def(Is,"?",Is,".vertCount:-1")});return ai}else if(ur){var gi=new Si(dr.thisDep,dr.contextDep,dr.propDep,function(Vi,oo){return oo.def(Vi.shared.vao,".currentVAO?",Vi.shared.vao,".currentVAO.count:-1")});return gi}return null}var fa=Yr(),sa=Ea(),Ma=un(rr,!1);return{elements:tr,primitive:fa,count:sa,instances:Ma,offset:En,vao:dr,vaoActive:ur,elementsActive:Yt,static:er}}function ll(it,dt){var Lt=it.static,or=it.dynamic,er={};return Ta.forEach(function(ur){var mr=Yn(ur);function dr(Yt,ar){if(ur in Lt){var tr=Yt(Lt[ur]);er[mr]=Ki(function(){return tr})}else if(ur in or){var Yr=or[ur];er[mr]=lo(Yr,function(un,En){return ar(un,En,un.invoke(En,Yr))})}}switch(ur){case Oo:case Ys:case ys:case Ff:case eu:case jf:case Tc:case Pc:case oh:case Pu:return dr(function(Yt){return Yt},function(Yt,ar,tr){return tr});case cl:return dr(function(Yt){return ya[Yt]},function(Yt,ar,tr){var Yr=Yt.constants.compareFuncs;return ar.def(Yr,"[",tr,"]")});case Du:return dr(function(Yt){return Yt},function(Yt,ar,tr){var Yr=ar.def("+",tr,"[0]"),un=ar.def("+",tr,"[1]");return[Yr,un]});case Dl:return dr(function(Yt){var ar="srcRGB"in Yt?Yt.srcRGB:Yt.src,tr="srcAlpha"in Yt?Yt.srcAlpha:Yt.src,Yr="dstRGB"in Yt?Yt.dstRGB:Yt.dst,un="dstAlpha"in Yt?Yt.dstAlpha:Yt.dst;return[Zn[ar],Zn[Yr],Zn[tr],Zn[un]]},function(Yt,ar,tr){var Yr=Yt.constants.blendFuncs;function un(Ja,ka){var ai=ar.def('"',Ja,ka,'" in ',tr,"?",tr,".",Ja,ka,":",tr,".",Ja);return ai}var En=un("src","RGB"),Ea=un("dst","RGB"),fa=ar.def(Yr,"[",En,"]"),sa=ar.def(Yr,"[",un("src","Alpha"),"]"),Ma=ar.def(Yr,"[",Ea,"]"),La=ar.def(Yr,"[",un("dst","Alpha"),"]");return[fa,Ma,sa,La]});case Ql:return dr(function(Yt){if(typeof Yt=="string")return[ga[Yt],ga[Yt]];if(typeof Yt=="object")return[ga[Yt.rgb],ga[Yt.alpha]]},function(Yt,ar,tr){var Yr=Yt.constants.blendEquations,un=ar.def(),En=ar.def(),Ea=Yt.cond("typeof ",tr,'==="string"');return Ea.then(un,"=",En,"=",Yr,"[",tr,"];"),Ea.else(un,"=",Yr,"[",tr,".rgb];",En,"=",Yr,"[",tr,".alpha];"),ar(Ea),[un,En]});case Rl:return dr(function(Yt){return g(4,function(ar){return+Yt[ar]})},function(Yt,ar,tr){return g(4,function(Yr){return ar.def("+",tr,"[",Yr,"]")})});case Ou:return dr(function(Yt){return Yt|0},function(Yt,ar,tr){return ar.def(tr,"|0")});case Bf:return dr(function(Yt){var ar=Yt.cmp||"keep",tr=Yt.ref||0,Yr="mask"in Yt?Yt.mask:-1;return[ya[ar],tr,Yr]},function(Yt,ar,tr){var Yr=Yt.constants.compareFuncs,un=ar.def('"cmp" in ',tr,"?",Yr,"[",tr,".cmp]",":",Pr),En=ar.def(tr,".ref|0"),Ea=ar.def('"mask" in ',tr,"?",tr,".mask|0:-1");return[un,En,Ea]});case os:case _s:return dr(function(Yt){var ar=Yt.fail||"keep",tr=Yt.zfail||"keep",Yr=Yt.zpass||"keep";return[ur===_s?ct:He,Sa[ar],Sa[tr],Sa[Yr]]},function(Yt,ar,tr){var Yr=Yt.constants.stencilOps;function un(En){return ar.def('"',En,'" in ',tr,"?",Yr,"[",tr,".",En,"]:",Pr)}return[ur===_s?ct:He,un("fail"),un("zfail"),un("zpass")]});case Ac:return dr(function(Yt){var ar=Yt.factor|0,tr=Yt.units|0;return[ar,tr]},function(Yt,ar,tr){var Yr=ar.def(tr,".factor|0"),un=ar.def(tr,".units|0");return[Yr,un]});case Ls:return dr(function(Yt){var ar=0;return Yt==="front"?ar=He:Yt==="back"&&(ar=ct),ar},function(Yt,ar,tr){return ar.def(tr,'==="front"?',He,":",ct)});case Al:return dr(function(Yt){return Yt},function(Yt,ar,tr){return tr});case ql:return dr(function(Yt){return Xa[Yt]},function(Yt,ar,tr){return ar.def(tr+'==="cw"?'+Pt+":"+It)});case Zl:return dr(function(Yt){return Yt.map(function(ar){return!!ar})},function(Yt,ar,tr){return g(4,function(Yr){return"!!"+tr+"["+Yr+"]"})});case Sc:return dr(function(Yt){var ar="value"in Yt?Yt.value:1,tr=!!Yt.invert;return[ar,tr]},function(Yt,ar,tr){var Yr=ar.def('"value" in ',tr,"?+",tr,".value:1"),un=ar.def("!!",tr,".invert");return[Yr,un]})}}),er}function wu(it,dt){var Lt=it.static,or=it.dynamic,er={};return Object.keys(Lt).forEach(function(ur){var mr=Lt[ur],dr;if(typeof mr=="number"||typeof mr=="boolean")dr=Ki(function(){return mr});else if(typeof mr=="function"){var Yt=mr._reglType;Yt==="texture2d"||Yt==="textureCube"?dr=Ki(function(ar){return ar.link(mr)}):(Yt==="framebuffer"||Yt==="framebufferCube")&&(dr=Ki(function(ar){return ar.link(mr.color[0])}))}else ra(mr)&&(dr=Ki(function(ar){var tr=ar.global.def("[",g(mr.length,function(Yr){return mr[Yr]}),"]");return tr}));dr.value=mr,er[ur]=dr}),Object.keys(or).forEach(function(ur){var mr=or[ur];er[ur]=lo(mr,function(dr,Yt){return dr.invoke(Yt,mr)})}),er}function Gu(it,dt){var Lt=it.static,or=it.dynamic,er={};return Object.keys(Lt).forEach(function(ur){var mr=Lt[ur],dr=kr.id(ur),Yt=new Kn;if(Qa(mr))Yt.state=xi,Yt.buffer=Ca.getBuffer(Ca.create(mr,Kt,!1,!0)),Yt.type=0;else{var ar=Ca.getBuffer(mr);if(ar)Yt.state=xi,Yt.buffer=ar,Yt.type=0;else if("constant"in mr){var tr=mr.constant;Yt.buffer="null",Yt.state=oi,typeof tr=="number"?Yt.x=tr:ci.forEach(function(Ma,La){La<tr.length&&(Yt[Ma]=tr[La])})}else{Qa(mr.buffer)?ar=Ca.getBuffer(Ca.create(mr.buffer,Kt,!1,!0)):ar=Ca.getBuffer(mr.buffer);var Yr=mr.offset|0,un=mr.stride|0,En=mr.size|0,Ea=!!mr.normalized,fa=0;"type"in mr&&(fa=qn[mr.type]);var sa=mr.divisor|0;Yt.buffer=ar,Yt.state=xi,Yt.size=En,Yt.normalized=Ea,Yt.type=fa||ar.dtype,Yt.offset=Yr,Yt.stride=un,Yt.divisor=sa}}er[ur]=Ki(function(Ma,La){var Ja=Ma.attribCache;if(dr in Ja)return Ja[dr];var ka={isStream:!1};return Object.keys(Yt).forEach(function(ai){ka[ai]=Yt[ai]}),Yt.buffer&&(ka.buffer=Ma.link(Yt.buffer),ka.type=ka.type||ka.buffer+".dtype"),Ja[dr]=ka,ka})}),Object.keys(or).forEach(function(ur){var mr=or[ur];function dr(Yt,ar){var tr=Yt.invoke(ar,mr),Yr=Yt.shared,un=Yt.constants,En=Yr.isBufferArgs,Ea=Yr.buffer,fa={isStream:ar.def(!1)},sa=new Kn;sa.state=xi,Object.keys(sa).forEach(function(ka){fa[ka]=ar.def(""+sa[ka])});var Ma=fa.buffer,La=fa.type;ar("if(",En,"(",tr,")){",fa.isStream,"=true;",Ma,"=",Ea,".createStream(",Kt,",",tr,");",La,"=",Ma,".dtype;","}else{",Ma,"=",Ea,".getBuffer(",tr,");","if(",Ma,"){",La,"=",Ma,".dtype;",'}else if("constant" in ',tr,"){",fa.state,"=",oi,";","if(typeof "+tr+'.constant === "number"){',fa[ci[0]],"=",tr,".constant;",ci.slice(1).map(function(ka){return fa[ka]}).join("="),"=0;","}else{",ci.map(function(ka,ai){return fa[ka]+"="+tr+".constant.length>"+ai+"?"+tr+".constant["+ai+"]:0;"}).join(""),"}}else{","if(",En,"(",tr,".buffer)){",Ma,"=",Ea,".createStream(",Kt,",",tr,".buffer);","}else{",Ma,"=",Ea,".getBuffer(",tr,".buffer);","}",La,'="type" in ',tr,"?",un.glTypes,"[",tr,".type]:",Ma,".dtype;",fa.normalized,"=!!",tr,".normalized;");function Ja(ka){ar(fa[ka],"=",tr,".",ka,"|0;")}return Ja("size"),Ja("offset"),Ja("stride"),Ja("divisor"),ar("}}"),ar.exit("if(",fa.isStream,"){",Ea,".destroyStream(",Ma,");","}"),fa}er[ur]=lo(mr,dr)}),er}function oc(it){var dt=it.static,Lt=it.dynamic,or={};return Object.keys(dt).forEach(function(er){var ur=dt[er];or[er]=Ki(function(mr,dr){return typeof ur=="number"||typeof ur=="boolean"?""+ur:mr.link(ur)})}),Object.keys(Lt).forEach(function(er){var ur=Lt[er];or[er]=lo(ur,function(mr,dr){return mr.invoke(dr,ur)})}),or}function Mf(it,dt,Lt,or,er){it.static,it.dynamic;var ur=_l(it,dt),mr=rs(it),dr=ds(it,mr),Yt=Lu(it),ar=ll(it),tr=vs(it,er,ur);function Yr(Ma){var La=dr[Ma];La&&(ar[Ma]=La)}Yr(Gc),Yr(Yn(nf));var un=Object.keys(ar).length>0,En={framebuffer:mr,draw:Yt,shader:tr,state:ar,dirty:un,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(En.profile=jo(it),En.uniforms=wu(Lt),En.drawVAO=En.scopeVAO=Yt.vao,!En.drawVAO&&tr.program&&!ur&&Dr.angle_instanced_arrays&&Yt.static.elements){var Ea=!0,fa=tr.program.attributes.map(function(Ma){var La=dt.static[Ma];return Ea=Ea&&!!La,La});if(Ea&&fa.length>0){var sa=ti.getVAO(ti.createVAO({attributes:fa,elements:Yt.static.elements}));En.drawVAO=new Si(null,null,null,function(Ma,La){return Ma.link(sa)}),En.useVAO=!0}}return ur?En.useVAO=!0:En.attributes=Gu(dt),En.context=oc(or),En}function su(it,dt,Lt){var or=it.shared,er=or.context,ur=it.scope();Object.keys(Lt).forEach(function(mr){dt.save(er,"."+mr);var dr=Lt[mr],Yt=dr.append(it,dt);Array.isArray(Yt)?ur(er,".",mr,"=[",Yt.join(),"];"):ur(er,".",mr,"=",Yt,";")}),dt(ur)}function gu(it,dt,Lt,or){var er=it.shared,ur=er.gl,mr=er.framebuffer,dr;wa&&(dr=dt.def(er.extensions,".webgl_draw_buffers"));var Yt=it.constants,ar=Yt.drawBuffer,tr=Yt.backBuffer,Yr;Lt?Yr=Lt.append(it,dt):Yr=dt.def(mr,".next"),or||dt("if(",Yr,"!==",mr,".cur){"),dt("if(",Yr,"){",ur,".bindFramebuffer(",Vn,",",Yr,".framebuffer);"),wa&&dt(dr,".drawBuffersWEBGL(",ar,"[",Yr,".colorAttachments.length]);"),dt("}else{",ur,".bindFramebuffer(",Vn,",null);"),wa&&dt(dr,".drawBuffersWEBGL(",tr,");"),dt("}",mr,".cur=",Yr,";"),or||dt("}")}function ko(it,dt,Lt){var or=it.shared,er=or.gl,ur=it.current,mr=it.next,dr=or.current,Yt=or.next,ar=it.cond(dr,".dirty");Ta.forEach(function(tr){var Yr=Yn(tr);if(!(Yr in Lt.state)){var un,En;if(Yr in mr){un=mr[Yr],En=ur[Yr];var Ea=g(si[Yr].length,function(sa){return ar.def(un,"[",sa,"]")});ar(it.cond(Ea.map(function(sa,Ma){return sa+"!=="+En+"["+Ma+"]"}).join("||")).then(er,".",Ei[Yr],"(",Ea,");",Ea.map(function(sa,Ma){return En+"["+Ma+"]="+sa}).join(";"),";"))}else{un=ar.def(Yt,".",Yr);var fa=it.cond(un,"!==",dr,".",Yr);ar(fa),Yr in ca?fa(it.cond(un).then(er,".enable(",ca[Yr],");").else(er,".disable(",ca[Yr],");"),dr,".",Yr,"=",un,";"):fa(er,".",Ei[Yr],"(",un,");",dr,".",Yr,"=",un,";")}}}),Object.keys(Lt.state).length===0&&ar(dr,".dirty=false;"),dt(ar)}function sc(it,dt,Lt,or){var er=it.shared,ur=it.current,mr=er.current,dr=er.gl,Yt;Aa(Object.keys(Lt)).forEach(function(ar){var tr=Lt[ar];if(!(or&&!or(tr))){var Yr=tr.append(it,dt);if(ca[ar]){var un=ca[ar];ho(tr)?(Yt=it.link(Yr,{stable:!0}),dt(it.cond(Yt).then(dr,".enable(",un,");").else(dr,".disable(",un,");")),dt(mr,".",ar,"=",Yt,";")):(dt(it.cond(Yr).then(dr,".enable(",un,");").else(dr,".disable(",un,");")),dt(mr,".",ar,"=",Yr,";"))}else if(ra(Yr)){var En=ur[ar];dt(dr,".",Ei[ar],"(",Yr,");",Yr.map(function(Ea,fa){return En+"["+fa+"]="+Ea}).join(";"),";")}else ho(tr)?(Yt=it.link(Yr,{stable:!0}),dt(dr,".",Ei[ar],"(",Yt,");",mr,".",ar,"=",Yt,";")):dt(dr,".",Ei[ar],"(",Yr,");",mr,".",ar,"=",Yr,";")}})}function $s(it,dt){za&&(it.instancing=dt.def(it.shared.extensions,".angle_instanced_arrays"))}function Hl(it,dt,Lt,or,er){var ur=it.shared,mr=it.stats,dr=ur.current,Yt=ur.timer,ar=Lt.profile;function tr(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Yr,un;function En(Ja){Yr=dt.def(),Ja(Yr,"=",tr(),";"),typeof er=="string"?Ja(mr,".count+=",er,";"):Ja(mr,".count++;"),fi&&(or?(un=dt.def(),Ja(un,"=",Yt,".getNumPendingQueries();")):Ja(Yt,".beginQuery(",mr,");"))}function Ea(Ja){Ja(mr,".cpuTime+=",tr(),"-",Yr,";"),fi&&(or?Ja(Yt,".pushScopeStats(",un,",",Yt,".getNumPendingQueries(),",mr,");"):Ja(Yt,".endQuery();"))}function fa(Ja){var ka=dt.def(dr,".profile");dt(dr,".profile=",Ja,";"),dt.exit(dr,".profile=",ka,";")}var sa;if(ar){if(ho(ar)){ar.enable?(En(dt),Ea(dt.exit),fa("true")):fa("false");return}sa=ar.append(it,dt),fa(sa)}else sa=dt.def(dr,".profile");var Ma=it.block();En(Ma),dt("if(",sa,"){",Ma,"}");var La=it.block();Ea(La),dt.exit("if(",sa,"){",La,"}")}function gc(it,dt,Lt,or,er){var ur=it.shared;function mr(Yt){switch(Yt){case Ai:case us:case hl:return 2;case po:case il:case bu:return 3;case Fo:case ol:case cu:return 4;default:return 1}}function dr(Yt,ar,tr){var Yr=ur.gl,un=dt.def(Yt,".location"),En=dt.def(ur.attributes,"[",un,"]"),Ea=tr.state,fa=tr.buffer,sa=[tr.x,tr.y,tr.z,tr.w],Ma=["buffer","normalized","offset","stride"];function La(){dt("if(!",En,".buffer){",Yr,".enableVertexAttribArray(",un,");}");var ka=tr.type,ai;if(tr.size?ai=dt.def(tr.size,"||",ar):ai=ar,dt("if(",En,".type!==",ka,"||",En,".size!==",ai,"||",Ma.map(function(Vi){return En+"."+Vi+"!=="+tr[Vi]}).join("||"),"){",Yr,".bindBuffer(",Kt,",",fa,".buffer);",Yr,".vertexAttribPointer(",[un,ai,ka,tr.normalized,tr.stride,tr.offset],");",En,".type=",ka,";",En,".size=",ai,";",Ma.map(function(Vi){return En+"."+Vi+"="+tr[Vi]+";"}).join(""),"}"),za){var gi=tr.divisor;dt("if(",En,".divisor!==",gi,"){",it.instancing,".vertexAttribDivisorANGLE(",[un,gi],");",En,".divisor=",gi,";}")}}function Ja(){dt("if(",En,".buffer){",Yr,".disableVertexAttribArray(",un,");",En,".buffer=null;","}if(",ci.map(function(ka,ai){return En+"."+ka+"!=="+sa[ai]}).join("||"),"){",Yr,".vertexAttrib4f(",un,",",sa,");",ci.map(function(ka,ai){return En+"."+ka+"="+sa[ai]+";"}).join(""),"}")}Ea===xi?La():Ea===oi?Ja():(dt("if(",Ea,"===",xi,"){"),La(),dt("}else{"),Ja(),dt("}"))}or.forEach(function(Yt){var ar=Yt.name,tr=Lt.attributes[ar],Yr;if(tr){if(!er(tr))return;Yr=tr.append(it,dt)}else{if(!er(zo))return;var un=it.scopeAttrib(ar);Yr={},Object.keys(new Kn).forEach(function(En){Yr[En]=dt.def(un,".",En)})}dr(it.link(Yt),mr(Yt.info.type),Yr)})}function _c(it,dt,Lt,or,er,ur){for(var mr=it.shared,dr=mr.gl,Yt,ar=0;ar<or.length;++ar){var tr=or[ar],Yr=tr.name,un=tr.info.type,En=Lt.uniforms[Yr],Ea=it.link(tr),fa=Ea+".location",sa;if(En){if(!er(En))continue;if(ho(En)){var Ma=En.value;if(un===pc||un===Xc){var La=it.link(Ma._texture||Ma.color[0]._texture);dt(dr,".uniform1i(",fa,",",La+".bind());"),dt.exit(La,".unbind();")}else if(un===js||un===Us||un===Bu){var Ja=it.global.def("new Float32Array(["+Array.prototype.slice.call(Ma)+"])"),ka=2;un===Us?ka=3:un===Bu&&(ka=4),dt(dr,".uniformMatrix",ka,"fv(",fa,",false,",Ja,");")}else{switch(un){case mi:Yt="1f";break;case Ai:Yt="2f";break;case po:Yt="3f";break;case Fo:Yt="4f";break;case Bs:Yt="1i";break;case Po:Yt="1i";break;case hl:Yt="2i";break;case us:Yt="2i";break;case bu:Yt="3i";break;case il:Yt="3i";break;case cu:Yt="4i";break;case ol:Yt="4i";break}dt(dr,".uniform",Yt,"(",fa,",",ra(Ma)?Array.prototype.slice.call(Ma):Ma,");")}continue}else sa=En.append(it,dt)}else{if(!er(zo))continue;sa=dt.def(mr.uniforms,"[",kr.id(Yr),"]")}un===pc?dt("if(",sa,"&&",sa,'._reglType==="framebuffer"){',sa,"=",sa,".color[0];","}"):un===Xc&&dt("if(",sa,"&&",sa,'._reglType==="framebufferCube"){',sa,"=",sa,".color[0];","}");var ai=1;switch(un){case pc:case Xc:var gi=dt.def(sa,"._texture");dt(dr,".uniform1i(",fa,",",gi,".bind());"),dt.exit(gi,".unbind();");continue;case Po:case Bs:Yt="1i";break;case us:case hl:Yt="2i",ai=2;break;case il:case bu:Yt="3i",ai=3;break;case ol:case cu:Yt="4i",ai=4;break;case mi:Yt="1f";break;case Ai:Yt="2f",ai=2;break;case po:Yt="3f",ai=3;break;case Fo:Yt="4f",ai=4;break;case js:Yt="Matrix2fv";break;case Us:Yt="Matrix3fv";break;case Bu:Yt="Matrix4fv";break}if(Yt.charAt(0)==="M"){dt(dr,".uniform",Yt,"(",fa,",");var Vi=Math.pow(un-js+2,2),oo=it.global.def("new Float32Array(",Vi,")");Array.isArray(sa)?dt("false,(",g(Vi,function(Cl){return oo+"["+Cl+"]="+sa[Cl]}),",",oo,")"):dt("false,(Array.isArray(",sa,")||",sa," instanceof Float32Array)?",sa,":(",g(Vi,function(Cl){return oo+"["+Cl+"]="+sa+"["+Cl+"]"}),",",oo,")"),dt(");")}else if(ai>1){for(var Is=[],Cs=[],Sl=0;Sl<ai;++Sl)Array.isArray(sa)?Cs.push(sa[Sl]):Cs.push(dt.def(sa+"["+Sl+"]")),ur&&Is.push(dt.def());ur&&dt("if(!",it.batchId,"||",Is.map(function(Cl,El){return Cl+"!=="+Cs[El]}).join("||"),"){",Is.map(function(Cl,El){return Cl+"="+Cs[El]+";"}).join("")),dt(dr,".uniform",Yt,"(",fa,",",Cs.join(","),");"),ur&&dt("}")}else{if(ur){var xl=dt.def();dt("if(!",it.batchId,"||",xl,"!==",sa,"){",xl,"=",sa,";")}dt(dr,".uniform",Yt,"(",fa,",",sa,");"),ur&&dt("}")}}}function Vo(it,dt,Lt,or){var er=it.shared,ur=er.gl,mr=er.draw,dr=or.draw;function Yt(){var ai=dr.elements,gi,Vi=dt;return ai?((ai.contextDep&&or.contextDynamic||ai.propDep)&&(Vi=Lt),gi=ai.append(it,Vi),dr.elementsActive&&Vi("if("+gi+")"+ur+".bindBuffer("+Cr+","+gi+".buffer.buffer);")):(gi=Vi.def(),Vi(gi,"=",mr,".",Oe,";","if(",gi,"){",ur,".bindBuffer(",Cr,",",gi,".buffer.buffer);}","else if(",er.vao,".currentVAO){",gi,"=",it.shared.elements+".getElements("+er.vao,".currentVAO.elements);",Ii?"":"if("+gi+")"+ur+".bindBuffer("+Cr+","+gi+".buffer.buffer);","}")),gi}function ar(){var ai=dr.count,gi,Vi=dt;return ai?((ai.contextDep&&or.contextDynamic||ai.propDep)&&(Vi=Lt),gi=ai.append(it,Vi)):gi=Vi.def(mr,".",Mt),gi}var tr=Yt();function Yr(ai){var gi=dr[ai];return gi?gi.contextDep&&or.contextDynamic||gi.propDep?gi.append(it,Lt):gi.append(it,dt):dt.def(mr,".",ai)}var un=Yr(We),En=Yr(zt),Ea=ar();if(typeof Ea=="number"){if(Ea===0)return}else Lt("if(",Ea,"){"),Lt.exit("}");var fa,sa;za&&(fa=Yr(rr),sa=it.instancing);var Ma=tr+".type",La=dr.elements&&ho(dr.elements)&&!dr.vaoActive;function Ja(){function ai(){Lt(sa,".drawElementsInstancedANGLE(",[un,Ea,Ma,En+"<<(("+Ma+"-"+qi+")>>1)",fa],");")}function gi(){Lt(sa,".drawArraysInstancedANGLE(",[un,En,Ea,fa],");")}tr&&tr!=="null"?La?ai():(Lt("if(",tr,"){"),ai(),Lt("}else{"),gi(),Lt("}")):gi()}function ka(){function ai(){Lt(ur+".drawElements("+[un,Ea,Ma,En+"<<(("+Ma+"-"+qi+")>>1)"]+");")}function gi(){Lt(ur+".drawArrays("+[un,En,Ea]+");")}tr&&tr!=="null"?La?ai():(Lt("if(",tr,"){"),ai(),Lt("}else{"),gi(),Lt("}")):gi()}za&&(typeof fa!="number"||fa>=0)?typeof fa=="string"?(Lt("if(",fa,">0){"),Ja(),Lt("}else if(",fa,"<0){"),ka(),Lt("}")):Ja():ka()}function Ms(it,dt,Lt,or,er){var ur=di(),mr=ur.proc("body",er);return za&&(ur.instancing=mr.def(ur.shared.extensions,".angle_instanced_arrays")),it(ur,mr,Lt,or),ur.compile().body}function Rs(it,dt,Lt,or){$s(it,dt),Lt.useVAO?Lt.drawVAO?dt(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,dt),");"):dt(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(dt(it.shared.vao,".setVAO(null);"),gc(it,dt,Lt,or.attributes,function(){return!0})),_c(it,dt,Lt,or.uniforms,function(){return!0},!1),Vo(it,dt,dt,Lt)}function Me(it,dt){var Lt=it.proc("draw",1);$s(it,Lt),su(it,Lt,dt.context),gu(it,Lt,dt.framebuffer),ko(it,Lt,dt),sc(it,Lt,dt.state),Hl(it,Lt,dt,!1,!0);var or=dt.shader.progVar.append(it,Lt);if(Lt(it.shared.gl,".useProgram(",or,".program);"),dt.shader.program)Rs(it,Lt,dt,dt.shader.program);else{Lt(it.shared.vao,".setVAO(null);");var er=it.global.def("{}"),ur=Lt.def(or,".id"),mr=Lt.def(er,"[",ur,"]");Lt(it.cond(mr).then(mr,".call(this,a0);").else(mr,"=",er,"[",ur,"]=",it.link(function(dr){return Ms(Rs,it,dt,dr,1)}),"(",or,");",mr,".call(this,a0);"))}Object.keys(dt.state).length>0&&Lt(it.shared.current,".dirty=true;"),it.shared.vao&&Lt(it.shared.vao,".setVAO(null);")}function X(it,dt,Lt,or){it.batchId="a1",$s(it,dt);function er(){return!0}gc(it,dt,Lt,or.attributes,er),_c(it,dt,Lt,or.uniforms,er,!1),Vo(it,dt,dt,Lt)}function ge(it,dt,Lt,or){$s(it,dt);var er=Lt.contextDep,ur=dt.def(),mr="a0",dr="a1",Yt=dt.def();it.shared.props=Yt,it.batchId=ur;var ar=it.scope(),tr=it.scope();dt(ar.entry,"for(",ur,"=0;",ur,"<",dr,";++",ur,"){",Yt,"=",mr,"[",ur,"];",tr,"}",ar.exit);function Yr(Ma){return Ma.contextDep&&er||Ma.propDep}function un(Ma){return!Yr(Ma)}if(Lt.needsContext&&su(it,tr,Lt.context),Lt.needsFramebuffer&&gu(it,tr,Lt.framebuffer),sc(it,tr,Lt.state,Yr),Lt.profile&&Yr(Lt.profile)&&Hl(it,tr,Lt,!1,!0),or)Lt.useVAO?Lt.drawVAO?Yr(Lt.drawVAO)?tr(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,tr),");"):ar(it.shared.vao,".setVAO(",Lt.drawVAO.append(it,ar),");"):ar(it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"):(ar(it.shared.vao,".setVAO(null);"),gc(it,ar,Lt,or.attributes,un),gc(it,tr,Lt,or.attributes,Yr)),_c(it,ar,Lt,or.uniforms,un,!1),_c(it,tr,Lt,or.uniforms,Yr,!0),Vo(it,ar,tr,Lt);else{var En=it.global.def("{}"),Ea=Lt.shader.progVar.append(it,tr),fa=tr.def(Ea,".id"),sa=tr.def(En,"[",fa,"]");tr(it.shared.gl,".useProgram(",Ea,".program);","if(!",sa,"){",sa,"=",En,"[",fa,"]=",it.link(function(Ma){return Ms(X,it,Lt,Ma,2)}),"(",Ea,");}",sa,".call(this,a0[",ur,"],",ur,");")}}function ne(it,dt){var Lt=it.proc("batch",2);it.batchId="0",$s(it,Lt);var or=!1,er=!0;Object.keys(dt.context).forEach(function(En){or=or||dt.context[En].propDep}),or||(su(it,Lt,dt.context),er=!1);var ur=dt.framebuffer,mr=!1;ur?(ur.propDep?or=mr=!0:ur.contextDep&&or&&(mr=!0),mr||gu(it,Lt,ur)):gu(it,Lt,null),dt.state.viewport&&dt.state.viewport.propDep&&(or=!0);function dr(En){return En.contextDep&&or||En.propDep}ko(it,Lt,dt),sc(it,Lt,dt.state,function(En){return!dr(En)}),(!dt.profile||!dr(dt.profile))&&Hl(it,Lt,dt,!1,"a1"),dt.contextDep=or,dt.needsContext=er,dt.needsFramebuffer=mr;var Yt=dt.shader.progVar;if(Yt.contextDep&&or||Yt.propDep)ge(it,Lt,dt,null);else{var ar=Yt.append(it,Lt);if(Lt(it.shared.gl,".useProgram(",ar,".program);"),dt.shader.program)ge(it,Lt,dt,dt.shader.program);else{Lt(it.shared.vao,".setVAO(null);");var tr=it.global.def("{}"),Yr=Lt.def(ar,".id"),un=Lt.def(tr,"[",Yr,"]");Lt(it.cond(un).then(un,".call(this,a0,a1);").else(un,"=",tr,"[",Yr,"]=",it.link(function(En){return Ms(ge,it,dt,En,2)}),"(",ar,");",un,".call(this,a0,a1);"))}}Object.keys(dt.state).length>0&&Lt(it.shared.current,".dirty=true;"),it.shared.vao&&Lt(it.shared.vao,".setVAO(null);")}function Se(it,dt){var Lt=it.proc("scope",3);it.batchId="a2";var or=it.shared,er=or.current;if(su(it,Lt,dt.context),dt.framebuffer&&dt.framebuffer.append(it,Lt),Aa(Object.keys(dt.state)).forEach(function(dr){var Yt=dt.state[dr],ar=Yt.append(it,Lt);ra(ar)?ar.forEach(function(tr,Yr){Ji(tr)?Lt.set(it.next[dr],"["+Yr+"]",tr):Lt.set(it.next[dr],"["+Yr+"]",it.link(tr,{stable:!0}))}):ho(Yt)?Lt.set(or.next,"."+dr,it.link(ar,{stable:!0})):Lt.set(or.next,"."+dr,ar)}),Hl(it,Lt,dt,!0,!0),[Oe,zt,Mt,rr,We].forEach(function(dr){var Yt=dt.draw[dr];if(Yt){var ar=Yt.append(it,Lt);Ji(ar)?Lt.set(or.draw,"."+dr,ar):Lt.set(or.draw,"."+dr,it.link(ar),{stable:!0})}}),Object.keys(dt.uniforms).forEach(function(dr){var Yt=dt.uniforms[dr].append(it,Lt);Array.isArray(Yt)&&(Yt="["+Yt.map(function(ar){return Ji(ar)?ar:it.link(ar,{stable:!0})})+"]"),Lt.set(or.uniforms,"["+it.link(kr.id(dr),{stable:!0})+"]",Yt)}),Object.keys(dt.attributes).forEach(function(dr){var Yt=dt.attributes[dr].append(it,Lt),ar=it.scopeAttrib(dr);Object.keys(new Kn).forEach(function(tr){Lt.set(ar,"."+tr,Yt[tr])})}),dt.scopeVAO){var ur=dt.scopeVAO.append(it,Lt);Ji(ur)?Lt.set(or.vao,".targetVAO",ur):Lt.set(or.vao,".targetVAO",it.link(ur,{stable:!0}))}function mr(dr){var Yt=dt.shader[dr];if(Yt){var ar=Yt.append(it,Lt);Ji(ar)?Lt.set(or.shader,"."+dr,ar):Lt.set(or.shader,"."+dr,it.link(ar,{stable:!0}))}}mr(fe),mr(Re),Object.keys(dt.state).length>0&&(Lt(er,".dirty=true;"),Lt.exit(er,".dirty=true;")),Lt("a1(",it.shared.context,",a0,",it.batchId,");")}function Je(it){if(!(typeof it!="object"||ra(it))){for(var dt=Object.keys(it),Lt=0;Lt<dt.length;++Lt)if(d.isDynamic(it[dt[Lt]]))return!0;return!1}}function _t(it,dt,Lt){var or=dt.static[Lt];if(!or||!Je(or))return;var er=it.global,ur=Object.keys(or),mr=!1,dr=!1,Yt=!1,ar=it.global.def("{}");ur.forEach(function(Yr){var un=or[Yr];if(d.isDynamic(un)){typeof un=="function"&&(un=or[Yr]=d.unbox(un));var En=lo(un,null);mr=mr||En.thisDep,Yt=Yt||En.propDep,dr=dr||En.contextDep}else{switch(er(ar,".",Yr,"="),typeof un){case"number":er(un);break;case"string":er('"',un,'"');break;case"object":Array.isArray(un)&&er("[",un.join(),"]");break;default:er(it.link(un));break}er(";")}});function tr(Yr,un){ur.forEach(function(En){var Ea=or[En];if(d.isDynamic(Ea)){var fa=Yr.invoke(un,Ea);un(ar,".",En,"=",fa,";")}})}dt.dynamic[Lt]=new d.DynamicVariable(ts,{thisDep:mr,contextDep:dr,propDep:Yt,ref:ar,append:tr}),delete dt.static[Lt]}function Tt(it,dt,Lt,or,er){var ur=di();ur.stats=ur.link(er),Object.keys(dt.static).forEach(function(dr){_t(ur,dt,dr)}),Ot.forEach(function(dr){_t(ur,it,dr)});var mr=Mf(it,dt,Lt,or,ur);return mr.shader.program&&(mr.shader.program.attributes.sort(function(dr,Yt){return dr.name<Yt.name?-1:1}),mr.shader.program.uniforms.sort(function(dr,Yt){return dr.name<Yt.name?-1:1})),Me(ur,mr),Se(ur,mr),ne(ur,mr),v(ur.compile(),{destroy:function(){mr.shader.program.destroy()}})}return{next:$i,current:si,procs:(function(){var it=di(),dt=it.proc("poll"),Lt=it.proc("refresh"),or=it.block();dt(or),Lt(or);var er=it.shared,ur=er.gl,mr=er.next,dr=er.current;or(dr,".dirty=false;"),gu(it,dt),gu(it,Lt,null,!0);var Yt;za&&(Yt=it.link(za)),Dr.oes_vertex_array_object&&Lt(it.link(Dr.oes_vertex_array_object),".bindVertexArrayOES(null);");var ar=Lt.def(er.attributes),tr=Lt.def(0),Yr=it.cond(tr,".buffer");Yr.then(ur,".enableVertexAttribArray(i);",ur,".bindBuffer(",Kt,",",tr,".buffer.buffer);",ur,".vertexAttribPointer(i,",tr,".size,",tr,".type,",tr,".normalized,",tr,".stride,",tr,".offset);").else(ur,".disableVertexAttribArray(i);",ur,".vertexAttrib4f(i,",tr,".x,",tr,".y,",tr,".z,",tr,".w);",tr,".buffer=null;");var un=it.link(Hn.maxAttributes,{stable:!0});return Lt("for(var i=0;i<",un,";++i){",tr,"=",ar,"[i];",Yr,"}"),za&&Lt("for(var i=0;i<",un,";++i){",Yt,".vertexAttribDivisorANGLE(i,",ar,"[i].divisor);","}"),Lt(it.shared.vao,".currentVAO=null;",it.shared.vao,".setVAO(",it.shared.vao,".targetVAO);"),Object.keys(ca).forEach(function(En){var Ea=ca[En],fa=or.def(mr,".",En),sa=it.block();sa("if(",fa,"){",ur,".enable(",Ea,")}else{",ur,".disable(",Ea,")}",dr,".",En,"=",fa,";"),Lt(sa),dt("if(",fa,"!==",dr,".",En,"){",sa,"}")}),Object.keys(Ei).forEach(function(En){var Ea=Ei[En],fa=si[En],sa,Ma,La=it.block();if(La(ur,".",Ea,"("),ra(fa)){var Ja=fa.length;sa=it.global.def(mr,".",En),Ma=it.global.def(dr,".",En),La(g(Ja,function(ka){return sa+"["+ka+"]"}),");",g(Ja,function(ka){return Ma+"["+ka+"]="+sa+"["+ka+"];"}).join("")),dt("if(",g(Ja,function(ka){return sa+"["+ka+"]!=="+Ma+"["+ka+"]"}).join("||"),"){",La,"}")}else sa=or.def(mr,".",En),Ma=or.def(dr,".",En),La(sa,");",dr,".",En,"=",sa,";"),dt("if(",sa,"!==",Ma,"){",La,"}");Lt(La)}),it.compile()})(),compile:Tt}}function nl(){return{vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0}}var Go=34918,bs=34919,fl=35007,ju=function(At,kr){if(!kr.ext_disjoint_timer_query)return null;var Dr=[];function Hn(){return Dr.pop()||kr.ext_disjoint_timer_query.createQueryEXT()}function Ca(ga){Dr.push(ga)}var Rn=[];function Pn(ga){var za=Hn();kr.ext_disjoint_timer_query.beginQueryEXT(fl,za),Rn.push(za),fi(Rn.length-1,Rn.length,ga)}function ri(){kr.ext_disjoint_timer_query.endQueryEXT(fl)}function ei(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var ti=[];function pi(){return ti.pop()||new ei}function eo(ga){ti.push(ga)}var Bi=[];function fi(ga,za,wa){var Ii=pi();Ii.startQueryIndex=ga,Ii.endQueryIndex=za,Ii.sum=0,Ii.stats=wa,Bi.push(Ii)}var Oa=[],gn=[];function Kn(){var ga,za,wa=Rn.length;if(wa!==0){gn.length=Math.max(gn.length,wa+1),Oa.length=Math.max(Oa.length,wa+1),Oa[0]=0,gn[0]=0;var Ii=0;for(ga=0,za=0;za<Rn.length;++za){var si=Rn[za];kr.ext_disjoint_timer_query.getQueryObjectEXT(si,bs)?(Ii+=kr.ext_disjoint_timer_query.getQueryObjectEXT(si,Go),Ca(si)):Rn[ga++]=si,Oa[za+1]=Ii,gn[za+1]=ga}for(Rn.length=ga,ga=0,za=0;za<Bi.length;++za){var $i=Bi[za],Ta=$i.startQueryIndex,ca=$i.endQueryIndex;$i.sum+=Oa[ca]-Oa[Ta];var Ei=gn[Ta],Yn=gn[ca];Yn===Ei?($i.stats.gpuTime+=$i.sum/1e6,eo($i)):($i.startQueryIndex=Ei,$i.endQueryIndex=Yn,Bi[ga++]=$i)}Bi.length=ga}}return{beginQuery:Pn,endQuery:ri,pushScopeStats:fi,update:Kn,getNumPendingQueries:function(){return Rn.length},clear:function(){Dr.push.apply(Dr,Rn);for(var ga=0;ga<Dr.length;ga++)kr.ext_disjoint_timer_query.deleteQueryEXT(Dr[ga]);Rn.length=0,Dr.length=0},restore:function(){Rn.length=0,Dr.length=0}}},ou=16384,So=256,qs=1024,sl=34962,tu="webglcontextlost",Vl="webglcontextrestored",Lc=1,Ol=2,ru=3;function af(At,kr){for(var Dr=0;Dr<At.length;++Dr)if(At[Dr]===kr)return Dr;return-1}function zu(At){var kr=b(At);if(!kr)return null;var Dr=kr.gl,Hn=Dr.getContextAttributes();Dr.isContextLost();var Ca=A(Dr,kr);if(!Ca)return null;var Rn=m(),Pn=nl(),ri=kr.cachedCode||{},ei=Ca.extensions,ti=ju(Dr,ei),pi=y(),eo=Dr.drawingBufferWidth,Bi=Dr.drawingBufferHeight,fi={tick:0,time:0,viewportWidth:eo,viewportHeight:Bi,framebufferWidth:eo,framebufferHeight:Bi,drawingBufferWidth:eo,drawingBufferHeight:Bi,pixelRatio:kr.pixelRatio},Oa={},gn={elements:null,primitive:4,count:-1,offset:0,instances:-1},Kn=cn(Dr,ei),ga=Ln(Dr,Pn,kr,Ii),za=xr(Dr,ei,ga,Pn),wa=pf(Dr,ei,Kn,Pn,ga,za,gn);function Ii(Vo){return wa.destroyBuffer(Vo)}var si=tf(Dr,Rn,Pn,kr),$i=wf(Dr,ei,Kn,function(){Ei.procs.poll()},fi,Pn,kr),Ta=$f(Dr,ei,Kn,Pn,kr),ca=mh(Dr,ei,Kn,$i,Ta,Pn),Ei=qo(Dr,Rn,ei,Kn,ga,za,$i,ca,Oa,wa,si,gn,fi,ti,ri,kr),Yn=yc(Dr,ca,Ei.procs.poll,fi),yi=Ei.next,ni=Dr.canvas,Ji=[],Ho=[],ji=[],no=[kr.onDestroy],di=null;function jo(){if(Ji.length===0){ti&&ti.update(),di=null;return}di=h.next(jo),gu();for(var Vo=Ji.length-1;Vo>=0;--Vo){var Ms=Ji[Vo];Ms&&Ms(fi,null,0)}Dr.flush(),ti&&ti.update()}function rs(){!di&&Ji.length>0&&(di=h.next(jo))}function ds(){di&&(h.cancel(jo),di=null)}function _l(Vo){Vo.preventDefault(),ds(),Ho.forEach(function(Ms){Ms()})}function vs(Vo){Dr.getError(),Ca.restore(),si.restore(),ga.restore(),$i.restore(),Ta.restore(),ca.restore(),wa.restore(),ti&&ti.restore(),Ei.procs.refresh(),rs(),ji.forEach(function(Ms){Ms()})}ni&&(ni.addEventListener(tu,_l,!1),ni.addEventListener(Vl,vs,!1));function Lu(){Ji.length=0,ds(),ni&&(ni.removeEventListener(tu,_l),ni.removeEventListener(Vl,vs)),si.clear(),ca.clear(),Ta.clear(),wa.clear(),$i.clear(),za.clear(),ga.clear(),ti&&ti.clear(),no.forEach(function(Vo){Vo()})}function ll(Vo){function Ms(er){var ur=v({},er);delete ur.uniforms,delete ur.attributes,delete ur.context,delete ur.vao,"stencil"in ur&&ur.stencil.op&&(ur.stencil.opBack=ur.stencil.opFront=ur.stencil.op,delete ur.stencil.op);function mr(dr){if(dr in ur){var Yt=ur[dr];delete ur[dr],Object.keys(Yt).forEach(function(ar){ur[dr+"."+ar]=Yt[ar]})}}return mr("blend"),mr("depth"),mr("cull"),mr("stencil"),mr("polygonOffset"),mr("scissor"),mr("sample"),"vao"in er&&(ur.vao=er.vao),ur}function Rs(er,ur){var mr={},dr={};return Object.keys(er).forEach(function(Yt){var ar=er[Yt];if(d.isDynamic(ar)){dr[Yt]=d.unbox(ar,Yt);return}else if(ur&&Array.isArray(ar)){for(var tr=0;tr<ar.length;++tr)if(d.isDynamic(ar[tr])){dr[Yt]=d.unbox(ar,Yt);return}}mr[Yt]=ar}),{dynamic:dr,static:mr}}var Me=Rs(Vo.context||{},!0),X=Rs(Vo.uniforms||{},!0),ge=Rs(Vo.attributes||{},!1),ne=Rs(Ms(Vo),!1),Se={gpuTime:0,cpuTime:0,count:0},Je=Ei.compile(ne,ge,X,Me,Se),_t=Je.draw,Tt=Je.batch,it=Je.scope,dt=[];function Lt(er){for(;dt.length<er;)dt.push(null);return dt}function or(er,ur){var mr;if(typeof er=="function")return it.call(this,null,er,0);if(typeof ur=="function")if(typeof er=="number")for(mr=0;mr<er;++mr)it.call(this,null,ur,mr);else if(Array.isArray(er))for(mr=0;mr<er.length;++mr)it.call(this,er[mr],ur,mr);else return it.call(this,er,ur,0);else if(typeof er=="number"){if(er>0)return Tt.call(this,Lt(er|0),er|0)}else if(Array.isArray(er)){if(er.length)return Tt.call(this,er,er.length)}else return _t.call(this,er)}return v(or,{stats:Se,destroy:function(){Je.destroy()}})}var wu=ca.setFBO=ll({framebuffer:d.define.call(null,Lc,"framebuffer")});function Gu(Vo,Ms){var Rs=0;Ei.procs.poll();var Me=Ms.color;Me&&(Dr.clearColor(+Me[0]||0,+Me[1]||0,+Me[2]||0,+Me[3]||0),Rs|=ou),"depth"in Ms&&(Dr.clearDepth(+Ms.depth),Rs|=So),"stencil"in Ms&&(Dr.clearStencil(Ms.stencil|0),Rs|=qs),Dr.clear(Rs)}function oc(Vo){if("framebuffer"in Vo)if(Vo.framebuffer&&Vo.framebuffer_reglType==="framebufferCube")for(var Ms=0;Ms<6;++Ms)wu(v({framebuffer:Vo.framebuffer.faces[Ms]},Vo),Gu);else wu(Vo,Gu);else Gu(null,Vo)}function Mf(Vo){Ji.push(Vo);function Ms(){var Rs=af(Ji,Vo);function Me(){var X=af(Ji,Me);Ji[X]=Ji[Ji.length-1],Ji.length-=1,Ji.length<=0&&ds()}Ji[Rs]=Me}return rs(),{cancel:Ms}}function su(){var Vo=yi.viewport,Ms=yi.scissor_box;Vo[0]=Vo[1]=Ms[0]=Ms[1]=0,fi.viewportWidth=fi.framebufferWidth=fi.drawingBufferWidth=Vo[2]=Ms[2]=Dr.drawingBufferWidth,fi.viewportHeight=fi.framebufferHeight=fi.drawingBufferHeight=Vo[3]=Ms[3]=Dr.drawingBufferHeight}function gu(){fi.tick+=1,fi.time=sc(),su(),Ei.procs.poll()}function ko(){$i.refresh(),su(),Ei.procs.refresh(),ti&&ti.update()}function sc(){return(y()-pi)/1e3}ko();function $s(Vo,Ms){var Rs;switch(Vo){case"frame":return Mf(Ms);case"lost":Rs=Ho;break;case"restore":Rs=ji;break;case"destroy":Rs=no;break}return Rs.push(Ms),{cancel:function(){for(var Me=0;Me<Rs.length;++Me)if(Rs[Me]===Ms){Rs[Me]=Rs[Rs.length-1],Rs.pop();return}}}}function Hl(){return ri}function gc(Vo){Object.entries(Vo).forEach(function(Ms){ri[Ms[0]]=Ms[1]})}var _c=v(ll,{clear:oc,prop:d.define.bind(null,Lc),context:d.define.bind(null,Ol),this:d.define.bind(null,ru),draw:ll({}),buffer:function(Vo){return ga.create(Vo,sl,!1,!1)},elements:function(Vo){return za.create(Vo,!1)},texture:$i.create2D,cube:$i.createCube,renderbuffer:Ta.create,framebuffer:ca.create,framebufferCube:ca.createCube,vao:wa.createVAO,attributes:Hn,frame:Mf,on:$s,limits:Kn,hasExtension:function(Vo){return Kn.extensions.indexOf(Vo.toLowerCase())>=0},read:Yn,destroy:Lu,_gl:Dr,_refresh:ko,poll:function(){gu(),ti&&ti.update()},now:sc,stats:Pn,getCachedCode:Hl,preloadCachedCode:gc});return kr.onDone(null,_c),_c}return zu})}}),RR=Ne({"src/lib/prepare_regl.js"(te,Z){var v=eN(),w=mee();Z.exports=function(P,t,r){var a=P._fullLayout,l=!0;return a._glcanvas.each(function(i){if(i.regl){i.regl.preloadCachedCode(r);return}if(!(i.pick&&!a._has("parcoords"))){try{i.regl=w({canvas:this,attributes:{antialias:!i.pick,preserveDrawingBuffer:!0},pixelRatio:P._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:r||{}})}catch{l=!1}i.regl||(l=!1),l&&this.addEventListener("webglcontextlost",function(s){P&&P.emit&&P.emit("plotly_webglcontextlost",{event:s,layer:i.key})},!1)}}),l||v({container:a._glcontainer.node()}),l}}}),HN=Ne({"src/traces/scattergl/plot.js"(d,Z){var v=wN(),w=DN(),C=QQ(),P=pee(),t=In(),r=Pm().selectMode,a=RR(),l=vu(),i=Zp(),s=_N().styleTextSelection,o={};function u(h,y,m,E){var c=h._size,_=h.width*E,T=h.height*E,M=c.l*E,k=c.b*E,b=c.r*E,A=c.t*E,g=c.w*E,f=c.h*E;return[M+y.domain[0]*g,k+m.domain[0]*f,_-b-(1-y.domain[1])*g,T-A-(1-m.domain[1])*f]}var d=Z.exports=function(y,m,E){if(E.length){var c=y._fullLayout,_=m._scene,T=m.xaxis,M=m.yaxis,k,b;if(_){var A=a(y,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!A){_.init();return}var g=_.count,f=c._glcanvas.data()[0].regl;if(i(y,m,E),_.dirty){if((_.line2d||_.error2d)&&!(_.scatter2d||_.fill2d||_.glText)&&f.clear({color:!0,depth:!0}),_.error2d===!0&&(_.error2d=C(f)),_.line2d===!0&&(_.line2d=w(f)),_.scatter2d===!0&&(_.scatter2d=v(f)),_.fill2d===!0&&(_.fill2d=w(f)),_.glText===!0)for(_.glText=new Array(g),k=0;k<g;k++)_.glText[k]=new P(f);if(_.glText){if(g>_.glText.length){var p=g-_.glText.length;for(k=0;k<p;k++)_.glText.push(new P(f))}else if(g<_.glText.length){var x=_.glText.length-g,N=_.glText.splice(g,x);N.forEach(function(Y){Y.destroy()})}for(k=0;k<g;k++)_.glText[k].update(_.textOptions[k])}if(_.line2d&&(_.line2d.update(_.lineOptions),_.lineOptions=_.lineOptions.map(function(Y){if(Y&&Y.positions){for(var ce=Y.positions,ue=0;ue<ce.length&&(isNaN(ce[ue])||isNaN(ce[ue+1]));)ue+=2;for(var _e=ce.length-2;_e>ue&&(isNaN(ce[_e])||isNaN(ce[_e+1]));)_e-=2;Y.positions=ce.slice(ue,_e+2)}return Y}),_.line2d.update(_.lineOptions)),_.error2d){var D=(_.errorXOptions||[]).concat(_.errorYOptions||[]);_.error2d.update(D)}_.scatter2d&&_.scatter2d.update(_.markerOptions),_.fillOrder=t.repeat(null,g),_.fill2d&&(_.fillOptions=_.fillOptions.map(function(Y,ce){var ue=E[ce];if(!(!Y||!ue||!ue[0]||!ue[0].trace)){var _e=ue[0],Le=_e.trace,ze=_e.t,Ge=_.lineOptions[ce],Ve,rt,pt=[];Le._ownfill&&pt.push(ce),Le._nexttrace&&pt.push(ce+1),pt.length&&(_.fillOrder[ce]=pt);var gt=[],ht=Ge&&Ge.positions||ze.positions,lt,Fe;if(Le.fill==="tozeroy"){for(lt=0;lt<ht.length&&isNaN(ht[lt+1]);)lt+=2;for(Fe=ht.length-2;Fe>lt&&isNaN(ht[Fe+1]);)Fe-=2;ht[lt+1]!==0&&(gt=[ht[lt],0]),gt=gt.concat(ht.slice(lt,Fe+2)),ht[Fe+1]!==0&&(gt=gt.concat([ht[Fe],0]))}else if(Le.fill==="tozerox"){for(lt=0;lt<ht.length&&isNaN(ht[lt]);)lt+=2;for(Fe=ht.length-2;Fe>lt&&isNaN(ht[Fe]);)Fe-=2;ht[lt]!==0&&(gt=[0,ht[lt+1]]),gt=gt.concat(ht.slice(lt,Fe+2)),ht[Fe]!==0&&(gt=gt.concat([0,ht[Fe+1]]))}else if(Le.fill==="toself"||Le.fill==="tonext"){for(gt=[],Ve=0,Y.splitNull=!0,rt=0;rt<ht.length;rt+=2)(isNaN(ht[rt])||isNaN(ht[rt+1]))&&(gt=gt.concat(ht.slice(Ve,rt)),gt.push(ht[Ve],ht[Ve+1]),gt.push(null,null),Ve=rt+2);gt=gt.concat(ht.slice(Ve)),Ve&&gt.push(ht[Ve],ht[Ve+1])}else{var Pe=Le._nexttrace;if(Pe){var be=_.lineOptions[ce+1];if(be){var Ye=be.positions;if(Le.fill==="tonexty"){for(gt=ht.slice(),ce=Math.floor(Ye.length/2);ce--;){var mt=Ye[ce*2],bt=Ye[ce*2+1];isNaN(mt)||isNaN(bt)||gt.push(mt,bt)}Y.fill=Pe.fillcolor}}}}if(Le._prevtrace&&Le._prevtrace.fill==="tonext"){var ft=_.lineOptions[ce-1].positions,Wt=gt.length/2;Ve=Wt;var Zt=[Ve];for(rt=0;rt<ft.length;rt+=2)(isNaN(ft[rt])||isNaN(ft[rt+1]))&&(Zt.push(rt/2+Wt+1),Ve=rt+2);gt=gt.concat(ft),Y.hole=Zt}return Y.fillmode=Le.fill,Y.opacity=Le.opacity,Y.positions=gt,Y}}),_.fill2d.update(_.fillOptions))}var B=c.dragmode,U=r(B),V=c.clickmode.indexOf("select")>-1;for(k=0;k<g;k++){var q=E[k][0],z=q.trace,H=q.t,G=H.index,J=z._length,le=H.x,ye=H.y;if(z.selectedpoints||U||V){if(U||(U=!0),z.selectedpoints){var de=_.selectBatch[G]=t.selIndices2selPoints(z),me={};for(b=0;b<de.length;b++)me[de[b]]=1;var W=[];for(b=0;b<J;b++)me[b]||W.push(b);_.unselectBatch[G]=W}var ie=H.xpx=new Array(J),se=H.ypx=new Array(J);for(b=0;b<J;b++)ie[b]=T.c2p(le[b]),se[b]=M.c2p(ye[b])}else H.xpx=H.ypx=null}if(U){if(_.select2d||(_.select2d=v(c._glcanvas.data()[1].regl)),_.scatter2d){var ee=new Array(g);for(k=0;k<g;k++)ee[k]=_.selectBatch[k].length||_.unselectBatch[k].length?_.markerUnselectedOptions[k]:{};_.scatter2d.update(ee)}_.select2d&&(_.select2d.update(_.markerOptions),_.select2d.update(_.markerSelectedOptions)),_.glText&&E.forEach(function(Y){var ce=((Y||[])[0]||{}).trace||{};l.hasText(ce)&&s(Y)})}else _.scatter2d&&_.scatter2d.update(_.markerOptions);var pe={viewport:u(c,T,M,y._context.plotGlPixelRatio),range:[(T._rl||T.range)[0],(M._rl||M.range)[0],(T._rl||T.range)[1],(M._rl||M.range)[1]]},oe=t.repeat(pe,_.count);_.fill2d&&_.fill2d.update(oe),_.line2d&&_.line2d.update(oe),_.error2d&&_.error2d.update(oe.concat(oe)),_.scatter2d&&_.scatter2d.update(oe),_.select2d&&_.select2d.update(oe),_.glText&&_.glText.forEach(function(Y){Y.update(pe)})}}};d.reglPrecompiled=o}}),yee=Ne({"src/traces/scattergl/index.js"(te,Z){var v=KJ();v.plot=HN(),Z.exports=v}}),gee=Ne({"lib/scattergl.js"(te,Z){Z.exports=yee()}}),GN=Ne({"src/traces/splom/attributes.js"(te,Z){var v=Jc(),w=Vu(),C=bc().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Il(),r=l6(),a=xh().idRegex,l=Tu().templatedArray,i=co().extendFlat,s=v.marker,o=s.line,u=i(w("marker.line",{editTypeOverride:"calc"}),{width:i({},o.width,{editType:"calc"}),editType:"calc"}),d=i(w("marker"),{symbol:s.symbol,angle:s.angle,size:i({},s.size,{editType:"markerSize"}),sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,opacity:s.opacity,colorbar:s.colorbar,line:u,editType:"calc"});d.color.editType=d.cmin.editType=d.cmax.editType="style";function h(y){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:a[y],editType:"plot"}}}Z.exports={dimensions:l("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:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:i({},r.text,{}),hovertext:i({},r.hovertext,{}),hovertemplate:P(),hovertemplatefallback:t(),xhoverformat:C("x"),yhoverformat:C("y"),marker:d,xaxes:h("x"),yaxes:h("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:r.selected.marker,editType:"calc"},unselected:{marker:r.unselected.marker,editType:"calc"},opacity:r.opacity}}}),IR=Ne({"src/traces/parcoords/merge_length.js"(te,Z){Z.exports=function(v,w,C,P){P||(P=1/0);var t,r;for(t=0;t<w.length;t++)r=w[t],r.visible&&(P=Math.min(P,r[C].length));for(P===1/0&&(P=0),v._length=P,t=0;t<w.length;t++)r=w[t],r.visible&&(r._length=P);return P}}}),_ee=Ne({"src/traces/splom/defaults.js"(te,Z){var v=In(),w=zd(),C=GN(),P=vu(),t=xv(),r=IR(),a=ER().isOpenSymbol;Z.exports=function(o,u,d,h){function y(b,A){return v.coerce(o,u,C,b,A)}var m=w(o,u,{name:"dimensions",handleItemDefaults:l}),E=y("diagonal.visible"),c=y("showupperhalf"),_=y("showlowerhalf"),T=r(u,m,"values");if(!T||!E&&!c&&!_){u.visible=!1;return}y("text"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback"),y("xhoverformat"),y("yhoverformat"),t(o,u,d,h,y,{noAngleRef:!0,noStandOff:!0});var M=a(u.marker.symbol),k=P.isBubble(u);y("marker.line.width",M||k?1:0),i(o,u,h,y),v.coerceSelectionMarkerOpacity(u,y)};function l(s,o){function u(h,y){return v.coerce(s,o,C.dimensions,h,y)}u("label");var d=u("values");d&&d.length?u("visible"):o.visible=!1,u("axis.type"),u("axis.matches")}function i(s,o,u,d){var h=o.dimensions,y=h.length,m=o.showupperhalf,E=o.showlowerhalf,c=o.diagonal.visible,_,T,M=new Array(y),k=new Array(y);for(_=0;_<y;_++){var b=_?_+1:"";M[_]="x"+b,k[_]="y"+b}var A=d("xaxes",M),g=d("yaxes",k),f=o._diag=new Array(y);o._xaxes={},o._yaxes={};var p=[],x=[];function N(J,le,ye,de){if(J){var me=J.charAt(0),W=u._splomAxes[me];if(o["_"+me+"axes"][J]=1,de.push(J),!(J in W)){var ie=W[J]={};ye&&(ie.label=ye.label||"",ye.visible&&ye.axis&&(ye.axis.type&&(ie.type=ye.axis.type),ye.axis.matches&&(ie.matches=le)))}}}var D=!c&&!E,B=!c&&!m;for(o._axesDim={},_=0;_<y;_++){var U=h[_],V=_===0,q=_===y-1,z=V&&D||q&&B?void 0:A[_],H=V&&B||q&&D?void 0:g[_];N(z,H,U,p),N(H,z,U,x),f[_]=[z,H],o._axesDim[z]=_,o._axesDim[H]=_}for(_=0;_<p.length;_++)for(T=0;T<x.length;T++){var G=p[_]+x[T];(_>T&&m||_<T&&E||_===T&&(c||!E||!m))&&(u._splomSubplots[G]=1)}(!E||!c&&m&&E)&&(u._splomGridDflt.xside="bottom",u._splomGridDflt.yside="left")}}}),xee=Ne({"src/traces/splom/scene_update.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C._fullLayout,r=P.uid,a=t._splomScenes;a||(a=t._splomScenes={});var l={dirty:!0,selectBatch:[],unselectBatch:[]},i={matrix:!1,selectBatch:[],unselectBatch:[]},s=a[P.uid];return s||(s=a[r]=v.extendFlat({},l,i),s.draw=function(){s.matrix&&s.matrix.draw&&(s.selectBatch.length||s.unselectBatch.length?s.matrix.draw(s.unselectBatch,s.selectBatch):s.matrix.draw()),s.dirty=!1},s.destroy=function(){s.matrix&&s.matrix.destroy&&s.matrix.destroy(),s.matrixOptions=null,s.selectBatch=null,s.unselectBatch=null,s=null}),s.dirty||v.extendFlat(s,l),s}}}),bee=Ne({"src/traces/splom/calc.js"(te,Z){var v=In(),w=Hf(),C=Uv().calcMarkerSize,P=Uv().calcAxisExpansion,t=Wp(),r=y3().markerSelection,a=y3().markerStyle,l=xee(),i=ja().BADNUM,s=Ob().TOO_MANY_POINTS;Z.exports=function(u,d){var h=d.dimensions,y=d._length,m={},E=m.cdata=[],c=m.data=[],_=d._visibleDims=[],T,M,k,b,A;function g(D,B){for(var U=D.makeCalcdata({v:B.values,vcalendar:d.calendar},"v"),V=0;V<U.length;V++)U[V]=U[V]===i?NaN:U[V];E.push(U),c.push(D.type==="log"?v.simpleMap(U,D.c2l):U)}for(T=0;T<h.length;T++)if(k=h[T],k.visible){if(b=w.getFromId(u,d._diag[T][0]),A=w.getFromId(u,d._diag[T][1]),b&&A&&b.type!==A.type){v.log("Skipping splom dimension "+T+" with conflicting axis types");continue}b?(g(b,k),A&&A.type==="category"&&(A._categories=b._categories.slice())):g(A,k),_.push(T)}t(u,d),v.extendFlat(m,a(u,d));var f=E.length,p=f*y>s,x;for(p?x=m.sizeAvg||Math.max(m.size,3):x=C(d,y),M=0;M<_.length;M++)T=_[M],k=h[T],b=w.getFromId(u,d._diag[T][0])||{},A=w.getFromId(u,d._diag[T][1])||{},P(u,d,b,A,E[M],E[M],x);var N=l(u,d);return N.matrix||(N.matrix=!0),N.matrixOptions=m,N.selectedOptions=r(u,d,d.selected),N.unselectedOptions=r(u,d,d.unselected),[{x:!1,y:!1,t:{},trace:d}]}}}),wee=Ne({"node_modules/performance-now/lib/performance-now.js"(te,Z){(function(){var v,w,C,P,t,r;typeof performance<"u"&&performance!==null&&performance.now?Z.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Z.exports=function(){return(v()-t)/1e6},w=process.hrtime,v=function(){var a;return a=w(),a[0]*1e9+a[1]},P=v(),r=process.uptime()*1e9,t=P-r):Date.now?(Z.exports=function(){return Date.now()-C},C=Date.now()):(Z.exports=function(){return new Date().getTime()-C},C=new Date().getTime())}).call(te)}}),Tee=Ne({"node_modules/raf/index.js"(te,Z){var v=wee(),w=window,C=["moz","webkit"],P="AnimationFrame",t=w["request"+P],r=w["cancel"+P]||w["cancelRequest"+P];for(a=0;!t&&a<C.length;a++)t=w[C[a]+"Request"+P],r=w[C[a]+"Cancel"+P]||w[C[a]+"CancelRequest"+P];var a;(!t||!r)&&(l=0,i=0,s=[],o=1e3/60,t=function(u){if(s.length===0){var d=v(),h=Math.max(0,o-(d-l));l=h+d,setTimeout(function(){var y=s.slice(0);s.length=0;for(var m=0;m<y.length;m++)if(!y[m].cancelled)try{y[m].callback(l)}catch(E){setTimeout(function(){throw E},0)}},Math.round(h))}return s.push({handle:++i,callback:u,cancelled:!1}),i},r=function(u){for(var d=0;d<s.length;d++)s[d].handle===u&&(s[d].cancelled=!0)});var l,i,s,o;Z.exports=function(u){return t.call(w,u)},Z.exports.cancel=function(){r.apply(w,arguments)},Z.exports.polyfill=function(u){u||(u=w),u.requestAnimationFrame=t,u.cancelAnimationFrame=r}}}),Aee=Ne({"node_modules/array-range/index.js"(te,Z){Z.exports=function(w,C){var P=typeof w=="number",t=typeof C=="number";P&&!t?(C=w,w=0):!P&&!t&&(w=0,C=0),w=w|0,C=C|0;var r=C-w;if(r<0)throw new Error("array length must be positive");for(var a=new Array(r),l=0,i=w;l<r;l++,i++)a[l]=i;return a}}}),See=Ne({"node_modules/regl-splom/index.js"(te,Z){var v=wN(),w=n1(),C=p3(),P=Tee(),t=Aee(),r=JS(),a=m3();Z.exports=l;function l(u,d){if(!(this instanceof l))return new l(u);this.traces=[],this.passes={},this.regl=u,this.scatter=v(u),this.canvas=this.scatter.canvas}l.prototype.render=function(...u){return u.length&&this.update(...u),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=P(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,P(()=>{this.dirty=!1})),this)},l.prototype.update=function(...u){if(!u.length)return;for(let y=0;y<u.length;y++)this.updateItem(y,u[y]);this.traces=this.traces.filter(Boolean);let d=[],h=0;for(let y=0;y<this.traces.length;y++){let m=this.traces[y],E=this.traces[y].passes;for(let c=0;c<E.length;c++)d.push(this.passes[E[c]]);m.passOffset=h,h+=m.passes.length}return this.scatter.update(...d),this},l.prototype.updateItem=function(u,d){let{regl:h}=this;if(d===null)return this.traces[u]=null,this;if(!d)return this;let y=w(d,{data:"data items columns rows values dimensions samples x",snap:"snap cluster",size:"sizes size radius",color:"colors color fill fill-color fillColor",opacity:"opacity alpha transparency opaque",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",borderColor:"borderColors borderColor bordercolor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range ranges databox dataBox",viewport:"viewport viewBox viewbox",domain:"domain domains area areas",padding:"pad padding paddings pads margin margins",transpose:"transpose transposed",diagonal:"diagonal diag showDiagonal",upper:"upper up top upperhalf upperHalf showupperhalf showUpper showUpperHalf",lower:"lower low bottom lowerhalf lowerHalf showlowerhalf showLowerHalf showLower"}),m=this.traces[u]||(this.traces[u]={id:u,buffer:h.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:r([h._gl.drawingBufferWidth,h._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(y.color!=null&&(m.color=y.color),y.size!=null&&(m.size=y.size),y.marker!=null&&(m.marker=y.marker),y.borderColor!=null&&(m.borderColor=y.borderColor),y.borderSize!=null&&(m.borderSize=y.borderSize),y.opacity!=null&&(m.opacity=y.opacity),y.viewport&&(m.viewport=r(y.viewport)),y.diagonal!=null&&(m.diagonal=y.diagonal),y.upper!=null&&(m.upper=y.upper),y.lower!=null&&(m.lower=y.lower),y.data){m.buffer(a(y.data)),m.columns=y.data.length,m.count=y.data[0].length,m.bounds=[];for(let p=0;p<m.columns;p++)m.bounds[p]=C(y.data[p],1)}let E;y.range&&(m.range=y.range,E=m.range&&typeof m.range[0]!="number"),y.domain&&(m.domain=y.domain);let c=!1;y.padding!=null&&(Array.isArray(y.padding)&&y.padding.length===m.columns&&typeof y.padding[y.padding.length-1]=="number"?(m.padding=y.padding.map(o),c=!0):m.padding=o(y.padding));let _=m.columns,T=m.count,M=m.viewport.width,k=m.viewport.height,b=m.viewport.x,A=m.viewport.y,g=M/_,f=k/_;m.passes=[];for(let p=0;p<_;p++)for(let x=0;x<_;x++){if(!m.diagonal&&x===p||!m.upper&&p>x||!m.lower&&p<x)continue;let N=i(m.id,p,x),D=this.passes[N]||(this.passes[N]={});if(y.data&&(y.transpose?D.positions={x:{buffer:m.buffer,offset:x,count:T,stride:_},y:{buffer:m.buffer,offset:p,count:T,stride:_}}:D.positions={x:{buffer:m.buffer,offset:x*T,count:T},y:{buffer:m.buffer,offset:p*T,count:T}},D.bounds=s(m.bounds,p,x)),y.domain||y.viewport||y.data){let B=c?s(m.padding,p,x):m.padding;if(m.domain){let[U,V,q,z]=s(m.domain,p,x);D.viewport=[b+U*M+B[0],A+V*k+B[1],b+q*M-B[2],A+z*k-B[3]]}else D.viewport=[b+x*g+g*B[0],A+p*f+f*B[1],b+(x+1)*g-g*B[2],A+(p+1)*f-f*B[3]]}y.color&&(D.color=m.color),y.size&&(D.size=m.size),y.marker&&(D.marker=m.marker),y.borderSize&&(D.borderSize=m.borderSize),y.borderColor&&(D.borderColor=m.borderColor),y.opacity&&(D.opacity=m.opacity),y.range&&(D.range=E?s(m.range,p,x):m.range||D.bounds),m.passes.push(N)}return this},l.prototype.draw=function(...u){if(!u.length)this.scatter.draw();else{let d=[];for(let h=0;h<u.length;h++)if(typeof u[h]=="number"){let{passes:y,passOffset:m}=this.traces[u[h]];d.push(...t(m,m+y.length))}else if(u[h].length){let y=u[h],{passes:m,passOffset:E}=this.traces[h];m=m.map((c,_)=>{d[E+_]=y})}this.scatter.draw(...d)}return this},l.prototype.destroy=function(){return this.traces.forEach(u=>{u.buffer&&u.buffer.destroy&&u.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function i(u,d,h){let y=u.id!=null?u.id:u,m=d,E=h;return y<<16|(m&255)<<8|E&255}function s(u,d,h){let y,m,E,c,_=u[d],T=u[h];return _.length>2?(_[0],_[2],y=_[1],m=_[3]):_.length?(y=_[0],m=_[1]):(_.x,y=_.y,_.x+_.width,m=_.y+_.height),T.length>2?(E=T[0],c=T[2],T[1],T[3]):T.length?(E=T[0],c=T[1]):(E=T.x,T.y,c=T.x+T.width,T.y+T.height),[E,y,c,m]}function o(u){if(typeof u=="number")return[u,u,u,u];if(u.length===2)return[u[0],u[1],u[0],u[1]];{let d=r(u);return[d.x,d.y,d.x+d.width,d.y+d.height]}}}}),Eee=Ne({"src/traces/splom/plot.js"(te,Z){var v=See(),w=In(),C=Hf(),P=Pm().selectMode;Z.exports=function(a,l,i){if(i.length)for(var s=0;s<i.length;s++)t(a,i[s][0])};function t(r,a){var l=r._fullLayout,i=l._size,s=a.trace,o=a.t,u=l._splomScenes[s.uid],d=u.matrixOptions,h=d.cdata,y=l._glcanvas.data()[0].regl,m=l.dragmode,E,c,_,T,M;if(h.length!==0){d.lower=s.showupperhalf,d.upper=s.showlowerhalf,d.diagonal=s.diagonal.visible;var k=s._visibleDims,b=h.length,A=u.viewOpts={};for(A.ranges=new Array(b),A.domains=new Array(b),M=0;M<k.length;M++){_=k[M];var g=A.ranges[M]=new Array(4),f=A.domains[M]=new Array(4);E=C.getFromId(r,s._diag[_][0]),E&&(g[0]=E._rl[0],g[2]=E._rl[1],f[0]=E.domain[0],f[2]=E.domain[1]),c=C.getFromId(r,s._diag[_][1]),c&&(g[1]=c._rl[0],g[3]=c._rl[1],f[1]=c.domain[0],f[3]=c.domain[1])}var p=r._context.plotGlPixelRatio,x=i.l*p,N=i.b*p,D=i.w*p,B=i.h*p;A.viewport=[x,N,D+x,B+N],u.matrix===!0&&(u.matrix=v(y));var U=l.clickmode.indexOf("select")>-1,V=P(m)||!!s.selectedpoints||U,q=!0;if(V){var z=s._length;if(s.selectedpoints){u.selectBatch=s.selectedpoints;var H=s.selectedpoints,G={};for(_=0;_<H.length;_++)G[H[_]]=!0;var J=[];for(_=0;_<z;_++)G[_]||J.push(_);u.unselectBatch=J}var le=o.xpx=new Array(b),ye=o.ypx=new Array(b);for(M=0;M<k.length;M++){if(_=k[M],E=C.getFromId(r,s._diag[_][0]),E)for(le[M]=new Array(z),T=0;T<z;T++)le[M][T]=E.c2p(h[M][T]);if(c=C.getFromId(r,s._diag[_][1]),c)for(ye[M]=new Array(z),T=0;T<z;T++)ye[M][T]=c.c2p(h[M][T])}if(u.selectBatch.length||u.unselectBatch.length){var de=w.extendFlat({},d,u.unselectedOptions,A),me=w.extendFlat({},d,u.selectedOptions,A);u.matrix.update(de,me),q=!1}}else o.xpx=o.ypx=null;if(q){var W=w.extendFlat({},d,A);u.matrix.update(W,null)}}}}}),XN=Ne({"src/traces/splom/helpers.js"(te){te.getDimIndex=function(v,w){for(var C=w._id,P=C.charAt(0),t={x:0,y:1}[P],r=v._visibleDims,a=0;a<r.length;a++){var l=r[a];if(v._diag[l][t]===C)return a}return!1}}}),Mee=Ne({"src/traces/splom/hover.js"(te,Z){var v=XN(),w=SR().calcHover,C=Os().getFromId,P=co().extendFlat;function t(a,l,i,s,o){o||(o={});var u=(s||"").charAt(0)==="x",d=(s||"").charAt(0)==="y",h=r(a,l,i);if((u||d)&&o.hoversubplots==="axis"&&h[0])for(var y=(u?a.xa:a.ya)._subplotsWith,m=o.gd,E=P({},a),c=0;c<y.length;c++){var _=y[c];if(_!==a.xa._id+a.ya._id){d?E.xa=C(m,_,"x"):E.ya=C(m,_,"y");var T=u||d,M=r(E,l,i,T);h=h.concat(M)}}return h}function r(a,l,i,s){var o=a.cd,u=o[0].trace,d=a.scene,h=d.matrixOptions.cdata,y=a.xa,m=a.ya,E=y.c2p(l),c=m.c2p(i),_=a.distance,T=v.getDimIndex(u,y),M=v.getDimIndex(u,m);if(T===!1||M===!1)return[a];for(var k=h[T],b=h[M],A,g,f=_,p=0;p<k.length;p++)if(!(s&&p!==a.index)){var x=k[p],N=b[p],D=y.c2p(x)-E,B=m.c2p(N)-c,U=Math.sqrt(D*D+B*B);(s||U<f)&&(f=g=U,A=p)}return a.index=A,a.distance=f,a.dxy=g,A===void 0?[a]:[w(a,k,b,u)]}Z.exports={hoverPoints:t}}}),Cee=Ne({"src/traces/splom/select.js"(te,Z){var v=In(),w=v.pushUnique,C=vu(),P=XN();Z.exports=function(r,a){var l=r.cd,i=l[0].trace,s=l[0].t,o=r.scene,u=o.matrixOptions.cdata,d=r.xaxis,h=r.yaxis,y=[];if(!o)return y;var m=!C.hasMarkers(i)&&!C.hasText(i);if(i.visible!==!0||m)return y;var E=P.getDimIndex(i,d),c=P.getDimIndex(i,h);if(E===!1||c===!1)return y;var _=s.xpx[E],T=s.ypx[c],M=u[E],k=u[c],b=(r.scene.selectBatch||[]).slice(),A=[];if(a!==!1&&!a.degenerate)for(var g=0;g<M.length;g++)a.contains([_[g],T[g]],null,g,r)?(y.push({pointNumber:g,x:M[g],y:k[g]}),w(b,g)):b.indexOf(g)!==-1?w(b,g):A.push(g);var f=o.matrixOptions;return!b.length&&!A.length?o.matrix.update(f,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,v.extendFlat({},f,o.selectedOptions,o.viewOpts)),o.selectBatch=b,o.unselectBatch=A,y}}}),kee=Ne({"src/traces/splom/edit_style.js"(te,Z){var v=In(),w=Wp(),C=y3().markerStyle;Z.exports=function(t,r){var a=r.trace,l=t._fullLayout._splomScenes[a.uid];if(l){w(t,a),v.extendFlat(l.matrixOptions,C(t,a));var i=v.extendFlat({},l.matrixOptions,l.viewOpts);l.matrix.update(i,null)}}}}),Pee=Ne({"src/traces/splom/base_index.js"(te,Z){var v=Xo(),w=EA();Z.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:GN(),supplyDefaults:_ee(),colorbar:ah(),calc:bee(),plot:Eee(),hoverPoints:Mee().hoverPoints,selectPoints:Cee(),editStyle:kee(),meta:{}},v.register(w)}}),Lee=Ne({"src/traces/splom/base_plot.js"(te,Z){var v=DN(),w=Xo(),C=RR(),P=iv().getModuleCalcData,t=Lh(),r=Hf().getFromId,a=Os().shouldShowZeroLine,l="splom",i={};function s(m){var E=m._fullLayout,c=w.getModule(l),_=P(m.calcdata,c)[0],T=C(m,["ANGLE_instanced_arrays","OES_element_index_uint"],i);T&&(E._hasOnlyLargeSploms&&d(m),c.plot(m,{},_))}function o(m){var E=m.calcdata,c=m._fullLayout;c._hasOnlyLargeSploms&&d(m);for(var _=0;_<E.length;_++){var T=E[_][0],M=T.trace,k=c._splomScenes[M.uid];M.type==="splom"&&k&&k.matrix&&u(m,M,k)}}function u(m,E,c){for(var _=c.matrixOptions.data.length,T=E._visibleDims,M=c.viewOpts.ranges=new Array(_),k=0;k<T.length;k++){var b=T[k],A=M[k]=new Array(4),g=r(m,E._diag[b][0]);g&&(A[0]=g.r2l(g.range[0]),A[2]=g.r2l(g.range[1]));var f=r(m,E._diag[b][1]);f&&(A[1]=f.r2l(f.range[0]),A[3]=f.r2l(f.range[1]))}c.selectBatch.length||c.unselectBatch.length?c.matrix.update({ranges:M},{ranges:M}):c.matrix.update({ranges:M})}function d(m){var E=m._fullLayout,c=E._glcanvas.data()[0].regl,_=E._splomGrid;_||(_=E._splomGrid=v(c)),_.update(h(m))}function h(m){var E=m._context.plotGlPixelRatio,c=m._fullLayout,_=c._size,T=[0,0,c.width*E,c.height*E],M={},k;function b(J,le,ye,de,me,W){ye*=E,de*=E,me*=E,W*=E;var ie=le[J+"color"],se=le[J+"width"],ee=String(ie+se);ee in M?M[ee].data.push(NaN,NaN,ye,de,me,W):M[ee]={data:[ye,de,me,W],join:"rect",thickness:se*E,color:ie,viewport:T,range:T,overlay:!1}}for(k in c._splomSubplots){var A=c._plots[k],g=A.xaxis,f=A.yaxis,p=g._gridVals,x=f._gridVals,N=g._offset,D=g._length,B=f._length,U=_.b+f.domain[0]*_.h,V=-f._m,q=-V*f.r2l(f.range[0],f.calendar),z,H;if(g.showgrid)for(k=0;k<p.length;k++)z=N+g.l2p(p[k].x),b("grid",g,z,U,z,U+B);if(f.showgrid)for(k=0;k<x.length;k++)H=U+q+V*x[k].x,b("grid",f,N,H,N+D,H);a(m,g,f)&&(z=N+g.l2p(0),b("zeroline",g,z,U,z,U+B)),a(m,f,g)&&(H=U+q+0,b("zeroline",f,N,H,N+D,H))}var G=[];for(k in M)G.push(M[k]);return G}function y(m,E,c,_){var T={},M;if(_._splomScenes){for(M=0;M<m.length;M++){var k=m[M];k.type==="splom"&&(T[k.uid]=1)}for(M=0;M<c.length;M++){var b=c[M];if(!T[b.uid]){var A=_._splomScenes[b.uid];A&&A.destroy&&A.destroy(),_._splomScenes[b.uid]=null,delete _._splomScenes[b.uid]}}}Object.keys(_._splomScenes||{}).length===0&&delete _._splomScenes,_._splomGrid&&!E._hasOnlyLargeSploms&&_._hasOnlyLargeSploms&&(_._splomGrid.destroy(),_._splomGrid=null,delete _._splomGrid),t.clean(m,E,c,_)}Z.exports={name:l,attr:t.attr,attrRegex:t.attrRegex,layoutAttributes:t.layoutAttributes,supplyLayoutDefaults:t.supplyLayoutDefaults,drawFramework:t.drawFramework,plot:s,drag:o,updateGrid:d,clean:y,updateFx:t.updateFx,toSVG:t.toSVG,reglPrecompiled:i}}}),Ree=Ne({"src/traces/splom/index.js"(te,Z){var v=Pee();v.basePlotModule=Lee(),Z.exports=v}}),Iee=Ne({"lib/splom.js"(te,Z){Z.exports=Ree()}}),WN=Ne({"src/traces/parcoords/attributes.js"(te,Z){var v=Vu(),w=wd(),C=$o(),P=Oc().attributes,t=co().extendFlat,r=Tu().templatedArray;Z.exports={domain:P({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C({editType:"plot"}),tickfont:C({autoShadowDflt:!0,editType:"plot"}),rangefont:C({editType:"plot"}),dimensions:r("dimension",{label:{valType:"string",editType:"plot"},tickvals:t({},w.tickvals,{editType:"plot"}),ticktext:t({},w.ticktext,{editType:"plot"}),tickformat:t({},w.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:t({editType:"calc"},v("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"}}}}),h6=Ne({"src/traces/parcoords/constants.js"(te,Z){Z.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"}}}}),a1=Ne({"src/lib/gup.js"(te,Z){var v=O0();function w(C){return[C]}Z.exports={keyFun:function(C){return C.key},repeat:w,descend:v,wrap:w,unwrap:function(C){return C[0]}}}}),YN=Ne({"src/traces/parcoords/axisbrush.js"(te,Z){var v=h6(),w=xn(),C=a1().keyFun,P=a1().repeat,t=In().sorterAsc,r=In().strTranslate,a=v.bar.snapRatio;function l(G,J){return G*(1-a)+J*a}var i=v.bar.snapClose;function s(G,J){return G*(1-i)+J*i}function o(G,J,le,ye){if(u(le,ye))return le;var de=G?-1:1,me=0,W=J.length-1;if(de<0){var ie=me;me=W,W=ie}for(var se=J[me],ee=se,pe=me;de*pe<de*W;pe+=de){var oe=pe+de,Y=J[oe];if(de*le<de*s(se,Y))return l(se,ee);if(de*le<de*Y||oe===W)return l(Y,se);ee=se,se=Y}}function u(G,J){for(var le=0;le<J.length;le++)if(G>=J[le][0]&&G<=J[le][1])return!0;return!1}function d(G){G.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function h(G){G.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(G){if(!G.brush.filterSpecified)return"0,"+G.height;for(var J=m(G.brush.filter.getConsolidated(),G.height),le=[0],ye,de,me,W=J.length?J[0][0]:null,ie=0;ie<J.length;ie++)ye=J[ie],de=ye[1]-ye[0],le.push(W),le.push(de),me=ie+1,me<J.length&&(W=J[me][0]-ye[1]);return le.push(G.height),le}function m(G,J){return G.map(function(le){return le.map(function(ye){return Math.max(0,ye*J)}).sort(t)})}function E(G,J){var le=v.bar.handleHeight;if(!(J>G[1]+le||J<G[0]-le))return J>=.9*G[1]+.1*G[0]?"n":J<=.9*G[0]+.1*G[1]?"s":"ns"}function c(){w.select(document.body).style("cursor",null)}function _(G){G.attr("stroke-dasharray",y)}function T(G,J){var le=w.select(G).selectAll(".highlight, .highlight-shadow"),ye=J?le.transition().duration(v.bar.snapDuration).each("end",J):le;_(ye)}function M(G,J){var le=G.brush,ye=le.filterSpecified,de=NaN,me={},W;if(ye){var ie=G.height,se=le.filter.getConsolidated(),ee=m(se,ie),pe=NaN,oe=NaN,Y=NaN;for(W=0;W<=ee.length;W++){var ce=ee[W];if(ce&&ce[0]<=J&&J<=ce[1]){pe=W;break}else if(oe=W?W-1:NaN,ce&&ce[0]>J){Y=W;break}}if(de=pe,isNaN(de)&&(isNaN(oe)||isNaN(Y)?de=isNaN(oe)?Y:oe:de=J-ee[oe][1]<ee[Y][0]-J?oe:Y),!isNaN(de)){var ue=ee[de],_e=E(ue,J);_e&&(me.interval=se[de],me.intervalPix=ue,me.region=_e)}}if(G.ordinal&&!me.region){var Le=G.unitTickvals,ze=G.unitToPaddedPx.invert(J);for(W=0;W<Le.length;W++){var Ge=[Le[Math.max(W-1,0)]*.25+Le[W]*.75,Le[Math.min(W+1,Le.length-1)]*.25+Le[W]*.75];if(ze>=Ge[0]&&ze<=Ge[1]){me.clickableOrdinalRange=Ge;break}}}return me}function k(G,J){w.event.sourceEvent.stopPropagation();var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ye=J.unitToPaddedPx.invert(le),de=J.brush,me=M(J,le),W=me.interval,ie=de.svgBrush;if(ie.wasDragged=!1,ie.grabbingBar=me.region==="ns",ie.grabbingBar){var se=W.map(J.unitToPaddedPx);ie.grabPoint=le-se[0]-v.verticalPadding,ie.barLength=se[1]-se[0]}ie.clickableOrdinalRange=me.clickableOrdinalRange,ie.stayingIntervals=J.multiselect&&de.filterSpecified?de.filter.getConsolidated():[],W&&(ie.stayingIntervals=ie.stayingIntervals.filter(function(ee){return ee[0]!==W[0]&&ee[1]!==W[1]})),ie.startExtent=me.region?W[me.region==="s"?1:0]:ye,J.parent.inBrushDrag=!0,ie.brushStartCallback()}function b(G,J){w.event.sourceEvent.stopPropagation();var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ye=J.brush.svgBrush;ye.wasDragged=!0,ye._dragging=!0,ye.grabbingBar?ye.newExtent=[le-ye.grabPoint,le+ye.barLength-ye.grabPoint].map(J.unitToPaddedPx.invert):ye.newExtent=[ye.startExtent,J.unitToPaddedPx.invert(le)].sort(t),J.brush.filterSpecified=!0,ye.extent=ye.stayingIntervals.concat([ye.newExtent]),ye.brushCallback(J),T(G.parentNode)}function A(G,J){var le=J.brush,ye=le.filter,de=le.svgBrush;de._dragging||(g(G,J),b(G,J),J.brush.svgBrush.wasDragged=!1),de._dragging=!1;var me=w.event;me.sourceEvent.stopPropagation();var W=de.grabbingBar;if(de.grabbingBar=!1,de.grabLocation=void 0,J.parent.inBrushDrag=!1,c(),!de.wasDragged){de.wasDragged=void 0,de.clickableOrdinalRange?le.filterSpecified&&J.multiselect?de.extent.push(de.clickableOrdinalRange):(de.extent=[de.clickableOrdinalRange],le.filterSpecified=!0):W?(de.extent=de.stayingIntervals,de.extent.length===0&&B(le)):B(le),de.brushCallback(J),T(G.parentNode),de.brushEndCallback(le.filterSpecified?ye.getConsolidated():[]);return}var ie=function(){ye.set(ye.getConsolidated())};if(J.ordinal){var se=J.unitTickvals;se[se.length-1]<se[0]&&se.reverse(),de.newExtent=[o(0,se,de.newExtent[0],de.stayingIntervals),o(1,se,de.newExtent[1],de.stayingIntervals)];var ee=de.newExtent[1]>de.newExtent[0];de.extent=de.stayingIntervals.concat(ee?[de.newExtent]:[]),de.extent.length||B(le),de.brushCallback(J),ee?T(G.parentNode,ie):(ie(),T(G.parentNode))}else ie();de.brushEndCallback(le.filterSpecified?ye.getConsolidated():[])}function g(G,J){var le=J.height-w.mouse(G)[1]-2*v.verticalPadding,ye=M(J,le),de="crosshair";ye.clickableOrdinalRange?de="pointer":ye.region&&(de=ye.region+"-resize"),w.select(document.body).style("cursor",de)}function f(G){G.on("mousemove",function(J){w.event.preventDefault(),J.parent.inBrushDrag||g(this,J)}).on("mouseleave",function(J){J.parent.inBrushDrag||c()}).call(w.behavior.drag().on("dragstart",function(J){k(this,J)}).on("drag",function(J){b(this,J)}).on("dragend",function(J){A(this,J)}))}function p(G,J){return G[0]-J[0]}function x(G,J,le){var ye=le._context.staticPlot,de=G.selectAll(".background").data(P);de.enter().append("rect").classed("background",!0).call(d).call(h).style("pointer-events",ye?"none":"auto").attr("transform",r(0,v.verticalPadding)),de.call(f).attr("height",function(ie){return ie.height-v.verticalPadding});var me=G.selectAll(".highlight-shadow").data(P);me.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",J).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),me.attr("y1",function(ie){return ie.height}).call(_);var W=G.selectAll(".highlight").data(P);W.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),W.attr("y1",function(ie){return ie.height}).call(_)}function N(G,J,le){var ye=G.selectAll("."+v.cn.axisBrush).data(P,C);ye.enter().append("g").classed(v.cn.axisBrush,!0),x(ye,J,le)}function D(G){return G.svgBrush.extent.map(function(J){return J.slice()})}function B(G){G.filterSpecified=!1,G.svgBrush.extent=[[-1/0,1/0]]}function U(G){return function(le){var ye=le.brush,de=D(ye),me=de.slice();ye.filter.set(me),G()}}function V(G){for(var J=G.slice(),le=[],ye,de=J.shift();de;){for(ye=de.slice();(de=J.shift())&&de[0]<=ye[1];)ye[1]=Math.max(ye[1],de[1]);le.push(ye)}return le.length===1&&le[0][0]>le[0][1]&&(le=[]),le}function q(){var G=[],J,le;return{set:function(ye){G=ye.map(function(de){return de.slice().sort(t)}).sort(p),G.length===1&&G[0][0]===-1/0&&G[0][1]===1/0&&(G=[[0,-1]]),J=V(G),le=G.reduce(function(de,me){return[Math.min(de[0],me[0]),Math.max(de[1],me[1])]},[1/0,-1/0])},get:function(){return G.slice()},getConsolidated:function(){return J},getBounds:function(){return le}}}function z(G,J,le,ye,de,me){var W=q();return W.set(le),{filter:W,filterSpecified:J,svgBrush:{extent:[],brushStartCallback:ye,brushCallback:U(de),brushEndCallback:me}}}function H(G,J){if(Array.isArray(G[0])?(G=G.map(function(ye){return ye.sort(t)}),J.multiselect?G=V(G.sort(p)):G=[G[0]]):G=[G.sort(t)],J.tickvals){var le=J.tickvals.slice().sort(t);if(G=G.map(function(ye){var de=[o(0,le,ye[0],[]),o(1,le,ye[1],[])];if(de[1]>de[0])return de}).filter(function(ye){return ye}),!G.length)return}return G.length>1?G:G[0]}Z.exports={makeBrush:z,ensureAxisBrush:N,cleanRanges:H}}}),Dee=Ne({"src/traces/parcoords/defaults.js"(te,Z){var v=In(),w=Od().hasColorscale,C=Ph(),P=Oc().defaults,t=zd(),r=Os(),a=WN(),l=YN(),i=h6().maxDimensionCount,s=IR();function o(d,h,y,m,E){var c=E("line.color",y);if(w(d,"line")&&v.isArrayOrTypedArray(c)){if(c.length)return E("line.colorscale"),C(d,h,m,E,{prefix:"line.",cLetter:"c"}),c.length;h.line.color=y}return 1/0}function u(d,h,y,m){function E(k,b){return v.coerce(d,h,a.dimensions,k,b)}var c=E("values"),_=E("visible");if(c&&c.length||(_=h.visible=!1),_){E("label"),E("tickvals"),E("ticktext"),E("tickformat");var T=E("range");h._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:T},r.setConvert(h._ax,m.layout),E("multiselect");var M=E("constraintrange");M&&(h.constraintrange=l.cleanRanges(M,h))}}Z.exports=function(h,y,m,E){function c(b,A){return v.coerce(h,y,a,b,A)}var _=h.dimensions;Array.isArray(_)&&_.length>i&&(v.log("parcoords traces support up to "+i+" dimensions at the moment"),_.splice(i));var T=t(h,y,{name:"dimensions",layout:E,handleItemDefaults:u}),M=o(h,y,m,E,c);P(y,E,c),(!Array.isArray(T)||!T.length)&&(y.visible=!1),s(y,T,"values",M);var k=v.extendFlat({},E.font,{size:Math.round(E.font.size/1.2)});v.coerceFont(c,"labelfont",k),v.coerceFont(c,"tickfont",k,{autoShadowDflt:!0}),v.coerceFont(c,"rangefont",k),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}}}),Oee=Ne({"src/traces/parcoords/calc.js"(te,Z){var v=In().isArrayOrTypedArray,w=Dc(),C=a1().wrap;Z.exports=function(r,a){var l,i;return w.hasColorscale(a,"line")&&v(a.line.color)?(l=a.line.color,i=w.extractOpts(a.line).colorscale,w.calc(r,a,{vals:l,containerStr:"line",cLetter:"c"})):(l=P(a._length),i=[[0,a.line.color],[1,a.line.color]]),C({lineColor:l,cscale:i})};function P(t){for(var r=new Array(t),a=0;a<t;a++)r[a]=.5;return r}}});function zee(te){var Z,v,w,C=[],P=1,t;if(typeof te=="number")return{space:"rgb",values:[te>>>16,(te&65280)>>>8,te&255],alpha:1};if(typeof te=="number")return{space:"rgb",values:[te>>>16,(te&65280)>>>8,te&255],alpha:1};if(te=String(te).toLowerCase(),DR.default[te])C=DR.default[te].slice(),t="rgb";else if(te==="transparent")P=0,t="rgb",C=[0,0,0];else if(te[0]==="#"){var r=te.slice(1),a=r.length,l=a<=4;P=1,l?(C=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],a===4&&(P=parseInt(r[3]+r[3],16)/255)):(C=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],a===8&&(P=parseInt(r[6]+r[7],16)/255)),C[0]||(C[0]=0),C[1]||(C[1]=0),C[2]||(C[2]=0),t="rgb"}else if(w=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(te)){var i=w[1];t=i.replace(/a$/,"");var s=t==="cmyk"?4:t==="gray"?1:3;C=w[2].trim().split(/\s*[,\/]\s*|\s+/),t==="color"&&(t=C.shift()),C=C.map(function(o,u){if(o[o.length-1]==="%")return o=parseFloat(o)/100,u===3?o:t==="rgb"?o*255:t[0]==="h"||t[0]==="l"&&!u?o*100:t==="lab"?o*125:t==="lch"?u<2?o*150:o*360:t[0]==="o"&&!u?o:t==="oklab"?o*.4:t==="oklch"?u<2?o*.4:o*360:o;if(t[u]==="h"||u===2&&t[t.length-1]==="h"){if(OR[o]!==void 0)return OR[o];if(o.endsWith("deg"))return parseFloat(o);if(o.endsWith("turn"))return parseFloat(o)*360;if(o.endsWith("grad"))return parseFloat(o)*360/400;if(o.endsWith("rad"))return parseFloat(o)*180/Math.PI}return o==="none"?0:parseFloat(o)}),P=C.length>s?C.pop():1}else/[0-9](?:\s|\/|,)/.test(te)&&(C=te.match(/([0-9]+)/g).map(function(o){return parseFloat(o)}),t=((v=(Z=te.match(/([a-z])/ig))==null?void 0:Z.join(""))==null?void 0:v.toLowerCase())||"rgb");return{space:t,values:C,alpha:P}}var DR,ZN,OR,Nee=jr({"node_modules/color-parse/index.js"(){DR=Lr(K9()),ZN=zee,OR={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),d6,$N=jr({"node_modules/color-space/rgb.js"(){d6={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),v6,Fee=jr({"node_modules/color-space/hsl.js"(){$N(),v6={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(te){var Z=te[0]/360,v=te[1]/100,w=te[2]/100,C,P,t,r,a,l=0;if(v===0)return a=w*255,[a,a,a];for(P=w<.5?w*(1+v):w+v-w*v,C=2*w-P,r=[0,0,0];l<3;)t=Z+1/3*-(l-1),t<0?t++:t>1&&t--,a=6*t<1?C+(P-C)*6*t:2*t<1?P:3*t<2?C+(P-C)*(2/3-t)*6:C,r[l++]=a*255;return r}},d6.hsl=function(te){var Z=te[0]/255,v=te[1]/255,w=te[2]/255,C=Math.min(Z,v,w),P=Math.max(Z,v,w),t=P-C,r,a,l;return P===C?r=0:Z===P?r=(v-w)/t:v===P?r=2+(w-Z)/t:w===P&&(r=4+(Z-v)/t),r=Math.min(r*60,360),r<0&&(r+=360),l=(C+P)/2,P===C?a=0:l<=.5?a=t/(P+C):a=t/(2-P-C),[r,a*100,l*100]}}}),KN={};an(KN,{default:()=>Bee});function Bee(te){Array.isArray(te)&&te.raw&&(te=String.raw(...arguments)),te instanceof Number&&(te=+te);var Z,v=ZN(te);if(!v.space)return[];const w=v.space[0]==="h"?v6.min:d6.min,C=v.space[0]==="h"?v6.max:d6.max;return Z=Array(3),Z[0]=Math.min(Math.max(v.values[0],w[0]),C[0]),Z[1]=Math.min(Math.max(v.values[1],w[1]),C[1]),Z[2]=Math.min(Math.max(v.values[2],w[2]),C[2]),v.space[0]==="h"&&(Z=v6.rgb(Z)),Z.push(Math.min(Math.max(v.alpha,0),1)),Z}var jee=jr({"node_modules/color-rgba/index.js"(){Nee(),$N(),Fee()}}),JN=Ne({"src/traces/parcoords/helpers.js"(te){var Z=In().isTypedArray;te.convertTypedArray=function(v){return Z(v)?Array.prototype.slice.call(v):v},te.isOrdinal=function(v){return!!v.tickvals},te.isVisible=function(v){return v.visible||!("visible"in v)}}}),Uee=Ne({"src/traces/parcoords/lines.js"(te,Z){var v=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,","               p17_20, p21_24, p25_28, p29_32,","               p33_36, p37_40, p41_44, p45_48,","               p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,","             loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick    = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {","    return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {","    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);","    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);","    return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {","    return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {","    return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {","    return (","        fOutside(p[0], lo[0], hi[0]) ||","        fOutside(p[1], lo[1], hi[1]) ||","        fOutside(p[2], lo[2], hi[2]) ||","        fOutside(p[3], lo[3], hi[3])","    );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {","    return (","        vOutside(p[0], lo[0], hi[0]) ||","        vOutside(p[1], lo[1], hi[1]) ||","        vOutside(p[2], lo[2], hi[2]) ||","        vOutside(p[3], lo[3], hi[3])","    );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {","    return mOutside(A, loA, hiA) ||","           mOutside(B, loB, hiB) ||","           mOutside(C, loC, hiC) ||","           mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {","    mat4 pnts[4];","    pnts[0] = A;","    pnts[1] = B;","    pnts[2] = C;","    pnts[3] = D;","","    for(int i = 0; i < 4; ++i) {","        for(int j = 0; j < 4; ++j) {","            for(int k = 0; k < 4; ++k) {","                if(0 == iMod(","                    int(255.0 * texture2D(maskTexture,","                        vec2(","                            (float(i * 2 + j / 2) + 0.5) / 8.0,","                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight","                        ))[3]","                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),","                    2","                )) return true;","            }","        }","    }","    return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {","    float x = 0.5 * sign(v) + 0.5;","    float y = axisY(x, A, B, C, D);","    float z = 1.0 - abs(v);","","    z += isContext ? 0.0 : 2.0 * float(","        outsideBoundingBox(A, B, C, D) ||","        outsideRasterMask(A, B, C, D)","    );","","    return vec4(","        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,","        z,","        1.0","    );","}","","void main() {","    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);","    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);","    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);","    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);","","    float v = colors[3];","","    gl_Position = position(isContext, v, A, B, C, D);","","    fragColor =","        isContext ? vec4(contextColor) :","        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(`
`),w=["precision highp float;","","varying vec4 fragColor;","","void main() {","    gl_FragColor = fragColor;","}"].join(`
`),C=h6().maxDimensionCount,P=In(),t=1e-6,r=2048,a=new Uint8Array(4),l=new Uint8Array(4),i={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function s(A){A.read({x:0,y:0,width:1,height:1,data:a})}function o(A,g,f,p,x){var N=A._gl;N.enable(N.SCISSOR_TEST),N.scissor(g,f,p,x),A.clear({color:[0,0,0,0],depth:1})}function u(A,g,f,p,x,N){var D=N.key;function B(U){var V=Math.min(p,x-U*p);U===0&&(window.cancelAnimationFrame(f.currentRafs[D]),delete f.currentRafs[D],o(A,N.scissorX,N.scissorY,N.scissorWidth,N.viewBoxSize[1])),!f.clearOnly&&(N.count=2*V,N.offset=2*U*p,g(N),U*p+V<x&&(f.currentRafs[D]=window.requestAnimationFrame(function(){B(U+1)})),f.drawCompleted=!1)}f.drawCompleted||(s(A),f.drawCompleted=!0),B(0)}function d(A){return Math.max(t,Math.min(1-t,A))}function h(A,g){for(var f=new Array(256),p=0;p<256;p++)f[p]=A(p/255).concat(g);return f}function y(A,g){return(A>>>8*g)%256/255}function m(A,g,f){for(var p=new Array(A*(C+4)),x=0,N=0;N<A;N++){for(var D=0;D<C;D++)p[x++]=D<g.length?g[D].paddedUnitValues[N]:.5;p[x++]=y(N,2),p[x++]=y(N,1),p[x++]=y(N,0),p[x++]=d(f[N])}return p}function E(A,g,f){for(var p=new Array(g*8),x=0,N=0;N<g;N++)for(var D=0;D<2;D++)for(var B=0;B<4;B++){var U=A*4+B,V=f[N*64+U];U===63&&D===0&&(V*=-1),p[x++]=V}return p}function c(A){var g="0"+A;return g.substr(g.length-2)}function _(A){return A<C?"p"+c(A+1)+"_"+c(A+4):"colors"}function T(A,g,f){for(var p=0;p<=C;p+=4)A[_(p)](E(p/4,g,f))}function M(A){for(var g={},f=0;f<=C;f+=4)g[_(f)]=A.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return g}function k(A,g,f,p,x,N,D,B,U,V,q,z,H,G){for(var J=[[],[]],le=0;le<64;le++)J[0][le]=le===x?1:0,J[1][le]=le===N?1:0;D*=G,B*=G,U*=G,V*=G;var ye=A.lines.canvasOverdrag*G,de=A.domain,me=A.canvasWidth*G,W=A.canvasHeight*G,ie=A.pad.l*G,se=A.pad.b*G,ee=A.layoutHeight*G,pe=A.layoutWidth*G,oe=A.deselectedLines.color,Y=A.deselectedLines.opacity,ce=P.extendFlat({key:q,resolution:[me,W],viewBoxPos:[D+ye,B],viewBoxSize:[U,V],i0:x,i1:N,dim0A:J[0].slice(0,16),dim0B:J[0].slice(16,32),dim0C:J[0].slice(32,48),dim0D:J[0].slice(48,64),dim1A:J[1].slice(0,16),dim1B:J[1].slice(16,32),dim1C:J[1].slice(32,48),dim1D:J[1].slice(48,64),drwLayer:z,contextColor:[oe[0]/255,oe[1]/255,oe[2]/255,Y!=="auto"?oe[3]*Y:Math.max(1/255,Math.pow(1/A.lines.color.length,1/3))],scissorX:(p===g?0:D+ye)+(ie-ye)+pe*de.x[0],scissorWidth:(p===f?me-D+ye:U+.5)+(p===g?D+ye:0),scissorY:B+se+ee*de.y[0],scissorHeight:V,viewportX:ie-ye+pe*de.x[0],viewportY:se+ee*de.y[0],viewportWidth:me,viewportHeight:W},H);return ce}function b(A){var g=r-1,f=Math.max(0,Math.floor(A[0]*g),0),p=Math.min(g,Math.ceil(A[1]*g),g);return[Math.min(f,p),Math.max(f,p)]}Z.exports=function(A,g){var f=g.context,p=g.pick,x=g.regl,N=x._gl,D=N.getParameter(N.ALIASED_LINE_WIDTH_RANGE),B=Math.max(D[0],Math.min(D[1],g.viewModel.plotGlPixelRatio)),U={currentRafs:{},drawCompleted:!0,clearOnly:!1},V,q,z,H,G=M(x),J,le=x.texture(i),ye=[];me(g);var de=x({profile:!1,blend:{enable:f,func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:1,dstAlpha:1},equation:{rgb:"add",alpha:"add"},color:[0,0,0,0]},depth:{enable:!f,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:x.prop("scissorX"),y:x.prop("scissorY"),width:x.prop("scissorWidth"),height:x.prop("scissorHeight")}},viewport:{x:x.prop("viewportX"),y:x.prop("viewportY"),width:x.prop("viewportWidth"),height:x.prop("viewportHeight")},dither:!1,vert:v,frag:w,primitive:"lines",lineWidth:B,attributes:G,uniforms:{resolution:x.prop("resolution"),viewBoxPos:x.prop("viewBoxPos"),viewBoxSize:x.prop("viewBoxSize"),dim0A:x.prop("dim0A"),dim1A:x.prop("dim1A"),dim0B:x.prop("dim0B"),dim1B:x.prop("dim1B"),dim0C:x.prop("dim0C"),dim1C:x.prop("dim1C"),dim0D:x.prop("dim0D"),dim1D:x.prop("dim1D"),loA:x.prop("loA"),hiA:x.prop("hiA"),loB:x.prop("loB"),hiB:x.prop("hiB"),loC:x.prop("loC"),hiC:x.prop("hiC"),loD:x.prop("loD"),hiD:x.prop("hiD"),palette:le,contextColor:x.prop("contextColor"),maskTexture:x.prop("maskTexture"),drwLayer:x.prop("drwLayer"),maskHeight:x.prop("maskHeight")},offset:x.prop("offset"),count:x.prop("count")});function me(oe){V=oe.model,q=oe.viewModel,z=q.dimensions.slice(),H=z[0]?z[0].values.length:0;var Y=V.lines,ce=p?Y.color.map(function(_e,Le){return Le/Y.color.length}):Y.color,ue=m(H,z,ce);T(G,H,ue),!f&&!p&&(le=x.texture(P.extendFlat({data:h(V.unitToColor,255)},i)))}function W(oe){var Y,ce,ue,_e=[[],[]];for(ue=0;ue<64;ue++){var Le=!oe&&ue<z.length?z[ue].brush.filter.getBounds():[-1/0,1/0];_e[0][ue]=Le[0],_e[1][ue]=Le[1]}var ze=r*8,Ge=new Array(ze);for(Y=0;Y<ze;Y++)Ge[Y]=255;if(!oe)for(Y=0;Y<z.length;Y++){var Ve=Y%8,rt=(Y-Ve)/8,pt=Math.pow(2,Ve),gt=z[Y],ht=gt.brush.filter.get();if(!(ht.length<2)){var lt=b(ht[0])[1];for(ce=1;ce<ht.length;ce++){var Fe=b(ht[ce]);for(ue=lt+1;ue<Fe[0];ue++)Ge[ue*8+rt]&=~pt;lt=Math.max(lt,Fe[1])}}}var Pe={shape:[8,r],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:Ge};return J?J(Pe):J=x.texture(Pe),{maskTexture:J,maskHeight:r,loA:_e[0].slice(0,16),loB:_e[0].slice(16,32),loC:_e[0].slice(32,48),loD:_e[0].slice(48,64),hiA:_e[1].slice(0,16),hiB:_e[1].slice(16,32),hiC:_e[1].slice(32,48),hiD:_e[1].slice(48,64)}}function ie(oe,Y,ce){var ue=oe.length,_e,Le,ze,Ge=1/0,Ve=-1/0;for(_e=0;_e<ue;_e++)oe[_e].dim0.canvasX<Ge&&(Ge=oe[_e].dim0.canvasX,Le=_e),oe[_e].dim1.canvasX>Ve&&(Ve=oe[_e].dim1.canvasX,ze=_e);ue===0&&o(x,0,0,V.canvasWidth,V.canvasHeight);var rt=W(f);for(_e=0;_e<ue;_e++){var pt=oe[_e],gt=pt.dim0.crossfilterDimensionIndex,ht=pt.dim1.crossfilterDimensionIndex,lt=pt.canvasX,Fe=pt.canvasY,Pe=lt+pt.panelSizeX,be=pt.plotGlPixelRatio;if(Y||!ye[gt]||ye[gt][0]!==lt||ye[gt][1]!==Pe){ye[gt]=[lt,Pe];var Ye=k(V,Le,ze,_e,gt,ht,lt,Fe,pt.panelSizeX,pt.panelSizeY,pt.dim0.crossfilterDimensionIndex,f?0:p?2:1,rt,be);U.clearOnly=ce;var mt=Y?V.lines.blockLineCount:H;u(x,de,U,mt,H,Ye)}}}function se(oe,Y){return x.read({x:oe,y:Y,width:1,height:1,data:l}),l}function ee(oe,Y,ce,ue){var _e=new Uint8Array(4*ce*ue);return x.read({x:oe,y:Y,width:ce,height:ue,data:_e}),_e}function pe(){A.style["pointer-events"]="none",le.destroy(),J&&J.destroy();for(var oe in G)G[oe].destroy()}return{render:ie,readPixel:se,readPixels:ee,destroy:pe,update:me}}}}),qee=Ne({"src/traces/parcoords/parcoords.js"(te,Z){var v=xn(),w=In(),C=w.isArrayOrTypedArray,P=w.numberFormat,t=(jee(),$r(KN)).default,r=Os(),a=w.strRotate,l=w.strTranslate,i=uc(),s=zs(),o=Dc(),u=a1(),d=u.keyFun,h=u.repeat,y=u.unwrap,m=JN(),E=h6(),c=YN(),_=Uee();function T(ye,de,me){return w.aggNums(ye,null,de,me)}function M(ye,de){return b(T(Math.min,ye,de),T(Math.max,ye,de))}function k(ye){var de=ye.range;return de?b(de[0],de[1]):M(ye.values,ye._length)}function b(ye,de){return(isNaN(ye)||!isFinite(ye))&&(ye=0),(isNaN(de)||!isFinite(de))&&(de=0),ye===de&&(ye===0?(ye-=1,de+=1):(ye*=.9,de*=1.1)),[ye,de]}function A(ye,de){return de?function(me,W){var ie=de[W];return ie??ye(me)}:ye}function g(ye,de,me,W,ie){var se=k(me);return W?v.scale.ordinal().domain(W.map(A(P(me.tickformat),ie))).range(W.map(function(ee){var pe=(ee-se[0])/(se[1]-se[0]);return ye-de+pe*(2*de-ye)})):v.scale.linear().domain(se).range([ye-de,de])}function f(ye,de){return v.scale.linear().range([de,ye-de])}function p(ye,de){return v.scale.linear().domain(k(ye)).range([de,1-de])}function x(ye){if(ye.tickvals){var de=k(ye);return v.scale.ordinal().domain(ye.tickvals).range(ye.tickvals.map(function(me){return(me-de[0])/(de[1]-de[0])}))}}function N(ye){var de=ye.map(function(se){return se[0]}),me=ye.map(function(se){var ee=t(se[1]);return v.rgb("rgb("+ee[0]+","+ee[1]+","+ee[2]+")")}),W=function(se){return function(ee){return ee[se]}},ie="rgb".split("").map(function(se){return v.scale.linear().clamp(!0).domain(de).range(me.map(W(se)))});return function(se){return ie.map(function(ee){return ee(se)})}}function D(ye){return ye.dimensions.some(function(de){return de.brush.filterSpecified})}function B(ye,de,me){var W=y(de),ie=W.trace,se=m.convertTypedArray(W.lineColor),ee=ie.line,pe={color:t(ie.unselected.line.color),opacity:ie.unselected.line.opacity},oe=o.extractOpts(ee),Y=oe.reversescale?o.flipScale(W.cscale):W.cscale,ce=ie.domain,ue=ie.dimensions,_e=ye.width,Le=ie.labelangle,ze=ie.labelside,Ge=ie.labelfont,Ve=ie.tickfont,rt=ie.rangefont,pt=w.extendDeepNoArrays({},ee,{color:se.map(v.scale.linear().domain(k({values:se,range:[oe.min,oe.max],_length:ie._length}))),blockLineCount:E.blockLineCount,canvasOverdrag:E.overdrag*E.canvasPixelRatio}),gt=Math.floor(_e*(ce.x[1]-ce.x[0])),ht=Math.floor(ye.height*(ce.y[1]-ce.y[0])),lt=ye.margin||{l:80,r:80,t:100,b:80},Fe=gt,Pe=ht;return{key:me,colCount:ue.filter(m.isVisible).length,dimensions:ue,tickDistance:E.tickDistance,unitToColor:N(Y),lines:pt,deselectedLines:pe,labelAngle:Le,labelSide:ze,labelFont:Ge,tickFont:Ve,rangeFont:rt,layoutWidth:_e,layoutHeight:ye.height,domain:ce,translateX:ce.x[0]*_e,translateY:ye.height-ce.y[1]*ye.height,pad:lt,canvasWidth:Fe*E.canvasPixelRatio+2*pt.canvasOverdrag,canvasHeight:Pe*E.canvasPixelRatio,width:Fe,height:Pe,canvasPixelRatio:E.canvasPixelRatio}}function U(ye,de,me){var W=me.width,ie=me.height,se=me.dimensions,ee=me.canvasPixelRatio,pe=function(_e){return W*_e/Math.max(1,me.colCount-1)},oe=E.verticalPadding/ie,Y=f(ie,E.verticalPadding),ce={key:me.key,xScale:pe,model:me,inBrushDrag:!1},ue={};return ce.dimensions=se.filter(m.isVisible).map(function(_e,Le){var ze=p(_e,oe),Ge=ue[_e.label];ue[_e.label]=(Ge||0)+1;var Ve=_e.label+(Ge?"__"+Ge:""),rt=_e.constraintrange,pt=rt&&rt.length;pt&&!C(rt[0])&&(rt=[rt]);var gt=pt?rt.map(function(Wt){return Wt.map(ze)}):[[-1/0,1/0]],ht=function(){var Wt=ce;Wt.focusLayer&&Wt.focusLayer.render(Wt.panels,!0);var Zt=D(Wt);!ye.contextShown()&&Zt?(Wt.contextLayer&&Wt.contextLayer.render(Wt.panels,!0),ye.contextShown(!0)):ye.contextShown()&&!Zt&&(Wt.contextLayer&&Wt.contextLayer.render(Wt.panels,!0,!0),ye.contextShown(!1))},lt=_e.values;lt.length>_e._length&&(lt=lt.slice(0,_e._length));var Fe=_e.tickvals,Pe;function be(Wt,Zt){return{val:Wt,text:Pe[Zt]}}function Ye(Wt,Zt){return Wt.val-Zt.val}if(C(Fe)&&Fe.length){w.isTypedArray(Fe)&&(Fe=Array.from(Fe)),Pe=_e.ticktext,!C(Pe)||!Pe.length?Pe=Fe.map(P(_e.tickformat)):Pe.length>Fe.length?Pe=Pe.slice(0,Fe.length):Fe.length>Pe.length&&(Fe=Fe.slice(0,Pe.length));for(var mt=1;mt<Fe.length;mt++)if(Fe[mt]<Fe[mt-1]){for(var bt=Fe.map(be).sort(Ye),ft=0;ft<Fe.length;ft++)Fe[ft]=bt[ft].val,Pe[ft]=bt[ft].text;break}}else Fe=void 0;return lt=m.convertTypedArray(lt),{key:Ve,label:_e.label,tickFormat:_e.tickformat,tickvals:Fe,ticktext:Pe,ordinal:m.isOrdinal(_e),multiselect:_e.multiselect,xIndex:Le,crossfilterDimensionIndex:Le,visibleIndex:_e._index,height:ie,values:lt,paddedUnitValues:lt.map(ze),unitTickvals:Fe&&Fe.map(ze),xScale:pe,x:pe(Le),canvasX:pe(Le)*ee,unitToPaddedPx:Y,domainScale:g(ie,E.verticalPadding,_e,Fe,Pe),ordinalScale:x(_e),parent:ce,model:me,brush:c.makeBrush(ye,pt,gt,function(){ye.linePickActive(!1)},ht,function(Wt){if(ce.focusLayer.render(ce.panels,!0),ce.pickLayer&&ce.pickLayer.render(ce.panels,!0),ye.linePickActive(!0),de&&de.filterChanged){var Zt=ze.invert,cr=Wt.map(function(pr){return pr.map(Zt).sort(w.sorterAsc)}).sort(function(pr,Br){return pr[0]-Br[0]});de.filterChanged(ce.key,_e._index,cr)}})}}),ce}function V(ye){ye.classed(E.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function q(){var ye=!0,de=!1;return{linePickActive:function(me){return arguments.length?ye=!!me:ye},contextShown:function(me){return arguments.length?de=!!me:de}}}function z(ye,de){var me=de==="top"?1:-1,W=ye*Math.PI/180,ie=Math.sin(W),se=Math.cos(W);return{dir:me,dx:ie,dy:se,degrees:ye}}function H(ye,de,me){for(var W=de.panels||(de.panels=[]),ie=ye.data(),se=0;se<ie.length-1;se++){var ee=W[se]||(W[se]={}),pe=ie[se],oe=ie[se+1];ee.dim0=pe,ee.dim1=oe,ee.canvasX=pe.canvasX,ee.panelSizeX=oe.canvasX-pe.canvasX,ee.panelSizeY=de.model.canvasHeight,ee.y=0,ee.canvasY=0,ee.plotGlPixelRatio=me}}function G(ye){for(var de=0;de<ye.length;de++)for(var me=0;me<ye[de].length;me++)for(var W=ye[de][me].trace,ie=W.dimensions,se=0;se<ie.length;se++){var ee=ie[se].values,pe=ie[se]._ax;pe&&(pe.range?pe.range=b(pe.range[0],pe.range[1]):pe.range=M(ee,W._length),pe.dtick||(pe.dtick=.01*(Math.abs(pe.range[1]-pe.range[0])||1)),pe.tickformat=ie[se].tickformat,r.calcTicks(pe),pe.cleanRange())}}function J(ye,de){return r.tickText(ye._ax,de,!1).text}function le(ye,de){if(ye.ordinal)return"";var me=ye.domainScale.domain(),W=me[de?me.length-1:0];return J(ye.model.dimensions[ye.visibleIndex],W)}Z.exports=function(de,me,W,ie){var se=de._context.staticPlot,ee=de._fullLayout,pe=ee._toppaper,oe=ee._glcontainer,Y=de._context.plotGlPixelRatio,ce=de._fullLayout.paper_bgcolor;G(me);var ue=q(),_e=me.filter(function(ft){return y(ft).trace.visible}).map(B.bind(0,W)).map(U.bind(0,ue,ie));oe.each(function(ft,Wt){return w.extendFlat(ft,_e[Wt])});var Le=oe.selectAll(".gl-canvas").each(function(ft){ft.viewModel=_e[0],ft.viewModel.plotGlPixelRatio=Y,ft.viewModel.paperColor=ce,ft.model=ft.viewModel?ft.viewModel.model:null}),ze=null,Ge=Le.filter(function(ft){return ft.pick});Ge.style("pointer-events",se?"none":"auto").on("mousemove",function(ft){if(ue.linePickActive()&&ft.lineLayer&&ie&&ie.hover){var Wt=v.event,Zt=this.width,cr=this.height,pr=v.mouse(this),Br=pr[0],Fr=pr[1];if(Br<0||Fr<0||Br>=Zt||Fr>=cr)return;var cn=ft.lineLayer.readPixel(Br,cr-1-Fr),Nr=cn[3]!==0,Jr=Nr?cn[2]+256*(cn[1]+256*cn[0]):null,Dt={x:Br,y:Fr,clientX:Wt.clientX,clientY:Wt.clientY,dataIndex:ft.model.key,curveNumber:Jr};Jr!==ze&&(Nr?ie.hover(Dt):ie.unhover&&ie.unhover(Dt),ze=Jr)}}),Le.style("opacity",function(ft){return ft.pick?0:1}),pe.style("background","rgba(255, 255, 255, 0)");var Ve=pe.selectAll("."+E.cn.parcoords).data(_e,d);Ve.exit().remove(),Ve.enter().append("g").classed(E.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Ve.attr("transform",function(ft){return l(ft.model.translateX,ft.model.translateY)});var rt=Ve.selectAll("."+E.cn.parcoordsControlView).data(h,d);rt.enter().append("g").classed(E.cn.parcoordsControlView,!0),rt.attr("transform",function(ft){return l(ft.model.pad.l,ft.model.pad.t)});var pt=rt.selectAll("."+E.cn.yAxis).data(function(ft){return ft.dimensions},d);pt.enter().append("g").classed(E.cn.yAxis,!0),rt.each(function(ft){H(pt,ft,Y)}),Le.each(function(ft){if(ft.viewModel){!ft.lineLayer||ie?ft.lineLayer=_(this,ft):ft.lineLayer.update(ft),(ft.key||ft.key===0)&&(ft.viewModel[ft.key]=ft.lineLayer);var Wt=!ft.context||ie;ft.lineLayer.render(ft.viewModel.panels,Wt)}}),pt.attr("transform",function(ft){return l(ft.xScale(ft.xIndex),0)}),pt.call(v.behavior.drag().origin(function(ft){return ft}).on("drag",function(ft){var Wt=ft.parent;ue.linePickActive(!1),ft.x=Math.max(-E.overdrag,Math.min(ft.model.width+E.overdrag,v.event.x)),ft.canvasX=ft.x*ft.model.canvasPixelRatio,pt.sort(function(Zt,cr){return Zt.x-cr.x}).each(function(Zt,cr){Zt.xIndex=cr,Zt.x=ft===Zt?Zt.x:Zt.xScale(Zt.xIndex),Zt.canvasX=Zt.x*Zt.model.canvasPixelRatio}),H(pt,Wt,Y),pt.filter(function(Zt){return Math.abs(ft.xIndex-Zt.xIndex)!==0}).attr("transform",function(Zt){return l(Zt.xScale(Zt.xIndex),0)}),v.select(this).attr("transform",l(ft.x,0)),pt.each(function(Zt,cr,pr){pr===ft.parent.key&&(Wt.dimensions[cr]=Zt)}),Wt.contextLayer&&Wt.contextLayer.render(Wt.panels,!1,!D(Wt)),Wt.focusLayer.render&&Wt.focusLayer.render(Wt.panels)}).on("dragend",function(ft){var Wt=ft.parent;ft.x=ft.xScale(ft.xIndex),ft.canvasX=ft.x*ft.model.canvasPixelRatio,H(pt,Wt,Y),v.select(this).attr("transform",function(Zt){return l(Zt.x,0)}),Wt.contextLayer&&Wt.contextLayer.render(Wt.panels,!1,!D(Wt)),Wt.focusLayer&&Wt.focusLayer.render(Wt.panels),Wt.pickLayer&&Wt.pickLayer.render(Wt.panels,!0),ue.linePickActive(!0),ie&&ie.axesMoved&&ie.axesMoved(Wt.key,Wt.dimensions.map(function(Zt){return Zt.crossfilterDimensionIndex}))})),pt.exit().remove();var gt=pt.selectAll("."+E.cn.axisOverlays).data(h,d);gt.enter().append("g").classed(E.cn.axisOverlays,!0),gt.selectAll("."+E.cn.axis).remove();var ht=gt.selectAll("."+E.cn.axis).data(h,d);ht.enter().append("g").classed(E.cn.axis,!0),ht.each(function(ft){var Wt=ft.model.height/ft.model.tickDistance,Zt=ft.domainScale,cr=Zt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Wt,ft.tickFormat).tickValues(ft.ordinal?cr:null).tickFormat(function(pr){return m.isOrdinal(ft)?pr:J(ft.model.dimensions[ft.visibleIndex],pr)}).scale(Zt)),s.font(ht.selectAll("text"),ft.model.tickFont)}),ht.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ht.selectAll("text").style("cursor","default");var lt=gt.selectAll("."+E.cn.axisHeading).data(h,d);lt.enter().append("g").classed(E.cn.axisHeading,!0);var Fe=lt.selectAll("."+E.cn.axisTitle).data(h,d);Fe.enter().append("text").classed(E.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",se?"none":"auto"),Fe.text(function(ft){return ft.label}).each(function(ft){var Wt=v.select(this);s.font(Wt,ft.model.labelFont),i.convertToTspans(Wt,de)}).attr("transform",function(ft){var Wt=z(ft.model.labelAngle,ft.model.labelSide),Zt=E.axisTitleOffset;return(Wt.dir>0?"":l(0,2*Zt+ft.model.height))+a(Wt.degrees)+l(-Zt*Wt.dx,-Zt*Wt.dy)}).attr("text-anchor",function(ft){var Wt=z(ft.model.labelAngle,ft.model.labelSide),Zt=Math.abs(Wt.dx),cr=Math.abs(Wt.dy);return 2*Zt>cr?Wt.dir*Wt.dx<0?"start":"end":"middle"});var Pe=gt.selectAll("."+E.cn.axisExtent).data(h,d);Pe.enter().append("g").classed(E.cn.axisExtent,!0);var be=Pe.selectAll("."+E.cn.axisExtentTop).data(h,d);be.enter().append("g").classed(E.cn.axisExtentTop,!0),be.attr("transform",l(0,-E.axisExtentOffset));var Ye=be.selectAll("."+E.cn.axisExtentTopText).data(h,d);Ye.enter().append("text").classed(E.cn.axisExtentTopText,!0).call(V),Ye.text(function(ft){return le(ft,!0)}).each(function(ft){s.font(v.select(this),ft.model.rangeFont)});var mt=Pe.selectAll("."+E.cn.axisExtentBottom).data(h,d);mt.enter().append("g").classed(E.cn.axisExtentBottom,!0),mt.attr("transform",function(ft){return l(0,ft.model.height+E.axisExtentOffset)});var bt=mt.selectAll("."+E.cn.axisExtentBottomText).data(h,d);bt.enter().append("text").classed(E.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(V),bt.text(function(ft){return le(ft,!1)}).each(function(ft){s.font(v.select(this),ft.model.rangeFont)}),c.ensureAxisBrush(gt,ce,de)}}}),QN=Ne({"src/traces/parcoords/plot.js"(a,Z){var v=qee(),w=RR(),C=JN().isVisible,P={};function t(l,i,s){var o=i.indexOf(s),u=l.indexOf(o);return u===-1&&(u+=i.length),u}function r(l,i){return function(o,u){return t(l,i,o)-t(l,i,u)}}var a=Z.exports=function(i,s){var o=i._fullLayout,u=w(i,[],P);if(u){var d={},h={},y={},m={},E=o._size;s.forEach(function(k,b){var A=k[0].trace;y[b]=A.index;var g=m[b]=A.index;d[b]=i.data[g].dimensions,h[b]=i.data[g].dimensions.slice()});var c=function(k,b,A){var g=h[k][b],f=A.map(function(U){return U.slice()}),p="dimensions["+b+"].constraintrange",x=o._tracePreGUI[i._fullData[y[k]]._fullInput.uid];if(x[p]===void 0){var N=g.constraintrange;x[p]=N||null}var D=i._fullData[y[k]].dimensions[b];f.length?(f.length===1&&(f=f[0]),g.constraintrange=f,D.constraintrange=f.slice(),f=[f]):(delete g.constraintrange,delete D.constraintrange,f=null);var B={};B[p]=f,i.emit("plotly_restyle",[B,[m[k]]])},_=function(k){i.emit("plotly_hover",k)},T=function(k){i.emit("plotly_unhover",k)},M=function(k,b){var A=r(b,h[k].filter(C));d[k].sort(A),h[k].filter(function(g){return!C(g)}).sort(function(g){return h[k].indexOf(g)}).forEach(function(g){d[k].splice(d[k].indexOf(g),1),d[k].splice(h[k].indexOf(g),0,g)}),i.emit("plotly_restyle",[{dimensions:[d[k]]},[m[k]]])};v(i,s,{width:E.w,height:E.h,margin:{t:E.t,r:E.r,b:E.b,l:E.l}},{filterChanged:c,hover:_,unhover:T,axesMoved:M})}};a.reglPrecompiled=P}}),Vee=Ne({"src/traces/parcoords/base_plot.js"(te){var Z=xn(),v=iv().getModuleCalcData,w=QN(),C=cp();te.name="parcoords",te.plot=function(P){var t=v(P.calcdata,"parcoords")[0];t.length&&w(P,t)},te.clean=function(P,t,r,a){var l=a._has&&a._has("parcoords"),i=t._has&&t._has("parcoords");l&&!i&&(a._paperdiv.selectAll(".parcoords").remove(),a._glimages.selectAll("*").remove())},te.toSVG=function(P){var t=P._fullLayout._glimages,r=Z.select(P).selectAll(".svg-container"),a=r.filter(function(i,s){return s===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function l(){var i=this,s=i.toDataURL("image/png"),o=t.append("svg:image");o.attr({xmlns:C.svg,"xlink:href":s,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}a.each(l),window.setTimeout(function(){Z.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Hee=Ne({"src/traces/parcoords/base_index.js"(te,Z){Z.exports={attributes:WN(),supplyDefaults:Dee(),calc:Oee(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Vee(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),Gee=Ne({"src/traces/parcoords/index.js"(te,Z){var v=Hee();v.plot=QN(),Z.exports=v}}),Xee=Ne({"lib/parcoords.js"(te,Z){Z.exports=Gee()}}),eF=Ne({"src/traces/parcats/attributes.js"(te,Z){var v=co().extendFlat,w=ns(),C=$o(),P=Vu(),{hovertemplateAttrs:t,templatefallbackAttrs:r}=Il(),a=Oc().attributes,l=v({editType:"calc"},P("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:r({editType:"plot"})});Z.exports={domain:a({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},w.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:t({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:r({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:C({editType:"calc"}),tickfont:C({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:l,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}}}),Wee=Ne({"src/traces/parcats/defaults.js"(te,Z){var v=In(),w=Od().hasColorscale,C=Ph(),P=Oc().defaults,t=zd(),r=eF(),a=IR(),l=vi().isTypedArraySpec;function i(o,u,d,h,y){y("line.shape"),y("line.hovertemplate"),y("line.hovertemplatefallback");var m=y("line.color",h.colorway[0]);if(w(o,"line")&&v.isArrayOrTypedArray(m)){if(m.length)return y("line.colorscale"),C(o,u,h,y,{prefix:"line.",cLetter:"c"}),m.length;u.line.color=d}return 1/0}function s(o,u){function d(T,M){return v.coerce(o,u,r.dimensions,T,M)}var h=d("values"),y=d("visible");if(h&&h.length||(y=u.visible=!1),y){d("label"),d("displayindex",u._index);var m=o.categoryarray,E=v.isArrayOrTypedArray(m)&&m.length>0||l(m),c;E&&(c="array");var _=d("categoryorder",c);_==="array"?(d("categoryarray"),d("ticktext")):(delete o.categoryarray,delete o.ticktext),!E&&_==="array"&&(u.categoryorder="trace")}}Z.exports=function(u,d,h,y){function m(T,M){return v.coerce(u,d,r,T,M)}var E=t(u,d,{name:"dimensions",handleItemDefaults:s}),c=i(u,d,h,y,m);P(d,y,m),(!Array.isArray(E)||!E.length)&&(d.visible=!1),a(d,E,"values",c),m("hoveron"),m("hovertemplate"),m("hovertemplatefallback"),m("arrangement"),m("bundlecolors"),m("sortpaths"),m("counts");var _=y.font;v.coerceFont(m,"labelfont",_,{overrideDflt:{size:Math.round(_.size)}}),v.coerceFont(m,"tickfont",_,{autoShadowDflt:!0,overrideDflt:{size:Math.round(_.size/1.2)}})}}}),Yee=Ne({"src/traces/parcats/calc.js"(te,Z){var v=a1().wrap,w=Od().hasColorscale,C=Nd(),P=xx(),t=zs(),r=In(),a=la();Z.exports=function(_,T){var M=r.filterVisible(T.dimensions);if(M.length===0)return[];var k=M.map(function(W){var ie;if(W.categoryorder==="trace")ie=null;else if(W.categoryorder==="array")ie=W.categoryarray;else{ie=P(W.values);for(var se=!0,ee=0;ee<ie.length;ee++)if(!a(ie[ee])){se=!1;break}ie.sort(se?r.sorterAsc:void 0),W.categoryorder==="category descending"&&(ie=ie.reverse())}return h(W.values,ie)}),b,A,g;r.isArrayOrTypedArray(T.counts)?b=T.counts:b=[T.counts],y(M),M.forEach(function(W,ie){m(W,k[ie])});var f=T.line,p;f?(w(T,"line")&&C(_,T,{vals:T.line.color,containerStr:"line",cLetter:"c"}),p=t.tryColorscale(f)):p=r.identity;function x(W){var ie,se;return r.isArrayOrTypedArray(f.color)?(ie=f.color[W%f.color.length],se=ie):ie=f.color,{color:p(ie),rawColor:se}}var N=M[0].values.length,D={},B=k.map(function(W){return W.inds});g=0;var U,V;for(U=0;U<N;U++){var q=[];for(V=0;V<B.length;V++)q.push(B[V][U]);A=b[U%b.length],g+=A;var z=x(U),H=q+"-"+z.rawColor;D[H]===void 0&&(D[H]=u(q,z.color,z.rawColor)),d(D[H],U,A)}var G=M.map(function(W,ie){return i(ie,W._index,W._displayindex,W.label,g)});for(U=0;U<N;U++)for(A=b[U%b.length],V=0;V<G.length;V++){var J=G[V].containerInd,le=k[V].inds[U],ye=G[V].categories;if(ye[le]===void 0){var de=T.dimensions[J]._categoryarray[le],me=T.dimensions[J]._ticktext[le];ye[le]=s(V,le,de,me)}o(ye[le],U,A)}return v(l(G,D,g))};function l(c,_,T){var M=c.map(function(k){return k.categories.length}).reduce(function(k,b){return Math.max(k,b)});return{dimensions:c,paths:_,trace:void 0,maxCats:M,count:T}}function i(c,_,T,M,k){return{dimensionInd:c,containerInd:_,displayInd:T,dimensionLabel:M,count:k,categories:[],dragX:null}}function s(c,_,T,M){return{dimensionInd:c,categoryInd:_,categoryValue:T,displayInd:_,categoryLabel:M,valueInds:[],count:0,dragY:null}}function o(c,_,T){c.valueInds.push(_),c.count+=T}function u(c,_,T){return{categoryInds:c,color:_,rawColor:T,valueInds:[],count:0}}function d(c,_,T){c.valueInds.push(_),c.count+=T}function h(c,_){_==null?_=[]:_=_.map(function(p){return p});var T={},M={},k=[];_.forEach(function(p,x){T[p]=0,M[p]=x});for(var b=0;b<c.length;b++){var A=c[b],g;T[A]===void 0?(T[A]=1,g=_.push(A)-1,M[A]=g):(T[A]++,g=M[A]),k.push(g)}var f=_.map(function(p){return T[p]});return{uniqueValues:_,uniqueCounts:f,inds:k}}function y(c){var _=c.map(function(M){return M.displayindex}),T;if(E(_))for(T=0;T<c.length;T++)c[T]._displayindex=c[T].displayindex;else for(T=0;T<c.length;T++)c[T]._displayindex=T}function m(c,_){c._categoryarray=_.uniqueValues,c.ticktext===null||c.ticktext===void 0?c._ticktext=[]:c._ticktext=c.ticktext.slice();for(var T=c._ticktext.length;T<_.uniqueValues.length;T++)c._ticktext.push(_.uniqueValues[T])}function E(c){for(var _=new Array(c.length),T=0;T<c.length;T++){if(c[T]<0||c[T]>=c.length||_[c[T]]!==void 0)return!1;_[c[T]]=!0}return!0}}}),Zee=Ne({"src/traces/parcats/parcats.js"(te,Z){var v=xn(),w=(bo(),$r(Ui)).interpolateNumber,C=Uw(),P=nh(),t=In(),r=t.strTranslate,a=zs(),l=Ro(),i=uc();function s(ee,pe,oe,Y){var ce=pe._context.staticPlot,ue=ee.map(de.bind(0,pe,oe)),_e=Y.selectAll("g.parcatslayer").data([null]);_e.enter().append("g").attr("class","parcatslayer").style("pointer-events",ce?"none":"all");var Le=_e.selectAll("g.trace.parcats").data(ue,o),ze=Le.enter().append("g").attr("class","trace parcats");Le.attr("transform",function(be){return r(be.x,be.y)}),ze.append("g").attr("class","paths");var Ge=Le.select("g.paths"),Ve=Ge.selectAll("path.path").data(function(be){return be.paths},o);Ve.attr("fill",function(be){return be.model.color});var rt=Ve.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(be){return be.model.color}).attr("fill-opacity",0);_(rt),Ve.attr("d",function(be){return be.svgD}),rt.empty()||Ve.sort(d),Ve.exit().remove(),Ve.on("mouseover",h).on("mouseout",y).on("click",c),ze.append("g").attr("class","dimensions");var pt=Le.select("g.dimensions"),gt=pt.selectAll("g.dimension").data(function(be){return be.dimensions},o);gt.enter().append("g").attr("class","dimension"),gt.attr("transform",function(be){return r(be.x,0)}),gt.exit().remove();var ht=gt.selectAll("g.category").data(function(be){return be.categories},o),lt=ht.enter().append("g").attr("class","category");ht.attr("transform",function(be){return r(0,be.y)}),lt.append("rect").attr("class","catrect").attr("pointer-events","none"),ht.select("rect.catrect").attr("fill","none").attr("width",function(be){return be.width}).attr("height",function(be){return be.height}),k(lt);var Fe=ht.selectAll("rect.bandrect").data(function(be){return be.bands},o);Fe.each(function(){t.raiseToTop(this)}),Fe.attr("fill",function(be){return be.color});var Pe=Fe.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(be){return be.color}).attr("fill-opacity",0);Fe.attr("fill",function(be){return be.color}).attr("width",function(be){return be.width}).attr("height",function(be){return be.height}).attr("y",function(be){return be.y}).attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":be.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(Pe),Fe.exit().remove(),lt.append("text").attr("class","catlabel").attr("pointer-events","none"),ht.select("text.catlabel").attr("text-anchor",function(be){return u(be)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(be){return u(be)?be.width+5:-5}).attr("y",function(be){return be.height/2}).text(function(be){return be.model.categoryLabel}).each(function(be){a.font(v.select(this),be.parcatsViewModel.categorylabelfont),i.convertToTspans(v.select(this),pe)}),lt.append("text").attr("class","dimlabel"),ht.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(be){return be.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(be){return be.width/2}).attr("y",-5).text(function(be,Ye){return Ye===0?be.parcatsViewModel.model.dimensions[be.model.dimensionInd].dimensionLabel:null}).each(function(be){a.font(v.select(this),be.parcatsViewModel.labelfont)}),ht.selectAll("rect.bandrect").on("mouseover",V).on("mouseout",q),ht.exit().remove(),gt.call(v.behavior.drag().origin(function(be){return{x:be.x,y:0}}).on("dragstart",z).on("drag",H).on("dragend",G)),Le.each(function(be){be.traceSelection=v.select(this),be.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),be.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),Le.exit().remove()}Z.exports=function(ee,pe,oe,Y){s(oe,ee,Y,pe)};function o(ee){return ee.key}function u(ee){var pe=ee.parcatsViewModel.dimensions.length,oe=ee.parcatsViewModel.dimensions[pe-1].model.dimensionInd;return ee.model.dimensionInd===oe}function d(ee,pe){return ee.model.rawColor>pe.model.rawColor?1:ee.model.rawColor<pe.model.rawColor?-1:0}function h(ee){if(!ee.parcatsViewModel.dragDimension&&ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){t.raiseToTop(this),T(v.select(this));var pe=m(ee),oe=E(ee);if(ee.parcatsViewModel.graphDiv.emit("plotly_hover",{points:pe,event:v.event,constraints:oe}),ee.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Y=v.mouse(this)[0],ce=ee.parcatsViewModel.graphDiv,ue=ee.parcatsViewModel.trace,_e=ce._fullLayout,Le=_e._paperdiv.node().getBoundingClientRect(),ze=ee.parcatsViewModel.graphDiv.getBoundingClientRect(),Ge,Ve,rt;for(rt=0;rt<ee.leftXs.length-1;rt++)if(ee.leftXs[rt]+ee.dimWidths[rt]-2<=Y&&Y<=ee.leftXs[rt+1]+2){var pt=ee.parcatsViewModel.dimensions[rt],gt=ee.parcatsViewModel.dimensions[rt+1];Ge=(pt.x+pt.width+gt.x)/2,Ve=(ee.topYs[rt]+ee.topYs[rt+1]+ee.height)/2;break}var ht=ee.parcatsViewModel.x+Ge,lt=ee.parcatsViewModel.y+Ve,Fe=l.mostReadable(ee.model.color,["black","white"]),Pe=ee.model.count,be=Pe/ee.parcatsViewModel.model.count,Ye={countLabel:Pe,probabilityLabel:be.toFixed(3)},mt=[];ee.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&mt.push(["Count:",Ye.countLabel].join(" ")),ee.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&mt.push(["P:",Ye.probabilityLabel].join(" "));var bt=mt.join("<br>"),ft=v.mouse(ce)[0];P.loneHover({trace:ue,x:ht-Le.left+ze.left,y:lt-Le.top+ze.top,text:bt,color:ee.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:Fe,idealAlign:ft<ht?"right":"left",hovertemplate:(ue.line||{}).hovertemplate,hovertemplateLabels:Ye,eventData:[{data:ue._input,fullData:ue,count:Pe,probability:be}]},{container:_e._hoverlayer.node(),outerContainer:_e._paper.node(),gd:ce})}}}function y(ee){if(!ee.parcatsViewModel.dragDimension&&(_(v.select(this)),P.loneUnhover(ee.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),ee.parcatsViewModel.pathSelection.sort(d),ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var pe=m(ee),oe=E(ee);ee.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:pe,event:v.event,constraints:oe})}}function m(ee){for(var pe=[],oe=J(ee.parcatsViewModel),Y=0;Y<ee.model.valueInds.length;Y++){var ce=ee.model.valueInds[Y];pe.push({curveNumber:oe,pointNumber:ce})}return pe}function E(ee){for(var pe={},oe=ee.parcatsViewModel.model.dimensions,Y=0;Y<oe.length;Y++){var ce=oe[Y],ue=ce.categories[ee.model.categoryInds[Y]];pe[ce.containerInd]=ue.categoryValue}return ee.model.rawColor!==void 0&&(pe.color=ee.model.rawColor),pe}function c(ee){if(ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var pe=m(ee),oe=E(ee);ee.parcatsViewModel.graphDiv.emit("plotly_click",{points:pe,event:v.event,constraints:oe})}}function _(ee){ee.attr("fill",function(pe){return pe.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function T(ee){ee.attr("fill-opacity",.8).attr("stroke",function(pe){return l.mostReadable(pe.model.color,["black","white"])}).attr("stroke-width",.3)}function M(ee){ee.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function k(ee){ee.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function b(ee){ee.attr("stroke","black").attr("stroke-width",1.5)}function A(ee){ee.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function g(ee){var pe=ee.parcatsViewModel.pathSelection,oe=ee.categoryViewModel.model.dimensionInd,Y=ee.categoryViewModel.model.categoryInd;return pe.filter(function(ce){return ce.model.categoryInds[oe]===Y&&ce.model.color===ee.color})}function f(ee){var pe=v.select(ee.parentNode).selectAll("rect.bandrect");pe.each(function(oe){var Y=g(oe);T(Y),Y.each(function(){t.raiseToTop(this)})}),M(v.select(ee.parentNode))}function p(ee){var pe=v.select(ee).datum(),oe=g(pe);T(oe),oe.each(function(){t.raiseToTop(this)}),v.select(ee.parentNode).selectAll("rect.bandrect").filter(function(Y){return Y.color===pe.color}).each(function(){t.raiseToTop(this),b(v.select(this))})}function x(ee,pe,oe){var Y=v.select(ee).datum(),ce=Y.categoryViewModel.model,ue=Y.parcatsViewModel.graphDiv,_e=v.select(ee.parentNode).selectAll("rect.bandrect"),Le=[];_e.each(function(Ge){var Ve=g(Ge);Ve.each(function(rt){Array.prototype.push.apply(Le,m(rt))})});var ze={};ze[ce.dimensionInd]=ce.categoryValue,ue.emit(pe,{points:Le,event:oe,constraints:ze})}function N(ee,pe,oe){var Y=v.select(ee).datum(),ce=Y.categoryViewModel.model,ue=Y.parcatsViewModel.graphDiv,_e=g(Y),Le=[];_e.each(function(Ge){Array.prototype.push.apply(Le,m(Ge))});var ze={};ze[ce.dimensionInd]=ce.categoryValue,Y.rawColor!==void 0&&(ze.color=Y.rawColor),ue.emit(pe,{points:Le,event:oe,constraints:ze})}function D(ee,pe,oe){ee._fullLayout._calcInverseTransform(ee);var Y=ee._fullLayout._invScaleX,ce=ee._fullLayout._invScaleY,ue=v.select(oe.parentNode).select("rect.catrect"),_e=ue.node().getBoundingClientRect(),Le=ue.datum(),ze=Le.parcatsViewModel,Ge=ze.model.dimensions[Le.model.dimensionInd],Ve=ze.trace,rt=_e.top+_e.height/2,pt,gt;ze.dimensions.length>1&&Ge.displayInd===ze.dimensions.length-1?(pt=_e.left,gt="left"):(pt=_e.left+_e.width,gt="right");var ht=Le.model.count,lt=Le.model.categoryLabel,Fe=ht/Le.parcatsViewModel.model.count,Pe={countLabel:ht,categoryLabel:lt,probabilityLabel:Fe.toFixed(3)},be=[];Le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&be.push(["Count:",Pe.countLabel].join(" ")),Le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&be.push(["P("+Pe.categoryLabel+"):",Pe.probabilityLabel].join(" "));var Ye=be.join("<br>");return{trace:Ve,x:Y*(pt-pe.left),y:ce*(rt-pe.top),text:Ye,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:gt,hovertemplate:Ve.hovertemplate,hovertemplateLabels:Pe,eventData:[{data:Ve._input,fullData:Ve,count:ht,category:lt,probability:Fe}]}}function B(ee,pe,oe){var Y=[];return v.select(oe.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ce=this;Y.push(D(ee,pe,ce))}),Y}function U(ee,pe,oe){ee._fullLayout._calcInverseTransform(ee);var Y=ee._fullLayout._invScaleX,ce=ee._fullLayout._invScaleY,ue=oe.getBoundingClientRect(),_e=v.select(oe).datum(),Le=_e.categoryViewModel,ze=Le.parcatsViewModel,Ge=ze.model.dimensions[Le.model.dimensionInd],Ve=ze.trace,rt=ue.y+ue.height/2,pt,gt;ze.dimensions.length>1&&Ge.displayInd===ze.dimensions.length-1?(pt=ue.left,gt="left"):(pt=ue.left+ue.width,gt="right");var ht=Le.model.categoryLabel,lt=_e.parcatsViewModel.model.count,Fe=0;_e.categoryViewModel.bands.forEach(function(pr){pr.color===_e.color&&(Fe+=pr.count)});var Pe=Le.model.count,be=0;ze.pathSelection.each(function(pr){pr.model.color===_e.color&&(be+=pr.model.count)});var Ye=Fe/lt,mt=Fe/be,bt=Fe/Pe,ft={countLabel:Fe,categoryLabel:ht,probabilityLabel:Ye.toFixed(3)},Wt=[];Le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Wt.push(["Count:",ft.countLabel].join(" ")),Le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Wt.push("P(color ∩ "+ht+"): "+ft.probabilityLabel),Wt.push("P("+ht+" | color): "+mt.toFixed(3)),Wt.push("P(color | "+ht+"): "+bt.toFixed(3)));var Zt=Wt.join("<br>"),cr=l.mostReadable(_e.color,["black","white"]);return{trace:Ve,x:Y*(pt-pe.left),y:ce*(rt-pe.top),text:Zt,color:_e.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:cr,fontSize:10,idealAlign:gt,hovertemplate:Ve.hovertemplate,hovertemplateLabels:ft,eventData:[{data:Ve._input,fullData:Ve,category:ht,count:lt,probability:Ye,categorycount:Pe,colorcount:be,bandcolorcount:Fe}]}}function V(ee){if(!ee.parcatsViewModel.dragDimension&&ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var pe=v.mouse(this)[1];if(pe<-1)return;var oe=ee.parcatsViewModel.graphDiv,Y=oe._fullLayout,ce=Y._paperdiv.node().getBoundingClientRect(),ue=ee.parcatsViewModel.hoveron,_e=this;if(ue==="color"?(p(_e),N(_e,"plotly_hover",v.event)):(f(_e),x(_e,"plotly_hover",v.event)),ee.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Le;ue==="category"?Le=D(oe,ce,_e):ue==="color"?Le=U(oe,ce,_e):ue==="dimension"&&(Le=B(oe,ce,_e)),Le&&P.loneHover(Le,{container:Y._hoverlayer.node(),outerContainer:Y._paper.node(),gd:oe})}}}function q(ee){var pe=ee.parcatsViewModel;if(!pe.dragDimension&&(_(pe.pathSelection),k(pe.dimensionSelection.selectAll("g.category")),A(pe.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),P.loneUnhover(pe.graphDiv._fullLayout._hoverlayer.node()),pe.pathSelection.sort(d),pe.hoverinfoItems.indexOf("skip")===-1)){var oe=ee.parcatsViewModel.hoveron,Y=this;oe==="color"?N(Y,"plotly_unhover",v.event):x(Y,"plotly_unhover",v.event)}}function z(ee){ee.parcatsViewModel.arrangement!=="fixed"&&(ee.dragDimensionDisplayInd=ee.model.displayInd,ee.initialDragDimensionDisplayInds=ee.parcatsViewModel.model.dimensions.map(function(pe){return pe.displayInd}),ee.dragHasMoved=!1,ee.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(pe){var oe=v.mouse(this)[0],Y=v.mouse(this)[1];-2<=oe&&oe<=pe.width+2&&-2<=Y&&Y<=pe.height+2&&(ee.dragCategoryDisplayInd=pe.model.displayInd,ee.initialDragCategoryDisplayInds=ee.model.categories.map(function(ce){return ce.displayInd}),pe.model.dragY=pe.y,t.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ce){ce.y<Y&&Y<=ce.y+ce.height&&(ee.potentialClickBand=this)}))}),ee.parcatsViewModel.dragDimension=ee,P.loneUnhover(ee.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function H(ee){if(ee.parcatsViewModel.arrangement!=="fixed"&&(ee.dragHasMoved=!0,ee.dragDimensionDisplayInd!==null)){var pe=ee.dragDimensionDisplayInd,oe=pe-1,Y=pe+1,ce=ee.parcatsViewModel.dimensions[pe];if(ee.dragCategoryDisplayInd!==null){var ue=ce.categories[ee.dragCategoryDisplayInd];ue.model.dragY+=v.event.dy;var _e=ue.model.dragY,Le=ue.model.displayInd,ze=ce.categories,Ge=ze[Le-1],Ve=ze[Le+1];Ge!==void 0&&_e<Ge.y+Ge.height/2&&(ue.model.displayInd=Ge.model.displayInd,Ge.model.displayInd=Le),Ve!==void 0&&_e+ue.height>Ve.y+Ve.height/2&&(ue.model.displayInd=Ve.model.displayInd,Ve.model.displayInd=Le),ee.dragCategoryDisplayInd=ue.model.displayInd}if(ee.dragCategoryDisplayInd===null||ee.parcatsViewModel.arrangement==="freeform"){ce.model.dragX=v.event.x;var rt=ee.parcatsViewModel.dimensions[oe],pt=ee.parcatsViewModel.dimensions[Y];rt!==void 0&&ce.model.dragX<rt.x+rt.width&&(ce.model.displayInd=rt.model.displayInd,rt.model.displayInd=pe),pt!==void 0&&ce.model.dragX+ce.width>pt.x&&(ce.model.displayInd=pt.model.displayInd,pt.model.displayInd=ee.dragDimensionDisplayInd),ee.dragDimensionDisplayInd=ce.model.displayInd}ie(ee.parcatsViewModel),W(ee.parcatsViewModel),ye(ee.parcatsViewModel),le(ee.parcatsViewModel)}}function G(ee){if(ee.parcatsViewModel.arrangement!=="fixed"&&ee.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var pe={},oe=J(ee.parcatsViewModel),Y=ee.parcatsViewModel.model.dimensions.map(function(pt){return pt.displayInd}),ce=ee.initialDragDimensionDisplayInds.some(function(pt,gt){return pt!==Y[gt]});ce&&Y.forEach(function(pt,gt){var ht=ee.parcatsViewModel.model.dimensions[gt].containerInd;pe["dimensions["+ht+"].displayindex"]=pt});var ue=!1;if(ee.dragCategoryDisplayInd!==null){var _e=ee.model.categories.map(function(pt){return pt.displayInd});if(ue=ee.initialDragCategoryDisplayInds.some(function(pt,gt){return pt!==_e[gt]}),ue){var Le=ee.model.categories.slice().sort(function(pt,gt){return pt.displayInd-gt.displayInd}),ze=Le.map(function(pt){return pt.categoryValue}),Ge=Le.map(function(pt){return pt.categoryLabel});pe["dimensions["+ee.model.containerInd+"].categoryarray"]=[ze],pe["dimensions["+ee.model.containerInd+"].ticktext"]=[Ge],pe["dimensions["+ee.model.containerInd+"].categoryorder"]="array"}}if(ee.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!ee.dragHasMoved&&ee.potentialClickBand&&(ee.parcatsViewModel.hoveron==="color"?N(ee.potentialClickBand,"plotly_click",v.event.sourceEvent):x(ee.potentialClickBand,"plotly_click",v.event.sourceEvent)),ee.model.dragX=null,ee.dragCategoryDisplayInd!==null){var Ve=ee.parcatsViewModel.dimensions[ee.dragDimensionDisplayInd].categories[ee.dragCategoryDisplayInd];Ve.model.dragY=null,ee.dragCategoryDisplayInd=null}ee.dragDimensionDisplayInd=null,ee.parcatsViewModel.dragDimension=null,ee.dragHasMoved=null,ee.potentialClickBand=null,ie(ee.parcatsViewModel),W(ee.parcatsViewModel);var rt=v.transition().duration(300).ease("cubic-in-out");rt.each(function(){ye(ee.parcatsViewModel,!0),le(ee.parcatsViewModel,!0)}).each("end",function(){(ce||ue)&&C.restyle(ee.parcatsViewModel.graphDiv,pe,[oe])})}}function J(ee){for(var pe,oe=ee.graphDiv._fullData,Y=0;Y<oe.length;Y++)if(ee.key===oe[Y].uid){pe=Y;break}return pe}function le(ee,pe){pe===void 0&&(pe=!1);function oe(Y){return pe?Y.transition():Y}ee.pathSelection.data(function(Y){return Y.paths},o),oe(ee.pathSelection).attr("d",function(Y){return Y.svgD})}function ye(ee,pe){pe===void 0&&(pe=!1);function oe(ze){return pe?ze.transition():ze}ee.dimensionSelection.data(function(ze){return ze.dimensions},o);var Y=ee.dimensionSelection.selectAll("g.category").data(function(ze){return ze.categories},o);oe(ee.dimensionSelection).attr("transform",function(ze){return r(ze.x,0)}),oe(Y).attr("transform",function(ze){return r(0,ze.y)});var ce=Y.select(".dimlabel");ce.text(function(ze,Ge){return Ge===0?ze.parcatsViewModel.model.dimensions[ze.model.dimensionInd].dimensionLabel:null});var ue=Y.select(".catlabel");ue.attr("text-anchor",function(ze){return u(ze)?"start":"end"}).attr("x",function(ze){return u(ze)?ze.width+5:-5}).each(function(ze){var Ge,Ve;u(ze)?(Ge=ze.width+5,Ve="start"):(Ge=-5,Ve="end"),v.select(this).selectAll("tspan").attr("x",Ge).attr("text-anchor",Ve)});var _e=Y.selectAll("rect.bandrect").data(function(ze){return ze.bands},o),Le=_e.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(ze){return ze.color}).attr("fill-opacity",0);_e.attr("fill",function(ze){return ze.color}).attr("width",function(ze){return ze.width}).attr("height",function(ze){return ze.height}).attr("y",function(ze){return ze.y}),A(Le),_e.each(function(){t.raiseToTop(this)}),_e.exit().remove()}function de(ee,pe,oe){var Y=oe[0],ce=pe.margin||{l:80,r:80,t:100,b:80},ue=Y.trace,_e=ue.domain,Le=pe.width,ze=pe.height,Ge=Math.floor(Le*(_e.x[1]-_e.x[0])),Ve=Math.floor(ze*(_e.y[1]-_e.y[0])),rt=_e.x[0]*Le+ce.l,pt=pe.height-_e.y[1]*pe.height+ce.t,gt=ue.line.shape,ht;ue.hoverinfo==="all"?ht=["count","probability"]:ht=(ue.hoverinfo||"").split("+");var lt={trace:ue,key:ue.uid,model:Y,x:rt,y:pt,width:Ge,height:Ve,hoveron:ue.hoveron,hoverinfoItems:ht,arrangement:ue.arrangement,bundlecolors:ue.bundlecolors,sortpaths:ue.sortpaths,labelfont:ue.labelfont,categorylabelfont:ue.tickfont,pathShape:gt,dragDimension:null,margin:ce,paths:[],dimensions:[],graphDiv:ee,traceSelection:null,pathSelection:null,dimensionSelection:null};return Y.dimensions&&(ie(lt),W(lt)),lt}function me(ee,pe,oe,Y,ce){var ue=[],_e=[],Le,ze;for(ze=0;ze<oe.length-1;ze++)Le=w(oe[ze]+ee[ze],ee[ze+1]),ue.push(Le(ce)),_e.push(Le(1-ce));var Ge="M "+ee[0]+","+pe[0];for(Ge+="l"+oe[0]+",0 ",ze=1;ze<oe.length;ze++)Ge+="C"+ue[ze-1]+","+pe[ze-1]+" "+_e[ze-1]+","+pe[ze]+" "+ee[ze]+","+pe[ze],Ge+="l"+oe[ze]+",0 ";for(Ge+="l0,"+Y+" ",Ge+="l -"+oe[oe.length-1]+",0 ",ze=oe.length-2;ze>=0;ze--)Ge+="C"+_e[ze]+","+(pe[ze+1]+Y)+" "+ue[ze]+","+(pe[ze]+Y)+" "+(ee[ze]+oe[ze])+","+(pe[ze]+Y),Ge+="l-"+oe[ze]+",0 ";return Ge+="Z",Ge}function W(ee){var pe=ee.dimensions,oe=ee.model,Y=pe.map(function(cn){return cn.categories.map(function(Nr){return Nr.y})}),ce=ee.model.dimensions.map(function(cn){return cn.categories.map(function(Nr){return Nr.displayInd})}),ue=ee.model.dimensions.map(function(cn){return cn.displayInd}),_e=ee.dimensions.map(function(cn){return cn.model.dimensionInd}),Le=pe.map(function(cn){return cn.x}),ze=pe.map(function(cn){return cn.width}),Ge=[];for(var Ve in oe.paths)oe.paths.hasOwnProperty(Ve)&&Ge.push(oe.paths[Ve]);function rt(cn){var Nr=cn.categoryInds.map(function(Dt,$e){return ce[$e][Dt]}),Jr=_e.map(function(Dt){return Nr[Dt]});return Jr}Ge.sort(function(cn,Nr){var Jr=rt(cn),Dt=rt(Nr);return ee.sortpaths==="backward"&&(Jr.reverse(),Dt.reverse()),Jr.push(cn.valueInds[0]),Dt.push(Nr.valueInds[0]),ee.bundlecolors&&(Jr.unshift(cn.rawColor),Dt.unshift(Nr.rawColor)),Jr<Dt?-1:Jr>Dt?1:0});for(var pt=new Array(Ge.length),gt=pe[0].model.count,ht=pe[0].categories.map(function(cn){return cn.height}).reduce(function(cn,Nr){return cn+Nr}),lt=0;lt<Ge.length;lt++){var Fe=Ge[lt],Pe;gt>0?Pe=ht*(Fe.count/gt):Pe=0;for(var be=new Array(Y.length),Ye=0;Ye<Fe.categoryInds.length;Ye++){var mt=Fe.categoryInds[Ye],bt=ce[Ye][mt],ft=ue[Ye];be[ft]=Y[ft][bt],Y[ft][bt]+=Pe;var Wt=ee.dimensions[ft].categories[bt],Zt=Wt.bands.length,cr=Wt.bands[Zt-1];if(cr===void 0||Fe.rawColor!==cr.rawColor){var pr=cr===void 0?0:cr.y+cr.height;Wt.bands.push({key:pr,color:Fe.color,rawColor:Fe.rawColor,height:Pe,width:Wt.width,count:Fe.count,y:pr,categoryViewModel:Wt,parcatsViewModel:ee})}else{var Br=Wt.bands[Zt-1];Br.height+=Pe,Br.count+=Fe.count}}var Fr;ee.pathShape==="hspline"?Fr=me(Le,be,ze,Pe,.5):Fr=me(Le,be,ze,Pe,0),pt[lt]={key:Fe.valueInds[0],model:Fe,height:Pe,leftXs:Le,topYs:be,dimWidths:ze,svgD:Fr,parcatsViewModel:ee}}ee.paths=pt}function ie(ee){var pe=ee.model.dimensions.map(function(_e){return{displayInd:_e.displayInd,dimensionInd:_e.dimensionInd}});pe.sort(function(_e,Le){return _e.displayInd-Le.displayInd});var oe=[];for(var Y in pe){var ce=pe[Y].dimensionInd,ue=ee.model.dimensions[ce];oe.push(se(ee,ue))}ee.dimensions=oe}function se(ee,pe){var oe=40,Y=16,ce=ee.model.dimensions.length,ue=pe.displayInd,_e,Le,ze;ce>1?_e=(ee.width-2*oe-Y)/(ce-1):_e=0,Le=oe,ze=Le+_e*ue;var Ge=[],Ve=ee.model.maxCats,rt=pe.categories.length,pt=8,gt=pe.count,ht=ee.height-pt*(Ve-1),lt,Fe,Pe,be,Ye,mt=(Ve-rt)*pt/2,bt=pe.categories.map(function(ft){return{displayInd:ft.displayInd,categoryInd:ft.categoryInd}});for(bt.sort(function(ft,Wt){return ft.displayInd-Wt.displayInd}),Ye=0;Ye<rt;Ye++)be=bt[Ye].categoryInd,Fe=pe.categories[be],gt>0?lt=Fe.count/gt*ht:lt=0,Pe={key:Fe.valueInds[0],model:Fe,width:Y,height:lt,y:Fe.dragY!==null?Fe.dragY:mt,bands:[],parcatsViewModel:ee},mt=mt+lt+pt,Ge.push(Pe);return{key:pe.dimensionInd,x:pe.dragX!==null?pe.dragX:ze,y:0,width:Y,model:pe,categories:Ge,parcatsViewModel:ee,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),tF=Ne({"src/traces/parcats/plot.js"(te,Z){var v=Zee();Z.exports=function(C,P,t,r){var a=C._fullLayout,l=a._paper,i=a._size;v(C,l,P,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},t,r)}}}),$ee=Ne({"src/traces/parcats/base_plot.js"(te){var Z=iv().getModuleCalcData,v=tF(),w="parcats";te.name=w,te.plot=function(C,P,t,r){var a=Z(C.calcdata,w);if(a.length){var l=a[0];v(C,l,t,r)}},te.clean=function(C,P,t,r){var a=r._has&&r._has("parcats"),l=P._has&&P._has("parcats");a&&!l&&r._paperdiv.selectAll(".parcats").remove()}}}),Kee=Ne({"src/traces/parcats/index.js"(te,Z){Z.exports={attributes:eF(),supplyDefaults:Wee(),calc:Yee(),plot:tF(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:$ee(),categories:["noOpacity"],meta:{}}}}),Jee=Ne({"lib/parcats.js"(te,Z){Z.exports=Kee()}}),R_=Ne({"src/plots/mapbox/constants.js"(te,Z){var v=Sm(),w="1.13.4",C='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',P=['© <a target="_blank" href="https://carto.com/">Carto</a>',C].join(" "),t=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),r=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),a={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:C,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:P,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:P,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:t,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:r,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},l=v(a);Z.exports={requiredVersion:w,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:a,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+w+"."].join(`
`),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:","  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join(`
`),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",l.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(`
`),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join(`
`),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}}}),p6=Ne({"src/plots/mapbox/layout_attributes.js"(te,Z){var v=In(),w=io().defaultLine,C=Oc().attributes,P=$o(),t=Jc().textposition,r=Kc().overrideAll,a=Tu().templatedArray,l=R_(),i=P({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});i.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=Z.exports=r({_arrayAttrRegexps:[v.counterRegex("mapbox",".layers",!0)],domain:C({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:l.styleValuesMapbox.concat(l.styleValuesNonMapbox),dflt:l.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:a("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:w},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:w}},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:i,textposition:v.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}}}),zR=Ne({"src/traces/scattermapbox/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=jv(),t=v3(),r=Jc(),a=p6(),l=ns(),i=Vu(),s=co().extendFlat,o=Kc().overrideAll,u=p6(),d=t.line,h=t.marker;Z.exports=o({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:s({},u.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:s({},h.opacity,{dflt:1})},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:r.connectgaps,marker:s({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},i("marker")),fill:t.fill,fillcolor:P(),textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,below:{valType:"string"},selected:{marker:r.selected.marker},unselected:{marker:r.unselected.marker},hoverinfo:s({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),rF=Ne({"src/traces/scattermapbox/constants.js"(te,Z){var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(w){return v.indexOf(w)!==-1}}}}),Qee=Ne({"src/traces/scattermapbox/defaults.js"(te,Z){var v=In(),w=vu(),C=xv(),P=Im(),t=Xp(),r=ov(),a=zR(),l=rF().isSupportedFont;Z.exports=function(o,u,d,h){function y(p,x){return v.coerce(o,u,a,p,x)}function m(p,x){return v.coerce2(o,u,a,p,x)}var E=i(o,u,y);if(!E){u.visible=!1;return}if(y("text"),y("texttemplate"),y("texttemplatefallback"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback"),y("mode"),y("below"),w.hasMarkers(u)){C(o,u,d,h,y,{noLine:!0,noAngle:!0}),y("marker.allowoverlap"),y("marker.angle");var c=u.marker;c.symbol!=="circle"&&(v.isArrayOrTypedArray(c.size)&&(c.size=c.size[0]),v.isArrayOrTypedArray(c.color)&&(c.color=c.color[0]))}w.hasLines(u)&&(P(o,u,d,h,y,{noDash:!0}),y("connectgaps"));var _=m("cluster.maxzoom"),T=m("cluster.step"),M=m("cluster.color",u.marker&&u.marker.color||d),k=m("cluster.size"),b=m("cluster.opacity"),A=_!==!1||T!==!1||M!==!1||k!==!1||b!==!1,g=y("cluster.enabled",A);if(g||w.hasText(u)){var f=h.font.family;t(o,u,h,y,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:l(f)?f:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}y("fill"),u.fill!=="none"&&r(o,u,d,y),v.coerceSelectionMarkerOpacity(u,y)};function i(s,o,u){var d=u("lon")||[],h=u("lat")||[],y=Math.min(d.length,h.length);return o._length=y,y}}}),nF=Ne({"src/traces/scattermapbox/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),aF=Ne({"src/plots/mapbox/convert_text_opts.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C.split(" "),r=t[0],a=t[1],l=v.isArrayOrTypedArray(P)?v.mean(P):P,i=.5+l/100,s=1.5+l/100,o=["",""],u=[0,0];switch(r){case"top":o[0]="top",u[1]=-s;break;case"bottom":o[0]="bottom",u[1]=s;break}switch(a){case"left":o[1]="right",u[0]=-i;break;case"right":o[1]="left",u[0]=i;break}var d;return o[0]&&o[1]?d=o.join("-"):o[0]?d=o[0]:o[1]?d=o[1]:d="center",{anchor:d,offset:u}}}}),ete=Ne({"src/traces/scattermapbox/convert.js"(te,Z){var v=la(),w=In(),C=ja().BADNUM,P=Ib(),t=Dc(),r=zs(),a=Mm(),l=vu(),i=rF().isSupportedFont,s=aF(),o=_v().appendArrayPointValue,u=uc().NEWLINES,d=uc().BR_TAG_ALL;Z.exports=function(b,A){var g=A[0].trace,f=g.visible===!0&&g._length!==0,p=g.fill!=="none",x=l.hasLines(g),N=l.hasMarkers(g),D=l.hasText(g),B=N&&g.marker.symbol==="circle",U=N&&g.marker.symbol!=="circle",V=g.cluster&&g.cluster.enabled,q=h("fill"),z=h("line"),H=h("circle"),G=h("symbol"),J={fill:q,line:z,circle:H,symbol:G};if(!f)return J;var le;if((p||x)&&(le=P.calcTraceToLineCoords(A)),p&&(q.geojson=P.makePolygon(le),q.layout.visibility="visible",w.extendFlat(q.paint,{"fill-color":g.fillcolor})),x&&(z.geojson=P.makeLine(le),z.layout.visibility="visible",w.extendFlat(z.paint,{"line-width":g.line.width,"line-color":g.line.color,"line-opacity":g.opacity})),B){var ye=y(A);H.geojson=ye.geojson,H.layout.visibility="visible",V&&(H.filter=["!",["has","point_count"]],J.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":T(g.cluster.color,g.cluster.step),"circle-radius":T(g.cluster.size,g.cluster.step),"circle-opacity":T(g.cluster.opacity,g.cluster.step)}},J.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(g),"text-size":12}}),w.extendFlat(H.paint,{"circle-color":ye.mcc,"circle-radius":ye.mrc,"circle-opacity":ye.mo})}if(B&&V&&(H.filter=["!",["has","point_count"]]),(U||D)&&(G.geojson=m(A,b),w.extendFlat(G.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),U&&(w.extendFlat(G.layout,{"icon-size":g.marker.size/10}),"angle"in g.marker&&g.marker.angle!=="auto"&&w.extendFlat(G.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),G.layout["icon-allow-overlap"]=g.marker.allowoverlap,w.extendFlat(G.paint,{"icon-opacity":g.opacity*g.marker.opacity,"icon-color":g.marker.color})),D)){var de=(g.marker||{}).size,me=s(g.textposition,de);w.extendFlat(G.layout,{"text-size":g.textfont.size,"text-anchor":me.anchor,"text-offset":me.offset,"text-font":M(g)}),w.extendFlat(G.paint,{"text-color":g.textfont.color,"text-opacity":g.opacity})}return J};function h(k){return{type:k,geojson:P.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(k){var b=k[0].trace,A=b.marker,g=b.selectedpoints,f=w.isArrayOrTypedArray(A.color),p=w.isArrayOrTypedArray(A.size),x=w.isArrayOrTypedArray(A.opacity),N;function D(de){return b.opacity*de}function B(de){return de/2}var U;f&&(t.hasColorscale(b,"marker")?U=t.makeColorScaleFuncFromTrace(A):U=w.identity);var V;p&&(V=a(b));var q;x&&(q=function(de){var me=v(de)?+w.constrain(de,0,1):0;return D(me)});var z=[];for(N=0;N<k.length;N++){var H=k[N],G=H.lonlat;if(!_(G)){var J={};U&&(J.mcc=H.mcc=U(H.mc)),V&&(J.mrc=H.mrc=V(H.ms)),q&&(J.mo=q(H.mo)),g&&(J.selected=H.selected||0),z.push({type:"Feature",id:N+1,geometry:{type:"Point",coordinates:G},properties:J})}}var le;if(g)for(le=r.makeSelectedPointStyleFns(b),N=0;N<z.length;N++){var ye=z[N].properties;le.selectedOpacityFn&&(ye.mo=D(le.selectedOpacityFn(ye))),le.selectedColorFn&&(ye.mcc=le.selectedColorFn(ye)),le.selectedSizeFn&&(ye.mrc=le.selectedSizeFn(ye))}return{geojson:{type:"FeatureCollection",features:z},mcc:f||le&&le.selectedColorFn?{type:"identity",property:"mcc"}:A.color,mrc:p||le&&le.selectedSizeFn?{type:"identity",property:"mrc"}:B(A.size),mo:x||le&&le.selectedOpacityFn?{type:"identity",property:"mo"}:D(A.opacity)}}function m(k,b){for(var A=b._fullLayout,g=k[0].trace,f=g.marker||{},p=f.symbol,x=f.angle,N=p!=="circle"?E(p):c,D=x!=="auto"?E(x,!0):c,B=l.hasText(g)?E(g.text):c,U=[],V=0;V<k.length;V++){var q=k[V];if(!_(q.lonlat)){var z=g.texttemplate,H;if(z){var G=Array.isArray(z)?z[V]||"":z,J=g._module.formatLabels(q,g,A),le={};o(le,g,q.i),H=w.texttemplateString({data:[le,q,g._meta],fallback:g.texttemplatefallback,labels:J,locale:A._d3locale,template:G})}else H=B(V);H&&(H=H.replace(u,"").replace(d,`
`)),U.push({type:"Feature",geometry:{type:"Point",coordinates:q.lonlat},properties:{symbol:N(V),angle:D(V),text:H}})}}return{type:"FeatureCollection",features:U}}function E(k,b){return w.isArrayOrTypedArray(k)?b?function(A){return v(k[A])?+k[A]:0}:function(A){return k[A]}:k?function(){return k}:c}function c(){return""}function _(k){return k[0]===C}function T(k,b){var A;if(w.isArrayOrTypedArray(k)&&w.isArrayOrTypedArray(b)){A=["step",["get","point_count"],k[0]];for(var g=1;g<k.length;g++)A.push(b[g-1],k[g])}else A=k;return A}function M(k){var b=k.textfont,A=b.family,g=b.style,f=b.weight,p=A.split(" "),x=p[p.length-1]==="Italic";x&&p.pop(),x=x||g==="italic";var N=p.join(" ");f==="bold"&&p.indexOf("Bold")===-1?N+=" Bold":f<=1e3&&(p[0]==="Metropolis"?(N="Metropolis",f>850?N+=" Black":f>750?N+=" Extra Bold":f>650?N+=" Bold":f>550?N+=" Semi Bold":f>450?N+=" Medium":f>350?N+=" Regular":f>250?N+=" Light":f>150?N+=" Extra Light":N+=" Thin"):p.slice(0,2).join(" ")==="Open Sans"?(N="Open Sans",f>750?N+=" Extrabold":f>650?N+=" Bold":f>550?N+=" Semibold":f>350?N+=" Regular":N+=" Light"):p.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(N="Klokantech Noto Sans",p[3]==="CJK"&&(N+=" CJK"),N+=f>500?" Bold":" Regular")),x&&(N+=" Italic"),N==="Open Sans Regular Italic"?N="Open Sans Italic":N==="Open Sans Regular Bold"?N="Open Sans Bold":N==="Open Sans Regular Bold Italic"?N="Open Sans Bold Italic":N==="Klokantech Noto Sans Regular Italic"&&(N="Klokantech Noto Sans Italic"),i(N)||(N=A);var D=N.split(", ");return D}}}),tte=Ne({"src/traces/scattermapbox/plot.js"(te,Z){var v=In(),w=ete(),C=R_().traceLayerPrefix,P={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(a,l,i,s){this.type="scattermapbox",this.subplot=a,this.uid=l,this.clusterEnabled=i,this.isHidden=s,this.sourceIds={fill:"source-"+l+"-fill",line:"source-"+l+"-line",circle:"source-"+l+"-circle",symbol:"source-"+l+"-symbol",cluster:"source-"+l+"-circle",clusterCount:"source-"+l+"-circle"},this.layerIds={fill:C+l+"-fill",line:C+l+"-line",circle:C+l+"-circle",symbol:C+l+"-symbol",cluster:C+l+"-cluster",clusterCount:C+l+"-cluster-count"},this.below=null}var r=t.prototype;r.addSource=function(a,l,i){var s={type:"geojson",data:l.geojson};i&&i.enabled&&v.extendFlat(s,{cluster:!0,clusterMaxZoom:i.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[a]);o?o.setData(l.geojson):this.subplot.map.addSource(this.sourceIds[a],s)},r.setSourceData=function(a,l){this.subplot.map.getSource(this.sourceIds[a]).setData(l.geojson)},r.addLayer=function(a,l,i){var s={type:l.type,id:this.layerIds[a],source:this.sourceIds[a],layout:l.layout,paint:l.paint};l.filter&&(s.filter=l.filter);for(var o=this.layerIds[a],u,d=this.subplot.getMapLayers(),h=0;h<d.length;h++)if(d[h].id===o){u=!0;break}u?(this.subplot.setOptions(o,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(o,"setPaintProperty",s.paint)):this.subplot.addLayer(s,i)},r.update=function(l){var i=l[0].trace,s=this.subplot,o=s.map,u=w(s.gd,l),d=s.belowLookup["trace-"+this.uid],h=!!(i.cluster&&i.cluster.enabled),y=!!this.clusterEnabled,m=this;function E(f){f||m.addSource("circle",u.circle,i.cluster);for(var p=P.cluster,x=0;x<p.length;x++){var N=p[x],D=u[N];m.addLayer(N,D,d)}}function c(f){for(var p=P.cluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N])}f||o.removeSource(m.sourceIds.circle)}function _(f){for(var p=P.nonCluster,x=0;x<p.length;x++){var N=p[x],D=u[N];f||m.addSource(N,D),m.addLayer(N,D,d)}}function T(f){for(var p=P.nonCluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N]),f||o.removeSource(m.sourceIds[N])}}function M(f){y?c(f):T(f)}function k(f){h?E(f):_(f)}function b(){for(var f=h?P.cluster:P.nonCluster,p=0;p<f.length;p++){var x=f[p],N=u[x];N&&(s.setOptions(m.layerIds[x],"setLayoutProperty",N.layout),N.layout.visibility==="visible"&&(x!=="cluster"&&m.setSourceData(x,N),s.setOptions(m.layerIds[x],"setPaintProperty",N.paint)))}}var A=this.isHidden,g=i.visible!==!0;g?A||M():A?g||k():y!==h?(M(),k()):(this.below!==d&&(M(!0),k(!0)),b()),this.clusterEnabled=h,this.isHidden=g,this.below=d,l[0].trace._glTrace=this},r.dispose=function(){for(var l=this.subplot.map,i=this.clusterEnabled?P.cluster:P.nonCluster,s=i.length-1;s>=0;s--){var o=i[s];l.removeLayer(this.layerIds[o]),l.removeSource(this.sourceIds[o])}},Z.exports=function(l,i){var s=i[0].trace,o=s.cluster&&s.cluster.enabled,u=s.visible!==!0,d=new t(l,s.uid,o,u),h=w(l.gd,i),y=d.below=l.belowLookup["trace-"+s.uid],m,E,c;if(o)for(d.addSource("circle",h.circle,s.cluster),m=0;m<P.cluster.length;m++)E=P.cluster[m],c=h[E],d.addLayer(E,c,y);else for(m=0;m<P.nonCluster.length;m++)E=P.nonCluster[m],c=h[E],d.addSource(E,c,s.cluster),d.addLayer(E,c,y);return i[0].trace._glTrace=d,d}}}),NR=Ne({"src/traces/scattermapbox/hover.js"(te,Z){var v=nh(),w=In(),C=G1(),P=w.fillText,t=ja().BADNUM,r=R_().traceLayerPrefix;function a(i,s,o){var u=i.cd,d=u[0].trace,h=i.xa,y=i.ya,m=i.subplot,E=[],c=r+d.uid+"-circle",_=d.cluster&&d.cluster.enabled;if(_){var T=m.map.queryRenderedFeatures(null,{layers:[c]});E=T.map(function(V){return V.id})}var M=s>=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),k=M*360,b=s-k;function A(V){var q=V.lonlat;if(q[0]===t||_&&E.indexOf(V.i+1)===-1)return 1/0;var z=w.modHalf(q[0],360),H=q[1],G=m.project([z,H]),J=G.x-h.c2p([b,H]),le=G.y-y.c2p([z,o]),ye=Math.max(3,V.mrc||0);return Math.max(Math.sqrt(J*J+le*le)-ye,1-3/ye)}if(v.getClosest(u,A,i),i.index!==!1){var g=u[i.index],f=g.lonlat,p=[w.modHalf(f[0],360)+k,f[1]],x=h.c2p(p),N=y.c2p(p),D=g.mrc||1;i.x0=x-D,i.x1=x+D,i.y0=N-D,i.y1=N+D;var B={};B[d.subplot]={_subplot:m};var U=d._module.formatLabels(g,d,B);return i.lonLabel=U.lonLabel,i.latLabel=U.latLabel,i.color=C(d,g),i.extraText=l(d,g,u[0].t.labels),i.hovertemplate=d.hovertemplate,[i]}}function l(i,s,o){if(i.hovertemplate)return;var u=s.hi||i.hoverinfo,d=u.split("+"),h=d.indexOf("all")!==-1,y=d.indexOf("lon")!==-1,m=d.indexOf("lat")!==-1,E=s.lonlat,c=[];function _(T){return T+"°"}return h||y&&m?c.push("("+_(E[1])+", "+_(E[0])+")"):y?c.push(o.lon+_(E[0])):m&&c.push(o.lat+_(E[1])),(h||d.indexOf("text")!==-1)&&P(s,i,c),c.join("<br>")}Z.exports={hoverPoints:a,getExtraText:l}}}),rte=Ne({"src/traces/scattermapbox/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w}}}),nte=Ne({"src/traces/scattermapbox/select.js"(te,Z){var v=In(),w=vu(),C=ja().BADNUM;Z.exports=function(t,r){var a=t.cd,l=t.xaxis,i=t.yaxis,s=[],o=a[0].trace,u;if(!w.hasMarkers(o))return[];if(r===!1)for(u=0;u<a.length;u++)a[u].selected=0;else for(u=0;u<a.length;u++){var d=a[u],h=d.lonlat;if(h[0]!==C){var y=[v.modHalf(h[0],360),h[1]],m=[l.c2p(y),i.c2p(y)];r.contains(m,null,u,t)?(s.push({pointNumber:u,lon:h[0],lat:h[1]}),d.selected=1):d.selected=0}}return s}}}),iF=Ne({"node_modules/@plotly/mapbox-gl/dist/mapbox-gl-unminified.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():(v=v||self,v.mapboxgl=w())})(te,function(){var v,w,C;function P(t,r){if(!v)v=r;else if(!w)w=r;else{var a="var sharedChunk = {}; ("+v+")(sharedChunk); ("+w+")(sharedChunk);",l={};v(l),C=r(l),typeof window<"u"&&(C.workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"})))}}return P(["exports"],function(t){function r(R,I){return I={exports:{}},R(I,I.exports),I.exports}var a="1.13.4",l=i;function i(R,I,$,he){this.cx=3*R,this.bx=3*($-R)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*I,this.by=3*(he-I)-this.cy,this.ay=1-this.cy-this.by,this.p1x=R,this.p1y=he,this.p2x=$,this.p2y=he}i.prototype.sampleCurveX=function(R){return((this.ax*R+this.bx)*R+this.cx)*R},i.prototype.sampleCurveY=function(R){return((this.ay*R+this.by)*R+this.cy)*R},i.prototype.sampleCurveDerivativeX=function(R){return(3*this.ax*R+2*this.bx)*R+this.cx},i.prototype.solveCurveX=function(R,I){typeof I>"u"&&(I=1e-6);var $,he,ke,qe,et;for(ke=R,et=0;et<8;et++){if(qe=this.sampleCurveX(ke)-R,Math.abs(qe)<I)return ke;var Et=this.sampleCurveDerivativeX(ke);if(Math.abs(Et)<1e-6)break;ke=ke-qe/Et}if($=0,he=1,ke=R,ke<$)return $;if(ke>he)return he;for(;$<he;){if(qe=this.sampleCurveX(ke),Math.abs(qe-R)<I)return ke;R>qe?$=ke:he=ke,ke=(he-$)*.5+$}return ke},i.prototype.solve=function(R,I){return this.sampleCurveY(this.solveCurveX(R,I))};var s=o;function o(R,I){this.x=R,this.y=I}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(R){return this.clone()._add(R)},sub:function(R){return this.clone()._sub(R)},multByPoint:function(R){return this.clone()._multByPoint(R)},divByPoint:function(R){return this.clone()._divByPoint(R)},mult:function(R){return this.clone()._mult(R)},div:function(R){return this.clone()._div(R)},rotate:function(R){return this.clone()._rotate(R)},rotateAround:function(R,I){return this.clone()._rotateAround(R,I)},matMult:function(R){return this.clone()._matMult(R)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(R){return this.x===R.x&&this.y===R.y},dist:function(R){return Math.sqrt(this.distSqr(R))},distSqr:function(R){var I=R.x-this.x,$=R.y-this.y;return I*I+$*$},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(R){return Math.atan2(this.y-R.y,this.x-R.x)},angleWith:function(R){return this.angleWithSep(R.x,R.y)},angleWithSep:function(R,I){return Math.atan2(this.x*I-this.y*R,this.x*R+this.y*I)},_matMult:function(R){var I=R[0]*this.x+R[1]*this.y,$=R[2]*this.x+R[3]*this.y;return this.x=I,this.y=$,this},_add:function(R){return this.x+=R.x,this.y+=R.y,this},_sub:function(R){return this.x-=R.x,this.y-=R.y,this},_mult:function(R){return this.x*=R,this.y*=R,this},_div:function(R){return this.x/=R,this.y/=R,this},_multByPoint:function(R){return this.x*=R.x,this.y*=R.y,this},_divByPoint:function(R){return this.x/=R.x,this.y/=R.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var R=this.y;return this.y=this.x,this.x=-R,this},_rotate:function(R){var I=Math.cos(R),$=Math.sin(R),he=I*this.x-$*this.y,ke=$*this.x+I*this.y;return this.x=he,this.y=ke,this},_rotateAround:function(R,I){var $=Math.cos(R),he=Math.sin(R),ke=I.x+$*(this.x-I.x)-he*(this.y-I.y),qe=I.y+he*(this.x-I.x)+$*(this.y-I.y);return this.x=ke,this.y=qe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(R){return R instanceof o?R:Array.isArray(R)?new o(R[0],R[1]):R};var u=typeof self<"u"?self:{};function d(R,I){if(Array.isArray(R)){if(!Array.isArray(I)||R.length!==I.length)return!1;for(var $=0;$<R.length;$++)if(!d(R[$],I[$]))return!1;return!0}if(typeof R=="object"&&R!==null&&I!==null){if(typeof I!="object")return!1;var he=Object.keys(R);if(he.length!==Object.keys(I).length)return!1;for(var ke in R)if(!d(R[ke],I[ke]))return!1;return!0}return R===I}var h=Math.pow(2,53)-1;function y(R){if(R<=0)return 0;if(R>=1)return 1;var I=R*R,$=I*R;return 4*(R<.5?$:3*(R-I)+$-.75)}function m(R,I,$,he){var ke=new l(R,I,$,he);return function(qe){return ke.solve(qe)}}var E=m(.25,.1,.25,1);function c(R,I,$){return Math.min($,Math.max(I,R))}function _(R,I,$){var he=$-I,ke=((R-I)%he+he)%he+I;return ke===I?$:ke}function T(R,I,$){if(!R.length)return $(null,[]);var he=R.length,ke=new Array(R.length),qe=null;R.forEach(function(et,Et){I(et,function(Jt,vr){Jt&&(qe=Jt),ke[Et]=vr,--he===0&&$(qe,ke)})})}function M(R){var I=[];for(var $ in R)I.push(R[$]);return I}function k(R,I){var $=[];for(var he in R)he in I||$.push(he);return $}function b(R){for(var I=[],$=arguments.length-1;$-- >0;)I[$]=arguments[$+1];for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];for(var et in qe)R[et]=qe[et]}return R}function A(R,I){for(var $={},he=0;he<I.length;he++){var ke=I[he];ke in R&&($[ke]=R[ke])}return $}var g=1;function f(){return g++}function p(){function R(I){return I?(I^Math.random()*16>>I/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,R)}return R()}function x(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))}function N(R){return R?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(R):!1}function D(R,I){R.forEach(function($){I[$]&&(I[$]=I[$].bind(I))})}function B(R,I){return R.indexOf(I,R.length-I.length)!==-1}function U(R,I,$){var he={};for(var ke in R)he[ke]=I.call($||this,R[ke],ke,R);return he}function V(R,I,$){var he={};for(var ke in R)I.call($||this,R[ke],ke,R)&&(he[ke]=R[ke]);return he}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?U(R,q):R}function z(R,I){for(var $=0;$<R.length;$++)if(I.indexOf(R[$])>=0)return!0;return!1}var H={};function G(R){H[R]||(typeof console<"u"&&console.warn(R),H[R]=!0)}function J(R,I,$){return($.y-R.y)*(I.x-R.x)>(I.y-R.y)*($.x-R.x)}function le(R){for(var I=0,$=0,he=R.length,ke=he-1,qe=void 0,et=void 0;$<he;ke=$++)qe=R[$],et=R[ke],I+=(et.x-qe.x)*(qe.y+et.y);return I}function ye(R){var I=R[0],$=R[1],he=R[2];return $+=90,$*=Math.PI/180,he*=Math.PI/180,{x:I*Math.cos($)*Math.sin(he),y:I*Math.sin($)*Math.sin(he),z:I*Math.cos(he)}}function de(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function me(R){var I=/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,$={};if(R.replace(I,function(ke,qe,et,Et){var Jt=et||Et;return $[qe]=Jt?Jt.toLowerCase():!0,""}),$["max-age"]){var he=parseInt($["max-age"],10);isNaN(he)?delete $["max-age"]:$["max-age"]=he}return $}var W=null;function ie(R){if(W==null){var I=R.navigator?R.navigator.userAgent:null;W=!!R.safari||!!(I&&(/\b(iPad|iPhone|iPod)\b/.test(I)||I.match("Safari")&&!I.match("Chrome")))}return W}function se(R){try{var I=u[R];return I.setItem("_mapbox_test_",1),I.removeItem("_mapbox_test_"),!0}catch{return!1}}function ee(R){return u.btoa(encodeURIComponent(R).replace(/%([0-9A-F]{2})/g,function(I,$){return String.fromCharCode(+("0x"+$))}))}function pe(R){return decodeURIComponent(u.atob(R).split("").map(function(I){return"%"+("00"+I.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var oe=u.performance&&u.performance.now?u.performance.now.bind(u.performance):Date.now.bind(Date),Y=u.requestAnimationFrame||u.mozRequestAnimationFrame||u.webkitRequestAnimationFrame||u.msRequestAnimationFrame,ce=u.cancelAnimationFrame||u.mozCancelAnimationFrame||u.webkitCancelAnimationFrame||u.msCancelAnimationFrame,ue,_e,Le={now:oe,frame:function(I){var $=Y(I);return{cancel:function(){return ce($)}}},getImageData:function(I,$){$===void 0&&($=0);var he=u.document.createElement("canvas"),ke=he.getContext("2d");if(!ke)throw new Error("failed to create canvas 2d context");return he.width=I.width,he.height=I.height,ke.drawImage(I,0,0,I.width,I.height),ke.getImageData(-$,-$,I.width+2*$,I.height+2*$)},resolveURL:function(I){return ue||(ue=u.document.createElement("a")),ue.href=I,ue.href},hardwareConcurrency:u.navigator&&u.navigator.hardwareConcurrency||4,get devicePixelRatio(){return u.devicePixelRatio},get prefersReducedMotion(){return u.matchMedia?(_e==null&&(_e=u.matchMedia("(prefers-reduced-motion: reduce)")),_e.matches):!1}},ze={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},Ge={supported:!1,testSupport:ht},Ve,rt=!1,pt,gt=!1;u.document&&(pt=u.document.createElement("img"),pt.onload=function(){Ve&&lt(Ve),Ve=null,gt=!0},pt.onerror=function(){rt=!0,Ve=null},pt.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function ht(R){rt||!pt||(gt?lt(R):Ve=R)}function lt(R){var I=R.createTexture();R.bindTexture(R.TEXTURE_2D,I);try{if(R.texImage2D(R.TEXTURE_2D,0,R.RGBA,R.RGBA,R.UNSIGNED_BYTE,pt),R.isContextLost())return;Ge.supported=!0}catch{}R.deleteTexture(I),rt=!0}var Fe="01";function Pe(){for(var R="1",I="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",$="",he=0;he<10;he++)$+=I[Math.floor(Math.random()*62)];var ke=720*60*1e3,qe=[R,Fe,$].join(""),et=Date.now()+ke;return{token:qe,tokenExpiresAt:et}}var be=function(I,$){this._transformRequestFn=I,this._customAccessToken=$,this._createSkuToken()};be.prototype._createSkuToken=function(){var I=Pe();this._skuToken=I.token,this._skuTokenExpiresAt=I.tokenExpiresAt},be.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},be.prototype.transformRequest=function(I,$){return this._transformRequestFn?this._transformRequestFn(I,$)||{url:I}:{url:I}},be.prototype.normalizeStyleURL=function(I,$){if(!Ye(I))return I;var he=cr(I);return he.path="/styles/v1"+he.path,this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeGlyphsURL=function(I,$){if(!Ye(I))return I;var he=cr(I);return he.path="/fonts/v1"+he.path,this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeSourceURL=function(I,$){if(!Ye(I))return I;var he=cr(I);return he.path="/v4/"+he.authority+".json",he.params.push("secure"),this._makeAPIURL(he,this._customAccessToken||$)},be.prototype.normalizeSpriteURL=function(I,$,he,ke){var qe=cr(I);return Ye(I)?(qe.path="/styles/v1"+qe.path+"/sprite"+$+he,this._makeAPIURL(qe,this._customAccessToken||ke)):(qe.path+=""+$+he,pr(qe))},be.prototype.normalizeTileURL=function(I,$){if(this._isSkuTokenExpired()&&this._createSkuToken(),I&&!Ye(I))return I;var he=cr(I),ke=/(\.(png|jpg)\d*)(?=$)/,qe=/^.+\/v4\//,et=Le.devicePixelRatio>=2||$===512?"@2x":"",Et=Ge.supported?".webp":"$1";he.path=he.path.replace(ke,""+et+Et),he.path=he.path.replace(qe,"/"),he.path="/v4"+he.path;var Jt=this._customAccessToken||Wt(he.params)||ze.ACCESS_TOKEN;return ze.REQUIRE_ACCESS_TOKEN&&Jt&&this._skuToken&&he.params.push("sku="+this._skuToken),this._makeAPIURL(he,Jt)},be.prototype.canonicalizeTileURL=function(I,$){var he="/v4/",ke=/\.[\w]+$/,qe=cr(I);if(!qe.path.match(/(^\/v4\/)/)||!qe.path.match(ke))return I;var et="mapbox://tiles/";et+=qe.path.replace(he,"");var Et=qe.params;return $&&(Et=Et.filter(function(Jt){return!Jt.match(/^access_token=/)})),Et.length&&(et+="?"+Et.join("&")),et},be.prototype.canonicalizeTileset=function(I,$){for(var he=$?Ye($):!1,ke=[],qe=0,et=I.tiles||[];qe<et.length;qe+=1){var Et=et[qe];bt(Et)?ke.push(this.canonicalizeTileURL(Et,he)):ke.push(Et)}return ke},be.prototype._makeAPIURL=function(I,$){var he="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ke=cr(ze.API_URL);if(I.protocol=ke.protocol,I.authority=ke.authority,I.protocol==="http"){var qe=I.params.indexOf("secure");qe>=0&&I.params.splice(qe,1)}if(ke.path!=="/"&&(I.path=""+ke.path+I.path),!ze.REQUIRE_ACCESS_TOKEN)return pr(I);if($=$||ze.ACCESS_TOKEN,!$)throw new Error("An API access token is required to use Mapbox GL. "+he);if($[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+he);return I.params=I.params.filter(function(et){return et.indexOf("access_token")===-1}),I.params.push("access_token="+$),pr(I)};function Ye(R){return R.indexOf("mapbox:")===0}var mt=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function bt(R){return mt.test(R)}function ft(R){return R.indexOf("sku=")>0&&bt(R)}function Wt(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I],ke=he.match(/^access_token=(.*)$/);if(ke)return ke[1]}return null}var Zt=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function cr(R){var I=R.match(Zt);if(!I)throw new Error("Unable to parse URL object");return{protocol:I[1],authority:I[2],path:I[3]||"/",params:I[4]?I[4].split("&"):[]}}function pr(R){var I=R.params.length?"?"+R.params.join("&"):"";return R.protocol+"://"+R.authority+R.path+I}var Br="mapbox.eventData";function Fr(R){if(!R)return null;var I=R.split(".");if(!I||I.length!==3)return null;try{var $=JSON.parse(pe(I[1]));return $}catch{return null}}var cn=function(I){this.type=I,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};cn.prototype.getStorageKey=function(I){var $=Fr(ze.ACCESS_TOKEN),he="";return $&&$.u?he=ee($.u):he=ze.ACCESS_TOKEN||"",I?Br+"."+I+":"+he:Br+":"+he},cn.prototype.fetchEventData=function(){var I=se("localStorage"),$=this.getStorageKey(),he=this.getStorageKey("uuid");if(I)try{var ke=u.localStorage.getItem($);ke&&(this.eventData=JSON.parse(ke));var qe=u.localStorage.getItem(he);qe&&(this.anonId=qe)}catch{G("Unable to read from LocalStorage")}},cn.prototype.saveEventData=function(){var I=se("localStorage"),$=this.getStorageKey(),he=this.getStorageKey("uuid");if(I)try{u.localStorage.setItem(he,this.anonId),Object.keys(this.eventData).length>=1&&u.localStorage.setItem($,JSON.stringify(this.eventData))}catch{G("Unable to write to LocalStorage")}},cn.prototype.processRequests=function(I){},cn.prototype.postEvent=function(I,$,he,ke){var qe=this;if(ze.EVENTS_URL){var et=cr(ze.EVENTS_URL);et.params.push("access_token="+(ke||ze.ACCESS_TOKEN||""));var Et={event:this.type,created:new Date(I).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:a,skuId:Fe,userId:this.anonId},Jt=$?b(Et,$):Et,vr={url:pr(et),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Jt])};this.pendingRequest=Fn(vr,function(Ar){qe.pendingRequest=null,he(Ar),qe.saveEventData(),qe.processRequests(ke)})}},cn.prototype.queueRequest=function(I,$){this.queue.push(I),this.processRequests($)};var Nr=(function(R){function I(){R.call(this,"map.load"),this.success={},this.skuToken=""}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.postMapLoadEvent=function(he,ke,qe,et){this.skuToken=qe,(ze.EVENTS_URL&&et||ze.ACCESS_TOKEN&&Array.isArray(he)&&he.some(function(Et){return Ye(Et)||bt(Et)}))&&this.queueRequest({id:ke,timestamp:Date.now()},et)},I.prototype.processRequests=function(he){var ke=this;if(!(this.pendingRequest||this.queue.length===0)){var qe=this.queue.shift(),et=qe.id,Et=qe.timestamp;et&&this.success[et]||(this.anonId||this.fetchEventData(),N(this.anonId)||(this.anonId=p()),this.postEvent(Et,{skuToken:this.skuToken},function(Jt){Jt||et&&(ke.success[et]=!0)},he))}},I})(cn),Jr=(function(R){function I($){R.call(this,"appUserTurnstile"),this._customAccessToken=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.postTurnstileEvent=function(he,ke){ze.EVENTS_URL&&ze.ACCESS_TOKEN&&Array.isArray(he)&&he.some(function(qe){return Ye(qe)||bt(qe)})&&this.queueRequest(Date.now(),ke)},I.prototype.processRequests=function(he){var ke=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var qe=Fr(ze.ACCESS_TOKEN),et=qe?qe.u:ze.ACCESS_TOKEN,Et=et!==this.eventData.tokenU;N(this.anonId)||(this.anonId=p(),Et=!0);var Jt=this.queue.shift();if(this.eventData.lastSuccess){var vr=new Date(this.eventData.lastSuccess),Ar=new Date(Jt),Zr=(Jt-this.eventData.lastSuccess)/(1440*60*1e3);Et=Et||Zr>=1||Zr<-1||vr.getDate()!==Ar.getDate()}else Et=!0;if(!Et)return this.processRequests();this.postEvent(Jt,{"enabled.telemetry":!1},function(mn){mn||(ke.eventData.lastSuccess=Jt,ke.eventData.tokenU=et)},he)}},I})(cn),Dt=new Jr,$e=Dt.postTurnstileEvent.bind(Dt),ot=new Nr,De=ot.postMapLoadEvent.bind(ot),Ee="mapbox-tiles",Ae=500,Ie=50,tt=1e3*60*7,st;function Ft(){u.caches&&!st&&(st=u.caches.open(Ee))}var Nt;function Xt(R,I){if(Nt===void 0)try{new Response(new ReadableStream),Nt=!0}catch{Nt=!1}Nt?I(R.body):R.blob().then(I)}function lr(R,I,$){if(Ft(),!!st){var he={status:I.status,statusText:I.statusText,headers:new u.Headers};I.headers.forEach(function(et,Et){return he.headers.set(Et,et)});var ke=me(I.headers.get("Cache-Control")||"");if(!ke["no-store"]){ke["max-age"]&&he.headers.set("Expires",new Date($+ke["max-age"]*1e3).toUTCString());var qe=new Date(he.headers.get("Expires")).getTime()-$;qe<tt||Xt(I,function(et){var Et=new u.Response(et,he);Ft(),st&&st.then(function(Jt){return Jt.put(Rr(R.url),Et)}).catch(function(Jt){return G(Jt.message)})})}}}function Rr(R){var I=R.indexOf("?");return I<0?R:R.slice(0,I)}function Mr(R,I){if(Ft(),!st)return I(null);var $=Rr(R.url);st.then(function(he){he.match($).then(function(ke){var qe=Sr(ke);he.delete($),qe&&he.put($,ke.clone()),I(null,ke,qe)}).catch(I)}).catch(I)}function Sr(R){if(!R)return!1;var I=new Date(R.headers.get("Expires")||0),$=me(R.headers.get("Cache-Control")||"");return I>Date.now()&&!$["no-cache"]}var Kr=1/0;function qn(R){Kr++,Kr>Ie&&(R.getActor().send("enforceCacheSizeLimit",Ae),Kr=0)}function ha(R){Ft(),st&&st.then(function(I){I.keys().then(function($){for(var he=0;he<$.length-R;he++)I.delete($[he])})})}function ia(R){var I=u.caches.delete(Ee);R&&I.catch(R).then(function(){return R()})}function xa(R,I){Ae=R,Ie=I}var ba;function ea(){return ba==null&&(ba=u.OffscreenCanvas&&new u.OffscreenCanvas(1,1).getContext("2d")&&typeof u.createImageBitmap=="function"),ba}var Za={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};typeof Object.freeze=="function"&&Object.freeze(Za);var ui=(function(R){function I($,he,ke){he===401&&bt(ke)&&($+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),R.call(this,$),this.status=he,this.url=ke,this.name=this.constructor.name,this.message=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},I})(Error),_r=de()?function(){return self.worker&&self.worker.referrer}:function(){return(u.location.protocol==="blob:"?u.parent:u).location.href},Qt=function(R){return/^file:/.test(R)||/^file:/.test(_r())&&!/^\w+:/.test(R)};function yr(R,I){var $=new u.AbortController,he=new u.Request(R.url,{method:R.method||"GET",body:R.body,credentials:R.credentials,headers:R.headers,referrer:_r(),signal:$.signal}),ke=!1,qe=!1,et=ft(he.url);R.type==="json"&&he.headers.set("Accept","application/json");var Et=function(vr,Ar,Zr){if(!qe){if(vr&&vr.message!=="SecurityError"&&G(vr),Ar&&Zr)return Jt(Ar);var mn=Date.now();u.fetch(he).then(function(fn){if(fn.ok){var On=et?fn.clone():null;return Jt(fn,On,mn)}else return I(new ui(fn.statusText,fn.status,R.url))}).catch(function(fn){fn.code!==20&&I(new Error(fn.message))})}},Jt=function(vr,Ar,Zr){(R.type==="arrayBuffer"?vr.arrayBuffer():R.type==="json"?vr.json():vr.text()).then(function(mn){qe||(Ar&&Zr&&lr(he,Ar,Zr),ke=!0,I(null,mn,vr.headers.get("Cache-Control"),vr.headers.get("Expires")))}).catch(function(mn){qe||I(new Error(mn.message))})};return et?Mr(he,Et):Et(null,null),{cancel:function(){qe=!0,ke||$.abort()}}}function br(R,I){var $=new u.XMLHttpRequest;$.open(R.method||"GET",R.url,!0),R.type==="arrayBuffer"&&($.responseType="arraybuffer");for(var he in R.headers)$.setRequestHeader(he,R.headers[he]);return R.type==="json"&&($.responseType="text",$.setRequestHeader("Accept","application/json")),$.withCredentials=R.credentials==="include",$.onerror=function(){I(new Error($.statusText))},$.onload=function(){if(($.status>=200&&$.status<300||$.status===0)&&$.response!==null){var ke=$.response;if(R.type==="json")try{ke=JSON.parse($.response)}catch(qe){return I(qe)}I(null,ke,$.getResponseHeader("Cache-Control"),$.getResponseHeader("Expires"))}else I(new ui($.statusText,$.status,R.url))},$.send(R.body),{cancel:function(){return $.abort()}}}var nn=function(R,I){if(!Qt(R.url)){if(u.fetch&&u.Request&&u.AbortController&&u.Request.prototype.hasOwnProperty("signal"))return yr(R,I);if(de()&&self.worker&&self.worker.actor){var $=!0;return self.worker.actor.send("getResource",R,I,void 0,$)}}return br(R,I)},wn=function(R,I){return nn(b(R,{type:"json"}),I)},Ln=function(R,I){return nn(b(R,{type:"arrayBuffer"}),I)},Fn=function(R,I){return nn(b(R,{method:"POST"}),I)};function va(R){var I=u.document.createElement("a");return I.href=R,I.protocol===u.document.location.protocol&&I.host===u.document.location.host}var Da="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Pa(R,I,$,he){var ke=new u.Image,qe=u.URL;ke.onload=function(){I(null,ke),qe.revokeObjectURL(ke.src),ke.onload=null,u.requestAnimationFrame(function(){ke.src=Da})},ke.onerror=function(){return I(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var et=new u.Blob([new Uint8Array(R)],{type:"image/png"});ke.cacheControl=$,ke.expires=he,ke.src=R.byteLength?qe.createObjectURL(et):Da}function Fa(R,I){var $=new u.Blob([new Uint8Array(R)],{type:"image/png"});u.createImageBitmap($).then(function(he){I(null,he)}).catch(function(he){I(new Error("Could not load image because of "+he.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var $a,oa,zi=function(){$a=[],oa=0};zi();var Gi=function(R,I){if(Ge.supported&&(R.headers||(R.headers={}),R.headers.accept="image/webp,*/*"),oa>=ze.MAX_PARALLEL_IMAGE_REQUESTS){var $={requestParameters:R,callback:I,cancelled:!1,cancel:function(){this.cancelled=!0}};return $a.push($),$}oa++;var he=!1,ke=function(){if(!he)for(he=!0,oa--;$a.length&&oa<ze.MAX_PARALLEL_IMAGE_REQUESTS;){var et=$a.shift(),Et=et.requestParameters,Jt=et.callback,vr=et.cancelled;vr||(et.cancel=Gi(Et,Jt).cancel)}},qe=Ln(R,function(et,Et,Jt,vr){ke(),et?I(et):Et&&(ea()?Fa(Et,I):Pa(Et,I,Jt,vr))});return{cancel:function(){qe.cancel(),ke()}}},qt=function(R,I){var $=u.document.createElement("video");$.muted=!0,$.onloadstart=function(){I(null,$)};for(var he=0;he<R.length;he++){var ke=u.document.createElement("source");va(R[he])||($.crossOrigin="Anonymous"),ke.src=R[he],$.appendChild(ke)}return{cancel:function(){}}};function Ct(R,I,$){var he=$[R]&&$[R].indexOf(I)!==-1;he||($[R]=$[R]||[],$[R].push(I))}function Ur(R,I,$){if($&&$[R]){var he=$[R].indexOf(I);he!==-1&&$[R].splice(he,1)}}var Qr=function(I,$){$===void 0&&($={}),b(this,$),this.type=I},tn=(function(R){function I($,he){he===void 0&&(he={}),R.call(this,"error",b({error:$},he))}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(Qr),Xr=function(){};Xr.prototype.on=function(I,$){return this._listeners=this._listeners||{},Ct(I,$,this._listeners),this},Xr.prototype.off=function(I,$){return Ur(I,$,this._listeners),Ur(I,$,this._oneTimeListeners),this},Xr.prototype.once=function(I,$){return this._oneTimeListeners=this._oneTimeListeners||{},Ct(I,$,this._oneTimeListeners),this},Xr.prototype.fire=function(I,$){typeof I=="string"&&(I=new Qr(I,$||{}));var he=I.type;if(this.listens(he)){I.target=this;for(var ke=this._listeners&&this._listeners[he]?this._listeners[he].slice():[],qe=0,et=ke;qe<et.length;qe+=1){var Et=et[qe];Et.call(this,I)}for(var Jt=this._oneTimeListeners&&this._oneTimeListeners[he]?this._oneTimeListeners[he].slice():[],vr=0,Ar=Jt;vr<Ar.length;vr+=1){var Zr=Ar[vr];Ur(he,Zr,this._oneTimeListeners),Zr.call(this,I)}var mn=this._eventedParent;mn&&(b(I,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),mn.fire(I))}else I instanceof tn&&console.error(I.error);return this},Xr.prototype.listens=function(I){return this._listeners&&this._listeners[I]&&this._listeners[I].length>0||this._oneTimeListeners&&this._oneTimeListeners[I]&&this._oneTimeListeners[I].length>0||this._eventedParent&&this._eventedParent.listens(I)},Xr.prototype.setEventedParent=function(I,$){return this._eventedParent=I,this._eventedParentData=$,this};var en=8,Tn={version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},hn={"*":{type:"source"}},Rt=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],xr={type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Wr={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:"*"}},An={type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Xn={type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},na={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"}}},ra={type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},Sn={id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},Wn=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Fi={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ya={"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Wi={"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},uo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ao={"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},wo={"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Uo={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Ri={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ps={type:"array",value:"*"},as={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},el={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},As={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},hs={type:"array",value:"*",minimum:1},es={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}},tl=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],Ks={"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},pl={"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},Ss={"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},ls={"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"}},Lo={"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"}},Es={"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},ml={"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},zl={"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"}},Bl={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Fs={"*":{type:"string"}},Di={$version:en,$root:Tn,sources:hn,source:Rt,source_vector:xr,source_raster:Wr,source_raster_dem:An,source_geojson:Xn,source_video:na,source_image:ra,layer:Sn,layout:Wn,layout_background:Fi,layout_fill:Ya,layout_circle:Wi,layout_heatmap:uo,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:Ao,layout_symbol:wo,layout_raster:Uo,layout_hillshade:Ri,filter:ps,filter_operator:as,geometry_type:el,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:As,expression:hs,light:es,paint:tl,paint_fill:Ks,"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:pl,paint_circle:Ss,paint_heatmap:ls,paint_symbol:Lo,paint_raster:Es,paint_hillshade:ml,paint_background:zl,transition:Bl,"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:Fs},_o=function(I,$,he,ke){this.message=(I?I+": ":"")+he,ke&&(this.identifier=ke),$!=null&&$.__line__&&(this.line=$.__line__)};function Nl(R){var I=R.key,$=R.value;return $?[new _o(I,$,"constants have been deprecated as of v8")]:[]}function Vs(R){for(var I=[],$=arguments.length-1;$-- >0;)I[$]=arguments[$+1];for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];for(var et in qe)R[et]=qe[et]}return R}function Ko(R){return R instanceof Number||R instanceof String||R instanceof Boolean?R.valueOf():R}function jl(R){if(Array.isArray(R))return R.map(jl);if(R instanceof Object&&!(R instanceof Number||R instanceof String||R instanceof Boolean)){var I={};for(var $ in R)I[$]=jl(R[$]);return I}return Ko(R)}var rl=(function(R){function I($,he){R.call(this,he),this.message=he,this.key=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(Error),yl=function(I,$){$===void 0&&($=[]),this.parent=I,this.bindings={};for(var he=0,ke=$;he<ke.length;he+=1){var qe=ke[he],et=qe[0],Et=qe[1];this.bindings[et]=Et}};yl.prototype.concat=function(I){return new yl(this,I)},yl.prototype.get=function(I){if(this.bindings[I])return this.bindings[I];if(this.parent)return this.parent.get(I);throw new Error(I+" not found in scope.")},yl.prototype.has=function(I){return this.bindings[I]?!0:this.parent?this.parent.has(I):!1};var Cu={kind:"null"},yo={kind:"number"},Ps={kind:"string"},ms={kind:"boolean"},Kl={kind:"color"},Jl={kind:"object"},Wo={kind:"value"},pu={kind:"error"},_u={kind:"collator"},Xs={kind:"formatted"},Pl={kind:"resolvedImage"};function Gl(R,I){return{kind:"array",itemType:R,N:I}}function Yl(R){if(R.kind==="array"){var I=Yl(R.itemType);return typeof R.N=="number"?"array<"+I+", "+R.N+">":R.itemType.kind==="value"?"array":"array<"+I+">"}else return R.kind}var tc=[Cu,yo,Ps,ms,Kl,Xs,Jl,Gl(Wo),Pl];function bf(R,I){if(I.kind==="error")return null;if(R.kind==="array"){if(I.kind==="array"&&(I.N===0&&I.itemType.kind==="value"||!bf(R.itemType,I.itemType))&&(typeof R.N!="number"||R.N===I.N))return null}else{if(R.kind===I.kind)return null;if(R.kind==="value")for(var $=0,he=tc;$<he.length;$+=1){var ke=he[$];if(!bf(ke,I))return null}}return"Expected "+Yl(R)+" but found "+Yl(I)+" instead."}function Qc(R,I){return I.some(function($){return $.kind===R.kind})}function ff(R,I){return I.some(function($){return $==="null"?R===null:$==="array"?Array.isArray(R):$==="object"?R&&!Array.isArray(R)&&typeof R=="object":$===typeof R})}var Wh=r(function(R,I){var $={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function he(vr){return vr=Math.round(vr),vr<0?0:vr>255?255:vr}function ke(vr){return vr<0?0:vr>1?1:vr}function qe(vr){return vr[vr.length-1]==="%"?he(parseFloat(vr)/100*255):he(parseInt(vr))}function et(vr){return vr[vr.length-1]==="%"?ke(parseFloat(vr)/100):ke(parseFloat(vr))}function Et(vr,Ar,Zr){return Zr<0?Zr+=1:Zr>1&&(Zr-=1),Zr*6<1?vr+(Ar-vr)*Zr*6:Zr*2<1?Ar:Zr*3<2?vr+(Ar-vr)*(2/3-Zr)*6:vr}function Jt(vr){var Ar=vr.replace(/ /g,"").toLowerCase();if(Ar in $)return $[Ar].slice();if(Ar[0]==="#"){if(Ar.length===4){var Zr=parseInt(Ar.substr(1),16);return Zr>=0&&Zr<=4095?[(Zr&3840)>>4|(Zr&3840)>>8,Zr&240|(Zr&240)>>4,Zr&15|(Zr&15)<<4,1]:null}else if(Ar.length===7){var Zr=parseInt(Ar.substr(1),16);return Zr>=0&&Zr<=16777215?[(Zr&16711680)>>16,(Zr&65280)>>8,Zr&255,1]:null}return null}var mn=Ar.indexOf("("),fn=Ar.indexOf(")");if(mn!==-1&&fn+1===Ar.length){var On=Ar.substr(0,mn),da=Ar.substr(mn+1,fn-(mn+1)).split(","),li=1;switch(On){case"rgba":if(da.length!==4)return null;li=et(da.pop());case"rgb":return da.length!==3?null:[qe(da[0]),qe(da[1]),qe(da[2]),li];case"hsla":if(da.length!==4)return null;li=et(da.pop());case"hsl":if(da.length!==3)return null;var Va=(parseFloat(da[0])%360+360)%360/360,Ni=et(da[1]),_i=et(da[2]),Oi=_i<=.5?_i*(Ni+1):_i+Ni-_i*Ni,Xi=_i*2-Oi;return[he(Et(Xi,Oi,Va+1/3)*255),he(Et(Xi,Oi,Va)*255),he(Et(Xi,Oi,Va-1/3)*255),li];default:return null}}return null}try{I.parseCSSColor=Jt}catch{}}),Dh=Wh.parseCSSColor,Ll=function(I,$,he,ke){ke===void 0&&(ke=1),this.r=I,this.g=$,this.b=he,this.a=ke};Ll.parse=function(I){if(I){if(I instanceof Ll)return I;if(typeof I=="string"){var $=Dh(I);if($)return new Ll($[0]/255*$[3],$[1]/255*$[3],$[2]/255*$[3],$[3])}}},Ll.prototype.toString=function(){var I=this.toArray(),$=I[0],he=I[1],ke=I[2],qe=I[3];return"rgba("+Math.round($)+","+Math.round(he)+","+Math.round(ke)+","+qe+")"},Ll.prototype.toArray=function(){var I=this,$=I.r,he=I.g,ke=I.b,qe=I.a;return qe===0?[0,0,0,0]:[$*255/qe,he*255/qe,ke*255/qe,qe]},Ll.black=new Ll(0,0,0,1),Ll.white=new Ll(1,1,1,1),Ll.transparent=new Ll(0,0,0,0),Ll.red=new Ll(1,0,0,1);var jc=function(I,$,he){I?this.sensitivity=$?"variant":"case":this.sensitivity=$?"accent":"base",this.locale=he,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};jc.prototype.compare=function(I,$){return this.collator.compare(I,$)},jc.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Yh=function(I,$,he,ke,qe){this.text=I,this.image=$,this.scale=he,this.fontStack=ke,this.textColor=qe},hc=function(I){this.sections=I};hc.fromString=function(I){return new hc([new Yh(I,null,null,null,null)])},hc.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(I){return I.text.length!==0||I.image&&I.image.name.length!==0})},hc.factory=function(I){return I instanceof hc?I:hc.fromString(I)},hc.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(I){return I.text}).join("")},hc.prototype.serialize=function(){for(var I=["format"],$=0,he=this.sections;$<he.length;$+=1){var ke=he[$];if(ke.image){I.push(["image",ke.image.name]);continue}I.push(ke.text);var qe={};ke.fontStack&&(qe["text-font"]=["literal",ke.fontStack.split(",")]),ke.scale&&(qe["font-scale"]=ke.scale),ke.textColor&&(qe["text-color"]=["rgba"].concat(ke.textColor.toArray())),I.push(qe)}return I};var rc=function(I){this.name=I.name,this.available=I.available};rc.prototype.toString=function(){return this.name},rc.fromString=function(I){return I?new rc({name:I,available:!1}):null},rc.prototype.serialize=function(){return["image",this.name]};function dc(R,I,$,he){if(!(typeof R=="number"&&R>=0&&R<=255&&typeof I=="number"&&I>=0&&I<=255&&typeof $=="number"&&$>=0&&$<=255)){var ke=typeof he=="number"?[R,I,$,he]:[R,I,$];return"Invalid rgba value ["+ke.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof he>"u"||typeof he=="number"&&he>=0&&he<=1?null:"Invalid rgba value ["+[R,I,$,he].join(", ")+"]: 'a' must be between 0 and 1."}function hf(R){if(R===null)return!0;if(typeof R=="string")return!0;if(typeof R=="boolean")return!0;if(typeof R=="number")return!0;if(R instanceof Ll)return!0;if(R instanceof jc)return!0;if(R instanceof hc)return!0;if(R instanceof rc)return!0;if(Array.isArray(R)){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(!hf(he))return!1}return!0}else if(typeof R=="object"){for(var ke in R)if(!hf(R[ke]))return!1;return!0}else return!1}function au(R){if(R===null)return Cu;if(typeof R=="string")return Ps;if(typeof R=="boolean")return ms;if(typeof R=="number")return yo;if(R instanceof Ll)return Kl;if(R instanceof jc)return _u;if(R instanceof hc)return Xs;if(R instanceof rc)return Pl;if(Array.isArray(R)){for(var I=R.length,$,he=0,ke=R;he<ke.length;he+=1){var qe=ke[he],et=au(qe);if(!$)$=et;else{if($===et)continue;$=Wo;break}}return Gl($||Wo,I)}else return Jl}function nc(R){var I=typeof R;return R===null?"":I==="string"||I==="number"||I==="boolean"?String(R):R instanceof Ll||R instanceof hc||R instanceof rc?R.toString():JSON.stringify(R)}var Js=function(I,$){this.type=I,this.value=$};Js.parse=function(I,$){if(I.length!==2)return $.error("'literal' expression requires exactly one argument, but found "+(I.length-1)+" instead.");if(!hf(I[1]))return $.error("invalid value");var he=I[1],ke=au(he),qe=$.expectedType;return ke.kind==="array"&&ke.N===0&&qe&&qe.kind==="array"&&(typeof qe.N!="number"||qe.N===0)&&(ke=qe),new Js(ke,he)},Js.prototype.evaluate=function(){return this.value},Js.prototype.eachChild=function(){},Js.prototype.outputDefined=function(){return!0},Js.prototype.serialize=function(){return this.type.kind==="array"||this.type.kind==="object"?["literal",this.value]:this.value instanceof Ll?["rgba"].concat(this.value.toArray()):this.value instanceof hc?this.value.serialize():this.value};var Ul=function(I){this.name="ExpressionEvaluationError",this.message=I};Ul.prototype.toJSON=function(){return this.message};var Df={string:Ps,number:yo,boolean:ms,object:Jl},Cc=function(I,$){this.type=I,this.args=$};Cc.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=1,ke,qe=I[0];if(qe==="array"){var et;if(I.length>2){var Et=I[1];if(typeof Et!="string"||!(Et in Df)||Et==="object")return $.error('The item type argument of "array" must be one of string, number, boolean',1);et=Df[Et],he++}else et=Wo;var Jt;if(I.length>3){if(I[2]!==null&&(typeof I[2]!="number"||I[2]<0||I[2]!==Math.floor(I[2])))return $.error('The length argument to "array" must be a positive integer literal',2);Jt=I[2],he++}ke=Gl(et,Jt)}else ke=Df[qe];for(var vr=[];he<I.length;he++){var Ar=$.parse(I[he],he,Wo);if(!Ar)return null;vr.push(Ar)}return new Cc(ke,vr)},Cc.prototype.evaluate=function(I){for(var $=0;$<this.args.length;$++){var he=this.args[$].evaluate(I),ke=bf(this.type,au(he));if(ke){if($===this.args.length-1)throw new Ul("Expected value to be of type "+Yl(this.type)+", but found "+Yl(au(he))+" instead.")}else return he}return null},Cc.prototype.eachChild=function(I){this.args.forEach(I)},Cc.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},Cc.prototype.serialize=function(){var I=this.type,$=[I.kind];if(I.kind==="array"){var he=I.itemType;if(he.kind==="string"||he.kind==="number"||he.kind==="boolean"){$.push(he.kind);var ke=I.N;(typeof ke=="number"||this.args.length>1)&&$.push(ke)}}return $.concat(this.args.map(function(qe){return qe.serialize()}))};var Wf=function(I){this.type=Xs,this.sections=I};Wf.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=I[1];if(!Array.isArray(he)&&typeof he=="object")return $.error("First argument must be an image or text section.");for(var ke=[],qe=!1,et=1;et<=I.length-1;++et){var Et=I[et];if(qe&&typeof Et=="object"&&!Array.isArray(Et)){qe=!1;var Jt=null;if(Et["font-scale"]&&(Jt=$.parse(Et["font-scale"],1,yo),!Jt))return null;var vr=null;if(Et["text-font"]&&(vr=$.parse(Et["text-font"],1,Gl(Ps)),!vr))return null;var Ar=null;if(Et["text-color"]&&(Ar=$.parse(Et["text-color"],1,Kl),!Ar))return null;var Zr=ke[ke.length-1];Zr.scale=Jt,Zr.font=vr,Zr.textColor=Ar}else{var mn=$.parse(I[et],1,Wo);if(!mn)return null;var fn=mn.type.kind;if(fn!=="string"&&fn!=="value"&&fn!=="null"&&fn!=="resolvedImage")return $.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");qe=!0,ke.push({content:mn,scale:null,font:null,textColor:null})}}return new Wf(ke)},Wf.prototype.evaluate=function(I){var $=function(he){var ke=he.content.evaluate(I);return au(ke)===Pl?new Yh("",ke,null,null,null):new Yh(nc(ke),null,he.scale?he.scale.evaluate(I):null,he.font?he.font.evaluate(I).join(","):null,he.textColor?he.textColor.evaluate(I):null)};return new hc(this.sections.map($))},Wf.prototype.eachChild=function(I){for(var $=0,he=this.sections;$<he.length;$+=1){var ke=he[$];I(ke.content),ke.scale&&I(ke.scale),ke.font&&I(ke.font),ke.textColor&&I(ke.textColor)}},Wf.prototype.outputDefined=function(){return!1},Wf.prototype.serialize=function(){for(var I=["format"],$=0,he=this.sections;$<he.length;$+=1){var ke=he[$];I.push(ke.content.serialize());var qe={};ke.scale&&(qe["font-scale"]=ke.scale.serialize()),ke.font&&(qe["text-font"]=ke.font.serialize()),ke.textColor&&(qe["text-color"]=ke.textColor.serialize()),I.push(qe)}return I};var mu=function(I){this.type=Pl,this.input=I};mu.parse=function(I,$){if(I.length!==2)return $.error("Expected two arguments.");var he=$.parse(I[1],1,Ps);return he?new mu(he):$.error("No image name provided.")},mu.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=rc.fromString($);return he&&I.availableImages&&(he.available=I.availableImages.indexOf($)>-1),he},mu.prototype.eachChild=function(I){I(this.input)},mu.prototype.outputDefined=function(){return!1},mu.prototype.serialize=function(){return["image",this.input.serialize()]};var Vd={"to-boolean":ms,"to-color":Kl,"to-number":yo,"to-string":Ps},Ws=function(I,$){this.type=I,this.args=$};Ws.parse=function(I,$){if(I.length<2)return $.error("Expected at least one argument.");var he=I[0];if((he==="to-boolean"||he==="to-string")&&I.length!==2)return $.error("Expected one argument.");for(var ke=Vd[he],qe=[],et=1;et<I.length;et++){var Et=$.parse(I[et],et,Wo);if(!Et)return null;qe.push(Et)}return new Ws(ke,qe)},Ws.prototype.evaluate=function(I){if(this.type.kind==="boolean")return!!this.args[0].evaluate(I);if(this.type.kind==="color"){for(var $,he,ke=0,qe=this.args;ke<qe.length;ke+=1){var et=qe[ke];if($=et.evaluate(I),he=null,$ instanceof Ll)return $;if(typeof $=="string"){var Et=I.parseColor($);if(Et)return Et}else if(Array.isArray($)&&($.length<3||$.length>4?he="Invalid rbga value "+JSON.stringify($)+": expected an array containing either three or four numeric values.":he=dc($[0],$[1],$[2],$[3]),!he))return new Ll($[0]/255,$[1]/255,$[2]/255,$[3])}throw new Ul(he||"Could not parse color from value '"+(typeof $=="string"?$:String(JSON.stringify($)))+"'")}else if(this.type.kind==="number"){for(var Jt=null,vr=0,Ar=this.args;vr<Ar.length;vr+=1){var Zr=Ar[vr];if(Jt=Zr.evaluate(I),Jt===null)return 0;var mn=Number(Jt);if(!isNaN(mn))return mn}throw new Ul("Could not convert "+JSON.stringify(Jt)+" to number.")}else return this.type.kind==="formatted"?hc.fromString(nc(this.args[0].evaluate(I))):this.type.kind==="resolvedImage"?rc.fromString(nc(this.args[0].evaluate(I))):nc(this.args[0].evaluate(I))},Ws.prototype.eachChild=function(I){this.args.forEach(I)},Ws.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},Ws.prototype.serialize=function(){if(this.type.kind==="formatted")return new Wf([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if(this.type.kind==="resolvedImage")return new mu(this.args[0]).serialize();var I=["to-"+this.type.kind];return this.eachChild(function($){I.push($.serialize())}),I};var cv=["Unknown","Point","LineString","Polygon"],Tl=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Tl.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Tl.prototype.geometryType=function(){return this.feature?typeof this.feature.type=="number"?cv[this.feature.type]:this.feature.type:null},Tl.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Tl.prototype.canonicalID=function(){return this.canonical},Tl.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Tl.prototype.parseColor=function(I){var $=this._parseColorCache[I];return $||($=this._parseColorCache[I]=Ll.parse(I)),$};var Zo=function(I,$,he,ke){this.name=I,this.type=$,this._evaluate=he,this.args=ke};Zo.prototype.evaluate=function(I){return this._evaluate(I,this.args)},Zo.prototype.eachChild=function(I){this.args.forEach(I)},Zo.prototype.outputDefined=function(){return!1},Zo.prototype.serialize=function(){return[this.name].concat(this.args.map(function(I){return I.serialize()}))},Zo.parse=function(I,$){var he,ke=I[0],qe=Zo.definitions[ke];if(!qe)return $.error('Unknown expression "'+ke+'". If you wanted a literal array, use ["literal", [...]].',0);for(var et=Array.isArray(qe)?qe[0]:qe.type,Et=Array.isArray(qe)?[[qe[1],qe[2]]]:qe.overloads,Jt=Et.filter(function(Ts){var ks=Ts[0];return!Array.isArray(ks)||ks.length===I.length-1}),vr=null,Ar=0,Zr=Jt;Ar<Zr.length;Ar+=1){var mn=Zr[Ar],fn=mn[0],On=mn[1];vr=new iu($.registry,$.path,null,$.scope);for(var da=[],li=!1,Va=1;Va<I.length;Va++){var Ni=I[Va],_i=Array.isArray(fn)?fn[Va-1]:fn.type,Oi=vr.parse(Ni,1+da.length,_i);if(!Oi){li=!0;break}da.push(Oi)}if(!li){if(Array.isArray(fn)&&fn.length!==da.length){vr.error("Expected "+fn.length+" arguments, but found "+da.length+" instead.");continue}for(var Xi=0;Xi<da.length;Xi++){var mo=Array.isArray(fn)?fn[Xi]:fn.type,No=da[Xi];vr.concat(Xi+1).checkSubtype(mo,No.type)}if(vr.errors.length===0)return new Zo(ke,et,On,da)}}if(Jt.length===1)(he=$.errors).push.apply(he,vr.errors);else{for(var Io=Jt.length?Jt:Et,ws=Io.map(function(Ts){var ks=Ts[0];return dh(ks)}).join(" | "),Jo=[],fs=1;fs<I.length;fs++){var wl=$.parse(I[fs],1+Jo.length);if(!wl)return null;Jo.push(Yl(wl.type))}$.error("Expected arguments of type "+ws+", but found ("+Jo.join(", ")+") instead.")}return null},Zo.register=function(I,$){Zo.definitions=$;for(var he in $)I[he]=Zo};function dh(R){return Array.isArray(R)?"("+R.map(Yl).join(", ")+")":"("+Yl(R.type)+"...)"}var df=function(I,$,he){this.type=_u,this.locale=he,this.caseSensitive=I,this.diacriticSensitive=$};df.parse=function(I,$){if(I.length!==2)return $.error("Expected one argument.");var he=I[1];if(typeof he!="object"||Array.isArray(he))return $.error("Collator options argument must be an object.");var ke=$.parse(he["case-sensitive"]===void 0?!1:he["case-sensitive"],1,ms);if(!ke)return null;var qe=$.parse(he["diacritic-sensitive"]===void 0?!1:he["diacritic-sensitive"],1,ms);if(!qe)return null;var et=null;return he.locale&&(et=$.parse(he.locale,1,Ps),!et)?null:new df(ke,qe,et)},df.prototype.evaluate=function(I){return new jc(this.caseSensitive.evaluate(I),this.diacriticSensitive.evaluate(I),this.locale?this.locale.evaluate(I):null)},df.prototype.eachChild=function(I){I(this.caseSensitive),I(this.diacriticSensitive),this.locale&&I(this.locale)},df.prototype.outputDefined=function(){return!1},df.prototype.serialize=function(){var I={};return I["case-sensitive"]=this.caseSensitive.serialize(),I["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(I.locale=this.locale.serialize()),["collator",I]};var Hu=8192;function Zh(R,I){R[0]=Math.min(R[0],I[0]),R[1]=Math.min(R[1],I[1]),R[2]=Math.max(R[2],I[0]),R[3]=Math.max(R[3],I[1])}function Yf(R){return(180+R)/360}function wh(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function ac(R,I){return!(R[0]<=I[0]||R[2]>=I[2]||R[1]<=I[1]||R[3]>=I[3])}function Cd(R,I){var $=Yf(R[0]),he=wh(R[1]),ke=Math.pow(2,I.z);return[Math.round($*ke*Hu),Math.round(he*ke*Hu)]}function ad(R,I,$){var he=R[0]-I[0],ke=R[1]-I[1],qe=R[0]-$[0],et=R[1]-$[1];return he*et-qe*ke===0&&he*qe<=0&&ke*et<=0}function Th(R,I,$){return I[1]>R[1]!=$[1]>R[1]&&R[0]<($[0]-I[0])*(R[1]-I[1])/($[1]-I[1])+I[0]}function Zf(R,I){for(var $=!1,he=0,ke=I.length;he<ke;he++)for(var qe=I[he],et=0,Et=qe.length;et<Et-1;et++){if(ad(R,qe[et],qe[et+1]))return!1;Th(R,qe[et],qe[et+1])&&($=!$)}return $}function $h(R,I){for(var $=0;$<I.length;$++)if(Zf(R,I[$]))return!0;return!1}function Kh(R,I){return R[0]*I[1]-R[1]*I[0]}function vf(R,I,$,he){var ke=R[0]-$[0],qe=R[1]-$[1],et=I[0]-$[0],Et=I[1]-$[1],Jt=he[0]-$[0],vr=he[1]-$[1],Ar=ke*vr-Jt*qe,Zr=et*vr-Jt*Et;return Ar>0&&Zr<0||Ar<0&&Zr>0}function id(R,I,$,he){var ke=[I[0]-R[0],I[1]-R[1]],qe=[he[0]-$[0],he[1]-$[1]];return Kh(qe,ke)===0?!1:!!(vf(R,I,$,he)&&vf($,he,R,I))}function Of(R,I,$){for(var he=0,ke=$;he<ke.length;he+=1)for(var qe=ke[he],et=0;et<qe.length-1;++et)if(id(R,I,qe[et],qe[et+1]))return!0;return!1}function wf(R,I){for(var $=0;$<R.length;++$)if(!Zf(R[$],I))return!1;for(var he=0;he<R.length-1;++he)if(Of(R[he],R[he+1],I))return!1;return!0}function ic(R,I){for(var $=0;$<I.length;$++)if(wf(R,I[$]))return!0;return!1}function ih(R,I,$){for(var he=[],ke=0;ke<R.length;ke++){for(var qe=[],et=0;et<R[ke].length;et++){var Et=Cd(R[ke][et],$);Zh(I,Et),qe.push(Et)}he.push(qe)}return he}function Jh(R,I,$){for(var he=[],ke=0;ke<R.length;ke++){var qe=ih(R[ke],I,$);he.push(qe)}return he}function Xl(R,I,$,he){if(R[0]<$[0]||R[0]>$[2]){var ke=he*.5,qe=R[0]-$[0]>ke?-he:$[0]-R[0]>ke?he:0;qe===0&&(qe=R[0]-$[2]>ke?-he:$[2]-R[0]>ke?he:0),R[0]+=qe}Zh(I,R)}function Oh(R){R[0]=R[1]=1/0,R[2]=R[3]=-1/0}function Hd(R,I,$,he){for(var ke=Math.pow(2,he.z)*Hu,qe=[he.x*Hu,he.y*Hu],et=[],Et=0,Jt=R;Et<Jt.length;Et+=1)for(var vr=Jt[Et],Ar=0,Zr=vr;Ar<Zr.length;Ar+=1){var mn=Zr[Ar],fn=[mn.x+qe[0],mn.y+qe[1]];Xl(fn,I,$,ke),et.push(fn)}return et}function od(R,I,$,he){for(var ke=Math.pow(2,he.z)*Hu,qe=[he.x*Hu,he.y*Hu],et=[],Et=0,Jt=R;Et<Jt.length;Et+=1){for(var vr=Jt[Et],Ar=[],Zr=0,mn=vr;Zr<mn.length;Zr+=1){var fn=mn[Zr],On=[fn.x+qe[0],fn.y+qe[1]];Zh(I,On),Ar.push(On)}et.push(Ar)}if(I[2]-I[0]<=ke/2){Oh(I);for(var da=0,li=et;da<li.length;da+=1)for(var Va=li[da],Ni=0,_i=Va;Ni<_i.length;Ni+=1){var Oi=_i[Ni];Xl(Oi,I,$,ke)}}return et}function Ah(R,I){var $=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ke=R.canonicalID();if(I.type==="Polygon"){var qe=ih(I.coordinates,he,ke),et=Hd(R.geometry(),$,he,ke);if(!ac($,he))return!1;for(var Et=0,Jt=et;Et<Jt.length;Et+=1){var vr=Jt[Et];if(!Zf(vr,qe))return!1}}if(I.type==="MultiPolygon"){var Ar=Jh(I.coordinates,he,ke),Zr=Hd(R.geometry(),$,he,ke);if(!ac($,he))return!1;for(var mn=0,fn=Zr;mn<fn.length;mn+=1){var On=fn[mn];if(!$h(On,Ar))return!1}}return!0}function sd(R,I){var $=[1/0,1/0,-1/0,-1/0],he=[1/0,1/0,-1/0,-1/0],ke=R.canonicalID();if(I.type==="Polygon"){var qe=ih(I.coordinates,he,ke),et=od(R.geometry(),$,he,ke);if(!ac($,he))return!1;for(var Et=0,Jt=et;Et<Jt.length;Et+=1){var vr=Jt[Et];if(!wf(vr,qe))return!1}}if(I.type==="MultiPolygon"){var Ar=Jh(I.coordinates,he,ke),Zr=od(R.geometry(),$,he,ke);if(!ac($,he))return!1;for(var mn=0,fn=Zr;mn<fn.length;mn+=1){var On=fn[mn];if(!ic(On,Ar))return!1}}return!0}var Uc=function(I,$){this.type=ms,this.geojson=I,this.geometries=$};Uc.parse=function(I,$){if(I.length!==2)return $.error("'within' expression requires exactly one argument, but found "+(I.length-1)+" instead.");if(hf(I[1])){var he=I[1];if(he.type==="FeatureCollection")for(var ke=0;ke<he.features.length;++ke){var qe=he.features[ke].geometry.type;if(qe==="Polygon"||qe==="MultiPolygon")return new Uc(he,he.features[ke].geometry)}else if(he.type==="Feature"){var et=he.geometry.type;if(et==="Polygon"||et==="MultiPolygon")return new Uc(he,he.geometry)}else if(he.type==="Polygon"||he.type==="MultiPolygon")return new Uc(he,he)}return $.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Uc.prototype.evaluate=function(I){if(I.geometry()!=null&&I.canonicalID()!=null){if(I.geometryType()==="Point")return Ah(I,this.geometries);if(I.geometryType()==="LineString")return sd(I,this.geometries)}return!1},Uc.prototype.eachChild=function(){},Uc.prototype.outputDefined=function(){return!0},Uc.prototype.serialize=function(){return["within",this.geojson]};function ld(R){if(R instanceof Zo){if(R.name==="get"&&R.args.length===1)return!1;if(R.name==="feature-state")return!1;if(R.name==="has"&&R.args.length===1)return!1;if(R.name==="properties"||R.name==="geometry-type"||R.name==="id")return!1;if(/^filter-/.test(R.name))return!1}if(R instanceof Uc)return!1;var I=!0;return R.eachChild(function($){I&&!ld($)&&(I=!1)}),I}function Su(R){if(R instanceof Zo&&R.name==="feature-state")return!1;var I=!0;return R.eachChild(function($){I&&!Su($)&&(I=!1)}),I}function qc(R,I){if(R instanceof Zo&&I.indexOf(R.name)>=0)return!1;var $=!0;return R.eachChild(function(he){$&&!qc(he,I)&&($=!1)}),$}var $f=function(I,$){this.type=$.type,this.name=I,this.boundExpression=$};$f.parse=function(I,$){if(I.length!==2||typeof I[1]!="string")return $.error("'var' expression requires exactly one string literal argument.");var he=I[1];return $.scope.has(he)?new $f(he,$.scope.get(he)):$.error('Unknown variable "'+he+'". Make sure "'+he+'" has been bound in an enclosing "let" expression before using it.',1)},$f.prototype.evaluate=function(I){return this.boundExpression.evaluate(I)},$f.prototype.eachChild=function(){},$f.prototype.outputDefined=function(){return!1},$f.prototype.serialize=function(){return["var",this.name]};var iu=function(I,$,he,ke,qe){$===void 0&&($=[]),ke===void 0&&(ke=new yl),qe===void 0&&(qe=[]),this.registry=I,this.path=$,this.key=$.map(function(et){return"["+et+"]"}).join(""),this.scope=ke,this.errors=qe,this.expectedType=he};iu.prototype.parse=function(I,$,he,ke,qe){return qe===void 0&&(qe={}),$?this.concat($,he,ke)._parse(I,qe):this._parse(I,qe)},iu.prototype._parse=function(I,$){(I===null||typeof I=="string"||typeof I=="boolean"||typeof I=="number")&&(I=["literal",I]);function he(Ar,Zr,mn){return mn==="assert"?new Cc(Zr,[Ar]):mn==="coerce"?new Ws(Zr,[Ar]):Ar}if(Array.isArray(I)){if(I.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ke=I[0];if(typeof ke!="string")return this.error("Expression name must be a string, but found "+typeof ke+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var qe=this.registry[ke];if(qe){var et=qe.parse(I,this);if(!et)return null;if(this.expectedType){var Et=this.expectedType,Jt=et.type;if((Et.kind==="string"||Et.kind==="number"||Et.kind==="boolean"||Et.kind==="object"||Et.kind==="array")&&Jt.kind==="value")et=he(et,Et,$.typeAnnotation||"assert");else if((Et.kind==="color"||Et.kind==="formatted"||Et.kind==="resolvedImage")&&(Jt.kind==="value"||Jt.kind==="string"))et=he(et,Et,$.typeAnnotation||"coerce");else if(this.checkSubtype(Et,Jt))return null}if(!(et instanceof Js)&&et.type.kind!=="resolvedImage"&&zf(et)){var vr=new Tl;try{et=new Js(et.type,et.evaluate(vr))}catch(Ar){return this.error(Ar.message),null}}return et}return this.error('Unknown expression "'+ke+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof I>"u"?this.error("'undefined' value invalid. Use null instead."):typeof I=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof I+" instead.")},iu.prototype.concat=function(I,$,he){var ke=typeof I=="number"?this.path.concat(I):this.path,qe=he?this.scope.concat(he):this.scope;return new iu(this.registry,ke,$||null,qe,this.errors)},iu.prototype.error=function(I){for(var $=[],he=arguments.length-1;he-- >0;)$[he]=arguments[he+1];var ke=""+this.key+$.map(function(qe){return"["+qe+"]"}).join("");this.errors.push(new rl(ke,I))},iu.prototype.checkSubtype=function(I,$){var he=bf(I,$);return he&&this.error(he),he};function zf(R){if(R instanceof $f)return zf(R.boundExpression);if(R instanceof Zo&&R.name==="error")return!1;if(R instanceof df)return!1;if(R instanceof Uc)return!1;var I=R instanceof Ws||R instanceof Cc,$=!0;return R.eachChild(function(he){I?$=$&&zf(he):$=$&&he instanceof Js}),$?ld(R)&&qc(R,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function wc(R,I){for(var $=R.length-1,he=0,ke=$,qe=0,et,Et;he<=ke;)if(qe=Math.floor((he+ke)/2),et=R[qe],Et=R[qe+1],et<=I){if(qe===$||I<Et)return qe;he=qe+1}else if(et>I)ke=qe-1;else throw new Ul("Input is not a number.");return 0}var Vc=function(I,$,he){this.type=I,this.input=$,this.labels=[],this.outputs=[];for(var ke=0,qe=he;ke<qe.length;ke+=1){var et=qe[ke],Et=et[0],Jt=et[1];this.labels.push(Et),this.outputs.push(Jt)}};Vc.parse=function(I,$){if(I.length-1<4)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if((I.length-1)%2!==0)return $.error("Expected an even number of arguments.");var he=$.parse(I[1],1,yo);if(!he)return null;var ke=[],qe=null;$.expectedType&&$.expectedType.kind!=="value"&&(qe=$.expectedType);for(var et=1;et<I.length;et+=2){var Et=et===1?-1/0:I[et],Jt=I[et+1],vr=et,Ar=et+1;if(typeof Et!="number")return $.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',vr);if(ke.length&&ke[ke.length-1][0]>=Et)return $.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',vr);var Zr=$.parse(Jt,Ar,qe);if(!Zr)return null;qe=qe||Zr.type,ke.push([Et,Zr])}return new Vc(qe,he,ke)},Vc.prototype.evaluate=function(I){var $=this.labels,he=this.outputs;if($.length===1)return he[0].evaluate(I);var ke=this.input.evaluate(I);if(ke<=$[0])return he[0].evaluate(I);var qe=$.length;if(ke>=$[qe-1])return he[qe-1].evaluate(I);var et=wc($,ke);return he[et].evaluate(I)},Vc.prototype.eachChild=function(I){I(this.input);for(var $=0,he=this.outputs;$<he.length;$+=1){var ke=he[$];I(ke)}},Vc.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})},Vc.prototype.serialize=function(){for(var I=["step",this.input.serialize()],$=0;$<this.labels.length;$++)$>0&&I.push(this.labels[$]),I.push(this.outputs[$].serialize());return I};function yu(R,I,$){return R*(1-$)+I*$}function vh(R,I,$){return new Ll(yu(R.r,I.r,$),yu(R.g,I.g,$),yu(R.b,I.b,$),yu(R.a,I.a,$))}function Tf(R,I,$){return R.map(function(he,ke){return yu(he,I[ke],$)})}var Kf=Object.freeze({__proto__:null,number:yu,color:vh,array:Tf}),zh=.95047,Gd=1,Tv=1.08883,ph=4/29,Nh=6/29,ef=3*Nh*Nh,Fh=Nh*Nh*Nh,vc=Math.PI/180,mh=180/Math.PI;function ud(R){return R>Fh?Math.pow(R,1/3):R/ef+ph}function yh(R){return R>Nh?R*R*R:ef*(R-ph)}function uu(R){return 255*(R<=.0031308?12.92*R:1.055*Math.pow(R,1/2.4)-.055)}function Hc(R){return R/=255,R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function pf(R){var I=Hc(R.r),$=Hc(R.g),he=Hc(R.b),ke=ud((.4124564*I+.3575761*$+.1804375*he)/zh),qe=ud((.2126729*I+.7151522*$+.072175*he)/Gd),et=ud((.0193339*I+.119192*$+.9503041*he)/Tv);return{l:116*qe-16,a:500*(ke-qe),b:200*(qe-et),alpha:R.a}}function Qh(R){var I=(R.l+16)/116,$=isNaN(R.a)?I:I+R.a/500,he=isNaN(R.b)?I:I-R.b/200;return I=Gd*yh(I),$=zh*yh($),he=Tv*yh(he),new Ll(uu(3.2404542*$-1.5371385*I-.4985314*he),uu(-.969266*$+1.8760108*I+.041556*he),uu(.0556434*$-.2040259*I+1.0572252*he),R.alpha)}function du(R,I,$){return{l:yu(R.l,I.l,$),a:yu(R.a,I.a,$),b:yu(R.b,I.b,$),alpha:yu(R.alpha,I.alpha,$)}}function Sh(R){var I=pf(R),$=I.l,he=I.a,ke=I.b,qe=Math.atan2(ke,he)*mh;return{h:qe<0?qe+360:qe,c:Math.sqrt(he*he+ke*ke),l:$,alpha:R.a}}function Jf(R){var I=R.h*vc,$=R.c,he=R.l;return Qh({l:he,a:Math.cos(I)*$,b:Math.sin(I)*$,alpha:R.alpha})}function tf(R,I,$){var he=I-R;return R+$*(he>180||he<-180?he-360*Math.round(he/360):he)}function Eh(R,I,$){return{h:tf(R.h,I.h,$),c:yu(R.c,I.c,$),l:yu(R.l,I.l,$),alpha:yu(R.alpha,I.alpha,$)}}var Af={forward:pf,reverse:Qh,interpolate:du},Mh={forward:Sh,reverse:Jf,interpolate:Eh},Xd=Object.freeze({__proto__:null,lab:Af,hcl:Mh}),yc=function(I,$,he,ke,qe){this.type=I,this.operator=$,this.interpolation=he,this.input=ke,this.labels=[],this.outputs=[];for(var et=0,Et=qe;et<Et.length;et+=1){var Jt=Et[et],vr=Jt[0],Ar=Jt[1];this.labels.push(vr),this.outputs.push(Ar)}};yc.interpolationFactor=function(I,$,he,ke){var qe=0;if(I.name==="exponential")qe=cd($,I.base,he,ke);else if(I.name==="linear")qe=cd($,1,he,ke);else if(I.name==="cubic-bezier"){var et=I.controlPoints,Et=new l(et[0],et[1],et[2],et[3]);qe=Et.solve(cd($,1,he,ke))}return qe},yc.parse=function(I,$){var he=I[0],ke=I[1],qe=I[2],et=I.slice(3);if(!Array.isArray(ke)||ke.length===0)return $.error("Expected an interpolation type expression.",1);if(ke[0]==="linear")ke={name:"linear"};else if(ke[0]==="exponential"){var Et=ke[1];if(typeof Et!="number")return $.error("Exponential interpolation requires a numeric base.",1,1);ke={name:"exponential",base:Et}}else if(ke[0]==="cubic-bezier"){var Jt=ke.slice(1);if(Jt.length!==4||Jt.some(function(Va){return typeof Va!="number"||Va<0||Va>1}))return $.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ke={name:"cubic-bezier",controlPoints:Jt}}else return $.error("Unknown interpolation type "+String(ke[0]),1,0);if(I.length-1<4)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if((I.length-1)%2!==0)return $.error("Expected an even number of arguments.");if(qe=$.parse(qe,2,yo),!qe)return null;var vr=[],Ar=null;he==="interpolate-hcl"||he==="interpolate-lab"?Ar=Kl:$.expectedType&&$.expectedType.kind!=="value"&&(Ar=$.expectedType);for(var Zr=0;Zr<et.length;Zr+=2){var mn=et[Zr],fn=et[Zr+1],On=Zr+3,da=Zr+4;if(typeof mn!="number")return $.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',On);if(vr.length&&vr[vr.length-1][0]>=mn)return $.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',On);var li=$.parse(fn,da,Ar);if(!li)return null;Ar=Ar||li.type,vr.push([mn,li])}return Ar.kind!=="number"&&Ar.kind!=="color"&&!(Ar.kind==="array"&&Ar.itemType.kind==="number"&&typeof Ar.N=="number")?$.error("Type "+Yl(Ar)+" is not interpolatable."):new yc(Ar,he,ke,qe,vr)},yc.prototype.evaluate=function(I){var $=this.labels,he=this.outputs;if($.length===1)return he[0].evaluate(I);var ke=this.input.evaluate(I);if(ke<=$[0])return he[0].evaluate(I);var qe=$.length;if(ke>=$[qe-1])return he[qe-1].evaluate(I);var et=wc($,ke),Et=$[et],Jt=$[et+1],vr=yc.interpolationFactor(this.interpolation,ke,Et,Jt),Ar=he[et].evaluate(I),Zr=he[et+1].evaluate(I);return this.operator==="interpolate"?Kf[this.type.kind.toLowerCase()](Ar,Zr,vr):this.operator==="interpolate-hcl"?Mh.reverse(Mh.interpolate(Mh.forward(Ar),Mh.forward(Zr),vr)):Af.reverse(Af.interpolate(Af.forward(Ar),Af.forward(Zr),vr))},yc.prototype.eachChild=function(I){I(this.input);for(var $=0,he=this.outputs;$<he.length;$+=1){var ke=he[$];I(ke)}},yc.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})},yc.prototype.serialize=function(){var I;this.interpolation.name==="linear"?I=["linear"]:this.interpolation.name==="exponential"?this.interpolation.base===1?I=["linear"]:I=["exponential",this.interpolation.base]:I=["cubic-bezier"].concat(this.interpolation.controlPoints);for(var $=[this.operator,I,this.input.serialize()],he=0;he<this.labels.length;he++)$.push(this.labels[he],this.outputs[he].serialize());return $};function cd(R,I,$,he){var ke=he-$,qe=R-$;return ke===0?0:I===1?qe/ke:(Math.pow(I,qe)-1)/(Math.pow(I,ke)-1)}var rf=function(I,$){this.type=I,this.args=$};rf.parse=function(I,$){if(I.length<2)return $.error("Expectected at least one argument.");var he=null,ke=$.expectedType;ke&&ke.kind!=="value"&&(he=ke);for(var qe=[],et=0,Et=I.slice(1);et<Et.length;et+=1){var Jt=Et[et],vr=$.parse(Jt,1+qe.length,he,void 0,{typeAnnotation:"omit"});if(!vr)return null;he=he||vr.type,qe.push(vr)}var Ar=ke&&qe.some(function(Zr){return bf(ke,Zr.type)});return Ar?new rf(Wo,qe):new rf(he,qe)},rf.prototype.evaluate=function(I){for(var $=null,he=0,ke,qe=0,et=this.args;qe<et.length;qe+=1){var Et=et[qe];if(he++,$=Et.evaluate(I),$&&$ instanceof rc&&!$.available&&(ke||(ke=$.name),$=null,he===this.args.length&&($=ke)),$!==null)break}return $},rf.prototype.eachChild=function(I){this.args.forEach(I)},rf.prototype.outputDefined=function(){return this.args.every(function(I){return I.outputDefined()})},rf.prototype.serialize=function(){var I=["coalesce"];return this.eachChild(function($){I.push($.serialize())}),I};var Nf=function(I,$){this.type=$.type,this.bindings=[].concat(I),this.result=$};Nf.prototype.evaluate=function(I){return this.result.evaluate(I)},Nf.prototype.eachChild=function(I){for(var $=0,he=this.bindings;$<he.length;$+=1){var ke=he[$];I(ke[1])}I(this.result)},Nf.parse=function(I,$){if(I.length<4)return $.error("Expected at least 3 arguments, but found "+(I.length-1)+" instead.");for(var he=[],ke=1;ke<I.length-1;ke+=2){var qe=I[ke];if(typeof qe!="string")return $.error("Expected string, but found "+typeof qe+" instead.",ke);if(/[^a-zA-Z0-9_]/.test(qe))return $.error("Variable names must contain only alphanumeric characters or '_'.",ke);var et=$.parse(I[ke+1],ke+1);if(!et)return null;he.push([qe,et])}var Et=$.parse(I[I.length-1],I.length-1,$.expectedType,he);return Et?new Nf(he,Et):null},Nf.prototype.outputDefined=function(){return this.result.outputDefined()},Nf.prototype.serialize=function(){for(var I=["let"],$=0,he=this.bindings;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];I.push(qe,et.serialize())}return I.push(this.result.serialize()),I};var Sf=function(I,$,he){this.type=I,this.index=$,this.input=he};Sf.parse=function(I,$){if(I.length!==3)return $.error("Expected 2 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,yo),ke=$.parse(I[2],2,Gl($.expectedType||Wo));if(!he||!ke)return null;var qe=ke.type;return new Sf(qe.itemType,he,ke)},Sf.prototype.evaluate=function(I){var $=this.index.evaluate(I),he=this.input.evaluate(I);if($<0)throw new Ul("Array index out of bounds: "+$+" < 0.");if($>=he.length)throw new Ul("Array index out of bounds: "+$+" > "+(he.length-1)+".");if($!==Math.floor($))throw new Ul("Array index must be an integer, but found "+$+" instead.");return he[$]},Sf.prototype.eachChild=function(I){I(this.index),I(this.input)},Sf.prototype.outputDefined=function(){return!1},Sf.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ku=function(I,$){this.type=ms,this.needle=I,this.haystack=$};ku.parse=function(I,$){if(I.length!==3)return $.error("Expected 2 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Wo),ke=$.parse(I[2],2,Wo);return!he||!ke?null:Qc(he.type,[ms,Ps,yo,Cu,Wo])?new ku(he,ke):$.error("Expected first argument to be of type boolean, string, number or null, but found "+Yl(he.type)+" instead")},ku.prototype.evaluate=function(I){var $=this.needle.evaluate(I),he=this.haystack.evaluate(I);if(!he)return!1;if(!ff($,["boolean","string","number","null"]))throw new Ul("Expected first argument to be of type boolean, string, number or null, but found "+Yl(au($))+" instead.");if(!ff(he,["string","array"]))throw new Ul("Expected second argument to be of type array or string, but found "+Yl(au(he))+" instead.");return he.indexOf($)>=0},ku.prototype.eachChild=function(I){I(this.needle),I(this.haystack)},ku.prototype.outputDefined=function(){return!0},ku.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var kc=function(I,$,he){this.type=yo,this.needle=I,this.haystack=$,this.fromIndex=he};kc.parse=function(I,$){if(I.length<=2||I.length>=5)return $.error("Expected 3 or 4 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Wo),ke=$.parse(I[2],2,Wo);if(!he||!ke)return null;if(!Qc(he.type,[ms,Ps,yo,Cu,Wo]))return $.error("Expected first argument to be of type boolean, string, number or null, but found "+Yl(he.type)+" instead");if(I.length===4){var qe=$.parse(I[3],3,yo);return qe?new kc(he,ke,qe):null}else return new kc(he,ke)},kc.prototype.evaluate=function(I){var $=this.needle.evaluate(I),he=this.haystack.evaluate(I);if(!ff($,["boolean","string","number","null"]))throw new Ul("Expected first argument to be of type boolean, string, number or null, but found "+Yl(au($))+" instead.");if(!ff(he,["string","array"]))throw new Ul("Expected second argument to be of type array or string, but found "+Yl(au(he))+" instead.");if(this.fromIndex){var ke=this.fromIndex.evaluate(I);return he.indexOf($,ke)}return he.indexOf($)},kc.prototype.eachChild=function(I){I(this.needle),I(this.haystack),this.fromIndex&&I(this.fromIndex)},kc.prototype.outputDefined=function(){return!1},kc.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var I=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),I]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var xu=function(I,$,he,ke,qe,et){this.inputType=I,this.type=$,this.input=he,this.cases=ke,this.outputs=qe,this.otherwise=et};xu.parse=function(I,$){if(I.length<5)return $.error("Expected at least 4 arguments, but found only "+(I.length-1)+".");if(I.length%2!==1)return $.error("Expected an even number of arguments.");var he,ke;$.expectedType&&$.expectedType.kind!=="value"&&(ke=$.expectedType);for(var qe={},et=[],Et=2;Et<I.length-1;Et+=2){var Jt=I[Et],vr=I[Et+1];Array.isArray(Jt)||(Jt=[Jt]);var Ar=$.concat(Et);if(Jt.length===0)return Ar.error("Expected at least one branch label.");for(var Zr=0,mn=Jt;Zr<mn.length;Zr+=1){var fn=mn[Zr];if(typeof fn!="number"&&typeof fn!="string")return Ar.error("Branch labels must be numbers or strings.");if(typeof fn=="number"&&Math.abs(fn)>Number.MAX_SAFE_INTEGER)return Ar.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof fn=="number"&&Math.floor(fn)!==fn)return Ar.error("Numeric branch labels must be integer values.");if(!he)he=au(fn);else if(Ar.checkSubtype(he,au(fn)))return null;if(typeof qe[String(fn)]<"u")return Ar.error("Branch labels must be unique.");qe[String(fn)]=et.length}var On=$.parse(vr,Et,ke);if(!On)return null;ke=ke||On.type,et.push(On)}var da=$.parse(I[1],1,Wo);if(!da)return null;var li=$.parse(I[I.length-1],I.length-1,ke);return!li||da.type.kind!=="value"&&$.concat(1).checkSubtype(he,da.type)?null:new xu(he,ke,da,qe,et,li)},xu.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=au($)===this.inputType&&this.outputs[this.cases[$]]||this.otherwise;return he.evaluate(I)},xu.prototype.eachChild=function(I){I(this.input),this.outputs.forEach(I),I(this.otherwise)},xu.prototype.outputDefined=function(){return this.outputs.every(function(I){return I.outputDefined()})&&this.otherwise.outputDefined()},xu.prototype.serialize=function(){for(var I=this,$=["match",this.input.serialize()],he=Object.keys(this.cases).sort(),ke=[],qe={},et=0,Et=he;et<Et.length;et+=1){var Jt=Et[et],vr=qe[this.cases[Jt]];vr===void 0?(qe[this.cases[Jt]]=ke.length,ke.push([this.cases[Jt],[Jt]])):ke[vr][1].push(Jt)}for(var Ar=function(da){return I.inputType.kind==="number"?Number(da):da},Zr=0,mn=ke;Zr<mn.length;Zr+=1){var fn=mn[Zr],vr=fn[0],On=fn[1];On.length===1?$.push(Ar(On[0])):$.push(On.map(Ar)),$.push(this.outputs[outputIndex$1].serialize())}return $.push(this.otherwise.serialize()),$};var Qf=function(I,$,he){this.type=I,this.branches=$,this.otherwise=he};Qf.parse=function(I,$){if(I.length<4)return $.error("Expected at least 3 arguments, but found only "+(I.length-1)+".");if(I.length%2!==0)return $.error("Expected an odd number of arguments.");var he;$.expectedType&&$.expectedType.kind!=="value"&&(he=$.expectedType);for(var ke=[],qe=1;qe<I.length-1;qe+=2){var et=$.parse(I[qe],qe,ms);if(!et)return null;var Et=$.parse(I[qe+1],qe+1,he);if(!Et)return null;ke.push([et,Et]),he=he||Et.type}var Jt=$.parse(I[I.length-1],I.length-1,he);return Jt?new Qf(he,ke,Jt):null},Qf.prototype.evaluate=function(I){for(var $=0,he=this.branches;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];if(qe.evaluate(I))return et.evaluate(I)}return this.otherwise.evaluate(I)},Qf.prototype.eachChild=function(I){for(var $=0,he=this.branches;$<he.length;$+=1){var ke=he[$],qe=ke[0],et=ke[1];I(qe),I(et)}I(this.otherwise)},Qf.prototype.outputDefined=function(){return this.branches.every(function(I){I[0];var $=I[1];return $.outputDefined()})&&this.otherwise.outputDefined()},Qf.prototype.serialize=function(){var I=["case"];return this.eachChild(function($){I.push($.serialize())}),I};var Ef=function(I,$,he,ke){this.type=I,this.input=$,this.beginIndex=he,this.endIndex=ke};Ef.parse=function(I,$){if(I.length<=2||I.length>=5)return $.error("Expected 3 or 4 arguments, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1,Wo),ke=$.parse(I[2],2,yo);if(!he||!ke)return null;if(!Qc(he.type,[Gl(Wo),Ps,Wo]))return $.error("Expected first argument to be of type array or string, but found "+Yl(he.type)+" instead");if(I.length===4){var qe=$.parse(I[3],3,yo);return qe?new Ef(he.type,he,ke,qe):null}else return new Ef(he.type,he,ke)},Ef.prototype.evaluate=function(I){var $=this.input.evaluate(I),he=this.beginIndex.evaluate(I);if(!ff($,["string","array"]))throw new Ul("Expected first argument to be of type array or string, but found "+Yl(au($))+" instead.");if(this.endIndex){var ke=this.endIndex.evaluate(I);return $.slice(he,ke)}return $.slice(he)},Ef.prototype.eachChild=function(I){I(this.input),I(this.beginIndex),this.endIndex&&I(this.endIndex)},Ef.prototype.outputDefined=function(){return!1},Ef.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var I=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),I]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function ed(R,I){return R==="=="||R==="!="?I.kind==="boolean"||I.kind==="string"||I.kind==="number"||I.kind==="null"||I.kind==="value":I.kind==="string"||I.kind==="number"||I.kind==="value"}function wr(R,I,$){return I===$}function Hr(R,I,$){return I!==$}function kn(R,I,$){return I<$}function _n(R,I,$){return I>$}function $n(R,I,$){return I<=$}function Ga(R,I,$){return I>=$}function Ba(R,I,$,he){return he.compare(I,$)===0}function wi(R,I,$,he){return!Ba(R,I,$,he)}function ki(R,I,$,he){return he.compare(I,$)<0}function to(R,I,$,he){return he.compare(I,$)>0}function ci(R,I,$,he){return he.compare(I,$)<=0}function qi(R,I,$,he){return he.compare(I,$)>=0}function xi(R,I,$){var he=R!=="=="&&R!=="!=";return(function(){function ke(qe,et,Et){this.type=ms,this.lhs=qe,this.rhs=et,this.collator=Et,this.hasUntypedArgument=qe.type.kind==="value"||et.type.kind==="value"}return ke.parse=function(et,Et){if(et.length!==3&&et.length!==4)return Et.error("Expected two or three arguments.");var Jt=et[0],vr=Et.parse(et[1],1,Wo);if(!vr)return null;if(!ed(Jt,vr.type))return Et.concat(1).error('"'+Jt+`" comparisons are not supported for type '`+Yl(vr.type)+"'.");var Ar=Et.parse(et[2],2,Wo);if(!Ar)return null;if(!ed(Jt,Ar.type))return Et.concat(2).error('"'+Jt+`" comparisons are not supported for type '`+Yl(Ar.type)+"'.");if(vr.type.kind!==Ar.type.kind&&vr.type.kind!=="value"&&Ar.type.kind!=="value")return Et.error("Cannot compare types '"+Yl(vr.type)+"' and '"+Yl(Ar.type)+"'.");he&&(vr.type.kind==="value"&&Ar.type.kind!=="value"?vr=new Cc(Ar.type,[vr]):vr.type.kind!=="value"&&Ar.type.kind==="value"&&(Ar=new Cc(vr.type,[Ar])));var Zr=null;if(et.length===4){if(vr.type.kind!=="string"&&Ar.type.kind!=="string"&&vr.type.kind!=="value"&&Ar.type.kind!=="value")return Et.error("Cannot use collator to compare non-string types.");if(Zr=Et.parse(et[3],3,_u),!Zr)return null}return new ke(vr,Ar,Zr)},ke.prototype.evaluate=function(et){var Et=this.lhs.evaluate(et),Jt=this.rhs.evaluate(et);if(he&&this.hasUntypedArgument){var vr=au(Et),Ar=au(Jt);if(vr.kind!==Ar.kind||!(vr.kind==="string"||vr.kind==="number"))throw new Ul('Expected arguments for "'+R+'" to be (string, string) or (number, number), but found ('+vr.kind+", "+Ar.kind+") instead.")}if(this.collator&&!he&&this.hasUntypedArgument){var Zr=au(Et),mn=au(Jt);if(Zr.kind!=="string"||mn.kind!=="string")return I(et,Et,Jt)}return this.collator?$(et,Et,Jt,this.collator.evaluate(et)):I(et,Et,Jt)},ke.prototype.eachChild=function(et){et(this.lhs),et(this.rhs),this.collator&&et(this.collator)},ke.prototype.outputDefined=function(){return!0},ke.prototype.serialize=function(){var et=[R];return this.eachChild(function(Et){et.push(Et.serialize())}),et},ke})()}var oi=xi("==",wr,Ba),fo=xi("!=",Hr,wi),Qo=xi("<",kn,ki),Yo=xi(">",_n,to),is=xi("<=",$n,ci),ts=xi(">=",Ga,qi),vo=function(I,$,he,ke,qe){this.type=Ps,this.number=I,this.locale=$,this.currency=he,this.minFractionDigits=ke,this.maxFractionDigits=qe};vo.parse=function(I,$){if(I.length!==3)return $.error("Expected two arguments.");var he=$.parse(I[1],1,yo);if(!he)return null;var ke=I[2];if(typeof ke!="object"||Array.isArray(ke))return $.error("NumberFormat options argument must be an object.");var qe=null;if(ke.locale&&(qe=$.parse(ke.locale,1,Ps),!qe))return null;var et=null;if(ke.currency&&(et=$.parse(ke.currency,1,Ps),!et))return null;var Et=null;if(ke["min-fraction-digits"]&&(Et=$.parse(ke["min-fraction-digits"],1,yo),!Et))return null;var Jt=null;return ke["max-fraction-digits"]&&(Jt=$.parse(ke["max-fraction-digits"],1,yo),!Jt)?null:new vo(he,qe,et,Et,Jt)},vo.prototype.evaluate=function(I){return new Intl.NumberFormat(this.locale?this.locale.evaluate(I):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(I):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(I):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(I):void 0}).format(this.number.evaluate(I))},vo.prototype.eachChild=function(I){I(this.number),this.locale&&I(this.locale),this.currency&&I(this.currency),this.minFractionDigits&&I(this.minFractionDigits),this.maxFractionDigits&&I(this.maxFractionDigits)},vo.prototype.outputDefined=function(){return!1},vo.prototype.serialize=function(){var I={};return this.locale&&(I.locale=this.locale.serialize()),this.currency&&(I.currency=this.currency.serialize()),this.minFractionDigits&&(I["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(I["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),I]};var Yi=function(I){this.type=yo,this.input=I};Yi.parse=function(I,$){if(I.length!==2)return $.error("Expected 1 argument, but found "+(I.length-1)+" instead.");var he=$.parse(I[1],1);return he?he.type.kind!=="array"&&he.type.kind!=="string"&&he.type.kind!=="value"?$.error("Expected argument of type string or array, but found "+Yl(he.type)+" instead."):new Yi(he):null},Yi.prototype.evaluate=function(I){var $=this.input.evaluate(I);if(typeof $=="string")return $.length;if(Array.isArray($))return $.length;throw new Ul("Expected value to be of type string or array, but found "+Yl(au($))+" instead.")},Yi.prototype.eachChild=function(I){I(this.input)},Yi.prototype.outputDefined=function(){return!1},Yi.prototype.serialize=function(){var I=["length"];return this.eachChild(function($){I.push($.serialize())}),I};var ys={"==":oi,"!=":fo,">":Yo,"<":Qo,">=":ts,"<=":is,array:Cc,at:Sf,boolean:Cc,case:Qf,coalesce:rf,collator:df,format:Wf,image:mu,in:ku,"index-of":kc,interpolate:yc,"interpolate-hcl":yc,"interpolate-lab":yc,length:Yi,let:Nf,literal:Js,match:xu,number:Cc,"number-format":vo,object:Cc,slice:Ef,step:Vc,string:Cc,"to-boolean":Ws,"to-color":Ws,"to-number":Ws,"to-string":Ws,var:$f,within:Uc};function Ys(R,I){var $=I[0],he=I[1],ke=I[2],qe=I[3];$=$.evaluate(R),he=he.evaluate(R),ke=ke.evaluate(R);var et=qe?qe.evaluate(R):1,Et=dc($,he,ke,et);if(Et)throw new Ul(Et);return new Ll($/255*et,he/255*et,ke/255*et,et)}function Rl(R,I){return R in I}function Ql(R,I){var $=I[R];return typeof $>"u"?null:$}function Dl(R,I,$,he){for(;$<=he;){var ke=$+he>>1;if(I[ke]===R)return!0;I[ke]>R?he=ke-1:$=ke+1}return!1}function eu(R){return{type:R}}Zo.register(ys,{error:[pu,[Ps],function(R,I){var $=I[0];throw new Ul($.evaluate(R))}],typeof:[Ps,[Wo],function(R,I){var $=I[0];return Yl(au($.evaluate(R)))}],"to-rgba":[Gl(yo,4),[Kl],function(R,I){var $=I[0];return $.evaluate(R).toArray()}],rgb:[Kl,[yo,yo,yo],Ys],rgba:[Kl,[yo,yo,yo,yo],Ys],has:{type:ms,overloads:[[[Ps],function(R,I){var $=I[0];return Rl($.evaluate(R),R.properties())}],[[Ps,Jl],function(R,I){var $=I[0],he=I[1];return Rl($.evaluate(R),he.evaluate(R))}]]},get:{type:Wo,overloads:[[[Ps],function(R,I){var $=I[0];return Ql($.evaluate(R),R.properties())}],[[Ps,Jl],function(R,I){var $=I[0],he=I[1];return Ql($.evaluate(R),he.evaluate(R))}]]},"feature-state":[Wo,[Ps],function(R,I){var $=I[0];return Ql($.evaluate(R),R.featureState||{})}],properties:[Jl,[],function(R){return R.properties()}],"geometry-type":[Ps,[],function(R){return R.geometryType()}],id:[Wo,[],function(R){return R.id()}],zoom:[yo,[],function(R){return R.globals.zoom}],"heatmap-density":[yo,[],function(R){return R.globals.heatmapDensity||0}],"line-progress":[yo,[],function(R){return R.globals.lineProgress||0}],accumulated:[Wo,[],function(R){return R.globals.accumulated===void 0?null:R.globals.accumulated}],"+":[yo,eu(yo),function(R,I){for(var $=0,he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];$+=qe.evaluate(R)}return $}],"*":[yo,eu(yo),function(R,I){for(var $=1,he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];$*=qe.evaluate(R)}return $}],"-":{type:yo,overloads:[[[yo,yo],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)-he.evaluate(R)}],[[yo],function(R,I){var $=I[0];return-$.evaluate(R)}]]},"/":[yo,[yo,yo],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)/he.evaluate(R)}],"%":[yo,[yo,yo],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)%he.evaluate(R)}],ln2:[yo,[],function(){return Math.LN2}],pi:[yo,[],function(){return Math.PI}],e:[yo,[],function(){return Math.E}],"^":[yo,[yo,yo],function(R,I){var $=I[0],he=I[1];return Math.pow($.evaluate(R),he.evaluate(R))}],sqrt:[yo,[yo],function(R,I){var $=I[0];return Math.sqrt($.evaluate(R))}],log10:[yo,[yo],function(R,I){var $=I[0];return Math.log($.evaluate(R))/Math.LN10}],ln:[yo,[yo],function(R,I){var $=I[0];return Math.log($.evaluate(R))}],log2:[yo,[yo],function(R,I){var $=I[0];return Math.log($.evaluate(R))/Math.LN2}],sin:[yo,[yo],function(R,I){var $=I[0];return Math.sin($.evaluate(R))}],cos:[yo,[yo],function(R,I){var $=I[0];return Math.cos($.evaluate(R))}],tan:[yo,[yo],function(R,I){var $=I[0];return Math.tan($.evaluate(R))}],asin:[yo,[yo],function(R,I){var $=I[0];return Math.asin($.evaluate(R))}],acos:[yo,[yo],function(R,I){var $=I[0];return Math.acos($.evaluate(R))}],atan:[yo,[yo],function(R,I){var $=I[0];return Math.atan($.evaluate(R))}],min:[yo,eu(yo),function(R,I){return Math.min.apply(Math,I.map(function($){return $.evaluate(R)}))}],max:[yo,eu(yo),function(R,I){return Math.max.apply(Math,I.map(function($){return $.evaluate(R)}))}],abs:[yo,[yo],function(R,I){var $=I[0];return Math.abs($.evaluate(R))}],round:[yo,[yo],function(R,I){var $=I[0],he=$.evaluate(R);return he<0?-Math.round(-he):Math.round(he)}],floor:[yo,[yo],function(R,I){var $=I[0];return Math.floor($.evaluate(R))}],ceil:[yo,[yo],function(R,I){var $=I[0];return Math.ceil($.evaluate(R))}],"filter-==":[ms,[Ps,Wo],function(R,I){var $=I[0],he=I[1];return R.properties()[$.value]===he.value}],"filter-id-==":[ms,[Wo],function(R,I){var $=I[0];return R.id()===$.value}],"filter-type-==":[ms,[Ps],function(R,I){var $=I[0];return R.geometryType()===$.value}],"filter-<":[ms,[Ps,Wo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke<qe}],"filter-id-<":[ms,[Wo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he<ke}],"filter->":[ms,[Ps,Wo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke>qe}],"filter-id->":[ms,[Wo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he>ke}],"filter-<=":[ms,[Ps,Wo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke<=qe}],"filter-id-<=":[ms,[Wo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he<=ke}],"filter->=":[ms,[Ps,Wo],function(R,I){var $=I[0],he=I[1],ke=R.properties()[$.value],qe=he.value;return typeof ke==typeof qe&&ke>=qe}],"filter-id->=":[ms,[Wo],function(R,I){var $=I[0],he=R.id(),ke=$.value;return typeof he==typeof ke&&he>=ke}],"filter-has":[ms,[Wo],function(R,I){var $=I[0];return $.value in R.properties()}],"filter-has-id":[ms,[],function(R){return R.id()!==null&&R.id()!==void 0}],"filter-type-in":[ms,[Gl(Ps)],function(R,I){var $=I[0];return $.value.indexOf(R.geometryType())>=0}],"filter-id-in":[ms,[Gl(Wo)],function(R,I){var $=I[0];return $.value.indexOf(R.id())>=0}],"filter-in-small":[ms,[Ps,Gl(Wo)],function(R,I){var $=I[0],he=I[1];return he.value.indexOf(R.properties()[$.value])>=0}],"filter-in-large":[ms,[Ps,Gl(Wo)],function(R,I){var $=I[0],he=I[1];return Dl(R.properties()[$.value],he.value,0,he.value.length-1)}],all:{type:ms,overloads:[[[ms,ms],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)&&he.evaluate(R)}],[eu(ms),function(R,I){for(var $=0,he=I;$<he.length;$+=1){var ke=he[$];if(!ke.evaluate(R))return!1}return!0}]]},any:{type:ms,overloads:[[[ms,ms],function(R,I){var $=I[0],he=I[1];return $.evaluate(R)||he.evaluate(R)}],[eu(ms),function(R,I){for(var $=0,he=I;$<he.length;$+=1){var ke=he[$];if(ke.evaluate(R))return!0}return!1}]]},"!":[ms,[ms],function(R,I){var $=I[0];return!$.evaluate(R)}],"is-supported-script":[ms,[Ps],function(R,I){var $=I[0],he=R.globals&&R.globals.isSupportedScript;return he?he($.evaluate(R)):!0}],upcase:[Ps,[Ps],function(R,I){var $=I[0];return $.evaluate(R).toUpperCase()}],downcase:[Ps,[Ps],function(R,I){var $=I[0];return $.evaluate(R).toLowerCase()}],concat:[Ps,eu(Wo),function(R,I){return I.map(function($){return nc($.evaluate(R))}).join("")}],"resolved-locale":[Ps,[_u],function(R,I){var $=I[0];return $.evaluate(R).resolvedLocale()}]});function cl(R){return{result:"success",value:R}}function Du(R){return{result:"error",value:R}}function Pu(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Zl(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Oo(R){return!!R.expression&&R.expression.interpolated}function Ls(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function ql(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)}function Al(R){return R}function Tc(R,I){var $=I.type==="color",he=R.stops&&typeof R.stops[0][0]=="object",ke=he||R.property!==void 0,qe=he||!ke,et=R.type||(Oo(I)?"exponential":"interval");if($&&(R=Vs({},R),R.stops&&(R.stops=R.stops.map(function(Io){return[Io[0],Ll.parse(Io[1])]})),R.default?R.default=Ll.parse(R.default):R.default=Ll.parse(I.default)),R.colorSpace&&R.colorSpace!=="rgb"&&!Xd[R.colorSpace])throw new Error("Unknown color space: "+R.colorSpace);var Et,Jt,vr;if(et==="exponential")Et=Sc;else if(et==="interval")Et=oh;else if(et==="categorical"){Et=Pc,Jt=Object.create(null);for(var Ar=0,Zr=R.stops;Ar<Zr.length;Ar+=1){var mn=Zr[Ar];Jt[mn[0]]=mn[1]}vr=typeof R.stops[0][0]}else if(et==="identity")Et=Ff;else throw new Error('Unknown function type "'+et+'"');if(he){for(var fn={},On=[],da=0;da<R.stops.length;da++){var li=R.stops[da],Va=li[0].zoom;fn[Va]===void 0&&(fn[Va]={zoom:Va,type:R.type,property:R.property,default:R.default,stops:[]},On.push(Va)),fn[Va].stops.push([li[0].value,li[1]])}for(var Ni=[],_i=0,Oi=On;_i<Oi.length;_i+=1){var Xi=Oi[_i];Ni.push([fn[Xi].zoom,Tc(fn[Xi],I)])}var mo={name:"linear"};return{kind:"composite",interpolationType:mo,interpolationFactor:yc.interpolationFactor.bind(void 0,mo),zoomStops:Ni.map(function(Io){return Io[0]}),evaluate:function(ws,Jo){var fs=ws.zoom;return Sc({stops:Ni,base:R.base},I,fs).evaluate(fs,Jo)}}}else if(qe){var No=et==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:No,interpolationFactor:yc.interpolationFactor.bind(void 0,No),zoomStops:R.stops.map(function(Io){return Io[0]}),evaluate:function(Io){var ws=Io.zoom;return Et(R,I,ws,Jt,vr)}}}else return{kind:"source",evaluate:function(ws,Jo){var fs=Jo&&Jo.properties?Jo.properties[R.property]:void 0;return fs===void 0?Ac(R.default,I.default):Et(R,I,fs,Jt,vr)}}}function Ac(R,I,$){if(R!==void 0)return R;if(I!==void 0)return I;if($!==void 0)return $}function Pc(R,I,$,he,ke){var qe=typeof $===ke?he[$]:void 0;return Ac(qe,R.default,I.default)}function oh(R,I,$){if(Ls($)!=="number")return Ac(R.default,I.default);var he=R.stops.length;if(he===1||$<=R.stops[0][0])return R.stops[0][1];if($>=R.stops[he-1][0])return R.stops[he-1][1];var ke=wc(R.stops.map(function(qe){return qe[0]}),$);return R.stops[ke][1]}function Sc(R,I,$){var he=R.base!==void 0?R.base:1;if(Ls($)!=="number")return Ac(R.default,I.default);var ke=R.stops.length;if(ke===1||$<=R.stops[0][0])return R.stops[0][1];if($>=R.stops[ke-1][0])return R.stops[ke-1][1];var qe=wc(R.stops.map(function(Zr){return Zr[0]}),$),et=Ou($,he,R.stops[qe][0],R.stops[qe+1][0]),Et=R.stops[qe][1],Jt=R.stops[qe+1][1],vr=Kf[I.type]||Al;if(R.colorSpace&&R.colorSpace!=="rgb"){var Ar=Xd[R.colorSpace];vr=function(Zr,mn){return Ar.reverse(Ar.interpolate(Ar.forward(Zr),Ar.forward(mn),et))}}return typeof Et.evaluate=="function"?{evaluate:function(){for(var mn=[],fn=arguments.length;fn--;)mn[fn]=arguments[fn];var On=Et.evaluate.apply(void 0,mn),da=Jt.evaluate.apply(void 0,mn);if(!(On===void 0||da===void 0))return vr(On,da,et)}}:vr(Et,Jt,et)}function Ff(R,I,$){return I.type==="color"?$=Ll.parse($):I.type==="formatted"?$=hc.fromString($.toString()):I.type==="resolvedImage"?$=rc.fromString($.toString()):Ls($)!==I.type&&(I.type!=="enum"||!I.values[$])&&($=void 0),Ac($,R.default,I.default)}function Ou(R,I,$,he){var ke=he-$,qe=R-$;return ke===0?0:I===1?qe/ke:(Math.pow(I,qe)-1)/(Math.pow(I,ke)-1)}var Bf=function(I,$){this.expression=I,this._warningHistory={},this._evaluator=new Tl,this._defaultValue=$?Oe($):null,this._enumValues=$&&$.type==="enum"?$.values:null};Bf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._evaluator.globals=I,this._evaluator.feature=$,this._evaluator.featureState=he,this._evaluator.canonical=ke,this._evaluator.availableImages=qe||null,this._evaluator.formattedSection=et,this.expression.evaluate(this._evaluator)},Bf.prototype.evaluate=function(I,$,he,ke,qe,et){this._evaluator.globals=I,this._evaluator.feature=$||null,this._evaluator.featureState=he||null,this._evaluator.canonical=ke,this._evaluator.availableImages=qe||null,this._evaluator.formattedSection=et||null;try{var Et=this.expression.evaluate(this._evaluator);if(Et==null||typeof Et=="number"&&Et!==Et)return this._defaultValue;if(this._enumValues&&!(Et in this._enumValues))throw new Ul("Expected value to be one of "+Object.keys(this._enumValues).map(function(Jt){return JSON.stringify(Jt)}).join(", ")+", but found "+JSON.stringify(Et)+" instead.");return Et}catch(Jt){return this._warningHistory[Jt.message]||(this._warningHistory[Jt.message]=!0,typeof console<"u"&&console.warn(Jt.message)),this._defaultValue}};function os(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in ys}function _s(R,I){var $=new iu(ys,[],I?Re(I):void 0),he=$.parse(R,void 0,void 0,void 0,I&&I.type==="string"?{typeAnnotation:"coerce"}:void 0);return he?cl(new Bf(he,I)):Du($.errors)}var jf=function(I,$){this.kind=I,this._styleExpression=$,this.isStateDependent=I!=="constant"&&!Su($.expression)};jf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._styleExpression.evaluateWithoutErrorHandling(I,$,he,ke,qe,et)},jf.prototype.evaluate=function(I,$,he,ke,qe,et){return this._styleExpression.evaluate(I,$,he,ke,qe,et)};var nf=function(I,$,he,ke){this.kind=I,this.zoomStops=he,this._styleExpression=$,this.isStateDependent=I!=="camera"&&!Su($.expression),this.interpolationType=ke};nf.prototype.evaluateWithoutErrorHandling=function(I,$,he,ke,qe,et){return this._styleExpression.evaluateWithoutErrorHandling(I,$,he,ke,qe,et)},nf.prototype.evaluate=function(I,$,he,ke,qe,et){return this._styleExpression.evaluate(I,$,he,ke,qe,et)},nf.prototype.interpolationFactor=function(I,$,he){return this.interpolationType?yc.interpolationFactor(this.interpolationType,I,$,he):0};function Gc(R,I){if(R=_s(R,I),R.result==="error")return R;var $=R.value.expression,he=ld($);if(!he&&!Pu(I))return Du([new rl("","data expressions not supported")]);var ke=qc($,["zoom"]);if(!ke&&!Zl(I))return Du([new rl("","zoom expressions not supported")]);var qe=fe($);if(!qe&&!ke)return Du([new rl("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(qe instanceof rl)return Du([qe]);if(qe instanceof yc&&!Oo(I))return Du([new rl("",'"interpolate" expressions cannot be used with this property')]);if(!qe)return cl(he?new jf("constant",R.value):new jf("source",R.value));var et=qe instanceof yc?qe.interpolation:void 0;return cl(he?new nf("camera",R.value,qe.labels,et):new nf("composite",R.value,qe.labels,et))}var Ze=function(I,$){this._parameters=I,this._specification=$,Vs(this,Tc(this._parameters,this._specification))};Ze.deserialize=function(I){return new Ze(I._parameters,I._specification)},Ze.serialize=function(I){return{_parameters:I._parameters,_specification:I._specification}};function O(R,I){if(ql(R))return new Ze(R,I);if(os(R)){var $=Gc(R,I);if($.result==="error")throw new Error($.value.map(function(ke){return ke.key+": "+ke.message}).join(", "));return $.value}else{var he=R;return typeof R=="string"&&I.type==="color"&&(he=Ll.parse(R)),{kind:"constant",evaluate:function(){return he}}}}function fe(R){var I=null;if(R instanceof Nf)I=fe(R.result);else if(R instanceof rf)for(var $=0,he=R.args;$<he.length;$+=1){var ke=he[$];if(I=fe(ke),I)break}else(R instanceof Vc||R instanceof yc)&&R.input instanceof Zo&&R.input.name==="zoom"&&(I=R);return I instanceof rl||R.eachChild(function(qe){var et=fe(qe);et instanceof rl?I=et:!I&&et?I=new rl("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):I&&et&&I!==et&&(I=new rl("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),I}function Re(R){var I={color:Kl,string:Ps,number:yo,enum:Ps,boolean:ms,formatted:Xs,resolvedImage:Pl};return R.type==="array"?Gl(I[R.value]||Wo,R.length):I[R.type]}function Oe(R){return R.type==="color"&&ql(R.default)?new Ll(0,0,0,0):R.type==="color"?Ll.parse(R.default)||null:R.default===void 0?null:R.default}function We(R){var I=R.key,$=R.value,he=R.valueSpec||{},ke=R.objectElementValidators||{},qe=R.style,et=R.styleSpec,Et=[],Jt=Ls($);if(Jt!=="object")return[new _o(I,$,"object expected, "+Jt+" found")];for(var vr in $){var Ar=vr.split(".")[0],Zr=he[Ar]||he["*"],mn=void 0;if(ke[Ar])mn=ke[Ar];else if(he[Ar])mn=ol;else if(ke["*"])mn=ke["*"];else if(he["*"])mn=ol;else{Et.push(new _o(I,$[vr],'unknown property "'+vr+'"'));continue}Et=Et.concat(mn({key:(I&&I+".")+vr,value:$[vr],valueSpec:Zr,style:qe,styleSpec:et,object:$,objectKey:vr},$))}for(var fn in he)ke[fn]||he[fn].required&&he[fn].default===void 0&&$[fn]===void 0&&Et.push(new _o(I,$,'missing required property "'+fn+'"'));return Et}function Mt(R){var I=R.value,$=R.valueSpec,he=R.style,ke=R.styleSpec,qe=R.key,et=R.arrayElementValidator||ol;if(Ls(I)!=="array")return[new _o(qe,I,"array expected, "+Ls(I)+" found")];if($.length&&I.length!==$.length)return[new _o(qe,I,"array length "+$.length+" expected, length "+I.length+" found")];if($["min-length"]&&I.length<$["min-length"])return[new _o(qe,I,"array length at least "+$["min-length"]+" expected, length "+I.length+" found")];var Et={type:$.value,values:$.values};ke.$version<7&&(Et.function=$.function),Ls($.value)==="object"&&(Et=$.value);for(var Jt=[],vr=0;vr<I.length;vr++)Jt=Jt.concat(et({array:I,arrayIndex:vr,value:I[vr],valueSpec:Et,style:he,styleSpec:ke,key:qe+"["+vr+"]"}));return Jt}function zt(R){var I=R.key,$=R.value,he=R.valueSpec,ke=Ls($);return ke==="number"&&$!==$&&(ke="NaN"),ke!=="number"?[new _o(I,$,"number expected, "+ke+" found")]:"minimum"in he&&$<he.minimum?[new _o(I,$,$+" is less than the minimum value "+he.minimum)]:"maximum"in he&&$>he.maximum?[new _o(I,$,$+" is greater than the maximum value "+he.maximum)]:[]}function rr(R){var I=R.valueSpec,$=Ko(R.value.type),he,ke={},qe,et,Et=$!=="categorical"&&R.value.property===void 0,Jt=!Et,vr=Ls(R.value.stops)==="array"&&Ls(R.value.stops[0])==="array"&&Ls(R.value.stops[0][0])==="object",Ar=We({key:R.key,value:R.value,valueSpec:R.styleSpec.function,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:Zr,default:On}});return $==="identity"&&Et&&Ar.push(new _o(R.key,R.value,'missing required property "property"')),$!=="identity"&&!R.value.stops&&Ar.push(new _o(R.key,R.value,'missing required property "stops"')),$==="exponential"&&R.valueSpec.expression&&!Oo(R.valueSpec)&&Ar.push(new _o(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Jt&&!Pu(R.valueSpec)?Ar.push(new _o(R.key,R.value,"property functions not supported")):Et&&!Zl(R.valueSpec)&&Ar.push(new _o(R.key,R.value,"zoom functions not supported"))),($==="categorical"||vr)&&R.value.property===void 0&&Ar.push(new _o(R.key,R.value,'"property" property is required')),Ar;function Zr(da){if($==="identity")return[new _o(da.key,da.value,'identity function may not have a "stops" property')];var li=[],Va=da.value;return li=li.concat(Mt({key:da.key,value:Va,valueSpec:da.valueSpec,style:da.style,styleSpec:da.styleSpec,arrayElementValidator:mn})),Ls(Va)==="array"&&Va.length===0&&li.push(new _o(da.key,Va,"array must have at least one stop")),li}function mn(da){var li=[],Va=da.value,Ni=da.key;if(Ls(Va)!=="array")return[new _o(Ni,Va,"array expected, "+Ls(Va)+" found")];if(Va.length!==2)return[new _o(Ni,Va,"array length 2 expected, length "+Va.length+" found")];if(vr){if(Ls(Va[0])!=="object")return[new _o(Ni,Va,"object expected, "+Ls(Va[0])+" found")];if(Va[0].zoom===void 0)return[new _o(Ni,Va,"object stop key must have zoom")];if(Va[0].value===void 0)return[new _o(Ni,Va,"object stop key must have value")];if(et&&et>Ko(Va[0].zoom))return[new _o(Ni,Va[0].zoom,"stop zoom values must appear in ascending order")];Ko(Va[0].zoom)!==et&&(et=Ko(Va[0].zoom),qe=void 0,ke={}),li=li.concat(We({key:Ni+"[0]",value:Va[0],valueSpec:{zoom:{}},style:da.style,styleSpec:da.styleSpec,objectElementValidators:{zoom:zt,value:fn}}))}else li=li.concat(fn({key:Ni+"[0]",value:Va[0],style:da.style,styleSpec:da.styleSpec},Va));return os(jl(Va[1]))?li.concat([new _o(Ni+"[1]",Va[1],"expressions are not allowed in function stops.")]):li.concat(ol({key:Ni+"[1]",value:Va[1],valueSpec:I,style:da.style,styleSpec:da.styleSpec}))}function fn(da,li){var Va=Ls(da.value),Ni=Ko(da.value),_i=da.value!==null?da.value:li;if(!he)he=Va;else if(Va!==he)return[new _o(da.key,_i,Va+" stop domain type must match previous stop domain type "+he)];if(Va!=="number"&&Va!=="string"&&Va!=="boolean")return[new _o(da.key,_i,"stop domain value must be a number, string, or boolean")];if(Va!=="number"&&$!=="categorical"){var Oi="number expected, "+Va+" found";return Pu(I)&&$===void 0&&(Oi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _o(da.key,_i,Oi)]}return $==="categorical"&&Va==="number"&&(!isFinite(Ni)||Math.floor(Ni)!==Ni)?[new _o(da.key,_i,"integer expected, found "+Ni)]:$!=="categorical"&&Va==="number"&&qe!==void 0&&Ni<qe?[new _o(da.key,_i,"stop domain values must appear in ascending order")]:(qe=Ni,$==="categorical"&&Ni in ke?[new _o(da.key,_i,"stop domain values must be unique")]:(ke[Ni]=!0,[]))}function On(da){return ol({key:da.key,value:da.value,valueSpec:I,style:da.style,styleSpec:da.styleSpec})}}function Tr(R){var I=(R.expressionContext==="property"?Gc:_s)(jl(R.value),R.valueSpec);if(I.result==="error")return I.value.map(function(he){return new _o(""+R.key+he.key,R.value,he.message)});var $=I.value.expression||I.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!$.outputDefined())return[new _o(R.key,R.value,'Invalid data expression for "'+R.propertyKey+'". Output values must be contained as literals within the expression.')];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!Su($))return[new _o(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!Su($))return[new _o(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!qc($,["zoom","feature-state"]))return[new _o(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!ld($))return[new _o(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function zr(R){var I=R.value,$=R.key,he=Ls(I);return he!=="boolean"?[new _o($,I,"boolean expected, "+he+" found")]:[]}function qr(R){var I=R.key,$=R.value,he=Ls($);return he!=="string"?[new _o(I,$,"color expected, "+he+" found")]:Dh($)===null?[new _o(I,$,'color expected, "'+$+'" found')]:[]}function pn(R){var I=R.key,$=R.value,he=R.valueSpec,ke=[];return Array.isArray(he.values)?he.values.indexOf(Ko($))===-1&&ke.push(new _o(I,$,"expected one of ["+he.values.join(", ")+"], "+JSON.stringify($)+" found")):Object.keys(he.values).indexOf(Ko($))===-1&&ke.push(new _o(I,$,"expected one of ["+Object.keys(he.values).join(", ")+"], "+JSON.stringify($)+" found")),ke}function Dn(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(var I=0,$=R.slice(1);I<$.length;I+=1){var he=$[I];if(!Dn(he)&&typeof he!="boolean")return!1}return!0;default:return!0}}var nt={type:"boolean",default:!1};function ut(R){if(R==null)return{filter:function(){return!0},needGeometry:!1};Dn(R)||(R=Ht(R));var I=_s(R,nt);if(I.result==="error")throw new Error(I.value.map(function(he){return he.key+": "+he.message}).join(", "));var $=kt(R);return{filter:function(he,ke,qe){return I.value.evaluate(he,ke,{},qe)},needGeometry:$}}function wt(R,I){return R<I?-1:R>I?1:0}function kt(R){if(!Array.isArray(R))return!1;if(R[0]==="within")return!0;for(var I=1;I<R.length;I++)if(kt(R[I]))return!0;return!1}function Ht(R){if(!R)return!0;var I=R[0];if(R.length<=1)return I!=="any";var $=I==="=="?Ot(R[1],R[2],"=="):I==="!="?Vr(Ot(R[1],R[2],"==")):I==="<"||I===">"||I==="<="||I===">="?Ot(R[1],R[2],I):I==="any"?Kt(R.slice(1)):I==="all"?["all"].concat(R.slice(1).map(Ht)):I==="none"?["all"].concat(R.slice(1).map(Ht).map(Vr)):I==="in"?Cr(R[1],R.slice(2)):I==="!in"?Vr(Cr(R[1],R.slice(2))):I==="has"?Or(R[1]):I==="!has"?Vr(Or(R[1])):I==="within"?R:!0;return $}function Ot(R,I,$){switch(R){case"$type":return["filter-type-"+$,I];case"$id":return["filter-id-"+$,I];default:return["filter-"+$,R,I]}}function Kt(R){return["any"].concat(R.map(Ht))}function Cr(R,I){if(I.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",I]];case"$id":return["filter-id-in",["literal",I]];default:return I.length>200&&!I.some(function($){return typeof $!=typeof I[0]})?["filter-in-large",R,["literal",I.sort(wt)]]:["filter-in-small",R,["literal",I]]}}function Or(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Vr(R){return["!",R]}function sn(R){return Dn(jl(R.value))?Tr(Vs({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):bn(R)}function bn(R){var I=R.value,$=R.key;if(Ls(I)!=="array")return[new _o($,I,"array expected, "+Ls(I)+" found")];var he=R.styleSpec,ke,qe=[];if(I.length<1)return[new _o($,I,"filter array must have at least 1 element")];switch(qe=qe.concat(pn({key:$+"[0]",value:I[0],valueSpec:he.filter_operator,style:R.style,styleSpec:R.styleSpec})),Ko(I[0])){case"<":case"<=":case">":case">=":I.length>=2&&Ko(I[1])==="$type"&&qe.push(new _o($,I,'"$type" cannot be use with operator "'+I[0]+'"'));case"==":case"!=":I.length!==3&&qe.push(new _o($,I,'filter array for operator "'+I[0]+'" must have 3 elements'));case"in":case"!in":I.length>=2&&(ke=Ls(I[1]),ke!=="string"&&qe.push(new _o($+"[1]",I[1],"string expected, "+ke+" found")));for(var et=2;et<I.length;et++)ke=Ls(I[et]),Ko(I[1])==="$type"?qe=qe.concat(pn({key:$+"["+et+"]",value:I[et],valueSpec:he.geometry_type,style:R.style,styleSpec:R.styleSpec})):ke!=="string"&&ke!=="number"&&ke!=="boolean"&&qe.push(new _o($+"["+et+"]",I[et],"string, number, or boolean expected, "+ke+" found"));break;case"any":case"all":case"none":for(var Et=1;Et<I.length;Et++)qe=qe.concat(bn({key:$+"["+Et+"]",value:I[Et],style:R.style,styleSpec:R.styleSpec}));break;case"has":case"!has":ke=Ls(I[1]),I.length!==2?qe.push(new _o($,I,'filter array for "'+I[0]+'" operator must have 2 elements')):ke!=="string"&&qe.push(new _o($+"[1]",I[1],"string expected, "+ke+" found"));break;case"within":ke=Ls(I[1]),I.length!==2?qe.push(new _o($,I,'filter array for "'+I[0]+'" operator must have 2 elements')):ke!=="object"&&qe.push(new _o($+"[1]",I[1],"object expected, "+ke+" found"));break}return qe}function Un(R,I){var $=R.key,he=R.style,ke=R.styleSpec,qe=R.value,et=R.objectKey,Et=ke[I+"_"+R.layerType];if(!Et)return[];var Jt=et.match(/^(.*)-transition$/);if(I==="paint"&&Jt&&Et[Jt[1]]&&Et[Jt[1]].transition)return ol({key:$,value:qe,valueSpec:ke.transition,style:he,styleSpec:ke});var vr=R.valueSpec||Et[et];if(!vr)return[new _o($,qe,'unknown property "'+et+'"')];var Ar;if(Ls(qe)==="string"&&Pu(vr)&&!vr.tokens&&(Ar=/^{([^}]+)}$/.exec(qe)))return[new _o($,qe,'"'+et+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(Ar[1])+" }`.")];var Zr=[];return R.layerType==="symbol"&&(et==="text-field"&&he&&!he.glyphs&&Zr.push(new _o($,qe,'use of "text-field" requires a style "glyphs" property')),et==="text-font"&&ql(jl(qe))&&Ko(qe.type)==="identity"&&Zr.push(new _o($,qe,'"text-font" does not support identity functions'))),Zr.concat(ol({key:R.key,value:qe,valueSpec:vr,style:he,styleSpec:ke,expressionContext:"property",propertyType:I,propertyKey:et}))}function Gn(R){return Un(R,"paint")}function ua(R){return Un(R,"layout")}function Ha(R){var I=[],$=R.value,he=R.key,ke=R.style,qe=R.styleSpec;!$.type&&!$.ref&&I.push(new _o(he,$,'either "type" or "ref" is required'));var et=Ko($.type),Et=Ko($.ref);if($.id)for(var Jt=Ko($.id),vr=0;vr<R.arrayIndex;vr++){var Ar=ke.layers[vr];Ko(Ar.id)===Jt&&I.push(new _o(he,$.id,'duplicate layer id "'+$.id+'", previously used at line '+Ar.id.__line__))}if("ref"in $){["type","source","source-layer","filter","layout"].forEach(function(On){On in $&&I.push(new _o(he,$[On],'"'+On+'" is prohibited for ref layers'))});var Zr;ke.layers.forEach(function(On){Ko(On.id)===Et&&(Zr=On)}),Zr?Zr.ref?I.push(new _o(he,$.ref,"ref cannot reference another ref layer")):et=Ko(Zr.type):I.push(new _o(he,$.ref,'ref layer "'+Et+'" not found'))}else if(et!=="background")if(!$.source)I.push(new _o(he,$,'missing required property "source"'));else{var mn=ke.sources&&ke.sources[$.source],fn=mn&&Ko(mn.type);mn?fn==="vector"&&et==="raster"?I.push(new _o(he,$.source,'layer "'+$.id+'" requires a raster source')):fn==="raster"&&et!=="raster"?I.push(new _o(he,$.source,'layer "'+$.id+'" requires a vector source')):fn==="vector"&&!$["source-layer"]?I.push(new _o(he,$,'layer "'+$.id+'" must specify a "source-layer"')):fn==="raster-dem"&&et!=="hillshade"?I.push(new _o(he,$.source,"raster-dem source can only be used with layer type 'hillshade'.")):et==="line"&&$.paint&&$.paint["line-gradient"]&&(fn!=="geojson"||!mn.lineMetrics)&&I.push(new _o(he,$,'layer "'+$.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):I.push(new _o(he,$.source,'source "'+$.source+'" not found'))}return I=I.concat(We({key:he,value:$,valueSpec:qe.layer,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return ol({key:he+".type",value:$.type,valueSpec:qe.layer.type,style:R.style,styleSpec:R.styleSpec,object:$,objectKey:"type"})},filter:sn,layout:function(da){return We({layer:$,key:da.key,value:da.value,style:da.style,styleSpec:da.styleSpec,objectElementValidators:{"*":function(Va){return ua(Vs({layerType:et},Va))}}})},paint:function(da){return We({layer:$,key:da.key,value:da.value,style:da.style,styleSpec:da.styleSpec,objectElementValidators:{"*":function(Va){return Gn(Vs({layerType:et},Va))}}})}}})),I}function Ti(R){var I=R.value,$=R.key,he=Ls(I);return he!=="string"?[new _o($,I,"string expected, "+he+" found")]:[]}var mi={promoteId:po};function Ai(R){var I=R.value,$=R.key,he=R.styleSpec,ke=R.style;if(!I.type)return[new _o($,I,'"type" is required')];var qe=Ko(I.type),et;switch(qe){case"vector":case"raster":case"raster-dem":return et=We({key:$,value:I,valueSpec:he["source_"+qe.replace("-","_")],style:R.style,styleSpec:he,objectElementValidators:mi}),et;case"geojson":if(et=We({key:$,value:I,valueSpec:he.source_geojson,style:ke,styleSpec:he,objectElementValidators:mi}),I.cluster)for(var Et in I.clusterProperties){var Jt=I.clusterProperties[Et],vr=Jt[0],Ar=Jt[1],Zr=typeof vr=="string"?[vr,["accumulated"],["get",Et]]:vr;et.push.apply(et,Tr({key:$+"."+Et+".map",value:Ar,expressionContext:"cluster-map"})),et.push.apply(et,Tr({key:$+"."+Et+".reduce",value:Zr,expressionContext:"cluster-reduce"}))}return et;case"video":return We({key:$,value:I,valueSpec:he.source_video,style:ke,styleSpec:he});case"image":return We({key:$,value:I,valueSpec:he.source_image,style:ke,styleSpec:he});case"canvas":return[new _o($,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return pn({key:$+".type",value:I.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function po(R){var I=R.key,$=R.value;if(Ls($)==="string")return Ti({key:I,value:$});var he=[];for(var ke in $)he.push.apply(he,Ti({key:I+"."+ke,value:$[ke]}));return he}function Fo(R){var I=R.value,$=R.styleSpec,he=$.light,ke=R.style,qe=[],et=Ls(I);if(I===void 0)return qe;if(et!=="object")return qe=qe.concat([new _o("light",I,"object expected, "+et+" found")]),qe;for(var Et in I){var Jt=Et.match(/^(.*)-transition$/);Jt&&he[Jt[1]]&&he[Jt[1]].transition?qe=qe.concat(ol({key:Et,value:I[Et],valueSpec:$.transition,style:ke,styleSpec:$})):he[Et]?qe=qe.concat(ol({key:Et,value:I[Et],valueSpec:he[Et],style:ke,styleSpec:$})):qe=qe.concat([new _o(Et,I[Et],'unknown property "'+Et+'"')])}return qe}function Po(R){return Ti(R).length===0?[]:Tr(R)}function us(R){return Ti(R).length===0?[]:Tr(R)}var il={"*":function(){return[]},array:Mt,boolean:zr,number:zt,color:qr,constants:Nl,enum:pn,filter:sn,function:rr,layer:Ha,object:We,source:Ai,light:Fo,string:Ti,formatted:Po,resolvedImage:us};function ol(R){var I=R.value,$=R.valueSpec,he=R.styleSpec;if($.expression&&ql(Ko(I)))return rr(R);if($.expression&&os(jl(I)))return Tr(R);if($.type&&il[$.type])return il[$.type](R);var ke=We(Vs({},R,{valueSpec:$.type?he[$.type]:$}));return ke}function Bs(R){var I=R.value,$=R.key,he=Ti(R);return he.length||(I.indexOf("{fontstack}")===-1&&he.push(new _o($,I,'"glyphs" url must include a "{fontstack}" token')),I.indexOf("{range}")===-1&&he.push(new _o($,I,'"glyphs" url must include a "{range}" token'))),he}function hl(R,I){I===void 0&&(I=Di);var $=[];return $=$.concat(ol({key:"",value:R,valueSpec:I.$root,styleSpec:I,style:R,objectElementValidators:{glyphs:Bs,"*":function(){return[]}}})),R.constants&&($=$.concat(Nl({key:"constants",value:R.constants}))),bu($)}hl.source=cu(Ai),hl.light=cu(Fo),hl.layer=cu(Ha),hl.filter=cu(sn),hl.paintProperty=cu(Gn),hl.layoutProperty=cu(ua);function bu(R){return[].concat(R).sort(function(I,$){return I.line-$.line})}function cu(R){return function(){for(var I=[],$=arguments.length;$--;)I[$]=arguments[$];return bu(R.apply(this,I))}}var js=hl,Us=js.light,Bu=js.paintProperty,pc=js.layoutProperty;function Xc(R,I){var $=!1;if(I&&I.length)for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he];R.fire(new tn(new Error(qe.message))),$=!0}return $}var Te=ct,He=3;function ct(R,I,$){var he=this.cells=[];if(R instanceof ArrayBuffer){this.arrayBuffer=R;var ke=new Int32Array(this.arrayBuffer);R=ke[0],I=ke[1],$=ke[2],this.d=I+2*$;for(var qe=0;qe<this.d*this.d;qe++){var et=ke[He+qe],Et=ke[He+qe+1];he.push(et===Et?null:ke.subarray(et,Et))}var Jt=ke[He+he.length],vr=ke[He+he.length+1];this.keys=ke.subarray(Jt,vr),this.bboxes=ke.subarray(vr),this.insert=this._insertReadonly}else{this.d=I+2*$;for(var Ar=0;Ar<this.d*this.d;Ar++)he.push([]);this.keys=[],this.bboxes=[]}this.n=I,this.extent=R,this.padding=$,this.scale=I/R,this.uid=0;var Zr=$/I*R;this.min=-Zr,this.max=R+Zr}ct.prototype.insert=function(R,I,$,he,ke){this._forEachCell(I,$,he,ke,this._insertCell,this.uid++),this.keys.push(R),this.bboxes.push(I),this.bboxes.push($),this.bboxes.push(he),this.bboxes.push(ke)},ct.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ct.prototype._insertCell=function(R,I,$,he,ke,qe){this.cells[ke].push(qe)},ct.prototype.query=function(R,I,$,he,ke){var qe=this.min,et=this.max;if(R<=qe&&I<=qe&&et<=$&&et<=he&&!ke)return Array.prototype.slice.call(this.keys);var Et=[],Jt={};return this._forEachCell(R,I,$,he,this._queryCell,Et,Jt,ke),Et},ct.prototype._queryCell=function(R,I,$,he,ke,qe,et,Et){var Jt=this.cells[ke];if(Jt!==null)for(var vr=this.keys,Ar=this.bboxes,Zr=0;Zr<Jt.length;Zr++){var mn=Jt[Zr];if(et[mn]===void 0){var fn=mn*4;(Et?Et(Ar[fn+0],Ar[fn+1],Ar[fn+2],Ar[fn+3]):R<=Ar[fn+2]&&I<=Ar[fn+3]&&$>=Ar[fn+0]&&he>=Ar[fn+1])?(et[mn]=!0,qe.push(vr[mn])):et[mn]=!1}}},ct.prototype._forEachCell=function(R,I,$,he,ke,qe,et,Et){for(var Jt=this._convertToCellCoord(R),vr=this._convertToCellCoord(I),Ar=this._convertToCellCoord($),Zr=this._convertToCellCoord(he),mn=Jt;mn<=Ar;mn++)for(var fn=vr;fn<=Zr;fn++){var On=this.d*fn+mn;if(!(Et&&!Et(this._convertFromCellCoord(mn),this._convertFromCellCoord(fn),this._convertFromCellCoord(mn+1),this._convertFromCellCoord(fn+1)))&&ke.call(this,R,I,$,he,On,qe,et,Et))return}},ct.prototype._convertFromCellCoord=function(R){return(R-this.padding)/this.scale},ct.prototype._convertToCellCoord=function(R){return Math.max(0,Math.min(this.d-1,Math.floor(R*this.scale)+this.padding))},ct.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var R=this.cells,I=He+this.cells.length+1+1,$=0,he=0;he<this.cells.length;he++)$+=this.cells[he].length;var ke=new Int32Array(I+$+this.keys.length+this.bboxes.length);ke[0]=this.extent,ke[1]=this.n,ke[2]=this.padding;for(var qe=I,et=0;et<R.length;et++){var Et=R[et];ke[He+et]=qe,ke.set(Et,qe),qe+=Et.length}return ke[He+R.length]=qe,ke.set(this.keys,qe),qe+=this.keys.length,ke[He+R.length+1]=qe,ke.set(this.bboxes,qe),qe+=this.bboxes.length,ke.buffer};var Pt=u.ImageData,It=u.ImageBitmap,Ut={};function hr(R,I,$){$===void 0&&($={}),Object.defineProperty(I,"_classRegistryKey",{value:R,writeable:!1}),Ut[R]={klass:I,omit:$.omit||[],shallow:$.shallow||[]}}hr("Object",Object),Te.serialize=function(I,$){var he=I.toArrayBuffer();return $&&$.push(he),{buffer:he}},Te.deserialize=function(I){return new Te(I.buffer)},hr("Grid",Te),hr("Color",Ll),hr("Error",Error),hr("ResolvedImage",rc),hr("StylePropertyFunction",Ze),hr("StyleExpression",Bf,{omit:["_evaluator"]}),hr("ZoomDependentExpression",nf),hr("ZoomConstantExpression",jf),hr("CompoundExpression",Zo,{omit:["_evaluate"]});for(var fr in ys)ys[fr]._classRegistryKey||hr("Expression_"+fr,ys[fr]);function Pr(R){return R&&typeof ArrayBuffer<"u"&&(R instanceof ArrayBuffer||R.constructor&&R.constructor.name==="ArrayBuffer")}function ln(R){return It&&R instanceof It}function on(R,I){if(R==null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp)return R;if(Pr(R)||ln(R))return I&&I.push(R),R;if(ArrayBuffer.isView(R)){var $=R;return I&&I.push($.buffer),$}if(R instanceof Pt)return I&&I.push(R.data.buffer),R;if(Array.isArray(R)){for(var he=[],ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke];he.push(on(et,I))}return he}if(typeof R=="object"){var Et=R.constructor,Jt=Et._classRegistryKey;if(!Jt)throw new Error("can't serialize object of unregistered class");var vr=Et.serialize?Et.serialize(R,I):{};if(!Et.serialize){for(var Ar in R)if(R.hasOwnProperty(Ar)&&!(Ut[Jt].omit.indexOf(Ar)>=0)){var Zr=R[Ar];vr[Ar]=Ut[Jt].shallow.indexOf(Ar)>=0?Zr:on(Zr,I)}R instanceof Error&&(vr.message=R.message)}if(vr.$name)throw new Error("$name property is reserved for worker serialization logic.");return Jt!=="Object"&&(vr.$name=Jt),vr}throw new Error("can't serialize object of type "+typeof R)}function Mn(R){if(R==null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||R instanceof Boolean||R instanceof Number||R instanceof String||R instanceof Date||R instanceof RegExp||Pr(R)||ln(R)||ArrayBuffer.isView(R)||R instanceof Pt)return R;if(Array.isArray(R))return R.map(Mn);if(typeof R=="object"){var I=R.$name||"Object",$=Ut[I],he=$.klass;if(!he)throw new Error("can't deserialize unregistered class "+I);if(he.deserialize)return he.deserialize(R);for(var ke=Object.create(he.prototype),qe=0,et=Object.keys(R);qe<et.length;qe+=1){var Et=et[qe];if(Et!=="$name"){var Jt=R[Et];ke[Et]=Ut[I].shallow.indexOf(Et)>=0?Jt:Mn(Jt)}}return ke}throw new Error("can't deserialize object of type "+typeof R)}var jn=function(){this.first=!0};jn.prototype.update=function(I,$){var he=Math.floor(I);return this.first?(this.first=!1,this.lastIntegerZoom=he,this.lastIntegerZoomTime=0,this.lastZoom=I,this.lastFloorZoom=he,!0):(this.lastFloorZoom>he?(this.lastIntegerZoom=he+1,this.lastIntegerZoomTime=$):this.lastFloorZoom<he&&(this.lastIntegerZoom=he,this.lastIntegerZoomTime=$),I!==this.lastZoom?(this.lastZoom=I,this.lastFloorZoom=he,!0):!1)};var Vn={"Latin-1 Supplement":function(R){return R>=128&&R<=255},Arabic:function(R){return R>=1536&&R<=1791},"Arabic Supplement":function(R){return R>=1872&&R<=1919},"Arabic Extended-A":function(R){return R>=2208&&R<=2303},"Hangul Jamo":function(R){return R>=4352&&R<=4607},"Unified Canadian Aboriginal Syllabics":function(R){return R>=5120&&R<=5759},Khmer:function(R){return R>=6016&&R<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(R){return R>=6320&&R<=6399},"General Punctuation":function(R){return R>=8192&&R<=8303},"Letterlike Symbols":function(R){return R>=8448&&R<=8527},"Number Forms":function(R){return R>=8528&&R<=8591},"Miscellaneous Technical":function(R){return R>=8960&&R<=9215},"Control Pictures":function(R){return R>=9216&&R<=9279},"Optical Character Recognition":function(R){return R>=9280&&R<=9311},"Enclosed Alphanumerics":function(R){return R>=9312&&R<=9471},"Geometric Shapes":function(R){return R>=9632&&R<=9727},"Miscellaneous Symbols":function(R){return R>=9728&&R<=9983},"Miscellaneous Symbols and Arrows":function(R){return R>=11008&&R<=11263},"CJK Radicals Supplement":function(R){return R>=11904&&R<=12031},"Kangxi Radicals":function(R){return R>=12032&&R<=12255},"Ideographic Description Characters":function(R){return R>=12272&&R<=12287},"CJK Symbols and Punctuation":function(R){return R>=12288&&R<=12351},Hiragana:function(R){return R>=12352&&R<=12447},Katakana:function(R){return R>=12448&&R<=12543},Bopomofo:function(R){return R>=12544&&R<=12591},"Hangul Compatibility Jamo":function(R){return R>=12592&&R<=12687},Kanbun:function(R){return R>=12688&&R<=12703},"Bopomofo Extended":function(R){return R>=12704&&R<=12735},"CJK Strokes":function(R){return R>=12736&&R<=12783},"Katakana Phonetic Extensions":function(R){return R>=12784&&R<=12799},"Enclosed CJK Letters and Months":function(R){return R>=12800&&R<=13055},"CJK Compatibility":function(R){return R>=13056&&R<=13311},"CJK Unified Ideographs Extension A":function(R){return R>=13312&&R<=19903},"Yijing Hexagram Symbols":function(R){return R>=19904&&R<=19967},"CJK Unified Ideographs":function(R){return R>=19968&&R<=40959},"Yi Syllables":function(R){return R>=40960&&R<=42127},"Yi Radicals":function(R){return R>=42128&&R<=42191},"Hangul Jamo Extended-A":function(R){return R>=43360&&R<=43391},"Hangul Syllables":function(R){return R>=44032&&R<=55215},"Hangul Jamo Extended-B":function(R){return R>=55216&&R<=55295},"Private Use Area":function(R){return R>=57344&&R<=63743},"CJK Compatibility Ideographs":function(R){return R>=63744&&R<=64255},"Arabic Presentation Forms-A":function(R){return R>=64336&&R<=65023},"Vertical Forms":function(R){return R>=65040&&R<=65055},"CJK Compatibility Forms":function(R){return R>=65072&&R<=65103},"Small Form Variants":function(R){return R>=65104&&R<=65135},"Arabic Presentation Forms-B":function(R){return R>=65136&&R<=65279},"Halfwidth and Fullwidth Forms":function(R){return R>=65280&&R<=65519}};function Ka(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(Xa(he.charCodeAt(0)))return!0}return!1}function Zn(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(!ya(he.charCodeAt(0)))return!1}return!0}function ya(R){return!(Vn.Arabic(R)||Vn["Arabic Supplement"](R)||Vn["Arabic Extended-A"](R)||Vn["Arabic Presentation Forms-A"](R)||Vn["Arabic Presentation Forms-B"](R))}function Sa(R){return R<11904?!1:!!(Vn["Bopomofo Extended"](R)||Vn.Bopomofo(R)||Vn["CJK Compatibility Forms"](R)||Vn["CJK Compatibility Ideographs"](R)||Vn["CJK Compatibility"](R)||Vn["CJK Radicals Supplement"](R)||Vn["CJK Strokes"](R)||Vn["CJK Symbols and Punctuation"](R)||Vn["CJK Unified Ideographs Extension A"](R)||Vn["CJK Unified Ideographs"](R)||Vn["Enclosed CJK Letters and Months"](R)||Vn["Halfwidth and Fullwidth Forms"](R)||Vn.Hiragana(R)||Vn["Ideographic Description Characters"](R)||Vn["Kangxi Radicals"](R)||Vn["Katakana Phonetic Extensions"](R)||Vn.Katakana(R)||Vn["Vertical Forms"](R)||Vn["Yi Radicals"](R)||Vn["Yi Syllables"](R))}function Xa(R){return R===746||R===747?!0:R<4352?!1:!!(Vn["Bopomofo Extended"](R)||Vn.Bopomofo(R)||Vn["CJK Compatibility Forms"](R)&&!(R>=65097&&R<=65103)||Vn["CJK Compatibility Ideographs"](R)||Vn["CJK Compatibility"](R)||Vn["CJK Radicals Supplement"](R)||Vn["CJK Strokes"](R)||Vn["CJK Symbols and Punctuation"](R)&&!(R>=12296&&R<=12305)&&!(R>=12308&&R<=12319)&&R!==12336||Vn["CJK Unified Ideographs Extension A"](R)||Vn["CJK Unified Ideographs"](R)||Vn["Enclosed CJK Letters and Months"](R)||Vn["Hangul Compatibility Jamo"](R)||Vn["Hangul Jamo Extended-A"](R)||Vn["Hangul Jamo Extended-B"](R)||Vn["Hangul Jamo"](R)||Vn["Hangul Syllables"](R)||Vn.Hiragana(R)||Vn["Ideographic Description Characters"](R)||Vn.Kanbun(R)||Vn["Kangxi Radicals"](R)||Vn["Katakana Phonetic Extensions"](R)||Vn.Katakana(R)&&R!==12540||Vn["Halfwidth and Fullwidth Forms"](R)&&R!==65288&&R!==65289&&R!==65293&&!(R>=65306&&R<=65310)&&R!==65339&&R!==65341&&R!==65343&&!(R>=65371&&R<=65503)&&R!==65507&&!(R>=65512&&R<=65519)||Vn["Small Form Variants"](R)&&!(R>=65112&&R<=65118)&&!(R>=65123&&R<=65126)||Vn["Unified Canadian Aboriginal Syllabics"](R)||Vn["Unified Canadian Aboriginal Syllabics Extended"](R)||Vn["Vertical Forms"](R)||Vn["Yijing Hexagram Symbols"](R)||Vn["Yi Syllables"](R)||Vn["Yi Radicals"](R))}function Qa(R){return!!(Vn["Latin-1 Supplement"](R)&&(R===167||R===169||R===174||R===177||R===188||R===189||R===190||R===215||R===247)||Vn["General Punctuation"](R)&&(R===8214||R===8224||R===8225||R===8240||R===8241||R===8251||R===8252||R===8258||R===8263||R===8264||R===8265||R===8273)||Vn["Letterlike Symbols"](R)||Vn["Number Forms"](R)||Vn["Miscellaneous Technical"](R)&&(R>=8960&&R<=8967||R>=8972&&R<=8991||R>=8996&&R<=9e3||R===9003||R>=9085&&R<=9114||R>=9150&&R<=9165||R===9167||R>=9169&&R<=9179||R>=9186&&R<=9215)||Vn["Control Pictures"](R)&&R!==9251||Vn["Optical Character Recognition"](R)||Vn["Enclosed Alphanumerics"](R)||Vn["Geometric Shapes"](R)||Vn["Miscellaneous Symbols"](R)&&!(R>=9754&&R<=9759)||Vn["Miscellaneous Symbols and Arrows"](R)&&(R>=11026&&R<=11055||R>=11088&&R<=11097||R>=11192&&R<=11243)||Vn["CJK Symbols and Punctuation"](R)||Vn.Katakana(R)||Vn["Private Use Area"](R)||Vn["CJK Compatibility Forms"](R)||Vn["Small Form Variants"](R)||Vn["Halfwidth and Fullwidth Forms"](R)||R===8734||R===8756||R===8757||R>=9984&&R<=10087||R>=10102&&R<=10131||R===65532||R===65533)}function Aa(R){return!(Xa(R)||Qa(R))}function Si(R){return Vn.Arabic(R)||Vn["Arabic Supplement"](R)||Vn["Arabic Extended-A"](R)||Vn["Arabic Presentation Forms-A"](R)||Vn["Arabic Presentation Forms-B"](R)}function ho(R){return R>=1424&&R<=2303||Vn["Arabic Presentation Forms-A"](R)||Vn["Arabic Presentation Forms-B"](R)}function Ki(R,I){return!(!I&&ho(R)||R>=2304&&R<=3583||R>=3840&&R<=4255||Vn.Khmer(R))}function lo(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(ho(he.charCodeAt(0)))return!0}return!1}function zo(R,I){for(var $=0,he=R;$<he.length;$+=1){var ke=he[$];if(!Ki(ke.charCodeAt(0),I))return!1}return!0}var qo={unavailable:"unavailable",deferred:"deferred",loading:"loading",loaded:"loaded",error:"error"},nl=null,Go=qo.unavailable,bs=null,fl=function(R){R&&typeof R=="string"&&R.indexOf("NetworkError")>-1&&(Go=qo.error),nl&&nl(R)};function ju(){ou.fire(new Qr("pluginStateChange",{pluginStatus:Go,pluginURL:bs}))}var ou=new Xr,So=function(){return Go},qs=function(R){return R({pluginStatus:Go,pluginURL:bs}),ou.on("pluginStateChange",R),R},sl=function(R,I,$){if($===void 0&&($=!1),Go===qo.deferred||Go===qo.loading||Go===qo.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");bs=Le.resolveURL(R),Go=qo.deferred,nl=I,ju(),$||tu()},tu=function(){if(Go!==qo.deferred||!bs)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Go=qo.loading,ju(),bs&&Ln({url:bs},function(R){R?fl(R):(Go=qo.loaded,ju())})},Vl={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Go===qo.loaded||Vl.applyArabicShaping!=null},isLoading:function(){return Go===qo.loading},setState:function(I){Go=I.pluginStatus,bs=I.pluginURL},isParsed:function(){return Vl.applyArabicShaping!=null&&Vl.processBidirectionalText!=null&&Vl.processStyledBidirectionalText!=null},getPluginURL:function(){return bs}},Lc=function(){!Vl.isLoading()&&!Vl.isLoaded()&&So()==="deferred"&&tu()},Ol=function(I,$){this.zoom=I,$?(this.now=$.now,this.fadeDuration=$.fadeDuration,this.zoomHistory=$.zoomHistory,this.transition=$.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new jn,this.transition={})};Ol.prototype.isSupportedScript=function(I){return zo(I,Vl.isLoaded())},Ol.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ol.prototype.getCrossfadeParameters=function(){var I=this.zoom,$=I-Math.floor(I),he=this.crossFadingFactor();return I>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:$+(1-$)*he}:{fromScale:.5,toScale:1,t:1-(1-he)*$}};var ru=function(I,$){this.property=I,this.value=$,this.expression=O($===void 0?I.specification.default:$,I.specification)};ru.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},ru.prototype.possiblyEvaluate=function(I,$,he){return this.property.possiblyEvaluate(this,I,$,he)};var af=function(I){this.property=I,this.value=new ru(I,void 0)};af.prototype.transitioned=function(I,$){return new At(this.property,this.value,$,b({},I.transition,this.transition),I.now)},af.prototype.untransitioned=function(){return new At(this.property,this.value,null,{},0)};var zu=function(I){this._properties=I,this._values=Object.create(I.defaultTransitionablePropertyValues)};zu.prototype.getValue=function(I){return q(this._values[I].value.value)},zu.prototype.setValue=function(I,$){this._values.hasOwnProperty(I)||(this._values[I]=new af(this._values[I].property)),this._values[I].value=new ru(this._values[I].property,$===null?void 0:q($))},zu.prototype.getTransition=function(I){return q(this._values[I].transition)},zu.prototype.setTransition=function(I,$){this._values.hasOwnProperty(I)||(this._values[I]=new af(this._values[I].property)),this._values[I].transition=q($)||void 0},zu.prototype.serialize=function(){for(var I={},$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$],qe=this.getValue(ke);qe!==void 0&&(I[ke]=qe);var et=this.getTransition(ke);et!==void 0&&(I[ke+"-transition"]=et)}return I},zu.prototype.transitioned=function(I,$){for(var he=new kr(this._properties),ke=0,qe=Object.keys(this._values);ke<qe.length;ke+=1){var et=qe[ke];he._values[et]=this._values[et].transitioned(I,$._values[et])}return he},zu.prototype.untransitioned=function(){for(var I=new kr(this._properties),$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$];I._values[ke]=this._values[ke].untransitioned()}return I};var At=function(I,$,he,ke,qe){this.property=I,this.value=$,this.begin=qe+ke.delay||0,this.end=this.begin+ke.duration||0,I.specification.transition&&(ke.delay||ke.duration)&&(this.prior=he)};At.prototype.possiblyEvaluate=function(I,$,he){var ke=I.now||0,qe=this.value.possiblyEvaluate(I,$,he),et=this.prior;if(et){if(ke>this.end)return this.prior=null,qe;if(this.value.isDataDriven())return this.prior=null,qe;if(ke<this.begin)return et.possiblyEvaluate(I,$,he);var Et=(ke-this.begin)/(this.end-this.begin);return this.property.interpolate(et.possiblyEvaluate(I,$,he),qe,y(Et))}else return qe};var kr=function(I){this._properties=I,this._values=Object.create(I.defaultTransitioningPropertyValues)};kr.prototype.possiblyEvaluate=function(I,$,he){for(var ke=new Ca(this._properties),qe=0,et=Object.keys(this._values);qe<et.length;qe+=1){var Et=et[qe];ke._values[Et]=this._values[Et].possiblyEvaluate(I,$,he)}return ke},kr.prototype.hasTransition=function(){for(var I=0,$=Object.keys(this._values);I<$.length;I+=1){var he=$[I];if(this._values[he].prior)return!0}return!1};var Dr=function(I){this._properties=I,this._values=Object.create(I.defaultPropertyValues)};Dr.prototype.getValue=function(I){return q(this._values[I].value)},Dr.prototype.setValue=function(I,$){this._values[I]=new ru(this._values[I].property,$===null?void 0:q($))},Dr.prototype.serialize=function(){for(var I={},$=0,he=Object.keys(this._values);$<he.length;$+=1){var ke=he[$],qe=this.getValue(ke);qe!==void 0&&(I[ke]=qe)}return I},Dr.prototype.possiblyEvaluate=function(I,$,he){for(var ke=new Ca(this._properties),qe=0,et=Object.keys(this._values);qe<et.length;qe+=1){var Et=et[qe];ke._values[Et]=this._values[Et].possiblyEvaluate(I,$,he)}return ke};var Hn=function(I,$,he){this.property=I,this.value=$,this.parameters=he};Hn.prototype.isConstant=function(){return this.value.kind==="constant"},Hn.prototype.constantOr=function(I){return this.value.kind==="constant"?this.value.value:I},Hn.prototype.evaluate=function(I,$,he,ke){return this.property.evaluate(this.value,this.parameters,I,$,he,ke)};var Ca=function(I){this._properties=I,this._values=Object.create(I.defaultPossiblyEvaluatedValues)};Ca.prototype.get=function(I){return this._values[I]};var Rn=function(I){this.specification=I};Rn.prototype.possiblyEvaluate=function(I,$){return I.expression.evaluate($)},Rn.prototype.interpolate=function(I,$,he){var ke=Kf[this.specification.type];return ke?ke(I,$,he):I};var Pn=function(I,$){this.specification=I,this.overrides=$};Pn.prototype.possiblyEvaluate=function(I,$,he,ke){return I.expression.kind==="constant"||I.expression.kind==="camera"?new Hn(this,{kind:"constant",value:I.expression.evaluate($,null,{},he,ke)},$):new Hn(this,I.expression,$)},Pn.prototype.interpolate=function(I,$,he){if(I.value.kind!=="constant"||$.value.kind!=="constant")return I;if(I.value.value===void 0||$.value.value===void 0)return new Hn(this,{kind:"constant",value:void 0},I.parameters);var ke=Kf[this.specification.type];return ke?new Hn(this,{kind:"constant",value:ke(I.value.value,$.value.value,he)},I.parameters):I},Pn.prototype.evaluate=function(I,$,he,ke,qe,et){return I.kind==="constant"?I.value:I.evaluate($,he,ke,qe,et)};var ri=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.possiblyEvaluate=function(he,ke,qe,et){if(he.value===void 0)return new Hn(this,{kind:"constant",value:void 0},ke);if(he.expression.kind==="constant"){var Et=he.expression.evaluate(ke,null,{},qe,et),Jt=he.property.specification.type==="resolvedImage",vr=Jt&&typeof Et!="string"?Et.name:Et,Ar=this._calculate(vr,vr,vr,ke);return new Hn(this,{kind:"constant",value:Ar},ke)}else if(he.expression.kind==="camera"){var Zr=this._calculate(he.expression.evaluate({zoom:ke.zoom-1}),he.expression.evaluate({zoom:ke.zoom}),he.expression.evaluate({zoom:ke.zoom+1}),ke);return new Hn(this,{kind:"constant",value:Zr},ke)}else return new Hn(this,he.expression,ke)},I.prototype.evaluate=function(he,ke,qe,et,Et,Jt){if(he.kind==="source"){var vr=he.evaluate(ke,qe,et,Et,Jt);return this._calculate(vr,vr,vr,ke)}else return he.kind==="composite"?this._calculate(he.evaluate({zoom:Math.floor(ke.zoom)-1},qe,et),he.evaluate({zoom:Math.floor(ke.zoom)},qe,et),he.evaluate({zoom:Math.floor(ke.zoom)+1},qe,et),ke):he.value},I.prototype._calculate=function(he,ke,qe,et){var Et=et.zoom;return Et>et.zoomHistory.lastIntegerZoom?{from:he,to:ke}:{from:qe,to:ke}},I.prototype.interpolate=function(he){return he},I})(Pn),ei=function(I){this.specification=I};ei.prototype.possiblyEvaluate=function(I,$,he,ke){if(I.value!==void 0)if(I.expression.kind==="constant"){var qe=I.expression.evaluate($,null,{},he,ke);return this._calculate(qe,qe,qe,$)}else return this._calculate(I.expression.evaluate(new Ol(Math.floor($.zoom-1),$)),I.expression.evaluate(new Ol(Math.floor($.zoom),$)),I.expression.evaluate(new Ol(Math.floor($.zoom+1),$)),$)},ei.prototype._calculate=function(I,$,he,ke){var qe=ke.zoom;return qe>ke.zoomHistory.lastIntegerZoom?{from:I,to:$}:{from:he,to:$}},ei.prototype.interpolate=function(I){return I};var ti=function(I){this.specification=I};ti.prototype.possiblyEvaluate=function(I,$,he,ke){return!!I.expression.evaluate($,null,{},he,ke)},ti.prototype.interpolate=function(){return!1};var pi=function(I){this.properties=I,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var $ in I){var he=I[$];he.specification.overridable&&this.overridableProperties.push($);var ke=this.defaultPropertyValues[$]=new ru(he,void 0),qe=this.defaultTransitionablePropertyValues[$]=new af(he);this.defaultTransitioningPropertyValues[$]=qe.untransitioned(),this.defaultPossiblyEvaluatedValues[$]=ke.possiblyEvaluate({})}};hr("DataDrivenProperty",Pn),hr("DataConstantProperty",Rn),hr("CrossFadedDataDrivenProperty",ri),hr("CrossFadedProperty",ei),hr("ColorRampProperty",ti);var eo="-transition",Bi=(function(R){function I($,he){if(R.call(this),this.id=$.id,this.type=$.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},$.type!=="custom"&&($=$,this.metadata=$.metadata,this.minzoom=$.minzoom,this.maxzoom=$.maxzoom,$.type!=="background"&&(this.source=$.source,this.sourceLayer=$["source-layer"],this.filter=$.filter),he.layout&&(this._unevaluatedLayout=new Dr(he.layout)),he.paint)){this._transitionablePaint=new zu(he.paint);for(var ke in $.paint)this.setPaintProperty(ke,$.paint[ke],{validate:!1});for(var qe in $.layout)this.setLayoutProperty(qe,$.layout[qe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ca(he.paint)}}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},I.prototype.getLayoutProperty=function(he){return he==="visibility"?this.visibility:this._unevaluatedLayout.getValue(he)},I.prototype.setLayoutProperty=function(he,ke,qe){if(qe===void 0&&(qe={}),ke!=null){var et="layers."+this.id+".layout."+he;if(this._validate(pc,et,he,ke,qe))return}if(he==="visibility"){this.visibility=ke;return}this._unevaluatedLayout.setValue(he,ke)},I.prototype.getPaintProperty=function(he){return B(he,eo)?this._transitionablePaint.getTransition(he.slice(0,-eo.length)):this._transitionablePaint.getValue(he)},I.prototype.setPaintProperty=function(he,ke,qe){if(qe===void 0&&(qe={}),ke!=null){var et="layers."+this.id+".paint."+he;if(this._validate(Bu,et,he,ke,qe))return!1}if(B(he,eo))return this._transitionablePaint.setTransition(he.slice(0,-eo.length),ke||void 0),!1;var Et=this._transitionablePaint._values[he],Jt=Et.property.specification["property-type"]==="cross-faded-data-driven",vr=Et.value.isDataDriven(),Ar=Et.value;this._transitionablePaint.setValue(he,ke),this._handleSpecialPaintPropertyUpdate(he);var Zr=this._transitionablePaint._values[he].value,mn=Zr.isDataDriven();return mn||vr||Jt||this._handleOverridablePaintPropertyUpdate(he,Ar,Zr)},I.prototype._handleSpecialPaintPropertyUpdate=function(he){},I.prototype._handleOverridablePaintPropertyUpdate=function(he,ke,qe){return!1},I.prototype.isHidden=function(he){return this.minzoom&&he<this.minzoom||this.maxzoom&&he>=this.maxzoom?!0:this.visibility==="none"},I.prototype.updateTransitions=function(he){this._transitioningPaint=this._transitionablePaint.transitioned(he,this._transitioningPaint)},I.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},I.prototype.recalculate=function(he,ke){he.getCrossfadeParameters&&(this._crossfadeParameters=he.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(he,void 0,ke)),this.paint=this._transitioningPaint.possiblyEvaluate(he,void 0,ke)},I.prototype.serialize=function(){var he={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(he.layout=he.layout||{},he.layout.visibility=this.visibility),V(he,function(ke,qe){return ke!==void 0&&!(qe==="layout"&&!Object.keys(ke).length)&&!(qe==="paint"&&!Object.keys(ke).length)})},I.prototype._validate=function(he,ke,qe,et,Et){return Et===void 0&&(Et={}),Et&&Et.validate===!1?!1:Xc(this,he.call(js,{key:ke,layerType:this.type,objectKey:qe,value:et,styleSpec:Di,style:{glyphs:!0,sprite:!0}}))},I.prototype.is3D=function(){return!1},I.prototype.isTileClipped=function(){return!1},I.prototype.hasOffscreenPass=function(){return!1},I.prototype.resize=function(){},I.prototype.isStateDependent=function(){for(var he in this.paint._values){var ke=this.paint.get(he);if(!(!(ke instanceof Hn)||!Pu(ke.property.specification))&&(ke.value.kind==="source"||ke.value.kind==="composite")&&ke.value.isStateDependent)return!0}return!1},I})(Xr),fi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Oa=function(I,$){this._structArray=I,this._pos1=$*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},gn=128,Kn=5,ga=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};ga.serialize=function(I,$){return I._trim(),$&&(I.isTransferred=!0,$.push(I.arrayBuffer)),{length:I.length,arrayBuffer:I.arrayBuffer}},ga.deserialize=function(I){var $=Object.create(this.prototype);return $.arrayBuffer=I.arrayBuffer,$.length=I.length,$.capacity=I.arrayBuffer.byteLength/$.bytesPerElement,$._refreshViews(),$},ga.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},ga.prototype.clear=function(){this.length=0},ga.prototype.resize=function(I){this.reserve(I),this.length=I},ga.prototype.reserve=function(I){if(I>this.capacity){this.capacity=Math.max(I,Math.floor(this.capacity*Kn),gn),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var $=this.uint8;this._refreshViews(),$&&this.uint8.set($)}},ga.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function za(R,I){I===void 0&&(I=1);var $=0,he=0,ke=R.map(function(et){var Et=wa(et.type),Jt=$=Ii($,Math.max(I,Et)),vr=et.components||1;return he=Math.max(he,Et),$+=Et*vr,{name:et.name,type:et.type,components:vr,offset:Jt}}),qe=Ii($,Math.max(he,I));return{members:ke,size:qe,alignment:I}}function wa(R){return fi[R].BYTES_PER_ELEMENT}function Ii(R,I){return Math.ceil(R/I)*I}var si=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.int16[et+0]=ke,this.int16[et+1]=qe,he},I})(ga);si.prototype.bytesPerElement=4,hr("StructArrayLayout2i4",si);var $i=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Et=this.length;return this.resize(Et+1),this.emplace(Et,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Et){var Jt=he*4;return this.int16[Jt+0]=ke,this.int16[Jt+1]=qe,this.int16[Jt+2]=et,this.int16[Jt+3]=Et,he},I})(ga);$i.prototype.bytesPerElement=8,hr("StructArrayLayout4i8",$i);var Ta=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt){var vr=this.length;return this.resize(vr+1),this.emplace(vr,he,ke,qe,et,Et,Jt)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr){var Ar=he*6;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.int16[Ar+2]=et,this.int16[Ar+3]=Et,this.int16[Ar+4]=Jt,this.int16[Ar+5]=vr,he},I})(ga);Ta.prototype.bytesPerElement=12,hr("StructArrayLayout2i4i12",Ta);var ca=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt){var vr=this.length;return this.resize(vr+1),this.emplace(vr,he,ke,qe,et,Et,Jt)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr){var Ar=he*4,Zr=he*8;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.uint8[Zr+4]=et,this.uint8[Zr+5]=Et,this.uint8[Zr+6]=Jt,this.uint8[Zr+7]=vr,he},I})(ga);ca.prototype.bytesPerElement=8,hr("StructArrayLayout2i4ub8",ca);var Ei=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.float32[et+0]=ke,this.float32[et+1]=qe,he},I})(ga);Ei.prototype.bytesPerElement=8,hr("StructArrayLayout2f8",Ei);var Yn=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn){var fn=this.length;return this.resize(fn+1),this.emplace(fn,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn){var On=he*10;return this.uint16[On+0]=ke,this.uint16[On+1]=qe,this.uint16[On+2]=et,this.uint16[On+3]=Et,this.uint16[On+4]=Jt,this.uint16[On+5]=vr,this.uint16[On+6]=Ar,this.uint16[On+7]=Zr,this.uint16[On+8]=mn,this.uint16[On+9]=fn,he},I})(ga);Yn.prototype.bytesPerElement=20,hr("StructArrayLayout10ui20",Yn);var yi=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On){var da=this.length;return this.resize(da+1),this.emplace(da,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da){var li=he*12;return this.int16[li+0]=ke,this.int16[li+1]=qe,this.int16[li+2]=et,this.int16[li+3]=Et,this.uint16[li+4]=Jt,this.uint16[li+5]=vr,this.uint16[li+6]=Ar,this.uint16[li+7]=Zr,this.int16[li+8]=mn,this.int16[li+9]=fn,this.int16[li+10]=On,this.int16[li+11]=da,he},I})(ga);yi.prototype.bytesPerElement=24,hr("StructArrayLayout4i4ui4i24",yi);var ni=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Et=he*3;return this.float32[Et+0]=ke,this.float32[Et+1]=qe,this.float32[Et+2]=et,he},I})(ga);ni.prototype.bytesPerElement=12,hr("StructArrayLayout3f12",ni);var Ji=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.uint32[qe+0]=ke,he},I})(ga);Ji.prototype.bytesPerElement=4,hr("StructArrayLayout1ul4",Ji);var Ho=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr){var mn=this.length;return this.resize(mn+1),this.emplace(mn,he,ke,qe,et,Et,Jt,vr,Ar,Zr)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn){var fn=he*10,On=he*5;return this.int16[fn+0]=ke,this.int16[fn+1]=qe,this.int16[fn+2]=et,this.int16[fn+3]=Et,this.int16[fn+4]=Jt,this.int16[fn+5]=vr,this.uint32[On+3]=Ar,this.uint16[fn+8]=Zr,this.uint16[fn+9]=mn,he},I})(ga);Ho.prototype.bytesPerElement=20,hr("StructArrayLayout6i1ul2ui20",Ho);var ji=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt){var vr=this.length;return this.resize(vr+1),this.emplace(vr,he,ke,qe,et,Et,Jt)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr){var Ar=he*6;return this.int16[Ar+0]=ke,this.int16[Ar+1]=qe,this.int16[Ar+2]=et,this.int16[Ar+3]=Et,this.int16[Ar+4]=Jt,this.int16[Ar+5]=vr,he},I})(ga);ji.prototype.bytesPerElement=12,hr("StructArrayLayout2i2i2i12",ji);var no=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et){var Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,he,ke,qe,et,Et)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt){var vr=he*4,Ar=he*8;return this.float32[vr+0]=ke,this.float32[vr+1]=qe,this.float32[vr+2]=et,this.int16[Ar+6]=Et,this.int16[Ar+7]=Jt,he},I})(ga);no.prototype.bytesPerElement=16,hr("StructArrayLayout2f1f2i16",no);var di=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Et=this.length;return this.resize(Et+1),this.emplace(Et,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Et){var Jt=he*12,vr=he*3;return this.uint8[Jt+0]=ke,this.uint8[Jt+1]=qe,this.float32[vr+1]=et,this.float32[vr+2]=Et,he},I})(ga);di.prototype.bytesPerElement=12,hr("StructArrayLayout2ub2f12",di);var jo=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Et=he*3;return this.uint16[Et+0]=ke,this.uint16[Et+1]=qe,this.uint16[Et+2]=et,he},I})(ga);jo.prototype.bytesPerElement=6,hr("StructArrayLayout3ui6",jo);var rs=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i){var Oi=this.length;return this.resize(Oi+1),this.emplace(Oi,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i,Oi){var Xi=he*24,mo=he*12,No=he*48;return this.int16[Xi+0]=ke,this.int16[Xi+1]=qe,this.uint16[Xi+2]=et,this.uint16[Xi+3]=Et,this.uint32[mo+2]=Jt,this.uint32[mo+3]=vr,this.uint32[mo+4]=Ar,this.uint16[Xi+10]=Zr,this.uint16[Xi+11]=mn,this.uint16[Xi+12]=fn,this.float32[mo+7]=On,this.float32[mo+8]=da,this.uint8[No+36]=li,this.uint8[No+37]=Va,this.uint8[No+38]=Ni,this.uint32[mo+10]=_i,this.int16[Xi+22]=Oi,he},I})(ga);rs.prototype.bytesPerElement=48,hr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",rs);var ds=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i,Oi,Xi,mo,No,Io,ws,Jo,fs,wl,Ts,ks){var $l=this.length;return this.resize($l+1),this.emplace($l,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i,Oi,Xi,mo,No,Io,ws,Jo,fs,wl,Ts,ks)},I.prototype.emplace=function(he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i,Oi,Xi,mo,No,Io,ws,Jo,fs,wl,Ts,ks,$l){var dl=he*34,Wu=he*17;return this.int16[dl+0]=ke,this.int16[dl+1]=qe,this.int16[dl+2]=et,this.int16[dl+3]=Et,this.int16[dl+4]=Jt,this.int16[dl+5]=vr,this.int16[dl+6]=Ar,this.int16[dl+7]=Zr,this.uint16[dl+8]=mn,this.uint16[dl+9]=fn,this.uint16[dl+10]=On,this.uint16[dl+11]=da,this.uint16[dl+12]=li,this.uint16[dl+13]=Va,this.uint16[dl+14]=Ni,this.uint16[dl+15]=_i,this.uint16[dl+16]=Oi,this.uint16[dl+17]=Xi,this.uint16[dl+18]=mo,this.uint16[dl+19]=No,this.uint16[dl+20]=Io,this.uint16[dl+21]=ws,this.uint16[dl+22]=Jo,this.uint32[Wu+12]=fs,this.float32[Wu+13]=wl,this.float32[Wu+14]=Ts,this.float32[Wu+15]=ks,this.float32[Wu+16]=$l,he},I})(ga);ds.prototype.bytesPerElement=68,hr("StructArrayLayout8i15ui1ul4f68",ds);var _l=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.float32[qe+0]=ke,he},I})(ga);_l.prototype.bytesPerElement=4,hr("StructArrayLayout1f4",_l);var vs=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Et=he*3;return this.int16[Et+0]=ke,this.int16[Et+1]=qe,this.int16[Et+2]=et,he},I})(ga);vs.prototype.bytesPerElement=6,hr("StructArrayLayout3i6",vs);var Lu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe){var et=this.length;return this.resize(et+1),this.emplace(et,he,ke,qe)},I.prototype.emplace=function(he,ke,qe,et){var Et=he*2,Jt=he*4;return this.uint32[Et+0]=ke,this.uint16[Jt+2]=qe,this.uint16[Jt+3]=et,he},I})(ga);Lu.prototype.bytesPerElement=8,hr("StructArrayLayout1ul2ui8",Lu);var ll=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke){var qe=this.length;return this.resize(qe+1),this.emplace(qe,he,ke)},I.prototype.emplace=function(he,ke,qe){var et=he*2;return this.uint16[et+0]=ke,this.uint16[et+1]=qe,he},I})(ga);ll.prototype.bytesPerElement=4,hr("StructArrayLayout2ui4",ll);var wu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he){var ke=this.length;return this.resize(ke+1),this.emplace(ke,he)},I.prototype.emplace=function(he,ke){var qe=he*1;return this.uint16[qe+0]=ke,he},I})(ga);wu.prototype.bytesPerElement=2,hr("StructArrayLayout1ui2",wu);var Gu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},I.prototype.emplaceBack=function(he,ke,qe,et){var Et=this.length;return this.resize(Et+1),this.emplace(Et,he,ke,qe,et)},I.prototype.emplace=function(he,ke,qe,et,Et){var Jt=he*4;return this.float32[Jt+0]=ke,this.float32[Jt+1]=qe,this.float32[Jt+2]=et,this.float32[Jt+3]=Et,he},I})(ga);Gu.prototype.bytesPerElement=16,hr("StructArrayLayout4f16",Gu);var oc=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return $.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},$.x1.get=function(){return this._structArray.int16[this._pos2+2]},$.y1.get=function(){return this._structArray.int16[this._pos2+3]},$.x2.get=function(){return this._structArray.int16[this._pos2+4]},$.y2.get=function(){return this._structArray.int16[this._pos2+5]},$.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},$.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},$.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},$.anchorPoint.get=function(){return new s(this.anchorPointX,this.anchorPointY)},Object.defineProperties(I.prototype,$),I})(Oa);oc.prototype.size=20;var Mf=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new oc(this,he)},I})(Ho);hr("CollisionBoxArray",Mf);var su=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return $.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},$.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},$.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},$.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},$.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},$.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},$.segment.get=function(){return this._structArray.uint16[this._pos2+10]},$.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},$.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},$.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},$.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},$.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},$.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},$.placedOrientation.set=function(he){this._structArray.uint8[this._pos1+37]=he},$.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},$.hidden.set=function(he){this._structArray.uint8[this._pos1+38]=he},$.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},$.crossTileID.set=function(he){this._structArray.uint32[this._pos4+10]=he},$.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(I.prototype,$),I})(Oa);su.prototype.size=48;var gu=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new su(this,he)},I})(rs);hr("PlacedSymbolArray",gu);var ko=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return $.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},$.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},$.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},$.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},$.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},$.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},$.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},$.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},$.key.get=function(){return this._structArray.uint16[this._pos2+8]},$.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},$.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},$.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},$.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},$.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},$.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},$.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},$.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},$.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},$.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},$.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},$.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},$.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},$.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},$.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},$.crossTileID.set=function(he){this._structArray.uint32[this._pos4+12]=he},$.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},$.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},$.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},$.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(I.prototype,$),I})(Oa);ko.prototype.size=68;var sc=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new ko(this,he)},I})(ds);hr("SymbolInstanceArray",sc);var $s=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getoffsetX=function(he){return this.float32[he*1+0]},I})(_l);hr("GlyphOffsetArray",$s);var Hl=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.getx=function(he){return this.int16[he*3+0]},I.prototype.gety=function(he){return this.int16[he*3+1]},I.prototype.gettileUnitDistanceFromAnchor=function(he){return this.int16[he*3+2]},I})(vs);hr("SymbolLineVertexArray",Hl);var gc=(function(R){function I(){R.apply(this,arguments)}R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I;var $={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return $.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},$.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},$.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(I.prototype,$),I})(Oa);gc.prototype.size=8;var _c=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.get=function(he){return new gc(this,he)},I})(Lu);hr("FeatureIndexArray",_c);var Vo=za([{name:"a_pos",components:2,type:"Int16"}],4),Ms=Vo.members,Rs=function(I){I===void 0&&(I=[]),this.segments=I};Rs.prototype.prepareSegment=function(I,$,he,ke){var qe=this.segments[this.segments.length-1];return I>Rs.MAX_VERTEX_ARRAY_LENGTH&&G("Max vertices per segment is "+Rs.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+I),(!qe||qe.vertexLength+I>Rs.MAX_VERTEX_ARRAY_LENGTH||qe.sortKey!==ke)&&(qe={vertexOffset:$.length,primitiveOffset:he.length,vertexLength:0,primitiveLength:0},ke!==void 0&&(qe.sortKey=ke),this.segments.push(qe)),qe},Rs.prototype.get=function(){return this.segments},Rs.prototype.destroy=function(){for(var I=0,$=this.segments;I<$.length;I+=1){var he=$[I];for(var ke in he.vaos)he.vaos[ke].destroy()}},Rs.simpleSegment=function(I,$,he,ke){return new Rs([{vertexOffset:I,primitiveOffset:$,vertexLength:he,primitiveLength:ke,vaos:{},sortKey:0}])},Rs.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,hr("SegmentVector",Rs);function Me(R,I){return R=c(Math.floor(R),0,255),I=c(Math.floor(I),0,255),256*R+I}var X=za([{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"}]),ge=r(function(R){function I($,he){var ke,qe,et,Et,Jt,vr,Ar,Zr;for(ke=$.length&3,qe=$.length-ke,et=he,Jt=3432918353,vr=461845907,Zr=0;Zr<qe;)Ar=$.charCodeAt(Zr)&255|($.charCodeAt(++Zr)&255)<<8|($.charCodeAt(++Zr)&255)<<16|($.charCodeAt(++Zr)&255)<<24,++Zr,Ar=(Ar&65535)*Jt+(((Ar>>>16)*Jt&65535)<<16)&4294967295,Ar=Ar<<15|Ar>>>17,Ar=(Ar&65535)*vr+(((Ar>>>16)*vr&65535)<<16)&4294967295,et^=Ar,et=et<<13|et>>>19,Et=(et&65535)*5+(((et>>>16)*5&65535)<<16)&4294967295,et=(Et&65535)+27492+(((Et>>>16)+58964&65535)<<16);switch(Ar=0,ke){case 3:Ar^=($.charCodeAt(Zr+2)&255)<<16;case 2:Ar^=($.charCodeAt(Zr+1)&255)<<8;case 1:Ar^=$.charCodeAt(Zr)&255,Ar=(Ar&65535)*Jt+(((Ar>>>16)*Jt&65535)<<16)&4294967295,Ar=Ar<<15|Ar>>>17,Ar=(Ar&65535)*vr+(((Ar>>>16)*vr&65535)<<16)&4294967295,et^=Ar}return et^=$.length,et^=et>>>16,et=(et&65535)*2246822507+(((et>>>16)*2246822507&65535)<<16)&4294967295,et^=et>>>13,et=(et&65535)*3266489909+(((et>>>16)*3266489909&65535)<<16)&4294967295,et^=et>>>16,et>>>0}R.exports=I}),ne=r(function(R){function I($,he){for(var ke=$.length,qe=he^ke,et=0,Et;ke>=4;)Et=$.charCodeAt(et)&255|($.charCodeAt(++et)&255)<<8|($.charCodeAt(++et)&255)<<16|($.charCodeAt(++et)&255)<<24,Et=(Et&65535)*1540483477+(((Et>>>16)*1540483477&65535)<<16),Et^=Et>>>24,Et=(Et&65535)*1540483477+(((Et>>>16)*1540483477&65535)<<16),qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16)^Et,ke-=4,++et;switch(ke){case 3:qe^=($.charCodeAt(et+2)&255)<<16;case 2:qe^=($.charCodeAt(et+1)&255)<<8;case 1:qe^=$.charCodeAt(et)&255,qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16)}return qe^=qe>>>13,qe=(qe&65535)*1540483477+(((qe>>>16)*1540483477&65535)<<16),qe^=qe>>>15,qe>>>0}R.exports=I}),Se=ge,Je=ge,_t=ne;Se.murmur3=Je,Se.murmur2=_t;var Tt=function(){this.ids=[],this.positions=[],this.indexed=!1};Tt.prototype.add=function(I,$,he,ke){this.ids.push(dt(I)),this.positions.push($,he,ke)},Tt.prototype.getPositions=function(I){for(var $=dt(I),he=0,ke=this.ids.length-1;he<ke;){var qe=he+ke>>1;this.ids[qe]>=$?ke=qe:he=qe+1}for(var et=[];this.ids[he]===$;){var Et=this.positions[3*he],Jt=this.positions[3*he+1],vr=this.positions[3*he+2];et.push({index:Et,start:Jt,end:vr}),he++}return et},Tt.serialize=function(I,$){var he=new Float64Array(I.ids),ke=new Uint32Array(I.positions);return Lt(he,ke,0,he.length-1),$&&$.push(he.buffer,ke.buffer),{ids:he,positions:ke}},Tt.deserialize=function(I){var $=new Tt;return $.ids=I.ids,$.positions=I.positions,$.indexed=!0,$};var it=Math.pow(2,53)-1;function dt(R){var I=+R;return!isNaN(I)&&I<=it?I:Se(String(R))}function Lt(R,I,$,he){for(;$<he;){for(var ke=R[$+he>>1],qe=$-1,et=he+1;;){do qe++;while(R[qe]<ke);do et--;while(R[et]>ke);if(qe>=et)break;or(R,qe,et),or(I,3*qe,3*et),or(I,3*qe+1,3*et+1),or(I,3*qe+2,3*et+2)}et-$<he-et?(Lt(R,I,$,et),$=et+1):(Lt(R,I,et+1,he),he=et)}}function or(R,I,$){var he=R[I];R[I]=R[$],R[$]=he}hr("FeaturePositionMap",Tt);var er=function(I,$){this.gl=I.gl,this.location=$},ur=(function(R){function I($,he){R.call(this,$,he),this.current=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){this.current!==he&&(this.current=he,this.gl.uniform1i(this.location,he))},I})(er),mr=(function(R){function I($,he){R.call(this,$,he),this.current=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){this.current!==he&&(this.current=he,this.gl.uniform1f(this.location,he))},I})(er),dr=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1])&&(this.current=he,this.gl.uniform2f(this.location,he[0],he[1]))},I})(er),Yt=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1]||he[2]!==this.current[2])&&(this.current=he,this.gl.uniform3f(this.location,he[0],he[1],he[2]))},I})(er),ar=(function(R){function I($,he){R.call(this,$,he),this.current=[0,0,0,0]}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he[0]!==this.current[0]||he[1]!==this.current[1]||he[2]!==this.current[2]||he[3]!==this.current[3])&&(this.current=he,this.gl.uniform4f(this.location,he[0],he[1],he[2],he[3]))},I})(er),tr=(function(R){function I($,he){R.call(this,$,he),this.current=Ll.transparent}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){(he.r!==this.current.r||he.g!==this.current.g||he.b!==this.current.b||he.a!==this.current.a)&&(this.current=he,this.gl.uniform4f(this.location,he.r,he.g,he.b,he.a))},I})(er),Yr=new Float32Array(16),un=(function(R){function I($,he){R.call(this,$,he),this.current=Yr}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.set=function(he){if(he[12]!==this.current[12]||he[0]!==this.current[0]){this.current=he,this.gl.uniformMatrix4fv(this.location,!1,he);return}for(var ke=1;ke<16;ke++)if(he[ke]!==this.current[ke]){this.current=he,this.gl.uniformMatrix4fv(this.location,!1,he);break}},I})(er);function En(R){return[Me(255*R.r,255*R.g),Me(255*R.b,255*R.a)]}var Ea=function(I,$,he){this.value=I,this.uniformNames=$.map(function(ke){return"u_"+ke}),this.type=he};Ea.prototype.setUniform=function(I,$,he){I.set(he.constantOr(this.value))},Ea.prototype.getBinding=function(I,$,he){return this.type==="color"?new tr(I,$):new mr(I,$)};var fa=function(I,$){this.uniformNames=$.map(function(he){return"u_"+he}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};fa.prototype.setConstantPatternPositions=function(I,$){this.pixelRatioFrom=$.pixelRatio,this.pixelRatioTo=I.pixelRatio,this.patternFrom=$.tlbr,this.patternTo=I.tlbr},fa.prototype.setUniform=function(I,$,he,ke){var qe=ke==="u_pattern_to"?this.patternTo:ke==="u_pattern_from"?this.patternFrom:ke==="u_pixel_ratio_to"?this.pixelRatioTo:ke==="u_pixel_ratio_from"?this.pixelRatioFrom:null;qe&&I.set(qe)},fa.prototype.getBinding=function(I,$,he){return he.substr(0,9)==="u_pattern"?new ar(I,$):new mr(I,$)};var sa=function(I,$,he,ke){this.expression=I,this.type=he,this.maxValue=0,this.paintVertexAttributes=$.map(function(qe){return{name:"a_"+qe,type:"Float32",components:he==="color"?2:1,offset:0}}),this.paintVertexArray=new ke};sa.prototype.populatePaintArray=function(I,$,he,ke,qe){var et=this.paintVertexArray.length,Et=this.expression.evaluate(new Ol(0),$,{},ke,[],qe);this.paintVertexArray.resize(I),this._setPaintValue(et,I,Et)},sa.prototype.updatePaintArray=function(I,$,he,ke){var qe=this.expression.evaluate({zoom:0},he,ke);this._setPaintValue(I,$,qe)},sa.prototype._setPaintValue=function(I,$,he){if(this.type==="color")for(var ke=En(he),qe=I;qe<$;qe++)this.paintVertexArray.emplace(qe,ke[0],ke[1]);else{for(var et=I;et<$;et++)this.paintVertexArray.emplace(et,he);this.maxValue=Math.max(this.maxValue,Math.abs(he))}},sa.prototype.upload=function(I){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=I.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},sa.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Ma=function(I,$,he,ke,qe,et){this.expression=I,this.uniformNames=$.map(function(Et){return"u_"+Et+"_t"}),this.type=he,this.useIntegerZoom=ke,this.zoom=qe,this.maxValue=0,this.paintVertexAttributes=$.map(function(Et){return{name:"a_"+Et,type:"Float32",components:he==="color"?4:2,offset:0}}),this.paintVertexArray=new et};Ma.prototype.populatePaintArray=function(I,$,he,ke,qe){var et=this.expression.evaluate(new Ol(this.zoom),$,{},ke,[],qe),Et=this.expression.evaluate(new Ol(this.zoom+1),$,{},ke,[],qe),Jt=this.paintVertexArray.length;this.paintVertexArray.resize(I),this._setPaintValue(Jt,I,et,Et)},Ma.prototype.updatePaintArray=function(I,$,he,ke){var qe=this.expression.evaluate({zoom:this.zoom},he,ke),et=this.expression.evaluate({zoom:this.zoom+1},he,ke);this._setPaintValue(I,$,qe,et)},Ma.prototype._setPaintValue=function(I,$,he,ke){if(this.type==="color")for(var qe=En(he),et=En(ke),Et=I;Et<$;Et++)this.paintVertexArray.emplace(Et,qe[0],qe[1],et[0],et[1]);else{for(var Jt=I;Jt<$;Jt++)this.paintVertexArray.emplace(Jt,he,ke);this.maxValue=Math.max(this.maxValue,Math.abs(he),Math.abs(ke))}},Ma.prototype.upload=function(I){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=I.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Ma.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Ma.prototype.setUniform=function(I,$){var he=this.useIntegerZoom?Math.floor($.zoom):$.zoom,ke=c(this.expression.interpolationFactor(he,this.zoom,this.zoom+1),0,1);I.set(ke)},Ma.prototype.getBinding=function(I,$,he){return new mr(I,$)};var La=function(I,$,he,ke,qe,et){this.expression=I,this.type=$,this.useIntegerZoom=he,this.zoom=ke,this.layerId=et,this.zoomInPaintVertexArray=new qe,this.zoomOutPaintVertexArray=new qe};La.prototype.populatePaintArray=function(I,$,he){var ke=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(I),this.zoomOutPaintVertexArray.resize(I),this._setPaintValues(ke,I,$.patterns&&$.patterns[this.layerId],he)},La.prototype.updatePaintArray=function(I,$,he,ke,qe){this._setPaintValues(I,$,he.patterns&&he.patterns[this.layerId],qe)},La.prototype._setPaintValues=function(I,$,he,ke){if(!(!ke||!he)){var qe=he.min,et=he.mid,Et=he.max,Jt=ke[qe],vr=ke[et],Ar=ke[Et];if(!(!Jt||!vr||!Ar))for(var Zr=I;Zr<$;Zr++)this.zoomInPaintVertexArray.emplace(Zr,vr.tl[0],vr.tl[1],vr.br[0],vr.br[1],Jt.tl[0],Jt.tl[1],Jt.br[0],Jt.br[1],vr.pixelRatio,Jt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Zr,vr.tl[0],vr.tl[1],vr.br[0],vr.br[1],Ar.tl[0],Ar.tl[1],Ar.br[0],Ar.br[1],vr.pixelRatio,Ar.pixelRatio)}},La.prototype.upload=function(I){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=I.createVertexBuffer(this.zoomInPaintVertexArray,X.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=I.createVertexBuffer(this.zoomOutPaintVertexArray,X.members,this.expression.isStateDependent))},La.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var Ja=function(I,$,he){this.binders={},this._buffers=[];var ke=[];for(var qe in I.paint._values)if(he(qe)){var et=I.paint.get(qe);if(!(!(et instanceof Hn)||!Pu(et.property.specification))){var Et=ai(qe,I.type),Jt=et.value,vr=et.property.specification.type,Ar=et.property.useIntegerZoom,Zr=et.property.specification["property-type"],mn=Zr==="cross-faded"||Zr==="cross-faded-data-driven";if(Jt.kind==="constant")this.binders[qe]=mn?new fa(Jt.value,Et):new Ea(Jt.value,Et,vr),ke.push("/u_"+qe);else if(Jt.kind==="source"||mn){var fn=Vi(qe,vr,"source");this.binders[qe]=mn?new La(Jt,vr,Ar,$,fn,I.id):new sa(Jt,Et,vr,fn),ke.push("/a_"+qe)}else{var On=Vi(qe,vr,"composite");this.binders[qe]=new Ma(Jt,Et,vr,Ar,$,On),ke.push("/z_"+qe)}}}this.cacheKey=ke.sort().join("")};Ja.prototype.getMaxValue=function(I){var $=this.binders[I];return $ instanceof sa||$ instanceof Ma?$.maxValue:0},Ja.prototype.populatePaintArrays=function(I,$,he,ke,qe){for(var et in this.binders){var Et=this.binders[et];(Et instanceof sa||Et instanceof Ma||Et instanceof La)&&Et.populatePaintArray(I,$,he,ke,qe)}},Ja.prototype.setConstantPatternPositions=function(I,$){for(var he in this.binders){var ke=this.binders[he];ke instanceof fa&&ke.setConstantPatternPositions(I,$)}},Ja.prototype.updatePaintArrays=function(I,$,he,ke,qe){var et=!1;for(var Et in I)for(var Jt=$.getPositions(Et),vr=0,Ar=Jt;vr<Ar.length;vr+=1){var Zr=Ar[vr],mn=he.feature(Zr.index);for(var fn in this.binders){var On=this.binders[fn];if((On instanceof sa||On instanceof Ma||On instanceof La)&&On.expression.isStateDependent===!0){var da=ke.paint.get(fn);On.expression=da.value,On.updatePaintArray(Zr.start,Zr.end,mn,I[Et],qe),et=!0}}}return et},Ja.prototype.defines=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];(he instanceof Ea||he instanceof fa)&&I.push.apply(I,he.uniformNames.map(function(ke){return"#define HAS_UNIFORM_"+ke}))}return I},Ja.prototype.getBinderAttributes=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];if(he instanceof sa||he instanceof Ma)for(var ke=0;ke<he.paintVertexAttributes.length;ke++)I.push(he.paintVertexAttributes[ke].name);else if(he instanceof La)for(var qe=0;qe<X.members.length;qe++)I.push(X.members[qe].name)}return I},Ja.prototype.getBinderUniforms=function(){var I=[];for(var $ in this.binders){var he=this.binders[$];if(he instanceof Ea||he instanceof fa||he instanceof Ma)for(var ke=0,qe=he.uniformNames;ke<qe.length;ke+=1){var et=qe[ke];I.push(et)}}return I},Ja.prototype.getPaintVertexBuffers=function(){return this._buffers},Ja.prototype.getUniforms=function(I,$){var he=[];for(var ke in this.binders){var qe=this.binders[ke];if(qe instanceof Ea||qe instanceof fa||qe instanceof Ma)for(var et=0,Et=qe.uniformNames;et<Et.length;et+=1){var Jt=Et[et];if($[Jt]){var vr=qe.getBinding(I,$[Jt],Jt);he.push({name:Jt,property:ke,binding:vr})}}}return he},Ja.prototype.setUniforms=function(I,$,he,ke){for(var qe=0,et=$;qe<et.length;qe+=1){var Et=et[qe],Jt=Et.name,vr=Et.property,Ar=Et.binding;this.binders[vr].setUniform(Ar,ke,he.get(vr),Jt)}},Ja.prototype.updatePaintBuffers=function(I){this._buffers=[];for(var $ in this.binders){var he=this.binders[$];if(I&&he instanceof La){var ke=I.fromScale===2?he.zoomInPaintVertexBuffer:he.zoomOutPaintVertexBuffer;ke&&this._buffers.push(ke)}else(he instanceof sa||he instanceof Ma)&&he.paintVertexBuffer&&this._buffers.push(he.paintVertexBuffer)}},Ja.prototype.upload=function(I){for(var $ in this.binders){var he=this.binders[$];(he instanceof sa||he instanceof Ma||he instanceof La)&&he.upload(I)}this.updatePaintBuffers()},Ja.prototype.destroy=function(){for(var I in this.binders){var $=this.binders[I];($ instanceof sa||$ instanceof Ma||$ instanceof La)&&$.destroy()}};var ka=function(I,$,he){he===void 0&&(he=function(){return!0}),this.programConfigurations={};for(var ke=0,qe=I;ke<qe.length;ke+=1){var et=qe[ke];this.programConfigurations[et.id]=new Ja(et,$,he)}this.needsUpload=!1,this._featureMap=new Tt,this._bufferOffset=0};ka.prototype.populatePaintArrays=function(I,$,he,ke,qe,et){for(var Et in this.programConfigurations)this.programConfigurations[Et].populatePaintArrays(I,$,ke,qe,et);$.id!==void 0&&this._featureMap.add($.id,he,this._bufferOffset,I),this._bufferOffset=I,this.needsUpload=!0},ka.prototype.updatePaintArrays=function(I,$,he,ke){for(var qe=0,et=he;qe<et.length;qe+=1){var Et=et[qe];this.needsUpload=this.programConfigurations[Et.id].updatePaintArrays(I,this._featureMap,$,Et,ke)||this.needsUpload}},ka.prototype.get=function(I){return this.programConfigurations[I]},ka.prototype.upload=function(I){if(this.needsUpload){for(var $ in this.programConfigurations)this.programConfigurations[$].upload(I);this.needsUpload=!1}},ka.prototype.destroy=function(){for(var I in this.programConfigurations)this.programConfigurations[I].destroy()};function ai(R,I){var $={"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]};return $[R]||[R.replace(I+"-","").replace(/-/g,"_")]}function gi(R){var I={"line-pattern":{source:Yn,composite:Yn},"fill-pattern":{source:Yn,composite:Yn},"fill-extrusion-pattern":{source:Yn,composite:Yn}};return I[R]}function Vi(R,I,$){var he={color:{source:Ei,composite:Gu},number:{source:_l,composite:Ei}},ke=gi(R);return ke&&ke[$]||he[I][$]}hr("ConstantBinder",Ea),hr("CrossFadedConstantBinder",fa),hr("SourceExpressionBinder",sa),hr("CrossFadedCompositeBinder",La),hr("CompositeExpressionBinder",Ma),hr("ProgramConfiguration",Ja,{omit:["_buffers"]}),hr("ProgramConfigurationSet",ka);var oo=8192,Is=15,Cs=Math.pow(2,Is-1)-1,Sl=-Cs-1;function xl(R){for(var I=oo/R.extent,$=R.loadGeometry(),he=0;he<$.length;he++)for(var ke=$[he],qe=0;qe<ke.length;qe++){var et=ke[qe],Et=Math.round(et.x*I),Jt=Math.round(et.y*I);et.x=c(Et,Sl,Cs),et.y=c(Jt,Sl,Cs),(Et<et.x||Et>et.x+1||Jt<et.y||Jt>et.y+1)&&G("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return $}function Cl(R,I){return{type:R.type,id:R.id,properties:R.properties,geometry:I?xl(R):[]}}function El(R,I,$,he,ke){R.emplaceBack(I*2+(he+1)/2,$*2+(ke+1)/2)}var lc=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.layoutVertexArray=new si,this.indexArray=new jo,this.segments=new Rs,this.programConfigurations=new ka(I.layers,I.zoom),this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};lc.prototype.populate=function(I,$,he){var ke=this.layers[0],qe=[],et=null;ke.type==="circle"&&(et=ke.layout.get("circle-sort-key"));for(var Et=0,Jt=I;Et<Jt.length;Et+=1){var vr=Jt[Et],Ar=vr.feature,Zr=vr.id,mn=vr.index,fn=vr.sourceLayerIndex,On=this.layers[0]._featureFilter.needGeometry,da=Cl(Ar,On);if(this.layers[0]._featureFilter.filter(new Ol(this.zoom),da,he)){var li=et?et.evaluate(da,{},he):void 0,Va={id:Zr,properties:Ar.properties,type:Ar.type,sourceLayerIndex:fn,index:mn,geometry:On?da.geometry:xl(Ar),patterns:{},sortKey:li};qe.push(Va)}}et&&qe.sort(function(Jo,fs){return Jo.sortKey-fs.sortKey});for(var Ni=0,_i=qe;Ni<_i.length;Ni+=1){var Oi=_i[Ni],Xi=Oi,mo=Xi.geometry,No=Xi.index,Io=Xi.sourceLayerIndex,ws=I[No].feature;this.addFeature(Oi,mo,No,he),$.featureIndex.insert(ws,mo,No,Io,this.index)}},lc.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},lc.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},lc.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},lc.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,Ms),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},lc.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},lc.prototype.addFeature=function(I,$,he,ke){for(var qe=0,et=$;qe<et.length;qe+=1)for(var Et=et[qe],Jt=0,vr=Et;Jt<vr.length;Jt+=1){var Ar=vr[Jt],Zr=Ar.x,mn=Ar.y;if(!(Zr<0||Zr>=oo||mn<0||mn>=oo)){var fn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,I.sortKey),On=fn.vertexLength;El(this.layoutVertexArray,Zr,mn,-1,-1),El(this.layoutVertexArray,Zr,mn,1,-1),El(this.layoutVertexArray,Zr,mn,1,1),El(this.layoutVertexArray,Zr,mn,-1,1),this.indexArray.emplaceBack(On,On+1,On+2),this.indexArray.emplaceBack(On,On+3,On+2),fn.vertexLength+=4,fn.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,{},ke)},hr("CircleBucket",lc,{omit:["layers"]});function vl(R,I){for(var $=0;$<R.length;$++)if(Sv(I,R[$]))return!0;for(var he=0;he<I.length;he++)if(Sv(R,I[he]))return!0;return!!Sp(R,I)}function Eu(R,I,$){return!!(Sv(R,I)||Jp(I,R,$))}function sh(R,I){if(R.length===1)return hm(I,R[0]);for(var $=0;$<I.length;$++)for(var he=I[$],ke=0;ke<he.length;ke++)if(Sv(R,he[ke]))return!0;for(var qe=0;qe<R.length;qe++)if(hm(I,R[qe]))return!0;for(var et=0;et<I.length;et++)if(Sp(R,I[et]))return!0;return!1}function Bh(R,I,$){for(var he=0;he<I.length;he++){var ke=I[he];if(R.length>=3){for(var qe=0;qe<ke.length;qe++)if(Sv(R,ke[qe]))return!0}if(Ap(R,ke,$))return!0}return!1}function Ap(R,I,$){if(R.length>1){if(Sp(R,I))return!0;for(var he=0;he<I.length;he++)if(Jp(I[he],R,$))return!0}for(var ke=0;ke<R.length;ke++)if(Jp(R[ke],I,$))return!0;return!1}function Sp(R,I){if(R.length===0||I.length===0)return!1;for(var $=0;$<R.length-1;$++)for(var he=R[$],ke=R[$+1],qe=0;qe<I.length-1;qe++){var et=I[qe],Et=I[qe+1];if(Av(he,ke,et,Et))return!0}return!1}function Av(R,I,$,he){return J(R,$,he)!==J(I,$,he)&&J(R,I,$)!==J(R,I,he)}function Jp(R,I,$){var he=$*$;if(I.length===1)return R.distSqr(I[0])<he;for(var ke=1;ke<I.length;ke++){var qe=I[ke-1],et=I[ke];if(ry(R,qe,et)<he)return!0}return!1}function ry(R,I,$){var he=I.distSqr($);if(he===0)return R.distSqr(I);var ke=((R.x-I.x)*($.x-I.x)+(R.y-I.y)*($.y-I.y))/he;return ke<0?R.distSqr(I):ke>1?R.distSqr($):R.distSqr($.sub(I)._mult(ke)._add(I))}function hm(R,I){for(var $=!1,he,ke,qe,et=0;et<R.length;et++){he=R[et];for(var Et=0,Jt=he.length-1;Et<he.length;Jt=Et++)ke=he[Et],qe=he[Jt],ke.y>I.y!=qe.y>I.y&&I.x<(qe.x-ke.x)*(I.y-ke.y)/(qe.y-ke.y)+ke.x&&($=!$)}return $}function Sv(R,I){for(var $=!1,he=0,ke=R.length-1;he<R.length;ke=he++){var qe=R[he],et=R[ke];qe.y>I.y!=et.y>I.y&&I.x<(et.x-qe.x)*(I.y-qe.y)/(et.y-qe.y)+qe.x&&($=!$)}return $}function dm(R,I,$,he,ke){for(var qe=0,et=R;qe<et.length;qe+=1){var Et=et[qe];if(I<=Et.x&&$<=Et.y&&he>=Et.x&&ke>=Et.y)return!0}var Jt=[new s(I,$),new s(I,ke),new s(he,ke),new s(he,$)];if(R.length>2)for(var vr=0,Ar=Jt;vr<Ar.length;vr+=1){var Zr=Ar[vr];if(Sv(R,Zr))return!0}for(var mn=0;mn<R.length-1;mn++){var fn=R[mn],On=R[mn+1];if(Hv(fn,On,Jt))return!0}return!1}function Hv(R,I,$){var he=$[0],ke=$[2];if(R.x<he.x&&I.x<he.x||R.x>ke.x&&I.x>ke.x||R.y<he.y&&I.y<he.y||R.y>ke.y&&I.y>ke.y)return!1;var qe=J(R,I,$[0]);return qe!==J(R,I,$[1])||qe!==J(R,I,$[2])||qe!==J(R,I,$[3])}function Ev(R,I,$){var he=I.paint.get(R).value;return he.kind==="constant"?he.value:$.programConfigurations.get(I.id).getMaxValue(R)}function Ep(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qp(R,I,$,he,ke){if(!I[0]&&!I[1])return R;var qe=s.convert(I)._mult(ke);$==="viewport"&&qe._rotate(-he);for(var et=[],Et=0;Et<R.length;Et++){var Jt=R[Et];et.push(Jt.sub(qe))}return et}var Mp=new pi({"circle-sort-key":new Pn(Di.layout_circle["circle-sort-key"])}),i1=new pi({"circle-radius":new Pn(Di.paint_circle["circle-radius"]),"circle-color":new Pn(Di.paint_circle["circle-color"]),"circle-blur":new Pn(Di.paint_circle["circle-blur"]),"circle-opacity":new Pn(Di.paint_circle["circle-opacity"]),"circle-translate":new Rn(Di.paint_circle["circle-translate"]),"circle-translate-anchor":new Rn(Di.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Rn(Di.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Rn(Di.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Pn(Di.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Pn(Di.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Pn(Di.paint_circle["circle-stroke-opacity"])}),ny={paint:i1,layout:Mp},fd=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var R=arguments,I=0,$=arguments.length;$--;)I+=R[$]*R[$];return Math.sqrt(I)});function ay(){var R=new fd(4);return fd!=Float32Array&&(R[1]=0,R[2]=0),R[0]=1,R[3]=1,R}function o1(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3],Et=Math.sin($),Jt=Math.cos($);return R[0]=he*Jt+qe*Et,R[1]=ke*Jt+et*Et,R[2]=he*-Et+qe*Jt,R[3]=ke*-Et+et*Jt,R}function Wd(){var R=new fd(9);return fd!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function Qy(R,I){var $=Math.sin(I),he=Math.cos(I);return R[0]=he,R[1]=$,R[2]=0,R[3]=-$,R[4]=he,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R}function I_(){var R=new fd(16);return fd!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R}function D_(R){var I=new fd(16);return I[0]=R[0],I[1]=R[1],I[2]=R[2],I[3]=R[3],I[4]=R[4],I[5]=R[5],I[6]=R[6],I[7]=R[7],I[8]=R[8],I[9]=R[9],I[10]=R[10],I[11]=R[11],I[12]=R[12],I[13]=R[13],I[14]=R[14],I[15]=R[15],I}function s1(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function eg(R,I){var $=I[0],he=I[1],ke=I[2],qe=I[3],et=I[4],Et=I[5],Jt=I[6],vr=I[7],Ar=I[8],Zr=I[9],mn=I[10],fn=I[11],On=I[12],da=I[13],li=I[14],Va=I[15],Ni=$*Et-he*et,_i=$*Jt-ke*et,Oi=$*vr-qe*et,Xi=he*Jt-ke*Et,mo=he*vr-qe*Et,No=ke*vr-qe*Jt,Io=Ar*da-Zr*On,ws=Ar*li-mn*On,Jo=Ar*Va-fn*On,fs=Zr*li-mn*da,wl=Zr*Va-fn*da,Ts=mn*Va-fn*li,ks=Ni*Ts-_i*wl+Oi*fs+Xi*Jo-mo*ws+No*Io;return ks?(ks=1/ks,R[0]=(Et*Ts-Jt*wl+vr*fs)*ks,R[1]=(ke*wl-he*Ts-qe*fs)*ks,R[2]=(da*No-li*mo+Va*Xi)*ks,R[3]=(mn*mo-Zr*No-fn*Xi)*ks,R[4]=(Jt*Jo-et*Ts-vr*ws)*ks,R[5]=($*Ts-ke*Jo+qe*ws)*ks,R[6]=(li*Oi-On*No-Va*_i)*ks,R[7]=(Ar*No-mn*Oi+fn*_i)*ks,R[8]=(et*wl-Et*Jo+vr*Io)*ks,R[9]=(he*Jo-$*wl-qe*Io)*ks,R[10]=(On*mo-da*Oi+Va*Ni)*ks,R[11]=(Zr*Oi-Ar*mo-fn*Ni)*ks,R[12]=(Et*ws-et*fs-Jt*Io)*ks,R[13]=($*fs-he*ws+ke*Io)*ks,R[14]=(da*_i-On*Xi-li*Ni)*ks,R[15]=(Ar*Xi-Zr*_i+mn*Ni)*ks,R):null}function tg(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3],Et=I[4],Jt=I[5],vr=I[6],Ar=I[7],Zr=I[8],mn=I[9],fn=I[10],On=I[11],da=I[12],li=I[13],Va=I[14],Ni=I[15],_i=$[0],Oi=$[1],Xi=$[2],mo=$[3];return R[0]=_i*he+Oi*Et+Xi*Zr+mo*da,R[1]=_i*ke+Oi*Jt+Xi*mn+mo*li,R[2]=_i*qe+Oi*vr+Xi*fn+mo*Va,R[3]=_i*et+Oi*Ar+Xi*On+mo*Ni,_i=$[4],Oi=$[5],Xi=$[6],mo=$[7],R[4]=_i*he+Oi*Et+Xi*Zr+mo*da,R[5]=_i*ke+Oi*Jt+Xi*mn+mo*li,R[6]=_i*qe+Oi*vr+Xi*fn+mo*Va,R[7]=_i*et+Oi*Ar+Xi*On+mo*Ni,_i=$[8],Oi=$[9],Xi=$[10],mo=$[11],R[8]=_i*he+Oi*Et+Xi*Zr+mo*da,R[9]=_i*ke+Oi*Jt+Xi*mn+mo*li,R[10]=_i*qe+Oi*vr+Xi*fn+mo*Va,R[11]=_i*et+Oi*Ar+Xi*On+mo*Ni,_i=$[12],Oi=$[13],Xi=$[14],mo=$[15],R[12]=_i*he+Oi*Et+Xi*Zr+mo*da,R[13]=_i*ke+Oi*Jt+Xi*mn+mo*li,R[14]=_i*qe+Oi*vr+Xi*fn+mo*Va,R[15]=_i*et+Oi*Ar+Xi*On+mo*Ni,R}function Cf(R,I,$){var he=$[0],ke=$[1],qe=$[2],et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va;return I===R?(R[12]=I[0]*he+I[4]*ke+I[8]*qe+I[12],R[13]=I[1]*he+I[5]*ke+I[9]*qe+I[13],R[14]=I[2]*he+I[6]*ke+I[10]*qe+I[14],R[15]=I[3]*he+I[7]*ke+I[11]*qe+I[15]):(et=I[0],Et=I[1],Jt=I[2],vr=I[3],Ar=I[4],Zr=I[5],mn=I[6],fn=I[7],On=I[8],da=I[9],li=I[10],Va=I[11],R[0]=et,R[1]=Et,R[2]=Jt,R[3]=vr,R[4]=Ar,R[5]=Zr,R[6]=mn,R[7]=fn,R[8]=On,R[9]=da,R[10]=li,R[11]=Va,R[12]=et*he+Ar*ke+On*qe+I[12],R[13]=Et*he+Zr*ke+da*qe+I[13],R[14]=Jt*he+mn*ke+li*qe+I[14],R[15]=vr*he+fn*ke+Va*qe+I[15]),R}function xc(R,I,$){var he=$[0],ke=$[1],qe=$[2];return R[0]=I[0]*he,R[1]=I[1]*he,R[2]=I[2]*he,R[3]=I[3]*he,R[4]=I[4]*ke,R[5]=I[5]*ke,R[6]=I[6]*ke,R[7]=I[7]*ke,R[8]=I[8]*qe,R[9]=I[9]*qe,R[10]=I[10]*qe,R[11]=I[11]*qe,R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15],R}function Mv(R,I,$){var he=Math.sin($),ke=Math.cos($),qe=I[4],et=I[5],Et=I[6],Jt=I[7],vr=I[8],Ar=I[9],Zr=I[10],mn=I[11];return I!==R&&(R[0]=I[0],R[1]=I[1],R[2]=I[2],R[3]=I[3],R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15]),R[4]=qe*ke+vr*he,R[5]=et*ke+Ar*he,R[6]=Et*ke+Zr*he,R[7]=Jt*ke+mn*he,R[8]=vr*ke-qe*he,R[9]=Ar*ke-et*he,R[10]=Zr*ke-Et*he,R[11]=mn*ke-Jt*he,R}function l1(R,I,$){var he=Math.sin($),ke=Math.cos($),qe=I[0],et=I[1],Et=I[2],Jt=I[3],vr=I[4],Ar=I[5],Zr=I[6],mn=I[7];return I!==R&&(R[8]=I[8],R[9]=I[9],R[10]=I[10],R[11]=I[11],R[12]=I[12],R[13]=I[13],R[14]=I[14],R[15]=I[15]),R[0]=qe*ke+vr*he,R[1]=et*ke+Ar*he,R[2]=Et*ke+Zr*he,R[3]=Jt*ke+mn*he,R[4]=vr*ke-qe*he,R[5]=Ar*ke-et*he,R[6]=Zr*ke-Et*he,R[7]=mn*ke-Jt*he,R}function O_(R,I,$,he,ke){var qe=1/Math.tan(I/2),et;return R[0]=qe/$,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=qe,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=-1,R[12]=0,R[13]=0,R[15]=0,ke!=null&&ke!==1/0?(et=1/(he-ke),R[10]=(ke+he)*et,R[14]=2*ke*he*et):(R[10]=-1,R[14]=-2*he),R}function Rc(R,I,$,he,ke,qe,et){var Et=1/(I-$),Jt=1/(he-ke),vr=1/(qe-et);return R[0]=-2*Et,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Jt,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*vr,R[11]=0,R[12]=(I+$)*Et,R[13]=(ke+he)*Jt,R[14]=(et+qe)*vr,R[15]=1,R}var Bb=tg;function rg(){var R=new fd(3);return fd!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function _3(R){var I=new fd(3);return I[0]=R[0],I[1]=R[1],I[2]=R[2],I}function Cp(R,I,$){return R[0]=I[0]+$[0],R[1]=I[1]+$[1],R[2]=I[2]+$[2],R}function ng(R,I,$){return R[0]=I[0]-$[0],R[1]=I[1]-$[1],R[2]=I[2]-$[2],R}function x3(R,I,$){return R[0]=I[0]*$,R[1]=I[1]*$,R[2]=I[2]*$,R}function jb(R,I){var $=I[0],he=I[1],ke=I[2],qe=$*$+he*he+ke*ke;return qe>0&&(qe=1/Math.sqrt(qe)),R[0]=I[0]*qe,R[1]=I[1]*qe,R[2]=I[2]*qe,R}function JR(R,I){return R[0]*I[0]+R[1]*I[1]+R[2]*I[2]}function QR(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=$[0],Et=$[1],Jt=$[2];return R[0]=ke*Jt-qe*Et,R[1]=qe*et-he*Jt,R[2]=he*Et-ke*et,R}function e8(R,I,$){var he=I[0],ke=I[1],qe=I[2];return R[0]=he*$[0]+ke*$[3]+qe*$[6],R[1]=he*$[1]+ke*$[4]+qe*$[7],R[2]=he*$[2]+ke*$[5]+qe*$[8],R}var t8=ng;(function(){var R=rg();return function(I,$,he,ke,qe,et){var Et,Jt;for($||($=3),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Et=he;Et<Jt;Et+=$)R[0]=I[Et],R[1]=I[Et+1],R[2]=I[Et+2],qe(R,R,et),I[Et]=R[0],I[Et+1]=R[1],I[Et+2]=R[2];return I}})();function r8(){var R=new fd(4);return fd!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0,R[3]=0),R}function n8(R,I,$){return R[0]=I[0]*$,R[1]=I[1]*$,R[2]=I[2]*$,R[3]=I[3]*$,R}function a8(R,I){return R[0]*I[0]+R[1]*I[1]+R[2]*I[2]+R[3]*I[3]}function b3(R,I,$){var he=I[0],ke=I[1],qe=I[2],et=I[3];return R[0]=$[0]*he+$[4]*ke+$[8]*qe+$[12]*et,R[1]=$[1]*he+$[5]*ke+$[9]*qe+$[13]*et,R[2]=$[2]*he+$[6]*ke+$[10]*qe+$[14]*et,R[3]=$[3]*he+$[7]*ke+$[11]*qe+$[15]*et,R}(function(){var R=r8();return function(I,$,he,ke,qe,et){var Et,Jt;for($||($=4),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Et=he;Et<Jt;Et+=$)R[0]=I[Et],R[1]=I[Et+1],R[2]=I[Et+2],R[3]=I[Et+3],qe(R,R,et),I[Et]=R[0],I[Et+1]=R[1],I[Et+2]=R[2],I[Et+3]=R[3];return I}})();function w3(){var R=new fd(2);return fd!=Float32Array&&(R[0]=0,R[1]=0),R}function z_(R){var I=R[0],$=R[1];return I*I+$*$}var g6=z_;(function(){var R=w3();return function(I,$,he,ke,qe,et){var Et,Jt;for($||($=2),he||(he=0),ke?Jt=Math.min(ke*$+he,I.length):Jt=I.length,Et=he;Et<Jt;Et+=$)R[0]=I[Et],R[1]=I[Et+1],qe(R,R,et),I[Et]=R[0],I[Et+1]=R[1];return I}})();var e5=(function(R){function I($){R.call(this,$,ny)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new lc(he)},I.prototype.queryRadius=function(he){var ke=he;return Ev("circle-radius",this,ke)+Ev("circle-stroke-width",this,ke)+Ep(this.paint.get("circle-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Et,Jt,vr,Ar){for(var Zr=Qp(he,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Jt.angle,vr),mn=this.paint.get("circle-radius").evaluate(ke,qe),fn=this.paint.get("circle-stroke-width").evaluate(ke,qe),On=mn+fn,da=this.paint.get("circle-pitch-alignment")==="map",li=da?Zr:i8(Zr,Ar),Va=da?On*vr:On,Ni=0,_i=et;Ni<_i.length;Ni+=1)for(var Oi=_i[Ni],Xi=0,mo=Oi;Xi<mo.length;Xi+=1){var No=mo[Xi],Io=da?No:T3(No,Ar),ws=Va,Jo=b3([],[No.x,No.y,0,1],Ar);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ws*=Jo[3]/Jt.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ws*=Jt.cameraToCenterDistance/Jo[3]),Eu(li,Io,ws))return!0}return!1},I})(Bi);function T3(R,I){var $=b3([],[R.x,R.y,0,1],I);return new s($[0]/$[3],$[1]/$[3])}function i8(R,I){return R.map(function($){return T3($,I)})}var _6=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(lc);hr("HeatmapBucket",_6,{omit:["layers"]});function t5(R,I,$,he){var ke=I.width,qe=I.height;if(!he)he=new Uint8Array(ke*qe*$);else if(he instanceof Uint8ClampedArray)he=new Uint8Array(he.buffer);else if(he.length!==ke*qe*$)throw new RangeError("mismatched image size");return R.width=ke,R.height=qe,R.data=he,R}function r5(R,I,$){var he=I.width,ke=I.height;if(!(he===R.width&&ke===R.height)){var qe=t5({},{width:he,height:ke},$);A3(R,qe,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,he),height:Math.min(R.height,ke)},$),R.width=he,R.height=ke,R.data=qe.data}}function A3(R,I,$,he,ke,qe){if(ke.width===0||ke.height===0)return I;if(ke.width>R.width||ke.height>R.height||$.x>R.width-ke.width||$.y>R.height-ke.height)throw new RangeError("out of range source coordinates for image copy");if(ke.width>I.width||ke.height>I.height||he.x>I.width-ke.width||he.y>I.height-ke.height)throw new RangeError("out of range destination coordinates for image copy");for(var et=R.data,Et=I.data,Jt=0;Jt<ke.height;Jt++)for(var vr=(($.y+Jt)*R.width+$.x)*qe,Ar=((he.y+Jt)*I.width+he.x)*qe,Zr=0;Zr<ke.width*qe;Zr++)Et[Ar+Zr]=et[vr+Zr];return I}var hd=function(I,$){t5(this,I,1,$)};hd.prototype.resize=function(I){r5(this,I,1)},hd.prototype.clone=function(){return new hd({width:this.width,height:this.height},new Uint8Array(this.data))},hd.copy=function(I,$,he,ke,qe){A3(I,$,he,ke,qe,1)};var fv=function(I,$){t5(this,I,4,$)};fv.prototype.resize=function(I){r5(this,I,4)},fv.prototype.replace=function(I,$){$?this.data.set(I):I instanceof Uint8ClampedArray?this.data=new Uint8Array(I.buffer):this.data=I},fv.prototype.clone=function(){return new fv({width:this.width,height:this.height},new Uint8Array(this.data))},fv.copy=function(I,$,he,ke,qe){A3(I,$,he,ke,qe,4)},hr("AlphaImage",hd),hr("RGBAImage",fv);var x6=new pi({"heatmap-radius":new Pn(Di.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Pn(Di.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Rn(Di.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ti(Di.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Rn(Di.paint_heatmap["heatmap-opacity"])}),ag={paint:x6};function N_(R){var I={},$=R.resolution||256,he=R.clips?R.clips.length:1,ke=R.image||new fv({width:$,height:he}),qe=function(Ni,_i,Oi){I[R.evaluationKey]=Oi;var Xi=R.expression.evaluate(I);ke.data[Ni+_i+0]=Math.floor(Xi.r*255/Xi.a),ke.data[Ni+_i+1]=Math.floor(Xi.g*255/Xi.a),ke.data[Ni+_i+2]=Math.floor(Xi.b*255/Xi.a),ke.data[Ni+_i+3]=Math.floor(Xi.a*255)};if(R.clips)for(var vr=0,Ar=0;vr<he;++vr,Ar+=$*4)for(var Zr=0,mn=0;Zr<$;Zr++,mn+=4){var fn=Zr/($-1),On=R.clips[vr],da=On.start,li=On.end,Va=da*(1-fn)+li*fn;qe(Ar,mn,Va)}else for(var et=0,Et=0;et<$;et++,Et+=4){var Jt=et/($-1);qe(0,Et,Jt)}return ke}var Ub=(function(R){function I($){R.call(this,$,ag),this._updateColorRamp()}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new _6(he)},I.prototype._handleSpecialPaintPropertyUpdate=function(he){he==="heatmap-color"&&this._updateColorRamp()},I.prototype._updateColorRamp=function(){var he=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=N_({expression:he,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null},I.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},I.prototype.queryRadius=function(){return 0},I.prototype.queryIntersectsFeature=function(){return!1},I.prototype.hasOffscreenPass=function(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"},I})(Bi),F_=new pi({"hillshade-illumination-direction":new Rn(Di.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Rn(Di.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Rn(Di.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Rn(Di.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Rn(Di.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Rn(Di.paint_hillshade["hillshade-accent-color"])}),S3={paint:F_},E3=(function(R){function I($){R.call(this,$,S3)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.hasOffscreenPass=function(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"},I})(Bi),o8=za([{name:"a_pos",components:2,type:"Int16"}],4),s8=o8.members,M3=C3,b6=C3;function C3(R,I,$){$=$||2;var he=I&&I.length,ke=he?I[0]*$:R.length,qe=n5(R,0,ke,$,!0),et=[];if(!qe||qe.next===qe.prev)return et;var Et,Jt,vr,Ar,Zr,mn,fn;if(he&&(qe=T6(R,I,qe,$)),R.length>80*$){Et=vr=R[0],Jt=Ar=R[1];for(var On=$;On<ke;On+=$)Zr=R[On],mn=R[On+1],Zr<Et&&(Et=Zr),mn<Jt&&(Jt=mn),Zr>vr&&(vr=Zr),mn>Ar&&(Ar=mn);fn=Math.max(vr-Et,Ar-Jt),fn=fn!==0?1/fn:0}return u1(qe,et,$,Et,Jt,fn),et}function n5(R,I,$,he,ke){var qe,et;if(ke===u5(R,I,$,he)>0)for(qe=I;qe<$;qe+=he)et=S6(qe,R[qe],R[qe+1],et);else for(qe=$-he;qe>=I;qe-=he)et=S6(qe,R[qe],R[qe+1],et);return et&&B_(et,et.next)&&(Gb(et),et=et.next),et}function iy(R,I){if(!R)return R;I||(I=R);var $=R,he;do if(he=!1,!$.steiner&&(B_($,$.next)||gh($.prev,$,$.next)===0)){if(Gb($),$=I=$.prev,$===$.next)break;he=!0}else $=$.next;while(he||$!==I);return I}function u1(R,I,$,he,ke,qe,et){if(R){!et&&qe&&i5(R,he,ke,qe);for(var Et=R,Jt,vr;R.prev!==R.next;){if(Jt=R.prev,vr=R.next,qe?l8(R,he,ke,qe):a5(R)){I.push(Jt.i/$),I.push(R.i/$),I.push(vr.i/$),Gb(R),R=vr.next,Et=vr.next;continue}if(R=vr,R===Et){et?et===1?(R=u8(iy(R),I,$),u1(R,I,$,he,ke,qe,2)):et===2&&w6(R,I,$,he,ke,qe):u1(iy(R),I,$,he,ke,qe,1);break}}}}function a5(R){var I=R.prev,$=R,he=R.next;if(gh(I,$,he)>=0)return!1;for(var ke=R.next.next;ke!==R.prev;){if(og(I.x,I.y,$.x,$.y,he.x,he.y,ke.x,ke.y)&&gh(ke.prev,ke,ke.next)>=0)return!1;ke=ke.next}return!0}function l8(R,I,$,he){var ke=R.prev,qe=R,et=R.next;if(gh(ke,qe,et)>=0)return!1;for(var Et=ke.x<qe.x?ke.x<et.x?ke.x:et.x:qe.x<et.x?qe.x:et.x,Jt=ke.y<qe.y?ke.y<et.y?ke.y:et.y:qe.y<et.y?qe.y:et.y,vr=ke.x>qe.x?ke.x>et.x?ke.x:et.x:qe.x>et.x?qe.x:et.x,Ar=ke.y>qe.y?ke.y>et.y?ke.y:et.y:qe.y>et.y?qe.y:et.y,Zr=o5(Et,Jt,I,$,he),mn=o5(vr,Ar,I,$,he),fn=R.prevZ,On=R.nextZ;fn&&fn.z>=Zr&&On&&On.z<=mn;){if(fn!==R.prev&&fn!==R.next&&og(ke.x,ke.y,qe.x,qe.y,et.x,et.y,fn.x,fn.y)&&gh(fn.prev,fn,fn.next)>=0||(fn=fn.prevZ,On!==R.prev&&On!==R.next&&og(ke.x,ke.y,qe.x,qe.y,et.x,et.y,On.x,On.y)&&gh(On.prev,On,On.next)>=0))return!1;On=On.nextZ}for(;fn&&fn.z>=Zr;){if(fn!==R.prev&&fn!==R.next&&og(ke.x,ke.y,qe.x,qe.y,et.x,et.y,fn.x,fn.y)&&gh(fn.prev,fn,fn.next)>=0)return!1;fn=fn.prevZ}for(;On&&On.z<=mn;){if(On!==R.prev&&On!==R.next&&og(ke.x,ke.y,qe.x,qe.y,et.x,et.y,On.x,On.y)&&gh(On.prev,On,On.next)>=0)return!1;On=On.nextZ}return!0}function u8(R,I,$){var he=R;do{var ke=he.prev,qe=he.next.next;!B_(ke,qe)&&c1(ke,he,he.next,qe)&&j_(ke,qe)&&j_(qe,ke)&&(I.push(ke.i/$),I.push(he.i/$),I.push(qe.i/$),Gb(he),Gb(he.next),he=R=qe),he=he.next}while(he!==R);return iy(he)}function w6(R,I,$,he,ke,qe){var et=R;do{for(var Et=et.next.next;Et!==et.prev;){if(et.i!==Et.i&&f8(et,Et)){var Jt=l5(et,Et);et=iy(et,et.next),Jt=iy(Jt,Jt.next),u1(et,I,$,he,ke,qe),u1(Jt,I,$,he,ke,qe);return}Et=Et.next}et=et.next}while(et!==R)}function T6(R,I,$,he){var ke=[],qe,et,Et,Jt,vr;for(qe=0,et=I.length;qe<et;qe++)Et=I[qe]*he,Jt=qe<et-1?I[qe+1]*he:R.length,vr=n5(R,Et,Jt,he,!1),vr===vr.next&&(vr.steiner=!0),ke.push(k3(vr));for(ke.sort(qb),qe=0;qe<ke.length;qe++)g0(ke[qe],$),$=iy($,$.next);return $}function qb(R,I){return R.x-I.x}function g0(R,I){if(I=ig(R,I),I){var $=l5(I,R);iy(I,I.next),iy($,$.next)}}function ig(R,I){var $=I,he=R.x,ke=R.y,qe=-1/0,et;do{if(ke<=$.y&&ke>=$.next.y&&$.next.y!==$.y){var Et=$.x+(ke-$.y)*($.next.x-$.x)/($.next.y-$.y);if(Et<=he&&Et>qe){if(qe=Et,Et===he){if(ke===$.y)return $;if(ke===$.next.y)return $.next}et=$.x<$.next.x?$:$.next}}$=$.next}while($!==I);if(!et)return null;if(he===qe)return et;var Jt=et,vr=et.x,Ar=et.y,Zr=1/0,mn;$=et;do he>=$.x&&$.x>=vr&&he!==$.x&&og(ke<Ar?he:qe,ke,vr,Ar,ke<Ar?qe:he,ke,$.x,$.y)&&(mn=Math.abs(ke-$.y)/(he-$.x),j_($,R)&&(mn<Zr||mn===Zr&&($.x>et.x||$.x===et.x&&A6(et,$)))&&(et=$,Zr=mn)),$=$.next;while($!==Jt);return et}function A6(R,I){return gh(R.prev,R,I.prev)<0&&gh(I.next,R,R.next)<0}function i5(R,I,$,he){var ke=R;do ke.z===null&&(ke.z=o5(ke.x,ke.y,I,$,he)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==R);ke.prevZ.nextZ=null,ke.prevZ=null,c8(ke)}function c8(R){var I,$,he,ke,qe,et,Et,Jt,vr=1;do{for($=R,R=null,qe=null,et=0;$;){for(et++,he=$,Et=0,I=0;I<vr&&(Et++,he=he.nextZ,!!he);I++);for(Jt=vr;Et>0||Jt>0&&he;)Et!==0&&(Jt===0||!he||$.z<=he.z)?(ke=$,$=$.nextZ,Et--):(ke=he,he=he.nextZ,Jt--),qe?qe.nextZ=ke:R=ke,ke.prevZ=qe,qe=ke;$=he}qe.nextZ=null,vr*=2}while(et>1);return R}function o5(R,I,$,he,ke){return R=32767*(R-$)*ke,I=32767*(I-he)*ke,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,R|I<<1}function k3(R){var I=R,$=R;do(I.x<$.x||I.x===$.x&&I.y<$.y)&&($=I),I=I.next;while(I!==R);return $}function og(R,I,$,he,ke,qe,et,Et){return(ke-et)*(I-Et)-(R-et)*(qe-Et)>=0&&(R-et)*(he-Et)-($-et)*(I-Et)>=0&&($-et)*(qe-Et)-(ke-et)*(he-Et)>=0}function f8(R,I){return R.next.i!==I.i&&R.prev.i!==I.i&&!s5(R,I)&&(j_(R,I)&&j_(I,R)&&P3(R,I)&&(gh(R.prev,R,I.prev)||gh(R,I.prev,I))||B_(R,I)&&gh(R.prev,R,R.next)>0&&gh(I.prev,I,I.next)>0)}function gh(R,I,$){return(I.y-R.y)*($.x-I.x)-(I.x-R.x)*($.y-I.y)}function B_(R,I){return R.x===I.x&&R.y===I.y}function c1(R,I,$,he){var ke=Hb(gh(R,I,$)),qe=Hb(gh(R,I,he)),et=Hb(gh($,he,R)),Et=Hb(gh($,he,I));return!!(ke!==qe&&et!==Et||ke===0&&Vb(R,$,I)||qe===0&&Vb(R,he,I)||et===0&&Vb($,R,he)||Et===0&&Vb($,I,he))}function Vb(R,I,$){return I.x<=Math.max(R.x,$.x)&&I.x>=Math.min(R.x,$.x)&&I.y<=Math.max(R.y,$.y)&&I.y>=Math.min(R.y,$.y)}function Hb(R){return R>0?1:R<0?-1:0}function s5(R,I){var $=R;do{if($.i!==R.i&&$.next.i!==R.i&&$.i!==I.i&&$.next.i!==I.i&&c1($,$.next,R,I))return!0;$=$.next}while($!==R);return!1}function j_(R,I){return gh(R.prev,R,R.next)<0?gh(R,I,R.next)>=0&&gh(R,R.prev,I)>=0:gh(R,I,R.prev)<0||gh(R,R.next,I)<0}function P3(R,I){var $=R,he=!1,ke=(R.x+I.x)/2,qe=(R.y+I.y)/2;do $.y>qe!=$.next.y>qe&&$.next.y!==$.y&&ke<($.next.x-$.x)*(qe-$.y)/($.next.y-$.y)+$.x&&(he=!he),$=$.next;while($!==R);return he}function l5(R,I){var $=new L3(R.i,R.x,R.y),he=new L3(I.i,I.x,I.y),ke=R.next,qe=I.prev;return R.next=I,I.prev=R,$.next=ke,ke.prev=$,he.next=$,$.prev=he,qe.next=he,he.prev=qe,he}function S6(R,I,$,he){var ke=new L3(R,I,$);return he?(ke.next=he.next,ke.prev=he,he.next.prev=ke,he.next=ke):(ke.prev=ke,ke.next=ke),ke}function Gb(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function L3(R,I,$){this.i=R,this.x=I,this.y=$,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}C3.deviation=function(R,I,$,he){var ke=I&&I.length,qe=ke?I[0]*$:R.length,et=Math.abs(u5(R,0,qe,$));if(ke)for(var Et=0,Jt=I.length;Et<Jt;Et++){var vr=I[Et]*$,Ar=Et<Jt-1?I[Et+1]*$:R.length;et-=Math.abs(u5(R,vr,Ar,$))}var Zr=0;for(Et=0;Et<he.length;Et+=3){var mn=he[Et]*$,fn=he[Et+1]*$,On=he[Et+2]*$;Zr+=Math.abs((R[mn]-R[On])*(R[fn+1]-R[mn+1])-(R[mn]-R[fn])*(R[On+1]-R[mn+1]))}return et===0&&Zr===0?0:Math.abs((Zr-et)/et)};function u5(R,I,$,he){for(var ke=0,qe=I,et=$-he;qe<$;qe+=he)ke+=(R[et]-R[qe])*(R[qe+1]+R[et+1]),et=qe;return ke}C3.flatten=function(R){for(var I=R[0][0].length,$={vertices:[],holes:[],dimensions:I},he=0,ke=0;ke<R.length;ke++){for(var qe=0;qe<R[ke].length;qe++)for(var et=0;et<I;et++)$.vertices.push(R[ke][qe][et]);ke>0&&(he+=R[ke-1].length,$.holes.push(he))}return $},M3.default=b6;function h8(R,I,$,he,ke){E6(R,I,$,he||R.length-1,ke||c5)}function E6(R,I,$,he,ke){for(;he>$;){if(he-$>600){var qe=he-$+1,et=I-$+1,Et=Math.log(qe),Jt=.5*Math.exp(2*Et/3),vr=.5*Math.sqrt(Et*Jt*(qe-Jt)/qe)*(et-qe/2<0?-1:1),Ar=Math.max($,Math.floor(I-et*Jt/qe+vr)),Zr=Math.min(he,Math.floor(I+(qe-et)*Jt/qe+vr));E6(R,I,Ar,Zr,ke)}var mn=R[I],fn=$,On=he;for(Xb(R,$,I),ke(R[he],mn)>0&&Xb(R,$,he);fn<On;){for(Xb(R,fn,On),fn++,On--;ke(R[fn],mn)<0;)fn++;for(;ke(R[On],mn)>0;)On--}ke(R[$],mn)===0?Xb(R,$,On):(On++,Xb(R,On,he)),On<=I&&($=On+1),I<=On&&(he=On-1)}}function Xb(R,I,$){var he=R[I];R[I]=R[$],R[$]=he}function c5(R,I){return R<I?-1:R>I?1:0}function _0(R,I){var $=R.length;if($<=1)return[R];for(var he=[],ke,qe,et=0;et<$;et++){var Et=le(R[et]);Et!==0&&(R[et].area=Math.abs(Et),qe===void 0&&(qe=Et<0),qe===Et<0?(ke&&he.push(ke),ke=[R[et]]):ke.push(R[et]))}if(ke&&he.push(ke),I>1)for(var Jt=0;Jt<he.length;Jt++)he[Jt].length<=I||(h8(he[Jt],I,1,he[Jt].length-1,M6),he[Jt]=he[Jt].slice(0,I));return he}function M6(R,I){return I.area-R.area}function R3(R,I,$){for(var he=$.patternDependencies,ke=!1,qe=0,et=I;qe<et.length;qe+=1){var Et=et[qe],Jt=Et.paint.get(R+"-pattern");Jt.isConstant()||(ke=!0);var vr=Jt.constantOr(null);vr&&(ke=!0,he[vr.to]=!0,he[vr.from]=!0)}return ke}function I3(R,I,$,he,ke){for(var qe=ke.patternDependencies,et=0,Et=I;et<Et.length;et+=1){var Jt=Et[et],vr=Jt.paint.get(R+"-pattern"),Ar=vr.value;if(Ar.kind!=="constant"){var Zr=Ar.evaluate({zoom:he-1},$,{},ke.availableImages),mn=Ar.evaluate({zoom:he},$,{},ke.availableImages),fn=Ar.evaluate({zoom:he+1},$,{},ke.availableImages);Zr=Zr&&Zr.name?Zr.name:Zr,mn=mn&&mn.name?mn.name:mn,fn=fn&&fn.name?fn.name:fn,qe[Zr]=!0,qe[mn]=!0,qe[fn]=!0,$.patterns[Jt.id]={min:Zr,mid:mn,max:fn}}}return $}var C6=500,vm=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new si,this.indexArray=new jo,this.indexArray2=new ll,this.programConfigurations=new ka(I.layers,I.zoom),this.segments=new Rs,this.segments2=new Rs,this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};vm.prototype.populate=function(I,$,he){this.hasPattern=R3("fill",this.layers,$);for(var ke=this.layers[0].layout.get("fill-sort-key"),qe=[],et=0,Et=I;et<Et.length;et+=1){var Jt=Et[et],vr=Jt.feature,Ar=Jt.id,Zr=Jt.index,mn=Jt.sourceLayerIndex,fn=this.layers[0]._featureFilter.needGeometry,On=Cl(vr,fn);if(this.layers[0]._featureFilter.filter(new Ol(this.zoom),On,he)){var da=ke?ke.evaluate(On,{},he,$.availableImages):void 0,li={id:Ar,properties:vr.properties,type:vr.type,sourceLayerIndex:mn,index:Zr,geometry:fn?On.geometry:xl(vr),patterns:{},sortKey:da};qe.push(li)}}ke&&qe.sort(function(Jo,fs){return Jo.sortKey-fs.sortKey});for(var Va=0,Ni=qe;Va<Ni.length;Va+=1){var _i=Ni[Va],Oi=_i,Xi=Oi.geometry,mo=Oi.index,No=Oi.sourceLayerIndex;if(this.hasPattern){var Io=I3("fill",this.layers,_i,this.zoom,$);this.patternFeatures.push(Io)}else this.addFeature(_i,Xi,mo,he,{});var ws=I[mo].feature;$.featureIndex.insert(ws,Xi,mo,No,this.index)}},vm.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},vm.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.patternFeatures;ke<qe.length;ke+=1){var et=qe[ke];this.addFeature(et,et.geometry,et.index,$,he)}},vm.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},vm.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},vm.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,s8),this.indexBuffer=I.createIndexBuffer(this.indexArray),this.indexBuffer2=I.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(I),this.uploaded=!0},vm.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},vm.prototype.addFeature=function(I,$,he,ke,qe){for(var et=0,Et=_0($,C6);et<Et.length;et+=1){for(var Jt=Et[et],vr=0,Ar=0,Zr=Jt;Ar<Zr.length;Ar+=1){var mn=Zr[Ar];vr+=mn.length}for(var fn=this.segments.prepareSegment(vr,this.layoutVertexArray,this.indexArray),On=fn.vertexLength,da=[],li=[],Va=0,Ni=Jt;Va<Ni.length;Va+=1){var _i=Ni[Va];if(_i.length!==0){_i!==Jt[0]&&li.push(da.length/2);var Oi=this.segments2.prepareSegment(_i.length,this.layoutVertexArray,this.indexArray2),Xi=Oi.vertexLength;this.layoutVertexArray.emplaceBack(_i[0].x,_i[0].y),this.indexArray2.emplaceBack(Xi+_i.length-1,Xi),da.push(_i[0].x),da.push(_i[0].y);for(var mo=1;mo<_i.length;mo++)this.layoutVertexArray.emplaceBack(_i[mo].x,_i[mo].y),this.indexArray2.emplaceBack(Xi+mo-1,Xi+mo),da.push(_i[mo].x),da.push(_i[mo].y);Oi.vertexLength+=_i.length,Oi.primitiveLength+=_i.length}}for(var No=M3(da,li),Io=0;Io<No.length;Io+=3)this.indexArray.emplaceBack(On+No[Io],On+No[Io+1],On+No[Io+2]);fn.vertexLength+=vr,fn.primitiveLength+=No.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},hr("FillBucket",vm,{omit:["layers","patternFeatures"]});var f5=new pi({"fill-sort-key":new Pn(Di.layout_fill["fill-sort-key"])}),Wb=new pi({"fill-antialias":new Rn(Di.paint_fill["fill-antialias"]),"fill-opacity":new Pn(Di.paint_fill["fill-opacity"]),"fill-color":new Pn(Di.paint_fill["fill-color"]),"fill-outline-color":new Pn(Di.paint_fill["fill-outline-color"]),"fill-translate":new Rn(Di.paint_fill["fill-translate"]),"fill-translate-anchor":new Rn(Di.paint_fill["fill-translate-anchor"]),"fill-pattern":new ri(Di.paint_fill["fill-pattern"])}),k6={paint:Wb,layout:f5},h5=(function(R){function I($){R.call(this,$,k6)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.recalculate=function(he,ke){R.prototype.recalculate.call(this,he,ke);var qe=this.paint._values["fill-outline-color"];qe.value.kind==="constant"&&qe.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},I.prototype.createBucket=function(he){return new vm(he)},I.prototype.queryRadius=function(){return Ep(this.paint.get("fill-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Et,Jt,vr){var Ar=Qp(he,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Jt.angle,vr);return sh(Ar,et)},I.prototype.isTileClipped=function(){return!0},I})(Bi),P6=za([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),em=P6.members,U_=f1;function f1(R,I,$,he,ke){this.properties={},this.extent=$,this.type=0,this._pbf=R,this._geometry=-1,this._keys=he,this._values=ke,R.readFields(L6,this,I)}function L6(R,I,$){R==1?I.id=$.readVarint():R==2?R6($,I):R==3?I.type=$.readVarint():R==4&&(I._geometry=$.pos)}function R6(R,I){for(var $=R.readVarint()+R.pos;R.pos<$;){var he=I._keys[R.readVarint()],ke=I._values[R.readVarint()];I.properties[he]=ke}}f1.types=["Unknown","Point","LineString","Polygon"],f1.prototype.loadGeometry=function(){var R=this._pbf;R.pos=this._geometry;for(var I=R.readVarint()+R.pos,$=1,he=0,ke=0,qe=0,et=[],Et;R.pos<I;){if(he<=0){var Jt=R.readVarint();$=Jt&7,he=Jt>>3}if(he--,$===1||$===2)ke+=R.readSVarint(),qe+=R.readSVarint(),$===1&&(Et&&et.push(Et),Et=[]),Et.push(new s(ke,qe));else if($===7)Et&&Et.push(Et[0].clone());else throw new Error("unknown command "+$)}return Et&&et.push(Et),et},f1.prototype.bbox=function(){var R=this._pbf;R.pos=this._geometry;for(var I=R.readVarint()+R.pos,$=1,he=0,ke=0,qe=0,et=1/0,Et=-1/0,Jt=1/0,vr=-1/0;R.pos<I;){if(he<=0){var Ar=R.readVarint();$=Ar&7,he=Ar>>3}if(he--,$===1||$===2)ke+=R.readSVarint(),qe+=R.readSVarint(),ke<et&&(et=ke),ke>Et&&(Et=ke),qe<Jt&&(Jt=qe),qe>vr&&(vr=qe);else if($!==7)throw new Error("unknown command "+$)}return[et,Jt,Et,vr]},f1.prototype.toGeoJSON=function(R,I,$){var he=this.extent*Math.pow(2,$),ke=this.extent*R,qe=this.extent*I,et=this.loadGeometry(),Et=f1.types[this.type],Jt,vr;function Ar(fn){for(var On=0;On<fn.length;On++){var da=fn[On],li=180-(da.y+qe)*360/he;fn[On]=[(da.x+ke)*360/he-180,360/Math.PI*Math.atan(Math.exp(li*Math.PI/180))-90]}}switch(this.type){case 1:var Zr=[];for(Jt=0;Jt<et.length;Jt++)Zr[Jt]=et[Jt][0];et=Zr,Ar(et);break;case 2:for(Jt=0;Jt<et.length;Jt++)Ar(et[Jt]);break;case 3:for(et=I6(et),Jt=0;Jt<et.length;Jt++)for(vr=0;vr<et[Jt].length;vr++)Ar(et[Jt][vr]);break}et.length===1?et=et[0]:Et="Multi"+Et;var mn={type:"Feature",geometry:{type:Et,coordinates:et},properties:this.properties};return"id"in this&&(mn.id=this.id),mn};function I6(R){var I=R.length;if(I<=1)return[R];for(var $=[],he,ke,qe=0;qe<I;qe++){var et=D6(R[qe]);et!==0&&(ke===void 0&&(ke=et<0),ke===et<0?(he&&$.push(he),he=[R[qe]]):he.push(R[qe]))}return he&&$.push(he),$}function D6(R){for(var I=0,$=0,he=R.length,ke=he-1,qe,et;$<he;ke=$++)qe=R[$],et=R[ke],I+=(et.x-qe.x)*(qe.y+et.y);return I}var d5=O6;function O6(R,I){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=R,this._keys=[],this._values=[],this._features=[],R.readFields(z6,this,I),this.length=this._features.length}function z6(R,I,$){R===15?I.version=$.readVarint():R===1?I.name=$.readString():R===5?I.extent=$.readVarint():R===2?I._features.push($.pos):R===3?I._keys.push($.readString()):R===4&&I._values.push(sg($))}function sg(R){for(var I=null,$=R.readVarint()+R.pos;R.pos<$;){var he=R.readVarint()>>3;I=he===1?R.readString():he===2?R.readFloat():he===3?R.readDouble():he===4?R.readVarint64():he===5?R.readVarint():he===6?R.readSVarint():he===7?R.readBoolean():null}return I}O6.prototype.feature=function(R){if(R<0||R>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[R];var I=this._pbf.readVarint()+this._pbf.pos;return new U_(this._pbf,I,this.extent,this._keys,this._values)};var N6=F6;function F6(R,I){this.layers=R.readFields(B6,{},I)}function B6(R,I,$){if(R===3){var he=new d5($,$.readVarint()+$.pos);he.length&&(I[he.name]=he)}}var j6=N6,d8=U_,v8=d5,h1={VectorTile:j6,VectorTileFeature:d8,VectorTileLayer:v8},q_=h1.VectorTileFeature.types,U6=500,V_=Math.pow(2,13);function H_(R,I,$,he,ke,qe,et,Et){R.emplaceBack(I,$,Math.floor(he*V_)*2+et,ke*V_*2,qe*V_*2,Math.round(Et))}var kp=function(I){this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function($){return $.id}),this.index=I.index,this.hasPattern=!1,this.layoutVertexArray=new Ta,this.indexArray=new jo,this.programConfigurations=new ka(I.layers,I.zoom),this.segments=new Rs,this.stateDependentLayerIds=this.layers.filter(function($){return $.isStateDependent()}).map(function($){return $.id})};kp.prototype.populate=function(I,$,he){this.features=[],this.hasPattern=R3("fill-extrusion",this.layers,$);for(var ke=0,qe=I;ke<qe.length;ke+=1){var et=qe[ke],Et=et.feature,Jt=et.id,vr=et.index,Ar=et.sourceLayerIndex,Zr=this.layers[0]._featureFilter.needGeometry,mn=Cl(Et,Zr);if(this.layers[0]._featureFilter.filter(new Ol(this.zoom),mn,he)){var fn={id:Jt,sourceLayerIndex:Ar,index:vr,geometry:Zr?mn.geometry:xl(Et),properties:Et.properties,type:Et.type,patterns:{}};this.hasPattern?this.features.push(I3("fill-extrusion",this.layers,fn,this.zoom,$)):this.addFeature(fn,fn.geometry,vr,he,{}),$.featureIndex.insert(Et,fn.geometry,vr,Ar,this.index,!0)}}},kp.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.features;ke<qe.length;ke+=1){var et=qe[ke],Et=et.geometry;this.addFeature(et,Et,et.index,$,he)}},kp.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},kp.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},kp.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},kp.prototype.upload=function(I){this.uploaded||(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,em),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},kp.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},kp.prototype.addFeature=function(I,$,he,ke,qe){for(var et=0,Et=_0($,U6);et<Et.length;et+=1){for(var Jt=Et[et],vr=0,Ar=0,Zr=Jt;Ar<Zr.length;Ar+=1){var mn=Zr[Ar];vr+=mn.length}for(var fn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),On=0,da=Jt;On<da.length;On+=1){var li=da[On];if(li.length!==0&&!O3(li))for(var Va=0,Ni=0;Ni<li.length;Ni++){var _i=li[Ni];if(Ni>=1){var Oi=li[Ni-1];if(!D3(_i,Oi)){fn.vertexLength+4>Rs.MAX_VERTEX_ARRAY_LENGTH&&(fn=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Xi=_i.sub(Oi)._perp()._unit(),mo=Oi.dist(_i);Va+mo>32768&&(Va=0),H_(this.layoutVertexArray,_i.x,_i.y,Xi.x,Xi.y,0,0,Va),H_(this.layoutVertexArray,_i.x,_i.y,Xi.x,Xi.y,0,1,Va),Va+=mo,H_(this.layoutVertexArray,Oi.x,Oi.y,Xi.x,Xi.y,0,0,Va),H_(this.layoutVertexArray,Oi.x,Oi.y,Xi.x,Xi.y,0,1,Va);var No=fn.vertexLength;this.indexArray.emplaceBack(No,No+2,No+1),this.indexArray.emplaceBack(No+1,No+2,No+3),fn.vertexLength+=4,fn.primitiveLength+=2}}}}if(fn.vertexLength+vr>Rs.MAX_VERTEX_ARRAY_LENGTH&&(fn=this.segments.prepareSegment(vr,this.layoutVertexArray,this.indexArray)),q_[I.type]==="Polygon"){for(var Io=[],ws=[],Jo=fn.vertexLength,fs=0,wl=Jt;fs<wl.length;fs+=1){var Ts=wl[fs];if(Ts.length!==0){Ts!==Jt[0]&&ws.push(Io.length/2);for(var ks=0;ks<Ts.length;ks++){var $l=Ts[ks];H_(this.layoutVertexArray,$l.x,$l.y,0,0,1,1,0),Io.push($l.x),Io.push($l.y)}}}for(var dl=M3(Io,ws),Wu=0;Wu<dl.length;Wu+=3)this.indexArray.emplaceBack(Jo+dl[Wu],Jo+dl[Wu+2],Jo+dl[Wu+1]);fn.primitiveLength+=dl.length/3,fn.vertexLength+=vr}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},hr("FillExtrusionBucket",kp,{omit:["layers","features"]});function D3(R,I){return R.x===I.x&&(R.x<0||R.x>oo)||R.y===I.y&&(R.y<0||R.y>oo)}function O3(R){return R.every(function(I){return I.x<0})||R.every(function(I){return I.x>oo})||R.every(function(I){return I.y<0})||R.every(function(I){return I.y>oo})}var p8=new pi({"fill-extrusion-opacity":new Rn(Di["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Pn(Di["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Rn(Di["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Rn(Di["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new ri(Di["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Pn(Di["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Pn(Di["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Rn(Di["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),m8={paint:p8},y8=(function(R){function I($){R.call(this,$,m8)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.createBucket=function(he){return new kp(he)},I.prototype.queryRadius=function(){return Ep(this.paint.get("fill-extrusion-translate"))},I.prototype.is3D=function(){return!0},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Et,Jt,vr,Ar){var Zr=Qp(he,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Jt.angle,vr),mn=this.paint.get("fill-extrusion-height").evaluate(ke,qe),fn=this.paint.get("fill-extrusion-base").evaluate(ke,qe),On=q6(Zr,Ar,Jt,0),da=v5(et,fn,mn,Ar),li=da[0],Va=da[1];return lg(li,Va,On)},I})(Bi);function x0(R,I){return R.x*I.x+R.y*I.y}function Yd(R,I){if(R.length===1){for(var $=0,he=I[$++],ke;!ke||he.equals(ke);)if(ke=I[$++],!ke)return 1/0;for(;$<I.length;$++){var qe=I[$],et=R[0],Et=ke.sub(he),Jt=qe.sub(he),vr=et.sub(he),Ar=x0(Et,Et),Zr=x0(Et,Jt),mn=x0(Jt,Jt),fn=x0(vr,Et),On=x0(vr,Jt),da=Ar*mn-Zr*Zr,li=(mn*fn-Zr*On)/da,Va=(Ar*On-Zr*fn)/da,Ni=1-li-Va,_i=he.z*Ni+ke.z*li+qe.z*Va;if(isFinite(_i))return _i}return 1/0}else{for(var Oi=1/0,Xi=0,mo=I;Xi<mo.length;Xi+=1){var No=mo[Xi];Oi=Math.min(Oi,No.z)}return Oi}}function lg(R,I,$){var he=1/0;sh($,I)&&(he=Yd($,I[0]));for(var ke=0;ke<I.length;ke++)for(var qe=I[ke],et=R[ke],Et=0;Et<qe.length-1;Et++){var Jt=qe[Et],vr=qe[Et+1],Ar=et[Et],Zr=et[Et+1],mn=[Jt,vr,Zr,Ar,Jt];vl($,mn)&&(he=Math.min(he,Yd($,mn)))}return he===1/0?!1:he}function v5(R,I,$,he){for(var ke=[],qe=[],et=he[8]*I,Et=he[9]*I,Jt=he[10]*I,vr=he[11]*I,Ar=he[8]*$,Zr=he[9]*$,mn=he[10]*$,fn=he[11]*$,On=0,da=R;On<da.length;On+=1){for(var li=da[On],Va=[],Ni=[],_i=0,Oi=li;_i<Oi.length;_i+=1){var Xi=Oi[_i],mo=Xi.x,No=Xi.y,Io=he[0]*mo+he[4]*No+he[12],ws=he[1]*mo+he[5]*No+he[13],Jo=he[2]*mo+he[6]*No+he[14],fs=he[3]*mo+he[7]*No+he[15],wl=Io+et,Ts=ws+Et,ks=Jo+Jt,$l=fs+vr,dl=Io+Ar,Wu=ws+Zr,Zc=Jo+mn,Yu=fs+fn,Zu=new s(wl/$l,Ts/$l);Zu.z=ks/$l,Va.push(Zu);var Uu=new s(dl/Yu,Wu/Yu);Uu.z=Zc/Yu,Ni.push(Uu)}ke.push(Va),qe.push(Ni)}return[ke,qe]}function q6(R,I,$,he){for(var ke=[],qe=0,et=R;qe<et.length;qe+=1){var Et=et[qe],Jt=[Et.x,Et.y,he,1];b3(Jt,Jt,I),ke.push(new s(Jt[0]/Jt[3],Jt[1]/Jt[3]))}return ke}var V6=za([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),p5=V6.members,g8=za([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),H6=g8.members,G6=h1.VectorTileFeature.types,X6=63,W6=Math.cos(75/2*(Math.PI/180)),m5=15,y5=20,Y6=15,G_=1/2,z3=Math.pow(2,Y6-1)/G_,hv=function(I){var $=this;this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function(he){return he.id}),this.index=I.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(function(he){$.gradients[he.id]={}}),this.layoutVertexArray=new ca,this.layoutVertexArray2=new Ei,this.indexArray=new jo,this.programConfigurations=new ka(I.layers,I.zoom),this.segments=new Rs,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(function(he){return he.isStateDependent()}).map(function(he){return he.id})};hv.prototype.populate=function(I,$,he){this.hasPattern=R3("line",this.layers,$);for(var ke=this.layers[0].layout.get("line-sort-key"),qe=[],et=0,Et=I;et<Et.length;et+=1){var Jt=Et[et],vr=Jt.feature,Ar=Jt.id,Zr=Jt.index,mn=Jt.sourceLayerIndex,fn=this.layers[0]._featureFilter.needGeometry,On=Cl(vr,fn);if(this.layers[0]._featureFilter.filter(new Ol(this.zoom),On,he)){var da=ke?ke.evaluate(On,{},he):void 0,li={id:Ar,properties:vr.properties,type:vr.type,sourceLayerIndex:mn,index:Zr,geometry:fn?On.geometry:xl(vr),patterns:{},sortKey:da};qe.push(li)}}ke&&qe.sort(function(Jo,fs){return Jo.sortKey-fs.sortKey});for(var Va=0,Ni=qe;Va<Ni.length;Va+=1){var _i=Ni[Va],Oi=_i,Xi=Oi.geometry,mo=Oi.index,No=Oi.sourceLayerIndex;if(this.hasPattern){var Io=I3("line",this.layers,_i,this.zoom,$);this.patternFeatures.push(Io)}else this.addFeature(_i,Xi,mo,he,{});var ws=I[mo].feature;$.featureIndex.insert(ws,Xi,mo,No,this.index)}},hv.prototype.update=function(I,$,he){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(I,$,this.stateDependentLayers,he)},hv.prototype.addFeatures=function(I,$,he){for(var ke=0,qe=this.patternFeatures;ke<qe.length;ke+=1){var et=qe[ke];this.addFeature(et,et.geometry,et.index,$,he)}},hv.prototype.isEmpty=function(){return this.layoutVertexArray.length===0},hv.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},hv.prototype.upload=function(I){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=I.createVertexBuffer(this.layoutVertexArray2,H6)),this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,p5),this.indexBuffer=I.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(I),this.uploaded=!0},hv.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},hv.prototype.lineFeatureClips=function(I){if(I.properties&&I.properties.hasOwnProperty("mapbox_clip_start")&&I.properties.hasOwnProperty("mapbox_clip_end")){var $=+I.properties.mapbox_clip_start,he=+I.properties.mapbox_clip_end;return{start:$,end:he}}},hv.prototype.addFeature=function(I,$,he,ke,qe){var et=this.layers[0].layout,Et=et.get("line-join").evaluate(I,{}),Jt=et.get("line-cap"),vr=et.get("line-miter-limit"),Ar=et.get("line-round-limit");this.lineClips=this.lineFeatureClips(I);for(var Zr=0,mn=$;Zr<mn.length;Zr+=1){var fn=mn[Zr];this.addLine(fn,I,Et,Jt,vr,Ar)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,I,he,qe,ke)},hv.prototype.addLine=function(I,$,he,ke,qe,et){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(var Et=0;Et<I.length-1;Et++)this.totalDistance+=I[Et].dist(I[Et+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}for(var Jt=G6[$.type]==="Polygon",vr=I.length;vr>=2&&I[vr-1].equals(I[vr-2]);)vr--;for(var Ar=0;Ar<vr-1&&I[Ar].equals(I[Ar+1]);)Ar++;if(!(vr<(Jt?3:2))){he==="bevel"&&(qe=1.05);var Zr=this.overscaling<=16?m5*oo/(512*this.overscaling):0,mn=this.segments.prepareSegment(vr*10,this.layoutVertexArray,this.indexArray),fn,On=void 0,da=void 0,li=void 0,Va=void 0;this.e1=this.e2=-1,Jt&&(fn=I[vr-2],Va=I[Ar].sub(fn)._unit()._perp());for(var Ni=Ar;Ni<vr;Ni++)if(da=Ni===vr-1?Jt?I[Ar+1]:void 0:I[Ni+1],!(da&&I[Ni].equals(da))){Va&&(li=Va),fn&&(On=fn),fn=I[Ni],Va=da?da.sub(fn)._unit()._perp():li,li=li||Va;var _i=li.add(Va);(_i.x!==0||_i.y!==0)&&_i._unit();var Oi=li.x*Va.x+li.y*Va.y,Xi=_i.x*Va.x+_i.y*Va.y,mo=Xi!==0?1/Xi:1/0,No=2*Math.sqrt(2-2*Xi),Io=Xi<W6&&On&&da,ws=li.x*Va.y-li.y*Va.x>0;if(Io&&Ni>Ar){var Jo=fn.dist(On);if(Jo>2*Zr){var fs=fn.sub(fn.sub(On)._mult(Zr/Jo)._round());this.updateDistance(On,fs),this.addCurrentVertex(fs,li,0,0,mn),On=fs}}var wl=On&&da,Ts=wl?he:Jt?"butt":ke;if(wl&&Ts==="round"&&(mo<et?Ts="miter":mo<=2&&(Ts="fakeround")),Ts==="miter"&&mo>qe&&(Ts="bevel"),Ts==="bevel"&&(mo>2&&(Ts="flipbevel"),mo<qe&&(Ts="miter")),On&&this.updateDistance(On,fn),Ts==="miter")_i._mult(mo),this.addCurrentVertex(fn,_i,0,0,mn);else if(Ts==="flipbevel"){if(mo>100)_i=Va.mult(-1);else{var ks=mo*li.add(Va).mag()/li.sub(Va).mag();_i._perp()._mult(ks*(ws?-1:1))}this.addCurrentVertex(fn,_i,0,0,mn),this.addCurrentVertex(fn,_i.mult(-1),0,0,mn)}else if(Ts==="bevel"||Ts==="fakeround"){var $l=-Math.sqrt(mo*mo-1),dl=ws?$l:0,Wu=ws?0:$l;if(On&&this.addCurrentVertex(fn,li,dl,Wu,mn),Ts==="fakeround")for(var Zc=Math.round(No*180/Math.PI/y5),Yu=1;Yu<Zc;Yu++){var Zu=Yu/Zc;if(Zu!==.5){var Uu=Zu-.5,gf=1.0904+Oi*(-3.2452+Oi*(3.55645-Oi*1.43519)),Lf=.848013+Oi*(-1.06021+Oi*.215638);Zu=Zu+Zu*Uu*(Zu-1)*(gf*Uu*Uu+Lf)}var Ch=Va.sub(li)._mult(Zu)._add(li)._unit()._mult(ws?-1:1);this.addHalfVertex(fn,Ch.x,Ch.y,!1,ws,0,mn)}da&&this.addCurrentVertex(fn,Va,-dl,-Wu,mn)}else if(Ts==="butt")this.addCurrentVertex(fn,_i,0,0,mn);else if(Ts==="square"){var Uh=On?1:-1;this.addCurrentVertex(fn,_i,Uh,Uh,mn)}else Ts==="round"&&(On&&(this.addCurrentVertex(fn,li,0,0,mn),this.addCurrentVertex(fn,li,1,1,mn,!0)),da&&(this.addCurrentVertex(fn,Va,-1,-1,mn,!0),this.addCurrentVertex(fn,Va,0,0,mn)));if(Io&&Ni<vr-1){var Jd=fn.dist(da);if(Jd>2*Zr){var yd=fn.add(da.sub(fn)._mult(Zr/Jd)._round());this.updateDistance(fn,yd),this.addCurrentVertex(yd,Va,0,0,mn),fn=yd}}}}},hv.prototype.addCurrentVertex=function(I,$,he,ke,qe,et){et===void 0&&(et=!1);var Et=$.x+$.y*he,Jt=$.y-$.x*he,vr=-$.x+$.y*ke,Ar=-$.y-$.x*ke;this.addHalfVertex(I,Et,Jt,et,!1,he,qe),this.addHalfVertex(I,vr,Ar,et,!0,-ke,qe),this.distance>z3/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(I,$,he,ke,qe,et))},hv.prototype.addHalfVertex=function(I,$,he,ke,qe,et,Et){var Jt=I.x,vr=I.y,Ar=this.lineClips?this.scaledDistance*(z3-1):this.scaledDistance,Zr=Ar*G_;if(this.layoutVertexArray.emplaceBack((Jt<<1)+(ke?1:0),(vr<<1)+(qe?1:0),Math.round(X6*$)+128,Math.round(X6*he)+128,(et===0?0:et<0?-1:1)+1|(Zr&63)<<2,Zr>>6),this.lineClips){var mn=this.scaledDistance-this.lineClips.start,fn=this.lineClips.end-this.lineClips.start,On=mn/fn;this.layoutVertexArray2.emplaceBack(On,this.lineClipsArray.length)}var da=Et.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,da),Et.primitiveLength++),qe?this.e2=da:this.e1=da},hv.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},hv.prototype.updateDistance=function(I,$){this.distance+=I.dist($),this.updateScaledDistance()},hr("LineBucket",hv,{omit:["layers","patternFeatures"]});var g5=new pi({"line-cap":new Rn(Di.layout_line["line-cap"]),"line-join":new Pn(Di.layout_line["line-join"]),"line-miter-limit":new Rn(Di.layout_line["line-miter-limit"]),"line-round-limit":new Rn(Di.layout_line["line-round-limit"]),"line-sort-key":new Pn(Di.layout_line["line-sort-key"])}),N3=new pi({"line-opacity":new Pn(Di.paint_line["line-opacity"]),"line-color":new Pn(Di.paint_line["line-color"]),"line-translate":new Rn(Di.paint_line["line-translate"]),"line-translate-anchor":new Rn(Di.paint_line["line-translate-anchor"]),"line-width":new Pn(Di.paint_line["line-width"]),"line-gap-width":new Pn(Di.paint_line["line-gap-width"]),"line-offset":new Pn(Di.paint_line["line-offset"]),"line-blur":new Pn(Di.paint_line["line-blur"]),"line-dasharray":new ei(Di.paint_line["line-dasharray"]),"line-pattern":new ri(Di.paint_line["line-pattern"]),"line-gradient":new ti(Di.paint_line["line-gradient"])}),X_={paint:N3,layout:g5},_5=(function(R){function I(){R.apply(this,arguments)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.possiblyEvaluate=function(he,ke){return ke=new Ol(Math.floor(ke.zoom),{now:ke.now,fadeDuration:ke.fadeDuration,zoomHistory:ke.zoomHistory,transition:ke.transition}),R.prototype.possiblyEvaluate.call(this,he,ke)},I.prototype.evaluate=function(he,ke,qe,et){return ke=b({},ke,{zoom:Math.floor(ke.zoom)}),R.prototype.evaluate.call(this,he,ke,qe,et)},I})(Pn),F3=new _5(X_.paint.properties["line-width"].specification);F3.useIntegerZoom=!0;var x5=(function(R){function I($){R.call(this,$,X_),this.gradientVersion=0}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype._handleSpecialPaintPropertyUpdate=function(he){if(he==="line-gradient"){var ke=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=ke._styleExpression.expression instanceof Vc,this.gradientVersion=(this.gradientVersion+1)%h}},I.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},I.prototype.recalculate=function(he,ke){R.prototype.recalculate.call(this,he,ke),this.paint._values["line-floorwidth"]=F3.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,he)},I.prototype.createBucket=function(he){return new hv(he)},I.prototype.queryRadius=function(he){var ke=he,qe=Z6(Ev("line-width",this,ke),Ev("line-gap-width",this,ke)),et=Ev("line-offset",this,ke);return qe/2+Math.abs(et)+Ep(this.paint.get("line-translate"))},I.prototype.queryIntersectsFeature=function(he,ke,qe,et,Et,Jt,vr){var Ar=Qp(he,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Jt.angle,vr),Zr=vr/2*Z6(this.paint.get("line-width").evaluate(ke,qe),this.paint.get("line-gap-width").evaluate(ke,qe)),mn=this.paint.get("line-offset").evaluate(ke,qe);return mn&&(et=K(et,mn*vr)),Bh(Ar,et,Zr)},I.prototype.isTileClipped=function(){return!0},I})(Bi);function Z6(R,I){return I>0?I+2*R:R}function K(R,I){for(var $=[],he=new s(0,0),ke=0;ke<R.length;ke++){for(var qe=R[ke],et=[],Et=0;Et<qe.length;Et++){var Jt=qe[Et-1],vr=qe[Et],Ar=qe[Et+1],Zr=Et===0?he:vr.sub(Jt)._unit()._perp(),mn=Et===qe.length-1?he:Ar.sub(vr)._unit()._perp(),fn=Zr._add(mn)._unit(),On=fn.x*mn.x+fn.y*mn.y;fn._mult(1/On),et.push(fn._mult(I)._add(vr))}$.push(et)}return $}var F=za([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),ae=za([{name:"a_projected_pos",components:3,type:"Float32"}],4);za([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);var we=za([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}]);za([{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 je=za([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),Qe=za([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);za([{name:"triangle",components:3,type:"Uint16"}]),za([{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"}]),za([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),za([{type:"Float32",name:"offsetX"}]),za([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function at(R,I,$){var he=I.layout.get("text-transform").evaluate($,{});return he==="uppercase"?R=R.toLocaleUpperCase():he==="lowercase"&&(R=R.toLocaleLowerCase()),Vl.applyArabicShaping&&(R=Vl.applyArabicShaping(R)),R}function St(R,I,$){return R.sections.forEach(function(he){he.text=at(he.text,I,$)}),R}function jt(R){var I={},$={},he=[],ke=0;function qe(Va){he.push(R[Va]),ke++}function et(Va,Ni,_i){var Oi=$[Va];return delete $[Va],$[Ni]=Oi,he[Oi].geometry[0].pop(),he[Oi].geometry[0]=he[Oi].geometry[0].concat(_i[0]),Oi}function Et(Va,Ni,_i){var Oi=I[Ni];return delete I[Ni],I[Va]=Oi,he[Oi].geometry[0].shift(),he[Oi].geometry[0]=_i[0].concat(he[Oi].geometry[0]),Oi}function Jt(Va,Ni,_i){var Oi=_i?Ni[0][Ni[0].length-1]:Ni[0][0];return Va+":"+Oi.x+":"+Oi.y}for(var vr=0;vr<R.length;vr++){var Ar=R[vr],Zr=Ar.geometry,mn=Ar.text?Ar.text.toString():null;if(!mn){qe(vr);continue}var fn=Jt(mn,Zr),On=Jt(mn,Zr,!0);if(fn in $&&On in I&&$[fn]!==I[On]){var da=Et(fn,On,Zr),li=et(fn,On,he[da].geometry);delete I[fn],delete $[On],$[Jt(mn,he[li].geometry,!0)]=li,he[da].geometry=null}else fn in $?et(fn,On,Zr):On in I?Et(fn,On,Zr):(qe(vr),I[fn]=ke-1,$[On]=ke-1)}return he.filter(function(Va){return Va.geometry})}var ir={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};function Er(R){for(var I="",$=0;$<R.length;$++){var he=R.charCodeAt($+1)||null,ke=R.charCodeAt($-1)||null,qe=(!he||!Aa(he)||ir[R[$+1]])&&(!ke||!Aa(ke)||ir[R[$-1]]);qe&&ir[R[$]]?I+=ir[R[$]]:I+=R[$]}return I}var Ir=24,rn=function(R,I,$,he,ke){var qe,et,Et=ke*8-he-1,Jt=(1<<Et)-1,vr=Jt>>1,Ar=-7,Zr=$?ke-1:0,mn=$?-1:1,fn=R[I+Zr];for(Zr+=mn,qe=fn&(1<<-Ar)-1,fn>>=-Ar,Ar+=Et;Ar>0;qe=qe*256+R[I+Zr],Zr+=mn,Ar-=8);for(et=qe&(1<<-Ar)-1,qe>>=-Ar,Ar+=he;Ar>0;et=et*256+R[I+Zr],Zr+=mn,Ar-=8);if(qe===0)qe=1-vr;else{if(qe===Jt)return et?NaN:(fn?-1:1)*(1/0);et=et+Math.pow(2,he),qe=qe-vr}return(fn?-1:1)*et*Math.pow(2,qe-he)},vn=function(R,I,$,he,ke,qe){var et,Et,Jt,vr=qe*8-ke-1,Ar=(1<<vr)-1,Zr=Ar>>1,mn=ke===23?Math.pow(2,-24)-Math.pow(2,-77):0,fn=he?0:qe-1,On=he?1:-1,da=I<0||I===0&&1/I<0?1:0;for(I=Math.abs(I),isNaN(I)||I===1/0?(Et=isNaN(I)?1:0,et=Ar):(et=Math.floor(Math.log(I)/Math.LN2),I*(Jt=Math.pow(2,-et))<1&&(et--,Jt*=2),et+Zr>=1?I+=mn/Jt:I+=mn*Math.pow(2,1-Zr),I*Jt>=2&&(et++,Jt/=2),et+Zr>=Ar?(Et=0,et=Ar):et+Zr>=1?(Et=(I*Jt-1)*Math.pow(2,ke),et=et+Zr):(Et=I*Math.pow(2,Zr-1)*Math.pow(2,ke),et=0));ke>=8;R[$+fn]=Et&255,fn+=On,Et/=256,ke-=8);for(et=et<<ke|Et,vr+=ke;vr>0;R[$+fn]=et&255,fn+=On,et/=256,vr-=8);R[$+fn-On]|=da*128},Cn={read:rn,write:vn},Bn=Qn;function Qn(R){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(R)?R:new Uint8Array(R||0),this.pos=0,this.type=0,this.length=this.buf.length}Qn.Varint=0,Qn.Fixed64=1,Qn.Bytes=2,Qn.Fixed32=5;var Ia=65536*65536,Mi=1/Ia,ii=12,bi=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Qn.prototype={destroy:function(){this.buf=null},readFields:function(R,I,$){for($=$||this.length;this.pos<$;){var he=this.readVarint(),ke=he>>3,qe=this.pos;this.type=he&7,R(ke,I,this),this.pos===qe&&this.skip(he)}return I},readMessage:function(R,I){return this.readFields(R,I,this.readVarint()+this.pos)},readFixed32:function(){var R=np(this.buf,this.pos);return this.pos+=4,R},readSFixed32:function(){var R=dd(this.buf,this.pos);return this.pos+=4,R},readFixed64:function(){var R=np(this.buf,this.pos)+np(this.buf,this.pos+4)*Ia;return this.pos+=8,R},readSFixed64:function(){var R=np(this.buf,this.pos)+dd(this.buf,this.pos+4)*Ia;return this.pos+=8,R},readFloat:function(){var R=Cn.read(this.buf,this.pos,!0,23,4);return this.pos+=4,R},readDouble:function(){var R=Cn.read(this.buf,this.pos,!0,52,8);return this.pos+=8,R},readVarint:function(R){var I=this.buf,$,he;return he=I[this.pos++],$=he&127,he<128||(he=I[this.pos++],$|=(he&127)<<7,he<128)||(he=I[this.pos++],$|=(he&127)<<14,he<128)||(he=I[this.pos++],$|=(he&127)<<21,he<128)?$:(he=I[this.pos],$|=(he&15)<<28,Qi($,R,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var R=this.readVarint();return R%2===1?(R+1)/-2:R/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var R=this.readVarint()+this.pos,I=this.pos;return this.pos=R,R-I>=ii&&bi?Xv(this.buf,I,R):Gv(this.buf,I,R)},readBytes:function(){var R=this.readVarint()+this.pos,I=this.buf.subarray(this.pos,R);return this.pos=R,I},readPackedVarint:function(R,I){if(this.type!==Qn.Bytes)return R.push(this.readVarint(I));var $=Co(this);for(R=R||[];this.pos<$;)R.push(this.readVarint(I));return R},readPackedSVarint:function(R){if(this.type!==Qn.Bytes)return R.push(this.readSVarint());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readSVarint());return R},readPackedBoolean:function(R){if(this.type!==Qn.Bytes)return R.push(this.readBoolean());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readBoolean());return R},readPackedFloat:function(R){if(this.type!==Qn.Bytes)return R.push(this.readFloat());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readFloat());return R},readPackedDouble:function(R){if(this.type!==Qn.Bytes)return R.push(this.readDouble());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readDouble());return R},readPackedFixed32:function(R){if(this.type!==Qn.Bytes)return R.push(this.readFixed32());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readFixed32());return R},readPackedSFixed32:function(R){if(this.type!==Qn.Bytes)return R.push(this.readSFixed32());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readSFixed32());return R},readPackedFixed64:function(R){if(this.type!==Qn.Bytes)return R.push(this.readFixed64());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readFixed64());return R},readPackedSFixed64:function(R){if(this.type!==Qn.Bytes)return R.push(this.readSFixed64());var I=Co(this);for(R=R||[];this.pos<I;)R.push(this.readSFixed64());return R},skip:function(R){var I=R&7;if(I===Qn.Varint)for(;this.buf[this.pos++]>127;);else if(I===Qn.Bytes)this.pos=this.readVarint()+this.pos;else if(I===Qn.Fixed32)this.pos+=4;else if(I===Qn.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+I)},writeTag:function(R,I){this.writeVarint(R<<3|I)},realloc:function(R){for(var I=this.length||16;I<this.pos+R;)I*=2;if(I!==this.length){var $=new Uint8Array(I);$.set(this.buf),this.buf=$,this.length=I}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(R){this.realloc(4),jh(this.buf,R,this.pos),this.pos+=4},writeSFixed32:function(R){this.realloc(4),jh(this.buf,R,this.pos),this.pos+=4},writeFixed64:function(R){this.realloc(8),jh(this.buf,R&-1,this.pos),jh(this.buf,Math.floor(R*Mi),this.pos+4),this.pos+=8},writeSFixed64:function(R){this.realloc(8),jh(this.buf,R&-1,this.pos),jh(this.buf,Math.floor(R*Mi),this.pos+4),this.pos+=8},writeVarint:function(R){if(R=+R||0,R>268435455||R<0){bl(R,this);return}this.realloc(4),this.buf[this.pos++]=R&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=(R>>>=7)&127|(R>127?128:0),!(R<=127)&&(this.buf[this.pos++]=R>>>7&127)))},writeSVarint:function(R){this.writeVarint(R<0?-R*2-1:R*2)},writeBoolean:function(R){this.writeVarint(!!R)},writeString:function(R){R=String(R),this.realloc(R.length*4),this.pos++;var I=this.pos;this.pos=Wv(this.buf,R,this.pos);var $=this.pos-I;$>=128&&Hs(I,$,this),this.pos=I-1,this.writeVarint($),this.pos+=$},writeFloat:function(R){this.realloc(4),Cn.write(this.buf,R,this.pos,!0,23,4),this.pos+=4},writeDouble:function(R){this.realloc(8),Cn.write(this.buf,R,this.pos,!0,52,8),this.pos+=8},writeBytes:function(R){var I=R.length;this.writeVarint(I),this.realloc(I);for(var $=0;$<I;$++)this.buf[this.pos++]=R[$]},writeRawMessage:function(R,I){this.pos++;var $=this.pos;R(I,this);var he=this.pos-$;he>=128&&Hs($,he,this),this.pos=$-1,this.writeVarint(he),this.pos+=he},writeMessage:function(R,I,$){this.writeTag(R,Qn.Bytes),this.writeRawMessage(I,$)},writePackedVarint:function(R,I){I.length&&this.writeMessage(R,Ns,I)},writePackedSVarint:function(R,I){I.length&&this.writeMessage(R,Ds,I)},writePackedBoolean:function(R,I){I.length&&this.writeMessage(R,Gs,I)},writePackedFloat:function(R,I){I.length&&this.writeMessage(R,go,I)},writePackedDouble:function(R,I){I.length&&this.writeMessage(R,Qs,I)},writePackedFixed32:function(R,I){I.length&&this.writeMessage(R,Fl,I)},writePackedSFixed32:function(R,I){I.length&&this.writeMessage(R,mf,I)},writePackedFixed64:function(R,I){I.length&&this.writeMessage(R,of,I)},writePackedSFixed64:function(R,I){I.length&&this.writeMessage(R,kd,I)},writeBytesField:function(R,I){this.writeTag(R,Qn.Bytes),this.writeBytes(I)},writeFixed32Field:function(R,I){this.writeTag(R,Qn.Fixed32),this.writeFixed32(I)},writeSFixed32Field:function(R,I){this.writeTag(R,Qn.Fixed32),this.writeSFixed32(I)},writeFixed64Field:function(R,I){this.writeTag(R,Qn.Fixed64),this.writeFixed64(I)},writeSFixed64Field:function(R,I){this.writeTag(R,Qn.Fixed64),this.writeSFixed64(I)},writeVarintField:function(R,I){this.writeTag(R,Qn.Varint),this.writeVarint(I)},writeSVarintField:function(R,I){this.writeTag(R,Qn.Varint),this.writeSVarint(I)},writeStringField:function(R,I){this.writeTag(R,Qn.Bytes),this.writeString(I)},writeFloatField:function(R,I){this.writeTag(R,Qn.Fixed32),this.writeFloat(I)},writeDoubleField:function(R,I){this.writeTag(R,Qn.Fixed64),this.writeDouble(I)},writeBooleanField:function(R,I){this.writeVarintField(R,!!I)}};function Qi(R,I,$){var he=$.buf,ke,qe;if(qe=he[$.pos++],ke=(qe&112)>>4,qe<128||(qe=he[$.pos++],ke|=(qe&127)<<3,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<10,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<17,qe<128)||(qe=he[$.pos++],ke|=(qe&127)<<24,qe<128)||(qe=he[$.pos++],ke|=(qe&1)<<31,qe<128))return cs(R,ke,I);throw new Error("Expected varint not more than 10 bytes")}function Co(R){return R.type===Qn.Bytes?R.readVarint()+R.pos:R.pos+1}function cs(R,I,$){return $?I*4294967296+(R>>>0):(I>>>0)*4294967296+(R>>>0)}function bl(R,I){var $,he;if(R>=0?($=R%4294967296|0,he=R/4294967296|0):($=~(-R%4294967296),he=~(-R/4294967296),$^4294967295?$=$+1|0:($=0,he=he+1|0)),R>=18446744073709552e3||R<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");I.realloc(10),xs($,he,I),ss(he,I)}function xs(R,I,$){$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos++]=R&127|128,R>>>=7,$.buf[$.pos]=R&127}function ss(R,I){var $=(R&7)<<4;I.buf[I.pos++]|=$|((R>>>=3)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127|((R>>>=7)?128:0),R&&(I.buf[I.pos++]=R&127)))))}function Hs(R,I,$){var he=I<=16383?1:I<=2097151?2:I<=268435455?3:Math.floor(Math.log(I)/(Math.LN2*7));$.realloc(he);for(var ke=$.pos-1;ke>=R;ke--)$.buf[ke+he]=$.buf[ke]}function Ns(R,I){for(var $=0;$<R.length;$++)I.writeVarint(R[$])}function Ds(R,I){for(var $=0;$<R.length;$++)I.writeSVarint(R[$])}function go(R,I){for(var $=0;$<R.length;$++)I.writeFloat(R[$])}function Qs(R,I){for(var $=0;$<R.length;$++)I.writeDouble(R[$])}function Gs(R,I){for(var $=0;$<R.length;$++)I.writeBoolean(R[$])}function Fl(R,I){for(var $=0;$<R.length;$++)I.writeFixed32(R[$])}function mf(R,I){for(var $=0;$<R.length;$++)I.writeSFixed32(R[$])}function of(R,I){for(var $=0;$<R.length;$++)I.writeFixed64(R[$])}function kd(R,I){for(var $=0;$<R.length;$++)I.writeSFixed64(R[$])}function np(R,I){return(R[I]|R[I+1]<<8|R[I+2]<<16)+R[I+3]*16777216}function jh(R,I,$){R[$]=I,R[$+1]=I>>>8,R[$+2]=I>>>16,R[$+3]=I>>>24}function dd(R,I){return(R[I]|R[I+1]<<8|R[I+2]<<16)+(R[I+3]<<24)}function Gv(R,I,$){for(var he="",ke=I;ke<$;){var qe=R[ke],et=null,Et=qe>239?4:qe>223?3:qe>191?2:1;if(ke+Et>$)break;var Jt,vr,Ar;Et===1?qe<128&&(et=qe):Et===2?(Jt=R[ke+1],(Jt&192)===128&&(et=(qe&31)<<6|Jt&63,et<=127&&(et=null))):Et===3?(Jt=R[ke+1],vr=R[ke+2],(Jt&192)===128&&(vr&192)===128&&(et=(qe&15)<<12|(Jt&63)<<6|vr&63,(et<=2047||et>=55296&&et<=57343)&&(et=null))):Et===4&&(Jt=R[ke+1],vr=R[ke+2],Ar=R[ke+3],(Jt&192)===128&&(vr&192)===128&&(Ar&192)===128&&(et=(qe&15)<<18|(Jt&63)<<12|(vr&63)<<6|Ar&63,(et<=65535||et>=1114112)&&(et=null))),et===null?(et=65533,Et=1):et>65535&&(et-=65536,he+=String.fromCharCode(et>>>10&1023|55296),et=56320|et&1023),he+=String.fromCharCode(et),ke+=Et}return he}function Xv(R,I,$){return bi.decode(R.subarray(I,$))}function Wv(R,I,$){for(var he=0,ke,qe;he<I.length;he++){if(ke=I.charCodeAt(he),ke>55295&&ke<57344)if(qe)if(ke<56320){R[$++]=239,R[$++]=191,R[$++]=189,qe=ke;continue}else ke=qe-55296<<10|ke-56320|65536,qe=null;else{ke>56319||he+1===I.length?(R[$++]=239,R[$++]=191,R[$++]=189):qe=ke;continue}else qe&&(R[$++]=239,R[$++]=191,R[$++]=189,qe=null);ke<128?R[$++]=ke:(ke<2048?R[$++]=ke>>6|192:(ke<65536?R[$++]=ke>>12|224:(R[$++]=ke>>18|240,R[$++]=ke>>12&63|128),R[$++]=ke>>6&63|128),R[$++]=ke&63|128)}return $}var lh=3;function Pd(R,I,$){R===1&&$.readMessage(Cv,I)}function Cv(R,I,$){if(R===3){var he=$.readMessage(dv,{}),ke=he.id,qe=he.bitmap,et=he.width,Et=he.height,Jt=he.left,vr=he.top,Ar=he.advance;I.push({id:ke,bitmap:new hd({width:et+2*lh,height:Et+2*lh},qe),metrics:{width:et,height:Et,left:Jt,top:vr,advance:Ar}})}}function dv(R,I,$){R===1?I.id=$.readVarint():R===2?I.bitmap=$.readBytes():R===3?I.width=$.readVarint():R===4?I.height=$.readVarint():R===5?I.left=$.readSVarint():R===6?I.top=$.readSVarint():R===7&&(I.advance=$.readVarint())}function Yv(R){return new Bn(R).readFields(Pd,[])}var Zd=lh;function Pp(R){for(var I=0,$=0,he=0,ke=R;he<ke.length;he+=1){var qe=ke[he];I+=qe.w*qe.h,$=Math.max($,qe.w)}R.sort(function(li,Va){return Va.h-li.h});for(var et=Math.max(Math.ceil(Math.sqrt(I/.95)),$),Et=[{x:0,y:0,w:et,h:1/0}],Jt=0,vr=0,Ar=0,Zr=R;Ar<Zr.length;Ar+=1)for(var mn=Zr[Ar],fn=Et.length-1;fn>=0;fn--){var On=Et[fn];if(!(mn.w>On.w||mn.h>On.h)){if(mn.x=On.x,mn.y=On.y,vr=Math.max(vr,mn.y+mn.h),Jt=Math.max(Jt,mn.x+mn.w),mn.w===On.w&&mn.h===On.h){var da=Et.pop();fn<Et.length&&(Et[fn]=da)}else mn.h===On.h?(On.x+=mn.w,On.w-=mn.w):mn.w===On.w?(On.y+=mn.h,On.h-=mn.h):(Et.push({x:On.x+mn.w,y:On.y,w:On.w-mn.w,h:mn.h}),On.y+=mn.h,On.h-=mn.h);break}}return{w:Jt,h:vr,fill:I/(Jt*vr)||0}}var kf=1,Xu=function(I,$){var he=$.pixelRatio,ke=$.version,qe=$.stretchX,et=$.stretchY,Et=$.content;this.paddedRect=I,this.pixelRatio=he,this.stretchX=qe,this.stretchY=et,this.content=Et,this.version=ke},Ic={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};Ic.tl.get=function(){return[this.paddedRect.x+kf,this.paddedRect.y+kf]},Ic.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-kf,this.paddedRect.y+this.paddedRect.h-kf]},Ic.tlbr.get=function(){return this.tl.concat(this.br)},Ic.displaySize.get=function(){return[(this.paddedRect.w-kf*2)/this.pixelRatio,(this.paddedRect.h-kf*2)/this.pixelRatio]},Object.defineProperties(Xu.prototype,Ic);var Wc=function(I,$){var he={},ke={};this.haveRenderCallbacks=[];var qe=[];this.addImages(I,he,qe),this.addImages($,ke,qe);var et=Pp(qe),Et=et.w,Jt=et.h,vr=new fv({width:Et||1,height:Jt||1});for(var Ar in I){var Zr=I[Ar],mn=he[Ar].paddedRect;fv.copy(Zr.data,vr,{x:0,y:0},{x:mn.x+kf,y:mn.y+kf},Zr.data)}for(var fn in $){var On=$[fn],da=ke[fn].paddedRect,li=da.x+kf,Va=da.y+kf,Ni=On.data.width,_i=On.data.height;fv.copy(On.data,vr,{x:0,y:0},{x:li,y:Va},On.data),fv.copy(On.data,vr,{x:0,y:_i-1},{x:li,y:Va-1},{width:Ni,height:1}),fv.copy(On.data,vr,{x:0,y:0},{x:li,y:Va+_i},{width:Ni,height:1}),fv.copy(On.data,vr,{x:Ni-1,y:0},{x:li-1,y:Va},{width:1,height:_i}),fv.copy(On.data,vr,{x:0,y:0},{x:li+Ni,y:Va},{width:1,height:_i})}this.image=vr,this.iconPositions=he,this.patternPositions=ke};Wc.prototype.addImages=function(I,$,he){for(var ke in I){var qe=I[ke],et={x:0,y:0,w:qe.data.width+2*kf,h:qe.data.height+2*kf};he.push(et),$[ke]=new Xu(et,qe),qe.hasRenderCallback&&this.haveRenderCallbacks.push(ke)}},Wc.prototype.patchUpdatedImages=function(I,$){I.dispatchRenderCallbacks(this.haveRenderCallbacks);for(var he in I.updatedImages)this.patchUpdatedImage(this.iconPositions[he],I.getImage(he),$),this.patchUpdatedImage(this.patternPositions[he],I.getImage(he),$)},Wc.prototype.patchUpdatedImage=function(I,$,he){if(!(!I||!$)&&I.version!==$.version){I.version=$.version;var ke=I.tl,qe=ke[0],et=ke[1];he.update($.data,void 0,{x:qe,y:et})}},hr("ImagePosition",Xu),hr("ImageAtlas",Wc);var eh={horizontal:1,vertical:2,horizontalOnly:3},Pf=-17;function W_(R){for(var I=0,$=R;I<$.length;I+=1){var he=$[I];if(he.positionedGlyphs.length!==0)return!1}return!0}var Gm=57344,Xm=63743,kv=function(){this.scale=1,this.fontStack="",this.imageName=null};kv.forText=function(I,$){var he=new kv;return he.scale=I||1,he.fontStack=$,he},kv.forImage=function(I){var $=new kv;return $.imageName=I,$};var yf=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};yf.fromFeature=function(I,$){for(var he=new yf,ke=0;ke<I.sections.length;ke++){var qe=I.sections[ke];qe.image?he.addImageSection(qe):he.addTextSection(qe,$)}return he},yf.prototype.length=function(){return this.text.length},yf.prototype.getSection=function(I){return this.sections[this.sectionIndex[I]]},yf.prototype.getSectionIndex=function(I){return this.sectionIndex[I]},yf.prototype.getCharCode=function(I){return this.text.charCodeAt(I)},yf.prototype.verticalizePunctuation=function(){this.text=Er(this.text)},yf.prototype.trim=function(){for(var I=0,$=0;$<this.text.length&&Lp[this.text.charCodeAt($)];$++)I++;for(var he=this.text.length,ke=this.text.length-1;ke>=0&&ke>=I&&Lp[this.text.charCodeAt(ke)];ke--)he--;this.text=this.text.substring(I,he),this.sectionIndex=this.sectionIndex.slice(I,he)},yf.prototype.substring=function(I,$){var he=new yf;return he.text=this.text.substring(I,$),he.sectionIndex=this.sectionIndex.slice(I,$),he.sections=this.sections,he},yf.prototype.toString=function(){return this.text},yf.prototype.getMaxScale=function(){var I=this;return this.sectionIndex.reduce(function($,he){return Math.max($,I.sections[he].scale)},0)},yf.prototype.addTextSection=function(I,$){this.text+=I.text,this.sections.push(kv.forText(I.scale,I.fontStack||$));for(var he=this.sections.length-1,ke=0;ke<I.text.length;++ke)this.sectionIndex.push(he)},yf.prototype.addImageSection=function(I){var $=I.image?I.image.name:"";if($.length===0){G("Can't add FormattedSection with an empty image.");return}var he=this.getNextImageSectionCharCode();if(!he){G("Reached maximum number of images "+(Xm-Gm+2));return}this.text+=String.fromCharCode(he),this.sections.push(kv.forImage($)),this.sectionIndex.push(this.sections.length-1)},yf.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=Xm?null:++this.imageSectionID:(this.imageSectionID=Gm,this.imageSectionID)};function $d(R,I){for(var $=[],he=R.text,ke=0,qe=0,et=I;qe<et.length;qe+=1){var Et=et[qe];$.push(R.substring(ke,Et)),ke=Et}return ke<he.length&&$.push(R.substring(ke,he.length)),$}function pm(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da){var li=yf.fromFeature(R,ke);Zr===eh.vertical&&li.verticalizePunctuation();var Va,Ni=Vl.processBidirectionalText,_i=Vl.processStyledBidirectionalText;if(Ni&&li.sections.length===1){Va=[];for(var Oi=Ni(li.toString(),S5(li,vr,qe,I,he,fn,On)),Xi=0,mo=Oi;Xi<mo.length;Xi+=1){var No=mo[Xi],Io=new yf;Io.text=No,Io.sections=li.sections;for(var ws=0;ws<No.length;ws++)Io.sectionIndex.push(0);Va.push(Io)}}else if(_i){Va=[];for(var Jo=_i(li.text,li.sectionIndex,S5(li,vr,qe,I,he,fn,On)),fs=0,wl=Jo;fs<wl.length;fs+=1){var Ts=wl[fs],ks=new yf;ks.text=Ts[0],ks.sectionIndex=Ts[1],ks.sections=li.sections,Va.push(ks)}}else Va=$d(li,S5(li,vr,qe,I,he,fn,On));var $l=[],dl={positionedLines:$l,text:li.toString(),top:Ar[1],bottom:Ar[1],left:Ar[0],right:Ar[0],writingMode:Zr,iconsInText:!1,verticalizable:!1};return _8(dl,I,$,he,Va,et,Et,Jt,Zr,vr,mn,da),W_($l)?!1:dl}var Lp={};Lp[9]=!0,Lp[10]=!0,Lp[11]=!0,Lp[12]=!0,Lp[13]=!0,Lp[32]=!0;var Zv={};Zv[10]=!0,Zv[32]=!0,Zv[38]=!0,Zv[40]=!0,Zv[41]=!0,Zv[43]=!0,Zv[45]=!0,Zv[47]=!0,Zv[173]=!0,Zv[183]=!0,Zv[8203]=!0,Zv[8208]=!0,Zv[8211]=!0,Zv[8231]=!0;function b5(R,I,$,he,ke,qe){if(I.imageName){var Jt=he[I.imageName];return Jt?Jt.displaySize[0]*I.scale*Ir/qe+ke:0}else{var et=$[I.fontStack],Et=et&&et[R];return Et?Et.metrics.advance*I.scale+ke:0}}function w5(R,I,$,he,ke,qe){for(var et=0,Et=0;Et<R.length();Et++){var Jt=R.getSection(Et);et+=b5(R.getCharCode(Et),Jt,he,ke,I,qe)}var vr=Math.max(1,Math.ceil(et/$));return et/vr}function B3(R,I,$,he){var ke=Math.pow(R-I,2);return he?R<I?ke/2:ke*2:ke+Math.abs($)*$}function oy(R,I,$){var he=0;return R===10&&(he-=1e4),$&&(he+=150),(R===40||R===65288)&&(he+=50),(I===41||I===65289)&&(he+=50),he}function T5(R,I,$,he,ke,qe){for(var et=null,Et=B3(I,$,ke,qe),Jt=0,vr=he;Jt<vr.length;Jt+=1){var Ar=vr[Jt],Zr=I-Ar.x,mn=B3(Zr,$,ke,qe)+Ar.badness;mn<=Et&&(et=Ar,Et=mn)}return{index:R,x:I,priorBreak:et,badness:Et}}function A5(R){return R?A5(R.priorBreak).concat(R.index):[]}function S5(R,I,$,he,ke,qe,et){if(qe!=="point")return[];if(!R)return[];for(var Et=[],Jt=w5(R,I,$,he,ke,et),vr=R.text.indexOf("​")>=0,Ar=0,Zr=0;Zr<R.length();Zr++){var mn=R.getSection(Zr),fn=R.getCharCode(Zr);if(Lp[fn]||(Ar+=b5(fn,mn,he,ke,I,et)),Zr<R.length()-1){var On=Sa(fn);(Zv[fn]||On||mn.imageName)&&Et.push(T5(Zr+1,Ar,Jt,Et,oy(fn,R.getCharCode(Zr+1),On&&vr),!1))}}return A5(T5(R.length(),Ar,Jt,Et,0,!0))}function E5(R){var I=.5,$=.5;switch(R){case"right":case"top-right":case"bottom-right":I=1;break;case"left":case"top-left":case"bottom-left":I=0;break}switch(R){case"bottom":case"bottom-right":case"bottom-left":$=1;break;case"top":case"top-right":case"top-left":$=0;break}return{horizontalAlign:I,verticalAlign:$}}function _8(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr){for(var mn=0,fn=Pf,On=0,da=0,li=Et==="right"?1:Et==="left"?0:.5,Va=0,Ni=0,_i=ke;Ni<_i.length;Ni+=1){var Oi=_i[Ni];Oi.trim();var Xi=Oi.getMaxScale(),mo=(Xi-1)*Ir,No={positionedGlyphs:[],lineOffset:0};R.positionedLines[Va]=No;var Io=No.positionedGlyphs,ws=0;if(!Oi.length()){fn+=qe,++Va;continue}for(var Jo=0;Jo<Oi.length();Jo++){var fs=Oi.getSection(Jo),wl=Oi.getSectionIndex(Jo),Ts=Oi.getCharCode(Jo),ks=0,$l=null,dl=null,Wu=null,Zc=Ir,Yu=!(Jt===eh.horizontal||!Ar&&!Xa(Ts)||Ar&&(Lp[Ts]||Si(Ts)));if(fs.imageName){var Ch=he[fs.imageName];if(!Ch)continue;Wu=fs.imageName,R.iconsInText=R.iconsInText||!0,dl=Ch.paddedRect;var Uh=Ch.displaySize;fs.scale=fs.scale*Ir/Zr,$l={width:Uh[0],height:Uh[1],left:kf,top:-Zd,advance:Yu?Uh[1]:Uh[0]};var Jd=Ir-Uh[1]*fs.scale;ks=mo+Jd,Zc=$l.advance;var yd=Yu?Uh[0]*fs.scale-Ir*Xi:Uh[1]*fs.scale-Ir*Xi;yd>0&&yd>ws&&(ws=yd)}else{var Zu=$[fs.fontStack],Uu=Zu&&Zu[Ts];if(Uu&&Uu.rect)dl=Uu.rect,$l=Uu.metrics;else{var gf=I[fs.fontStack],Lf=gf&&gf[Ts];if(!Lf)continue;$l=Lf.metrics}ks=(Xi-fs.scale)*Ir}Yu?(R.verticalizable=!0,Io.push({glyph:Ts,imageName:Wu,x:mn,y:fn+ks,vertical:Yu,scale:fs.scale,fontStack:fs.fontStack,sectionIndex:wl,metrics:$l,rect:dl}),mn+=Zc*fs.scale+vr):(Io.push({glyph:Ts,imageName:Wu,x:mn,y:fn+ks,vertical:Yu,scale:fs.scale,fontStack:fs.fontStack,sectionIndex:wl,metrics:$l,rect:dl}),mn+=$l.advance*fs.scale+vr)}if(Io.length!==0){var $v=mn-vr;On=Math.max($v,On),x8(Io,0,Io.length-1,li,ws)}mn=0;var Kv=qe*Xi+ws;No.lineOffset=Math.max(ws,mo),fn+=Kv,da=Math.max(Kv,da),++Va}var Qd=fn-Pf,ap=E5(et),ip=ap.horizontalAlign,Ld=ap.verticalAlign;b8(R.positionedLines,li,ip,Ld,On,da,qe,Qd,ke.length),R.top+=-Ld*Qd,R.bottom=R.top+Qd,R.left+=-ip*On,R.right=R.left+On}function x8(R,I,$,he,ke){if(!(!he&&!ke))for(var qe=R[$],et=qe.metrics.advance*qe.scale,Et=(R[$].x+et)*he,Jt=I;Jt<=$;Jt++)R[Jt].x-=Et,R[Jt].y+=ke}function b8(R,I,$,he,ke,qe,et,Et,Jt){var vr=(I-$)*ke,Ar=0;qe!==et?Ar=-Et*he-Pf:Ar=(-he*Jt+.5)*et;for(var Zr=0,mn=R;Zr<mn.length;Zr+=1)for(var fn=mn[Zr],On=0,da=fn.positionedGlyphs;On<da.length;On+=1){var li=da[On];li.x+=vr,li.y+=Ar}}function w8(R,I,$){var he=E5($),ke=he.horizontalAlign,qe=he.verticalAlign,et=I[0],Et=I[1],Jt=et-R.displaySize[0]*ke,vr=Jt+R.displaySize[0],Ar=Et-R.displaySize[1]*qe,Zr=Ar+R.displaySize[1];return{image:R,top:Ar,bottom:Zr,left:Jt,right:vr}}function $6(R,I,$,he,ke,qe){var et=R.image,Et;if(et.content){var Jt=et.content,vr=et.pixelRatio||1;Et=[Jt[0]/vr,Jt[1]/vr,et.displaySize[0]-Jt[2]/vr,et.displaySize[1]-Jt[3]/vr]}var Ar=I.left*qe,Zr=I.right*qe,mn,fn,On,da;$==="width"||$==="both"?(da=ke[0]+Ar-he[3],fn=ke[0]+Zr+he[1]):(da=ke[0]+(Ar+Zr-et.displaySize[0])/2,fn=da+et.displaySize[0]);var li=I.top*qe,Va=I.bottom*qe;return $==="height"||$==="both"?(mn=ke[1]+li-he[0],On=ke[1]+Va+he[2]):(mn=ke[1]+(li+Va-et.displaySize[1])/2,On=mn+et.displaySize[1]),{image:et,top:mn,right:fn,bottom:On,left:da,collisionPadding:Et}}var Y_=(function(R){function I($,he,ke,qe){R.call(this,$,he),this.angle=ke,qe!==void 0&&(this.segment=qe)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.clone=function(){return new I(this.x,this.y,this.angle,this.segment)},I})(s);hr("Anchor",Y_);var vd=128;function Z_(R,I){var $=I.expression;if($.kind==="constant"){var he=$.evaluate(new Ol(R+1));return{kind:"constant",layoutSize:he}}else{if($.kind==="source")return{kind:"source"};for(var ke=$.zoomStops,qe=$.interpolationType,et=0;et<ke.length&&ke[et]<=R;)et++;et=Math.max(0,et-1);for(var Et=et;Et<ke.length&&ke[Et]<R+1;)Et++;Et=Math.min(ke.length-1,Et);var Jt=ke[et],vr=ke[Et];if($.kind==="composite")return{kind:"composite",minZoom:Jt,maxZoom:vr,interpolationType:qe};var Ar=$.evaluate(new Ol(Jt)),Zr=$.evaluate(new Ol(vr));return{kind:"camera",minZoom:Jt,maxZoom:vr,minSize:Ar,maxSize:Zr,interpolationType:qe}}}function M5(R,I,$){var he=I.uSize,ke=I.uSizeT,qe=$.lowerSize,et=$.upperSize;return R.kind==="source"?qe/vd:R.kind==="composite"?yu(qe/vd,et/vd,ke):he}function K6(R,I){var $=0,he=0;if(R.kind==="constant")he=R.layoutSize;else if(R.kind!=="source"){var ke=R.interpolationType,qe=R.minZoom,et=R.maxZoom,Et=ke?c(yc.interpolationFactor(ke,I,qe,et),0,1):0;R.kind==="camera"?he=yu(R.minSize,R.maxSize,Et):$=Et}return{uSizeT:$,uSize:he}}var T8=Object.freeze({__proto__:null,getSizeData:Z_,evaluateSizeForFeature:M5,evaluateSizeForZoom:K6,SIZE_PACK_FACTOR:vd});function J6(R,I,$,he,ke){if(I.segment===void 0)return!0;for(var qe=I,et=I.segment+1,Et=0;Et>-$/2;){if(et--,et<0)return!1;Et-=R[et].dist(qe),qe=R[et]}Et+=R[et].dist(R[et+1]),et++;for(var Jt=[],vr=0;Et<$/2;){var Ar=R[et-1],Zr=R[et],mn=R[et+1];if(!mn)return!1;var fn=Ar.angleTo(Zr)-Zr.angleTo(mn);for(fn=Math.abs((fn+3*Math.PI)%(Math.PI*2)-Math.PI),Jt.push({distance:Et,angleDelta:fn}),vr+=fn;Et-Jt[0].distance>he;)vr-=Jt.shift().angleDelta;if(vr>ke)return!1;et++,Et+=Zr.dist(mn)}return!0}function vv(R){for(var I=0,$=0;$<R.length-1;$++)I+=R[$].dist(R[$+1]);return I}function Rp(R,I,$){return R?3/5*I*$:0}function ug(R,I){return Math.max(R?R.right-R.left:0,I?I.right-I.left:0)}function Wm(R,I,$,he,ke,qe){for(var et=Rp($,ke,qe),Et=ug($,he)*qe,Jt=0,vr=vv(R)/2,Ar=0;Ar<R.length-1;Ar++){var Zr=R[Ar],mn=R[Ar+1],fn=Zr.dist(mn);if(Jt+fn>vr){var On=(vr-Jt)/fn,da=yu(Zr.x,mn.x,On),li=yu(Zr.y,mn.y,On),Va=new Y_(da,li,mn.angleTo(Zr),Ar);return Va._round(),!et||J6(R,Va,Et,et,I)?Va:void 0}Jt+=fn}}function d1(R,I,$,he,ke,qe,et,Et,Jt){var vr=Rp(he,qe,et),Ar=ug(he,ke),Zr=Ar*et,mn=R[0].x===0||R[0].x===Jt||R[0].y===0||R[0].y===Jt;I-Zr<I/4&&(I=Zr+I/4);var fn=qe*2,On=mn?I/2*Et%I:(Ar/2+fn)*et*Et%I;return Ym(R,On,I,vr,$,Zr,mn,!1,Jt)}function Ym(R,I,$,he,ke,qe,et,Et,Jt){for(var vr=qe/2,Ar=vv(R),Zr=0,mn=I-$,fn=[],On=0;On<R.length-1;On++){for(var da=R[On],li=R[On+1],Va=da.dist(li),Ni=li.angleTo(da);mn+$<Zr+Va;){mn+=$;var _i=(mn-Zr)/Va,Oi=yu(da.x,li.x,_i),Xi=yu(da.y,li.y,_i);if(Oi>=0&&Oi<Jt&&Xi>=0&&Xi<Jt&&mn-vr>=0&&mn+vr<=Ar){var mo=new Y_(Oi,Xi,Ni,On);mo._round(),(!he||J6(R,mo,qe,he,ke))&&fn.push(mo)}}Zr+=Va}return!Et&&!fn.length&&!et&&(fn=Ym(R,Zr/2,$,he,ke,qe,et,!0,Jt)),fn}function XF(R,I,$,he,ke){for(var qe=[],et=0;et<R.length;et++)for(var Et=R[et],Jt=void 0,vr=0;vr<Et.length-1;vr++){var Ar=Et[vr],Zr=Et[vr+1];Ar.x<I&&Zr.x<I||(Ar.x<I?Ar=new s(I,Ar.y+(Zr.y-Ar.y)*((I-Ar.x)/(Zr.x-Ar.x)))._round():Zr.x<I&&(Zr=new s(I,Ar.y+(Zr.y-Ar.y)*((I-Ar.x)/(Zr.x-Ar.x)))._round()),!(Ar.y<$&&Zr.y<$)&&(Ar.y<$?Ar=new s(Ar.x+(Zr.x-Ar.x)*(($-Ar.y)/(Zr.y-Ar.y)),$)._round():Zr.y<$&&(Zr=new s(Ar.x+(Zr.x-Ar.x)*(($-Ar.y)/(Zr.y-Ar.y)),$)._round()),!(Ar.x>=he&&Zr.x>=he)&&(Ar.x>=he?Ar=new s(he,Ar.y+(Zr.y-Ar.y)*((he-Ar.x)/(Zr.x-Ar.x)))._round():Zr.x>=he&&(Zr=new s(he,Ar.y+(Zr.y-Ar.y)*((he-Ar.x)/(Zr.x-Ar.x)))._round()),!(Ar.y>=ke&&Zr.y>=ke)&&(Ar.y>=ke?Ar=new s(Ar.x+(Zr.x-Ar.x)*((ke-Ar.y)/(Zr.y-Ar.y)),ke)._round():Zr.y>=ke&&(Zr=new s(Ar.x+(Zr.x-Ar.x)*((ke-Ar.y)/(Zr.y-Ar.y)),ke)._round()),(!Jt||!Ar.equals(Jt[Jt.length-1]))&&(Jt=[Ar],qe.push(Jt)),Jt.push(Zr)))))}return qe}var j3=kf;function WF(R,I,$,he){var ke=[],qe=R.image,et=qe.pixelRatio,Et=qe.paddedRect.w-2*j3,Jt=qe.paddedRect.h-2*j3,vr=R.right-R.left,Ar=R.bottom-R.top,Zr=qe.stretchX||[[0,Et]],mn=qe.stretchY||[[0,Jt]],fn=function(Zu,Uu){return Zu+Uu[1]-Uu[0]},On=Zr.reduce(fn,0),da=mn.reduce(fn,0),li=Et-On,Va=Jt-da,Ni=0,_i=On,Oi=0,Xi=da,mo=0,No=li,Io=0,ws=Va;if(qe.content&&he){var Jo=qe.content;Ni=Q6(Zr,0,Jo[0]),Oi=Q6(mn,0,Jo[1]),_i=Q6(Zr,Jo[0],Jo[2]),Xi=Q6(mn,Jo[1],Jo[3]),mo=Jo[0]-Ni,Io=Jo[1]-Oi,No=Jo[2]-Jo[0]-_i,ws=Jo[3]-Jo[1]-Xi}var fs=function(Zu,Uu,gf,Lf){var Ch=ek(Zu.stretch-Ni,_i,vr,R.left),Uh=tk(Zu.fixed-mo,No,Zu.stretch,On),Jd=ek(Uu.stretch-Oi,Xi,Ar,R.top),yd=tk(Uu.fixed-Io,ws,Uu.stretch,da),$v=ek(gf.stretch-Ni,_i,vr,R.left),Kv=tk(gf.fixed-mo,No,gf.stretch,On),Qd=ek(Lf.stretch-Oi,Xi,Ar,R.top),ap=tk(Lf.fixed-Io,ws,Lf.stretch,da),ip=new s(Ch,Jd),Ld=new s($v,Jd),op=new s($v,Qd),mm=new s(Ch,Qd),m1=new s(Uh/et,yd/et),J_=new s(Kv/et,ap/et),Q_=I*Math.PI/180;if(Q_){var ex=Math.sin(Q_),Y3=Math.cos(Q_),b0=[Y3,-ex,ex,Y3];ip._matMult(b0),Ld._matMult(b0),mm._matMult(b0),op._matMult(b0)}var sk=Zu.stretch+Zu.fixed,L8=gf.stretch+gf.fixed,lk=Uu.stretch+Uu.fixed,R8=Lf.stretch+Lf.fixed,Zm={x:qe.paddedRect.x+j3+sk,y:qe.paddedRect.y+j3+lk,w:L8-sk,h:R8-lk},Z3=No/et/vr,uk=ws/et/Ar;return{tl:ip,tr:Ld,bl:mm,br:op,tex:Zm,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:m1,pixelOffsetBR:J_,minFontScaleX:Z3,minFontScaleY:uk,isSDF:$}};if(!he||!qe.stretchX&&!qe.stretchY)ke.push(fs({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Et+1},{fixed:0,stretch:Jt+1}));else for(var wl=YF(Zr,li,On),Ts=YF(mn,Va,da),ks=0;ks<wl.length-1;ks++)for(var $l=wl[ks],dl=wl[ks+1],Wu=0;Wu<Ts.length-1;Wu++){var Zc=Ts[Wu],Yu=Ts[Wu+1];ke.push(fs($l,Zc,dl,Yu))}return ke}function Q6(R,I,$){for(var he=0,ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke];he+=Math.max(I,Math.min($,et[1]))-Math.max(I,Math.min($,et[0]))}return he}function YF(R,I,$){for(var he=[{fixed:-j3,stretch:0}],ke=0,qe=R;ke<qe.length;ke+=1){var et=qe[ke],Et=et[0],Jt=et[1],vr=he[he.length-1];he.push({fixed:Et-vr.stretch,stretch:vr.stretch}),he.push({fixed:Et-vr.stretch,stretch:vr.stretch+(Jt-Et)})}return he.push({fixed:I+j3,stretch:$}),he}function ek(R,I,$,he){return R/I*$+he}function tk(R,I,$,he){return R-I*$/he}function aae(R,I,$,he,ke,qe,et,Et){for(var Jt=he.layout.get("text-rotate").evaluate(qe,{})*Math.PI/180,vr=[],Ar=0,Zr=I.positionedLines;Ar<Zr.length;Ar+=1)for(var mn=Zr[Ar],fn=0,On=mn.positionedGlyphs;fn<On.length;fn+=1){var da=On[fn];if(da.rect){var li=da.rect||{},Va=1,Ni=Zd+Va,_i=!0,Oi=1,Xi=0,mo=(ke||Et)&&da.vertical,No=da.metrics.advance*da.scale/2;if(Et&&I.verticalizable){var Io=(da.scale-1)*Ir,ws=(Ir-da.metrics.width*da.scale)/2;Xi=mn.lineOffset/2-(da.imageName?-ws:Io)}if(da.imageName){var Jo=et[da.imageName];_i=Jo.sdf,Oi=Jo.pixelRatio,Ni=kf/Oi}var fs=ke?[da.x+No,da.y]:[0,0],wl=ke?[0,0]:[da.x+No+$[0],da.y+$[1]-Xi],Ts=[0,0];mo&&(Ts=wl,wl=[0,0]);var ks=(da.metrics.left-Ni)*da.scale-No+wl[0],$l=(-da.metrics.top-Ni)*da.scale+wl[1],dl=ks+li.w*da.scale/Oi,Wu=$l+li.h*da.scale/Oi,Zc=new s(ks,$l),Yu=new s(dl,$l),Zu=new s(ks,Wu),Uu=new s(dl,Wu);if(mo){var gf=new s(-No,No-Pf),Lf=-Math.PI/2,Ch=Ir/2-No,Uh=da.imageName?Ch:0,Jd=new s(5-Pf-Ch,-Uh),yd=new(Function.prototype.bind.apply(s,[null].concat(Ts)));Zc._rotateAround(Lf,gf)._add(Jd)._add(yd),Yu._rotateAround(Lf,gf)._add(Jd)._add(yd),Zu._rotateAround(Lf,gf)._add(Jd)._add(yd),Uu._rotateAround(Lf,gf)._add(Jd)._add(yd)}if(Jt){var $v=Math.sin(Jt),Kv=Math.cos(Jt),Qd=[Kv,-$v,$v,Kv];Zc._matMult(Qd),Yu._matMult(Qd),Zu._matMult(Qd),Uu._matMult(Qd)}var ap=new s(0,0),ip=new s(0,0),Ld=0,op=0;vr.push({tl:Zc,tr:Yu,bl:Zu,br:Uu,tex:li,writingMode:I.writingMode,glyphOffset:fs,sectionIndex:da.sectionIndex,isSDF:_i,pixelOffsetTL:ap,pixelOffsetBR:ip,minFontScaleX:Ld,minFontScaleY:op})}}return vr}var rk=function(I,$,he,ke,qe,et,Et,Jt,vr,Ar){if(this.boxStartIndex=I.length,vr){var Zr=et.top,mn=et.bottom,fn=et.collisionPadding;fn&&(Zr-=fn[1],mn+=fn[3]);var On=mn-Zr;On>0&&(On=Math.max(10,On),this.circleDiameter=On)}else{var da=et.top*Et-Jt,li=et.bottom*Et+Jt,Va=et.left*Et-Jt,Ni=et.right*Et+Jt,_i=et.collisionPadding;if(_i&&(Va-=_i[0]*Et,da-=_i[1]*Et,Ni+=_i[2]*Et,li+=_i[3]*Et),Ar){var Oi=new s(Va,da),Xi=new s(Ni,da),mo=new s(Va,li),No=new s(Ni,li),Io=Ar*Math.PI/180;Oi._rotate(Io),Xi._rotate(Io),mo._rotate(Io),No._rotate(Io),Va=Math.min(Oi.x,Xi.x,mo.x,No.x),Ni=Math.max(Oi.x,Xi.x,mo.x,No.x),da=Math.min(Oi.y,Xi.y,mo.y,No.y),li=Math.max(Oi.y,Xi.y,mo.y,No.y)}I.emplaceBack($.x,$.y,Va,da,Ni,li,he,ke,qe)}this.boxEndIndex=I.length},U3=function(I,$){if(I===void 0&&(I=[]),$===void 0&&($=iae),this.data=I,this.length=this.data.length,this.compare=$,this.length>0)for(var he=(this.length>>1)-1;he>=0;he--)this._down(he)};U3.prototype.push=function(I){this.data.push(I),this.length++,this._up(this.length-1)},U3.prototype.pop=function(){if(this.length!==0){var I=this.data[0],$=this.data.pop();return this.length--,this.length>0&&(this.data[0]=$,this._down(0)),I}},U3.prototype.peek=function(){return this.data[0]},U3.prototype._up=function(I){for(var $=this,he=$.data,ke=$.compare,qe=he[I];I>0;){var et=I-1>>1,Et=he[et];if(ke(qe,Et)>=0)break;he[I]=Et,I=et}he[I]=qe},U3.prototype._down=function(I){for(var $=this,he=$.data,ke=$.compare,qe=this.length>>1,et=he[I];I<qe;){var Et=(I<<1)+1,Jt=he[Et],vr=Et+1;if(vr<this.length&&ke(he[vr],Jt)<0&&(Et=vr,Jt=he[vr]),ke(Jt,et)>=0)break;he[I]=Jt,I=Et}he[I]=et};function iae(R,I){return R<I?-1:R>I?1:0}function oae(R,I,$){$===void 0&&($=!1);for(var he=1/0,ke=1/0,qe=-1/0,et=-1/0,Et=R[0],Jt=0;Jt<Et.length;Jt++){var vr=Et[Jt];(!Jt||vr.x<he)&&(he=vr.x),(!Jt||vr.y<ke)&&(ke=vr.y),(!Jt||vr.x>qe)&&(qe=vr.x),(!Jt||vr.y>et)&&(et=vr.y)}var Ar=qe-he,Zr=et-ke,mn=Math.min(Ar,Zr),fn=mn/2,On=new U3([],sae);if(mn===0)return new s(he,ke);for(var da=he;da<qe;da+=mn)for(var li=ke;li<et;li+=mn)On.push(new q3(da+fn,li+fn,fn,R));for(var Va=uae(R),Ni=On.length;On.length;){var _i=On.pop();(_i.d>Va.d||!Va.d)&&(Va=_i,$&&console.log("found best %d after %d probes",Math.round(1e4*_i.d)/1e4,Ni)),!(_i.max-Va.d<=I)&&(fn=_i.h/2,On.push(new q3(_i.p.x-fn,_i.p.y-fn,fn,R)),On.push(new q3(_i.p.x+fn,_i.p.y-fn,fn,R)),On.push(new q3(_i.p.x-fn,_i.p.y+fn,fn,R)),On.push(new q3(_i.p.x+fn,_i.p.y+fn,fn,R)),Ni+=4)}return $&&(console.log("num probes: "+Ni),console.log("best distance: "+Va.d)),Va.p}function sae(R,I){return I.max-R.max}function q3(R,I,$,he){this.p=new s(R,I),this.h=$,this.d=lae(this.p,he),this.max=this.d+this.h*Math.SQRT2}function lae(R,I){for(var $=!1,he=1/0,ke=0;ke<I.length;ke++)for(var qe=I[ke],et=0,Et=qe.length,Jt=Et-1;et<Et;Jt=et++){var vr=qe[et],Ar=qe[Jt];vr.y>R.y!=Ar.y>R.y&&R.x<(Ar.x-vr.x)*(R.y-vr.y)/(Ar.y-vr.y)+vr.x&&($=!$),he=Math.min(he,ry(R,vr,Ar))}return($?1:-1)*Math.sqrt(he)}function uae(R){for(var I=0,$=0,he=0,ke=R[0],qe=0,et=ke.length,Et=et-1;qe<et;Et=qe++){var Jt=ke[qe],vr=ke[Et],Ar=Jt.x*vr.y-vr.x*Jt.y;$+=(Jt.x+vr.x)*Ar,he+=(Jt.y+vr.y)*Ar,I+=Ar*3}return new q3($/I,he/I,0,R)}var V3=7,A8=Number.POSITIVE_INFINITY;function ZF(R,I){function $(ke,qe){var et=0,Et=0;qe<0&&(qe=0);var Jt=qe/Math.sqrt(2);switch(ke){case"top-right":case"top-left":Et=Jt-V3;break;case"bottom-right":case"bottom-left":Et=-Jt+V3;break;case"bottom":Et=-qe+V3;break;case"top":Et=qe-V3;break}switch(ke){case"top-right":case"bottom-right":et=-Jt;break;case"top-left":case"bottom-left":et=Jt;break;case"left":et=qe;break;case"right":et=-qe;break}return[et,Et]}function he(ke,qe,et){var Et=0,Jt=0;switch(qe=Math.abs(qe),et=Math.abs(et),ke){case"top-right":case"top-left":case"top":Jt=et-V3;break;case"bottom-right":case"bottom-left":case"bottom":Jt=-et+V3;break}switch(ke){case"top-right":case"bottom-right":case"right":Et=-qe;break;case"top-left":case"bottom-left":case"left":Et=qe;break}return[Et,Jt]}return I[1]!==A8?he(R,I[0],I[1]):$(R,I[0])}function cae(R,I,$,he,ke,qe,et){R.createArrays();var Et=512*R.overscaling;R.tilePixelRatio=oo/Et,R.compareText={},R.iconsNeedLinear=!1;var Jt=R.layers[0].layout,vr=R.layers[0]._unevaluatedLayout._values,Ar={};if(R.textSizeData.kind==="composite"){var Zr=R.textSizeData,mn=Zr.minZoom,fn=Zr.maxZoom;Ar.compositeTextSizes=[vr["text-size"].possiblyEvaluate(new Ol(mn),et),vr["text-size"].possiblyEvaluate(new Ol(fn),et)]}if(R.iconSizeData.kind==="composite"){var On=R.iconSizeData,da=On.minZoom,li=On.maxZoom;Ar.compositeIconSizes=[vr["icon-size"].possiblyEvaluate(new Ol(da),et),vr["icon-size"].possiblyEvaluate(new Ol(li),et)]}Ar.layoutTextSize=vr["text-size"].possiblyEvaluate(new Ol(R.zoom+1),et),Ar.layoutIconSize=vr["icon-size"].possiblyEvaluate(new Ol(R.zoom+1),et),Ar.textMaxSize=vr["text-size"].possiblyEvaluate(new Ol(18));for(var Va=Jt.get("text-line-height")*Ir,Ni=Jt.get("text-rotation-alignment")==="map"&&Jt.get("symbol-placement")!=="point",_i=Jt.get("text-keep-upright"),Oi=Jt.get("text-size"),Xi=function(){var Io=No[mo],ws=Jt.get("text-font").evaluate(Io,{},et).join(","),Jo=Oi.evaluate(Io,{},et),fs=Ar.layoutTextSize.evaluate(Io,{},et),wl=Ar.layoutIconSize.evaluate(Io,{},et),Ts={horizontal:{},vertical:void 0},ks=Io.text,$l=[0,0];if(ks){var dl=ks.toString(),Wu=Jt.get("text-letter-spacing").evaluate(Io,{},et)*Ir,Zc=Zn(dl)?Wu:0,Yu=Jt.get("text-anchor").evaluate(Io,{},et),Zu=Jt.get("text-variable-anchor");if(!Zu){var Uu=Jt.get("text-radial-offset").evaluate(Io,{},et);Uu?$l=ZF(Yu,[Uu*Ir,A8]):$l=Jt.get("text-offset").evaluate(Io,{},et).map(function(m1){return m1*Ir})}var gf=Ni?"center":Jt.get("text-justify").evaluate(Io,{},et),Lf=Jt.get("symbol-placement"),Ch=Lf==="point"?Jt.get("text-max-width").evaluate(Io,{},et)*Ir:0,Uh=function(){R.allowVerticalPlacement&&Ka(dl)&&(Ts.vertical=pm(ks,I,$,ke,ws,Ch,Va,Yu,"left",Zc,$l,eh.vertical,!0,Lf,fs,Jo))};if(!Ni&&Zu){for(var Jd=gf==="auto"?Zu.map(function(m1){return S8(m1)}):[gf],yd=!1,$v=0;$v<Jd.length;$v++){var Kv=Jd[$v];if(!Ts.horizontal[Kv])if(yd)Ts.horizontal[Kv]=Ts.horizontal[0];else{var Qd=pm(ks,I,$,ke,ws,Ch,Va,"center",Kv,Zc,$l,eh.horizontal,!1,Lf,fs,Jo);Qd&&(Ts.horizontal[Kv]=Qd,yd=Qd.positionedLines.length===1)}}Uh()}else{gf==="auto"&&(gf=S8(Yu));var ap=pm(ks,I,$,ke,ws,Ch,Va,Yu,gf,Zc,$l,eh.horizontal,!1,Lf,fs,Jo);ap&&(Ts.horizontal[gf]=ap),Uh(),Ka(dl)&&Ni&&_i&&(Ts.vertical=pm(ks,I,$,ke,ws,Ch,Va,Yu,gf,Zc,$l,eh.vertical,!1,Lf,fs,Jo))}}var ip=void 0,Ld=!1;if(Io.icon&&Io.icon.name){var op=he[Io.icon.name];op&&(ip=w8(ke[Io.icon.name],Jt.get("icon-offset").evaluate(Io,{},et),Jt.get("icon-anchor").evaluate(Io,{},et)),Ld=op.sdf,R.sdfIcons===void 0?R.sdfIcons=op.sdf:R.sdfIcons!==op.sdf&&G("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(op.pixelRatio!==R.pixelRatio||Jt.get("icon-rotate").constantOr(1)!==0)&&(R.iconsNeedLinear=!0))}var mm=KF(Ts.horizontal)||Ts.vertical;R.iconsInText=mm?mm.iconsInText:!1,(mm||ip)&&fae(R,Io,Ts,ip,he,Ar,fs,wl,$l,Ld,et)},mo=0,No=R.features;mo<No.length;mo+=1)Xi();qe&&R.generateCollisionDebugBuffers()}function S8(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function fae(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar){var Zr=qe.textMaxSize.evaluate(I,{});Zr===void 0&&(Zr=et);var mn=R.layers[0].layout,fn=mn.get("icon-offset").evaluate(I,{},Ar),On=KF($.horizontal),da=24,li=et/da,Va=R.tilePixelRatio*li,Ni=R.tilePixelRatio*Zr/da,_i=R.tilePixelRatio*Et,Oi=R.tilePixelRatio*mn.get("symbol-spacing"),Xi=mn.get("text-padding")*R.tilePixelRatio,mo=mn.get("icon-padding")*R.tilePixelRatio,No=mn.get("text-max-angle")/180*Math.PI,Io=mn.get("text-rotation-alignment")==="map"&&mn.get("symbol-placement")!=="point",ws=mn.get("icon-rotation-alignment")==="map"&&mn.get("symbol-placement")!=="point",Jo=mn.get("symbol-placement"),fs=Oi/2,wl=mn.get("icon-text-fit"),Ts;he&&wl!=="none"&&(R.allowVerticalPlacement&&$.vertical&&(Ts=$6(he,$.vertical,wl,mn.get("icon-text-fit-padding"),fn,li)),On&&(he=$6(he,On,wl,mn.get("icon-text-fit-padding"),fn,li)));var ks=function(Y3,b0){b0.x<0||b0.x>=oo||b0.y<0||b0.y>=oo||hae(R,b0,Y3,$,he,ke,Ts,R.layers[0],R.collisionBoxArray,I.index,I.sourceLayerIndex,R.index,Va,Xi,Io,Jt,_i,mo,ws,fn,I,qe,vr,Ar,et)};if(Jo==="line")for(var $l=0,dl=XF(I.geometry,0,0,oo,oo);$l<dl.length;$l+=1)for(var Wu=dl[$l],Zc=d1(Wu,Oi,No,$.vertical||On,he,da,Ni,R.overscaling,oo),Yu=0,Zu=Zc;Yu<Zu.length;Yu+=1){var Uu=Zu[Yu],gf=On;(!gf||!dae(R,gf.text,fs,Uu))&&ks(Wu,Uu)}else if(Jo==="line-center")for(var Lf=0,Ch=I.geometry;Lf<Ch.length;Lf+=1){var Uh=Ch[Lf];if(Uh.length>1){var Jd=Wm(Uh,No,$.vertical||On,he,da,Ni);Jd&&ks(Uh,Jd)}}else if(I.type==="Polygon")for(var yd=0,$v=_0(I.geometry,0);yd<$v.length;yd+=1){var Kv=$v[yd],Qd=oae(Kv,16);ks(Kv[0],new Y_(Qd.x,Qd.y,0))}else if(I.type==="LineString")for(var ap=0,ip=I.geometry;ap<ip.length;ap+=1){var Ld=ip[ap];ks(Ld,new Y_(Ld[0].x,Ld[0].y,0))}else if(I.type==="Point")for(var op=0,mm=I.geometry;op<mm.length;op+=1)for(var m1=mm[op],J_=0,Q_=m1;J_<Q_.length;J_+=1){var ex=Q_[J_];ks([ex],new Y_(ex.x,ex.y,0))}}var C5=255,$_=C5*vd;function $F(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On){var da=aae(I,$,Et,ke,qe,et,he,R.allowVerticalPlacement),li=R.textSizeData,Va=null;li.kind==="source"?(Va=[vd*ke.layout.get("text-size").evaluate(et,{})],Va[0]>$_&&G(R.layerIds[0]+': Value for "text-size" is >= '+C5+'. Reduce your "text-size".')):li.kind==="composite"&&(Va=[vd*fn.compositeTextSizes[0].evaluate(et,{},On),vd*fn.compositeTextSizes[1].evaluate(et,{},On)],(Va[0]>$_||Va[1]>$_)&&G(R.layerIds[0]+': Value for "text-size" is >= '+C5+'. Reduce your "text-size".')),R.addSymbols(R.text,da,Va,Et,qe,et,vr,I,Jt.lineStartIndex,Jt.lineLength,mn,On);for(var Ni=0,_i=Ar;Ni<_i.length;Ni+=1){var Oi=_i[Ni];Zr[Oi]=R.text.placedSymbolArray.length-1}return da.length*4}function KF(R){for(var I in R)return R[I];return null}function hae(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn,fn,On,da,li,Va,Ni,_i,Oi,Xi,mo,No,Io){var ws,Jo=R.addToLineVertexArray(I,$),fs,wl,Ts,ks,$l=0,dl=0,Wu=0,Zc=0,Yu=-1,Zu=-1,Uu={},gf=Se(""),Lf=0,Ch=0;if(Et._unevaluatedLayout.getValue("text-radial-offset")===void 0?(ws=Et.layout.get("text-offset").evaluate(Oi,{},No).map(function(L5){return L5*Ir}),Lf=ws[0],Ch=ws[1]):(Lf=Et.layout.get("text-radial-offset").evaluate(Oi,{},No)*Ir,Ch=A8),R.allowVerticalPlacement&&he.vertical){var Uh=Et.layout.get("text-rotate").evaluate(Oi,{},No),Jd=Uh+90,yd=he.vertical;Ts=new rk(Jt,I,vr,Ar,Zr,yd,mn,fn,On,Jd),et&&(ks=new rk(Jt,I,vr,Ar,Zr,et,li,Va,On,Jd))}if(ke){var $v=Et.layout.get("icon-rotate").evaluate(Oi,{}),Kv=Et.layout.get("icon-text-fit")!=="none",Qd=WF(ke,$v,mo,Kv),ap=et?WF(et,$v,mo,Kv):void 0;wl=new rk(Jt,I,vr,Ar,Zr,ke,li,Va,!1,$v),$l=Qd.length*4;var ip=R.iconSizeData,Ld=null;ip.kind==="source"?(Ld=[vd*Et.layout.get("icon-size").evaluate(Oi,{})],Ld[0]>$_&&G(R.layerIds[0]+': Value for "icon-size" is >= '+C5+'. Reduce your "icon-size".')):ip.kind==="composite"&&(Ld=[vd*Xi.compositeIconSizes[0].evaluate(Oi,{},No),vd*Xi.compositeIconSizes[1].evaluate(Oi,{},No)],(Ld[0]>$_||Ld[1]>$_)&&G(R.layerIds[0]+': Value for "icon-size" is >= '+C5+'. Reduce your "icon-size".')),R.addSymbols(R.icon,Qd,Ld,_i,Ni,Oi,!1,I,Jo.lineStartIndex,Jo.lineLength,-1,No),Yu=R.icon.placedSymbolArray.length-1,ap&&(dl=ap.length*4,R.addSymbols(R.icon,ap,Ld,_i,Ni,Oi,eh.vertical,I,Jo.lineStartIndex,Jo.lineLength,-1,No),Zu=R.icon.placedSymbolArray.length-1)}for(var op in he.horizontal){var mm=he.horizontal[op];if(!fs){gf=Se(mm.text);var m1=Et.layout.get("text-rotate").evaluate(Oi,{},No);fs=new rk(Jt,I,vr,Ar,Zr,mm,mn,fn,On,m1)}var J_=mm.positionedLines.length===1;if(Wu+=$F(R,I,mm,qe,Et,On,Oi,da,Jo,he.vertical?eh.horizontal:eh.horizontalOnly,J_?Object.keys(he.horizontal):[op],Uu,Yu,Xi,No),J_)break}he.vertical&&(Zc+=$F(R,I,he.vertical,qe,Et,On,Oi,da,Jo,eh.vertical,["vertical"],Uu,Zu,Xi,No));var Q_=fs?fs.boxStartIndex:R.collisionBoxArray.length,ex=fs?fs.boxEndIndex:R.collisionBoxArray.length,Y3=Ts?Ts.boxStartIndex:R.collisionBoxArray.length,b0=Ts?Ts.boxEndIndex:R.collisionBoxArray.length,sk=wl?wl.boxStartIndex:R.collisionBoxArray.length,L8=wl?wl.boxEndIndex:R.collisionBoxArray.length,lk=ks?ks.boxStartIndex:R.collisionBoxArray.length,R8=ks?ks.boxEndIndex:R.collisionBoxArray.length,Zm=-1,Z3=function(L5,dB){return L5&&L5.circleDiameter?Math.max(L5.circleDiameter,dB):dB};Zm=Z3(fs,Zm),Zm=Z3(Ts,Zm),Zm=Z3(wl,Zm),Zm=Z3(ks,Zm);var uk=Zm>-1?1:0;uk&&(Zm*=Io/Ir),R.glyphOffsetArray.length>=Yc.MAX_GLYPHS&&G("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Oi.sortKey!==void 0&&R.addToSortKeyRanges(R.symbolInstances.length,Oi.sortKey),R.symbolInstances.emplaceBack(I.x,I.y,Uu.right>=0?Uu.right:-1,Uu.center>=0?Uu.center:-1,Uu.left>=0?Uu.left:-1,Uu.vertical||-1,Yu,Zu,gf,Q_,ex,Y3,b0,sk,L8,lk,R8,vr,Wu,Zc,$l,dl,uk,0,mn,Lf,Ch,Zm)}function dae(R,I,$,he){var ke=R.compareText;if(!(I in ke))ke[I]=[];else for(var qe=ke[I],et=qe.length-1;et>=0;et--)if(he.dist(qe[et])<$)return!0;return ke[I].push(he),!1}var vae=h1.VectorTileFeature.types,pae=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function nk(R,I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn){var fn=Et?Math.min($_,Math.round(Et[0])):0,On=Et?Math.min($_,Math.round(Et[1])):0;R.emplaceBack(I,$,Math.round(he*32),Math.round(ke*32),qe,et,(fn<<1)+(Jt?1:0),On,vr*16,Ar*16,Zr*256,mn*256)}function E8(R,I,$){R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$),R.emplaceBack(I.x,I.y,$)}function mae(R){for(var I=0,$=R.sections;I<$.length;I+=1){var he=$[I];if(lo(he.text))return!0}return!1}var H3=function(I){this.layoutVertexArray=new yi,this.indexArray=new jo,this.programConfigurations=I,this.segments=new Rs,this.dynamicLayoutVertexArray=new ni,this.opacityVertexArray=new Ji,this.placedSymbolArray=new gu};H3.prototype.isEmpty=function(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0},H3.prototype.upload=function(I,$,he,ke){this.isEmpty()||(he&&(this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,F.members),this.indexBuffer=I.createIndexBuffer(this.indexArray,$),this.dynamicLayoutVertexBuffer=I.createVertexBuffer(this.dynamicLayoutVertexArray,ae.members,!0),this.opacityVertexBuffer=I.createVertexBuffer(this.opacityVertexArray,pae,!0),this.opacityVertexBuffer.itemSize=1),(he||ke)&&this.programConfigurations.upload(I))},H3.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},hr("SymbolBuffers",H3);var k5=function(I,$,he){this.layoutVertexArray=new I,this.layoutAttributes=$,this.indexArray=new he,this.segments=new Rs,this.collisionVertexArray=new di};k5.prototype.upload=function(I){this.layoutVertexBuffer=I.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=I.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=I.createVertexBuffer(this.collisionVertexArray,we.members,!0)},k5.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},hr("CollisionBuffers",k5);var Yc=function(I){this.collisionBoxArray=I.collisionBoxArray,this.zoom=I.zoom,this.overscaling=I.overscaling,this.layers=I.layers,this.layerIds=this.layers.map(function(Jt){return Jt.id}),this.index=I.index,this.pixelRatio=I.pixelRatio,this.sourceLayerIndex=I.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=s1([]),this.placementViewportMatrix=s1([]);var $=this.layers[0],he=$._unevaluatedLayout._values;this.textSizeData=Z_(this.zoom,he["text-size"]),this.iconSizeData=Z_(this.zoom,he["icon-size"]);var ke=this.layers[0].layout,qe=ke.get("symbol-sort-key"),et=ke.get("symbol-z-order");this.canOverlap=ke.get("text-allow-overlap")||ke.get("icon-allow-overlap")||ke.get("text-ignore-placement")||ke.get("icon-ignore-placement"),this.sortFeaturesByKey=et!=="viewport-y"&&qe.constantOr(1)!==void 0;var Et=et==="viewport-y"||et==="auto"&&!this.sortFeaturesByKey;this.sortFeaturesByY=Et&&this.canOverlap,ke.get("symbol-placement")==="point"&&(this.writingModes=ke.get("text-writing-mode").map(function(Jt){return eh[Jt]})),this.stateDependentLayerIds=this.layers.filter(function(Jt){return Jt.isStateDependent()}).map(function(Jt){return Jt.id}),this.sourceID=I.sourceID};Yc.prototype.createArrays=function(){this.text=new H3(new ka(this.layers,this.zoom,function(I){return/^text/.test(I)})),this.icon=new H3(new ka(this.layers,this.zoom,function(I){return/^icon/.test(I)})),this.glyphOffsetArray=new $s,this.lineVertexArray=new Hl,this.symbolInstances=new sc},Yc.prototype.calculateGlyphDependencies=function(I,$,he,ke,qe){for(var et=0;et<I.length;et++)if($[I.charCodeAt(et)]=!0,(he||ke)&&qe){var Et=ir[I.charAt(et)];Et&&($[Et.charCodeAt(0)]=!0)}},Yc.prototype.populate=function(I,$,he){var ke=this.layers[0],qe=ke.layout,et=qe.get("text-font"),Et=qe.get("text-field"),Jt=qe.get("icon-image"),vr=(Et.value.kind!=="constant"||Et.value.value instanceof hc&&!Et.value.value.isEmpty()||Et.value.value.toString().length>0)&&(et.value.kind!=="constant"||et.value.value.length>0),Ar=Jt.value.kind!=="constant"||!!Jt.value.value||Object.keys(Jt.parameters).length>0,Zr=qe.get("symbol-sort-key");if(this.features=[],!(!vr&&!Ar)){for(var mn=$.iconDependencies,fn=$.glyphDependencies,On=$.availableImages,da=new Ol(this.zoom),li=0,Va=I;li<Va.length;li+=1){var Ni=Va[li],_i=Ni.feature,Oi=Ni.id,Xi=Ni.index,mo=Ni.sourceLayerIndex,No=ke._featureFilter.needGeometry,Io=Cl(_i,No);if(ke._featureFilter.filter(da,Io,he)){No||(Io.geometry=xl(_i));var ws=void 0;if(vr){var Jo=ke.getValueAndResolveTokens("text-field",Io,he,On),fs=hc.factory(Jo);mae(fs)&&(this.hasRTLText=!0),(!this.hasRTLText||So()==="unavailable"||this.hasRTLText&&Vl.isParsed())&&(ws=St(fs,ke,Io))}var wl=void 0;if(Ar){var Ts=ke.getValueAndResolveTokens("icon-image",Io,he,On);Ts instanceof rc?wl=Ts:wl=rc.fromString(Ts)}if(!(!ws&&!wl)){var ks=this.sortFeaturesByKey?Zr.evaluate(Io,{},he):void 0,$l={id:Oi,text:ws,icon:wl,index:Xi,sourceLayerIndex:mo,geometry:Io.geometry,properties:_i.properties,type:vae[_i.type],sortKey:ks};if(this.features.push($l),wl&&(mn[wl.name]=!0),ws){var dl=et.evaluate(Io,{},he).join(","),Wu=qe.get("text-rotation-alignment")==="map"&&qe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(eh.vertical)>=0;for(var Zc=0,Yu=ws.sections;Zc<Yu.length;Zc+=1){var Zu=Yu[Zc];if(Zu.image)mn[Zu.image.name]=!0;else{var Uu=Ka(ws.toString()),gf=Zu.fontStack||dl,Lf=fn[gf]=fn[gf]||{};this.calculateGlyphDependencies(Zu.text,Lf,Wu,this.allowVerticalPlacement,Uu)}}}}}}qe.get("symbol-placement")==="line"&&(this.features=jt(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Ch,Uh){return Ch.sortKey-Uh.sortKey})}},Yc.prototype.update=function(I,$,he){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(I,$,this.layers,he),this.icon.programConfigurations.updatePaintArrays(I,$,this.layers,he))},Yc.prototype.isEmpty=function(){return this.symbolInstances.length===0&&!this.hasRTLText},Yc.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},Yc.prototype.upload=function(I){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(I),this.iconCollisionBox.upload(I)),this.text.upload(I,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(I,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},Yc.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},Yc.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},Yc.prototype.addToLineVertexArray=function(I,$){var he=this.lineVertexArray.length;if(I.segment!==void 0){for(var ke=I.dist($[I.segment+1]),qe=I.dist($[I.segment]),et={},Et=I.segment+1;Et<$.length;Et++)et[Et]={x:$[Et].x,y:$[Et].y,tileUnitDistanceFromAnchor:ke},Et<$.length-1&&(ke+=$[Et+1].dist($[Et]));for(var Jt=I.segment||0;Jt>=0;Jt--)et[Jt]={x:$[Jt].x,y:$[Jt].y,tileUnitDistanceFromAnchor:qe},Jt>0&&(qe+=$[Jt-1].dist($[Jt]));for(var vr=0;vr<$.length;vr++){var Ar=et[vr];this.lineVertexArray.emplaceBack(Ar.x,Ar.y,Ar.tileUnitDistanceFromAnchor)}}return{lineStartIndex:he,lineLength:this.lineVertexArray.length-he}},Yc.prototype.addSymbols=function(I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr,mn){for(var fn=I.indexArray,On=I.layoutVertexArray,da=I.segments.prepareSegment(4*$.length,On,fn,this.canOverlap?et.sortKey:void 0),li=this.glyphOffsetArray.length,Va=da.vertexLength,Ni=this.allowVerticalPlacement&&Et===eh.vertical?Math.PI/2:0,_i=et.text&&et.text.sections,Oi=0;Oi<$.length;Oi++){var Xi=$[Oi],mo=Xi.tl,No=Xi.tr,Io=Xi.bl,ws=Xi.br,Jo=Xi.tex,fs=Xi.pixelOffsetTL,wl=Xi.pixelOffsetBR,Ts=Xi.minFontScaleX,ks=Xi.minFontScaleY,$l=Xi.glyphOffset,dl=Xi.isSDF,Wu=Xi.sectionIndex,Zc=da.vertexLength,Yu=$l[1];nk(On,Jt.x,Jt.y,mo.x,Yu+mo.y,Jo.x,Jo.y,he,dl,fs.x,fs.y,Ts,ks),nk(On,Jt.x,Jt.y,No.x,Yu+No.y,Jo.x+Jo.w,Jo.y,he,dl,wl.x,fs.y,Ts,ks),nk(On,Jt.x,Jt.y,Io.x,Yu+Io.y,Jo.x,Jo.y+Jo.h,he,dl,fs.x,wl.y,Ts,ks),nk(On,Jt.x,Jt.y,ws.x,Yu+ws.y,Jo.x+Jo.w,Jo.y+Jo.h,he,dl,wl.x,wl.y,Ts,ks),E8(I.dynamicLayoutVertexArray,Jt,Ni),fn.emplaceBack(Zc,Zc+1,Zc+2),fn.emplaceBack(Zc+1,Zc+2,Zc+3),da.vertexLength+=4,da.primitiveLength+=2,this.glyphOffsetArray.emplaceBack($l[0]),(Oi===$.length-1||Wu!==$[Oi+1].sectionIndex)&&I.programConfigurations.populatePaintArrays(On.length,et,et.index,{},mn,_i&&_i[Wu])}I.placedSymbolArray.emplaceBack(Jt.x,Jt.y,li,this.glyphOffsetArray.length-li,Va,vr,Ar,Jt.segment,he?he[0]:0,he?he[1]:0,ke[0],ke[1],Et,0,!1,0,Zr)},Yc.prototype._addCollisionDebugVertex=function(I,$,he,ke,qe,et){return $.emplaceBack(0,0),I.emplaceBack(he.x,he.y,ke,qe,Math.round(et.x),Math.round(et.y))},Yc.prototype.addCollisionDebugVertices=function(I,$,he,ke,qe,et,Et){var Jt=qe.segments.prepareSegment(4,qe.layoutVertexArray,qe.indexArray),vr=Jt.vertexLength,Ar=qe.layoutVertexArray,Zr=qe.collisionVertexArray,mn=Et.anchorX,fn=Et.anchorY;this._addCollisionDebugVertex(Ar,Zr,et,mn,fn,new s(I,$)),this._addCollisionDebugVertex(Ar,Zr,et,mn,fn,new s(he,$)),this._addCollisionDebugVertex(Ar,Zr,et,mn,fn,new s(he,ke)),this._addCollisionDebugVertex(Ar,Zr,et,mn,fn,new s(I,ke)),Jt.vertexLength+=4;var On=qe.indexArray;On.emplaceBack(vr,vr+1),On.emplaceBack(vr+1,vr+2),On.emplaceBack(vr+2,vr+3),On.emplaceBack(vr+3,vr),Jt.primitiveLength+=4},Yc.prototype.addDebugCollisionBoxes=function(I,$,he,ke){for(var qe=I;qe<$;qe++){var et=this.collisionBoxArray.get(qe),Et=et.x1,Jt=et.y1,vr=et.x2,Ar=et.y2;this.addCollisionDebugVertices(Et,Jt,vr,Ar,ke?this.textCollisionBox:this.iconCollisionBox,et.anchorPoint,he)}},Yc.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new k5(ji,je.members,ll),this.iconCollisionBox=new k5(ji,je.members,ll);for(var I=0;I<this.symbolInstances.length;I++){var $=this.symbolInstances.get(I);this.addDebugCollisionBoxes($.textBoxStartIndex,$.textBoxEndIndex,$,!0),this.addDebugCollisionBoxes($.verticalTextBoxStartIndex,$.verticalTextBoxEndIndex,$,!0),this.addDebugCollisionBoxes($.iconBoxStartIndex,$.iconBoxEndIndex,$,!1),this.addDebugCollisionBoxes($.verticalIconBoxStartIndex,$.verticalIconBoxEndIndex,$,!1)}},Yc.prototype._deserializeCollisionBoxesForSymbol=function(I,$,he,ke,qe,et,Et,Jt,vr){for(var Ar={},Zr=$;Zr<he;Zr++){var mn=I.get(Zr);Ar.textBox={x1:mn.x1,y1:mn.y1,x2:mn.x2,y2:mn.y2,anchorPointX:mn.anchorPointX,anchorPointY:mn.anchorPointY},Ar.textFeatureIndex=mn.featureIndex;break}for(var fn=ke;fn<qe;fn++){var On=I.get(fn);Ar.verticalTextBox={x1:On.x1,y1:On.y1,x2:On.x2,y2:On.y2,anchorPointX:On.anchorPointX,anchorPointY:On.anchorPointY},Ar.verticalTextFeatureIndex=On.featureIndex;break}for(var da=et;da<Et;da++){var li=I.get(da);Ar.iconBox={x1:li.x1,y1:li.y1,x2:li.x2,y2:li.y2,anchorPointX:li.anchorPointX,anchorPointY:li.anchorPointY},Ar.iconFeatureIndex=li.featureIndex;break}for(var Va=Jt;Va<vr;Va++){var Ni=I.get(Va);Ar.verticalIconBox={x1:Ni.x1,y1:Ni.y1,x2:Ni.x2,y2:Ni.y2,anchorPointX:Ni.anchorPointX,anchorPointY:Ni.anchorPointY},Ar.verticalIconFeatureIndex=Ni.featureIndex;break}return Ar},Yc.prototype.deserializeCollisionBoxes=function(I){this.collisionArrays=[];for(var $=0;$<this.symbolInstances.length;$++){var he=this.symbolInstances.get($);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(I,he.textBoxStartIndex,he.textBoxEndIndex,he.verticalTextBoxStartIndex,he.verticalTextBoxEndIndex,he.iconBoxStartIndex,he.iconBoxEndIndex,he.verticalIconBoxStartIndex,he.verticalIconBoxEndIndex))}},Yc.prototype.hasTextData=function(){return this.text.segments.get().length>0},Yc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Yc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Yc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Yc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Yc.prototype.addIndicesForPlacedSymbol=function(I,$){for(var he=I.placedSymbolArray.get($),ke=he.vertexStartIndex+he.numGlyphs*4,qe=he.vertexStartIndex;qe<ke;qe+=4)I.indexArray.emplaceBack(qe,qe+1,qe+2),I.indexArray.emplaceBack(qe+1,qe+2,qe+3)},Yc.prototype.getSortedSymbolIndexes=function(I){if(this.sortedAngle===I&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;for(var $=Math.sin(I),he=Math.cos(I),ke=[],qe=[],et=[],Et=0;Et<this.symbolInstances.length;++Et){et.push(Et);var Jt=this.symbolInstances.get(Et);ke.push(Math.round($*Jt.anchorX+he*Jt.anchorY)|0),qe.push(Jt.featureIndex)}return et.sort(function(vr,Ar){return ke[vr]-ke[Ar]||qe[Ar]-qe[vr]}),et},Yc.prototype.addToSortKeyRanges=function(I,$){var he=this.sortKeyRanges[this.sortKeyRanges.length-1];he&&he.sortKey===$?he.symbolInstanceEnd=I+1:this.sortKeyRanges.push({sortKey:$,symbolInstanceStart:I,symbolInstanceEnd:I+1})},Yc.prototype.sortFeatures=function(I){var $=this;if(this.sortFeaturesByY&&this.sortedAngle!==I&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(I),this.sortedAngle=I,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var he=0,ke=this.symbolInstanceIndexes;he<ke.length;he+=1){var qe=ke[he],et=this.symbolInstances.get(qe);this.featureSortOrder.push(et.featureIndex),[et.rightJustifiedTextSymbolIndex,et.centerJustifiedTextSymbolIndex,et.leftJustifiedTextSymbolIndex].forEach(function(Et,Jt,vr){Et>=0&&vr.indexOf(Et)===Jt&&$.addIndicesForPlacedSymbol($.text,Et)}),et.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,et.verticalPlacedTextSymbolIndex),et.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,et.placedIconSymbolIndex),et.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,et.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},hr("SymbolBucket",Yc,{omit:["layers","collisionBoxArray","features","compareText"]}),Yc.MAX_GLYPHS=65535,Yc.addDynamicAttributes=E8;function yae(R,I){return I.replace(/{([^{}]+)}/g,function($,he){return he in R?String(R[he]):""})}var gae=new pi({"symbol-placement":new Rn(Di.layout_symbol["symbol-placement"]),"symbol-spacing":new Rn(Di.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Rn(Di.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Pn(Di.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Rn(Di.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Rn(Di.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Rn(Di.layout_symbol["icon-ignore-placement"]),"icon-optional":new Rn(Di.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Rn(Di.layout_symbol["icon-rotation-alignment"]),"icon-size":new Pn(Di.layout_symbol["icon-size"]),"icon-text-fit":new Rn(Di.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Rn(Di.layout_symbol["icon-text-fit-padding"]),"icon-image":new Pn(Di.layout_symbol["icon-image"]),"icon-rotate":new Pn(Di.layout_symbol["icon-rotate"]),"icon-padding":new Rn(Di.layout_symbol["icon-padding"]),"icon-keep-upright":new Rn(Di.layout_symbol["icon-keep-upright"]),"icon-offset":new Pn(Di.layout_symbol["icon-offset"]),"icon-anchor":new Pn(Di.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Rn(Di.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Rn(Di.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Rn(Di.layout_symbol["text-rotation-alignment"]),"text-field":new Pn(Di.layout_symbol["text-field"]),"text-font":new Pn(Di.layout_symbol["text-font"]),"text-size":new Pn(Di.layout_symbol["text-size"]),"text-max-width":new Pn(Di.layout_symbol["text-max-width"]),"text-line-height":new Rn(Di.layout_symbol["text-line-height"]),"text-letter-spacing":new Pn(Di.layout_symbol["text-letter-spacing"]),"text-justify":new Pn(Di.layout_symbol["text-justify"]),"text-radial-offset":new Pn(Di.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Rn(Di.layout_symbol["text-variable-anchor"]),"text-anchor":new Pn(Di.layout_symbol["text-anchor"]),"text-max-angle":new Rn(Di.layout_symbol["text-max-angle"]),"text-writing-mode":new Rn(Di.layout_symbol["text-writing-mode"]),"text-rotate":new Pn(Di.layout_symbol["text-rotate"]),"text-padding":new Rn(Di.layout_symbol["text-padding"]),"text-keep-upright":new Rn(Di.layout_symbol["text-keep-upright"]),"text-transform":new Pn(Di.layout_symbol["text-transform"]),"text-offset":new Pn(Di.layout_symbol["text-offset"]),"text-allow-overlap":new Rn(Di.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Rn(Di.layout_symbol["text-ignore-placement"]),"text-optional":new Rn(Di.layout_symbol["text-optional"])}),_ae=new pi({"icon-opacity":new Pn(Di.paint_symbol["icon-opacity"]),"icon-color":new Pn(Di.paint_symbol["icon-color"]),"icon-halo-color":new Pn(Di.paint_symbol["icon-halo-color"]),"icon-halo-width":new Pn(Di.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Pn(Di.paint_symbol["icon-halo-blur"]),"icon-translate":new Rn(Di.paint_symbol["icon-translate"]),"icon-translate-anchor":new Rn(Di.paint_symbol["icon-translate-anchor"]),"text-opacity":new Pn(Di.paint_symbol["text-opacity"]),"text-color":new Pn(Di.paint_symbol["text-color"],{runtimeType:Kl,getOverride:function(R){return R.textColor},hasOverride:function(R){return!!R.textColor}}),"text-halo-color":new Pn(Di.paint_symbol["text-halo-color"]),"text-halo-width":new Pn(Di.paint_symbol["text-halo-width"]),"text-halo-blur":new Pn(Di.paint_symbol["text-halo-blur"]),"text-translate":new Rn(Di.paint_symbol["text-translate"]),"text-translate-anchor":new Rn(Di.paint_symbol["text-translate-anchor"])}),M8={paint:_ae,layout:gae},G3=function(I){this.type=I.property.overrides?I.property.overrides.runtimeType:Cu,this.defaultValue=I};G3.prototype.evaluate=function(I){if(I.formattedSection){var $=this.defaultValue.property.overrides;if($&&$.hasOverride(I.formattedSection))return $.getOverride(I.formattedSection)}return I.feature&&I.featureState?this.defaultValue.evaluate(I.feature,I.featureState):this.defaultValue.property.specification.default},G3.prototype.eachChild=function(I){if(!this.defaultValue.isConstant()){var $=this.defaultValue.value;I($._styleExpression.expression)}},G3.prototype.outputDefined=function(){return!1},G3.prototype.serialize=function(){return null},hr("FormatSectionOverride",G3,{omit:["defaultValue"]});var xae=(function(R){function I($){R.call(this,$,M8)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.recalculate=function(he,ke){if(R.prototype.recalculate.call(this,he,ke),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var qe=this.layout.get("text-writing-mode");if(qe){for(var et=[],Et=0,Jt=qe;Et<Jt.length;Et+=1){var vr=Jt[Et];et.indexOf(vr)<0&&et.push(vr)}this.layout._values["text-writing-mode"]=et}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},I.prototype.getValueAndResolveTokens=function(he,ke,qe,et){var Et=this.layout.get(he).evaluate(ke,{},qe,et),Jt=this._unevaluatedLayout._values[he];return!Jt.isDataDriven()&&!os(Jt.value)&&Et?yae(ke.properties,Et):Et},I.prototype.createBucket=function(he){return new Yc(he)},I.prototype.queryRadius=function(){return 0},I.prototype.queryIntersectsFeature=function(){return!1},I.prototype._setPaintOverrides=function(){for(var he=0,ke=M8.paint.overridableProperties;he<ke.length;he+=1){var qe=ke[he];if(I.hasPaintOverride(this.layout,qe)){var et=this.paint.get(qe),Et=new G3(et),Jt=new Bf(Et,et.property.specification),vr=null;et.value.kind==="constant"||et.value.kind==="source"?vr=new jf("source",Jt):vr=new nf("composite",Jt,et.value.zoomStops,et.value._interpolationType),this.paint._values[qe]=new Hn(et.property,vr,et.parameters)}}},I.prototype._handleOverridablePaintPropertyUpdate=function(he,ke,qe){return!this.layout||ke.isDataDriven()||qe.isDataDriven()?!1:I.hasPaintOverride(this.layout,he)},I.hasPaintOverride=function(he,ke){var qe=he.get("text-field"),et=M8.paint.properties[ke],Et=!1,Jt=function(Zr){for(var mn=0,fn=Zr;mn<fn.length;mn+=1){var On=fn[mn];if(et.overrides&&et.overrides.hasOverride(On)){Et=!0;return}}};if(qe.value.kind==="constant"&&qe.value.value instanceof hc)Jt(qe.value.value.sections);else if(qe.value.kind==="source"){var vr=function(Zr){if(!Et)if(Zr instanceof Js&&au(Zr.value)===Xs){var mn=Zr.value;Jt(mn.sections)}else Zr instanceof Wf?Jt(Zr.sections):Zr.eachChild(vr)},Ar=qe.value;Ar._styleExpression&&vr(Ar._styleExpression.expression)}return Et},I})(Bi),bae=new pi({"background-color":new Rn(Di.paint_background["background-color"]),"background-pattern":new ei(Di.paint_background["background-pattern"]),"background-opacity":new Rn(Di.paint_background["background-opacity"])}),wae={paint:bae},Tae=(function(R){function I($){R.call(this,$,wae)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(Bi),Aae=new pi({"raster-opacity":new Rn(Di.paint_raster["raster-opacity"]),"raster-hue-rotate":new Rn(Di.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Rn(Di.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Rn(Di.paint_raster["raster-brightness-max"]),"raster-saturation":new Rn(Di.paint_raster["raster-saturation"]),"raster-contrast":new Rn(Di.paint_raster["raster-contrast"]),"raster-resampling":new Rn(Di.paint_raster["raster-resampling"]),"raster-fade-duration":new Rn(Di.paint_raster["raster-fade-duration"])}),Sae={paint:Aae},Eae=(function(R){function I($){R.call(this,$,Sae)}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I})(Bi);function Mae(R){var I=[],$=R.id;return $===void 0&&I.push({message:"layers."+$+': missing required property "id"'}),R.render===void 0&&I.push({message:"layers."+$+': missing required method "render"'}),R.renderingMode&&R.renderingMode!=="2d"&&R.renderingMode!=="3d"&&I.push({message:"layers."+$+': property "renderingMode" must be either "2d" or "3d"'}),I}var Cae=(function(R){function I($){R.call(this,$,{}),this.implementation=$}return R&&(I.__proto__=R),I.prototype=Object.create(R&&R.prototype),I.prototype.constructor=I,I.prototype.is3D=function(){return this.implementation.renderingMode==="3d"},I.prototype.hasOffscreenPass=function(){return this.implementation.prerender!==void 0},I.prototype.recalculate=function(){},I.prototype.updateTransitions=function(){},I.prototype.hasTransition=function(){},I.prototype.serialize=function(){},I.prototype.onAdd=function(he){this.implementation.onAdd&&this.implementation.onAdd(he,he.painter.context.gl)},I.prototype.onRemove=function(he){this.implementation.onRemove&&this.implementation.onRemove(he,he.painter.context.gl)},I})(Bi),kae={circle:e5,heatmap:Ub,hillshade:E3,fill:h5,"fill-extrusion":y8,line:x5,symbol:xae,background:Tae,raster:Eae};function Pae(R){return R.type==="custom"?new Cae(R):new kae[R.type](R)}var JF=u.HTMLImageElement,QF=u.HTMLCanvasElement,eB=u.HTMLVideoElement,tB=u.ImageData,ak=u.ImageBitmap,Yb=function(I,$,he,ke){this.context=I,this.format=he,this.texture=I.gl.createTexture(),this.update($,ke)};Yb.prototype.update=function(I,$,he){var ke=I.width,qe=I.height,et=(!this.size||this.size[0]!==ke||this.size[1]!==qe)&&!he,Et=this,Jt=Et.context,vr=Jt.gl;if(this.useMipmap=!!($&&$.useMipmap),vr.bindTexture(vr.TEXTURE_2D,this.texture),Jt.pixelStoreUnpackFlipY.set(!1),Jt.pixelStoreUnpack.set(1),Jt.pixelStoreUnpackPremultiplyAlpha.set(this.format===vr.RGBA&&(!$||$.premultiply!==!1)),et)this.size=[ke,qe],I instanceof JF||I instanceof QF||I instanceof eB||I instanceof tB||ak&&I instanceof ak?vr.texImage2D(vr.TEXTURE_2D,0,this.format,this.format,vr.UNSIGNED_BYTE,I):vr.texImage2D(vr.TEXTURE_2D,0,this.format,ke,qe,0,this.format,vr.UNSIGNED_BYTE,I.data);else{var Ar=he||{x:0,y:0},Zr=Ar.x,mn=Ar.y;I instanceof JF||I instanceof QF||I instanceof eB||I instanceof tB||ak&&I instanceof ak?vr.texSubImage2D(vr.TEXTURE_2D,0,Zr,mn,vr.RGBA,vr.UNSIGNED_BYTE,I):vr.texSubImage2D(vr.TEXTURE_2D,0,Zr,mn,ke,qe,vr.RGBA,vr.UNSIGNED_BYTE,I.data)}this.useMipmap&&this.isSizePowerOfTwo()&&vr.generateMipmap(vr.TEXTURE_2D)},Yb.prototype.bind=function(I,$,he){var ke=this,qe=ke.context,et=qe.gl;et.bindTexture(et.TEXTURE_2D,this.texture),he===et.LINEAR_MIPMAP_NEAREST&&!this.isSizePowerOfTwo()&&(he=et.LINEAR),I!==this.filter&&(et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MAG_FILTER,I),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_MIN_FILTER,he||I),this.filter=I),$!==this.wrap&&(et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_S,$),et.texParameteri(et.TEXTURE_2D,et.TEXTURE_WRAP_T,$),this.wrap=$)},Yb.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1===0},Yb.prototype.destroy=function(){var I=this.context,$=I.gl;$.deleteTexture(this.texture),this.texture=null};var C8=function(I){var $=this;this._callback=I,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){$._triggered=!1,$._callback()})};C8.prototype.trigger=function(){var I=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){I._triggered=!1,I._callback()},0))},C8.prototype.remove=function(){delete this._channel,this._callback=function(){}};var X3=function(I,$,he){this.target=I,this.parent=$,this.mapId=he,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},D(["receive","process"],this),this.invoker=new C8(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=de()?I:u};X3.prototype.send=function(I,$,he,ke,qe){var et=this;qe===void 0&&(qe=!1);var Et=Math.round(Math.random()*1e18).toString(36).substring(0,10);he&&(this.callbacks[Et]=he);var Jt=ie(this.globalScope)?void 0:[];return this.target.postMessage({id:Et,type:I,hasCallback:!!he,targetMapId:ke,mustQueue:qe,sourceMapId:this.mapId,data:on($,Jt)},Jt),{cancel:function(){he&&delete et.callbacks[Et],et.target.postMessage({id:Et,type:"<cancel>",targetMapId:ke,sourceMapId:et.mapId})}}},X3.prototype.receive=function(I){var $=I.data,he=$.id;if(he&&!($.targetMapId&&this.mapId!==$.targetMapId))if($.type==="<cancel>"){delete this.tasks[he];var ke=this.cancelCallbacks[he];delete this.cancelCallbacks[he],ke&&ke()}else de()||$.mustQueue?(this.tasks[he]=$,this.taskQueue.push(he),this.invoker.trigger()):this.processTask(he,$)},X3.prototype.process=function(){if(this.taskQueue.length){var I=this.taskQueue.shift(),$=this.tasks[I];delete this.tasks[I],this.taskQueue.length&&this.invoker.trigger(),$&&this.processTask(I,$)}},X3.prototype.processTask=function(I,$){var he=this;if($.type==="<response>"){var ke=this.callbacks[I];delete this.callbacks[I],ke&&($.error?ke(Mn($.error)):ke(null,Mn($.data)))}else{var qe=!1,et=ie(this.globalScope)?void 0:[],Et=$.hasCallback?function(mn,fn){qe=!0,delete he.cancelCallbacks[I],he.target.postMessage({id:I,type:"<response>",sourceMapId:he.mapId,error:mn?on(mn):null,data:on(fn,et)},et)}:function(mn){qe=!0},Jt=null,vr=Mn($.data);if(this.parent[$.type])Jt=this.parent[$.type]($.sourceMapId,vr,Et);else if(this.parent.getWorkerSource){var Ar=$.type.split("."),Zr=this.parent.getWorkerSource($.sourceMapId,Ar[0],vr.source);Jt=Zr[Ar[1]](vr,Et)}else Et(new Error("Could not find function "+$.type));!qe&&Jt&&Jt.cancel&&(this.cancelCallbacks[I]=Jt.cancel)}},X3.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function Lae(R,I,$){I=Math.pow(2,$)-I-1;var he=rB(R*256,I*256,$),ke=rB((R+1)*256,(I+1)*256,$);return he[0]+","+he[1]+","+ke[0]+","+ke[1]}function rB(R,I,$){var he=2*Math.PI*6378137/256/Math.pow(2,$),ke=R*he-2*Math.PI*6378137/2,qe=I*he-2*Math.PI*6378137/2;return[ke,qe]}var pd=function(I,$){I&&($?this.setSouthWest(I).setNorthEast($):I.length===4?this.setSouthWest([I[0],I[1]]).setNorthEast([I[2],I[3]]):this.setSouthWest(I[0]).setNorthEast(I[1]))};pd.prototype.setNorthEast=function(I){return this._ne=I instanceof th?new th(I.lng,I.lat):th.convert(I),this},pd.prototype.setSouthWest=function(I){return this._sw=I instanceof th?new th(I.lng,I.lat):th.convert(I),this},pd.prototype.extend=function(I){var $=this._sw,he=this._ne,ke,qe;if(I instanceof th)ke=I,qe=I;else if(I instanceof pd){if(ke=I._sw,qe=I._ne,!ke||!qe)return this}else{if(Array.isArray(I))if(I.length===4||I.every(Array.isArray)){var et=I;return this.extend(pd.convert(et))}else{var Et=I;return this.extend(th.convert(Et))}return this}return!$&&!he?(this._sw=new th(ke.lng,ke.lat),this._ne=new th(qe.lng,qe.lat)):($.lng=Math.min(ke.lng,$.lng),$.lat=Math.min(ke.lat,$.lat),he.lng=Math.max(qe.lng,he.lng),he.lat=Math.max(qe.lat,he.lat)),this},pd.prototype.getCenter=function(){return new th((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},pd.prototype.getSouthWest=function(){return this._sw},pd.prototype.getNorthEast=function(){return this._ne},pd.prototype.getNorthWest=function(){return new th(this.getWest(),this.getNorth())},pd.prototype.getSouthEast=function(){return new th(this.getEast(),this.getSouth())},pd.prototype.getWest=function(){return this._sw.lng},pd.prototype.getSouth=function(){return this._sw.lat},pd.prototype.getEast=function(){return this._ne.lng},pd.prototype.getNorth=function(){return this._ne.lat},pd.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},pd.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},pd.prototype.isEmpty=function(){return!(this._sw&&this._ne)},pd.prototype.contains=function(I){var $=th.convert(I),he=$.lng,ke=$.lat,qe=this._sw.lat<=ke&&ke<=this._ne.lat,et=this._sw.lng<=he&&he<=this._ne.lng;return this._sw.lng>this._ne.lng&&(et=this._sw.lng>=he&&he>=this._ne.lng),qe&&et},pd.convert=function(I){return!I||I instanceof pd?I:new pd(I)};var nB=63710088e-1,th=function(I,$){if(isNaN(I)||isNaN($))throw new Error("Invalid LngLat object: ("+I+", "+$+")");if(this.lng=+I,this.lat=+$,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};th.prototype.wrap=function(){return new th(_(this.lng,-180,180),this.lat)},th.prototype.toArray=function(){return[this.lng,this.lat]},th.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},th.prototype.distanceTo=function(I){var $=Math.PI/180,he=this.lat*$,ke=I.lat*$,qe=Math.sin(he)*Math.sin(ke)+Math.cos(he)*Math.cos(ke)*Math.cos((I.lng-this.lng)*$),et=nB*Math.acos(Math.min(qe,1));return et},th.prototype.toBounds=function(I){I===void 0&&(I=0);var $=40075017,he=360*I/$,ke=he/Math.cos(Math.PI/180*this.lat);return new pd(new th(this.lng-ke,this.lat-he),new th(this.lng+ke,this.lat+he))},th.convert=function(I){if(I instanceof th)return I;if(Array.isArray(I)&&(I.length===2||I.length===3))return new th(Number(I[0]),Number(I[1]));if(!Array.isArray(I)&&typeof I=="object"&&I!==null)return new th(Number("lng"in I?I.lng:I.lon),Number(I.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var aB=2*Math.PI*nB;function iB(R){return aB*Math.cos(R*Math.PI/180)}function oB(R){return(180+R)/360}function sB(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function lB(R,I){return R/iB(I)}function Rae(R){return R*360-180}function k8(R){var I=180-R*360;return 360/Math.PI*Math.atan(Math.exp(I*Math.PI/180))-90}function Iae(R,I){return R*iB(k8(I))}function Dae(R){return 1/Math.cos(R*Math.PI/180)}var Zb=function(I,$,he){he===void 0&&(he=0),this.x=+I,this.y=+$,this.z=+he};Zb.fromLngLat=function(I,$){$===void 0&&($=0);var he=th.convert(I);return new Zb(oB(he.lng),sB(he.lat),lB($,he.lat))},Zb.prototype.toLngLat=function(){return new th(Rae(this.x),k8(this.y))},Zb.prototype.toAltitude=function(){return Iae(this.z,this.y)},Zb.prototype.meterInMercatorCoordinateUnits=function(){return 1/aB*Dae(k8(this.y))};var $b=function(I,$,he){this.z=I,this.x=$,this.y=he,this.key=P5(0,I,I,$,he)};$b.prototype.equals=function(I){return this.z===I.z&&this.x===I.x&&this.y===I.y},$b.prototype.url=function(I,$){var he=Lae(this.x,this.y,this.z),ke=Oae(this.z,this.x,this.y);return I[(this.x+this.y)%I.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String($==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ke).replace("{bbox-epsg-3857}",he)},$b.prototype.getTilePoint=function(I){var $=Math.pow(2,this.z);return new s((I.x*$-this.x)*oo,(I.y*$-this.y)*oo)},$b.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var uB=function(I,$){this.wrap=I,this.canonical=$,this.key=P5(I,$.z,$.z,$.x,$.y)},md=function(I,$,he,ke,qe){this.overscaledZ=I,this.wrap=$,this.canonical=new $b(he,+ke,+qe),this.key=P5($,I,he,ke,qe)};md.prototype.equals=function(I){return this.overscaledZ===I.overscaledZ&&this.wrap===I.wrap&&this.canonical.equals(I.canonical)},md.prototype.scaledTo=function(I){var $=this.canonical.z-I;return I>this.canonical.z?new md(I,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new md(I,this.wrap,I,this.canonical.x>>$,this.canonical.y>>$)},md.prototype.calculateScaledKey=function(I,$){var he=this.canonical.z-I;return I>this.canonical.z?P5(this.wrap*+$,I,this.canonical.z,this.canonical.x,this.canonical.y):P5(this.wrap*+$,I,I,this.canonical.x>>he,this.canonical.y>>he)},md.prototype.isChildOf=function(I){if(I.wrap!==this.wrap)return!1;var $=this.canonical.z-I.canonical.z;return I.overscaledZ===0||I.overscaledZ<this.overscaledZ&&I.canonical.x===this.canonical.x>>$&&I.canonical.y===this.canonical.y>>$},md.prototype.children=function(I){if(this.overscaledZ>=I)return[new md(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var $=this.canonical.z+1,he=this.canonical.x*2,ke=this.canonical.y*2;return[new md($,this.wrap,$,he,ke),new md($,this.wrap,$,he+1,ke),new md($,this.wrap,$,he,ke+1),new md($,this.wrap,$,he+1,ke+1)]},md.prototype.isLessThan=function(I){return this.wrap<I.wrap?!0:this.wrap>I.wrap?!1:this.overscaledZ<I.overscaledZ?!0:this.overscaledZ>I.overscaledZ?!1:this.canonical.x<I.canonical.x?!0:this.canonical.x>I.canonical.x?!1:this.canonical.y<I.canonical.y},md.prototype.wrapped=function(){return new md(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},md.prototype.unwrapTo=function(I){return new md(this.overscaledZ,I,this.canonical.z,this.canonical.x,this.canonical.y)},md.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},md.prototype.toUnwrapped=function(){return new uB(this.wrap,this.canonical)},md.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},md.prototype.getTilePoint=function(I){return this.canonical.getTilePoint(new Zb(I.x-this.wrap,I.y))};function P5(R,I,$,he,ke){R*=2,R<0&&(R=R*-1-1);var qe=1<<$;return(qe*qe*R+qe*ke+he).toString(36)+$.toString(36)+I.toString(36)}function Oae(R,I,$){for(var he="",ke,qe=R;qe>0;qe--)ke=1<<qe-1,he+=(I&ke?1:0)+($&ke?2:0);return he}hr("CanonicalTileID",$b),hr("OverscaledTileID",md,{omit:["posMatrix"]});var v1=function(I,$,he){if(this.uid=I,$.height!==$.width)throw new RangeError("DEM tiles must be square");if(he&&he!=="mapbox"&&he!=="terrarium")return G('"'+he+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=$.height;var ke=this.dim=$.height-2;this.data=new Uint32Array($.data.buffer),this.encoding=he||"mapbox";for(var qe=0;qe<ke;qe++)this.data[this._idx(-1,qe)]=this.data[this._idx(0,qe)],this.data[this._idx(ke,qe)]=this.data[this._idx(ke-1,qe)],this.data[this._idx(qe,-1)]=this.data[this._idx(qe,0)],this.data[this._idx(qe,ke)]=this.data[this._idx(qe,ke-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ke,-1)]=this.data[this._idx(ke-1,0)],this.data[this._idx(-1,ke)]=this.data[this._idx(0,ke-1)],this.data[this._idx(ke,ke)]=this.data[this._idx(ke-1,ke-1)]};v1.prototype.get=function(I,$){var he=new Uint8Array(this.data.buffer),ke=this._idx(I,$)*4,qe=this.encoding==="terrarium"?this._unpackTerrarium:this._unpackMapbox;return qe(he[ke],he[ke+1],he[ke+2])},v1.prototype.getUnpackVector=function(){return this.encoding==="terrarium"?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},v1.prototype._idx=function(I,$){if(I<-1||I>=this.dim+1||$<-1||$>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return($+1)*this.stride+(I+1)},v1.prototype._unpackMapbox=function(I,$,he){return(I*256*256+$*256+he)/10-1e4},v1.prototype._unpackTerrarium=function(I,$,he){return I*256+$+he/256-32768},v1.prototype.getPixels=function(){return new fv({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},v1.prototype.backfillBorder=function(I,$,he){if(this.dim!==I.dim)throw new Error("dem dimension mismatch");var ke=$*this.dim,qe=$*this.dim+this.dim,et=he*this.dim,Et=he*this.dim+this.dim;switch($){case-1:ke=qe-1;break;case 1:qe=ke+1;break}switch(he){case-1:et=Et-1;break;case 1:Et=et+1;break}for(var Jt=-$*this.dim,vr=-he*this.dim,Ar=et;Ar<Et;Ar++)for(var Zr=ke;Zr<qe;Zr++)this.data[this._idx(Zr,Ar)]=I.data[this._idx(Zr+Jt,Ar+vr)]},hr("DEMData",v1);function zae(R,I){var $={};if(!I)return $;for(var he=function(){var et=qe[ke],Et=et.layerIds.map(function(Zr){return I.getLayer(Zr)}).filter(Boolean);if(Et.length!==0){et.layers=Et,et.stateDependentLayerIds&&(et.stateDependentLayers=et.stateDependentLayerIds.map(function(Zr){return Et.filter(function(mn){return mn.id===Zr})[0]}));for(var Jt=0,vr=Et;Jt<vr.length;Jt+=1){var Ar=vr[Jt];$[Ar.id]=et}}},ke=0,qe=R;ke<qe.length;ke+=1)he();return $}var ik=function(I){this._stringToNumber={},this._numberToString=[];for(var $=0;$<I.length;$++){var he=I[$];this._stringToNumber[he]=$,this._numberToString[$]=he}};ik.prototype.encode=function(I){return this._stringToNumber[I]},ik.prototype.decode=function(I){return this._numberToString[I]};var ok=function(I,$,he,ke,qe){this.type="Feature",this._vectorTileFeature=I,I._z=$,I._x=he,I._y=ke,this.properties=I.properties,this.id=qe},P8={geometry:{configurable:!0}};P8.geometry.get=function(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},P8.geometry.set=function(R){this._geometry=R},ok.prototype.toJSON=function(){var I={geometry:this.geometry};for(var $ in this)$==="_geometry"||$==="_vectorTileFeature"||(I[$]=this[$]);return I},Object.defineProperties(ok.prototype,P8);var W3=function(){this.state={},this.stateChanges={},this.deletedStates={}};W3.prototype.updateState=function(I,$,he){var ke=String($);if(this.stateChanges[I]=this.stateChanges[I]||{},this.stateChanges[I][ke]=this.stateChanges[I][ke]||{},b(this.stateChanges[I][ke],he),this.deletedStates[I]===null){this.deletedStates[I]={};for(var qe in this.state[I])qe!==ke&&(this.deletedStates[I][qe]=null)}else{var et=this.deletedStates[I]&&this.deletedStates[I][ke]===null;if(et){this.deletedStates[I][ke]={};for(var Et in this.state[I][ke])he[Et]||(this.deletedStates[I][ke][Et]=null)}else for(var Jt in he){var vr=this.deletedStates[I]&&this.deletedStates[I][ke]&&this.deletedStates[I][ke][Jt]===null;vr&&delete this.deletedStates[I][ke][Jt]}}},W3.prototype.removeFeatureState=function(I,$,he){var ke=this.deletedStates[I]===null;if(!ke){var qe=String($);if(this.deletedStates[I]=this.deletedStates[I]||{},he&&$!==void 0)this.deletedStates[I][qe]!==null&&(this.deletedStates[I][qe]=this.deletedStates[I][qe]||{},this.deletedStates[I][qe][he]=null);else if($!==void 0){var et=this.stateChanges[I]&&this.stateChanges[I][qe];if(et){this.deletedStates[I][qe]={};for(he in this.stateChanges[I][qe])this.deletedStates[I][qe][he]=null}else this.deletedStates[I][qe]=null}else this.deletedStates[I]=null}},W3.prototype.getState=function(I,$){var he=String($),ke=this.state[I]||{},qe=this.stateChanges[I]||{},et=b({},ke[he],qe[he]);if(this.deletedStates[I]===null)return{};if(this.deletedStates[I]){var Et=this.deletedStates[I][$];if(Et===null)return{};for(var Jt in Et)delete et[Jt]}return et},W3.prototype.initializeTileState=function(I,$){I.setFeatureState(this.state,$)},W3.prototype.coalesceChanges=function(I,$){var he={};for(var ke in this.stateChanges){this.state[ke]=this.state[ke]||{};var qe={};for(var et in this.stateChanges[ke])this.state[ke][et]||(this.state[ke][et]={}),b(this.state[ke][et],this.stateChanges[ke][et]),qe[et]=this.state[ke][et];he[ke]=qe}for(var Et in this.deletedStates){this.state[Et]=this.state[Et]||{};var Jt={};if(this.deletedStates[Et]===null)for(var vr in this.state[Et])Jt[vr]={},this.state[Et][vr]={};else for(var Ar in this.deletedStates[Et]){var Zr=this.deletedStates[Et][Ar]===null;if(Zr)this.state[Et][Ar]={};else for(var mn=0,fn=Object.keys(this.deletedStates[Et][Ar]);mn<fn.length;mn+=1){var On=fn[mn];delete this.state[Et][Ar][On]}Jt[Ar]=this.state[Et][Ar]}he[Et]=he[Et]||{},b(he[Et],Jt)}if(this.stateChanges={},this.deletedStates={},Object.keys(he).length!==0)for(var da in I){var li=I[da];li.setFeatureState(he,$)}};var p1=function(I,$){this.tileID=I,this.x=I.canonical.x,this.y=I.canonical.y,this.z=I.canonical.z,this.grid=new Te(oo,16,0),this.grid3D=new Te(oo,16,0),this.featureIndexArray=new _c,this.promoteId=$};p1.prototype.insert=function(I,$,he,ke,qe,et){var Et=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(he,ke,qe);for(var Jt=et?this.grid3D:this.grid,vr=0;vr<$.length;vr++){for(var Ar=$[vr],Zr=[1/0,1/0,-1/0,-1/0],mn=0;mn<Ar.length;mn++){var fn=Ar[mn];Zr[0]=Math.min(Zr[0],fn.x),Zr[1]=Math.min(Zr[1],fn.y),Zr[2]=Math.max(Zr[2],fn.x),Zr[3]=Math.max(Zr[3],fn.y)}Zr[0]<oo&&Zr[1]<oo&&Zr[2]>=0&&Zr[3]>=0&&Jt.insert(Et,Zr[0],Zr[1],Zr[2],Zr[3])}},p1.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new h1.VectorTile(new Bn(this.rawTileData)).layers,this.sourceLayerCoder=new ik(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},p1.prototype.query=function(I,$,he,ke){var qe=this;this.loadVTLayers();for(var et=I.params||{},Et=oo/I.tileSize/I.scale,Jt=ut(et.filter),vr=I.queryGeometry,Ar=I.queryPadding*Et,Zr=fB(vr),mn=this.grid.query(Zr.minX-Ar,Zr.minY-Ar,Zr.maxX+Ar,Zr.maxY+Ar),fn=fB(I.cameraQueryGeometry),On=this.grid3D.query(fn.minX-Ar,fn.minY-Ar,fn.maxX+Ar,fn.maxY+Ar,function(mo,No,Io,ws){return dm(I.cameraQueryGeometry,mo-Ar,No-Ar,Io+Ar,ws+Ar)}),da=0,li=On;da<li.length;da+=1){var Va=li[da];mn.push(Va)}mn.sort(Nae);for(var Ni={},_i,Oi=function(mo){var No=mn[mo];if(No!==_i){_i=No;var Io=qe.featureIndexArray.get(No),ws=null;qe.loadMatchingFeature(Ni,Io.bucketIndex,Io.sourceLayerIndex,Io.featureIndex,Jt,et.layers,et.availableImages,$,he,ke,function(Jo,fs,wl){return ws||(ws=xl(Jo)),fs.queryIntersectsFeature(vr,Jo,wl,ws,qe.z,I.transform,Et,I.pixelPosMatrix)})}},Xi=0;Xi<mn.length;Xi++)Oi(Xi);return Ni},p1.prototype.loadMatchingFeature=function(I,$,he,ke,qe,et,Et,Jt,vr,Ar,Zr){var mn=this.bucketLayerIDs[$];if(!(et&&!z(et,mn))){var fn=this.sourceLayerCoder.decode(he),On=this.vtLayers[fn],da=On.feature(ke);if(qe.needGeometry){var li=Cl(da,!0);if(!qe.filter(new Ol(this.tileID.overscaledZ),li,this.tileID.canonical))return}else if(!qe.filter(new Ol(this.tileID.overscaledZ),da))return;for(var Va=this.getId(da,fn),Ni=0;Ni<mn.length;Ni++){var _i=mn[Ni];if(!(et&&et.indexOf(_i)<0)){var Oi=Jt[_i];if(Oi){var Xi={};Va!==void 0&&Ar&&(Xi=Ar.getState(Oi.sourceLayer||"_geojsonTileLayer",Va));var mo=b({},vr[_i]);mo.paint=cB(mo.paint,Oi.paint,da,Xi,Et),mo.layout=cB(mo.layout,Oi.layout,da,Xi,Et);var No=!Zr||Zr(da,Oi,Xi);if(No){var Io=new ok(da,this.z,this.x,this.y,Va);Io.layer=mo;var ws=I[_i];ws===void 0&&(ws=I[_i]=[]),ws.push({featureIndex:ke,feature:Io,intersectionZ:No})}}}}}},p1.prototype.lookupSymbolFeatures=function(I,$,he,ke,qe,et,Et,Jt){var vr={};this.loadVTLayers();for(var Ar=ut(qe),Zr=0,mn=I;Zr<mn.length;Zr+=1){var fn=mn[Zr];this.loadMatchingFeature(vr,he,ke,fn,Ar,et,Et,Jt,$)}return vr},p1.prototype.hasLayer=function(I){for(var $=0,he=this.bucketLayerIDs;$<he.length;$+=1)for(var ke=he[$],qe=0,et=ke;qe<et.length;qe+=1){var Et=et[qe];if(I===Et)return!0}return!1},p1.prototype.getId=function(I,$){var he=I.id;if(this.promoteId){var ke=typeof this.promoteId=="string"?this.promoteId:this.promoteId[$];he=I.properties[ke],typeof he=="boolean"&&(he=Number(he))}return he},hr("FeatureIndex",p1,{omit:["rawTileData","sourceLayerCoder"]});function cB(R,I,$,he,ke){return U(R,function(qe,et){var Et=I instanceof Ca?I.get(et):null;return Et&&Et.evaluate?Et.evaluate($,he,ke):Et})}function fB(R){for(var I=1/0,$=1/0,he=-1/0,ke=-1/0,qe=0,et=R;qe<et.length;qe+=1){var Et=et[qe];I=Math.min(I,Et.x),$=Math.min($,Et.y),he=Math.max(he,Et.x),ke=Math.max(ke,Et.y)}return{minX:I,minY:$,maxX:he,maxY:ke}}function Nae(R,I){return I-R}var Fae=3e4,Kd=function(I,$){this.tileID=I,this.uid=f(),this.uses=0,this.tileSize=$,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};Kd.prototype.registerFadeDuration=function(I){var $=I+this.timeAdded;$<Le.now()||this.fadeEndTime&&$<this.fadeEndTime||(this.fadeEndTime=$)},Kd.prototype.wasRequested=function(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"},Kd.prototype.loadVectorData=function(I,$,he){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",!I){this.collisionBoxArray=new Mf;return}I.featureIndex&&(this.latestFeatureIndex=I.featureIndex,I.rawTileData?(this.latestRawTileData=I.rawTileData,this.latestFeatureIndex.rawTileData=I.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=I.collisionBoxArray,this.buckets=zae(I.buckets,$.style),this.hasSymbolBuckets=!1;for(var ke in this.buckets){var qe=this.buckets[ke];if(qe instanceof Yc)if(this.hasSymbolBuckets=!0,he)qe.justReloaded=!0;else break}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var et in this.buckets){var Et=this.buckets[et];if(Et instanceof Yc&&Et.hasRTLText){this.hasRTLText=!0,Lc();break}}this.queryPadding=0;for(var Jt in this.buckets){var vr=this.buckets[Jt];this.queryPadding=Math.max(this.queryPadding,$.style.getLayer(Jt).queryRadius(vr))}I.imageAtlas&&(this.imageAtlas=I.imageAtlas),I.glyphAtlasImage&&(this.glyphAtlasImage=I.glyphAtlasImage)},Kd.prototype.unloadVectorData=function(){for(var I in this.buckets)this.buckets[I].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Kd.prototype.getBucket=function(I){return this.buckets[I.id]},Kd.prototype.upload=function(I){for(var $ in this.buckets){var he=this.buckets[$];he.uploadPending()&&he.upload(I)}var ke=I.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Yb(I,this.imageAtlas.image,ke.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Yb(I,this.glyphAtlasImage,ke.ALPHA),this.glyphAtlasImage=null)},Kd.prototype.prepare=function(I){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(I,this.imageAtlasTexture)},Kd.prototype.queryRenderedFeatures=function(I,$,he,ke,qe,et,Et,Jt,vr,Ar){return!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData?{}:this.latestFeatureIndex.query({queryGeometry:ke,cameraQueryGeometry:qe,scale:et,tileSize:this.tileSize,pixelPosMatrix:Ar,transform:Jt,params:Et,queryPadding:this.queryPadding*vr},I,$,he)},Kd.prototype.querySourceFeatures=function(I,$){var he=this.latestFeatureIndex;if(!(!he||!he.rawTileData)){var ke=he.loadVTLayers(),qe=$?$.sourceLayer:"",et=ke._geojsonTileLayer||ke[qe];if(et)for(var Et=ut($&&$.filter),Jt=this.tileID.canonical,vr=Jt.z,Ar=Jt.x,Zr=Jt.y,mn={z:vr,x:Ar,y:Zr},fn=0;fn<et.length;fn++){var On=et.feature(fn);if(Et.needGeometry){var da=Cl(On,!0);if(!Et.filter(new Ol(this.tileID.overscaledZ),da,this.tileID.canonical))continue}else if(!Et.filter(new Ol(this.tileID.overscaledZ),On))continue;var li=he.getId(On,qe),Va=new ok(On,vr,Ar,Zr,li);Va.tile=mn,I.push(Va)}}},Kd.prototype.hasData=function(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"},Kd.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Kd.prototype.setExpiryData=function(I){var $=this.expirationTime;if(I.cacheControl){var he=me(I.cacheControl);he["max-age"]&&(this.expirationTime=Date.now()+he["max-age"]*1e3)}else I.expires&&(this.expirationTime=new Date(I.expires).getTime());if(this.expirationTime){var ke=Date.now(),qe=!1;if(this.expirationTime>ke)qe=!1;else if(!$)qe=!0;else if(this.expirationTime<$)qe=!0;else{var et=this.expirationTime-$;et?this.expirationTime=ke+Math.max(et,Fae):qe=!0}qe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Kd.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)},Kd.prototype.setFeatureState=function(I,$){if(!(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(I).length===0)){var he=this.latestFeatureIndex.loadVTLayers();for(var ke in this.buckets)if($.style.hasLayer(ke)){var qe=this.buckets[ke],et=qe.layers[0].sourceLayer||"_geojsonTileLayer",Et=he[et],Jt=I[et];if(!(!Et||!Jt||Object.keys(Jt).length===0)){qe.update(Jt,Et,this.imageAtlas&&this.imageAtlas.patternPositions||{});var vr=$&&$.style&&$.style.getLayer(ke);vr&&(this.queryPadding=Math.max(this.queryPadding,vr.queryRadius(qe)))}}}},Kd.prototype.holdingForFade=function(){return this.symbolFadeHoldUntil!==void 0},Kd.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<Le.now()},Kd.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Kd.prototype.setHoldDuration=function(I){this.symbolFadeHoldUntil=Le.now()+I},Kd.prototype.setDependencies=function(I,$){for(var he={},ke=0,qe=$;ke<qe.length;ke+=1){var et=qe[ke];he[et]=!0}this.dependencies[I]=he},Kd.prototype.hasDependency=function(I,$){for(var he=0,ke=I;he<ke.length;he+=1){var qe=ke[he],et=this.dependencies[qe];if(et)for(var Et=0,Jt=$;Et<Jt.length;Et+=1){var vr=Jt[Et];if(et[vr])return!0}}return!1};var Bae=["type","source","source-layer","minzoom","maxzoom","filter","layout"],K_=u.performance,hB=function(I){this._marks={start:[I.url,"start"].join("#"),end:[I.url,"end"].join("#"),measure:I.url.toString()},K_.mark(this._marks.start)};hB.prototype.finish=function(){K_.mark(this._marks.end);var I=K_.getEntriesByName(this._marks.measure);return I.length===0&&(K_.measure(this._marks.measure,this._marks.start,this._marks.end),I=K_.getEntriesByName(this._marks.measure),K_.clearMarks(this._marks.start),K_.clearMarks(this._marks.end),K_.clearMeasures(this._marks.measure)),I},t.Actor=X3,t.AlphaImage=hd,t.CanonicalTileID=$b,t.CollisionBoxArray=Mf,t.Color=Ll,t.DEMData=v1,t.DataConstantProperty=Rn,t.DictionaryCoder=ik,t.EXTENT=oo,t.ErrorEvent=tn,t.EvaluationParameters=Ol,t.Event=Qr,t.Evented=Xr,t.FeatureIndex=p1,t.FillBucket=vm,t.FillExtrusionBucket=kp,t.ImageAtlas=Wc,t.ImagePosition=Xu,t.LineBucket=hv,t.LngLat=th,t.LngLatBounds=pd,t.MercatorCoordinate=Zb,t.ONE_EM=Ir,t.OverscaledTileID=md,t.Point=s,t.Point$1=s,t.Properties=pi,t.Protobuf=Bn,t.RGBAImage=fv,t.RequestManager=be,t.RequestPerformance=hB,t.ResourceType=Za,t.SegmentVector=Rs,t.SourceFeatureState=W3,t.StructArrayLayout1ui2=wu,t.StructArrayLayout2f1f2i16=no,t.StructArrayLayout2i4=si,t.StructArrayLayout3ui6=jo,t.StructArrayLayout4i8=$i,t.SymbolBucket=Yc,t.Texture=Yb,t.Tile=Kd,t.Transitionable=zu,t.Uniform1f=mr,t.Uniform1i=ur,t.Uniform2f=dr,t.Uniform3f=Yt,t.Uniform4f=ar,t.UniformColor=tr,t.UniformMatrix4f=un,t.UnwrappedTileID=uB,t.ValidationError=_o,t.WritingMode=eh,t.ZoomHistory=jn,t.add=Cp,t.addDynamicAttributes=E8,t.asyncAll=T,t.bezier=m,t.bindAll=D,t.browser=Le,t.cacheEntryPossiblyAdded=qn,t.clamp=c,t.clearTileCache=ia,t.clipLine=XF,t.clone=D_,t.clone$1=q,t.clone$2=_3,t.collisionCircleLayout=Qe,t.config=ze,t.create=I_,t.create$1=Wd,t.create$2=ay,t.createCommonjsModule=r,t.createExpression=_s,t.createLayout=za,t.createStyleLayer=Pae,t.cross=QR,t.deepEqual=d,t.dot=JR,t.dot$1=a8,t.ease=E,t.emitValidationErrors=Xc,t.endsWith=B,t.enforceCacheSizeLimit=ha,t.evaluateSizeForFeature=M5,t.evaluateSizeForZoom=K6,t.evaluateVariableOffset=ZF,t.evented=ou,t.extend=b,t.featureFilter=ut,t.filterObject=V,t.fromRotation=Qy,t.getAnchorAlignment=E5,t.getAnchorJustification=S8,t.getArrayBuffer=Ln,t.getImage=Gi,t.getJSON=wn,t.getRTLTextPluginStatus=So,t.getReferrer=_r,t.getVideo=qt,t.identity=s1,t.invert=eg,t.isChar=Vn,t.isMapboxURL=Ye,t.keysDifference=k,t.makeRequest=nn,t.mapObject=U,t.mercatorXfromLng=oB,t.mercatorYfromLat=sB,t.mercatorZfromAltitude=lB,t.mul=Bb,t.multiply=tg,t.mvt=h1,t.nextPowerOfTwo=x,t.normalize=jb,t.number=yu,t.offscreenCanvasSupported=ea,t.ortho=Rc,t.parseGlyphPBF=Yv,t.pbf=Bn,t.performSymbolLayout=cae,t.perspective=O_,t.pick=A,t.plugin=Vl,t.polygonIntersectsPolygon=vl,t.postMapLoadEvent=De,t.postTurnstileEvent=$e,t.potpack=Pp,t.refProperties=Bae,t.register=hr,t.registerForPluginStateChange=qs,t.renderColorRamp=N_,t.rotate=o1,t.rotateX=Mv,t.rotateZ=l1,t.scale=xc,t.scale$1=n8,t.scale$2=x3,t.setCacheLimits=xa,t.setRTLTextPlugin=sl,t.sphericalToCartesian=ye,t.sqrLen=g6,t.styleSpec=Di,t.sub=t8,t.symbolSize=T8,t.transformMat3=e8,t.transformMat4=b3,t.translate=Cf,t.triggerPluginCompletionEvent=fl,t.uniqueId=f,t.validateCustomStyleLayer=Mae,t.validateLight=Us,t.validateStyle=js,t.values=M,t.vectorTile=h1,t.version=a,t.warnOnce=G,t.webpSupported=Ge,t.window=u,t.wrap=_}),P(["./shared"],function(t){function r(_r){var Qt=typeof _r;if(Qt==="number"||Qt==="boolean"||Qt==="string"||_r===void 0||_r===null)return JSON.stringify(_r);if(Array.isArray(_r)){for(var yr="[",br=0,nn=_r;br<nn.length;br+=1){var wn=nn[br];yr+=r(wn)+","}return yr+"]"}for(var Ln=Object.keys(_r).sort(),Fn="{",va=0;va<Ln.length;va++)Fn+=JSON.stringify(Ln[va])+":"+r(_r[Ln[va]])+",";return Fn+"}"}function a(_r){for(var Qt="",yr=0,br=t.refProperties;yr<br.length;yr+=1){var nn=br[yr];Qt+="/"+r(_r[nn])}return Qt}function l(_r,Qt){for(var yr={},br=0;br<_r.length;br++){var nn=Qt&&Qt[_r[br].id]||a(_r[br]);Qt&&(Qt[_r[br].id]=nn);var wn=yr[nn];wn||(wn=yr[nn]=[]),wn.push(_r[br])}var Ln=[];for(var Fn in yr)Ln.push(yr[Fn]);return Ln}var i=function(Qt){this.keyCache={},Qt&&this.replace(Qt)};i.prototype.replace=function(Qt){this._layerConfigs={},this._layers={},this.update(Qt,[])},i.prototype.update=function(Qt,yr){for(var br=this,nn=0,wn=Qt;nn<wn.length;nn+=1){var Ln=wn[nn];this._layerConfigs[Ln.id]=Ln;var Fn=this._layers[Ln.id]=t.createStyleLayer(Ln);Fn._featureFilter=t.featureFilter(Fn.filter),this.keyCache[Ln.id]&&delete this.keyCache[Ln.id]}for(var va=0,Da=yr;va<Da.length;va+=1){var Pa=Da[va];delete this.keyCache[Pa],delete this._layerConfigs[Pa],delete this._layers[Pa]}this.familiesBySource={};for(var Fa=l(t.values(this._layerConfigs),this.keyCache),$a=0,oa=Fa;$a<oa.length;$a+=1){var zi=oa[$a],Gi=zi.map(function(Xr){return br._layers[Xr.id]}),qt=Gi[0];if(qt.visibility!=="none"){var Ct=qt.source||"",Ur=this.familiesBySource[Ct];Ur||(Ur=this.familiesBySource[Ct]={});var Qr=qt.sourceLayer||"_geojsonTileLayer",tn=Ur[Qr];tn||(tn=Ur[Qr]=[]),tn.push(Gi)}}};var s=1,o=function(Qt){var yr={},br=[];for(var nn in Qt){var wn=Qt[nn],Ln=yr[nn]={};for(var Fn in wn){var va=wn[+Fn];if(!(!va||va.bitmap.width===0||va.bitmap.height===0)){var Da={x:0,y:0,w:va.bitmap.width+2*s,h:va.bitmap.height+2*s};br.push(Da),Ln[Fn]={rect:Da,metrics:va.metrics}}}}var Pa=t.potpack(br),Fa=Pa.w,$a=Pa.h,oa=new t.AlphaImage({width:Fa||1,height:$a||1});for(var zi in Qt){var Gi=Qt[zi];for(var qt in Gi){var Ct=Gi[+qt];if(!(!Ct||Ct.bitmap.width===0||Ct.bitmap.height===0)){var Ur=yr[zi][qt].rect;t.AlphaImage.copy(Ct.bitmap,oa,{x:0,y:0},{x:Ur.x+s,y:Ur.y+s},Ct.bitmap)}}}this.image=oa,this.positions=yr};t.register("GlyphAtlas",o);var u=function(Qt){this.tileID=new t.OverscaledTileID(Qt.tileID.overscaledZ,Qt.tileID.wrap,Qt.tileID.canonical.z,Qt.tileID.canonical.x,Qt.tileID.canonical.y),this.uid=Qt.uid,this.zoom=Qt.zoom,this.pixelRatio=Qt.pixelRatio,this.tileSize=Qt.tileSize,this.source=Qt.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Qt.showCollisionBoxes,this.collectResourceTiming=!!Qt.collectResourceTiming,this.returnDependencies=!!Qt.returnDependencies,this.promoteId=Qt.promoteId};u.prototype.parse=function(Qt,yr,br,nn,wn){var Ln=this;this.status="parsing",this.data=Qt,this.collisionBoxArray=new t.CollisionBoxArray;var Fn=new t.DictionaryCoder(Object.keys(Qt.layers).sort()),va=new t.FeatureIndex(this.tileID,this.promoteId);va.bucketLayerIDs=[];var Da={},Pa={featureIndex:va,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:br},Fa=yr.familiesBySource[this.source];for(var $a in Fa){var oa=Qt.layers[$a];if(oa){oa.version===1&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+$a+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var zi=Fn.encode($a),Gi=[],qt=0;qt<oa.length;qt++){var Ct=oa.feature(qt),Ur=va.getId(Ct,$a);Gi.push({feature:Ct,id:Ur,index:qt,sourceLayerIndex:zi})}for(var Qr=0,tn=Fa[$a];Qr<tn.length;Qr+=1){var Xr=tn[Qr],en=Xr[0];if(!(en.minzoom&&this.zoom<Math.floor(en.minzoom))&&!(en.maxzoom&&this.zoom>=en.maxzoom)&&en.visibility!=="none"){d(Xr,this.zoom,br);var Tn=Da[en.id]=en.createBucket({index:va.bucketLayerIDs.length,layers:Xr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:zi,sourceID:this.source});Tn.populate(Gi,Pa,this.tileID.canonical),va.bucketLayerIDs.push(Xr.map(function(Sn){return Sn.id}))}}}}var hn,Rt,xr,Wr,An=t.mapObject(Pa.glyphDependencies,function(Sn){return Object.keys(Sn).map(Number)});Object.keys(An).length?nn.send("getGlyphs",{uid:this.uid,stacks:An},function(Sn,Wn){hn||(hn=Sn,Rt=Wn,ra.call(Ln))}):Rt={};var Xn=Object.keys(Pa.iconDependencies);Xn.length?nn.send("getImages",{icons:Xn,source:this.source,tileID:this.tileID,type:"icons"},function(Sn,Wn){hn||(hn=Sn,xr=Wn,ra.call(Ln))}):xr={};var na=Object.keys(Pa.patternDependencies);na.length?nn.send("getImages",{icons:na,source:this.source,tileID:this.tileID,type:"patterns"},function(Sn,Wn){hn||(hn=Sn,Wr=Wn,ra.call(Ln))}):Wr={},ra.call(this);function ra(){if(hn)return wn(hn);if(Rt&&xr&&Wr){var Sn=new o(Rt),Wn=new t.ImageAtlas(xr,Wr);for(var Fi in Da){var Ya=Da[Fi];Ya instanceof t.SymbolBucket?(d(Ya.layers,this.zoom,br),t.performSymbolLayout(Ya,Rt,Sn.positions,xr,Wn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Ya.hasPattern&&(Ya instanceof t.LineBucket||Ya instanceof t.FillBucket||Ya instanceof t.FillExtrusionBucket)&&(d(Ya.layers,this.zoom,br),Ya.addFeatures(Pa,this.tileID.canonical,Wn.patternPositions))}this.status="done",wn(null,{buckets:t.values(Da).filter(function(Wi){return!Wi.isEmpty()}),featureIndex:va,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Sn.image,imageAtlas:Wn,glyphMap:this.returnDependencies?Rt:null,iconMap:this.returnDependencies?xr:null,glyphPositions:this.returnDependencies?Sn.positions:null})}}};function d(_r,Qt,yr){for(var br=new t.EvaluationParameters(Qt),nn=0,wn=_r;nn<wn.length;nn+=1){var Ln=wn[nn];Ln.recalculate(br,yr)}}function h(_r,Qt){var yr=t.getArrayBuffer(_r.request,function(br,nn,wn,Ln){br?Qt(br):nn&&Qt(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(nn)),rawData:nn,cacheControl:wn,expires:Ln})});return function(){yr.cancel(),Qt()}}var y=function(Qt,yr,br,nn){this.actor=Qt,this.layerIndex=yr,this.availableImages=br,this.loadVectorData=nn||h,this.loading={},this.loaded={}};y.prototype.loadTile=function(Qt,yr){var br=this,nn=Qt.uid;this.loading||(this.loading={});var wn=Qt&&Qt.request&&Qt.request.collectResourceTiming?new t.RequestPerformance(Qt.request):!1,Ln=this.loading[nn]=new u(Qt);Ln.abort=this.loadVectorData(Qt,function(Fn,va){if(delete br.loading[nn],Fn||!va)return Ln.status="done",br.loaded[nn]=Ln,yr(Fn);var Da=va.rawData,Pa={};va.expires&&(Pa.expires=va.expires),va.cacheControl&&(Pa.cacheControl=va.cacheControl);var Fa={};if(wn){var $a=wn.finish();$a&&(Fa.resourceTiming=JSON.parse(JSON.stringify($a)))}Ln.vectorTile=va.vectorTile,Ln.parse(va.vectorTile,br.layerIndex,br.availableImages,br.actor,function(oa,zi){if(oa||!zi)return yr(oa);yr(null,t.extend({rawTileData:Da.slice(0)},zi,Pa,Fa))}),br.loaded=br.loaded||{},br.loaded[nn]=Ln})},y.prototype.reloadTile=function(Qt,yr){var br=this,nn=this.loaded,wn=Qt.uid,Ln=this;if(nn&&nn[wn]){var Fn=nn[wn];Fn.showCollisionBoxes=Qt.showCollisionBoxes;var va=function(Da,Pa){var Fa=Fn.reloadCallback;Fa&&(delete Fn.reloadCallback,Fn.parse(Fn.vectorTile,Ln.layerIndex,br.availableImages,Ln.actor,Fa)),yr(Da,Pa)};Fn.status==="parsing"?Fn.reloadCallback=va:Fn.status==="done"&&(Fn.vectorTile?Fn.parse(Fn.vectorTile,this.layerIndex,this.availableImages,this.actor,va):va())}},y.prototype.abortTile=function(Qt,yr){var br=this.loading,nn=Qt.uid;br&&br[nn]&&br[nn].abort&&(br[nn].abort(),delete br[nn]),yr()},y.prototype.removeTile=function(Qt,yr){var br=this.loaded,nn=Qt.uid;br&&br[nn]&&delete br[nn],yr()};var m=t.window.ImageBitmap,E=function(){this.loaded={}};E.prototype.loadTile=function(Qt,yr){var br=Qt.uid,nn=Qt.encoding,wn=Qt.rawImageData,Ln=m&&wn instanceof m?this.getImageData(wn):wn,Fn=new t.DEMData(br,Ln,nn);this.loaded=this.loaded||{},this.loaded[br]=Fn,yr(null,Fn)},E.prototype.getImageData=function(Qt){(!this.offscreenCanvas||!this.offscreenCanvasContext)&&(this.offscreenCanvas=new OffscreenCanvas(Qt.width,Qt.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Qt.width,this.offscreenCanvas.height=Qt.height,this.offscreenCanvasContext.drawImage(Qt,0,0,Qt.width,Qt.height);var yr=this.offscreenCanvasContext.getImageData(-1,-1,Qt.width+2,Qt.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:yr.width,height:yr.height},yr.data)},E.prototype.removeTile=function(Qt){var yr=this.loaded,br=Qt.uid;yr&&yr[br]&&delete yr[br]};var c=_;function _(_r,Qt){var yr=_r&&_r.type,br;if(yr==="FeatureCollection")for(br=0;br<_r.features.length;br++)_(_r.features[br],Qt);else if(yr==="GeometryCollection")for(br=0;br<_r.geometries.length;br++)_(_r.geometries[br],Qt);else if(yr==="Feature")_(_r.geometry,Qt);else if(yr==="Polygon")T(_r.coordinates,Qt);else if(yr==="MultiPolygon")for(br=0;br<_r.coordinates.length;br++)T(_r.coordinates[br],Qt);return _r}function T(_r,Qt){if(_r.length!==0){M(_r[0],Qt);for(var yr=1;yr<_r.length;yr++)M(_r[yr],!Qt)}}function M(_r,Qt){for(var yr=0,br=0,nn=_r.length,wn=nn-1;br<nn;wn=br++)yr+=(_r[br][0]-_r[wn][0])*(_r[wn][1]+_r[br][1]);yr>=0!=!!Qt&&_r.reverse()}var k=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,b=function(Qt){this._feature=Qt,this.extent=t.EXTENT,this.type=Qt.type,this.properties=Qt.tags,"id"in Qt&&!isNaN(Qt.id)&&(this.id=parseInt(Qt.id,10))};b.prototype.loadGeometry=function(){if(this._feature.type===1){for(var Qt=[],yr=0,br=this._feature.geometry;yr<br.length;yr+=1){var nn=br[yr];Qt.push([new t.Point$1(nn[0],nn[1])])}return Qt}else{for(var wn=[],Ln=0,Fn=this._feature.geometry;Ln<Fn.length;Ln+=1){for(var va=Fn[Ln],Da=[],Pa=0,Fa=va;Pa<Fa.length;Pa+=1){var $a=Fa[Pa];Da.push(new t.Point$1($a[0],$a[1]))}wn.push(Da)}return wn}},b.prototype.toGeoJSON=function(Qt,yr,br){return k.call(this,Qt,yr,br)};var A=function(Qt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=Qt.length,this._features=Qt};A.prototype.feature=function(Qt){return new b(this._features[Qt])};var g=t.vectorTile.VectorTileFeature,f=p;function p(_r,Qt){this.options=Qt||{},this.features=_r,this.length=_r.length}p.prototype.feature=function(_r){return new x(this.features[_r],this.options.extent)};function x(_r,Qt){this.id=typeof _r.id=="number"?_r.id:void 0,this.type=_r.type,this.rawGeometry=_r.type===1?[_r.geometry]:_r.geometry,this.properties=_r.tags,this.extent=Qt||4096}x.prototype.loadGeometry=function(){var _r=this.rawGeometry;this.geometry=[];for(var Qt=0;Qt<_r.length;Qt++){for(var yr=_r[Qt],br=[],nn=0;nn<yr.length;nn++)br.push(new t.Point$1(yr[nn][0],yr[nn][1]));this.geometry.push(br)}return this.geometry},x.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var _r=this.geometry,Qt=1/0,yr=-1/0,br=1/0,nn=-1/0,wn=0;wn<_r.length;wn++)for(var Ln=_r[wn],Fn=0;Fn<Ln.length;Fn++){var va=Ln[Fn];Qt=Math.min(Qt,va.x),yr=Math.max(yr,va.x),br=Math.min(br,va.y),nn=Math.max(nn,va.y)}return[Qt,br,yr,nn]},x.prototype.toGeoJSON=g.prototype.toGeoJSON;var N=V,D=V,B=q,U=f;function V(_r){var Qt=new t.pbf;return z(_r,Qt),Qt.finish()}function q(_r,Qt){Qt=Qt||{};var yr={};for(var br in _r)yr[br]=new f(_r[br].features,Qt),yr[br].name=br,yr[br].version=Qt.version,yr[br].extent=Qt.extent;return V({layers:yr})}function z(_r,Qt){for(var yr in _r.layers)Qt.writeMessage(3,H,_r.layers[yr])}function H(_r,Qt){Qt.writeVarintField(15,_r.version||1),Qt.writeStringField(1,_r.name||""),Qt.writeVarintField(5,_r.extent||4096);var yr,br={keys:[],values:[],keycache:{},valuecache:{}};for(yr=0;yr<_r.length;yr++)br.feature=_r.feature(yr),Qt.writeMessage(2,G,br);var nn=br.keys;for(yr=0;yr<nn.length;yr++)Qt.writeStringField(3,nn[yr]);var wn=br.values;for(yr=0;yr<wn.length;yr++)Qt.writeMessage(4,me,wn[yr])}function G(_r,Qt){var yr=_r.feature;yr.id!==void 0&&Qt.writeVarintField(1,yr.id),Qt.writeMessage(2,J,_r),Qt.writeVarintField(3,yr.type),Qt.writeMessage(4,de,yr)}function J(_r,Qt){var yr=_r.feature,br=_r.keys,nn=_r.values,wn=_r.keycache,Ln=_r.valuecache;for(var Fn in yr.properties){var va=wn[Fn];typeof va>"u"&&(br.push(Fn),va=br.length-1,wn[Fn]=va),Qt.writeVarint(va);var Da=yr.properties[Fn],Pa=typeof Da;Pa!=="string"&&Pa!=="boolean"&&Pa!=="number"&&(Da=JSON.stringify(Da));var Fa=Pa+":"+Da,$a=Ln[Fa];typeof $a>"u"&&(nn.push(Da),$a=nn.length-1,Ln[Fa]=$a),Qt.writeVarint($a)}}function le(_r,Qt){return(Qt<<3)+(_r&7)}function ye(_r){return _r<<1^_r>>31}function de(_r,Qt){for(var yr=_r.loadGeometry(),br=_r.type,nn=0,wn=0,Ln=yr.length,Fn=0;Fn<Ln;Fn++){var va=yr[Fn],Da=1;br===1&&(Da=va.length),Qt.writeVarint(le(1,Da));for(var Pa=br===3?va.length-1:va.length,Fa=0;Fa<Pa;Fa++){Fa===1&&br!==1&&Qt.writeVarint(le(2,Pa-1));var $a=va[Fa].x-nn,oa=va[Fa].y-wn;Qt.writeVarint(ye($a)),Qt.writeVarint(ye(oa)),nn+=$a,wn+=oa}br===3&&Qt.writeVarint(le(7,1))}}function me(_r,Qt){var yr=typeof _r;yr==="string"?Qt.writeStringField(1,_r):yr==="boolean"?Qt.writeBooleanField(7,_r):yr==="number"&&(_r%1!==0?Qt.writeDoubleField(3,_r):_r<0?Qt.writeSVarintField(6,_r):Qt.writeVarintField(5,_r))}N.fromVectorTileJs=D,N.fromGeojsonVt=B,N.GeoJSONWrapper=U;function W(_r,Qt,yr,br,nn,wn){if(!(nn-br<=yr)){var Ln=br+nn>>1;ie(_r,Qt,Ln,br,nn,wn%2),W(_r,Qt,yr,br,Ln-1,wn+1),W(_r,Qt,yr,Ln+1,nn,wn+1)}}function ie(_r,Qt,yr,br,nn,wn){for(;nn>br;){if(nn-br>600){var Ln=nn-br+1,Fn=yr-br+1,va=Math.log(Ln),Da=.5*Math.exp(2*va/3),Pa=.5*Math.sqrt(va*Da*(Ln-Da)/Ln)*(Fn-Ln/2<0?-1:1),Fa=Math.max(br,Math.floor(yr-Fn*Da/Ln+Pa)),$a=Math.min(nn,Math.floor(yr+(Ln-Fn)*Da/Ln+Pa));ie(_r,Qt,yr,Fa,$a,wn)}var oa=Qt[2*yr+wn],zi=br,Gi=nn;for(se(_r,Qt,br,yr),Qt[2*nn+wn]>oa&&se(_r,Qt,br,nn);zi<Gi;){for(se(_r,Qt,zi,Gi),zi++,Gi--;Qt[2*zi+wn]<oa;)zi++;for(;Qt[2*Gi+wn]>oa;)Gi--}Qt[2*br+wn]===oa?se(_r,Qt,br,Gi):(Gi++,se(_r,Qt,Gi,nn)),Gi<=yr&&(br=Gi+1),yr<=Gi&&(nn=Gi-1)}}function se(_r,Qt,yr,br){ee(_r,yr,br),ee(Qt,2*yr,2*br),ee(Qt,2*yr+1,2*br+1)}function ee(_r,Qt,yr){var br=_r[Qt];_r[Qt]=_r[yr],_r[yr]=br}function pe(_r,Qt,yr,br,nn,wn,Ln){for(var Fn=[0,_r.length-1,0],va=[],Da,Pa;Fn.length;){var Fa=Fn.pop(),$a=Fn.pop(),oa=Fn.pop();if($a-oa<=Ln){for(var zi=oa;zi<=$a;zi++)Da=Qt[2*zi],Pa=Qt[2*zi+1],Da>=yr&&Da<=nn&&Pa>=br&&Pa<=wn&&va.push(_r[zi]);continue}var Gi=Math.floor((oa+$a)/2);Da=Qt[2*Gi],Pa=Qt[2*Gi+1],Da>=yr&&Da<=nn&&Pa>=br&&Pa<=wn&&va.push(_r[Gi]);var qt=(Fa+1)%2;(Fa===0?yr<=Da:br<=Pa)&&(Fn.push(oa),Fn.push(Gi-1),Fn.push(qt)),(Fa===0?nn>=Da:wn>=Pa)&&(Fn.push(Gi+1),Fn.push($a),Fn.push(qt))}return va}function oe(_r,Qt,yr,br,nn,wn){for(var Ln=[0,_r.length-1,0],Fn=[],va=nn*nn;Ln.length;){var Da=Ln.pop(),Pa=Ln.pop(),Fa=Ln.pop();if(Pa-Fa<=wn){for(var $a=Fa;$a<=Pa;$a++)Y(Qt[2*$a],Qt[2*$a+1],yr,br)<=va&&Fn.push(_r[$a]);continue}var oa=Math.floor((Fa+Pa)/2),zi=Qt[2*oa],Gi=Qt[2*oa+1];Y(zi,Gi,yr,br)<=va&&Fn.push(_r[oa]);var qt=(Da+1)%2;(Da===0?yr-nn<=zi:br-nn<=Gi)&&(Ln.push(Fa),Ln.push(oa-1),Ln.push(qt)),(Da===0?yr+nn>=zi:br+nn>=Gi)&&(Ln.push(oa+1),Ln.push(Pa),Ln.push(qt))}return Fn}function Y(_r,Qt,yr,br){var nn=_r-yr,wn=Qt-br;return nn*nn+wn*wn}var ce=function(_r){return _r[0]},ue=function(_r){return _r[1]},_e=function(Qt,yr,br,nn,wn){yr===void 0&&(yr=ce),br===void 0&&(br=ue),nn===void 0&&(nn=64),wn===void 0&&(wn=Float64Array),this.nodeSize=nn,this.points=Qt;for(var Ln=Qt.length<65536?Uint16Array:Uint32Array,Fn=this.ids=new Ln(Qt.length),va=this.coords=new wn(Qt.length*2),Da=0;Da<Qt.length;Da++)Fn[Da]=Da,va[2*Da]=yr(Qt[Da]),va[2*Da+1]=br(Qt[Da]);W(Fn,va,nn,0,Fn.length-1,0)};_e.prototype.range=function(Qt,yr,br,nn){return pe(this.ids,this.coords,Qt,yr,br,nn,this.nodeSize)},_e.prototype.within=function(Qt,yr,br){return oe(this.ids,this.coords,Qt,yr,br,this.nodeSize)};var Le={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(_r){return _r}},ze=function(Qt){this.options=Pe(Object.create(Le),Qt),this.trees=new Array(this.options.maxZoom+1)};ze.prototype.load=function(Qt){var yr=this.options,br=yr.log,nn=yr.minZoom,wn=yr.maxZoom,Ln=yr.nodeSize;br&&console.time("total time");var Fn="prepare "+Qt.length+" points";br&&console.time(Fn),this.points=Qt;for(var va=[],Da=0;Da<Qt.length;Da++)Qt[Da].geometry&&va.push(Ve(Qt[Da],Da));this.trees[wn+1]=new _e(va,be,Ye,Ln,Float32Array),br&&console.timeEnd(Fn);for(var Pa=wn;Pa>=nn;Pa--){var Fa=+Date.now();va=this._cluster(va,Pa),this.trees[Pa]=new _e(va,be,Ye,Ln,Float32Array),br&&console.log("z%d: %d clusters in %dms",Pa,va.length,+Date.now()-Fa)}return br&&console.timeEnd("total time"),this},ze.prototype.getClusters=function(Qt,yr){var br=((Qt[0]+180)%360+360)%360-180,nn=Math.max(-90,Math.min(90,Qt[1])),wn=Qt[2]===180?180:((Qt[2]+180)%360+360)%360-180,Ln=Math.max(-90,Math.min(90,Qt[3]));if(Qt[2]-Qt[0]>=360)br=-180,wn=180;else if(br>wn){var Fn=this.getClusters([br,nn,180,Ln],yr),va=this.getClusters([-180,nn,wn,Ln],yr);return Fn.concat(va)}for(var Da=this.trees[this._limitZoom(yr)],Pa=Da.range(gt(br),ht(Ln),gt(wn),ht(nn)),Fa=[],$a=0,oa=Pa;$a<oa.length;$a+=1){var zi=oa[$a],Gi=Da.points[zi];Fa.push(Gi.numPoints?rt(Gi):this.points[Gi.index])}return Fa},ze.prototype.getChildren=function(Qt){var yr=this._getOriginId(Qt),br=this._getOriginZoom(Qt),nn="No cluster with the specified id.",wn=this.trees[br];if(!wn)throw new Error(nn);var Ln=wn.points[yr];if(!Ln)throw new Error(nn);for(var Fn=this.options.radius/(this.options.extent*Math.pow(2,br-1)),va=wn.within(Ln.x,Ln.y,Fn),Da=[],Pa=0,Fa=va;Pa<Fa.length;Pa+=1){var $a=Fa[Pa],oa=wn.points[$a];oa.parentId===Qt&&Da.push(oa.numPoints?rt(oa):this.points[oa.index])}if(Da.length===0)throw new Error(nn);return Da},ze.prototype.getLeaves=function(Qt,yr,br){yr=yr||10,br=br||0;var nn=[];return this._appendLeaves(nn,Qt,yr,br,0),nn},ze.prototype.getTile=function(Qt,yr,br){var nn=this.trees[this._limitZoom(Qt)],wn=Math.pow(2,Qt),Ln=this.options,Fn=Ln.extent,va=Ln.radius,Da=va/Fn,Pa=(br-Da)/wn,Fa=(br+1+Da)/wn,$a={features:[]};return this._addTileFeatures(nn.range((yr-Da)/wn,Pa,(yr+1+Da)/wn,Fa),nn.points,yr,br,wn,$a),yr===0&&this._addTileFeatures(nn.range(1-Da/wn,Pa,1,Fa),nn.points,wn,br,wn,$a),yr===wn-1&&this._addTileFeatures(nn.range(0,Pa,Da/wn,Fa),nn.points,-1,br,wn,$a),$a.features.length?$a:null},ze.prototype.getClusterExpansionZoom=function(Qt){for(var yr=this._getOriginZoom(Qt)-1;yr<=this.options.maxZoom;){var br=this.getChildren(Qt);if(yr++,br.length!==1)break;Qt=br[0].properties.cluster_id}return yr},ze.prototype._appendLeaves=function(Qt,yr,br,nn,wn){for(var Ln=this.getChildren(yr),Fn=0,va=Ln;Fn<va.length;Fn+=1){var Da=va[Fn],Pa=Da.properties;if(Pa&&Pa.cluster?wn+Pa.point_count<=nn?wn+=Pa.point_count:wn=this._appendLeaves(Qt,Pa.cluster_id,br,nn,wn):wn<nn?wn++:Qt.push(Da),Qt.length===br)break}return wn},ze.prototype._addTileFeatures=function(Qt,yr,br,nn,wn,Ln){for(var Fn=0,va=Qt;Fn<va.length;Fn+=1){var Da=va[Fn],Pa=yr[Da],Fa=Pa.numPoints,$a={type:1,geometry:[[Math.round(this.options.extent*(Pa.x*wn-br)),Math.round(this.options.extent*(Pa.y*wn-nn))]],tags:Fa?pt(Pa):this.points[Pa.index].properties},oa=void 0;Fa?oa=Pa.id:this.options.generateId?oa=Pa.index:this.points[Pa.index].id&&(oa=this.points[Pa.index].id),oa!==void 0&&($a.id=oa),Ln.features.push($a)}},ze.prototype._limitZoom=function(Qt){return Math.max(this.options.minZoom,Math.min(+Qt,this.options.maxZoom+1))},ze.prototype._cluster=function(Qt,yr){for(var br=[],nn=this.options,wn=nn.radius,Ln=nn.extent,Fn=nn.reduce,va=nn.minPoints,Da=wn/(Ln*Math.pow(2,yr)),Pa=0;Pa<Qt.length;Pa++){var Fa=Qt[Pa];if(!(Fa.zoom<=yr)){Fa.zoom=yr;for(var $a=this.trees[yr+1],oa=$a.within(Fa.x,Fa.y,Da),zi=Fa.numPoints||1,Gi=zi,qt=0,Ct=oa;qt<Ct.length;qt+=1){var Ur=Ct[qt],Qr=$a.points[Ur];Qr.zoom>yr&&(Gi+=Qr.numPoints||1)}if(Gi>=va){for(var tn=Fa.x*zi,Xr=Fa.y*zi,en=Fn&&zi>1?this._map(Fa,!0):null,Tn=(Pa<<5)+(yr+1)+this.points.length,hn=0,Rt=oa;hn<Rt.length;hn+=1){var xr=Rt[hn],Wr=$a.points[xr];if(!(Wr.zoom<=yr)){Wr.zoom=yr;var An=Wr.numPoints||1;tn+=Wr.x*An,Xr+=Wr.y*An,Wr.parentId=Tn,Fn&&(en||(en=this._map(Fa,!0)),Fn(en,this._map(Wr)))}}Fa.parentId=Tn,br.push(Ge(tn/Gi,Xr/Gi,Tn,Gi,en))}else if(br.push(Fa),Gi>1)for(var Xn=0,na=oa;Xn<na.length;Xn+=1){var ra=na[Xn],Sn=$a.points[ra];Sn.zoom<=yr||(Sn.zoom=yr,br.push(Sn))}}}return br},ze.prototype._getOriginId=function(Qt){return Qt-this.points.length>>5},ze.prototype._getOriginZoom=function(Qt){return(Qt-this.points.length)%32},ze.prototype._map=function(Qt,yr){if(Qt.numPoints)return yr?Pe({},Qt.properties):Qt.properties;var br=this.points[Qt.index].properties,nn=this.options.map(br);return yr&&nn===br?Pe({},nn):nn};function Ge(_r,Qt,yr,br,nn){return{x:_r,y:Qt,zoom:1/0,id:yr,parentId:-1,numPoints:br,properties:nn}}function Ve(_r,Qt){var yr=_r.geometry.coordinates,br=yr[0],nn=yr[1];return{x:gt(br),y:ht(nn),zoom:1/0,index:Qt,parentId:-1}}function rt(_r){return{type:"Feature",id:_r.id,properties:pt(_r),geometry:{type:"Point",coordinates:[lt(_r.x),Fe(_r.y)]}}}function pt(_r){var Qt=_r.numPoints,yr=Qt>=1e4?Math.round(Qt/1e3)+"k":Qt>=1e3?Math.round(Qt/100)/10+"k":Qt;return Pe(Pe({},_r.properties),{cluster:!0,cluster_id:_r.id,point_count:Qt,point_count_abbreviated:yr})}function gt(_r){return _r/360+.5}function ht(_r){var Qt=Math.sin(_r*Math.PI/180),yr=.5-.25*Math.log((1+Qt)/(1-Qt))/Math.PI;return yr<0?0:yr>1?1:yr}function lt(_r){return(_r-.5)*360}function Fe(_r){var Qt=(180-_r*360)*Math.PI/180;return 360*Math.atan(Math.exp(Qt))/Math.PI-90}function Pe(_r,Qt){for(var yr in Qt)_r[yr]=Qt[yr];return _r}function be(_r){return _r.x}function Ye(_r){return _r.y}function mt(_r,Qt,yr,br){for(var nn=br,wn=yr-Qt>>1,Ln=yr-Qt,Fn,va=_r[Qt],Da=_r[Qt+1],Pa=_r[yr],Fa=_r[yr+1],$a=Qt+3;$a<yr;$a+=3){var oa=bt(_r[$a],_r[$a+1],va,Da,Pa,Fa);if(oa>nn)Fn=$a,nn=oa;else if(oa===nn){var zi=Math.abs($a-wn);zi<Ln&&(Fn=$a,Ln=zi)}}nn>br&&(Fn-Qt>3&&mt(_r,Qt,Fn,br),_r[Fn+2]=nn,yr-Fn>3&&mt(_r,Fn,yr,br))}function bt(_r,Qt,yr,br,nn,wn){var Ln=nn-yr,Fn=wn-br;if(Ln!==0||Fn!==0){var va=((_r-yr)*Ln+(Qt-br)*Fn)/(Ln*Ln+Fn*Fn);va>1?(yr=nn,br=wn):va>0&&(yr+=Ln*va,br+=Fn*va)}return Ln=_r-yr,Fn=Qt-br,Ln*Ln+Fn*Fn}function ft(_r,Qt,yr,br){var nn={id:typeof _r>"u"?null:_r,type:Qt,geometry:yr,tags:br,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return Wt(nn),nn}function Wt(_r){var Qt=_r.geometry,yr=_r.type;if(yr==="Point"||yr==="MultiPoint"||yr==="LineString")Zt(_r,Qt);else if(yr==="Polygon"||yr==="MultiLineString")for(var br=0;br<Qt.length;br++)Zt(_r,Qt[br]);else if(yr==="MultiPolygon")for(br=0;br<Qt.length;br++)for(var nn=0;nn<Qt[br].length;nn++)Zt(_r,Qt[br][nn])}function Zt(_r,Qt){for(var yr=0;yr<Qt.length;yr+=3)_r.minX=Math.min(_r.minX,Qt[yr]),_r.minY=Math.min(_r.minY,Qt[yr+1]),_r.maxX=Math.max(_r.maxX,Qt[yr]),_r.maxY=Math.max(_r.maxY,Qt[yr+1])}function cr(_r,Qt){var yr=[];if(_r.type==="FeatureCollection")for(var br=0;br<_r.features.length;br++)pr(yr,_r.features[br],Qt,br);else _r.type==="Feature"?pr(yr,_r,Qt):pr(yr,{geometry:_r},Qt);return yr}function pr(_r,Qt,yr,br){if(Qt.geometry){var nn=Qt.geometry.coordinates,wn=Qt.geometry.type,Ln=Math.pow(yr.tolerance/((1<<yr.maxZoom)*yr.extent),2),Fn=[],va=Qt.id;if(yr.promoteId?va=Qt.properties[yr.promoteId]:yr.generateId&&(va=br||0),wn==="Point")Br(nn,Fn);else if(wn==="MultiPoint")for(var Da=0;Da<nn.length;Da++)Br(nn[Da],Fn);else if(wn==="LineString")Fr(nn,Fn,Ln,!1);else if(wn==="MultiLineString")if(yr.lineMetrics){for(Da=0;Da<nn.length;Da++)Fn=[],Fr(nn[Da],Fn,Ln,!1),_r.push(ft(va,"LineString",Fn,Qt.properties));return}else cn(nn,Fn,Ln,!1);else if(wn==="Polygon")cn(nn,Fn,Ln,!0);else if(wn==="MultiPolygon")for(Da=0;Da<nn.length;Da++){var Pa=[];cn(nn[Da],Pa,Ln,!0),Fn.push(Pa)}else if(wn==="GeometryCollection"){for(Da=0;Da<Qt.geometry.geometries.length;Da++)pr(_r,{id:va,geometry:Qt.geometry.geometries[Da],properties:Qt.properties},yr,br);return}else throw new Error("Input data is not a valid GeoJSON object.");_r.push(ft(va,wn,Fn,Qt.properties))}}function Br(_r,Qt){Qt.push(Nr(_r[0])),Qt.push(Jr(_r[1])),Qt.push(0)}function Fr(_r,Qt,yr,br){for(var nn,wn,Ln=0,Fn=0;Fn<_r.length;Fn++){var va=Nr(_r[Fn][0]),Da=Jr(_r[Fn][1]);Qt.push(va),Qt.push(Da),Qt.push(0),Fn>0&&(br?Ln+=(nn*Da-va*wn)/2:Ln+=Math.sqrt(Math.pow(va-nn,2)+Math.pow(Da-wn,2))),nn=va,wn=Da}var Pa=Qt.length-3;Qt[2]=1,mt(Qt,0,Pa,yr),Qt[Pa+2]=1,Qt.size=Math.abs(Ln),Qt.start=0,Qt.end=Qt.size}function cn(_r,Qt,yr,br){for(var nn=0;nn<_r.length;nn++){var wn=[];Fr(_r[nn],wn,yr,br),Qt.push(wn)}}function Nr(_r){return _r/360+.5}function Jr(_r){var Qt=Math.sin(_r*Math.PI/180),yr=.5-.25*Math.log((1+Qt)/(1-Qt))/Math.PI;return yr<0?0:yr>1?1:yr}function Dt(_r,Qt,yr,br,nn,wn,Ln,Fn){if(yr/=Qt,br/=Qt,wn>=yr&&Ln<br)return _r;if(Ln<yr||wn>=br)return null;for(var va=[],Da=0;Da<_r.length;Da++){var Pa=_r[Da],Fa=Pa.geometry,$a=Pa.type,oa=nn===0?Pa.minX:Pa.minY,zi=nn===0?Pa.maxX:Pa.maxY;if(oa>=yr&&zi<br){va.push(Pa);continue}else if(zi<yr||oa>=br)continue;var Gi=[];if($a==="Point"||$a==="MultiPoint")$e(Fa,Gi,yr,br,nn);else if($a==="LineString")ot(Fa,Gi,yr,br,nn,!1,Fn.lineMetrics);else if($a==="MultiLineString")Ee(Fa,Gi,yr,br,nn,!1);else if($a==="Polygon")Ee(Fa,Gi,yr,br,nn,!0);else if($a==="MultiPolygon")for(var qt=0;qt<Fa.length;qt++){var Ct=[];Ee(Fa[qt],Ct,yr,br,nn,!0),Ct.length&&Gi.push(Ct)}if(Gi.length){if(Fn.lineMetrics&&$a==="LineString"){for(qt=0;qt<Gi.length;qt++)va.push(ft(Pa.id,$a,Gi[qt],Pa.tags));continue}($a==="LineString"||$a==="MultiLineString")&&(Gi.length===1?($a="LineString",Gi=Gi[0]):$a="MultiLineString"),($a==="Point"||$a==="MultiPoint")&&($a=Gi.length===3?"Point":"MultiPoint"),va.push(ft(Pa.id,$a,Gi,Pa.tags))}}return va.length?va:null}function $e(_r,Qt,yr,br,nn){for(var wn=0;wn<_r.length;wn+=3){var Ln=_r[wn+nn];Ln>=yr&&Ln<=br&&(Qt.push(_r[wn]),Qt.push(_r[wn+1]),Qt.push(_r[wn+2]))}}function ot(_r,Qt,yr,br,nn,wn,Ln){for(var Fn=De(_r),va=nn===0?Ie:tt,Da=_r.start,Pa,Fa,$a=0;$a<_r.length-3;$a+=3){var oa=_r[$a],zi=_r[$a+1],Gi=_r[$a+2],qt=_r[$a+3],Ct=_r[$a+4],Ur=nn===0?oa:zi,Qr=nn===0?qt:Ct,tn=!1;Ln&&(Pa=Math.sqrt(Math.pow(oa-qt,2)+Math.pow(zi-Ct,2))),Ur<yr?Qr>yr&&(Fa=va(Fn,oa,zi,qt,Ct,yr),Ln&&(Fn.start=Da+Pa*Fa)):Ur>br?Qr<br&&(Fa=va(Fn,oa,zi,qt,Ct,br),Ln&&(Fn.start=Da+Pa*Fa)):Ae(Fn,oa,zi,Gi),Qr<yr&&Ur>=yr&&(Fa=va(Fn,oa,zi,qt,Ct,yr),tn=!0),Qr>br&&Ur<=br&&(Fa=va(Fn,oa,zi,qt,Ct,br),tn=!0),!wn&&tn&&(Ln&&(Fn.end=Da+Pa*Fa),Qt.push(Fn),Fn=De(_r)),Ln&&(Da+=Pa)}var Xr=_r.length-3;oa=_r[Xr],zi=_r[Xr+1],Gi=_r[Xr+2],Ur=nn===0?oa:zi,Ur>=yr&&Ur<=br&&Ae(Fn,oa,zi,Gi),Xr=Fn.length-3,wn&&Xr>=3&&(Fn[Xr]!==Fn[0]||Fn[Xr+1]!==Fn[1])&&Ae(Fn,Fn[0],Fn[1],Fn[2]),Fn.length&&Qt.push(Fn)}function De(_r){var Qt=[];return Qt.size=_r.size,Qt.start=_r.start,Qt.end=_r.end,Qt}function Ee(_r,Qt,yr,br,nn,wn){for(var Ln=0;Ln<_r.length;Ln++)ot(_r[Ln],Qt,yr,br,nn,wn,!1)}function Ae(_r,Qt,yr,br){_r.push(Qt),_r.push(yr),_r.push(br)}function Ie(_r,Qt,yr,br,nn,wn){var Ln=(wn-Qt)/(br-Qt);return _r.push(wn),_r.push(yr+(nn-yr)*Ln),_r.push(1),Ln}function tt(_r,Qt,yr,br,nn,wn){var Ln=(wn-yr)/(nn-yr);return _r.push(Qt+(br-Qt)*Ln),_r.push(wn),_r.push(1),Ln}function st(_r,Qt){var yr=Qt.buffer/Qt.extent,br=_r,nn=Dt(_r,1,-1-yr,yr,0,-1,2,Qt),wn=Dt(_r,1,1-yr,2+yr,0,-1,2,Qt);return(nn||wn)&&(br=Dt(_r,1,-yr,1+yr,0,-1,2,Qt)||[],nn&&(br=Ft(nn,1).concat(br)),wn&&(br=br.concat(Ft(wn,-1)))),br}function Ft(_r,Qt){for(var yr=[],br=0;br<_r.length;br++){var nn=_r[br],wn=nn.type,Ln;if(wn==="Point"||wn==="MultiPoint"||wn==="LineString")Ln=Nt(nn.geometry,Qt);else if(wn==="MultiLineString"||wn==="Polygon"){Ln=[];for(var Fn=0;Fn<nn.geometry.length;Fn++)Ln.push(Nt(nn.geometry[Fn],Qt))}else if(wn==="MultiPolygon")for(Ln=[],Fn=0;Fn<nn.geometry.length;Fn++){for(var va=[],Da=0;Da<nn.geometry[Fn].length;Da++)va.push(Nt(nn.geometry[Fn][Da],Qt));Ln.push(va)}yr.push(ft(nn.id,wn,Ln,nn.tags))}return yr}function Nt(_r,Qt){var yr=[];yr.size=_r.size,_r.start!==void 0&&(yr.start=_r.start,yr.end=_r.end);for(var br=0;br<_r.length;br+=3)yr.push(_r[br]+Qt,_r[br+1],_r[br+2]);return yr}function Xt(_r,Qt){if(_r.transformed)return _r;var yr=1<<_r.z,br=_r.x,nn=_r.y,wn,Ln,Fn;for(wn=0;wn<_r.features.length;wn++){var va=_r.features[wn],Da=va.geometry,Pa=va.type;if(va.geometry=[],Pa===1)for(Ln=0;Ln<Da.length;Ln+=2)va.geometry.push(lr(Da[Ln],Da[Ln+1],Qt,yr,br,nn));else for(Ln=0;Ln<Da.length;Ln++){var Fa=[];for(Fn=0;Fn<Da[Ln].length;Fn+=2)Fa.push(lr(Da[Ln][Fn],Da[Ln][Fn+1],Qt,yr,br,nn));va.geometry.push(Fa)}}return _r.transformed=!0,_r}function lr(_r,Qt,yr,br,nn,wn){return[Math.round(yr*(_r*br-nn)),Math.round(yr*(Qt*br-wn))]}function Rr(_r,Qt,yr,br,nn){for(var wn=Qt===nn.maxZoom?0:nn.tolerance/((1<<Qt)*nn.extent),Ln={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:yr,y:br,z:Qt,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Fn=0;Fn<_r.length;Fn++){Ln.numFeatures++,Mr(Ln,_r[Fn],wn,nn);var va=_r[Fn].minX,Da=_r[Fn].minY,Pa=_r[Fn].maxX,Fa=_r[Fn].maxY;va<Ln.minX&&(Ln.minX=va),Da<Ln.minY&&(Ln.minY=Da),Pa>Ln.maxX&&(Ln.maxX=Pa),Fa>Ln.maxY&&(Ln.maxY=Fa)}return Ln}function Mr(_r,Qt,yr,br){var nn=Qt.geometry,wn=Qt.type,Ln=[];if(wn==="Point"||wn==="MultiPoint")for(var Fn=0;Fn<nn.length;Fn+=3)Ln.push(nn[Fn]),Ln.push(nn[Fn+1]),_r.numPoints++,_r.numSimplified++;else if(wn==="LineString")Sr(Ln,nn,_r,yr,!1,!1);else if(wn==="MultiLineString"||wn==="Polygon")for(Fn=0;Fn<nn.length;Fn++)Sr(Ln,nn[Fn],_r,yr,wn==="Polygon",Fn===0);else if(wn==="MultiPolygon")for(var va=0;va<nn.length;va++){var Da=nn[va];for(Fn=0;Fn<Da.length;Fn++)Sr(Ln,Da[Fn],_r,yr,!0,Fn===0)}if(Ln.length){var Pa=Qt.tags||null;if(wn==="LineString"&&br.lineMetrics){Pa={};for(var Fa in Qt.tags)Pa[Fa]=Qt.tags[Fa];Pa.mapbox_clip_start=nn.start/nn.size,Pa.mapbox_clip_end=nn.end/nn.size}var $a={geometry:Ln,type:wn==="Polygon"||wn==="MultiPolygon"?3:wn==="LineString"||wn==="MultiLineString"?2:1,tags:Pa};Qt.id!==null&&($a.id=Qt.id),_r.features.push($a)}}function Sr(_r,Qt,yr,br,nn,wn){var Ln=br*br;if(br>0&&Qt.size<(nn?Ln:br)){yr.numPoints+=Qt.length/3;return}for(var Fn=[],va=0;va<Qt.length;va+=3)(br===0||Qt[va+2]>Ln)&&(yr.numSimplified++,Fn.push(Qt[va]),Fn.push(Qt[va+1])),yr.numPoints++;nn&&Kr(Fn,wn),_r.push(Fn)}function Kr(_r,Qt){for(var yr=0,br=0,nn=_r.length,wn=nn-2;br<nn;wn=br,br+=2)yr+=(_r[br]-_r[wn])*(_r[br+1]+_r[wn+1]);if(yr>0===Qt)for(br=0,nn=_r.length;br<nn/2;br+=2){var Ln=_r[br],Fn=_r[br+1];_r[br]=_r[nn-2-br],_r[br+1]=_r[nn-1-br],_r[nn-2-br]=Ln,_r[nn-1-br]=Fn}}function qn(_r,Qt){return new ha(_r,Qt)}function ha(_r,Qt){Qt=this.options=xa(Object.create(this.options),Qt);var yr=Qt.debug;if(yr&&console.time("preprocess data"),Qt.maxZoom<0||Qt.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(Qt.promoteId&&Qt.generateId)throw new Error("promoteId and generateId cannot be used together.");var br=cr(_r,Qt);this.tiles={},this.tileCoords=[],yr&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",Qt.indexMaxZoom,Qt.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),br=st(br,Qt),br.length&&this.splitTile(br,0,0,0),yr&&(br.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}ha.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},ha.prototype.splitTile=function(_r,Qt,yr,br,nn,wn,Ln){for(var Fn=[_r,Qt,yr,br],va=this.options,Da=va.debug;Fn.length;){br=Fn.pop(),yr=Fn.pop(),Qt=Fn.pop(),_r=Fn.pop();var Pa=1<<Qt,Fa=ia(Qt,yr,br),$a=this.tiles[Fa];if(!$a&&(Da>1&&console.time("creation"),$a=this.tiles[Fa]=Rr(_r,Qt,yr,br,va),this.tileCoords.push({z:Qt,x:yr,y:br}),Da)){Da>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Qt,yr,br,$a.numFeatures,$a.numPoints,$a.numSimplified),console.timeEnd("creation"));var oa="z"+Qt;this.stats[oa]=(this.stats[oa]||0)+1,this.total++}if($a.source=_r,nn){if(Qt===va.maxZoom||Qt===nn)continue;var zi=1<<nn-Qt;if(yr!==Math.floor(wn/zi)||br!==Math.floor(Ln/zi))continue}else if(Qt===va.indexMaxZoom||$a.numPoints<=va.indexMaxPoints)continue;if($a.source=null,_r.length!==0){Da>1&&console.time("clipping");var Gi=.5*va.buffer/va.extent,qt=.5-Gi,Ct=.5+Gi,Ur=1+Gi,Qr,tn,Xr,en,Tn,hn;Qr=tn=Xr=en=null,Tn=Dt(_r,Pa,yr-Gi,yr+Ct,0,$a.minX,$a.maxX,va),hn=Dt(_r,Pa,yr+qt,yr+Ur,0,$a.minX,$a.maxX,va),_r=null,Tn&&(Qr=Dt(Tn,Pa,br-Gi,br+Ct,1,$a.minY,$a.maxY,va),tn=Dt(Tn,Pa,br+qt,br+Ur,1,$a.minY,$a.maxY,va),Tn=null),hn&&(Xr=Dt(hn,Pa,br-Gi,br+Ct,1,$a.minY,$a.maxY,va),en=Dt(hn,Pa,br+qt,br+Ur,1,$a.minY,$a.maxY,va),hn=null),Da>1&&console.timeEnd("clipping"),Fn.push(Qr||[],Qt+1,yr*2,br*2),Fn.push(tn||[],Qt+1,yr*2,br*2+1),Fn.push(Xr||[],Qt+1,yr*2+1,br*2),Fn.push(en||[],Qt+1,yr*2+1,br*2+1)}}},ha.prototype.getTile=function(_r,Qt,yr){var br=this.options,nn=br.extent,wn=br.debug;if(_r<0||_r>24)return null;var Ln=1<<_r;Qt=(Qt%Ln+Ln)%Ln;var Fn=ia(_r,Qt,yr);if(this.tiles[Fn])return Xt(this.tiles[Fn],nn);wn>1&&console.log("drilling down to z%d-%d-%d",_r,Qt,yr);for(var va=_r,Da=Qt,Pa=yr,Fa;!Fa&&va>0;)va--,Da=Math.floor(Da/2),Pa=Math.floor(Pa/2),Fa=this.tiles[ia(va,Da,Pa)];return!Fa||!Fa.source?null:(wn>1&&console.log("found parent tile z%d-%d-%d",va,Da,Pa),wn>1&&console.time("drilling down"),this.splitTile(Fa.source,va,Da,Pa,_r,Qt,yr),wn>1&&console.timeEnd("drilling down"),this.tiles[Fn]?Xt(this.tiles[Fn],nn):null)};function ia(_r,Qt,yr){return((1<<_r)*yr+Qt)*32+_r}function xa(_r,Qt){for(var yr in Qt)_r[yr]=Qt[yr];return _r}function ba(_r,Qt){var yr=_r.tileID.canonical;if(!this._geoJSONIndex)return Qt(null,null);var br=this._geoJSONIndex.getTile(yr.z,yr.x,yr.y);if(!br)return Qt(null,null);var nn=new A(br.features),wn=N(nn);(wn.byteOffset!==0||wn.byteLength!==wn.buffer.byteLength)&&(wn=new Uint8Array(wn)),Qt(null,{vectorTile:nn,rawData:wn.buffer})}var ea=(function(_r){function Qt(yr,br,nn,wn){_r.call(this,yr,br,nn,ba),wn&&(this.loadGeoJSON=wn)}return _r&&(Qt.__proto__=_r),Qt.prototype=Object.create(_r&&_r.prototype),Qt.prototype.constructor=Qt,Qt.prototype.loadData=function(br,nn){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=nn,this._pendingLoadDataParams=br,this._state&&this._state!=="Idle"?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},Qt.prototype._loadData=function(){var br=this;if(!(!this._pendingCallback||!this._pendingLoadDataParams)){var nn=this._pendingCallback,wn=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Ln=wn&&wn.request&&wn.request.collectResourceTiming?new t.RequestPerformance(wn.request):!1;this.loadGeoJSON(wn,function(Fn,va){if(Fn||!va)return nn(Fn);if(typeof va!="object")return nn(new Error("Input data given to '"+wn.source+"' is not a valid GeoJSON object."));c(va,!0);try{if(wn.filter){var Da=t.createExpression(wn.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Da.result==="error")throw new Error(Da.value.map(function(oa){return oa.key+": "+oa.message}).join(", "));var Pa=va.features.filter(function(oa){return Da.value.evaluate({zoom:0},oa)});va={type:"FeatureCollection",features:Pa}}br._geoJSONIndex=wn.cluster?new ze(Za(wn)).load(va.features):qn(va,wn.geojsonVtOptions)}catch(oa){return nn(oa)}br.loaded={};var Fa={};if(Ln){var $a=Ln.finish();$a&&(Fa.resourceTiming={},Fa.resourceTiming[wn.source]=JSON.parse(JSON.stringify($a)))}nn(null,Fa)})}},Qt.prototype.coalesce=function(){this._state==="Coalescing"?this._state="Idle":this._state==="NeedsLoadData"&&(this._state="Coalescing",this._loadData())},Qt.prototype.reloadTile=function(br,nn){var wn=this.loaded,Ln=br.uid;return wn&&wn[Ln]?_r.prototype.reloadTile.call(this,br,nn):this.loadTile(br,nn)},Qt.prototype.loadGeoJSON=function(br,nn){if(br.request)t.getJSON(br.request,nn);else if(typeof br.data=="string")try{return nn(null,JSON.parse(br.data))}catch{return nn(new Error("Input data given to '"+br.source+"' is not a valid GeoJSON object."))}else return nn(new Error("Input data given to '"+br.source+"' is not a valid GeoJSON object."))},Qt.prototype.removeSource=function(br,nn){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),nn()},Qt.prototype.getClusterExpansionZoom=function(br,nn){try{nn(null,this._geoJSONIndex.getClusterExpansionZoom(br.clusterId))}catch(wn){nn(wn)}},Qt.prototype.getClusterChildren=function(br,nn){try{nn(null,this._geoJSONIndex.getChildren(br.clusterId))}catch(wn){nn(wn)}},Qt.prototype.getClusterLeaves=function(br,nn){try{nn(null,this._geoJSONIndex.getLeaves(br.clusterId,br.limit,br.offset))}catch(wn){nn(wn)}},Qt})(y);function Za(_r){var Qt=_r.superclusterOptions,yr=_r.clusterProperties;if(!yr||!Qt)return Qt;for(var br={},nn={},wn={accumulated:null,zoom:0},Ln={properties:null},Fn=Object.keys(yr),va=0,Da=Fn;va<Da.length;va+=1){var Pa=Da[va],Fa=yr[Pa],$a=Fa[0],oa=Fa[1],zi=t.createExpression(oa),Gi=t.createExpression(typeof $a=="string"?[$a,["accumulated"],["get",Pa]]:$a);br[Pa]=zi.value,nn[Pa]=Gi.value}return Qt.map=function(qt){Ln.properties=qt;for(var Ct={},Ur=0,Qr=Fn;Ur<Qr.length;Ur+=1){var tn=Qr[Ur];Ct[tn]=br[tn].evaluate(wn,Ln)}return Ct},Qt.reduce=function(qt,Ct){Ln.properties=Ct;for(var Ur=0,Qr=Fn;Ur<Qr.length;Ur+=1){var tn=Qr[Ur];wn.accumulated=qt[tn],qt[tn]=nn[tn].evaluate(wn,Ln)}},Qt}var ui=function(Qt){var yr=this;this.self=Qt,this.actor=new t.Actor(Qt,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:y,geojson:ea},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(br,nn){if(yr.workerSourceTypes[br])throw new Error('Worker source with name "'+br+'" already registered.');yr.workerSourceTypes[br]=nn},this.self.registerRTLTextPlugin=function(br){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=br.applyArabicShaping,t.plugin.processBidirectionalText=br.processBidirectionalText,t.plugin.processStyledBidirectionalText=br.processStyledBidirectionalText}};return ui.prototype.setReferrer=function(Qt,yr){this.referrer=yr},ui.prototype.setImages=function(Qt,yr,br){this.availableImages[Qt]=yr;for(var nn in this.workerSources[Qt]){var wn=this.workerSources[Qt][nn];for(var Ln in wn)wn[Ln].availableImages=yr}br()},ui.prototype.setLayers=function(Qt,yr,br){this.getLayerIndex(Qt).replace(yr),br()},ui.prototype.updateLayers=function(Qt,yr,br){this.getLayerIndex(Qt).update(yr.layers,yr.removedIds),br()},ui.prototype.loadTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).loadTile(yr,br)},ui.prototype.loadDEMTile=function(Qt,yr,br){this.getDEMWorkerSource(Qt,yr.source).loadTile(yr,br)},ui.prototype.reloadTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).reloadTile(yr,br)},ui.prototype.abortTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).abortTile(yr,br)},ui.prototype.removeTile=function(Qt,yr,br){this.getWorkerSource(Qt,yr.type,yr.source).removeTile(yr,br)},ui.prototype.removeDEMTile=function(Qt,yr){this.getDEMWorkerSource(Qt,yr.source).removeTile(yr)},ui.prototype.removeSource=function(Qt,yr,br){if(!(!this.workerSources[Qt]||!this.workerSources[Qt][yr.type]||!this.workerSources[Qt][yr.type][yr.source])){var nn=this.workerSources[Qt][yr.type][yr.source];delete this.workerSources[Qt][yr.type][yr.source],nn.removeSource!==void 0?nn.removeSource(yr,br):br()}},ui.prototype.loadWorkerSource=function(Qt,yr,br){try{this.self.importScripts(yr.url),br()}catch(nn){br(nn.toString())}},ui.prototype.syncRTLPluginState=function(Qt,yr,br){try{t.plugin.setState(yr);var nn=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&nn!=null){this.self.importScripts(nn);var wn=t.plugin.isParsed(),Ln=wn?void 0:new Error("RTL Text Plugin failed to import scripts from "+nn);br(Ln,wn)}}catch(Fn){br(Fn.toString())}},ui.prototype.getAvailableImages=function(Qt){var yr=this.availableImages[Qt];return yr||(yr=[]),yr},ui.prototype.getLayerIndex=function(Qt){var yr=this.layerIndexes[Qt];return yr||(yr=this.layerIndexes[Qt]=new i),yr},ui.prototype.getWorkerSource=function(Qt,yr,br){var nn=this;if(this.workerSources[Qt]||(this.workerSources[Qt]={}),this.workerSources[Qt][yr]||(this.workerSources[Qt][yr]={}),!this.workerSources[Qt][yr][br]){var wn={send:function(Ln,Fn,va){nn.actor.send(Ln,Fn,va,Qt)}};this.workerSources[Qt][yr][br]=new this.workerSourceTypes[yr](wn,this.getLayerIndex(Qt),this.getAvailableImages(Qt))}return this.workerSources[Qt][yr][br]},ui.prototype.getDEMWorkerSource=function(Qt,yr){return this.demWorkerSources[Qt]||(this.demWorkerSources[Qt]={}),this.demWorkerSources[Qt][yr]||(this.demWorkerSources[Qt][yr]=new E),this.demWorkerSources[Qt][yr]},ui.prototype.enforceCacheSizeLimit=function(Qt,yr){t.enforceCacheSizeLimit(yr)},typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope&&(self.worker=new ui(self)),ui}),P(["./shared"],function(t){var r=t.createCommonjsModule(function(Me){Me.exports?Me.exports=X:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=X,window.mapboxgl.notSupportedReason=ge);function X(Yt){return!ge(Yt)}function ge(Yt){if(!ne())return"not a browser";if(!Se())return"insufficent Array support";if(!Je())return"insufficient Function support";if(!_t())return"insufficient Object support";if(!Tt())return"insufficient JSON support";if(!it())return"insufficient worker support";if(!dt())return"insufficient Uint8ClampedArray support";if(!Lt())return"insufficient ArrayBuffer support";if(!or())return"insufficient Canvas/getImageData support";if(!ur(Yt&&Yt.failIfMajorPerformanceCaveat))return"insufficient WebGL support"}function ne(){return typeof window<"u"&&typeof document<"u"}function Se(){return Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray}function Je(){return Function.prototype&&Function.prototype.bind}function _t(){return Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions}function Tt(){return"JSON"in window&&"parse"in JSON&&"stringify"in JSON}function it(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Yt=new Blob([""],{type:"text/javascript"}),ar=URL.createObjectURL(Yt),tr,Yr;try{Yr=new Worker(ar),tr=!0}catch{tr=!1}return Yr&&Yr.terminate(),URL.revokeObjectURL(ar),tr}function dt(){return"Uint8ClampedArray"in window}function Lt(){return ArrayBuffer.isView}function or(){var Yt=document.createElement("canvas");Yt.width=Yt.height=1;var ar=Yt.getContext("2d");if(!ar)return!1;var tr=ar.getImageData(0,0,1,1);return tr&&tr.width===Yt.width}var er={};function ur(Yt){return er[Yt]===void 0&&(er[Yt]=dr(Yt)),er[Yt]}X.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0};function mr(Yt){var ar=document.createElement("canvas"),tr=Object.create(X.webGLContextAttributes);return tr.failIfMajorPerformanceCaveat=Yt,ar.probablySupportsContext?ar.probablySupportsContext("webgl",tr)||ar.probablySupportsContext("experimental-webgl",tr):ar.supportsContext?ar.supportsContext("webgl",tr)||ar.supportsContext("experimental-webgl",tr):ar.getContext("webgl",tr)||ar.getContext("experimental-webgl",tr)}function dr(Yt){var ar=mr(Yt);if(!ar)return!1;var tr=ar.createShader(ar.VERTEX_SHADER);return!tr||ar.isContextLost()?!1:(ar.shaderSource(tr,"void main() {}"),ar.compileShader(tr),ar.getShaderParameter(tr,ar.COMPILE_STATUS)===!0)}}),a={};a.create=function(Me,X,ge){var ne=t.window.document.createElement(Me);return X!==void 0&&(ne.className=X),ge&&ge.appendChild(ne),ne},a.createNS=function(Me,X){var ge=t.window.document.createElementNS(Me,X);return ge};var l=t.window.document&&t.window.document.documentElement.style;function i(Me){if(!l)return Me[0];for(var X=0;X<Me.length;X++)if(Me[X]in l)return Me[X];return Me[0]}var s=i(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o;a.disableDrag=function(){l&&s&&(o=l[s],l[s]="none")},a.enableDrag=function(){l&&s&&(l[s]=o)};var u=i(["transform","WebkitTransform"]);a.setTransform=function(Me,X){Me.style[u]=X};var d=!1;try{var h=Object.defineProperty({},"passive",{get:function(){d=!0}});t.window.addEventListener("test",h,h),t.window.removeEventListener("test",h,h)}catch{d=!1}a.addEventListener=function(Me,X,ge,ne){ne===void 0&&(ne={}),"passive"in ne&&d?Me.addEventListener(X,ge,ne):Me.addEventListener(X,ge,ne.capture)},a.removeEventListener=function(Me,X,ge,ne){ne===void 0&&(ne={}),"passive"in ne&&d?Me.removeEventListener(X,ge,ne):Me.removeEventListener(X,ge,ne.capture)};var y=function(Me){Me.preventDefault(),Me.stopPropagation(),t.window.removeEventListener("click",y,!0)};a.suppressClick=function(){t.window.addEventListener("click",y,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",y,!0)},0)},a.mousePos=function(Me,X){var ge=Me.getBoundingClientRect();return new t.Point(X.clientX-ge.left-Me.clientLeft,X.clientY-ge.top-Me.clientTop)},a.touchPos=function(Me,X){for(var ge=Me.getBoundingClientRect(),ne=[],Se=0;Se<X.length;Se++)ne.push(new t.Point(X[Se].clientX-ge.left-Me.clientLeft,X[Se].clientY-ge.top-Me.clientTop));return ne},a.mouseButton=function(Me){return typeof t.window.InstallTrigger<"u"&&Me.button===2&&Me.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:Me.button},a.remove=function(Me){Me.parentNode&&Me.parentNode.removeChild(Me)};function m(Me,X,ge){var ne,Se,Je,_t=t.browser.devicePixelRatio>1?"@2x":"",Tt=t.getJSON(X.transformRequest(X.normalizeSpriteURL(Me,_t,".json"),t.ResourceType.SpriteJSON),function(Lt,or){Tt=null,Je||(Je=Lt,ne=or,dt())}),it=t.getImage(X.transformRequest(X.normalizeSpriteURL(Me,_t,".png"),t.ResourceType.SpriteImage),function(Lt,or){it=null,Je||(Je=Lt,Se=or,dt())});function dt(){if(Je)ge(Je);else if(ne&&Se){var Lt=t.browser.getImageData(Se),or={};for(var er in ne){var ur=ne[er],mr=ur.width,dr=ur.height,Yt=ur.x,ar=ur.y,tr=ur.sdf,Yr=ur.pixelRatio,un=ur.stretchX,En=ur.stretchY,Ea=ur.content,fa=new t.RGBAImage({width:mr,height:dr});t.RGBAImage.copy(Lt,fa,{x:Yt,y:ar},{x:0,y:0},{width:mr,height:dr}),or[er]={data:fa,pixelRatio:Yr,sdf:tr,stretchX:un,stretchY:En,content:Ea}}ge(null,or)}}return{cancel:function(){Tt&&(Tt.cancel(),Tt=null),it&&(it.cancel(),it=null)}}}function E(Me){var X=Me.userImage;if(X&&X.render){var ge=X.render();if(ge)return Me.data.replace(new Uint8Array(X.data.buffer)),!0}return!1}var c=1,_=(function(Me){function X(){Me.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.isLoaded=function(){return this.loaded},X.prototype.setLoaded=function(ne){if(this.loaded!==ne&&(this.loaded=ne,ne)){for(var Se=0,Je=this.requestors;Se<Je.length;Se+=1){var _t=Je[Se],Tt=_t.ids,it=_t.callback;this._notify(Tt,it)}this.requestors=[]}},X.prototype.getImage=function(ne){return this.images[ne]},X.prototype.addImage=function(ne,Se){this._validate(ne,Se)&&(this.images[ne]=Se)},X.prototype._validate=function(ne,Se){var Je=!0;return this._validateStretch(Se.stretchX,Se.data&&Se.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "stretchX" value'))),Je=!1),this._validateStretch(Se.stretchY,Se.data&&Se.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "stretchY" value'))),Je=!1),this._validateContent(Se.content,Se)||(this.fire(new t.ErrorEvent(new Error('Image "'+ne+'" has invalid "content" value'))),Je=!1),Je},X.prototype._validateStretch=function(ne,Se){if(!ne)return!0;for(var Je=0,_t=0,Tt=ne;_t<Tt.length;_t+=1){var it=Tt[_t];if(it[0]<Je||it[1]<it[0]||Se<it[1])return!1;Je=it[1]}return!0},X.prototype._validateContent=function(ne,Se){return ne?!(ne.length!==4||ne[0]<0||Se.data.width<ne[0]||ne[1]<0||Se.data.height<ne[1]||ne[2]<0||Se.data.width<ne[2]||ne[3]<0||Se.data.height<ne[3]||ne[2]<ne[0]||ne[3]<ne[1]):!0},X.prototype.updateImage=function(ne,Se){var Je=this.images[ne];Se.version=Je.version+1,this.images[ne]=Se,this.updatedImages[ne]=!0},X.prototype.removeImage=function(ne){var Se=this.images[ne];delete this.images[ne],delete this.patterns[ne],Se.userImage&&Se.userImage.onRemove&&Se.userImage.onRemove()},X.prototype.listImages=function(){return Object.keys(this.images)},X.prototype.getImages=function(ne,Se){var Je=!0;if(!this.isLoaded())for(var _t=0,Tt=ne;_t<Tt.length;_t+=1){var it=Tt[_t];this.images[it]||(Je=!1)}this.isLoaded()||Je?this._notify(ne,Se):this.requestors.push({ids:ne,callback:Se})},X.prototype._notify=function(ne,Se){for(var Je={},_t=0,Tt=ne;_t<Tt.length;_t+=1){var it=Tt[_t];this.images[it]||this.fire(new t.Event("styleimagemissing",{id:it}));var dt=this.images[it];dt?Je[it]={data:dt.data.clone(),pixelRatio:dt.pixelRatio,sdf:dt.sdf,version:dt.version,stretchX:dt.stretchX,stretchY:dt.stretchY,content:dt.content,hasRenderCallback:!!(dt.userImage&&dt.userImage.render)}:t.warnOnce('Image "'+it+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}Se(null,Je)},X.prototype.getPixelSize=function(){var ne=this.atlasImage,Se=ne.width,Je=ne.height;return{width:Se,height:Je}},X.prototype.getPattern=function(ne){var Se=this.patterns[ne],Je=this.getImage(ne);if(!Je)return null;if(Se&&Se.position.version===Je.version)return Se.position;if(Se)Se.position.version=Je.version;else{var _t=Je.data.width+c*2,Tt=Je.data.height+c*2,it={w:_t,h:Tt,x:0,y:0},dt=new t.ImagePosition(it,Je);this.patterns[ne]={bin:it,position:dt}}return this._updatePatternAtlas(),this.patterns[ne].position},X.prototype.bind=function(ne){var Se=ne.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(ne,this.atlasImage,Se.RGBA),this.atlasTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE)},X.prototype._updatePatternAtlas=function(){var ne=[];for(var Se in this.patterns)ne.push(this.patterns[Se].bin);var Je=t.potpack(ne),_t=Je.w,Tt=Je.h,it=this.atlasImage;it.resize({width:_t||1,height:Tt||1});for(var dt in this.patterns){var Lt=this.patterns[dt],or=Lt.bin,er=or.x+c,ur=or.y+c,mr=this.images[dt].data,dr=mr.width,Yt=mr.height;t.RGBAImage.copy(mr,it,{x:0,y:0},{x:er,y:ur},{width:dr,height:Yt}),t.RGBAImage.copy(mr,it,{x:0,y:Yt-1},{x:er,y:ur-1},{width:dr,height:1}),t.RGBAImage.copy(mr,it,{x:0,y:0},{x:er,y:ur+Yt},{width:dr,height:1}),t.RGBAImage.copy(mr,it,{x:dr-1,y:0},{x:er-1,y:ur},{width:1,height:Yt}),t.RGBAImage.copy(mr,it,{x:0,y:0},{x:er+dr,y:ur},{width:1,height:Yt})}this.dirty=!0},X.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},X.prototype.dispatchRenderCallbacks=function(ne){for(var Se=0,Je=ne;Se<Je.length;Se+=1){var _t=Je[Se];if(!this.callbackDispatchedThisFrame[_t]){this.callbackDispatchedThisFrame[_t]=!0;var Tt=this.images[_t],it=E(Tt);it&&this.updateImage(_t,Tt)}}},X})(t.Evented);function T(Me,X,ge,ne,Se){var Je=X*256,_t=Je+255,Tt=ne.transformRequest(ne.normalizeGlyphsURL(ge).replace("{fontstack}",Me).replace("{range}",Je+"-"+_t),t.ResourceType.Glyphs);t.getArrayBuffer(Tt,function(it,dt){if(it)Se(it);else if(dt){for(var Lt={},or=0,er=t.parseGlyphPBF(dt);or<er.length;or+=1){var ur=er[or];Lt[ur.id]=ur}Se(null,Lt)}})}var M=A,k=A,b=1e20;function A(Me,X,ge,ne,Se,Je){this.fontSize=Me||24,this.buffer=X===void 0?3:X,this.cutoff=ne||.25,this.fontFamily=Se||"sans-serif",this.fontWeight=Je||"normal",this.radius=ge||8;var _t=this.size=this.fontSize+this.buffer*2;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=_t,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(_t*_t),this.gridInner=new Float64Array(_t*_t),this.f=new Float64Array(_t),this.d=new Float64Array(_t),this.z=new Float64Array(_t+1),this.v=new Int16Array(_t),this.middle=Math.round(_t/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}A.prototype.draw=function(Me){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(Me,this.buffer,this.middle);for(var X=this.ctx.getImageData(0,0,this.size,this.size),ge=new Uint8ClampedArray(this.size*this.size),ne=0;ne<this.size*this.size;ne++){var Se=X.data[ne*4+3]/255;this.gridOuter[ne]=Se===1?0:Se===0?b:Math.pow(Math.max(0,.5-Se),2),this.gridInner[ne]=Se===1?b:Se===0?0:Math.pow(Math.max(0,Se-.5),2)}for(g(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),g(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),ne=0;ne<this.size*this.size;ne++){var Je=this.gridOuter[ne]-this.gridInner[ne];ge[ne]=Math.max(0,Math.min(255,Math.round(255-255*(Je/this.radius+this.cutoff))))}return ge};function g(Me,X,ge,ne,Se,Je,_t){for(var Tt=0;Tt<X;Tt++){for(var it=0;it<ge;it++)ne[it]=Me[it*X+Tt];for(f(ne,Se,Je,_t,ge),it=0;it<ge;it++)Me[it*X+Tt]=Se[it]}for(it=0;it<ge;it++){for(Tt=0;Tt<X;Tt++)ne[Tt]=Me[it*X+Tt];for(f(ne,Se,Je,_t,X),Tt=0;Tt<X;Tt++)Me[it*X+Tt]=Math.sqrt(Se[Tt])}}function f(Me,X,ge,ne,Se){ge[0]=0,ne[0]=-b,ne[1]=+b;for(var Je=1,_t=0;Je<Se;Je++){for(var Tt=(Me[Je]+Je*Je-(Me[ge[_t]]+ge[_t]*ge[_t]))/(2*Je-2*ge[_t]);Tt<=ne[_t];)_t--,Tt=(Me[Je]+Je*Je-(Me[ge[_t]]+ge[_t]*ge[_t]))/(2*Je-2*ge[_t]);_t++,ge[_t]=Je,ne[_t]=Tt,ne[_t+1]=+b}for(Je=0,_t=0;Je<Se;Je++){for(;ne[_t+1]<Je;)_t++;X[Je]=(Je-ge[_t])*(Je-ge[_t])+Me[ge[_t]]}}M.default=k;var p=function(X,ge){this.requestManager=X,this.localIdeographFontFamily=ge,this.entries={}};p.prototype.setURL=function(X){this.url=X},p.prototype.getGlyphs=function(X,ge){var ne=this,Se=[];for(var Je in X)for(var _t=0,Tt=X[Je];_t<Tt.length;_t+=1){var it=Tt[_t];Se.push({stack:Je,id:it})}t.asyncAll(Se,function(dt,Lt){var or=dt.stack,er=dt.id,ur=ne.entries[or];ur||(ur=ne.entries[or]={glyphs:{},requests:{},ranges:{}});var mr=ur.glyphs[er];if(mr!==void 0){Lt(null,{stack:or,id:er,glyph:mr});return}if(mr=ne._tinySDF(ur,or,er),mr){ur.glyphs[er]=mr,Lt(null,{stack:or,id:er,glyph:mr});return}var dr=Math.floor(er/256);if(dr*256>65535){Lt(new Error("glyphs > 65535 not supported"));return}if(ur.ranges[dr]){Lt(null,{stack:or,id:er,glyph:mr});return}var Yt=ur.requests[dr];Yt||(Yt=ur.requests[dr]=[],p.loadGlyphRange(or,dr,ne.url,ne.requestManager,function(ar,tr){if(tr){for(var Yr in tr)ne._doesCharSupportLocalGlyph(+Yr)||(ur.glyphs[+Yr]=tr[+Yr]);ur.ranges[dr]=!0}for(var un=0,En=Yt;un<En.length;un+=1){var Ea=En[un];Ea(ar,tr)}delete ur.requests[dr]})),Yt.push(function(ar,tr){ar?Lt(ar):tr&&Lt(null,{stack:or,id:er,glyph:tr[er]||null})})},function(dt,Lt){if(dt)ge(dt);else if(Lt){for(var or={},er=0,ur=Lt;er<ur.length;er+=1){var mr=ur[er],dr=mr.stack,Yt=mr.id,ar=mr.glyph;(or[dr]||(or[dr]={}))[Yt]=ar&&{id:ar.id,bitmap:ar.bitmap.clone(),metrics:ar.metrics}}ge(null,or)}})},p.prototype._doesCharSupportLocalGlyph=function(X){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](X)||t.isChar["Hangul Syllables"](X)||t.isChar.Hiragana(X)||t.isChar.Katakana(X))},p.prototype._tinySDF=function(X,ge,ne){var Se=this.localIdeographFontFamily;if(Se&&this._doesCharSupportLocalGlyph(ne)){var Je=X.tinySDF;if(!Je){var _t="400";/bold/i.test(ge)?_t="900":/medium/i.test(ge)?_t="500":/light/i.test(ge)&&(_t="200"),Je=X.tinySDF=new p.TinySDF(24,3,8,.25,Se,_t)}return{id:ne,bitmap:new t.AlphaImage({width:30,height:30},Je.draw(String.fromCharCode(ne))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},p.loadGlyphRange=T,p.TinySDF=M;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(X,ge){return t.sphericalToCartesian(X.expression.evaluate(ge))},x.prototype.interpolate=function(X,ge,ne){return{x:t.number(X.x,ge.x,ne),y:t.number(X.y,ge.y,ne),z:t.number(X.z,ge.z,ne)}};var N=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),D="-transition",B=(function(Me){function X(ge){Me.call(this),this._transitionable=new t.Transitionable(N),this.setLight(ge),this._transitioning=this._transitionable.untransitioned()}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getLight=function(){return this._transitionable.serialize()},X.prototype.setLight=function(ne,Se){if(Se===void 0&&(Se={}),!this._validate(t.validateLight,ne,Se))for(var Je in ne){var _t=ne[Je];t.endsWith(Je,D)?this._transitionable.setTransition(Je.slice(0,-D.length),_t):this._transitionable.setValue(Je,_t)}},X.prototype.updateTransitions=function(ne){this._transitioning=this._transitionable.transitioned(ne,this._transitioning)},X.prototype.hasTransition=function(){return this._transitioning.hasTransition()},X.prototype.recalculate=function(ne){this.properties=this._transitioning.possiblyEvaluate(ne)},X.prototype._validate=function(ne,Se,Je){return Je&&Je.validate===!1?!1:t.emitValidationErrors(this,ne.call(t.validateStyle,t.extend({value:Se,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},X})(t.Evented),U=function(X,ge){this.width=X,this.height=ge,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};U.prototype.getDash=function(X,ge){var ne=X.join(",")+String(ge);return this.dashEntry[ne]||(this.dashEntry[ne]=this.addDash(X,ge)),this.dashEntry[ne]},U.prototype.getDashRanges=function(X,ge,ne){var Se=X.length%2===1,Je=[],_t=Se?-X[X.length-1]*ne:0,Tt=X[0]*ne,it=!0;Je.push({left:_t,right:Tt,isDash:it,zeroLength:X[0]===0});for(var dt=X[0],Lt=1;Lt<X.length;Lt++){it=!it;var or=X[Lt];_t=dt*ne,dt+=or,Tt=dt*ne,Je.push({left:_t,right:Tt,isDash:it,zeroLength:or===0})}return Je},U.prototype.addRoundDash=function(X,ge,ne){for(var Se=ge/2,Je=-ne;Je<=ne;Je++)for(var _t=this.nextRow+ne+Je,Tt=this.width*_t,it=0,dt=X[it],Lt=0;Lt<this.width;Lt++){Lt/dt.right>1&&(dt=X[++it]);var or=Math.abs(Lt-dt.left),er=Math.abs(Lt-dt.right),ur=Math.min(or,er),mr=void 0,dr=Je/ne*(Se+1);if(dt.isDash){var Yt=Se-Math.abs(dr);mr=Math.sqrt(ur*ur+Yt*Yt)}else mr=Se-Math.sqrt(ur*ur+dr*dr);this.data[Tt+Lt]=Math.max(0,Math.min(255,mr+128))}},U.prototype.addRegularDash=function(X){for(var ge=X.length-1;ge>=0;--ge){var ne=X[ge],Se=X[ge+1];ne.zeroLength?X.splice(ge,1):Se&&Se.isDash===ne.isDash&&(Se.left=ne.left,X.splice(ge,1))}var Je=X[0],_t=X[X.length-1];Je.isDash===_t.isDash&&(Je.left=_t.left-this.width,_t.right=Je.right+this.width);for(var Tt=this.width*this.nextRow,it=0,dt=X[it],Lt=0;Lt<this.width;Lt++){Lt/dt.right>1&&(dt=X[++it]);var or=Math.abs(Lt-dt.left),er=Math.abs(Lt-dt.right),ur=Math.min(or,er),mr=dt.isDash?ur:-ur;this.data[Tt+Lt]=Math.max(0,Math.min(255,mr+128))}},U.prototype.addDash=function(X,ge){var ne=ge?7:0,Se=2*ne+1;if(this.nextRow+Se>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var Je=0,_t=0;_t<X.length;_t++)Je+=X[_t];if(Je!==0){var Tt=this.width/Je,it=this.getDashRanges(X,this.width,Tt);ge?this.addRoundDash(it,Tt,ne):this.addRegularDash(it)}var dt={y:(this.nextRow+ne+.5)/this.height,height:2*ne/this.height,width:Je};return this.nextRow+=Se,this.dirty=!0,dt},U.prototype.bind=function(X){var ge=X.gl;this.texture?(ge.bindTexture(ge.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,ge.texSubImage2D(ge.TEXTURE_2D,0,0,0,this.width,this.height,ge.ALPHA,ge.UNSIGNED_BYTE,this.data))):(this.texture=ge.createTexture(),ge.bindTexture(ge.TEXTURE_2D,this.texture),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_WRAP_S,ge.REPEAT),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_WRAP_T,ge.REPEAT),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_MIN_FILTER,ge.LINEAR),ge.texParameteri(ge.TEXTURE_2D,ge.TEXTURE_MAG_FILTER,ge.LINEAR),ge.texImage2D(ge.TEXTURE_2D,0,ge.ALPHA,this.width,this.height,0,ge.ALPHA,ge.UNSIGNED_BYTE,this.data))};var V=function Me(X,ge){this.workerPool=X,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var ne=this.workerPool.acquire(this.id),Se=0;Se<ne.length;Se++){var Je=ne[Se],_t=new Me.Actor(Je,ge,this.id);_t.name="Worker "+Se,this.actors.push(_t)}};V.prototype.broadcast=function(X,ge,ne){ne=ne||function(){},t.asyncAll(this.actors,function(Se,Je){Se.send(X,ge,Je)},ne)},V.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},V.prototype.remove=function(){this.actors.forEach(function(X){X.remove()}),this.actors=[],this.workerPool.release(this.id)},V.Actor=t.Actor;function q(Me,X,ge){var ne=function(Se,Je){if(Se)return ge(Se);if(Je){var _t=t.pick(t.extend(Je,Me),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Je.vector_layers&&(_t.vectorLayers=Je.vector_layers,_t.vectorLayerIds=_t.vectorLayers.map(function(Tt){return Tt.id})),_t.tiles=X.canonicalizeTileset(_t,Me.url),ge(null,_t)}};return Me.url?t.getJSON(X.transformRequest(X.normalizeSourceURL(Me.url),t.ResourceType.Source),ne):t.browser.frame(function(){return ne(null,Me)})}var z=function(X,ge,ne){this.bounds=t.LngLatBounds.convert(this.validateBounds(X)),this.minzoom=ge||0,this.maxzoom=ne||24};z.prototype.validateBounds=function(X){return!Array.isArray(X)||X.length!==4?[-180,-90,180,90]:[Math.max(-180,X[0]),Math.max(-90,X[1]),Math.min(180,X[2]),Math.min(90,X[3])]},z.prototype.contains=function(X){var ge=Math.pow(2,X.z),ne={minX:Math.floor(t.mercatorXfromLng(this.bounds.getWest())*ge),minY:Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*ge),maxX:Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*ge),maxY:Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*ge)},Se=X.x>=ne.minX&&X.x<ne.maxX&&X.y>=ne.minY&&X.y<ne.maxY;return Se};var H=(function(Me){function X(ge,ne,Se,Je){if(Me.call(this),this.id=ge,this.dispatcher=Se,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(ne,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},ne),this._collectResourceTiming=ne.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Je)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=q(this._options,this.map._requestManager,function(Se,Je){ne._tileJSONRequest=null,ne._loaded=!0,Se?ne.fire(new t.ErrorEvent(Se)):Je&&(t.extend(ne,Je),Je.bounds&&(ne.tileBounds=new z(Je.bounds,ne.minzoom,ne.maxzoom)),t.postTurnstileEvent(Je.tiles,ne.map._requestManager._customAccessToken),t.postMapLoadEvent(Je.tiles,ne.map._getMapId(),ne.map._requestManager._skuToken,ne.map._requestManager._customAccessToken),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.hasTile=function(ne){return!this.tileBounds||this.tileBounds.contains(ne.canonical)},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setSourceProperty=function(ne){this._tileJSONRequest&&this._tileJSONRequest.cancel(),ne();var Se=this.map.style.sourceCaches[this.id];Se.clearTiles(),this.load()},X.prototype.setTiles=function(ne){var Se=this;return this.setSourceProperty(function(){Se._options.tiles=ne}),this},X.prototype.setUrl=function(ne){var Se=this;return this.setSourceProperty(function(){Se.url=ne,Se._options.url=ne}),this},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return t.extend({},this._options)},X.prototype.loadTile=function(ne,Se){var Je=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme)),_t={request:this.map._requestManager.transformRequest(Je,t.ResourceType.Tile),uid:ne.uid,tileID:ne.tileID,zoom:ne.tileID.overscaledZ,tileSize:this.tileSize*ne.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};_t.request.collectResourceTiming=this._collectResourceTiming,!ne.actor||ne.state==="expired"?(ne.actor=this.dispatcher.getActor(),ne.request=ne.actor.send("loadTile",_t,Tt.bind(this))):ne.state==="loading"?ne.reloadCallback=Se:ne.request=ne.actor.send("reloadTile",_t,Tt.bind(this));function Tt(it,dt){if(delete ne.request,ne.aborted)return Se(null);if(it&&it.status!==404)return Se(it);dt&&dt.resourceTiming&&(ne.resourceTiming=dt.resourceTiming),this.map._refreshExpiredTiles&&dt&&ne.setExpiryData(dt),ne.loadVectorData(dt,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),Se(null),ne.reloadCallback&&(this.loadTile(ne,ne.reloadCallback),ne.reloadCallback=null)}},X.prototype.abortTile=function(ne){ne.request&&(ne.request.cancel(),delete ne.request),ne.actor&&ne.actor.send("abortTile",{uid:ne.uid,type:this.type,source:this.id},void 0)},X.prototype.unloadTile=function(ne){ne.unloadVectorData(),ne.actor&&ne.actor.send("removeTile",{uid:ne.uid,type:this.type,source:this.id},void 0)},X.prototype.hasTransition=function(){return!1},X})(t.Evented),G=(function(Me){function X(ge,ne,Se,Je){Me.call(this),this.id=ge,this.dispatcher=Se,this.setEventedParent(Je),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},ne),t.extend(this,t.pick(ne,["url","scheme","tileSize"]))}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=q(this._options,this.map._requestManager,function(Se,Je){ne._tileJSONRequest=null,ne._loaded=!0,Se?ne.fire(new t.ErrorEvent(Se)):Je&&(t.extend(ne,Je),Je.bounds&&(ne.tileBounds=new z(Je.bounds,ne.minzoom,ne.maxzoom)),t.postTurnstileEvent(Je.tiles),t.postMapLoadEvent(Je.tiles,ne.map._getMapId(),ne.map._requestManager._skuToken),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),ne.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},X.prototype.loaded=function(){return this._loaded},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},X.prototype.serialize=function(){return t.extend({},this._options)},X.prototype.hasTile=function(ne){return!this.tileBounds||this.tileBounds.contains(ne.canonical)},X.prototype.loadTile=function(ne,Se){var Je=this,_t=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ne.request=t.getImage(this.map._requestManager.transformRequest(_t,t.ResourceType.Tile),function(Tt,it){if(delete ne.request,ne.aborted)ne.state="unloaded",Se(null);else if(Tt)ne.state="errored",Se(Tt);else if(it){Je.map._refreshExpiredTiles&&ne.setExpiryData(it),delete it.cacheControl,delete it.expires;var dt=Je.map.painter.context,Lt=dt.gl;ne.texture=Je.map.painter.getTileTexture(it.width),ne.texture?ne.texture.update(it,{useMipmap:!0}):(ne.texture=new t.Texture(dt,it,Lt.RGBA,{useMipmap:!0}),ne.texture.bind(Lt.LINEAR,Lt.CLAMP_TO_EDGE,Lt.LINEAR_MIPMAP_NEAREST),dt.extTextureFilterAnisotropic&&Lt.texParameterf(Lt.TEXTURE_2D,dt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,dt.extTextureFilterAnisotropicMax)),ne.state="loaded",t.cacheEntryPossiblyAdded(Je.dispatcher),Se(null)}})},X.prototype.abortTile=function(ne,Se){ne.request&&(ne.request.cancel(),delete ne.request),Se()},X.prototype.unloadTile=function(ne,Se){ne.texture&&this.map.painter.saveTileTexture(ne.texture),Se()},X.prototype.hasTransition=function(){return!1},X})(t.Evented),J=(function(Me){function X(ge,ne,Se,Je){Me.call(this,ge,ne,Se,Je),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},ne),this.encoding=ne.encoding||"mapbox"}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},X.prototype.loadTile=function(ne,Se){var Je=this.map._requestManager.normalizeTileURL(ne.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);ne.request=t.getImage(this.map._requestManager.transformRequest(Je,t.ResourceType.Tile),_t.bind(this)),ne.neighboringTiles=this._getNeighboringTiles(ne.tileID);function _t(it,dt){if(delete ne.request,ne.aborted)ne.state="unloaded",Se(null);else if(it)ne.state="errored",Se(it);else if(dt){this.map._refreshExpiredTiles&&ne.setExpiryData(dt),delete dt.cacheControl,delete dt.expires;var Lt=t.window.ImageBitmap&&dt instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported(),or=Lt?dt:t.browser.getImageData(dt,1),er={uid:ne.uid,coord:ne.tileID,source:this.id,rawImageData:or,encoding:this.encoding};(!ne.actor||ne.state==="expired")&&(ne.actor=this.dispatcher.getActor(),ne.actor.send("loadDEMTile",er,Tt.bind(this)))}}function Tt(it,dt){it&&(ne.state="errored",Se(it)),dt&&(ne.dem=dt,ne.needsHillshadePrepare=!0,ne.state="loaded",Se(null))}},X.prototype._getNeighboringTiles=function(ne){var Se=ne.canonical,Je=Math.pow(2,Se.z),_t=(Se.x-1+Je)%Je,Tt=Se.x===0?ne.wrap-1:ne.wrap,it=(Se.x+1+Je)%Je,dt=Se.x+1===Je?ne.wrap+1:ne.wrap,Lt={};return Lt[new t.OverscaledTileID(ne.overscaledZ,Tt,Se.z,_t,Se.y).key]={backfilled:!1},Lt[new t.OverscaledTileID(ne.overscaledZ,dt,Se.z,it,Se.y).key]={backfilled:!1},Se.y>0&&(Lt[new t.OverscaledTileID(ne.overscaledZ,Tt,Se.z,_t,Se.y-1).key]={backfilled:!1},Lt[new t.OverscaledTileID(ne.overscaledZ,ne.wrap,Se.z,Se.x,Se.y-1).key]={backfilled:!1},Lt[new t.OverscaledTileID(ne.overscaledZ,dt,Se.z,it,Se.y-1).key]={backfilled:!1}),Se.y+1<Je&&(Lt[new t.OverscaledTileID(ne.overscaledZ,Tt,Se.z,_t,Se.y+1).key]={backfilled:!1},Lt[new t.OverscaledTileID(ne.overscaledZ,ne.wrap,Se.z,Se.x,Se.y+1).key]={backfilled:!1},Lt[new t.OverscaledTileID(ne.overscaledZ,dt,Se.z,it,Se.y+1).key]={backfilled:!1}),Lt},X.prototype.unloadTile=function(ne){ne.demTexture&&this.map.painter.saveTileTexture(ne.demTexture),ne.fbo&&(ne.fbo.destroy(),delete ne.fbo),ne.dem&&delete ne.dem,delete ne.neighboringTiles,ne.state="unloaded",ne.actor&&ne.actor.send("removeDEMTile",{uid:ne.uid,source:this.id})},X})(G),le=(function(Me){function X(ge,ne,Se,Je){Me.call(this),this.id=ge,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=Se.getActor(),this.setEventedParent(Je),this._data=ne.data,this._options=t.extend({},ne),this._collectResourceTiming=ne.collectResourceTiming,this._resourceTiming=[],ne.maxzoom!==void 0&&(this.maxzoom=ne.maxzoom),ne.type&&(this.type=ne.type),ne.attribution&&(this.attribution=ne.attribution),this.promoteId=ne.promoteId;var _t=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:ne.cluster||!1,geojsonVtOptions:{buffer:(ne.buffer!==void 0?ne.buffer:128)*_t,tolerance:(ne.tolerance!==void 0?ne.tolerance:.375)*_t,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:ne.lineMetrics||!1,generateId:ne.generateId||!1},superclusterOptions:{maxZoom:ne.clusterMaxZoom!==void 0?Math.min(ne.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,minPoints:Math.max(2,ne.clusterMinPoints||2),extent:t.EXTENT,radius:(ne.clusterRadius||50)*_t,log:!1,generateId:ne.generateId||!1},clusterProperties:ne.clusterProperties,filter:ne.filter},ne.workerOptions)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Se){if(Se){ne.fire(new t.ErrorEvent(Se));return}var Je={dataType:"source",sourceDataType:"metadata"};ne._collectResourceTiming&&ne._resourceTiming&&ne._resourceTiming.length>0&&(Je.resourceTiming=ne._resourceTiming,ne._resourceTiming=[]),ne.fire(new t.Event("data",Je))})},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setData=function(ne){var Se=this;return this._data=ne,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Je){if(Je){Se.fire(new t.ErrorEvent(Je));return}var _t={dataType:"source",sourceDataType:"content"};Se._collectResourceTiming&&Se._resourceTiming&&Se._resourceTiming.length>0&&(_t.resourceTiming=Se._resourceTiming,Se._resourceTiming=[]),Se.fire(new t.Event("data",_t))}),this},X.prototype.getClusterExpansionZoom=function(ne,Se){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:ne,source:this.id},Se),this},X.prototype.getClusterChildren=function(ne,Se){return this.actor.send("geojson.getClusterChildren",{clusterId:ne,source:this.id},Se),this},X.prototype.getClusterLeaves=function(ne,Se,Je,_t){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:ne,limit:Se,offset:Je},_t),this},X.prototype._updateWorkerData=function(ne){var Se=this;this._loaded=!1;var Je=t.extend({},this.workerOptions),_t=this._data;typeof _t=="string"?(Je.request=this.map._requestManager.transformRequest(t.browser.resolveURL(_t),t.ResourceType.Source),Je.request.collectResourceTiming=this._collectResourceTiming):Je.data=JSON.stringify(_t),this.actor.send(this.type+".loadData",Je,function(Tt,it){Se._removed||it&&it.abandoned||(Se._loaded=!0,it&&it.resourceTiming&&it.resourceTiming[Se.id]&&(Se._resourceTiming=it.resourceTiming[Se.id].slice(0)),Se.actor.send(Se.type+".coalesce",{source:Je.source},null),ne(Tt))})},X.prototype.loaded=function(){return this._loaded},X.prototype.loadTile=function(ne,Se){var Je=this,_t=ne.actor?"reloadTile":"loadTile";ne.actor=this.actor;var Tt={type:this.type,uid:ne.uid,tileID:ne.tileID,zoom:ne.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};ne.request=this.actor.send(_t,Tt,function(it,dt){return delete ne.request,ne.unloadVectorData(),ne.aborted?Se(null):it?Se(it):(ne.loadVectorData(dt,Je.map.painter,_t==="reloadTile"),Se(null))})},X.prototype.abortTile=function(ne){ne.request&&(ne.request.cancel(),delete ne.request),ne.aborted=!0},X.prototype.unloadTile=function(ne){ne.unloadVectorData(),this.actor.send("removeTile",{uid:ne.uid,type:this.type,source:this.id})},X.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},X.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},X.prototype.hasTransition=function(){return!1},X})(t.Evented),ye=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),de=(function(Me){function X(ge,ne,Se,Je){Me.call(this),this.id=ge,this.dispatcher=Se,this.coordinates=ne.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Je),this.options=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(ne,Se){var Je=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(_t,Tt){Je._loaded=!0,_t?Je.fire(new t.ErrorEvent(_t)):Tt&&(Je.image=Tt,ne&&(Je.coordinates=ne),Se&&Se(),Je._finishLoading())})},X.prototype.loaded=function(){return this._loaded},X.prototype.updateImage=function(ne){var Se=this;return!this.image||!ne.url?this:(this.options.url=ne.url,this.load(ne.coordinates,function(){Se.texture=null}),this)},X.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},X.prototype.onAdd=function(ne){this.map=ne,this.load()},X.prototype.setCoordinates=function(ne){var Se=this;this.coordinates=ne;var Je=ne.map(t.MercatorCoordinate.fromLngLat);this.tileID=me(Je),this.minzoom=this.maxzoom=this.tileID.z;var _t=Je.map(function(Tt){return Se.tileID.getTilePoint(Tt)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(_t[0].x,_t[0].y,0,0),this._boundsArray.emplaceBack(_t[1].x,_t[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(_t[3].x,_t[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(_t[2].x,_t[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},X.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var ne=this.map.painter.context,Se=ne.gl;this.boundsBuffer||(this.boundsBuffer=ne.createVertexBuffer(this._boundsArray,ye.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(ne,this.image,Se.RGBA),this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE));for(var Je in this.tiles){var _t=this.tiles[Je];_t.state!=="loaded"&&(_t.state="loaded",_t.texture=this.texture)}}},X.prototype.loadTile=function(ne,Se){this.tileID&&this.tileID.equals(ne.tileID.canonical)?(this.tiles[String(ne.tileID.wrap)]=ne,ne.buckets={},Se(null)):(ne.state="errored",Se(null))},X.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return!1},X})(t.Evented);function me(Me){for(var X=1/0,ge=1/0,ne=-1/0,Se=-1/0,Je=0,_t=Me;Je<_t.length;Je+=1){var Tt=_t[Je];X=Math.min(X,Tt.x),ge=Math.min(ge,Tt.y),ne=Math.max(ne,Tt.x),Se=Math.max(Se,Tt.y)}var it=ne-X,dt=Se-ge,Lt=Math.max(it,dt),or=Math.max(0,Math.floor(-Math.log(Lt)/Math.LN2)),er=Math.pow(2,or);return new t.CanonicalTileID(or,Math.floor((X+ne)/2*er),Math.floor((ge+Se)/2*er))}var W=(function(Me){function X(ge,ne,Se,Je){Me.call(this,ge,ne,Se,Je),this.roundZoom=!0,this.type="video",this.options=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){var ne=this;this._loaded=!1;var Se=this.options;this.urls=[];for(var Je=0,_t=Se.urls;Je<_t.length;Je+=1){var Tt=_t[Je];this.urls.push(this.map._requestManager.transformRequest(Tt,t.ResourceType.Source).url)}t.getVideo(this.urls,function(it,dt){ne._loaded=!0,it?ne.fire(new t.ErrorEvent(it)):dt&&(ne.video=dt,ne.video.loop=!0,ne.video.addEventListener("playing",function(){ne.map.triggerRepaint()}),ne.map&&ne.video.play(),ne._finishLoading())})},X.prototype.pause=function(){this.video&&this.video.pause()},X.prototype.play=function(){this.video&&this.video.play()},X.prototype.seek=function(ne){if(this.video){var Se=this.video.seekable;ne<Se.start(0)||ne>Se.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+Se.start(0)+" and "+Se.end(0)+"-second mark."))):this.video.currentTime=ne}},X.prototype.getVideo=function(){return this.video},X.prototype.onAdd=function(ne){this.map||(this.map=ne,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},X.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var ne=this.map.painter.context,Se=ne.gl;this.boundsBuffer||(this.boundsBuffer=ne.createVertexBuffer(this._boundsArray,ye.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),Se.texSubImage2D(Se.TEXTURE_2D,0,0,0,Se.RGBA,Se.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(ne,this.video,Se.RGBA),this.texture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE));for(var Je in this.tiles){var _t=this.tiles[Je];_t.state!=="loaded"&&(_t.state="loaded",_t.texture=this.texture)}}},X.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},X.prototype.hasTransition=function(){return this.video&&!this.video.paused},X})(de),ie=(function(Me){function X(ge,ne,Se,Je){Me.call(this,ge,ne,Se,Je),ne.coordinates?(!Array.isArray(ne.coordinates)||ne.coordinates.length!==4||ne.coordinates.some(function(_t){return!Array.isArray(_t)||_t.length!==2||_t.some(function(Tt){return typeof Tt!="number"})}))&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ge,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ge,null,'missing required property "coordinates"'))),ne.animate&&typeof ne.animate!="boolean"&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ge,null,'optional "animate" property must be a boolean value'))),ne.canvas?typeof ne.canvas!="string"&&!(ne.canvas instanceof t.window.HTMLCanvasElement)&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ge,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+ge,null,'missing required property "canvas"'))),this.options=ne,this.animate=ne.animate!==void 0?ne.animate:!0}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},X.prototype.getCanvas=function(){return this.canvas},X.prototype.onAdd=function(ne){this.map=ne,this.load(),this.canvas&&this.animate&&this.play()},X.prototype.onRemove=function(){this.pause()},X.prototype.prepare=function(){var ne=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,ne=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,ne=!0),!this._hasInvalidDimensions()&&Object.keys(this.tiles).length!==0){var Se=this.map.painter.context,Je=Se.gl;this.boundsBuffer||(this.boundsBuffer=Se.createVertexBuffer(this._boundsArray,ye.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(ne||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(Se,this.canvas,Je.RGBA,{premultiply:!0});for(var _t in this.tiles){var Tt=this.tiles[_t];Tt.state!=="loaded"&&(Tt.state="loaded",Tt.texture=this.texture)}}},X.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},X.prototype.hasTransition=function(){return this._playing},X.prototype._hasInvalidDimensions=function(){for(var ne=0,Se=[this.canvas.width,this.canvas.height];ne<Se.length;ne+=1){var Je=Se[ne];if(isNaN(Je)||Je<=0)return!0}return!1},X})(de),se={vector:H,raster:G,"raster-dem":J,geojson:le,video:W,image:de,canvas:ie},ee=function(Me,X,ge,ne){var Se=new se[X.type](Me,X,ge,ne);if(Se.id!==Me)throw new Error("Expected Source id to be "+Me+" instead of "+Se.id);return t.bindAll(["load","abort","unload","serialize","prepare"],Se),Se},pe=function(Me){return se[Me]},oe=function(Me,X){se[Me]=X};function Y(Me,X){var ge=t.identity([]);return t.translate(ge,ge,[1,1,0]),t.scale(ge,ge,[Me.width*.5,Me.height*.5,1]),t.multiply(ge,ge,Me.calculatePosMatrix(X.toUnwrapped()))}function ce(Me,X,ge){if(Me)for(var ne=0,Se=Me;ne<Se.length;ne+=1){var Je=Se[ne],_t=X[Je];if(_t&&_t.source===ge&&_t.type==="fill-extrusion")return!0}else for(var Tt in X){var it=X[Tt];if(it.source===ge&&it.type==="fill-extrusion")return!0}return!1}function ue(Me,X,ge,ne,Se,Je){var _t=ce(Se&&Se.layers,X,Me.id),Tt=Je.maxPitchScaleFactor(),it=Me.tilesIn(ne,Tt,_t);it.sort(ze);for(var dt=[],Lt=0,or=it;Lt<or.length;Lt+=1){var er=or[Lt];dt.push({wrappedTileID:er.tileID.wrapped().key,queryResults:er.tile.queryRenderedFeatures(X,ge,Me._state,er.queryGeometry,er.cameraQueryGeometry,er.scale,Se,Je,Tt,Y(Me.transform,er.tileID))})}var ur=Ge(dt);for(var mr in ur)ur[mr].forEach(function(dr){var Yt=dr.feature,ar=Me.getFeatureState(Yt.layer["source-layer"],Yt.id);Yt.source=Yt.layer.source,Yt.layer["source-layer"]&&(Yt.sourceLayer=Yt.layer["source-layer"]),Yt.state=ar});return ur}function _e(Me,X,ge,ne,Se,Je,_t){for(var Tt={},it=Je.queryRenderedSymbols(ne),dt=[],Lt=0,or=Object.keys(it).map(Number);Lt<or.length;Lt+=1){var er=or[Lt];dt.push(_t[er])}dt.sort(ze);for(var ur=function(){var tr=dr[mr],Yr=tr.featureIndex.lookupSymbolFeatures(it[tr.bucketInstanceId],X,tr.bucketIndex,tr.sourceLayerIndex,Se.filter,Se.layers,Se.availableImages,Me);for(var un in Yr){var En=Tt[un]=Tt[un]||[],Ea=Yr[un];Ea.sort(function(La,Ja){var ka=tr.featureSortOrder;if(ka){var ai=ka.indexOf(La.featureIndex),gi=ka.indexOf(Ja.featureIndex);return gi-ai}else return Ja.featureIndex-La.featureIndex});for(var fa=0,sa=Ea;fa<sa.length;fa+=1){var Ma=sa[fa];En.push(Ma)}}},mr=0,dr=dt;mr<dr.length;mr+=1)ur();var Yt=function(tr){Tt[tr].forEach(function(Yr){var un=Yr.feature,En=Me[tr],Ea=ge[En.source],fa=Ea.getFeatureState(un.layer["source-layer"],un.id);un.source=un.layer.source,un.layer["source-layer"]&&(un.sourceLayer=un.layer["source-layer"]),un.state=fa})};for(var ar in Tt)Yt(ar);return Tt}function Le(Me,X){for(var ge=Me.getRenderableIds().map(function(it){return Me.getTileByID(it)}),ne=[],Se={},Je=0;Je<ge.length;Je++){var _t=ge[Je],Tt=_t.tileID.canonical.key;Se[Tt]||(Se[Tt]=!0,_t.querySourceFeatures(ne,X))}return ne}function ze(Me,X){var ge=Me.tileID,ne=X.tileID;return ge.overscaledZ-ne.overscaledZ||ge.canonical.y-ne.canonical.y||ge.wrap-ne.wrap||ge.canonical.x-ne.canonical.x}function Ge(Me){for(var X={},ge={},ne=0,Se=Me;ne<Se.length;ne+=1){var Je=Se[ne],_t=Je.queryResults,Tt=Je.wrappedTileID,it=ge[Tt]=ge[Tt]||{};for(var dt in _t)for(var Lt=_t[dt],or=it[dt]=it[dt]||{},er=X[dt]=X[dt]||[],ur=0,mr=Lt;ur<mr.length;ur+=1){var dr=mr[ur];or[dr.featureIndex]||(or[dr.featureIndex]=!0,er.push(dr))}}return X}var Ve=function(X,ge){this.max=X,this.onRemove=ge,this.reset()};Ve.prototype.reset=function(){for(var X in this.data)for(var ge=0,ne=this.data[X];ge<ne.length;ge+=1){var Se=ne[ge];Se.timeout&&clearTimeout(Se.timeout),this.onRemove(Se.value)}return this.data={},this.order=[],this},Ve.prototype.add=function(X,ge,ne){var Se=this,Je=X.wrapped().key;this.data[Je]===void 0&&(this.data[Je]=[]);var _t={value:ge,timeout:void 0};if(ne!==void 0&&(_t.timeout=setTimeout(function(){Se.remove(X,_t)},ne)),this.data[Je].push(_t),this.order.push(Je),this.order.length>this.max){var Tt=this._getAndRemoveByKey(this.order[0]);Tt&&this.onRemove(Tt)}return this},Ve.prototype.has=function(X){return X.wrapped().key in this.data},Ve.prototype.getAndRemove=function(X){return this.has(X)?this._getAndRemoveByKey(X.wrapped().key):null},Ve.prototype._getAndRemoveByKey=function(X){var ge=this.data[X].shift();return ge.timeout&&clearTimeout(ge.timeout),this.data[X].length===0&&delete this.data[X],this.order.splice(this.order.indexOf(X),1),ge.value},Ve.prototype.getByKey=function(X){var ge=this.data[X];return ge?ge[0].value:null},Ve.prototype.get=function(X){if(!this.has(X))return null;var ge=this.data[X.wrapped().key][0];return ge.value},Ve.prototype.remove=function(X,ge){if(!this.has(X))return this;var ne=X.wrapped().key,Se=ge===void 0?0:this.data[ne].indexOf(ge),Je=this.data[ne][Se];return this.data[ne].splice(Se,1),Je.timeout&&clearTimeout(Je.timeout),this.data[ne].length===0&&delete this.data[ne],this.onRemove(Je.value),this.order.splice(this.order.indexOf(ne),1),this},Ve.prototype.setMaxSize=function(X){for(this.max=X;this.order.length>this.max;){var ge=this._getAndRemoveByKey(this.order[0]);ge&&this.onRemove(ge)}return this},Ve.prototype.filter=function(X){var ge=[];for(var ne in this.data)for(var Se=0,Je=this.data[ne];Se<Je.length;Se+=1){var _t=Je[Se];X(_t.value)||ge.push(_t)}for(var Tt=0,it=ge;Tt<it.length;Tt+=1){var dt=it[Tt];this.remove(dt.value.tileID,dt)}};var rt=function(X,ge,ne){this.context=X;var Se=X.gl;this.buffer=Se.createBuffer(),this.dynamicDraw=!!ne,this.context.unbindVAO(),X.bindElementBuffer.set(this.buffer),Se.bufferData(Se.ELEMENT_ARRAY_BUFFER,ge.arrayBuffer,this.dynamicDraw?Se.DYNAMIC_DRAW:Se.STATIC_DRAW),this.dynamicDraw||delete ge.arrayBuffer};rt.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},rt.prototype.updateData=function(X){var ge=this.context.gl;this.context.unbindVAO(),this.bind(),ge.bufferSubData(ge.ELEMENT_ARRAY_BUFFER,0,X.arrayBuffer)},rt.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var pt={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},gt=function(X,ge,ne,Se){this.length=ge.length,this.attributes=ne,this.itemSize=ge.bytesPerElement,this.dynamicDraw=Se,this.context=X;var Je=X.gl;this.buffer=Je.createBuffer(),X.bindVertexBuffer.set(this.buffer),Je.bufferData(Je.ARRAY_BUFFER,ge.arrayBuffer,this.dynamicDraw?Je.DYNAMIC_DRAW:Je.STATIC_DRAW),this.dynamicDraw||delete ge.arrayBuffer};gt.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},gt.prototype.updateData=function(X){var ge=this.context.gl;this.bind(),ge.bufferSubData(ge.ARRAY_BUFFER,0,X.arrayBuffer)},gt.prototype.enableAttributes=function(X,ge){for(var ne=0;ne<this.attributes.length;ne++){var Se=this.attributes[ne],Je=ge.attributes[Se.name];Je!==void 0&&X.enableVertexAttribArray(Je)}},gt.prototype.setVertexAttribPointers=function(X,ge,ne){for(var Se=0;Se<this.attributes.length;Se++){var Je=this.attributes[Se],_t=ge.attributes[Je.name];_t!==void 0&&X.vertexAttribPointer(_t,Je.components,X[pt[Je.type]],!1,this.itemSize,Je.offset+this.itemSize*(ne||0))}},gt.prototype.destroy=function(){var X=this.context.gl;this.buffer&&(X.deleteBuffer(this.buffer),delete this.buffer)};var ht=function(X){this.gl=X.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};ht.prototype.get=function(){return this.current},ht.prototype.set=function(X){},ht.prototype.getDefault=function(){return this.default},ht.prototype.setDefault=function(){this.set(this.default)};var lt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return t.Color.transparent},X.prototype.set=function(ne){var Se=this.current;ne.r===Se.r&&ne.g===Se.g&&ne.b===Se.b&&ne.a===Se.a&&!this.dirty||(this.gl.clearColor(ne.r,ne.g,ne.b,ne.a),this.current=ne,this.dirty=!1)},X})(ht),Fe=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 1},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.clearDepth(ne),this.current=ne,this.dirty=!1)},X})(ht),Pe=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.clearStencil(ne),this.current=ne,this.dirty=!1)},X})(ht),be=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return[!0,!0,!0,!0]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&ne[3]===Se[3]&&!this.dirty||(this.gl.colorMask(ne[0],ne[1],ne[2],ne[3]),this.current=ne,this.dirty=!1)},X})(ht),Ye=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.depthMask(ne),this.current=ne,this.dirty=!1)},X})(ht),mt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 255},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.stencilMask(ne),this.current=ne,this.dirty=!1)},X})(ht),bt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},X.prototype.set=function(ne){var Se=this.current;ne.func===Se.func&&ne.ref===Se.ref&&ne.mask===Se.mask&&!this.dirty||(this.gl.stencilFunc(ne.func,ne.ref,ne.mask),this.current=ne,this.dirty=!1)},X})(ht),ft=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[ne.KEEP,ne.KEEP,ne.KEEP]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&!this.dirty||(this.gl.stencilOp(ne[0],ne[1],ne[2]),this.current=ne,this.dirty=!1)},X})(ht),Wt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.STENCIL_TEST):Se.disable(Se.STENCIL_TEST),this.current=ne,this.dirty=!1}},X})(ht),Zt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return[0,1]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&!this.dirty||(this.gl.depthRange(ne[0],ne[1]),this.current=ne,this.dirty=!1)},X})(ht),cr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.DEPTH_TEST):Se.disable(Se.DEPTH_TEST),this.current=ne,this.dirty=!1}},X})(ht),pr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.LESS},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.depthFunc(ne),this.current=ne,this.dirty=!1)},X})(ht),Br=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.BLEND):Se.disable(Se.BLEND),this.current=ne,this.dirty=!1}},X})(ht),Fr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[ne.ONE,ne.ZERO]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&!this.dirty||(this.gl.blendFunc(ne[0],ne[1]),this.current=ne,this.dirty=!1)},X})(ht),cn=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return t.Color.transparent},X.prototype.set=function(ne){var Se=this.current;ne.r===Se.r&&ne.g===Se.g&&ne.b===Se.b&&ne.a===Se.a&&!this.dirty||(this.gl.blendColor(ne.r,ne.g,ne.b,ne.a),this.current=ne,this.dirty=!1)},X})(ht),Nr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.FUNC_ADD},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.blendEquation(ne),this.current=ne,this.dirty=!1)},X})(ht),Jr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;ne?Se.enable(Se.CULL_FACE):Se.disable(Se.CULL_FACE),this.current=ne,this.dirty=!1}},X})(ht),Dt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.BACK},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.cullFace(ne),this.current=ne,this.dirty=!1)},X})(ht),$e=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.CCW},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.frontFace(ne),this.current=ne,this.dirty=!1)},X})(ht),ot=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.useProgram(ne),this.current=ne,this.dirty=!1)},X})(ht),De=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return this.gl.TEXTURE0},X.prototype.set=function(ne){ne===this.current&&!this.dirty||(this.gl.activeTexture(ne),this.current=ne,this.dirty=!1)},X})(ht),Ee=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){var ne=this.gl;return[0,0,ne.drawingBufferWidth,ne.drawingBufferHeight]},X.prototype.set=function(ne){var Se=this.current;ne[0]===Se[0]&&ne[1]===Se[1]&&ne[2]===Se[2]&&ne[3]===Se[3]&&!this.dirty||(this.gl.viewport(ne[0],ne[1],ne[2],ne[3]),this.current=ne,this.dirty=!1)},X})(ht),Ae=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindFramebuffer(Se.FRAMEBUFFER,ne),this.current=ne,this.dirty=!1}},X})(ht),Ie=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindRenderbuffer(Se.RENDERBUFFER,ne),this.current=ne,this.dirty=!1}},X})(ht),tt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindTexture(Se.TEXTURE_2D,ne),this.current=ne,this.dirty=!1}},X})(ht),st=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.bindBuffer(Se.ARRAY_BUFFER,ne),this.current=ne,this.dirty=!1}},X})(ht),Ft=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){var Se=this.gl;Se.bindBuffer(Se.ELEMENT_ARRAY_BUFFER,ne),this.current=ne,this.dirty=!1},X})(ht),Nt=(function(Me){function X(ge){Me.call(this,ge),this.vao=ge.extVertexArrayObject}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X.prototype.set=function(ne){!this.vao||ne===this.current&&!this.dirty||(this.vao.bindVertexArrayOES(ne),this.current=ne,this.dirty=!1)},X})(ht),Xt=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return 4},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_ALIGNMENT,ne),this.current=ne,this.dirty=!1}},X})(ht),lr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ne),this.current=ne,this.dirty=!1}},X})(ht),Rr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return!1},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){var Se=this.gl;Se.pixelStorei(Se.UNPACK_FLIP_Y_WEBGL,ne),this.current=ne,this.dirty=!1}},X})(ht),Mr=(function(Me){function X(ge,ne){Me.call(this,ge),this.context=ge,this.parent=ne}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getDefault=function(){return null},X})(ht),Sr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.setDirty=function(){this.dirty=!0},X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var Se=this.gl;Se.framebufferTexture2D(Se.FRAMEBUFFER,Se.COLOR_ATTACHMENT0,Se.TEXTURE_2D,ne,0),this.current=ne,this.dirty=!1}},X})(Mr),Kr=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.set=function(ne){if(!(ne===this.current&&!this.dirty)){this.context.bindFramebuffer.set(this.parent);var Se=this.gl;Se.framebufferRenderbuffer(Se.FRAMEBUFFER,Se.DEPTH_ATTACHMENT,Se.RENDERBUFFER,ne),this.current=ne,this.dirty=!1}},X})(Mr),qn=function(X,ge,ne,Se){this.context=X,this.width=ge,this.height=ne;var Je=X.gl,_t=this.framebuffer=Je.createFramebuffer();this.colorAttachment=new Sr(X,_t),Se&&(this.depthAttachment=new Kr(X,_t))};qn.prototype.destroy=function(){var X=this.context.gl,ge=this.colorAttachment.get();if(ge&&X.deleteTexture(ge),this.depthAttachment){var ne=this.depthAttachment.get();ne&&X.deleteRenderbuffer(ne)}X.deleteFramebuffer(this.framebuffer)};var ha=519,ia=function(X,ge,ne){this.func=X,this.mask=ge,this.range=ne};ia.ReadOnly=!1,ia.ReadWrite=!0,ia.disabled=new ia(ha,ia.ReadOnly,[0,1]);var xa=519,ba=7680,ea=function(X,ge,ne,Se,Je,_t){this.test=X,this.ref=ge,this.mask=ne,this.fail=Se,this.depthFail=Je,this.pass=_t};ea.disabled=new ea({func:xa,mask:0},0,0,ba,ba,ba);var Za=0,ui=1,_r=771,Qt=function(X,ge,ne){this.blendFunction=X,this.blendColor=ge,this.mask=ne};Qt.Replace=[ui,Za],Qt.disabled=new Qt(Qt.Replace,t.Color.transparent,[!1,!1,!1,!1]),Qt.unblended=new Qt(Qt.Replace,t.Color.transparent,[!0,!0,!0,!0]),Qt.alphaBlended=new Qt([ui,_r],t.Color.transparent,[!0,!0,!0,!0]);var yr=1029,br=2305,nn=function(X,ge,ne){this.enable=X,this.mode=ge,this.frontFace=ne};nn.disabled=new nn(!1,yr,br),nn.backCCW=new nn(!0,yr,br);var wn=function(X){this.gl=X,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new lt(this),this.clearDepth=new Fe(this),this.clearStencil=new Pe(this),this.colorMask=new be(this),this.depthMask=new Ye(this),this.stencilMask=new mt(this),this.stencilFunc=new bt(this),this.stencilOp=new ft(this),this.stencilTest=new Wt(this),this.depthRange=new Zt(this),this.depthTest=new cr(this),this.depthFunc=new pr(this),this.blend=new Br(this),this.blendFunc=new Fr(this),this.blendColor=new cn(this),this.blendEquation=new Nr(this),this.cullFace=new Jr(this),this.cullFaceSide=new Dt(this),this.frontFace=new $e(this),this.program=new ot(this),this.activeTexture=new De(this),this.viewport=new Ee(this),this.bindFramebuffer=new Ae(this),this.bindRenderbuffer=new Ie(this),this.bindTexture=new tt(this),this.bindVertexBuffer=new st(this),this.bindElementBuffer=new Ft(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new Nt(this),this.pixelStoreUnpack=new Xt(this),this.pixelStoreUnpackPremultiplyAlpha=new lr(this),this.pixelStoreUnpackFlipY=new Rr(this),this.extTextureFilterAnisotropic=X.getExtension("EXT_texture_filter_anisotropic")||X.getExtension("MOZ_EXT_texture_filter_anisotropic")||X.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=X.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=X.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(X.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=X.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=X.getExtension("EXT_disjoint_timer_query"),this.maxTextureSize=X.getParameter(X.MAX_TEXTURE_SIZE)};wn.prototype.setDefault=function(){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()},wn.prototype.setDirty=function(){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.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},wn.prototype.createIndexBuffer=function(X,ge){return new rt(this,X,ge)},wn.prototype.createVertexBuffer=function(X,ge,ne){return new gt(this,X,ge,ne)},wn.prototype.createRenderbuffer=function(X,ge,ne){var Se=this.gl,Je=Se.createRenderbuffer();return this.bindRenderbuffer.set(Je),Se.renderbufferStorage(Se.RENDERBUFFER,X,ge,ne),this.bindRenderbuffer.set(null),Je},wn.prototype.createFramebuffer=function(X,ge,ne){return new qn(this,X,ge,ne)},wn.prototype.clear=function(X){var ge=X.color,ne=X.depth,Se=this.gl,Je=0;ge&&(Je|=Se.COLOR_BUFFER_BIT,this.clearColor.set(ge),this.colorMask.set([!0,!0,!0,!0])),typeof ne<"u"&&(Je|=Se.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(ne),this.depthMask.set(!0)),Se.clear(Je)},wn.prototype.setCullFace=function(X){X.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(X.mode),this.frontFace.set(X.frontFace))},wn.prototype.setDepthMode=function(X){X.func===this.gl.ALWAYS&&!X.mask?this.depthTest.set(!1):(this.depthTest.set(!0),this.depthFunc.set(X.func),this.depthMask.set(X.mask),this.depthRange.set(X.range))},wn.prototype.setStencilMode=function(X){X.test.func===this.gl.ALWAYS&&!X.mask?this.stencilTest.set(!1):(this.stencilTest.set(!0),this.stencilMask.set(X.mask),this.stencilOp.set([X.fail,X.depthFail,X.pass]),this.stencilFunc.set({func:X.test.func,ref:X.ref,mask:X.test.mask}))},wn.prototype.setColorMode=function(X){t.deepEqual(X.blendFunction,Qt.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(X.blendFunction),this.blendColor.set(X.blendColor)),this.colorMask.set(X.mask)},wn.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ln=(function(Me){function X(ge,ne,Se){var Je=this;Me.call(this),this.id=ge,this.dispatcher=Se,this.on("data",function(_t){_t.dataType==="source"&&_t.sourceDataType==="metadata"&&(Je._sourceLoaded=!0),Je._sourceLoaded&&!Je._paused&&_t.dataType==="source"&&_t.sourceDataType==="content"&&(Je.reload(),Je.transform&&Je.update(Je.transform))}),this.on("error",function(){Je._sourceErrored=!0}),this._source=ee(ge,ne,Se,this),this._tiles={},this._cache=new Ve(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(ne){this.map=ne,this._maxTileCacheSize=ne?ne._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(ne)},X.prototype.onRemove=function(ne){this._source&&this._source.onRemove&&this._source.onRemove(ne)},X.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var ne in this._tiles){var Se=this._tiles[ne];if(Se.state!=="loaded"&&Se.state!=="errored")return!1}return!0},X.prototype.getSource=function(){return this._source},X.prototype.pause=function(){this._paused=!0},X.prototype.resume=function(){if(this._paused){var ne=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,ne&&this.reload(),this.transform&&this.update(this.transform)}},X.prototype._loadTile=function(ne,Se){return this._source.loadTile(ne,Se)},X.prototype._unloadTile=function(ne){if(this._source.unloadTile)return this._source.unloadTile(ne,function(){})},X.prototype._abortTile=function(ne){if(this._source.abortTile)return this._source.abortTile(ne,function(){})},X.prototype.serialize=function(){return this._source.serialize()},X.prototype.prepare=function(ne){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(var Se in this._tiles){var Je=this._tiles[Se];Je.upload(ne),Je.prepare(this.map.style.imageManager)}},X.prototype.getIds=function(){return t.values(this._tiles).map(function(ne){return ne.tileID}).sort(Fn).map(function(ne){return ne.key})},X.prototype.getRenderableIds=function(ne){var Se=this,Je=[];for(var _t in this._tiles)this._isIdRenderable(_t,ne)&&Je.push(this._tiles[_t]);return ne?Je.sort(function(Tt,it){var dt=Tt.tileID,Lt=it.tileID,or=new t.Point(dt.canonical.x,dt.canonical.y)._rotate(Se.transform.angle),er=new t.Point(Lt.canonical.x,Lt.canonical.y)._rotate(Se.transform.angle);return dt.overscaledZ-Lt.overscaledZ||er.y-or.y||er.x-or.x}).map(function(Tt){return Tt.tileID.key}):Je.map(function(Tt){return Tt.tileID}).sort(Fn).map(function(Tt){return Tt.key})},X.prototype.hasRenderableParent=function(ne){var Se=this.findLoadedParent(ne,0);return Se?this._isIdRenderable(Se.tileID.key):!1},X.prototype._isIdRenderable=function(ne,Se){return this._tiles[ne]&&this._tiles[ne].hasData()&&!this._coveredTiles[ne]&&(Se||!this._tiles[ne].holdingForFade())},X.prototype.reload=function(){if(this._paused){this._shouldReloadOnResume=!0;return}this._cache.reset();for(var ne in this._tiles)this._tiles[ne].state!=="errored"&&this._reloadTile(ne,"reloading")},X.prototype._reloadTile=function(ne,Se){var Je=this._tiles[ne];Je&&(Je.state!=="loading"&&(Je.state=Se),this._loadTile(Je,this._tileLoaded.bind(this,Je,ne,Se)))},X.prototype._tileLoaded=function(ne,Se,Je,_t){if(_t){ne.state="errored",_t.status!==404?this._source.fire(new t.ErrorEvent(_t,{tile:ne})):this.update(this.transform);return}ne.timeAdded=t.browser.now(),Je==="expired"&&(ne.refreshedUponExpiration=!0),this._setTileReloadTimer(Se,ne),this.getSource().type==="raster-dem"&&ne.dem&&this._backfillDEM(ne),this._state.initializeTileState(ne,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:ne,coord:ne.tileID}))},X.prototype._backfillDEM=function(ne){for(var Se=this.getRenderableIds(),Je=0;Je<Se.length;Je++){var _t=Se[Je];if(ne.neighboringTiles&&ne.neighboringTiles[_t]){var Tt=this.getTileByID(_t);it(ne,Tt),it(Tt,ne)}}function it(dt,Lt){dt.needsHillshadePrepare=!0;var or=Lt.tileID.canonical.x-dt.tileID.canonical.x,er=Lt.tileID.canonical.y-dt.tileID.canonical.y,ur=Math.pow(2,dt.tileID.canonical.z),mr=Lt.tileID.key;or===0&&er===0||Math.abs(er)>1||(Math.abs(or)>1&&(Math.abs(or+ur)===1?or+=ur:Math.abs(or-ur)===1&&(or-=ur)),!(!Lt.dem||!dt.dem)&&(dt.dem.backfillBorder(Lt.dem,or,er),dt.neighboringTiles&&dt.neighboringTiles[mr]&&(dt.neighboringTiles[mr].backfilled=!0)))}},X.prototype.getTile=function(ne){return this.getTileByID(ne.key)},X.prototype.getTileByID=function(ne){return this._tiles[ne]},X.prototype._retainLoadedChildren=function(ne,Se,Je,_t){for(var Tt in this._tiles){var it=this._tiles[Tt];if(!(_t[Tt]||!it.hasData()||it.tileID.overscaledZ<=Se||it.tileID.overscaledZ>Je)){for(var dt=it.tileID;it&&it.tileID.overscaledZ>Se+1;){var Lt=it.tileID.scaledTo(it.tileID.overscaledZ-1);it=this._tiles[Lt.key],it&&it.hasData()&&(dt=Lt)}for(var or=dt;or.overscaledZ>Se;)if(or=or.scaledTo(or.overscaledZ-1),ne[or.key]){_t[dt.key]=dt;break}}}},X.prototype.findLoadedParent=function(ne,Se){if(ne.key in this._loadedParentTiles){var Je=this._loadedParentTiles[ne.key];return Je&&Je.tileID.overscaledZ>=Se?Je:null}for(var _t=ne.overscaledZ-1;_t>=Se;_t--){var Tt=ne.scaledTo(_t),it=this._getLoadedTile(Tt);if(it)return it}},X.prototype._getLoadedTile=function(ne){var Se=this._tiles[ne.key];if(Se&&Se.hasData())return Se;var Je=this._cache.getByKey(ne.wrapped().key);return Je},X.prototype.updateCacheSize=function(ne){var Se=Math.ceil(ne.width/this._source.tileSize)+1,Je=Math.ceil(ne.height/this._source.tileSize)+1,_t=Se*Je,Tt=5,it=Math.floor(_t*Tt),dt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,it):it;this._cache.setMaxSize(dt)},X.prototype.handleWrapJump=function(ne){var Se=this._prevLng===void 0?ne:this._prevLng,Je=ne-Se,_t=Je/360,Tt=Math.round(_t);if(this._prevLng=ne,Tt){var it={};for(var dt in this._tiles){var Lt=this._tiles[dt];Lt.tileID=Lt.tileID.unwrapTo(Lt.tileID.wrap+Tt),it[Lt.tileID.key]=Lt}this._tiles=it;for(var or in this._timers)clearTimeout(this._timers[or]),delete this._timers[or];for(var er in this._tiles){var ur=this._tiles[er];this._setTileReloadTimer(er,ur)}}},X.prototype.update=function(ne){var Se=this;if(this.transform=ne,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(ne),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Je;this.used?this._source.tileID?Je=ne.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(La){return new t.OverscaledTileID(La.canonical.z,La.wrap,La.canonical.z,La.canonical.x,La.canonical.y)}):(Je=ne.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(Je=Je.filter(function(La){return Se._source.hasTile(La)}))):Je=[];var _t=ne.coveringZoomLevel(this._source),Tt=Math.max(_t-X.maxOverzooming,this._source.minzoom),it=Math.max(_t+X.maxUnderzooming,this._source.minzoom),dt=this._updateRetainedTiles(Je,_t);if(va(this._source.type)){for(var Lt={},or={},er=Object.keys(dt),ur=0,mr=er;ur<mr.length;ur+=1){var dr=mr[ur],Yt=dt[dr],ar=this._tiles[dr];if(!(!ar||ar.fadeEndTime&&ar.fadeEndTime<=t.browser.now())){var tr=this.findLoadedParent(Yt,Tt);tr&&(this._addTile(tr.tileID),Lt[tr.tileID.key]=tr.tileID),or[dr]=Yt}}this._retainLoadedChildren(or,_t,it,dt);for(var Yr in Lt)dt[Yr]||(this._coveredTiles[Yr]=!0,dt[Yr]=Lt[Yr])}for(var un in dt)this._tiles[un].clearFadeHold();for(var En=t.keysDifference(this._tiles,dt),Ea=0,fa=En;Ea<fa.length;Ea+=1){var sa=fa[Ea],Ma=this._tiles[sa];Ma.hasSymbolBuckets&&!Ma.holdingForFade()?Ma.setHoldDuration(this.map._fadeDuration):(!Ma.hasSymbolBuckets||Ma.symbolFadeFinished())&&this._removeTile(sa)}this._updateLoadedParentTileCache()}},X.prototype.releaseSymbolFadeTiles=function(){for(var ne in this._tiles)this._tiles[ne].holdingForFade()&&this._removeTile(ne)},X.prototype._updateRetainedTiles=function(ne,Se){for(var Je={},_t={},Tt=Math.max(Se-X.maxOverzooming,this._source.minzoom),it=Math.max(Se+X.maxUnderzooming,this._source.minzoom),dt={},Lt=0,or=ne;Lt<or.length;Lt+=1){var er=or[Lt],ur=this._addTile(er);Je[er.key]=er,!ur.hasData()&&Se<this._source.maxzoom&&(dt[er.key]=er)}this._retainLoadedChildren(dt,Se,it,Je);for(var mr=0,dr=ne;mr<dr.length;mr+=1){var Yt=dr[mr],ar=this._tiles[Yt.key];if(!ar.hasData()){if(Se+1>this._source.maxzoom){var tr=Yt.children(this._source.maxzoom)[0],Yr=this.getTile(tr);if(Yr&&Yr.hasData()){Je[tr.key]=tr;continue}}else{var un=Yt.children(this._source.maxzoom);if(Je[un[0].key]&&Je[un[1].key]&&Je[un[2].key]&&Je[un[3].key])continue}for(var En=ar.wasRequested(),Ea=Yt.overscaledZ-1;Ea>=Tt;--Ea){var fa=Yt.scaledTo(Ea);if(_t[fa.key]||(_t[fa.key]=!0,ar=this.getTile(fa),!ar&&En&&(ar=this._addTile(fa)),ar&&(Je[fa.key]=fa,En=ar.wasRequested(),ar.hasData())))break}}}return Je},X.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var ne in this._tiles){for(var Se=[],Je=void 0,_t=this._tiles[ne].tileID;_t.overscaledZ>0;){if(_t.key in this._loadedParentTiles){Je=this._loadedParentTiles[_t.key];break}Se.push(_t.key);var Tt=_t.scaledTo(_t.overscaledZ-1);if(Je=this._getLoadedTile(Tt),Je)break;_t=Tt}for(var it=0,dt=Se;it<dt.length;it+=1){var Lt=dt[it];this._loadedParentTiles[Lt]=Je}}},X.prototype._addTile=function(ne){var Se=this._tiles[ne.key];if(Se)return Se;Se=this._cache.getAndRemove(ne),Se&&(this._setTileReloadTimer(ne.key,Se),Se.tileID=ne,this._state.initializeTileState(Se,this.map?this.map.painter:null),this._cacheTimers[ne.key]&&(clearTimeout(this._cacheTimers[ne.key]),delete this._cacheTimers[ne.key],this._setTileReloadTimer(ne.key,Se)));var Je=!!Se;return Je||(Se=new t.Tile(ne,this._source.tileSize*ne.overscaleFactor()),this._loadTile(Se,this._tileLoaded.bind(this,Se,ne.key,Se.state))),Se?(Se.uses++,this._tiles[ne.key]=Se,Je||this._source.fire(new t.Event("dataloading",{tile:Se,coord:Se.tileID,dataType:"source"})),Se):null},X.prototype._setTileReloadTimer=function(ne,Se){var Je=this;ne in this._timers&&(clearTimeout(this._timers[ne]),delete this._timers[ne]);var _t=Se.getExpiryTimeout();_t&&(this._timers[ne]=setTimeout(function(){Je._reloadTile(ne,"expired"),delete Je._timers[ne]},_t))},X.prototype._removeTile=function(ne){var Se=this._tiles[ne];Se&&(Se.uses--,delete this._tiles[ne],this._timers[ne]&&(clearTimeout(this._timers[ne]),delete this._timers[ne]),!(Se.uses>0)&&(Se.hasData()&&Se.state!=="reloading"?this._cache.add(Se.tileID,Se,Se.getExpiryTimeout()):(Se.aborted=!0,this._abortTile(Se),this._unloadTile(Se))))},X.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var ne in this._tiles)this._removeTile(ne);this._cache.reset()},X.prototype.tilesIn=function(ne,Se,Je){var _t=this,Tt=[],it=this.transform;if(!it)return Tt;for(var dt=Je?it.getCameraQueryGeometry(ne):ne,Lt=ne.map(function(Ea){return it.pointCoordinate(Ea)}),or=dt.map(function(Ea){return it.pointCoordinate(Ea)}),er=this.getIds(),ur=1/0,mr=1/0,dr=-1/0,Yt=-1/0,ar=0,tr=or;ar<tr.length;ar+=1){var Yr=tr[ar];ur=Math.min(ur,Yr.x),mr=Math.min(mr,Yr.y),dr=Math.max(dr,Yr.x),Yt=Math.max(Yt,Yr.y)}for(var un=function(Ea){var fa=_t._tiles[er[Ea]];if(!fa.holdingForFade()){var sa=fa.tileID,Ma=Math.pow(2,it.zoom-fa.tileID.overscaledZ),La=Se*fa.queryPadding*t.EXTENT/fa.tileSize/Ma,Ja=[sa.getTilePoint(new t.MercatorCoordinate(ur,mr)),sa.getTilePoint(new t.MercatorCoordinate(dr,Yt))];if(Ja[0].x-La<t.EXTENT&&Ja[0].y-La<t.EXTENT&&Ja[1].x+La>=0&&Ja[1].y+La>=0){var ka=Lt.map(function(gi){return sa.getTilePoint(gi)}),ai=or.map(function(gi){return sa.getTilePoint(gi)});Tt.push({tile:fa,tileID:sa,queryGeometry:ka,cameraQueryGeometry:ai,scale:Ma})}}},En=0;En<er.length;En++)un(En);return Tt},X.prototype.getVisibleCoordinates=function(ne){for(var Se=this,Je=this.getRenderableIds(ne).map(function(dt){return Se._tiles[dt].tileID}),_t=0,Tt=Je;_t<Tt.length;_t+=1){var it=Tt[_t];it.posMatrix=this.transform.calculatePosMatrix(it.toUnwrapped())}return Je},X.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(va(this._source.type))for(var ne in this._tiles){var Se=this._tiles[ne];if(Se.fadeEndTime!==void 0&&Se.fadeEndTime>=t.browser.now())return!0}return!1},X.prototype.setFeatureState=function(ne,Se,Je){ne=ne||"_geojsonTileLayer",this._state.updateState(ne,Se,Je)},X.prototype.removeFeatureState=function(ne,Se,Je){ne=ne||"_geojsonTileLayer",this._state.removeFeatureState(ne,Se,Je)},X.prototype.getFeatureState=function(ne,Se){return ne=ne||"_geojsonTileLayer",this._state.getState(ne,Se)},X.prototype.setDependencies=function(ne,Se,Je){var _t=this._tiles[ne];_t&&_t.setDependencies(Se,Je)},X.prototype.reloadTilesForDependencies=function(ne,Se){for(var Je in this._tiles){var _t=this._tiles[Je];_t.hasDependency(ne,Se)&&this._reloadTile(Je,"reloading")}this._cache.filter(function(Tt){return!Tt.hasDependency(ne,Se)})},X})(t.Evented);Ln.maxOverzooming=10,Ln.maxUnderzooming=3;function Fn(Me,X){var ge=Math.abs(Me.wrap*2)-+(Me.wrap<0),ne=Math.abs(X.wrap*2)-+(X.wrap<0);return Me.overscaledZ-X.overscaledZ||ne-ge||X.canonical.y-Me.canonical.y||X.canonical.x-Me.canonical.x}function va(Me){return Me==="raster"||Me==="image"||Me==="video"}function Da(){return new t.window.Worker(Rs.workerUrl)}var Pa="mapboxgl_preloaded_worker_pool",Fa=function(){this.active={}};Fa.prototype.acquire=function(X){if(!this.workers)for(this.workers=[];this.workers.length<Fa.workerCount;)this.workers.push(new Da);return this.active[X]=!0,this.workers.slice()},Fa.prototype.release=function(X){delete this.active[X],this.numActive()===0&&(this.workers.forEach(function(ge){ge.terminate()}),this.workers=null)},Fa.prototype.isPreloaded=function(){return!!this.active[Pa]},Fa.prototype.numActive=function(){return Object.keys(this.active).length};var $a=Math.floor(t.browser.hardwareConcurrency/2);Fa.workerCount=Math.max(Math.min($a,6),1);var oa;function zi(){return oa||(oa=new Fa),oa}function Gi(){var Me=zi();Me.acquire(Pa)}function qt(){var Me=oa;Me&&(Me.isPreloaded()&&Me.numActive()===1?(Me.release(Pa),oa=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))}function Ct(Me,X){var ge={};for(var ne in Me)ne!=="ref"&&(ge[ne]=Me[ne]);return t.refProperties.forEach(function(Se){Se in X&&(ge[Se]=X[Se])}),ge}function Ur(Me){Me=Me.slice();for(var X=Object.create(null),ge=0;ge<Me.length;ge++)X[Me[ge].id]=Me[ge];for(var ne=0;ne<Me.length;ne++)"ref"in Me[ne]&&(Me[ne]=Ct(Me[ne],X[Me[ne].ref]));return Me}function Qr(){var Me={},X=t.styleSpec.$version;for(var ge in t.styleSpec.$root){var ne=t.styleSpec.$root[ge];if(ne.required){var Se=null;ge==="version"?Se=X:ne.type==="array"?Se=[]:Se={},Se!=null&&(Me[ge]=Se)}}return Me}var tn={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Xr(Me,X,ge){ge.push({command:tn.addSource,args:[Me,X[Me]]})}function en(Me,X,ge){X.push({command:tn.removeSource,args:[Me]}),ge[Me]=!0}function Tn(Me,X,ge,ne){en(Me,ge,ne),Xr(Me,X,ge)}function hn(Me,X,ge){var ne;for(ne in Me[ge])if(Me[ge].hasOwnProperty(ne)&&ne!=="data"&&!t.deepEqual(Me[ge][ne],X[ge][ne]))return!1;for(ne in X[ge])if(X[ge].hasOwnProperty(ne)&&ne!=="data"&&!t.deepEqual(Me[ge][ne],X[ge][ne]))return!1;return!0}function Rt(Me,X,ge,ne){Me=Me||{},X=X||{};var Se;for(Se in Me)Me.hasOwnProperty(Se)&&(X.hasOwnProperty(Se)||en(Se,ge,ne));for(Se in X)X.hasOwnProperty(Se)&&(Me.hasOwnProperty(Se)?t.deepEqual(Me[Se],X[Se])||(Me[Se].type==="geojson"&&X[Se].type==="geojson"&&hn(Me,X,Se)?ge.push({command:tn.setGeoJSONSourceData,args:[Se,X[Se].data]}):Tn(Se,X,ge,ne)):Xr(Se,X,ge))}function xr(Me,X,ge,ne,Se,Je){Me=Me||{},X=X||{};var _t;for(_t in Me)Me.hasOwnProperty(_t)&&(t.deepEqual(Me[_t],X[_t])||ge.push({command:Je,args:[ne,_t,X[_t],Se]}));for(_t in X)!X.hasOwnProperty(_t)||Me.hasOwnProperty(_t)||t.deepEqual(Me[_t],X[_t])||ge.push({command:Je,args:[ne,_t,X[_t],Se]})}function Wr(Me){return Me.id}function An(Me,X){return Me[X.id]=X,Me}function Xn(Me,X,ge){Me=Me||[],X=X||[];var ne=Me.map(Wr),Se=X.map(Wr),Je=Me.reduce(An,{}),_t=X.reduce(An,{}),Tt=ne.slice(),it=Object.create(null),dt,Lt,or,er,ur,mr,dr;for(dt=0,Lt=0;dt<ne.length;dt++)or=ne[dt],_t.hasOwnProperty(or)?Lt++:(ge.push({command:tn.removeLayer,args:[or]}),Tt.splice(Tt.indexOf(or,Lt),1));for(dt=0,Lt=0;dt<Se.length;dt++)or=Se[Se.length-1-dt],Tt[Tt.length-1-dt]!==or&&(Je.hasOwnProperty(or)?(ge.push({command:tn.removeLayer,args:[or]}),Tt.splice(Tt.lastIndexOf(or,Tt.length-Lt),1)):Lt++,mr=Tt[Tt.length-dt],ge.push({command:tn.addLayer,args:[_t[or],mr]}),Tt.splice(Tt.length-dt,0,or),it[or]=!0);for(dt=0;dt<Se.length;dt++)if(or=Se[dt],er=Je[or],ur=_t[or],!(it[or]||t.deepEqual(er,ur))){if(!t.deepEqual(er.source,ur.source)||!t.deepEqual(er["source-layer"],ur["source-layer"])||!t.deepEqual(er.type,ur.type)){ge.push({command:tn.removeLayer,args:[or]}),mr=Tt[Tt.lastIndexOf(or)+1],ge.push({command:tn.addLayer,args:[ur,mr]});continue}xr(er.layout,ur.layout,ge,or,null,tn.setLayoutProperty),xr(er.paint,ur.paint,ge,or,null,tn.setPaintProperty),t.deepEqual(er.filter,ur.filter)||ge.push({command:tn.setFilter,args:[or,ur.filter]}),(!t.deepEqual(er.minzoom,ur.minzoom)||!t.deepEqual(er.maxzoom,ur.maxzoom))&&ge.push({command:tn.setLayerZoomRange,args:[or,ur.minzoom,ur.maxzoom]});for(dr in er)er.hasOwnProperty(dr)&&(dr==="layout"||dr==="paint"||dr==="filter"||dr==="metadata"||dr==="minzoom"||dr==="maxzoom"||(dr.indexOf("paint.")===0?xr(er[dr],ur[dr],ge,or,dr.slice(6),tn.setPaintProperty):t.deepEqual(er[dr],ur[dr])||ge.push({command:tn.setLayerProperty,args:[or,dr,ur[dr]]})));for(dr in ur)!ur.hasOwnProperty(dr)||er.hasOwnProperty(dr)||dr==="layout"||dr==="paint"||dr==="filter"||dr==="metadata"||dr==="minzoom"||dr==="maxzoom"||(dr.indexOf("paint.")===0?xr(er[dr],ur[dr],ge,or,dr.slice(6),tn.setPaintProperty):t.deepEqual(er[dr],ur[dr])||ge.push({command:tn.setLayerProperty,args:[or,dr,ur[dr]]}))}}function na(Me,X){if(!Me)return[{command:tn.setStyle,args:[X]}];var ge=[];try{if(!t.deepEqual(Me.version,X.version))return[{command:tn.setStyle,args:[X]}];t.deepEqual(Me.center,X.center)||ge.push({command:tn.setCenter,args:[X.center]}),t.deepEqual(Me.zoom,X.zoom)||ge.push({command:tn.setZoom,args:[X.zoom]}),t.deepEqual(Me.bearing,X.bearing)||ge.push({command:tn.setBearing,args:[X.bearing]}),t.deepEqual(Me.pitch,X.pitch)||ge.push({command:tn.setPitch,args:[X.pitch]}),t.deepEqual(Me.sprite,X.sprite)||ge.push({command:tn.setSprite,args:[X.sprite]}),t.deepEqual(Me.glyphs,X.glyphs)||ge.push({command:tn.setGlyphs,args:[X.glyphs]}),t.deepEqual(Me.transition,X.transition)||ge.push({command:tn.setTransition,args:[X.transition]}),t.deepEqual(Me.light,X.light)||ge.push({command:tn.setLight,args:[X.light]});var ne={},Se=[];Rt(Me.sources,X.sources,Se,ne);var Je=[];Me.layers&&Me.layers.forEach(function(_t){ne[_t.source]?ge.push({command:tn.removeLayer,args:[_t.id]}):Je.push(_t)}),ge=ge.concat(Se),Xn(Je,X.layers,ge)}catch(_t){console.warn("Unable to compute style diff:",_t),ge=[{command:tn.setStyle,args:[X]}]}return ge}var ra=function(X,ge){this.reset(X,ge)};ra.prototype.reset=function(X,ge){this.points=X||[],this._distances=[0];for(var ne=1;ne<this.points.length;ne++)this._distances[ne]=this._distances[ne-1]+this.points[ne].dist(this.points[ne-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(ge||0,this.length*.5),this.paddedLength=this.length-this.padding*2},ra.prototype.lerp=function(X){if(this.points.length===1)return this.points[0];X=t.clamp(X,0,1);for(var ge=1,ne=this._distances[ge],Se=X*this.paddedLength+this.padding;ne<Se&&ge<this._distances.length;)ne=this._distances[++ge];var Je=ge-1,_t=this._distances[Je],Tt=ne-_t,it=Tt>0?(Se-_t)/Tt:0;return this.points[Je].mult(1-it).add(this.points[ge].mult(it))};var Sn=function(X,ge,ne){var Se=this.boxCells=[],Je=this.circleCells=[];this.xCellCount=Math.ceil(X/ne),this.yCellCount=Math.ceil(ge/ne);for(var _t=0;_t<this.xCellCount*this.yCellCount;_t++)Se.push([]),Je.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=X,this.height=ge,this.xScale=this.xCellCount/X,this.yScale=this.yCellCount/ge,this.boxUid=0,this.circleUid=0};Sn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Sn.prototype.insert=function(X,ge,ne,Se,Je){this._forEachCell(ge,ne,Se,Je,this._insertBoxCell,this.boxUid++),this.boxKeys.push(X),this.bboxes.push(ge),this.bboxes.push(ne),this.bboxes.push(Se),this.bboxes.push(Je)},Sn.prototype.insertCircle=function(X,ge,ne,Se){this._forEachCell(ge-Se,ne-Se,ge+Se,ne+Se,this._insertCircleCell,this.circleUid++),this.circleKeys.push(X),this.circles.push(ge),this.circles.push(ne),this.circles.push(Se)},Sn.prototype._insertBoxCell=function(X,ge,ne,Se,Je,_t){this.boxCells[Je].push(_t)},Sn.prototype._insertCircleCell=function(X,ge,ne,Se,Je,_t){this.circleCells[Je].push(_t)},Sn.prototype._query=function(X,ge,ne,Se,Je,_t){if(ne<0||X>this.width||Se<0||ge>this.height)return Je?!1:[];var Tt=[];if(X<=0&&ge<=0&&this.width<=ne&&this.height<=Se){if(Je)return!0;for(var it=0;it<this.boxKeys.length;it++)Tt.push({key:this.boxKeys[it],x1:this.bboxes[it*4],y1:this.bboxes[it*4+1],x2:this.bboxes[it*4+2],y2:this.bboxes[it*4+3]});for(var dt=0;dt<this.circleKeys.length;dt++){var Lt=this.circles[dt*3],or=this.circles[dt*3+1],er=this.circles[dt*3+2];Tt.push({key:this.circleKeys[dt],x1:Lt-er,y1:or-er,x2:Lt+er,y2:or+er})}return _t?Tt.filter(_t):Tt}else{var ur={hitTest:Je,seenUids:{box:{},circle:{}}};return this._forEachCell(X,ge,ne,Se,this._queryCell,Tt,ur,_t),Je?Tt.length>0:Tt}},Sn.prototype._queryCircle=function(X,ge,ne,Se,Je){var _t=X-ne,Tt=X+ne,it=ge-ne,dt=ge+ne;if(Tt<0||_t>this.width||dt<0||it>this.height)return Se?!1:[];var Lt=[],or={hitTest:Se,circle:{x:X,y:ge,radius:ne},seenUids:{box:{},circle:{}}};return this._forEachCell(_t,it,Tt,dt,this._queryCellCircle,Lt,or,Je),Se?Lt.length>0:Lt},Sn.prototype.query=function(X,ge,ne,Se,Je){return this._query(X,ge,ne,Se,!1,Je)},Sn.prototype.hitTest=function(X,ge,ne,Se,Je){return this._query(X,ge,ne,Se,!0,Je)},Sn.prototype.hitTestCircle=function(X,ge,ne,Se){return this._queryCircle(X,ge,ne,!0,Se)},Sn.prototype._queryCell=function(X,ge,ne,Se,Je,_t,Tt,it){var dt=Tt.seenUids,Lt=this.boxCells[Je];if(Lt!==null)for(var or=this.bboxes,er=0,ur=Lt;er<ur.length;er+=1){var mr=ur[er];if(!dt.box[mr]){dt.box[mr]=!0;var dr=mr*4;if(X<=or[dr+2]&&ge<=or[dr+3]&&ne>=or[dr+0]&&Se>=or[dr+1]&&(!it||it(this.boxKeys[mr]))){if(Tt.hitTest)return _t.push(!0),!0;_t.push({key:this.boxKeys[mr],x1:or[dr],y1:or[dr+1],x2:or[dr+2],y2:or[dr+3]})}}}var Yt=this.circleCells[Je];if(Yt!==null)for(var ar=this.circles,tr=0,Yr=Yt;tr<Yr.length;tr+=1){var un=Yr[tr];if(!dt.circle[un]){dt.circle[un]=!0;var En=un*3;if(this._circleAndRectCollide(ar[En],ar[En+1],ar[En+2],X,ge,ne,Se)&&(!it||it(this.circleKeys[un]))){if(Tt.hitTest)return _t.push(!0),!0;var Ea=ar[En],fa=ar[En+1],sa=ar[En+2];_t.push({key:this.circleKeys[un],x1:Ea-sa,y1:fa-sa,x2:Ea+sa,y2:fa+sa})}}}},Sn.prototype._queryCellCircle=function(X,ge,ne,Se,Je,_t,Tt,it){var dt=Tt.circle,Lt=Tt.seenUids,or=this.boxCells[Je];if(or!==null)for(var er=this.bboxes,ur=0,mr=or;ur<mr.length;ur+=1){var dr=mr[ur];if(!Lt.box[dr]){Lt.box[dr]=!0;var Yt=dr*4;if(this._circleAndRectCollide(dt.x,dt.y,dt.radius,er[Yt+0],er[Yt+1],er[Yt+2],er[Yt+3])&&(!it||it(this.boxKeys[dr])))return _t.push(!0),!0}}var ar=this.circleCells[Je];if(ar!==null)for(var tr=this.circles,Yr=0,un=ar;Yr<un.length;Yr+=1){var En=un[Yr];if(!Lt.circle[En]){Lt.circle[En]=!0;var Ea=En*3;if(this._circlesCollide(tr[Ea],tr[Ea+1],tr[Ea+2],dt.x,dt.y,dt.radius)&&(!it||it(this.circleKeys[En])))return _t.push(!0),!0}}},Sn.prototype._forEachCell=function(X,ge,ne,Se,Je,_t,Tt,it){for(var dt=this._convertToXCellCoord(X),Lt=this._convertToYCellCoord(ge),or=this._convertToXCellCoord(ne),er=this._convertToYCellCoord(Se),ur=dt;ur<=or;ur++)for(var mr=Lt;mr<=er;mr++){var dr=this.xCellCount*mr+ur;if(Je.call(this,X,ge,ne,Se,dr,_t,Tt,it))return}},Sn.prototype._convertToXCellCoord=function(X){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(X*this.xScale)))},Sn.prototype._convertToYCellCoord=function(X){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(X*this.yScale)))},Sn.prototype._circlesCollide=function(X,ge,ne,Se,Je,_t){var Tt=Se-X,it=Je-ge,dt=ne+_t;return dt*dt>Tt*Tt+it*it},Sn.prototype._circleAndRectCollide=function(X,ge,ne,Se,Je,_t,Tt){var it=(_t-Se)/2,dt=Math.abs(X-(Se+it));if(dt>it+ne)return!1;var Lt=(Tt-Je)/2,or=Math.abs(ge-(Je+Lt));if(or>Lt+ne)return!1;if(dt<=it||or<=Lt)return!0;var er=dt-it,ur=or-Lt;return er*er+ur*ur<=ne*ne};function Wn(Me,X,ge,ne,Se){var Je=t.create();return X?(t.scale(Je,Je,[1/Se,1/Se,1]),ge||t.rotateZ(Je,Je,ne.angle)):t.multiply(Je,ne.labelPlaneMatrix,Me),Je}function Fi(Me,X,ge,ne,Se){if(X){var Je=t.clone(Me);return t.scale(Je,Je,[Se,Se,1]),ge||t.rotateZ(Je,Je,-ne.angle),Je}else return ne.glCoordMatrix}function Ya(Me,X){var ge=[Me.x,Me.y,0,1];hs(ge,ge,X);var ne=ge[3];return{point:new t.Point(ge[0]/ne,ge[1]/ne),signedDistanceFromCamera:ne}}function Wi(Me,X){return .5+.5*(Me/X)}function uo(Me,X){var ge=Me[0]/Me[3],ne=Me[1]/Me[3],Se=ge>=-X[0]&&ge<=X[0]&&ne>=-X[1]&&ne<=X[1];return Se}function Ao(Me,X,ge,ne,Se,Je,_t,Tt){var it=ne?Me.textSizeData:Me.iconSizeData,dt=t.evaluateSizeForZoom(it,ge.transform.zoom),Lt=[256/ge.width*2+1,256/ge.height*2+1],or=ne?Me.text.dynamicLayoutVertexArray:Me.icon.dynamicLayoutVertexArray;or.clear();for(var er=Me.lineVertexArray,ur=ne?Me.text.placedSymbolArray:Me.icon.placedSymbolArray,mr=ge.transform.width/ge.transform.height,dr=!1,Yt=0;Yt<ur.length;Yt++){var ar=ur.get(Yt);if(ar.hidden||ar.writingMode===t.WritingMode.vertical&&!dr){As(ar.numGlyphs,or);continue}dr=!1;var tr=[ar.anchorX,ar.anchorY,0,1];if(t.transformMat4(tr,tr,X),!uo(tr,Lt)){As(ar.numGlyphs,or);continue}var Yr=tr[3],un=Wi(ge.transform.cameraToCenterDistance,Yr),En=t.evaluateSizeForFeature(it,dt,ar),Ea=_t?En/un:En*un,fa=new t.Point(ar.anchorX,ar.anchorY),sa=Ya(fa,Se).point,Ma={},La=Ri(ar,Ea,!1,Tt,X,Se,Je,Me.glyphOffsetArray,er,or,sa,fa,Ma,mr);dr=La.useVertical,(La.notEnoughRoom||dr||La.needsFlipping&&Ri(ar,Ea,!0,Tt,X,Se,Je,Me.glyphOffsetArray,er,or,sa,fa,Ma,mr).notEnoughRoom)&&As(ar.numGlyphs,or)}ne?Me.text.dynamicLayoutVertexBuffer.updateData(or):Me.icon.dynamicLayoutVertexBuffer.updateData(or)}function wo(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt){var or=Tt.glyphStartIndex+Tt.numGlyphs,er=Tt.lineStartIndex,ur=Tt.lineStartIndex+Tt.lineLength,mr=X.getoffsetX(Tt.glyphStartIndex),dr=X.getoffsetX(or-1),Yt=as(Me*mr,ge,ne,Se,Je,_t,Tt.segment,er,ur,it,dt,Lt);if(!Yt)return null;var ar=as(Me*dr,ge,ne,Se,Je,_t,Tt.segment,er,ur,it,dt,Lt);return ar?{first:Yt,last:ar}:null}function Uo(Me,X,ge,ne){if(Me===t.WritingMode.horizontal){var Se=Math.abs(ge.y-X.y),Je=Math.abs(ge.x-X.x)*ne;if(Se>Je)return{useVertical:!0}}return(Me===t.WritingMode.vertical?X.y<ge.y:X.x>ge.x)?{needsFlipping:!0}:null}function Ri(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or,er,ur){var mr=X/24,dr=Me.lineOffsetX*mr,Yt=Me.lineOffsetY*mr,ar;if(Me.numGlyphs>1){var tr=Me.glyphStartIndex+Me.numGlyphs,Yr=Me.lineStartIndex,un=Me.lineStartIndex+Me.lineLength,En=wo(mr,Tt,dr,Yt,ge,Lt,or,Me,it,Je,er);if(!En)return{notEnoughRoom:!0};var Ea=Ya(En.first.point,_t).point,fa=Ya(En.last.point,_t).point;if(ne&&!ge){var sa=Uo(Me.writingMode,Ea,fa,ur);if(sa)return sa}ar=[En.first];for(var Ma=Me.glyphStartIndex+1;Ma<tr-1;Ma++)ar.push(as(mr*Tt.getoffsetX(Ma),dr,Yt,ge,Lt,or,Me.segment,Yr,un,it,Je,er));ar.push(En.last)}else{if(ne&&!ge){var La=Ya(or,Se).point,Ja=Me.lineStartIndex+Me.segment+1,ka=new t.Point(it.getx(Ja),it.gety(Ja)),ai=Ya(ka,Se),gi=ai.signedDistanceFromCamera>0?ai.point:ps(or,ka,La,1,Se),Vi=Uo(Me.writingMode,La,gi,ur);if(Vi)return Vi}var oo=as(mr*Tt.getoffsetX(Me.glyphStartIndex),dr,Yt,ge,Lt,or,Me.segment,Me.lineStartIndex,Me.lineStartIndex+Me.lineLength,it,Je,er);if(!oo)return{notEnoughRoom:!0};ar=[oo]}for(var Is=0,Cs=ar;Is<Cs.length;Is+=1){var Sl=Cs[Is];t.addDynamicAttributes(dt,Sl.point,Sl.angle)}return{}}function ps(Me,X,ge,ne,Se){var Je=Ya(Me.add(Me.sub(X)._unit()),Se).point,_t=ge.sub(Je);return ge.add(_t._mult(ne/_t.mag()))}function as(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or){var er=ne?Me-X:Me+X,ur=er>0?1:-1,mr=0;ne&&(ur*=-1,mr=Math.PI),ur<0&&(mr+=Math.PI);for(var dr=ur>0?Tt+_t:Tt+_t+1,Yt=Se,ar=Se,tr=0,Yr=0,un=Math.abs(er),En=[];tr+Yr<=un;){if(dr+=ur,dr<Tt||dr>=it)return null;if(ar=Yt,En.push(Yt),Yt=or[dr],Yt===void 0){var Ea=new t.Point(dt.getx(dr),dt.gety(dr)),fa=Ya(Ea,Lt);if(fa.signedDistanceFromCamera>0)Yt=or[dr]=fa.point;else{var sa=dr-ur,Ma=tr===0?Je:new t.Point(dt.getx(sa),dt.gety(sa));Yt=ps(Ma,Ea,ar,un-tr+1,Lt)}}tr+=Yr,Yr=ar.dist(Yt)}var La=(un-tr)/Yr,Ja=Yt.sub(ar),ka=Ja.mult(La)._add(ar);ka._add(Ja._unit()._perp()._mult(ge*ur));var ai=mr+Math.atan2(Yt.y-ar.y,Yt.x-ar.x);return En.push(ka),{point:ka,angle:ai,path:En}}var el=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function As(Me,X){for(var ge=0;ge<Me;ge++){var ne=X.length;X.resize(ne+4),X.float32.set(el,ne*3)}}function hs(Me,X,ge){var ne=X[0],Se=X[1];return Me[0]=ge[0]*ne+ge[4]*Se+ge[12],Me[1]=ge[1]*ne+ge[5]*Se+ge[13],Me[3]=ge[3]*ne+ge[7]*Se+ge[15],Me}var es=100,tl=function(X,ge,ne){ge===void 0&&(ge=new Sn(X.width+2*es,X.height+2*es,25)),ne===void 0&&(ne=new Sn(X.width+2*es,X.height+2*es,25)),this.transform=X,this.grid=ge,this.ignoredGrid=ne,this.pitchfactor=Math.cos(X._pitch)*X.cameraToCenterDistance,this.screenRightBoundary=X.width+es,this.screenBottomBoundary=X.height+es,this.gridRightBoundary=X.width+2*es,this.gridBottomBoundary=X.height+2*es};tl.prototype.placeCollisionBox=function(X,ge,ne,Se,Je){var _t=this.projectAndGetPerspectiveRatio(Se,X.anchorPointX,X.anchorPointY),Tt=ne*_t.perspectiveRatio,it=X.x1*Tt+_t.point.x,dt=X.y1*Tt+_t.point.y,Lt=X.x2*Tt+_t.point.x,or=X.y2*Tt+_t.point.y;return!this.isInsideGrid(it,dt,Lt,or)||!ge&&this.grid.hitTest(it,dt,Lt,or,Je)?{box:[],offscreen:!1}:{box:[it,dt,Lt,or],offscreen:this.isOffscreen(it,dt,Lt,or)}},tl.prototype.placeCollisionCircles=function(X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or,er,ur){var mr=[],dr=new t.Point(ge.anchorX,ge.anchorY),Yt=Ya(dr,_t),ar=Wi(this.transform.cameraToCenterDistance,Yt.signedDistanceFromCamera),tr=Lt?Je/ar:Je*ar,Yr=tr/t.ONE_EM,un=Ya(dr,Tt).point,En={},Ea=ge.lineOffsetX*Yr,fa=ge.lineOffsetY*Yr,sa=wo(Yr,Se,Ea,fa,!1,un,dr,ge,ne,Tt,En),Ma=!1,La=!1,Ja=!0;if(sa){for(var ka=er*.5*ar+ur,ai=new t.Point(-es,-es),gi=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),Vi=new ra,oo=sa.first,Is=sa.last,Cs=[],Sl=oo.path.length-1;Sl>=1;Sl--)Cs.push(oo.path[Sl]);for(var xl=1;xl<Is.path.length;xl++)Cs.push(Is.path[xl]);var Cl=ka*2.5;if(it){var El=Cs.map(function(Mp){return Ya(Mp,it)});El.some(function(Mp){return Mp.signedDistanceFromCamera<=0})?Cs=[]:Cs=El.map(function(Mp){return Mp.point})}var lc=[];if(Cs.length>0){for(var vl=Cs[0].clone(),Eu=Cs[0].clone(),sh=1;sh<Cs.length;sh++)vl.x=Math.min(vl.x,Cs[sh].x),vl.y=Math.min(vl.y,Cs[sh].y),Eu.x=Math.max(Eu.x,Cs[sh].x),Eu.y=Math.max(Eu.y,Cs[sh].y);vl.x>=ai.x&&Eu.x<=gi.x&&vl.y>=ai.y&&Eu.y<=gi.y?lc=[Cs]:Eu.x<ai.x||vl.x>gi.x||Eu.y<ai.y||vl.y>gi.y?lc=[]:lc=t.clipLine([Cs],ai.x,ai.y,gi.x,gi.y)}for(var Bh=0,Ap=lc;Bh<Ap.length;Bh+=1){var Sp=Ap[Bh];Vi.reset(Sp,ka*.25);var Av=0;Vi.length<=.5*ka?Av=1:Av=Math.ceil(Vi.paddedLength/Cl)+1;for(var Jp=0;Jp<Av;Jp++){var ry=Jp/Math.max(Av-1,1),hm=Vi.lerp(ry),Sv=hm.x+es,dm=hm.y+es;mr.push(Sv,dm,ka,0);var Hv=Sv-ka,Ev=dm-ka,Ep=Sv+ka,Qp=dm+ka;if(Ja=Ja&&this.isOffscreen(Hv,Ev,Ep,Qp),La=La||this.isInsideGrid(Hv,Ev,Ep,Qp),!X&&this.grid.hitTestCircle(Sv,dm,ka,or)&&(Ma=!0,!dt))return{circles:[],offscreen:!1,collisionDetected:Ma}}}}return{circles:!dt&&Ma||!La?[]:mr,offscreen:Ja,collisionDetected:Ma}},tl.prototype.queryRenderedSymbols=function(X){if(X.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};for(var ge=[],ne=1/0,Se=1/0,Je=-1/0,_t=-1/0,Tt=0,it=X;Tt<it.length;Tt+=1){var dt=it[Tt],Lt=new t.Point(dt.x+es,dt.y+es);ne=Math.min(ne,Lt.x),Se=Math.min(Se,Lt.y),Je=Math.max(Je,Lt.x),_t=Math.max(_t,Lt.y),ge.push(Lt)}for(var or=this.grid.query(ne,Se,Je,_t).concat(this.ignoredGrid.query(ne,Se,Je,_t)),er={},ur={},mr=0,dr=or;mr<dr.length;mr+=1){var Yt=dr[mr],ar=Yt.key;if(er[ar.bucketInstanceId]===void 0&&(er[ar.bucketInstanceId]={}),!er[ar.bucketInstanceId][ar.featureIndex]){var tr=[new t.Point(Yt.x1,Yt.y1),new t.Point(Yt.x2,Yt.y1),new t.Point(Yt.x2,Yt.y2),new t.Point(Yt.x1,Yt.y2)];t.polygonIntersectsPolygon(ge,tr)&&(er[ar.bucketInstanceId][ar.featureIndex]=!0,ur[ar.bucketInstanceId]===void 0&&(ur[ar.bucketInstanceId]=[]),ur[ar.bucketInstanceId].push(ar.featureIndex))}}return ur},tl.prototype.insertCollisionBox=function(X,ge,ne,Se,Je){var _t=ge?this.ignoredGrid:this.grid,Tt={bucketInstanceId:ne,featureIndex:Se,collisionGroupID:Je};_t.insert(Tt,X[0],X[1],X[2],X[3])},tl.prototype.insertCollisionCircles=function(X,ge,ne,Se,Je){for(var _t=ge?this.ignoredGrid:this.grid,Tt={bucketInstanceId:ne,featureIndex:Se,collisionGroupID:Je},it=0;it<X.length;it+=4)_t.insertCircle(Tt,X[it],X[it+1],X[it+2])},tl.prototype.projectAndGetPerspectiveRatio=function(X,ge,ne){var Se=[ge,ne,0,1];hs(Se,Se,X);var Je=new t.Point((Se[0]/Se[3]+1)/2*this.transform.width+es,(-Se[1]/Se[3]+1)/2*this.transform.height+es);return{point:Je,perspectiveRatio:.5+.5*(this.transform.cameraToCenterDistance/Se[3])}},tl.prototype.isOffscreen=function(X,ge,ne,Se){return ne<es||X>=this.screenRightBoundary||Se<es||ge>this.screenBottomBoundary},tl.prototype.isInsideGrid=function(X,ge,ne,Se){return ne>=0&&X<this.gridRightBoundary&&Se>=0&&ge<this.gridBottomBoundary},tl.prototype.getViewportMatrix=function(){var X=t.identity([]);return t.translate(X,X,[-es,-es,0]),X};function Ks(Me,X,ge){return X*(t.EXTENT/(Me.tileSize*Math.pow(2,ge-Me.tileID.overscaledZ)))}var pl=function(X,ge,ne,Se){X?this.opacity=Math.max(0,Math.min(1,X.opacity+(X.placed?ge:-ge))):this.opacity=Se&&ne?1:0,this.placed=ne};pl.prototype.isHidden=function(){return this.opacity===0&&!this.placed};var Ss=function(X,ge,ne,Se,Je){this.text=new pl(X?X.text:null,ge,ne,Je),this.icon=new pl(X?X.icon:null,ge,Se,Je)};Ss.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var ls=function(X,ge,ne){this.text=X,this.icon=ge,this.skipFade=ne},Lo=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},Es=function(X,ge,ne,Se,Je){this.bucketInstanceId=X,this.featureIndex=ge,this.sourceLayerIndex=ne,this.bucketIndex=Se,this.tileID=Je},ml=function(X){this.crossSourceCollisions=X,this.maxGroupID=0,this.collisionGroups={}};ml.prototype.get=function(X){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[X]){var ge=++this.maxGroupID;this.collisionGroups[X]={ID:ge,predicate:function(ne){return ne.collisionGroupID===ge}}}return this.collisionGroups[X]};function zl(Me,X,ge,ne,Se){var Je=t.getAnchorAlignment(Me),_t=Je.horizontalAlign,Tt=Je.verticalAlign,it=-(_t-.5)*X,dt=-(Tt-.5)*ge,Lt=t.evaluateVariableOffset(Me,ne);return new t.Point(it+Lt[0]*Se,dt+Lt[1]*Se)}function Bl(Me,X,ge,ne,Se,Je){var _t=Me.x1,Tt=Me.x2,it=Me.y1,dt=Me.y2,Lt=Me.anchorPointX,or=Me.anchorPointY,er=new t.Point(X,ge);return ne&&er._rotate(Se?Je:-Je),{x1:_t+er.x,y1:it+er.y,x2:Tt+er.x,y2:dt+er.y,anchorPointX:Lt,anchorPointY:or}}var Fs=function(X,ge,ne,Se){this.transform=X.clone(),this.collisionIndex=new tl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ge,this.retainedQueryData={},this.collisionGroups=new ml(ne),this.collisionCircleArrays={},this.prevPlacement=Se,Se&&(Se.prevPlacement=void 0),this.placedOrientations={}};Fs.prototype.getBucketParts=function(X,ge,ne,Se){var Je=ne.getBucket(ge),_t=ne.latestFeatureIndex;if(!(!Je||!_t||ge.id!==Je.layerIds[0])){var Tt=ne.collisionBoxArray,it=Je.layers[0].layout,dt=Math.pow(2,this.transform.zoom-ne.tileID.overscaledZ),Lt=ne.tileSize/t.EXTENT,or=this.transform.calculatePosMatrix(ne.tileID.toUnwrapped()),er=it.get("text-pitch-alignment")==="map",ur=it.get("text-rotation-alignment")==="map",mr=Ks(ne,1,this.transform.zoom),dr=Wn(or,er,ur,this.transform,mr),Yt=null;if(er){var ar=Fi(or,er,ur,this.transform,mr);Yt=t.multiply([],this.transform.labelPlaneMatrix,ar)}this.retainedQueryData[Je.bucketInstanceId]=new Es(Je.bucketInstanceId,_t,Je.sourceLayerIndex,Je.index,ne.tileID);var tr={bucket:Je,layout:it,posMatrix:or,textLabelPlaneMatrix:dr,labelToScreenMatrix:Yt,scale:dt,textPixelRatio:Lt,holdingForFade:ne.holdingForFade(),collisionBoxArray:Tt,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(Je.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Je.sourceID)};if(Se)for(var Yr=0,un=Je.sortKeyRanges;Yr<un.length;Yr+=1){var En=un[Yr],Ea=En.sortKey,fa=En.symbolInstanceStart,sa=En.symbolInstanceEnd;X.push({sortKey:Ea,symbolInstanceStart:fa,symbolInstanceEnd:sa,parameters:tr})}else X.push({symbolInstanceStart:0,symbolInstanceEnd:Je.symbolInstances.length,parameters:tr})}},Fs.prototype.attemptAnchorPlacement=function(X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or,er,ur,mr,dr){var Yt=[er.textOffset0,er.textOffset1],ar=zl(X,ne,Se,Yt,Je),tr=this.collisionIndex.placeCollisionBox(Bl(ge,ar.x,ar.y,_t,Tt,this.transform.angle),or,it,dt,Lt.predicate);if(dr){var Yr=this.collisionIndex.placeCollisionBox(Bl(dr,ar.x,ar.y,_t,Tt,this.transform.angle),or,it,dt,Lt.predicate);if(Yr.box.length===0)return}if(tr.box.length>0){var un;return this.prevPlacement&&this.prevPlacement.variableOffsets[er.crossTileID]&&this.prevPlacement.placements[er.crossTileID]&&this.prevPlacement.placements[er.crossTileID].text&&(un=this.prevPlacement.variableOffsets[er.crossTileID].anchor),this.variableOffsets[er.crossTileID]={textOffset:Yt,width:ne,height:Se,anchor:X,textBoxScale:Je,prevAnchor:un},this.markUsedJustification(ur,X,er,mr),ur.allowVerticalPlacement&&(this.markUsedOrientation(ur,mr,er),this.placedOrientations[er.crossTileID]=mr),{shift:ar,placedGlyphBoxes:tr}}},Fs.prototype.placeLayerBucketPart=function(X,ge,ne){var Se=this,Je=X.parameters,_t=Je.bucket,Tt=Je.layout,it=Je.posMatrix,dt=Je.textLabelPlaneMatrix,Lt=Je.labelToScreenMatrix,or=Je.textPixelRatio,er=Je.holdingForFade,ur=Je.collisionBoxArray,mr=Je.partiallyEvaluatedTextSize,dr=Je.collisionGroup,Yt=Tt.get("text-optional"),ar=Tt.get("icon-optional"),tr=Tt.get("text-allow-overlap"),Yr=Tt.get("icon-allow-overlap"),un=Tt.get("text-rotation-alignment")==="map",En=Tt.get("text-pitch-alignment")==="map",Ea=Tt.get("icon-text-fit")!=="none",fa=Tt.get("symbol-z-order")==="viewport-y",sa=tr&&(Yr||!_t.hasIconData()||ar),Ma=Yr&&(tr||!_t.hasTextData()||Yt);!_t.collisionArrays&&ur&&_t.deserializeCollisionBoxes(ur);var La=function(oo,Is){if(!ge[oo.crossTileID]){if(er){Se.placements[oo.crossTileID]=new ls(!1,!1,!1);return}var Cs=!1,Sl=!1,xl=!0,Cl=null,El={box:null,offscreen:null},lc={box:null},vl=null,Eu=null,sh=null,Bh=0,Ap=0,Sp=0;Is.textFeatureIndex?Bh=Is.textFeatureIndex:oo.useRuntimeCollisionCircles&&(Bh=oo.featureIndex),Is.verticalTextFeatureIndex&&(Ap=Is.verticalTextFeatureIndex);var Av=Is.textBox;if(Av){var Jp=function(Cf){var xc=t.WritingMode.horizontal;if(_t.allowVerticalPlacement&&!Cf&&Se.prevPlacement){var Mv=Se.prevPlacement.placedOrientations[oo.crossTileID];Mv&&(Se.placedOrientations[oo.crossTileID]=Mv,xc=Mv,Se.markUsedOrientation(_t,xc,oo))}return xc},ry=function(Cf,xc){if(_t.allowVerticalPlacement&&oo.numVerticalGlyphVertices>0&&Is.verticalTextBox)for(var Mv=0,l1=_t.writingModes;Mv<l1.length;Mv+=1){var O_=l1[Mv];if(O_===t.WritingMode.vertical?(El=xc(),lc=El):El=Cf(),El&&El.box&&El.box.length)break}else El=Cf()};if(Tt.get("text-variable-anchor")){var Hv=Tt.get("text-variable-anchor");if(Se.prevPlacement&&Se.prevPlacement.variableOffsets[oo.crossTileID]){var Ev=Se.prevPlacement.variableOffsets[oo.crossTileID];Hv.indexOf(Ev.anchor)>0&&(Hv=Hv.filter(function(Cf){return Cf!==Ev.anchor}),Hv.unshift(Ev.anchor))}var Ep=function(Cf,xc,Mv){for(var l1=Cf.x2-Cf.x1,O_=Cf.y2-Cf.y1,Rc=oo.textBoxScale,Bb=Ea&&!Yr?xc:null,rg={box:[],offscreen:!1},_3=tr?Hv.length*2:Hv.length,Cp=0;Cp<_3;++Cp){var ng=Hv[Cp%Hv.length],x3=Cp>=Hv.length,jb=Se.attemptAnchorPlacement(ng,Cf,l1,O_,Rc,un,En,or,it,dr,x3,oo,_t,Mv,Bb);if(jb&&(rg=jb.placedGlyphBoxes,rg&&rg.box&&rg.box.length)){Cs=!0,Cl=jb.shift;break}}return rg},Qp=function(){return Ep(Av,Is.iconBox,t.WritingMode.horizontal)},Mp=function(){var Cf=Is.verticalTextBox,xc=El&&El.box&&El.box.length;return _t.allowVerticalPlacement&&!xc&&oo.numVerticalGlyphVertices>0&&Cf?Ep(Cf,Is.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}};ry(Qp,Mp),El&&(Cs=El.box,xl=El.offscreen);var i1=Jp(El&&El.box);if(!Cs&&Se.prevPlacement){var ny=Se.prevPlacement.variableOffsets[oo.crossTileID];ny&&(Se.variableOffsets[oo.crossTileID]=ny,Se.markUsedJustification(_t,ny.anchor,oo,i1))}}else{var hm=function(Cf,xc){var Mv=Se.collisionIndex.placeCollisionBox(Cf,tr,or,it,dr.predicate);return Mv&&Mv.box&&Mv.box.length&&(Se.markUsedOrientation(_t,xc,oo),Se.placedOrientations[oo.crossTileID]=xc),Mv},Sv=function(){return hm(Av,t.WritingMode.horizontal)},dm=function(){var Cf=Is.verticalTextBox;return _t.allowVerticalPlacement&&oo.numVerticalGlyphVertices>0&&Cf?hm(Cf,t.WritingMode.vertical):{box:null,offscreen:null}};ry(Sv,dm),Jp(El&&El.box&&El.box.length)}}if(vl=El,Cs=vl&&vl.box&&vl.box.length>0,xl=vl&&vl.offscreen,oo.useRuntimeCollisionCircles){var fd=_t.text.placedSymbolArray.get(oo.centerJustifiedTextSymbolIndex),ay=t.evaluateSizeForFeature(_t.textSizeData,mr,fd),o1=Tt.get("text-padding"),Wd=oo.collisionCircleDiameter;Eu=Se.collisionIndex.placeCollisionCircles(tr,fd,_t.lineVertexArray,_t.glyphOffsetArray,ay,it,dt,Lt,ne,En,dr.predicate,Wd,o1),Cs=tr||Eu.circles.length>0&&!Eu.collisionDetected,xl=xl&&Eu.offscreen}if(Is.iconFeatureIndex&&(Sp=Is.iconFeatureIndex),Is.iconBox){var Qy=function(Cf){var xc=Ea&&Cl?Bl(Cf,Cl.x,Cl.y,un,En,Se.transform.angle):Cf;return Se.collisionIndex.placeCollisionBox(xc,Yr,or,it,dr.predicate)};lc&&lc.box&&lc.box.length&&Is.verticalIconBox?(sh=Qy(Is.verticalIconBox),Sl=sh.box.length>0):(sh=Qy(Is.iconBox),Sl=sh.box.length>0),xl=xl&&sh.offscreen}var I_=Yt||oo.numHorizontalGlyphVertices===0&&oo.numVerticalGlyphVertices===0,D_=ar||oo.numIconVertices===0;if(!I_&&!D_?Sl=Cs=Sl&&Cs:D_?I_||(Sl=Sl&&Cs):Cs=Sl&&Cs,Cs&&vl&&vl.box&&(lc&&lc.box&&Ap?Se.collisionIndex.insertCollisionBox(vl.box,Tt.get("text-ignore-placement"),_t.bucketInstanceId,Ap,dr.ID):Se.collisionIndex.insertCollisionBox(vl.box,Tt.get("text-ignore-placement"),_t.bucketInstanceId,Bh,dr.ID)),Sl&&sh&&Se.collisionIndex.insertCollisionBox(sh.box,Tt.get("icon-ignore-placement"),_t.bucketInstanceId,Sp,dr.ID),Eu&&(Cs&&Se.collisionIndex.insertCollisionCircles(Eu.circles,Tt.get("text-ignore-placement"),_t.bucketInstanceId,Bh,dr.ID),ne)){var s1=_t.bucketInstanceId,eg=Se.collisionCircleArrays[s1];eg===void 0&&(eg=Se.collisionCircleArrays[s1]=new Lo);for(var tg=0;tg<Eu.circles.length;tg+=4)eg.circles.push(Eu.circles[tg+0]),eg.circles.push(Eu.circles[tg+1]),eg.circles.push(Eu.circles[tg+2]),eg.circles.push(Eu.collisionDetected?1:0)}Se.placements[oo.crossTileID]=new ls(Cs||sa,Sl||Ma,xl||_t.justReloaded),ge[oo.crossTileID]=!0}};if(fa)for(var Ja=_t.getSortedSymbolIndexes(this.transform.angle),ka=Ja.length-1;ka>=0;--ka){var ai=Ja[ka];La(_t.symbolInstances.get(ai),_t.collisionArrays[ai])}else for(var gi=X.symbolInstanceStart;gi<X.symbolInstanceEnd;gi++)La(_t.symbolInstances.get(gi),_t.collisionArrays[gi]);if(ne&&_t.bucketInstanceId in this.collisionCircleArrays){var Vi=this.collisionCircleArrays[_t.bucketInstanceId];t.invert(Vi.invProjMatrix,it),Vi.viewportMatrix=this.collisionIndex.getViewportMatrix()}_t.justReloaded=!1},Fs.prototype.markUsedJustification=function(X,ge,ne,Se){var Je={left:ne.leftJustifiedTextSymbolIndex,center:ne.centerJustifiedTextSymbolIndex,right:ne.rightJustifiedTextSymbolIndex},_t;Se===t.WritingMode.vertical?_t=ne.verticalPlacedTextSymbolIndex:_t=Je[t.getAnchorJustification(ge)];for(var Tt=[ne.leftJustifiedTextSymbolIndex,ne.centerJustifiedTextSymbolIndex,ne.rightJustifiedTextSymbolIndex,ne.verticalPlacedTextSymbolIndex],it=0,dt=Tt;it<dt.length;it+=1){var Lt=dt[it];Lt>=0&&(_t>=0&&Lt!==_t?X.text.placedSymbolArray.get(Lt).crossTileID=0:X.text.placedSymbolArray.get(Lt).crossTileID=ne.crossTileID)}},Fs.prototype.markUsedOrientation=function(X,ge,ne){for(var Se=ge===t.WritingMode.horizontal||ge===t.WritingMode.horizontalOnly?ge:0,Je=ge===t.WritingMode.vertical?ge:0,_t=[ne.leftJustifiedTextSymbolIndex,ne.centerJustifiedTextSymbolIndex,ne.rightJustifiedTextSymbolIndex],Tt=0,it=_t;Tt<it.length;Tt+=1){var dt=it[Tt];X.text.placedSymbolArray.get(dt).placedOrientation=Se}ne.verticalPlacedTextSymbolIndex&&(X.text.placedSymbolArray.get(ne.verticalPlacedTextSymbolIndex).placedOrientation=Je)},Fs.prototype.commit=function(X){this.commitTime=X,this.zoomAtLastRecencyCheck=this.transform.zoom;var ge=this.prevPlacement,ne=!1;this.prevZoomAdjustment=ge?ge.zoomAdjustment(this.transform.zoom):0;var Se=ge?ge.symbolFadeChange(X):1,Je=ge?ge.opacities:{},_t=ge?ge.variableOffsets:{},Tt=ge?ge.placedOrientations:{};for(var it in this.placements){var dt=this.placements[it],Lt=Je[it];Lt?(this.opacities[it]=new Ss(Lt,Se,dt.text,dt.icon),ne=ne||dt.text!==Lt.text.placed||dt.icon!==Lt.icon.placed):(this.opacities[it]=new Ss(null,Se,dt.text,dt.icon,dt.skipFade),ne=ne||dt.text||dt.icon)}for(var or in Je){var er=Je[or];if(!this.opacities[or]){var ur=new Ss(er,Se,!1,!1);ur.isHidden()||(this.opacities[or]=ur,ne=ne||er.text.placed||er.icon.placed)}}for(var mr in _t)!this.variableOffsets[mr]&&this.opacities[mr]&&!this.opacities[mr].isHidden()&&(this.variableOffsets[mr]=_t[mr]);for(var dr in Tt)!this.placedOrientations[dr]&&this.opacities[dr]&&!this.opacities[dr].isHidden()&&(this.placedOrientations[dr]=Tt[dr]);ne?this.lastPlacementChangeTime=X:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=ge?ge.lastPlacementChangeTime:X)},Fs.prototype.updateLayerOpacities=function(X,ge){for(var ne={},Se=0,Je=ge;Se<Je.length;Se+=1){var _t=Je[Se],Tt=_t.getBucket(X);Tt&&_t.latestFeatureIndex&&X.id===Tt.layerIds[0]&&this.updateBucketOpacities(Tt,ne,_t.collisionBoxArray)}},Fs.prototype.updateBucketOpacities=function(X,ge,ne){var Se=this;X.hasTextData()&&X.text.opacityVertexArray.clear(),X.hasIconData()&&X.icon.opacityVertexArray.clear(),X.hasIconCollisionBoxData()&&X.iconCollisionBox.collisionVertexArray.clear(),X.hasTextCollisionBoxData()&&X.textCollisionBox.collisionVertexArray.clear();var Je=X.layers[0].layout,_t=new Ss(null,0,!1,!1,!0),Tt=Je.get("text-allow-overlap"),it=Je.get("icon-allow-overlap"),dt=Je.get("text-variable-anchor"),Lt=Je.get("text-rotation-alignment")==="map",or=Je.get("text-pitch-alignment")==="map",er=Je.get("icon-text-fit")!=="none",ur=new Ss(null,0,Tt&&(it||!X.hasIconData()||Je.get("icon-optional")),it&&(Tt||!X.hasTextData()||Je.get("text-optional")),!0);!X.collisionArrays&&ne&&(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData())&&X.deserializeCollisionBoxes(ne);for(var mr=function(tr,Yr,un){for(var En=0;En<Yr/4;En++)tr.opacityVertexArray.emplaceBack(un)},dr=function(tr){var Yr=X.symbolInstances.get(tr),un=Yr.numHorizontalGlyphVertices,En=Yr.numVerticalGlyphVertices,Ea=Yr.crossTileID,fa=ge[Ea],sa=Se.opacities[Ea];fa?sa=_t:sa||(sa=ur,Se.opacities[Ea]=sa),ge[Ea]=!0;var Ma=un>0||En>0,La=Yr.numIconVertices>0,Ja=Se.placedOrientations[Yr.crossTileID],ka=Ja===t.WritingMode.vertical,ai=Ja===t.WritingMode.horizontal||Ja===t.WritingMode.horizontalOnly;if(Ma){var gi=Cu(sa.text),Vi=ka?yo:gi;mr(X.text,un,Vi);var oo=ai?yo:gi;mr(X.text,En,oo);var Is=sa.text.isHidden();[Yr.rightJustifiedTextSymbolIndex,Yr.centerJustifiedTextSymbolIndex,Yr.leftJustifiedTextSymbolIndex].forEach(function(Sp){Sp>=0&&(X.text.placedSymbolArray.get(Sp).hidden=Is||ka?1:0)}),Yr.verticalPlacedTextSymbolIndex>=0&&(X.text.placedSymbolArray.get(Yr.verticalPlacedTextSymbolIndex).hidden=Is||ai?1:0);var Cs=Se.variableOffsets[Yr.crossTileID];Cs&&Se.markUsedJustification(X,Cs.anchor,Yr,Ja);var Sl=Se.placedOrientations[Yr.crossTileID];Sl&&(Se.markUsedJustification(X,"left",Yr,Sl),Se.markUsedOrientation(X,Sl,Yr))}if(La){var xl=Cu(sa.icon),Cl=!(er&&Yr.verticalPlacedIconSymbolIndex&&ka);if(Yr.placedIconSymbolIndex>=0){var El=Cl?xl:yo;mr(X.icon,Yr.numIconVertices,El),X.icon.placedSymbolArray.get(Yr.placedIconSymbolIndex).hidden=sa.icon.isHidden()}if(Yr.verticalPlacedIconSymbolIndex>=0){var lc=Cl?yo:xl;mr(X.icon,Yr.numVerticalIconVertices,lc),X.icon.placedSymbolArray.get(Yr.verticalPlacedIconSymbolIndex).hidden=sa.icon.isHidden()}}if(X.hasIconCollisionBoxData()||X.hasTextCollisionBoxData()){var vl=X.collisionArrays[tr];if(vl){var Eu=new t.Point(0,0);if(vl.textBox||vl.verticalTextBox){var sh=!0;if(dt){var Bh=Se.variableOffsets[Ea];Bh?(Eu=zl(Bh.anchor,Bh.width,Bh.height,Bh.textOffset,Bh.textBoxScale),Lt&&Eu._rotate(or?Se.transform.angle:-Se.transform.angle)):sh=!1}vl.textBox&&Di(X.textCollisionBox.collisionVertexArray,sa.text.placed,!sh||ka,Eu.x,Eu.y),vl.verticalTextBox&&Di(X.textCollisionBox.collisionVertexArray,sa.text.placed,!sh||ai,Eu.x,Eu.y)}var Ap=!!(!ai&&vl.verticalIconBox);vl.iconBox&&Di(X.iconCollisionBox.collisionVertexArray,sa.icon.placed,Ap,er?Eu.x:0,er?Eu.y:0),vl.verticalIconBox&&Di(X.iconCollisionBox.collisionVertexArray,sa.icon.placed,!Ap,er?Eu.x:0,er?Eu.y:0)}}},Yt=0;Yt<X.symbolInstances.length;Yt++)dr(Yt);if(X.sortFeatures(this.transform.angle),this.retainedQueryData[X.bucketInstanceId]&&(this.retainedQueryData[X.bucketInstanceId].featureSortOrder=X.featureSortOrder),X.hasTextData()&&X.text.opacityVertexBuffer&&X.text.opacityVertexBuffer.updateData(X.text.opacityVertexArray),X.hasIconData()&&X.icon.opacityVertexBuffer&&X.icon.opacityVertexBuffer.updateData(X.icon.opacityVertexArray),X.hasIconCollisionBoxData()&&X.iconCollisionBox.collisionVertexBuffer&&X.iconCollisionBox.collisionVertexBuffer.updateData(X.iconCollisionBox.collisionVertexArray),X.hasTextCollisionBoxData()&&X.textCollisionBox.collisionVertexBuffer&&X.textCollisionBox.collisionVertexBuffer.updateData(X.textCollisionBox.collisionVertexArray),X.bucketInstanceId in this.collisionCircleArrays){var ar=this.collisionCircleArrays[X.bucketInstanceId];X.placementInvProjMatrix=ar.invProjMatrix,X.placementViewportMatrix=ar.viewportMatrix,X.collisionCircleArray=ar.circles,delete this.collisionCircleArrays[X.bucketInstanceId]}},Fs.prototype.symbolFadeChange=function(X){return this.fadeDuration===0?1:(X-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},Fs.prototype.zoomAdjustment=function(X){return Math.max(0,(this.transform.zoom-X)/1.5)},Fs.prototype.hasTransitions=function(X){return this.stale||X-this.lastPlacementChangeTime<this.fadeDuration},Fs.prototype.stillRecent=function(X,ge){var ne=this.zoomAtLastRecencyCheck===ge?1-this.zoomAdjustment(ge):1;return this.zoomAtLastRecencyCheck=ge,this.commitTime+this.fadeDuration*ne>X},Fs.prototype.setStale=function(){this.stale=!0};function Di(Me,X,ge,ne,Se){Me.emplaceBack(X?1:0,ge?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ge?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ge?1:0,ne||0,Se||0),Me.emplaceBack(X?1:0,ge?1:0,ne||0,Se||0)}var _o=Math.pow(2,25),Nl=Math.pow(2,24),Vs=Math.pow(2,17),Ko=Math.pow(2,16),jl=Math.pow(2,9),rl=Math.pow(2,8),yl=Math.pow(2,1);function Cu(Me){if(Me.opacity===0&&!Me.placed)return 0;if(Me.opacity===1&&Me.placed)return 4294967295;var X=Me.placed?1:0,ge=Math.floor(Me.opacity*127);return ge*_o+X*Nl+ge*Vs+X*Ko+ge*jl+X*rl+ge*yl+X}var yo=0,Ps=function(X){this._sortAcrossTiles=X.layout.get("symbol-z-order")!=="viewport-y"&&X.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Ps.prototype.continuePlacement=function(X,ge,ne,Se,Je){for(var _t=this._bucketParts;this._currentTileIndex<X.length;){var Tt=X[this._currentTileIndex];if(ge.getBucketParts(_t,Se,Tt,this._sortAcrossTiles),this._currentTileIndex++,Je())return!0}for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,_t.sort(function(dt,Lt){return dt.sortKey-Lt.sortKey}));this._currentPartIndex<_t.length;){var it=_t[this._currentPartIndex];if(ge.placeLayerBucketPart(it,this._seenCrossTileIDs,ne),this._currentPartIndex++,Je())return!0}return!1};var ms=function(X,ge,ne,Se,Je,_t,Tt){this.placement=new Fs(X,Je,_t,Tt),this._currentPlacementIndex=ge.length-1,this._forceFullPlacement=ne,this._showCollisionBoxes=Se,this._done=!1};ms.prototype.isDone=function(){return this._done},ms.prototype.continuePlacement=function(X,ge,ne){for(var Se=this,Je=t.browser.now(),_t=function(){var or=t.browser.now()-Je;return Se._forceFullPlacement?!1:or>2};this._currentPlacementIndex>=0;){var Tt=X[this._currentPlacementIndex],it=ge[Tt],dt=this.placement.collisionIndex.transform.zoom;if(it.type==="symbol"&&(!it.minzoom||it.minzoom<=dt)&&(!it.maxzoom||it.maxzoom>dt)){this._inProgressLayer||(this._inProgressLayer=new Ps(it));var Lt=this._inProgressLayer.continuePlacement(ne[it.source],this.placement,this._showCollisionBoxes,it,_t);if(Lt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ms.prototype.commit=function(X){return this.placement.commit(X),this.placement};var Kl=512/t.EXTENT/2,Jl=function(X,ge,ne){this.tileID=X,this.indexedSymbolInstances={},this.bucketInstanceId=ne;for(var Se=0;Se<ge.length;Se++){var Je=ge.get(Se),_t=Je.key;this.indexedSymbolInstances[_t]||(this.indexedSymbolInstances[_t]=[]),this.indexedSymbolInstances[_t].push({crossTileID:Je.crossTileID,coord:this.getScaledCoordinates(Je,X)})}};Jl.prototype.getScaledCoordinates=function(X,ge){var ne=ge.canonical.z-this.tileID.canonical.z,Se=Kl/Math.pow(2,ne);return{x:Math.floor((ge.canonical.x*t.EXTENT+X.anchorX)*Se),y:Math.floor((ge.canonical.y*t.EXTENT+X.anchorY)*Se)}},Jl.prototype.findMatches=function(X,ge,ne){for(var Se=this.tileID.canonical.z<ge.canonical.z?1:Math.pow(2,this.tileID.canonical.z-ge.canonical.z),Je=0;Je<X.length;Je++){var _t=X.get(Je);if(!_t.crossTileID){var Tt=this.indexedSymbolInstances[_t.key];if(Tt)for(var it=this.getScaledCoordinates(_t,ge),dt=0,Lt=Tt;dt<Lt.length;dt+=1){var or=Lt[dt];if(Math.abs(or.coord.x-it.x)<=Se&&Math.abs(or.coord.y-it.y)<=Se&&!ne[or.crossTileID]){ne[or.crossTileID]=!0,_t.crossTileID=or.crossTileID;break}}}}};var Wo=function(){this.maxCrossTileID=0};Wo.prototype.generate=function(){return++this.maxCrossTileID};var pu=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};pu.prototype.handleWrapJump=function(X){var ge=Math.round((X-this.lng)/360);if(ge!==0)for(var ne in this.indexes){var Se=this.indexes[ne],Je={};for(var _t in Se){var Tt=Se[_t];Tt.tileID=Tt.tileID.unwrapTo(Tt.tileID.wrap+ge),Je[Tt.tileID.key]=Tt}this.indexes[ne]=Je}this.lng=X},pu.prototype.addBucket=function(X,ge,ne){if(this.indexes[X.overscaledZ]&&this.indexes[X.overscaledZ][X.key]){if(this.indexes[X.overscaledZ][X.key].bucketInstanceId===ge.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(X.overscaledZ,this.indexes[X.overscaledZ][X.key])}for(var Se=0;Se<ge.symbolInstances.length;Se++){var Je=ge.symbolInstances.get(Se);Je.crossTileID=0}this.usedCrossTileIDs[X.overscaledZ]||(this.usedCrossTileIDs[X.overscaledZ]={});var _t=this.usedCrossTileIDs[X.overscaledZ];for(var Tt in this.indexes){var it=this.indexes[Tt];if(Number(Tt)>X.overscaledZ)for(var dt in it){var Lt=it[dt];Lt.tileID.isChildOf(X)&&Lt.findMatches(ge.symbolInstances,X,_t)}else{var or=X.scaledTo(Number(Tt)),er=it[or.key];er&&er.findMatches(ge.symbolInstances,X,_t)}}for(var ur=0;ur<ge.symbolInstances.length;ur++){var mr=ge.symbolInstances.get(ur);mr.crossTileID||(mr.crossTileID=ne.generate(),_t[mr.crossTileID]=!0)}return this.indexes[X.overscaledZ]===void 0&&(this.indexes[X.overscaledZ]={}),this.indexes[X.overscaledZ][X.key]=new Jl(X,ge.symbolInstances,ge.bucketInstanceId),!0},pu.prototype.removeBucketCrossTileIDs=function(X,ge){for(var ne in ge.indexedSymbolInstances)for(var Se=0,Je=ge.indexedSymbolInstances[ne];Se<Je.length;Se+=1){var _t=Je[Se];delete this.usedCrossTileIDs[X][_t.crossTileID]}},pu.prototype.removeStaleBuckets=function(X){var ge=!1;for(var ne in this.indexes){var Se=this.indexes[ne];for(var Je in Se)X[Se[Je].bucketInstanceId]||(this.removeBucketCrossTileIDs(ne,Se[Je]),delete Se[Je],ge=!0)}return ge};var _u=function(){this.layerIndexes={},this.crossTileIDs=new Wo,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};_u.prototype.addLayer=function(X,ge,ne){var Se=this.layerIndexes[X.id];Se===void 0&&(Se=this.layerIndexes[X.id]=new pu);var Je=!1,_t={};Se.handleWrapJump(ne);for(var Tt=0,it=ge;Tt<it.length;Tt+=1){var dt=it[Tt],Lt=dt.getBucket(X);!Lt||X.id!==Lt.layerIds[0]||(Lt.bucketInstanceId||(Lt.bucketInstanceId=++this.maxBucketInstanceId),Se.addBucket(dt.tileID,Lt,this.crossTileIDs)&&(Je=!0),_t[Lt.bucketInstanceId]=!0)}return Se.removeStaleBuckets(_t)&&(Je=!0),Je},_u.prototype.pruneUnusedLayers=function(X){var ge={};X.forEach(function(Se){ge[Se]=!0});for(var ne in this.layerIndexes)ge[ne]||delete this.layerIndexes[ne]};var Xs=function(Me,X){return t.emitValidationErrors(Me,X&&X.filter(function(ge){return ge.identifier!=="source.canvas"}))},Pl=t.pick(tn,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Gl=t.pick(tn,["setCenter","setZoom","setBearing","setPitch"]),Yl=Qr(),tc=(function(Me){function X(ge,ne){var Se=this;ne===void 0&&(ne={}),Me.call(this),this.map=ge,this.dispatcher=new V(zi(),this),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new p(ge._requestManager,ne.localIdeographFontFamily),this.lineAtlas=new U(256,512),this.crossTileSymbolIndex=new _u,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var Je=this;this._rtlTextPluginCallback=X.registerForPluginStateChange(function(_t){var Tt={pluginStatus:_t.pluginStatus,pluginURL:_t.pluginURL};Je.dispatcher.broadcast("syncRTLPluginState",Tt,function(it,dt){if(t.triggerPluginCompletionEvent(it),dt){var Lt=dt.every(function(er){return er});if(Lt)for(var or in Je.sourceCaches)Je.sourceCaches[or].reload()}})}),this.on("data",function(_t){if(!(_t.dataType!=="source"||_t.sourceDataType!=="metadata")){var Tt=Se.sourceCaches[_t.sourceId];if(Tt){var it=Tt.getSource();if(!(!it||!it.vectorLayerIds))for(var dt in Se._layers){var Lt=Se._layers[dt];Lt.source===it.id&&Se._validateLayer(Lt)}}}})}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.loadURL=function(ne,Se){var Je=this;Se===void 0&&(Se={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var _t=typeof Se.validate=="boolean"?Se.validate:!t.isMapboxURL(ne);ne=this.map._requestManager.normalizeStyleURL(ne,Se.accessToken);var Tt=this.map._requestManager.transformRequest(ne,t.ResourceType.Style);this._request=t.getJSON(Tt,function(it,dt){Je._request=null,it?Je.fire(new t.ErrorEvent(it)):dt&&Je._load(dt,_t)})},X.prototype.loadJSON=function(ne,Se){var Je=this;Se===void 0&&(Se={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){Je._request=null,Je._load(ne,Se.validate!==!1)})},X.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(Yl,!1)},X.prototype._load=function(ne,Se){if(!(Se&&Xs(this,t.validateStyle(ne)))){this._loaded=!0,this.stylesheet=ne;for(var Je in ne.sources)this.addSource(Je,ne.sources[Je],{validate:!1});ne.sprite?this._loadSprite(ne.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(ne.glyphs);var _t=Ur(this.stylesheet.layers);this._order=_t.map(function(Lt){return Lt.id}),this._layers={},this._serializedLayers={};for(var Tt=0,it=_t;Tt<it.length;Tt+=1){var dt=it[Tt];dt=t.createStyleLayer(dt),dt.setEventedParent(this,{layer:{id:dt.id}}),this._layers[dt.id]=dt,this._serializedLayers[dt.id]=dt.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new B(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},X.prototype._loadSprite=function(ne){var Se=this;this._spriteRequest=m(ne,this.map._requestManager,function(Je,_t){if(Se._spriteRequest=null,Je)Se.fire(new t.ErrorEvent(Je));else if(_t)for(var Tt in _t)Se.imageManager.addImage(Tt,_t[Tt]);Se.imageManager.setLoaded(!0),Se._availableImages=Se.imageManager.listImages(),Se.dispatcher.broadcast("setImages",Se._availableImages),Se.fire(new t.Event("data",{dataType:"style"}))})},X.prototype._validateLayer=function(ne){var Se=this.sourceCaches[ne.source];if(Se){var Je=ne.sourceLayer;if(Je){var _t=Se.getSource();(_t.type==="geojson"||_t.vectorLayerIds&&_t.vectorLayerIds.indexOf(Je)===-1)&&this.fire(new t.ErrorEvent(new Error('Source layer "'+Je+'" does not exist on source "'+_t.id+'" as specified by style layer "'+ne.id+'"')))}}},X.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var ne in this.sourceCaches)if(!this.sourceCaches[ne].loaded())return!1;return!!this.imageManager.isLoaded()},X.prototype._serializeLayers=function(ne){for(var Se=[],Je=0,_t=ne;Je<_t.length;Je+=1){var Tt=_t[Je],it=this._layers[Tt];it.type!=="custom"&&Se.push(it.serialize())}return Se},X.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var ne in this.sourceCaches)if(this.sourceCaches[ne].hasTransition())return!0;for(var Se in this._layers)if(this._layers[Se].hasTransition())return!0;return!1},X.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},X.prototype.update=function(ne){if(this._loaded){var Se=this._changed;if(this._changed){var Je=Object.keys(this._updatedLayers),_t=Object.keys(this._removedLayers);(Je.length||_t.length)&&this._updateWorkerLayers(Je,_t);for(var Tt in this._updatedSources){var it=this._updatedSources[Tt];it==="reload"?this._reloadSource(Tt):it==="clear"&&this._clearSource(Tt)}this._updateTilesForChangedImages();for(var dt in this._updatedPaintProps)this._layers[dt].updateTransitions(ne);this.light.updateTransitions(ne),this._resetUpdates()}var Lt={};for(var or in this.sourceCaches){var er=this.sourceCaches[or];Lt[or]=er.used,er.used=!1}for(var ur=0,mr=this._order;ur<mr.length;ur+=1){var dr=mr[ur],Yt=this._layers[dr];Yt.recalculate(ne,this._availableImages),!Yt.isHidden(ne.zoom)&&Yt.source&&(this.sourceCaches[Yt.source].used=!0)}for(var ar in Lt){var tr=this.sourceCaches[ar];Lt[ar]!==tr.used&&tr.fire(new t.Event("data",{sourceDataType:"visibility",dataType:"source",sourceId:ar}))}this.light.recalculate(ne),this.z=ne.zoom,Se&&this.fire(new t.Event("data",{dataType:"style"}))}},X.prototype._updateTilesForChangedImages=function(){var ne=Object.keys(this._changedImages);if(ne.length){for(var Se in this.sourceCaches)this.sourceCaches[Se].reloadTilesForDependencies(["icons","patterns"],ne);this._changedImages={}}},X.prototype._updateWorkerLayers=function(ne,Se){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(ne),removedIds:Se})},X.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},X.prototype.setState=function(ne){var Se=this;if(this._checkLoaded(),Xs(this,t.validateStyle(ne)))return!1;ne=t.clone$1(ne),ne.layers=Ur(ne.layers);var Je=na(this.serialize(),ne).filter(function(Tt){return!(Tt.command in Gl)});if(Je.length===0)return!1;var _t=Je.filter(function(Tt){return!(Tt.command in Pl)});if(_t.length>0)throw new Error("Unimplemented: "+_t.map(function(Tt){return Tt.command}).join(", ")+".");return Je.forEach(function(Tt){Tt.command!=="setTransition"&&Se[Tt.command].apply(Se,Tt.args)}),this.stylesheet=ne,!0},X.prototype.addImage=function(ne,Se){if(this.getImage(ne))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(ne,Se),this._afterImageUpdated(ne)},X.prototype.updateImage=function(ne,Se){this.imageManager.updateImage(ne,Se)},X.prototype.getImage=function(ne){return this.imageManager.getImage(ne)},X.prototype.removeImage=function(ne){if(!this.getImage(ne))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(ne),this._afterImageUpdated(ne)},X.prototype._afterImageUpdated=function(ne){this._availableImages=this.imageManager.listImages(),this._changedImages[ne]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new t.Event("data",{dataType:"style"}))},X.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},X.prototype.addSource=function(ne,Se,Je){var _t=this;if(Je===void 0&&(Je={}),this._checkLoaded(),this.sourceCaches[ne]!==void 0)throw new Error("There is already a source with this ID");if(!Se.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(Se).join(", ")+".");var Tt=["vector","raster","geojson","video","image"],it=Tt.indexOf(Se.type)>=0;if(!(it&&this._validate(t.validateStyle.source,"sources."+ne,Se,null,Je))){this.map&&this.map._collectResourceTiming&&(Se.collectResourceTiming=!0);var dt=this.sourceCaches[ne]=new Ln(ne,Se,this.dispatcher);dt.style=this,dt.setEventedParent(this,function(){return{isSourceLoaded:_t.loaded(),source:dt.serialize(),sourceId:ne}}),dt.onAdd(this.map),this._changed=!0}},X.prototype.removeSource=function(ne){if(this._checkLoaded(),this.sourceCaches[ne]===void 0)throw new Error("There is no source with this ID");for(var Se in this._layers)if(this._layers[Se].source===ne)return this.fire(new t.ErrorEvent(new Error('Source "'+ne+'" cannot be removed while layer "'+Se+'" is using it.')));var Je=this.sourceCaches[ne];delete this.sourceCaches[ne],delete this._updatedSources[ne],Je.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:ne})),Je.setEventedParent(null),Je.clearTiles(),Je.onRemove&&Je.onRemove(this.map),this._changed=!0},X.prototype.setGeoJSONSourceData=function(ne,Se){this._checkLoaded();var Je=this.sourceCaches[ne].getSource();Je.setData(Se),this._changed=!0},X.prototype.getSource=function(ne){return this.sourceCaches[ne]&&this.sourceCaches[ne].getSource()},X.prototype.addLayer=function(ne,Se,Je){Je===void 0&&(Je={}),this._checkLoaded();var _t=ne.id;if(this.getLayer(_t)){this.fire(new t.ErrorEvent(new Error('Layer with id "'+_t+'" already exists on this map')));return}var Tt;if(ne.type==="custom"){if(Xs(this,t.validateCustomStyleLayer(ne)))return;Tt=t.createStyleLayer(ne)}else{if(typeof ne.source=="object"&&(this.addSource(_t,ne.source),ne=t.clone$1(ne),ne=t.extend(ne,{source:_t})),this._validate(t.validateStyle.layer,"layers."+_t,ne,{arrayIndex:-1},Je))return;Tt=t.createStyleLayer(ne),this._validateLayer(Tt),Tt.setEventedParent(this,{layer:{id:_t}}),this._serializedLayers[Tt.id]=Tt.serialize()}var it=Se?this._order.indexOf(Se):this._order.length;if(Se&&it===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+Se+'" does not exist on this map.')));return}if(this._order.splice(it,0,_t),this._layerOrderChanged=!0,this._layers[_t]=Tt,this._removedLayers[_t]&&Tt.source&&Tt.type!=="custom"){var dt=this._removedLayers[_t];delete this._removedLayers[_t],dt.type!==Tt.type?this._updatedSources[Tt.source]="clear":(this._updatedSources[Tt.source]="reload",this.sourceCaches[Tt.source].pause())}this._updateLayer(Tt),Tt.onAdd&&Tt.onAdd(this.map)},X.prototype.moveLayer=function(ne,Se){this._checkLoaded(),this._changed=!0;var Je=this._layers[ne];if(!Je){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be moved.")));return}if(ne!==Se){var _t=this._order.indexOf(ne);this._order.splice(_t,1);var Tt=Se?this._order.indexOf(Se):this._order.length;if(Se&&Tt===-1){this.fire(new t.ErrorEvent(new Error('Layer with id "'+Se+'" does not exist on this map.')));return}this._order.splice(Tt,0,ne),this._layerOrderChanged=!0}},X.prototype.removeLayer=function(ne){this._checkLoaded();var Se=this._layers[ne];if(!Se){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be removed.")));return}Se.setEventedParent(null);var Je=this._order.indexOf(ne);this._order.splice(Je,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[ne]=Se,delete this._layers[ne],delete this._serializedLayers[ne],delete this._updatedLayers[ne],delete this._updatedPaintProps[ne],Se.onRemove&&Se.onRemove(this.map)},X.prototype.getLayer=function(ne){return this._layers[ne]},X.prototype.hasLayer=function(ne){return ne in this._layers},X.prototype.setLayerZoomRange=function(ne,Se,Je){this._checkLoaded();var _t=this.getLayer(ne);if(!_t){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot have zoom extent.")));return}_t.minzoom===Se&&_t.maxzoom===Je||(Se!=null&&(_t.minzoom=Se),Je!=null&&(_t.maxzoom=Je),this._updateLayer(_t))},X.prototype.setFilter=function(ne,Se,Je){Je===void 0&&(Je={}),this._checkLoaded();var _t=this.getLayer(ne);if(!_t){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be filtered.")));return}if(!t.deepEqual(_t.filter,Se)){if(Se==null){_t.filter=void 0,this._updateLayer(_t);return}this._validate(t.validateStyle.filter,"layers."+_t.id+".filter",Se,null,Je)||(_t.filter=t.clone$1(Se),this._updateLayer(_t))}},X.prototype.getFilter=function(ne){return t.clone$1(this.getLayer(ne).filter)},X.prototype.setLayoutProperty=function(ne,Se,Je,_t){_t===void 0&&(_t={}),this._checkLoaded();var Tt=this.getLayer(ne);if(!Tt){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be styled.")));return}t.deepEqual(Tt.getLayoutProperty(Se),Je)||(Tt.setLayoutProperty(Se,Je,_t),this._updateLayer(Tt))},X.prototype.getLayoutProperty=function(ne,Se){var Je=this.getLayer(ne);if(!Je){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style.")));return}return Je.getLayoutProperty(Se)},X.prototype.setPaintProperty=function(ne,Se,Je,_t){_t===void 0&&(_t={}),this._checkLoaded();var Tt=this.getLayer(ne);if(!Tt){this.fire(new t.ErrorEvent(new Error("The layer '"+ne+"' does not exist in the map's style and cannot be styled.")));return}if(!t.deepEqual(Tt.getPaintProperty(Se),Je)){var it=Tt.setPaintProperty(Se,Je,_t);it&&this._updateLayer(Tt),this._changed=!0,this._updatedPaintProps[ne]=!0}},X.prototype.getPaintProperty=function(ne,Se){return this.getLayer(ne).getPaintProperty(Se)},X.prototype.setFeatureState=function(ne,Se){this._checkLoaded();var Je=ne.source,_t=ne.sourceLayer,Tt=this.sourceCaches[Je];if(Tt===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Je+"' does not exist in the map's style.")));return}var it=Tt.getSource().type;if(it==="geojson"&&_t){this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(it==="vector"&&!_t){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}ne.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),Tt.setFeatureState(_t,ne.id,Se)},X.prototype.removeFeatureState=function(ne,Se){this._checkLoaded();var Je=ne.source,_t=this.sourceCaches[Je];if(_t===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Je+"' does not exist in the map's style.")));return}var Tt=_t.getSource().type,it=Tt==="vector"?ne.sourceLayer:void 0;if(Tt==="vector"&&!it){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(Se&&typeof ne.id!="string"&&typeof ne.id!="number"){this.fire(new t.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}_t.removeFeatureState(it,ne.id,Se)},X.prototype.getFeatureState=function(ne){this._checkLoaded();var Se=ne.source,Je=ne.sourceLayer,_t=this.sourceCaches[Se];if(_t===void 0){this.fire(new t.ErrorEvent(new Error("The source '"+Se+"' does not exist in the map's style.")));return}var Tt=_t.getSource().type;if(Tt==="vector"&&!Je){this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return ne.id===void 0&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),_t.getFeatureState(Je,ne.id)},X.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},X.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(ne){return ne.serialize()}),layers:this._serializeLayers(this._order)},function(ne){return ne!==void 0})},X.prototype._updateLayer=function(ne){this._updatedLayers[ne.id]=!0,ne.source&&!this._updatedSources[ne.source]&&this.sourceCaches[ne.source].getSource().type!=="raster"&&(this._updatedSources[ne.source]="reload",this.sourceCaches[ne.source].pause()),this._changed=!0},X.prototype._flattenAndSortRenderedFeatures=function(ne){for(var Se=this,Je=function(ai){return Se._layers[ai].type==="fill-extrusion"},_t={},Tt=[],it=this._order.length-1;it>=0;it--){var dt=this._order[it];if(Je(dt)){_t[dt]=it;for(var Lt=0,or=ne;Lt<or.length;Lt+=1){var er=or[Lt],ur=er[dt];if(ur)for(var mr=0,dr=ur;mr<dr.length;mr+=1){var Yt=dr[mr];Tt.push(Yt)}}}}Tt.sort(function(ai,gi){return gi.intersectionZ-ai.intersectionZ});for(var ar=[],tr=this._order.length-1;tr>=0;tr--){var Yr=this._order[tr];if(Je(Yr))for(var un=Tt.length-1;un>=0;un--){var En=Tt[un].feature;if(_t[En.layer.id]<tr)break;ar.push(En),Tt.pop()}else for(var Ea=0,fa=ne;Ea<fa.length;Ea+=1){var sa=fa[Ea],Ma=sa[Yr];if(Ma)for(var La=0,Ja=Ma;La<Ja.length;La+=1){var ka=Ja[La];ar.push(ka.feature)}}}return ar},X.prototype.queryRenderedFeatures=function(ne,Se,Je){Se&&Se.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",Se.filter,null,Se);var _t={};if(Se&&Se.layers){if(!Array.isArray(Se.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var Tt=0,it=Se.layers;Tt<it.length;Tt+=1){var dt=it[Tt],Lt=this._layers[dt];if(!Lt)return this.fire(new t.ErrorEvent(new Error("The layer '"+dt+"' does not exist in the map's style and cannot be queried for features."))),[];_t[Lt.source]=!0}}var or=[];Se.availableImages=this._availableImages;for(var er in this.sourceCaches)Se.layers&&!_t[er]||or.push(ue(this.sourceCaches[er],this._layers,this._serializedLayers,ne,Se,Je));return this.placement&&or.push(_e(this._layers,this._serializedLayers,this.sourceCaches,ne,Se,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(or)},X.prototype.querySourceFeatures=function(ne,Se){Se&&Se.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",Se.filter,null,Se);var Je=this.sourceCaches[ne];return Je?Le(Je,Se):[]},X.prototype.addSourceType=function(ne,Se,Je){if(X.getSourceType(ne))return Je(new Error('A source type called "'+ne+'" already exists.'));if(X.setSourceType(ne,Se),!Se.workerSourceURL)return Je(null,null);this.dispatcher.broadcast("loadWorkerSource",{name:ne,url:Se.workerSourceURL},Je)},X.prototype.getLight=function(){return this.light.getLight()},X.prototype.setLight=function(ne,Se){Se===void 0&&(Se={}),this._checkLoaded();var Je=this.light.getLight(),_t=!1;for(var Tt in ne)if(!t.deepEqual(ne[Tt],Je[Tt])){_t=!0;break}if(_t){var it={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(ne,Se),this.light.updateTransitions(it)}},X.prototype._validate=function(ne,Se,Je,_t,Tt){return Tt===void 0&&(Tt={}),Tt&&Tt.validate===!1?!1:Xs(this,ne.call(t.validateStyle,t.extend({key:Se,style:this.serialize(),value:Je,styleSpec:t.styleSpec},_t)))},X.prototype._remove=function(){this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback);for(var ne in this._layers){var Se=this._layers[ne];Se.setEventedParent(null)}for(var Je in this.sourceCaches)this.sourceCaches[Je].clearTiles(),this.sourceCaches[Je].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},X.prototype._clearSource=function(ne){this.sourceCaches[ne].clearTiles()},X.prototype._reloadSource=function(ne){this.sourceCaches[ne].resume(),this.sourceCaches[ne].reload()},X.prototype._updateSources=function(ne){for(var Se in this.sourceCaches)this.sourceCaches[Se].update(ne)},X.prototype._generateCollisionBoxes=function(){for(var ne in this.sourceCaches)this._reloadSource(ne)},X.prototype._updatePlacement=function(ne,Se,Je,_t,Tt){Tt===void 0&&(Tt=!1);for(var it=!1,dt=!1,Lt={},or=0,er=this._order;or<er.length;or+=1){var ur=er[or],mr=this._layers[ur];if(mr.type==="symbol"){if(!Lt[mr.source]){var dr=this.sourceCaches[mr.source];Lt[mr.source]=dr.getRenderableIds(!0).map(function(Ea){return dr.getTileByID(Ea)}).sort(function(Ea,fa){return fa.tileID.overscaledZ-Ea.tileID.overscaledZ||(Ea.tileID.isLessThan(fa.tileID)?-1:1)})}var Yt=this.crossTileSymbolIndex.addLayer(mr,Lt[mr.source],ne.center.lng);it=it||Yt}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),Tt=Tt||this._layerOrderChanged||Je===0,(Tt||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),ne.zoom))&&(this.pauseablePlacement=new ms(ne,this._order,Tt,Se,Je,_t,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Lt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),dt=!0),it&&this.pauseablePlacement.placement.setStale()),dt||it)for(var ar=0,tr=this._order;ar<tr.length;ar+=1){var Yr=tr[ar],un=this._layers[Yr];un.type==="symbol"&&this.placement.updateLayerOpacities(un,Lt[un.source])}var En=!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now());return En},X.prototype._releaseSymbolFadeTiles=function(){for(var ne in this.sourceCaches)this.sourceCaches[ne].releaseSymbolFadeTiles()},X.prototype.getImages=function(ne,Se,Je){this.imageManager.getImages(Se.icons,Je),this._updateTilesForChangedImages();var _t=this.sourceCaches[Se.source];_t&&_t.setDependencies(Se.tileID.key,Se.type,Se.icons)},X.prototype.getGlyphs=function(ne,Se,Je){this.glyphManager.getGlyphs(Se.stacks,Je)},X.prototype.getResource=function(ne,Se,Je){return t.makeRequest(Se,Je)},X})(t.Evented);tc.getSourceType=pe,tc.setSourceType=oe,tc.registerForPluginStateChange=t.registerForPluginStateChange;var bf=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Qc=`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif`,ff=`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}`,Wh=`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Dh="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",Ll=`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,jc="uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}",Yh=`varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,hc=`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`,rc="void main() {gl_FragColor=vec4(1.0);}",dc="attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}",hf=`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,au=`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}`,nc=`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,Js="uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}",Ul="varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}",Df="attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}",Cc="varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}",Wf="attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}",mu="uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}",Vd="attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}",Ws=`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,cv=`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`,Tl=`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Zo=`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,dh=`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,df=`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`,Hu=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Zh=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`,Yf=`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,wh=`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`,ac=`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Cd=`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`,ad=`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Th="uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}",Zf=`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,$h="uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}",Kh=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,vf=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,id=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Of=`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}`,wf=`uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ic=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`,ih=`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Jh=`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`,Xl=`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,Oh="uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}",Hd=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,od=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}`,Ah=`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,sd=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`,Uc=`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,ld=`const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`,Su=du(Qc,ff),qc=du(Wh,Dh),$f=du(Ll,jc),iu=du(Yh,hc),zf=du(rc,dc),wc=du(hf,au),Vc=du(nc,Js),yu=du(Ul,Df),vh=du(Cc,Wf),Tf=du(mu,Vd),Kf=du(Ws,cv),zh=du(Tl,Zo),Gd=du(dh,df),Tv=du(Hu,Zh),ph=du(Yf,wh),Nh=du(ac,Cd),ef=du(ad,Th),Fh=du(Zf,$h),vc=du(Kh,vf),mh=du(id,Of),ud=du(wf,ic),yh=du(ih,Jh),uu=du(Xl,Oh),Hc=du(Hd,od),pf=du(Ah,sd),Qh=du(Uc,ld);function du(Me,X){var ge=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ne=X.match(/attribute ([\w]+) ([\w]+)/g),Se=Me.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Je=X.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),_t=Je?Je.concat(Se):Se,Tt={};return Me=Me.replace(ge,function(it,dt,Lt,or,er){return Tt[er]=!0,dt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
varying `+Lt+" "+or+" "+er+`;
#else
uniform `+Lt+" "+or+" u_"+er+`;
#endif
`:`
#ifdef HAS_UNIFORM_u_`+er+`
    `+Lt+" "+or+" "+er+" = u_"+er+`;
#endif
`}),X=X.replace(ge,function(it,dt,Lt,or,er){var ur=or==="float"?"vec2":"vec4",mr=er.match(/color/)?"color":ur;return Tt[er]?dt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
uniform lowp float u_`+er+`_t;
attribute `+Lt+" "+ur+" a_"+er+`;
varying `+Lt+" "+or+" "+er+`;
#else
uniform `+Lt+" "+or+" u_"+er+`;
#endif
`:mr==="vec4"?`
#ifndef HAS_UNIFORM_u_`+er+`
    `+er+" = a_"+er+`;
#else
    `+Lt+" "+or+" "+er+" = u_"+er+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+er+`
    `+er+" = unpack_mix_"+mr+"(a_"+er+", u_"+er+`_t);
#else
    `+Lt+" "+or+" "+er+" = u_"+er+`;
#endif
`:dt==="define"?`
#ifndef HAS_UNIFORM_u_`+er+`
uniform lowp float u_`+er+`_t;
attribute `+Lt+" "+ur+" a_"+er+`;
#else
uniform `+Lt+" "+or+" u_"+er+`;
#endif
`:mr==="vec4"?`
#ifndef HAS_UNIFORM_u_`+er+`
    `+Lt+" "+or+" "+er+" = a_"+er+`;
#else
    `+Lt+" "+or+" "+er+" = u_"+er+`;
#endif
`:`
#ifndef HAS_UNIFORM_u_`+er+`
    `+Lt+" "+or+" "+er+" = unpack_mix_"+mr+"(a_"+er+", u_"+er+`_t);
#else
    `+Lt+" "+or+" "+er+" = u_"+er+`;
#endif
`}),{fragmentSource:Me,vertexSource:X,staticAttributes:ne,staticUniforms:_t}}var Sh=Object.freeze({__proto__:null,prelude:Su,background:qc,backgroundPattern:$f,circle:iu,clippingMask:zf,heatmap:wc,heatmapTexture:Vc,collisionBox:yu,collisionCircle:vh,debug:Tf,fill:Kf,fillOutline:zh,fillOutlinePattern:Gd,fillPattern:Tv,fillExtrusion:ph,fillExtrusionPattern:Nh,hillshadePrepare:ef,hillshade:Fh,line:vc,lineGradient:mh,linePattern:ud,lineSDF:yh,raster:uu,symbolIcon:Hc,symbolSDF:pf,symbolTextAndIcon:Qh}),Jf=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Jf.prototype.bind=function(X,ge,ne,Se,Je,_t,Tt,it){this.context=X;for(var dt=this.boundPaintVertexBuffers.length!==Se.length,Lt=0;!dt&&Lt<Se.length;Lt++)this.boundPaintVertexBuffers[Lt]!==Se[Lt]&&(dt=!0);var or=!this.vao||this.boundProgram!==ge||this.boundLayoutVertexBuffer!==ne||dt||this.boundIndexBuffer!==Je||this.boundVertexOffset!==_t||this.boundDynamicVertexBuffer!==Tt||this.boundDynamicVertexBuffer2!==it;!X.extVertexArrayObject||or?this.freshBind(ge,ne,Se,Je,_t,Tt,it):(X.bindVertexArrayOES.set(this.vao),Tt&&Tt.bind(),Je&&Je.dynamicDraw&&Je.bind(),it&&it.bind())},Jf.prototype.freshBind=function(X,ge,ne,Se,Je,_t,Tt){var it,dt=X.numAttributes,Lt=this.context,or=Lt.gl;if(Lt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=Lt.extVertexArrayObject.createVertexArrayOES(),Lt.bindVertexArrayOES.set(this.vao),it=0,this.boundProgram=X,this.boundLayoutVertexBuffer=ge,this.boundPaintVertexBuffers=ne,this.boundIndexBuffer=Se,this.boundVertexOffset=Je,this.boundDynamicVertexBuffer=_t,this.boundDynamicVertexBuffer2=Tt;else{it=Lt.currentNumAttributes||0;for(var er=dt;er<it;er++)or.disableVertexAttribArray(er)}ge.enableAttributes(or,X);for(var ur=0,mr=ne;ur<mr.length;ur+=1){var dr=mr[ur];dr.enableAttributes(or,X)}_t&&_t.enableAttributes(or,X),Tt&&Tt.enableAttributes(or,X),ge.bind(),ge.setVertexAttribPointers(or,X,Je);for(var Yt=0,ar=ne;Yt<ar.length;Yt+=1){var tr=ar[Yt];tr.bind(),tr.setVertexAttribPointers(or,X,Je)}_t&&(_t.bind(),_t.setVertexAttribPointers(or,X,Je)),Se&&Se.bind(),Tt&&(Tt.bind(),Tt.setVertexAttribPointers(or,X,Je)),Lt.currentNumAttributes=dt},Jf.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};function tf(Me){for(var X=[],ge=0;ge<Me.length;ge++)if(Me[ge]!==null){var ne=Me[ge].split(" ");X.push(ne.pop())}return X}var Eh=function(X,ge,ne,Se,Je,_t){var Tt=X.gl;this.program=Tt.createProgram();for(var it=tf(ne.staticAttributes),dt=Se?Se.getBinderAttributes():[],Lt=it.concat(dt),or=ne.staticUniforms?tf(ne.staticUniforms):[],er=Se?Se.getBinderUniforms():[],ur=or.concat(er),mr=[],dr=0,Yt=ur;dr<Yt.length;dr+=1){var ar=Yt[dr];mr.indexOf(ar)<0&&mr.push(ar)}var tr=Se?Se.defines():[];_t&&tr.push("#define OVERDRAW_INSPECTOR;");var Yr=tr.concat(Su.fragmentSource,ne.fragmentSource).join(`
`),un=tr.concat(Su.vertexSource,ne.vertexSource).join(`
`),En=Tt.createShader(Tt.FRAGMENT_SHADER);if(Tt.isContextLost()){this.failedToCreate=!0;return}Tt.shaderSource(En,Yr),Tt.compileShader(En),Tt.attachShader(this.program,En);var Ea=Tt.createShader(Tt.VERTEX_SHADER);if(Tt.isContextLost()){this.failedToCreate=!0;return}Tt.shaderSource(Ea,un),Tt.compileShader(Ea),Tt.attachShader(this.program,Ea),this.attributes={};var fa={};this.numAttributes=Lt.length;for(var sa=0;sa<this.numAttributes;sa++)Lt[sa]&&(Tt.bindAttribLocation(this.program,sa,Lt[sa]),this.attributes[Lt[sa]]=sa);Tt.linkProgram(this.program),Tt.deleteShader(Ea),Tt.deleteShader(En);for(var Ma=0;Ma<mr.length;Ma++){var La=mr[Ma];if(La&&!fa[La]){var Ja=Tt.getUniformLocation(this.program,La);Ja&&(fa[La]=Ja)}}this.fixedUniforms=Je(X,fa),this.binderUniforms=Se?Se.getUniforms(X,fa):[]};Eh.prototype.draw=function(X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or,er,ur,mr,dr,Yt){var ar,tr=X.gl;if(!this.failedToCreate){X.program.set(this.program),X.setDepthMode(ne),X.setStencilMode(Se),X.setColorMode(Je),X.setCullFace(_t);for(var Yr in this.fixedUniforms)this.fixedUniforms[Yr].set(Tt[Yr]);mr&&mr.setUniforms(X,this.binderUniforms,er,{zoom:ur});for(var un=(ar={},ar[tr.LINES]=2,ar[tr.TRIANGLES]=3,ar[tr.LINE_STRIP]=1,ar)[ge],En=0,Ea=or.get();En<Ea.length;En+=1){var fa=Ea[En],sa=fa.vaos||(fa.vaos={}),Ma=sa[it]||(sa[it]=new Jf);Ma.bind(X,this,dt,mr?mr.getPaintVertexBuffers():[],Lt,fa.vertexOffset,dr,Yt),tr.drawElements(ge,fa.primitiveLength*un,tr.UNSIGNED_SHORT,fa.primitiveOffset*un*2)}}};function Af(Me,X,ge){var ne=1/Ks(ge,1,X.transform.tileZoom),Se=Math.pow(2,ge.tileID.overscaledZ),Je=ge.tileSize*Math.pow(2,X.transform.tileZoom)/Se,_t=Je*(ge.tileID.canonical.x+ge.tileID.wrap*Se),Tt=Je*ge.tileID.canonical.y;return{u_image:0,u_texsize:ge.imageAtlasTexture.size,u_scale:[ne,Me.fromScale,Me.toScale],u_fade:Me.t,u_pixel_coord_upper:[_t>>16,Tt>>16],u_pixel_coord_lower:[_t&65535,Tt&65535]}}function Mh(Me,X,ge,ne){var Se=ge.imageManager.getPattern(Me.from.toString()),Je=ge.imageManager.getPattern(Me.to.toString()),_t=ge.imageManager.getPixelSize(),Tt=_t.width,it=_t.height,dt=Math.pow(2,ne.tileID.overscaledZ),Lt=ne.tileSize*Math.pow(2,ge.transform.tileZoom)/dt,or=Lt*(ne.tileID.canonical.x+ne.tileID.wrap*dt),er=Lt*ne.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Se.tl,u_pattern_br_a:Se.br,u_pattern_tl_b:Je.tl,u_pattern_br_b:Je.br,u_texsize:[Tt,it],u_mix:X.t,u_pattern_size_a:Se.displaySize,u_pattern_size_b:Je.displaySize,u_scale_a:X.fromScale,u_scale_b:X.toScale,u_tile_units_to_pixels:1/Ks(ne,1,ge.transform.tileZoom),u_pixel_coord_upper:[or>>16,er>>16],u_pixel_coord_lower:[or&65535,er&65535]}}var Xd=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_lightpos:new t.Uniform3f(Me,X.u_lightpos),u_lightintensity:new t.Uniform1f(Me,X.u_lightintensity),u_lightcolor:new t.Uniform3f(Me,X.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Me,X.u_vertical_gradient),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},yc=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_lightpos:new t.Uniform3f(Me,X.u_lightpos),u_lightintensity:new t.Uniform1f(Me,X.u_lightintensity),u_lightcolor:new t.Uniform3f(Me,X.u_lightcolor),u_vertical_gradient:new t.Uniform1f(Me,X.u_vertical_gradient),u_height_factor:new t.Uniform1f(Me,X.u_height_factor),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},cd=function(Me,X,ge,ne){var Se=X.style.light,Je=Se.properties.get("position"),_t=[Je.x,Je.y,Je.z],Tt=t.create$1();Se.properties.get("anchor")==="viewport"&&t.fromRotation(Tt,-X.transform.angle),t.transformMat3(_t,_t,Tt);var it=Se.properties.get("color");return{u_matrix:Me,u_lightpos:_t,u_lightintensity:Se.properties.get("intensity"),u_lightcolor:[it.r,it.g,it.b],u_vertical_gradient:+ge,u_opacity:ne}},rf=function(Me,X,ge,ne,Se,Je,_t){return t.extend(cd(Me,X,ge,ne),Af(Je,X,_t),{u_height_factor:-Math.pow(2,Se.overscaledZ)/_t.tileSize/8})},Nf=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},Sf=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},ku=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world)}},kc=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world),u_image:new t.Uniform1i(Me,X.u_image),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},xu=function(Me){return{u_matrix:Me}},Qf=function(Me,X,ge,ne){return t.extend(xu(Me),Af(ge,X,ne))},Ef=function(Me,X){return{u_matrix:Me,u_world:X}},ed=function(Me,X,ge,ne,Se){return t.extend(Qf(Me,X,ge,ne),{u_world:Se})},wr=function(Me,X){return{u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(Me,X.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(Me,X.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},Hr=function(Me,X,ge,ne){var Se=Me.transform,Je,_t;if(ne.paint.get("circle-pitch-alignment")==="map"){var Tt=Ks(ge,1,Se.zoom);Je=!0,_t=[Tt,Tt]}else Je=!1,_t=Se.pixelsToGLUnits;return{u_camera_to_center_distance:Se.cameraToCenterDistance,u_scale_with_map:+(ne.paint.get("circle-pitch-scale")==="map"),u_matrix:Me.translatePosMatrix(X.posMatrix,ge,ne.paint.get("circle-translate"),ne.paint.get("circle-translate-anchor")),u_pitch_with_map:+Je,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:_t}},kn=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(Me,X.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(Me,X.u_extrude_scale),u_overscale_factor:new t.Uniform1f(Me,X.u_overscale_factor)}},_n=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_inv_matrix:new t.UniformMatrix4f(Me,X.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(Me,X.u_viewport_size)}},$n=function(Me,X,ge){var ne=Ks(ge,1,X.zoom),Se=Math.pow(2,X.zoom-ge.tileID.overscaledZ),Je=ge.tileID.overscaleFactor();return{u_matrix:Me,u_camera_to_center_distance:X.cameraToCenterDistance,u_pixels_to_tile_units:ne,u_extrude_scale:[X.pixelsToGLUnits[0]/(ne*Se),X.pixelsToGLUnits[1]/(ne*Se)],u_overscale_factor:Je}},Ga=function(Me,X,ge){return{u_matrix:Me,u_inv_matrix:X,u_camera_to_center_distance:ge.cameraToCenterDistance,u_viewport_size:[ge.width,ge.height]}},Ba=function(Me,X){return{u_color:new t.UniformColor(Me,X.u_color),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_overlay:new t.Uniform1i(Me,X.u_overlay),u_overlay_scale:new t.Uniform1f(Me,X.u_overlay_scale)}},wi=function(Me,X,ge){return ge===void 0&&(ge=1),{u_matrix:Me,u_color:X,u_overlay:0,u_overlay_scale:ge}},ki=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},to=function(Me){return{u_matrix:Me}},ci=function(Me,X){return{u_extrude_scale:new t.Uniform1f(Me,X.u_extrude_scale),u_intensity:new t.Uniform1f(Me,X.u_intensity),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix)}},qi=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_world:new t.Uniform2f(Me,X.u_world),u_image:new t.Uniform1i(Me,X.u_image),u_color_ramp:new t.Uniform1i(Me,X.u_color_ramp),u_opacity:new t.Uniform1f(Me,X.u_opacity)}},xi=function(Me,X,ge,ne){return{u_matrix:Me,u_extrude_scale:Ks(X,1,ge),u_intensity:ne}},oi=function(Me,X,ge,ne){var Se=t.create();t.ortho(Se,0,Me.width,Me.height,0,0,1);var Je=Me.context.gl;return{u_matrix:Se,u_world:[Je.drawingBufferWidth,Je.drawingBufferHeight],u_image:ge,u_color_ramp:ne,u_opacity:X.paint.get("heatmap-opacity")}},fo=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_latrange:new t.Uniform2f(Me,X.u_latrange),u_light:new t.Uniform2f(Me,X.u_light),u_shadow:new t.UniformColor(Me,X.u_shadow),u_highlight:new t.UniformColor(Me,X.u_highlight),u_accent:new t.UniformColor(Me,X.u_accent)}},Qo=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_image:new t.Uniform1i(Me,X.u_image),u_dimension:new t.Uniform2f(Me,X.u_dimension),u_zoom:new t.Uniform1f(Me,X.u_zoom),u_unpack:new t.Uniform4f(Me,X.u_unpack)}},Yo=function(Me,X,ge){var ne=ge.paint.get("hillshade-shadow-color"),Se=ge.paint.get("hillshade-highlight-color"),Je=ge.paint.get("hillshade-accent-color"),_t=ge.paint.get("hillshade-illumination-direction")*(Math.PI/180);ge.paint.get("hillshade-illumination-anchor")==="viewport"&&(_t-=Me.transform.angle);var Tt=!Me.options.moving;return{u_matrix:Me.transform.calculatePosMatrix(X.tileID.toUnwrapped(),Tt),u_image:0,u_latrange:ts(Me,X.tileID),u_light:[ge.paint.get("hillshade-exaggeration"),_t],u_shadow:ne,u_highlight:Se,u_accent:Je}},is=function(Me,X){var ge=X.stride,ne=t.create();return t.ortho(ne,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(ne,ne,[0,-t.EXTENT,0]),{u_matrix:ne,u_image:1,u_dimension:[ge,ge],u_zoom:Me.overscaledZ,u_unpack:X.getUnpackVector()}};function ts(Me,X){var ge=Math.pow(2,X.canonical.z),ne=X.canonical.y;return[new t.MercatorCoordinate(0,ne/ge).toLngLat().lat,new t.MercatorCoordinate(0,(ne+1)/ge).toLngLat().lat]}var vo=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels)}},Yi=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_image:new t.Uniform1i(Me,X.u_image),u_image_height:new t.Uniform1f(Me,X.u_image_height)}},ys=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_image:new t.Uniform1i(Me,X.u_image),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_scale:new t.Uniform3f(Me,X.u_scale),u_fade:new t.Uniform1f(Me,X.u_fade)}},Ys=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_ratio:new t.Uniform1f(Me,X.u_ratio),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(Me,X.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(Me,X.u_patternscale_a),u_patternscale_b:new t.Uniform2f(Me,X.u_patternscale_b),u_sdfgamma:new t.Uniform1f(Me,X.u_sdfgamma),u_image:new t.Uniform1i(Me,X.u_image),u_tex_y_a:new t.Uniform1f(Me,X.u_tex_y_a),u_tex_y_b:new t.Uniform1f(Me,X.u_tex_y_b),u_mix:new t.Uniform1f(Me,X.u_mix)}},Rl=function(Me,X,ge){var ne=Me.transform;return{u_matrix:Du(Me,X,ge),u_ratio:1/Ks(X,1,ne.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/ne.pixelsToGLUnits[0],1/ne.pixelsToGLUnits[1]]}},Ql=function(Me,X,ge,ne){return t.extend(Rl(Me,X,ge),{u_image:0,u_image_height:ne})},Dl=function(Me,X,ge,ne){var Se=Me.transform,Je=cl(X,Se);return{u_matrix:Du(Me,X,ge),u_texsize:X.imageAtlasTexture.size,u_ratio:1/Ks(X,1,Se.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[Je,ne.fromScale,ne.toScale],u_fade:ne.t,u_units_to_pixels:[1/Se.pixelsToGLUnits[0],1/Se.pixelsToGLUnits[1]]}},eu=function(Me,X,ge,ne,Se){var Je=Me.transform,_t=Me.lineAtlas,Tt=cl(X,Je),it=ge.layout.get("line-cap")==="round",dt=_t.getDash(ne.from,it),Lt=_t.getDash(ne.to,it),or=dt.width*Se.fromScale,er=Lt.width*Se.toScale;return t.extend(Rl(Me,X,ge),{u_patternscale_a:[Tt/or,-dt.height/2],u_patternscale_b:[Tt/er,-Lt.height/2],u_sdfgamma:_t.width/(Math.min(or,er)*256*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:dt.y,u_tex_y_b:Lt.y,u_mix:Se.t})};function cl(Me,X){return 1/Ks(Me,1,X.tileZoom)}function Du(Me,X,ge){return Me.translatePosMatrix(X.tileID.posMatrix,X,ge.paint.get("line-translate"),ge.paint.get("line-translate-anchor"))}var Pu=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_tl_parent:new t.Uniform2f(Me,X.u_tl_parent),u_scale_parent:new t.Uniform1f(Me,X.u_scale_parent),u_buffer_scale:new t.Uniform1f(Me,X.u_buffer_scale),u_fade_t:new t.Uniform1f(Me,X.u_fade_t),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_image0:new t.Uniform1i(Me,X.u_image0),u_image1:new t.Uniform1i(Me,X.u_image1),u_brightness_low:new t.Uniform1f(Me,X.u_brightness_low),u_brightness_high:new t.Uniform1f(Me,X.u_brightness_high),u_saturation_factor:new t.Uniform1f(Me,X.u_saturation_factor),u_contrast_factor:new t.Uniform1f(Me,X.u_contrast_factor),u_spin_weights:new t.Uniform3f(Me,X.u_spin_weights)}},Zl=function(Me,X,ge,ne,Se){return{u_matrix:Me,u_tl_parent:X,u_scale_parent:ge,u_buffer_scale:1,u_fade_t:ne.mix,u_opacity:ne.opacity*Se.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Se.paint.get("raster-brightness-min"),u_brightness_high:Se.paint.get("raster-brightness-max"),u_saturation_factor:ql(Se.paint.get("raster-saturation")),u_contrast_factor:Ls(Se.paint.get("raster-contrast")),u_spin_weights:Oo(Se.paint.get("raster-hue-rotate"))}};function Oo(Me){Me*=Math.PI/180;var X=Math.sin(Me),ge=Math.cos(Me);return[(2*ge+1)/3,(-Math.sqrt(3)*X-ge+1)/3,(Math.sqrt(3)*X-ge+1)/3]}function Ls(Me){return Me>0?1/(1-Me):1+Me}function ql(Me){return Me>0?1-1/(1.001-Me):-Me}var Al=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texture:new t.Uniform1i(Me,X.u_texture)}},Tc=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texture:new t.Uniform1i(Me,X.u_texture),u_gamma_scale:new t.Uniform1f(Me,X.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Me,X.u_is_halo)}},Ac=function(Me,X){return{u_is_size_zoom_constant:new t.Uniform1i(Me,X.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(Me,X.u_is_size_feature_constant),u_size_t:new t.Uniform1f(Me,X.u_size_t),u_size:new t.Uniform1f(Me,X.u_size),u_camera_to_center_distance:new t.Uniform1f(Me,X.u_camera_to_center_distance),u_pitch:new t.Uniform1f(Me,X.u_pitch),u_rotate_symbol:new t.Uniform1i(Me,X.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(Me,X.u_aspect_ratio),u_fade_change:new t.Uniform1f(Me,X.u_fade_change),u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(Me,X.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(Me,X.u_coord_matrix),u_is_text:new t.Uniform1i(Me,X.u_is_text),u_pitch_with_map:new t.Uniform1i(Me,X.u_pitch_with_map),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_texsize_icon:new t.Uniform2f(Me,X.u_texsize_icon),u_texture:new t.Uniform1i(Me,X.u_texture),u_texture_icon:new t.Uniform1i(Me,X.u_texture_icon),u_gamma_scale:new t.Uniform1f(Me,X.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(Me,X.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(Me,X.u_is_halo)}},Pc=function(Me,X,ge,ne,Se,Je,_t,Tt,it,dt){var Lt=Se.transform;return{u_is_size_zoom_constant:+(Me==="constant"||Me==="source"),u_is_size_feature_constant:+(Me==="constant"||Me==="camera"),u_size_t:X?X.uSizeT:0,u_size:X?X.uSize:0,u_camera_to_center_distance:Lt.cameraToCenterDistance,u_pitch:Lt.pitch/360*2*Math.PI,u_rotate_symbol:+ge,u_aspect_ratio:Lt.width/Lt.height,u_fade_change:Se.options.fadeDuration?Se.symbolFadeChange:1,u_matrix:Je,u_label_plane_matrix:_t,u_coord_matrix:Tt,u_is_text:+it,u_pitch_with_map:+ne,u_texsize:dt,u_texture:0}},oh=function(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt){var or=Se.transform;return t.extend(Pc(Me,X,ge,ne,Se,Je,_t,Tt,it,dt),{u_gamma_scale:ne?Math.cos(or._pitch)*or.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:1})},Sc=function(Me,X,ge,ne,Se,Je,_t,Tt,it,dt){return t.extend(oh(Me,X,ge,ne,Se,Je,_t,Tt,!0,it),{u_texsize_icon:dt,u_texture_icon:1})},Ff=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_color:new t.UniformColor(Me,X.u_color)}},Ou=function(Me,X){return{u_matrix:new t.UniformMatrix4f(Me,X.u_matrix),u_opacity:new t.Uniform1f(Me,X.u_opacity),u_image:new t.Uniform1i(Me,X.u_image),u_pattern_tl_a:new t.Uniform2f(Me,X.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(Me,X.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(Me,X.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(Me,X.u_pattern_br_b),u_texsize:new t.Uniform2f(Me,X.u_texsize),u_mix:new t.Uniform1f(Me,X.u_mix),u_pattern_size_a:new t.Uniform2f(Me,X.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(Me,X.u_pattern_size_b),u_scale_a:new t.Uniform1f(Me,X.u_scale_a),u_scale_b:new t.Uniform1f(Me,X.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(Me,X.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(Me,X.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(Me,X.u_tile_units_to_pixels)}},Bf=function(Me,X,ge){return{u_matrix:Me,u_opacity:X,u_color:ge}},os=function(Me,X,ge,ne,Se,Je){return t.extend(Mh(ne,Je,ge,Se),{u_matrix:Me,u_opacity:X})},_s={fillExtrusion:Xd,fillExtrusionPattern:yc,fill:Nf,fillPattern:Sf,fillOutline:ku,fillOutlinePattern:kc,circle:wr,collisionBox:kn,collisionCircle:_n,debug:Ba,clippingMask:ki,heatmap:ci,heatmapTexture:qi,hillshade:fo,hillshadePrepare:Qo,line:vo,lineGradient:Yi,linePattern:ys,lineSDF:Ys,raster:Pu,symbolIcon:Al,symbolSDF:Tc,symbolTextAndIcon:Ac,background:Ff,backgroundPattern:Ou},jf;function nf(Me,X,ge,ne,Se,Je,_t){for(var Tt=Me.context,it=Tt.gl,dt=Me.useProgram("collisionBox"),Lt=[],or=0,er=0,ur=0;ur<ne.length;ur++){var mr=ne[ur],dr=X.getTile(mr),Yt=dr.getBucket(ge);if(Yt){var ar=mr.posMatrix;(Se[0]!==0||Se[1]!==0)&&(ar=Me.translatePosMatrix(mr.posMatrix,dr,Se,Je));var tr=_t?Yt.textCollisionBox:Yt.iconCollisionBox,Yr=Yt.collisionCircleArray;if(Yr.length>0){var un=t.create(),En=ar;t.mul(un,Yt.placementInvProjMatrix,Me.transform.glCoordMatrix),t.mul(un,un,Yt.placementViewportMatrix),Lt.push({circleArray:Yr,circleOffset:er,transform:En,invTransform:un}),or+=Yr.length/4,er=or}tr&&dt.draw(Tt,it.LINES,ia.disabled,ea.disabled,Me.colorModeForRenderPass(),nn.disabled,$n(ar,Me.transform,dr),ge.id,tr.layoutVertexBuffer,tr.indexBuffer,tr.segments,null,Me.transform.zoom,null,null,tr.collisionVertexBuffer)}}if(!(!_t||!Lt.length)){var Ea=Me.useProgram("collisionCircle"),fa=new t.StructArrayLayout2f1f2i16;fa.resize(or*4),fa._trim();for(var sa=0,Ma=0,La=Lt;Ma<La.length;Ma+=1)for(var Ja=La[Ma],ka=0;ka<Ja.circleArray.length/4;ka++){var ai=ka*4,gi=Ja.circleArray[ai+0],Vi=Ja.circleArray[ai+1],oo=Ja.circleArray[ai+2],Is=Ja.circleArray[ai+3];fa.emplace(sa++,gi,Vi,oo,Is,0),fa.emplace(sa++,gi,Vi,oo,Is,1),fa.emplace(sa++,gi,Vi,oo,Is,2),fa.emplace(sa++,gi,Vi,oo,Is,3)}(!jf||jf.length<or*2)&&(jf=Gc(or));for(var Cs=Tt.createIndexBuffer(jf,!0),Sl=Tt.createVertexBuffer(fa,t.collisionCircleLayout.members,!0),xl=0,Cl=Lt;xl<Cl.length;xl+=1){var El=Cl[xl],lc=Ga(El.transform,El.invTransform,Me.transform);Ea.draw(Tt,it.TRIANGLES,ia.disabled,ea.disabled,Me.colorModeForRenderPass(),nn.disabled,lc,ge.id,Sl,Cs,t.SegmentVector.simpleSegment(0,El.circleOffset*2,El.circleArray.length,El.circleArray.length/2),null,Me.transform.zoom,null,null,null)}Sl.destroy(),Cs.destroy()}}function Gc(Me){var X=Me*2,ge=new t.StructArrayLayout3ui6;ge.resize(X),ge._trim();for(var ne=0;ne<X;ne++){var Se=ne*6;ge.uint16[Se+0]=ne*4+0,ge.uint16[Se+1]=ne*4+1,ge.uint16[Se+2]=ne*4+2,ge.uint16[Se+3]=ne*4+2,ge.uint16[Se+4]=ne*4+3,ge.uint16[Se+5]=ne*4+0}return ge}var Ze=t.identity(new Float32Array(16));function O(Me,X,ge,ne,Se){if(Me.renderPass==="translucent"){var Je=ea.disabled,_t=Me.colorModeForRenderPass(),Tt=ge.layout.get("text-variable-anchor");Tt&&Re(ne,Me,ge,X,ge.layout.get("text-rotation-alignment"),ge.layout.get("text-pitch-alignment"),Se),ge.paint.get("icon-opacity").constantOr(1)!==0&&Mt(Me,X,ge,ne,!1,ge.paint.get("icon-translate"),ge.paint.get("icon-translate-anchor"),ge.layout.get("icon-rotation-alignment"),ge.layout.get("icon-pitch-alignment"),ge.layout.get("icon-keep-upright"),Je,_t),ge.paint.get("text-opacity").constantOr(1)!==0&&Mt(Me,X,ge,ne,!0,ge.paint.get("text-translate"),ge.paint.get("text-translate-anchor"),ge.layout.get("text-rotation-alignment"),ge.layout.get("text-pitch-alignment"),ge.layout.get("text-keep-upright"),Je,_t),X.map.showCollisionBoxes&&(nf(Me,X,ge,ne,ge.paint.get("text-translate"),ge.paint.get("text-translate-anchor"),!0),nf(Me,X,ge,ne,ge.paint.get("icon-translate"),ge.paint.get("icon-translate-anchor"),!1))}}function fe(Me,X,ge,ne,Se,Je){var _t=t.getAnchorAlignment(Me),Tt=_t.horizontalAlign,it=_t.verticalAlign,dt=-(Tt-.5)*X,Lt=-(it-.5)*ge,or=t.evaluateVariableOffset(Me,ne);return new t.Point((dt/Se+or[0])*Je,(Lt/Se+or[1])*Je)}function Re(Me,X,ge,ne,Se,Je,_t){for(var Tt=X.transform,it=Se==="map",dt=Je==="map",Lt=0,or=Me;Lt<or.length;Lt+=1){var er=or[Lt],ur=ne.getTile(er),mr=ur.getBucket(ge);if(!(!mr||!mr.text||!mr.text.segments.get().length)){var dr=mr.textSizeData,Yt=t.evaluateSizeForZoom(dr,Tt.zoom),ar=Ks(ur,1,X.transform.zoom),tr=Wn(er.posMatrix,dt,it,X.transform,ar),Yr=ge.layout.get("icon-text-fit")!=="none"&&mr.hasIconData();if(Yt){var un=Math.pow(2,Tt.zoom-ur.tileID.overscaledZ);Oe(mr,it,dt,_t,t.symbolSize,Tt,tr,er.posMatrix,un,Yt,Yr)}}}}function Oe(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt){var or=Me.text.placedSymbolArray,er=Me.text.dynamicLayoutVertexArray,ur=Me.icon.dynamicLayoutVertexArray,mr={};er.clear();for(var dr=0;dr<or.length;dr++){var Yt=or.get(dr),ar=Me.allowVerticalPlacement&&!Yt.placedOrientation,tr=!Yt.hidden&&Yt.crossTileID&&!ar?ne[Yt.crossTileID]:null;if(!tr)As(Yt.numGlyphs,er);else{var Yr=new t.Point(Yt.anchorX,Yt.anchorY),un=Ya(Yr,ge?Tt:_t),En=Wi(Je.cameraToCenterDistance,un.signedDistanceFromCamera),Ea=Se.evaluateSizeForFeature(Me.textSizeData,dt,Yt)*En/t.ONE_EM;ge&&(Ea*=Me.tilePixelRatio/it);for(var fa=tr.width,sa=tr.height,Ma=tr.anchor,La=tr.textOffset,Ja=tr.textBoxScale,ka=fe(Ma,fa,sa,La,Ja,Ea),ai=ge?Ya(Yr.add(ka),_t).point:un.point.add(X?ka.rotate(-Je.angle):ka),gi=Me.allowVerticalPlacement&&Yt.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,Vi=0;Vi<Yt.numGlyphs;Vi++)t.addDynamicAttributes(er,ai,gi);Lt&&Yt.associatedIconIndex>=0&&(mr[Yt.associatedIconIndex]={shiftedAnchor:ai,angle:gi})}}if(Lt){ur.clear();for(var oo=Me.icon.placedSymbolArray,Is=0;Is<oo.length;Is++){var Cs=oo.get(Is);if(Cs.hidden)As(Cs.numGlyphs,ur);else{var Sl=mr[Is];if(!Sl)As(Cs.numGlyphs,ur);else for(var xl=0;xl<Cs.numGlyphs;xl++)t.addDynamicAttributes(ur,Sl.shiftedAnchor,Sl.angle)}}Me.icon.dynamicLayoutVertexBuffer.updateData(ur)}Me.text.dynamicLayoutVertexBuffer.updateData(er)}function We(Me,X,ge){return ge.iconsInText&&X?"symbolTextAndIcon":Me?"symbolSDF":"symbolIcon"}function Mt(Me,X,ge,ne,Se,Je,_t,Tt,it,dt,Lt,or){for(var er=Me.context,ur=er.gl,mr=Me.transform,dr=Tt==="map",Yt=it==="map",ar=dr&&ge.layout.get("symbol-placement")!=="point",tr=dr&&!Yt&&!ar,Yr=ge.layout.get("symbol-sort-key").constantOr(1)!==void 0,un=!1,En=Me.depthModeForSublayer(0,ia.ReadOnly),Ea=ge.layout.get("text-variable-anchor"),fa=[],sa=0,Ma=ne;sa<Ma.length;sa+=1){var La=Ma[sa],Ja=X.getTile(La),ka=Ja.getBucket(ge);if(ka){var ai=Se?ka.text:ka.icon;if(!(!ai||!ai.segments.get().length)){var gi=ai.programConfigurations.get(ge.id),Vi=Se||ka.sdfIcons,oo=Se?ka.textSizeData:ka.iconSizeData,Is=Yt||mr.pitch!==0,Cs=Me.useProgram(We(Vi,Se,ka),gi),Sl=t.evaluateSizeForZoom(oo,mr.zoom),xl=void 0,Cl=[0,0],El=void 0,lc=void 0,vl=null,Eu=void 0;if(Se){if(El=Ja.glyphAtlasTexture,lc=ur.LINEAR,xl=Ja.glyphAtlasTexture.size,ka.iconsInText){Cl=Ja.imageAtlasTexture.size,vl=Ja.imageAtlasTexture;var sh=oo.kind==="composite"||oo.kind==="camera";Eu=Is||Me.options.rotating||Me.options.zooming||sh?ur.LINEAR:ur.NEAREST}}else{var Bh=ge.layout.get("icon-size").constantOr(0)!==1||ka.iconsNeedLinear;El=Ja.imageAtlasTexture,lc=Vi||Me.options.rotating||Me.options.zooming||Bh||Is?ur.LINEAR:ur.NEAREST,xl=Ja.imageAtlasTexture.size}var Ap=Ks(Ja,1,Me.transform.zoom),Sp=Wn(La.posMatrix,Yt,dr,Me.transform,Ap),Av=Fi(La.posMatrix,Yt,dr,Me.transform,Ap),Jp=Ea&&ka.hasTextData(),ry=ge.layout.get("icon-text-fit")!=="none"&&Jp&&ka.hasIconData();ar&&Ao(ka,La.posMatrix,Me,Se,Sp,Av,Yt,dt);var hm=Me.translatePosMatrix(La.posMatrix,Ja,Je,_t),Sv=ar||Se&&Ea||ry?Ze:Sp,dm=Me.translatePosMatrix(Av,Ja,Je,_t,!0),Hv=Vi&&ge.paint.get(Se?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ev=void 0;Vi?ka.iconsInText?Ev=Sc(oo.kind,Sl,tr,Yt,Me,hm,Sv,dm,xl,Cl):Ev=oh(oo.kind,Sl,tr,Yt,Me,hm,Sv,dm,Se,xl):Ev=Pc(oo.kind,Sl,tr,Yt,Me,hm,Sv,dm,Se,xl);var Ep={program:Cs,buffers:ai,uniformValues:Ev,atlasTexture:El,atlasTextureIcon:vl,atlasInterpolation:lc,atlasInterpolationIcon:Eu,isSDF:Vi,hasHalo:Hv};if(Yr&&ka.canOverlap){un=!0;for(var Qp=ai.segments.get(),Mp=0,i1=Qp;Mp<i1.length;Mp+=1){var ny=i1[Mp];fa.push({segments:new t.SegmentVector([ny]),sortKey:ny.sortKey,state:Ep})}}else fa.push({segments:ai.segments,sortKey:0,state:Ep})}}}un&&fa.sort(function(I_,D_){return I_.sortKey-D_.sortKey});for(var fd=0,ay=fa;fd<ay.length;fd+=1){var o1=ay[fd],Wd=o1.state;if(er.activeTexture.set(ur.TEXTURE0),Wd.atlasTexture.bind(Wd.atlasInterpolation,ur.CLAMP_TO_EDGE),Wd.atlasTextureIcon&&(er.activeTexture.set(ur.TEXTURE1),Wd.atlasTextureIcon&&Wd.atlasTextureIcon.bind(Wd.atlasInterpolationIcon,ur.CLAMP_TO_EDGE)),Wd.isSDF){var Qy=Wd.uniformValues;Wd.hasHalo&&(Qy.u_is_halo=1,zt(Wd.buffers,o1.segments,ge,Me,Wd.program,En,Lt,or,Qy)),Qy.u_is_halo=0}zt(Wd.buffers,o1.segments,ge,Me,Wd.program,En,Lt,or,Wd.uniformValues)}}function zt(Me,X,ge,ne,Se,Je,_t,Tt,it){var dt=ne.context,Lt=dt.gl;Se.draw(dt,Lt.TRIANGLES,Je,_t,Tt,nn.disabled,it,ge.id,Me.layoutVertexBuffer,Me.indexBuffer,X,ge.paint,ne.transform.zoom,Me.programConfigurations.get(ge.id),Me.dynamicLayoutVertexBuffer,Me.opacityVertexBuffer)}function rr(Me,X,ge,ne){if(Me.renderPass==="translucent"){var Se=ge.paint.get("circle-opacity"),Je=ge.paint.get("circle-stroke-width"),_t=ge.paint.get("circle-stroke-opacity"),Tt=ge.layout.get("circle-sort-key").constantOr(1)!==void 0;if(!(Se.constantOr(1)===0&&(Je.constantOr(1)===0||_t.constantOr(1)===0))){for(var it=Me.context,dt=it.gl,Lt=Me.depthModeForSublayer(0,ia.ReadOnly),or=ea.disabled,er=Me.colorModeForRenderPass(),ur=[],mr=0;mr<ne.length;mr++){var dr=ne[mr],Yt=X.getTile(dr),ar=Yt.getBucket(ge);if(ar){var tr=ar.programConfigurations.get(ge.id),Yr=Me.useProgram("circle",tr),un=ar.layoutVertexBuffer,En=ar.indexBuffer,Ea=Hr(Me,dr,Yt,ge),fa={programConfiguration:tr,program:Yr,layoutVertexBuffer:un,indexBuffer:En,uniformValues:Ea};if(Tt)for(var sa=ar.segments.get(),Ma=0,La=sa;Ma<La.length;Ma+=1){var Ja=La[Ma];ur.push({segments:new t.SegmentVector([Ja]),sortKey:Ja.sortKey,state:fa})}else ur.push({segments:ar.segments,sortKey:0,state:fa})}}Tt&&ur.sort(function(El,lc){return El.sortKey-lc.sortKey});for(var ka=0,ai=ur;ka<ai.length;ka+=1){var gi=ai[ka],Vi=gi.state,oo=Vi.programConfiguration,Is=Vi.program,Cs=Vi.layoutVertexBuffer,Sl=Vi.indexBuffer,xl=Vi.uniformValues,Cl=gi.segments;Is.draw(it,dt.TRIANGLES,Lt,or,er,nn.disabled,xl,ge.id,Cs,Sl,Cl,ge.paint,Me.transform.zoom,oo)}}}}function Tr(Me,X,ge,ne){if(ge.paint.get("heatmap-opacity")!==0)if(Me.renderPass==="offscreen"){var Se=Me.context,Je=Se.gl,_t=ea.disabled,Tt=new Qt([Je.ONE,Je.ONE],t.Color.transparent,[!0,!0,!0,!0]);zr(Se,Me,ge),Se.clear({color:t.Color.transparent});for(var it=0;it<ne.length;it++){var dt=ne[it];if(!X.hasRenderableParent(dt)){var Lt=X.getTile(dt),or=Lt.getBucket(ge);if(or){var er=or.programConfigurations.get(ge.id),ur=Me.useProgram("heatmap",er),mr=Me.transform,dr=mr.zoom;ur.draw(Se,Je.TRIANGLES,ia.disabled,_t,Tt,nn.disabled,xi(dt.posMatrix,Lt,dr,ge.paint.get("heatmap-intensity")),ge.id,or.layoutVertexBuffer,or.indexBuffer,or.segments,ge.paint,Me.transform.zoom,er)}}}Se.viewport.set([0,0,Me.width,Me.height])}else Me.renderPass==="translucent"&&(Me.context.setColorMode(Me.colorModeForRenderPass()),pn(Me,ge))}function zr(Me,X,ge){var ne=Me.gl;Me.activeTexture.set(ne.TEXTURE1),Me.viewport.set([0,0,X.width/4,X.height/4]);var Se=ge.heatmapFbo;if(Se)ne.bindTexture(ne.TEXTURE_2D,Se.colorAttachment.get()),Me.bindFramebuffer.set(Se.framebuffer);else{var Je=ne.createTexture();ne.bindTexture(ne.TEXTURE_2D,Je),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_S,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_WRAP_T,ne.CLAMP_TO_EDGE),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MIN_FILTER,ne.LINEAR),ne.texParameteri(ne.TEXTURE_2D,ne.TEXTURE_MAG_FILTER,ne.LINEAR),Se=ge.heatmapFbo=Me.createFramebuffer(X.width/4,X.height/4,!1),qr(Me,X,Je,Se)}}function qr(Me,X,ge,ne){var Se=Me.gl,Je=Me.extRenderToTextureHalfFloat?Me.extTextureHalfFloat.HALF_FLOAT_OES:Se.UNSIGNED_BYTE;Se.texImage2D(Se.TEXTURE_2D,0,Se.RGBA,X.width/4,X.height/4,0,Se.RGBA,Je,null),ne.colorAttachment.set(ge)}function pn(Me,X){var ge=Me.context,ne=ge.gl,Se=X.heatmapFbo;if(Se){ge.activeTexture.set(ne.TEXTURE0),ne.bindTexture(ne.TEXTURE_2D,Se.colorAttachment.get()),ge.activeTexture.set(ne.TEXTURE1);var Je=X.colorRampTexture;Je||(Je=X.colorRampTexture=new t.Texture(ge,X.colorRamp,ne.RGBA)),Je.bind(ne.LINEAR,ne.CLAMP_TO_EDGE),Me.useProgram("heatmapTexture").draw(ge,ne.TRIANGLES,ia.disabled,ea.disabled,Me.colorModeForRenderPass(),nn.disabled,oi(Me,X,0,1),X.id,Me.viewportBuffer,Me.quadTriangleIndexBuffer,Me.viewportSegments,X.paint,Me.transform.zoom)}}function Dn(Me,X,ge,ne){if(Me.renderPass==="translucent"){var Se=ge.paint.get("line-opacity"),Je=ge.paint.get("line-width");if(!(Se.constantOr(1)===0||Je.constantOr(1)===0))for(var _t=Me.depthModeForSublayer(0,ia.ReadOnly),Tt=Me.colorModeForRenderPass(),it=ge.paint.get("line-dasharray"),dt=ge.paint.get("line-pattern"),Lt=dt.constantOr(1),or=ge.paint.get("line-gradient"),er=ge.getCrossfadeParameters(),ur=Lt?"linePattern":it?"lineSDF":or?"lineGradient":"line",mr=Me.context,dr=mr.gl,Yt=!0,ar=0,tr=ne;ar<tr.length;ar+=1){var Yr=tr[ar],un=X.getTile(Yr);if(!(Lt&&!un.patternsLoaded())){var En=un.getBucket(ge);if(En){var Ea=En.programConfigurations.get(ge.id),fa=Me.context.program.get(),sa=Me.useProgram(ur,Ea),Ma=Yt||sa.program!==fa,La=dt.constantOr(null);if(La&&un.imageAtlas){var Ja=un.imageAtlas,ka=Ja.patternPositions[La.to.toString()],ai=Ja.patternPositions[La.from.toString()];ka&&ai&&Ea.setConstantPatternPositions(ka,ai)}var gi=Lt?Dl(Me,un,ge,er):it?eu(Me,un,ge,it,er):or?Ql(Me,un,ge,En.lineClipsArray.length):Rl(Me,un,ge);if(Lt)mr.activeTexture.set(dr.TEXTURE0),un.imageAtlasTexture.bind(dr.LINEAR,dr.CLAMP_TO_EDGE),Ea.updatePaintBuffers(er);else if(it&&(Ma||Me.lineAtlas.dirty))mr.activeTexture.set(dr.TEXTURE0),Me.lineAtlas.bind(mr);else if(or){var Vi=En.gradients[ge.id],oo=Vi.texture;if(ge.gradientVersion!==Vi.version){var Is=256;if(ge.stepInterpolant){var Cs=X.getSource().maxzoom,Sl=Yr.canonical.z===Cs?Math.ceil(1<<Me.transform.maxZoom-Yr.canonical.z):1,xl=En.maxLineLength/t.EXTENT,Cl=1024,El=xl*Cl*Sl;Is=t.clamp(t.nextPowerOfTwo(El),256,mr.maxTextureSize)}Vi.gradient=t.renderColorRamp({expression:ge.gradientExpression(),evaluationKey:"lineProgress",resolution:Is,image:Vi.gradient||void 0,clips:En.lineClipsArray}),Vi.texture?Vi.texture.update(Vi.gradient):Vi.texture=new t.Texture(mr,Vi.gradient,dr.RGBA),Vi.version=ge.gradientVersion,oo=Vi.texture}mr.activeTexture.set(dr.TEXTURE0),oo.bind(ge.stepInterpolant?dr.NEAREST:dr.LINEAR,dr.CLAMP_TO_EDGE)}sa.draw(mr,dr.TRIANGLES,_t,Me.stencilModeForClipping(Yr),Tt,nn.disabled,gi,ge.id,En.layoutVertexBuffer,En.indexBuffer,En.segments,ge.paint,Me.transform.zoom,Ea,En.layoutVertexBuffer2),Yt=!1}}}}}function nt(Me,X,ge,ne){var Se=ge.paint.get("fill-color"),Je=ge.paint.get("fill-opacity");if(Je.constantOr(1)!==0){var _t=Me.colorModeForRenderPass(),Tt=ge.paint.get("fill-pattern"),it=Me.opaquePassEnabledForLayer()&&!Tt.constantOr(1)&&Se.constantOr(t.Color.transparent).a===1&&Je.constantOr(0)===1?"opaque":"translucent";if(Me.renderPass===it){var dt=Me.depthModeForSublayer(1,Me.renderPass==="opaque"?ia.ReadWrite:ia.ReadOnly);ut(Me,X,ge,ne,dt,_t,!1)}if(Me.renderPass==="translucent"&&ge.paint.get("fill-antialias")){var Lt=Me.depthModeForSublayer(ge.getPaintProperty("fill-outline-color")?2:0,ia.ReadOnly);ut(Me,X,ge,ne,Lt,_t,!0)}}}function ut(Me,X,ge,ne,Se,Je,_t){var Tt=Me.context.gl,it=ge.paint.get("fill-pattern"),dt=it&&it.constantOr(1),Lt=ge.getCrossfadeParameters(),or,er,ur,mr,dr;_t?(er=dt&&!ge.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",or=Tt.LINES):(er=dt?"fillPattern":"fill",or=Tt.TRIANGLES);for(var Yt=0,ar=ne;Yt<ar.length;Yt+=1){var tr=ar[Yt],Yr=X.getTile(tr);if(!(dt&&!Yr.patternsLoaded())){var un=Yr.getBucket(ge);if(un){var En=un.programConfigurations.get(ge.id),Ea=Me.useProgram(er,En);dt&&(Me.context.activeTexture.set(Tt.TEXTURE0),Yr.imageAtlasTexture.bind(Tt.LINEAR,Tt.CLAMP_TO_EDGE),En.updatePaintBuffers(Lt));var fa=it.constantOr(null);if(fa&&Yr.imageAtlas){var sa=Yr.imageAtlas,Ma=sa.patternPositions[fa.to.toString()],La=sa.patternPositions[fa.from.toString()];Ma&&La&&En.setConstantPatternPositions(Ma,La)}var Ja=Me.translatePosMatrix(tr.posMatrix,Yr,ge.paint.get("fill-translate"),ge.paint.get("fill-translate-anchor"));if(!_t)mr=un.indexBuffer,dr=un.segments,ur=dt?Qf(Ja,Me,Lt,Yr):xu(Ja);else{mr=un.indexBuffer2,dr=un.segments2;var ka=[Tt.drawingBufferWidth,Tt.drawingBufferHeight];ur=er==="fillOutlinePattern"&&dt?ed(Ja,Me,Lt,Yr,ka):Ef(Ja,ka)}Ea.draw(Me.context,or,Se,Me.stencilModeForClipping(tr),Je,nn.disabled,ur,ge.id,un.layoutVertexBuffer,mr,dr,ge.paint,Me.transform.zoom,En)}}}}function wt(Me,X,ge,ne){var Se=ge.paint.get("fill-extrusion-opacity");if(Se!==0&&Me.renderPass==="translucent"){var Je=new ia(Me.context.gl.LEQUAL,ia.ReadWrite,Me.depthRangeFor3D);if(Se===1&&!ge.paint.get("fill-extrusion-pattern").constantOr(1)){var _t=Me.colorModeForRenderPass();kt(Me,X,ge,ne,Je,ea.disabled,_t)}else kt(Me,X,ge,ne,Je,ea.disabled,Qt.disabled),kt(Me,X,ge,ne,Je,Me.stencilModeFor3D(),Me.colorModeForRenderPass())}}function kt(Me,X,ge,ne,Se,Je,_t){for(var Tt=Me.context,it=Tt.gl,dt=ge.paint.get("fill-extrusion-pattern"),Lt=dt.constantOr(1),or=ge.getCrossfadeParameters(),er=ge.paint.get("fill-extrusion-opacity"),ur=0,mr=ne;ur<mr.length;ur+=1){var dr=mr[ur],Yt=X.getTile(dr),ar=Yt.getBucket(ge);if(ar){var tr=ar.programConfigurations.get(ge.id),Yr=Me.useProgram(Lt?"fillExtrusionPattern":"fillExtrusion",tr);Lt&&(Me.context.activeTexture.set(it.TEXTURE0),Yt.imageAtlasTexture.bind(it.LINEAR,it.CLAMP_TO_EDGE),tr.updatePaintBuffers(or));var un=dt.constantOr(null);if(un&&Yt.imageAtlas){var En=Yt.imageAtlas,Ea=En.patternPositions[un.to.toString()],fa=En.patternPositions[un.from.toString()];Ea&&fa&&tr.setConstantPatternPositions(Ea,fa)}var sa=Me.translatePosMatrix(dr.posMatrix,Yt,ge.paint.get("fill-extrusion-translate"),ge.paint.get("fill-extrusion-translate-anchor")),Ma=ge.paint.get("fill-extrusion-vertical-gradient"),La=Lt?rf(sa,Me,Ma,er,dr,or,Yt):cd(sa,Me,Ma,er);Yr.draw(Tt,Tt.gl.TRIANGLES,Se,Je,_t,nn.backCCW,La,ge.id,ar.layoutVertexBuffer,ar.indexBuffer,ar.segments,ge.paint,Me.transform.zoom,tr)}}}function Ht(Me,X,ge,ne){if(!(Me.renderPass!=="offscreen"&&Me.renderPass!=="translucent")){for(var Se=Me.context,Je=Me.depthModeForSublayer(0,ia.ReadOnly),_t=Me.colorModeForRenderPass(),Tt=Me.renderPass==="translucent"?Me.stencilConfigForOverlap(ne):[{},ne],it=Tt[0],dt=Tt[1],Lt=0,or=dt;Lt<or.length;Lt+=1){var er=or[Lt],ur=X.getTile(er);ur.needsHillshadePrepare&&Me.renderPass==="offscreen"?Kt(Me,ur,ge,Je,ea.disabled,_t):Me.renderPass==="translucent"&&Ot(Me,ur,ge,Je,it[er.overscaledZ],_t)}Se.viewport.set([0,0,Me.width,Me.height])}}function Ot(Me,X,ge,ne,Se,Je){var _t=Me.context,Tt=_t.gl,it=X.fbo;if(it){var dt=Me.useProgram("hillshade");_t.activeTexture.set(Tt.TEXTURE0),Tt.bindTexture(Tt.TEXTURE_2D,it.colorAttachment.get());var Lt=Yo(Me,X,ge);dt.draw(_t,Tt.TRIANGLES,ne,Se,Je,nn.disabled,Lt,ge.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}}function Kt(Me,X,ge,ne,Se,Je){var _t=Me.context,Tt=_t.gl,it=X.dem;if(it&&it.data){var dt=it.dim,Lt=it.stride,or=it.getPixels();if(_t.activeTexture.set(Tt.TEXTURE1),_t.pixelStoreUnpackPremultiplyAlpha.set(!1),X.demTexture=X.demTexture||Me.getTileTexture(Lt),X.demTexture){var er=X.demTexture;er.update(or,{premultiply:!1}),er.bind(Tt.NEAREST,Tt.CLAMP_TO_EDGE)}else X.demTexture=new t.Texture(_t,or,Tt.RGBA,{premultiply:!1}),X.demTexture.bind(Tt.NEAREST,Tt.CLAMP_TO_EDGE);_t.activeTexture.set(Tt.TEXTURE0);var ur=X.fbo;if(!ur){var mr=new t.Texture(_t,{width:dt,height:dt,data:null},Tt.RGBA);mr.bind(Tt.LINEAR,Tt.CLAMP_TO_EDGE),ur=X.fbo=_t.createFramebuffer(dt,dt,!0),ur.colorAttachment.set(mr.texture)}_t.bindFramebuffer.set(ur.framebuffer),_t.viewport.set([0,0,dt,dt]),Me.useProgram("hillshadePrepare").draw(_t,Tt.TRIANGLES,ne,Se,Je,nn.disabled,is(X.tileID,it),ge.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments),X.needsHillshadePrepare=!1}}function Cr(Me,X,ge,ne){if(Me.renderPass==="translucent"&&ge.paint.get("raster-opacity")!==0&&ne.length)for(var Se=Me.context,Je=Se.gl,_t=X.getSource(),Tt=Me.useProgram("raster"),it=Me.colorModeForRenderPass(),dt=_t instanceof de?[{},ne]:Me.stencilConfigForOverlap(ne),Lt=dt[0],or=dt[1],er=or[or.length-1].overscaledZ,ur=!Me.options.moving,mr=0,dr=or;mr<dr.length;mr+=1){var Yt=dr[mr],ar=Me.depthModeForSublayer(Yt.overscaledZ-er,ge.paint.get("raster-opacity")===1?ia.ReadWrite:ia.ReadOnly,Je.LESS),tr=X.getTile(Yt),Yr=Me.transform.calculatePosMatrix(Yt.toUnwrapped(),ur);tr.registerFadeDuration(ge.paint.get("raster-fade-duration"));var un=X.findLoadedParent(Yt,0),En=Or(tr,un,X,ge,Me.transform),Ea=void 0,fa=void 0,sa=ge.paint.get("raster-resampling")==="nearest"?Je.NEAREST:Je.LINEAR;Se.activeTexture.set(Je.TEXTURE0),tr.texture.bind(sa,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST),Se.activeTexture.set(Je.TEXTURE1),un?(un.texture.bind(sa,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST),Ea=Math.pow(2,un.tileID.overscaledZ-tr.tileID.overscaledZ),fa=[tr.tileID.canonical.x*Ea%1,tr.tileID.canonical.y*Ea%1]):tr.texture.bind(sa,Je.CLAMP_TO_EDGE,Je.LINEAR_MIPMAP_NEAREST);var Ma=Zl(Yr,fa||[0,0],Ea||1,En,ge);_t instanceof de?Tt.draw(Se,Je.TRIANGLES,ar,ea.disabled,it,nn.disabled,Ma,ge.id,_t.boundsBuffer,Me.quadTriangleIndexBuffer,_t.boundsSegments):Tt.draw(Se,Je.TRIANGLES,ar,Lt[Yt.overscaledZ],it,nn.disabled,Ma,ge.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}}function Or(Me,X,ge,ne,Se){var Je=ne.paint.get("raster-fade-duration");if(Je>0){var _t=t.browser.now(),Tt=(_t-Me.timeAdded)/Je,it=X?(_t-X.timeAdded)/Je:-1,dt=ge.getSource(),Lt=Se.coveringZoomLevel({tileSize:dt.tileSize,roundZoom:dt.roundZoom}),or=!X||Math.abs(X.tileID.overscaledZ-Lt)>Math.abs(Me.tileID.overscaledZ-Lt),er=or&&Me.refreshedUponExpiration?1:t.clamp(or?Tt:1-it,0,1);return Me.refreshedUponExpiration&&Tt>=1&&(Me.refreshedUponExpiration=!1),X?{opacity:1,mix:1-er}:{opacity:er,mix:0}}else return{opacity:1,mix:0}}function Vr(Me,X,ge){var ne=ge.paint.get("background-color"),Se=ge.paint.get("background-opacity");if(Se!==0){var Je=Me.context,_t=Je.gl,Tt=Me.transform,it=Tt.tileSize,dt=ge.paint.get("background-pattern");if(!Me.isPatternMissing(dt)){var Lt=!dt&&ne.a===1&&Se===1&&Me.opaquePassEnabledForLayer()?"opaque":"translucent";if(Me.renderPass===Lt){var or=ea.disabled,er=Me.depthModeForSublayer(0,Lt==="opaque"?ia.ReadWrite:ia.ReadOnly),ur=Me.colorModeForRenderPass(),mr=Me.useProgram(dt?"backgroundPattern":"background"),dr=Tt.coveringTiles({tileSize:it});dt&&(Je.activeTexture.set(_t.TEXTURE0),Me.imageManager.bind(Me.context));for(var Yt=ge.getCrossfadeParameters(),ar=0,tr=dr;ar<tr.length;ar+=1){var Yr=tr[ar],un=Me.transform.calculatePosMatrix(Yr.toUnwrapped()),En=dt?os(un,Se,Me,dt,{tileID:Yr,tileSize:it},Yt):Bf(un,Se,ne);mr.draw(Je,_t.TRIANGLES,er,or,ur,nn.disabled,En,ge.id,Me.tileExtentBuffer,Me.quadTriangleIndexBuffer,Me.tileExtentSegments)}}}}}var sn=new t.Color(1,0,0,1),bn=new t.Color(0,1,0,1),Un=new t.Color(0,0,1,1),Gn=new t.Color(1,0,1,1),ua=new t.Color(0,1,1,1);function Ha(Me){var X=Me.transform.padding,ge=3;mi(Me,Me.transform.height-(X.top||0),ge,sn),mi(Me,X.bottom||0,ge,bn),Ai(Me,X.left||0,ge,Un),Ai(Me,Me.transform.width-(X.right||0),ge,Gn);var ne=Me.transform.centerPoint;Ti(Me,ne.x,Me.transform.height-ne.y,ua)}function Ti(Me,X,ge,ne){var Se=20,Je=2;po(Me,X-Je/2,ge-Se/2,Je,Se,ne),po(Me,X-Se/2,ge-Je/2,Se,Je,ne)}function mi(Me,X,ge,ne){po(Me,0,X+ge/2,Me.transform.width,ge,ne)}function Ai(Me,X,ge,ne){po(Me,X-ge/2,0,ge,Me.transform.height,ne)}function po(Me,X,ge,ne,Se,Je){var _t=Me.context,Tt=_t.gl;Tt.enable(Tt.SCISSOR_TEST),Tt.scissor(X*t.browser.devicePixelRatio,ge*t.browser.devicePixelRatio,ne*t.browser.devicePixelRatio,Se*t.browser.devicePixelRatio),_t.clear({color:Je}),Tt.disable(Tt.SCISSOR_TEST)}function Fo(Me,X,ge){for(var ne=0;ne<ge.length;ne++)Po(Me,X,ge[ne])}function Po(Me,X,ge){var ne=Me.context,Se=ne.gl,Je=ge.posMatrix,_t=Me.useProgram("debug"),Tt=ia.disabled,it=ea.disabled,dt=Me.colorModeForRenderPass(),Lt="$debug";ne.activeTexture.set(Se.TEXTURE0),Me.emptyTexture.bind(Se.LINEAR,Se.CLAMP_TO_EDGE),_t.draw(ne,Se.LINE_STRIP,Tt,it,dt,nn.disabled,wi(Je,t.Color.red),Lt,Me.debugBuffer,Me.tileBorderIndexBuffer,Me.debugSegments);var or=X.getTileByID(ge.key).latestRawTileData,er=or&&or.byteLength||0,ur=Math.floor(er/1024),mr=X.getTile(ge).tileSize,dr=512/Math.min(mr,512)*(ge.overscaledZ/Me.transform.zoom)*.5,Yt=ge.canonical.toString();ge.overscaledZ!==ge.canonical.z&&(Yt+=" => "+ge.overscaledZ);var ar=Yt+" "+ur+"kb";us(Me,ar),_t.draw(ne,Se.TRIANGLES,Tt,it,Qt.alphaBlended,nn.disabled,wi(Je,t.Color.transparent,dr),Lt,Me.debugBuffer,Me.quadTriangleIndexBuffer,Me.debugSegments)}function us(Me,X){Me.initDebugOverlayCanvas();var ge=Me.debugOverlayCanvas,ne=Me.context.gl,Se=Me.debugOverlayCanvas.getContext("2d");Se.clearRect(0,0,ge.width,ge.height),Se.shadowColor="white",Se.shadowBlur=2,Se.lineWidth=1.5,Se.strokeStyle="white",Se.textBaseline="top",Se.font="bold 36px Open Sans, sans-serif",Se.fillText(X,5,5),Se.strokeText(X,5,5),Me.debugOverlayTexture.update(ge),Me.debugOverlayTexture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)}function il(Me,X,ge){var ne=Me.context,Se=ge.implementation;if(Me.renderPass==="offscreen"){var Je=Se.prerender;Je&&(Me.setCustomLayerDefaults(),ne.setColorMode(Me.colorModeForRenderPass()),Je.call(Se,ne.gl,Me.transform.customLayerMatrix()),ne.setDirty(),Me.setBaseState())}else if(Me.renderPass==="translucent"){Me.setCustomLayerDefaults(),ne.setColorMode(Me.colorModeForRenderPass()),ne.setStencilMode(ea.disabled);var _t=Se.renderingMode==="3d"?new ia(Me.context.gl.LEQUAL,ia.ReadWrite,Me.depthRangeFor3D):Me.depthModeForSublayer(0,ia.ReadOnly);ne.setDepthMode(_t),Se.render(ne.gl,Me.transform.customLayerMatrix()),ne.setDirty(),Me.setBaseState(),ne.bindFramebuffer.set(null)}}var ol={symbol:O,circle:rr,heatmap:Tr,line:Dn,fill:nt,"fill-extrusion":wt,hillshade:Ht,raster:Cr,background:Vr,debug:Fo,custom:il},Bs=function(X,ge){this.context=new wn(X),this.transform=ge,this._tileTextures={},this.setup(),this.numSublayers=Ln.maxUnderzooming+Ln.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new _u,this.gpuTimers={}};Bs.prototype.resize=function(X,ge){if(this.width=X*t.browser.devicePixelRatio,this.height=ge*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var ne=0,Se=this.style._order;ne<Se.length;ne+=1){var Je=Se[ne];this.style._layers[Je].resize()}},Bs.prototype.setup=function(){var X=this.context,ge=new t.StructArrayLayout2i4;ge.emplaceBack(0,0),ge.emplaceBack(t.EXTENT,0),ge.emplaceBack(0,t.EXTENT),ge.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=X.createVertexBuffer(ge,bf.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var ne=new t.StructArrayLayout2i4;ne.emplaceBack(0,0),ne.emplaceBack(t.EXTENT,0),ne.emplaceBack(0,t.EXTENT),ne.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=X.createVertexBuffer(ne,bf.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var Se=new t.StructArrayLayout4i8;Se.emplaceBack(0,0,0,0),Se.emplaceBack(t.EXTENT,0,t.EXTENT,0),Se.emplaceBack(0,t.EXTENT,0,t.EXTENT),Se.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=X.createVertexBuffer(Se,ye.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var Je=new t.StructArrayLayout2i4;Je.emplaceBack(0,0),Je.emplaceBack(1,0),Je.emplaceBack(0,1),Je.emplaceBack(1,1),this.viewportBuffer=X.createVertexBuffer(Je,bf.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var _t=new t.StructArrayLayout1ui2;_t.emplaceBack(0),_t.emplaceBack(1),_t.emplaceBack(3),_t.emplaceBack(2),_t.emplaceBack(0),this.tileBorderIndexBuffer=X.createIndexBuffer(_t);var Tt=new t.StructArrayLayout3ui6;Tt.emplaceBack(0,1,2),Tt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=X.createIndexBuffer(Tt),this.emptyTexture=new t.Texture(X,{width:1,height:1,data:new Uint8Array([0,0,0,0])},X.gl.RGBA);var it=this.context.gl;this.stencilClearMode=new ea({func:it.ALWAYS,mask:0},0,255,it.ZERO,it.ZERO,it.ZERO)},Bs.prototype.clearStencil=function(){var X=this.context,ge=X.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var ne=t.create();t.ortho(ne,0,this.width,this.height,0,0,1),t.scale(ne,ne,[ge.drawingBufferWidth,ge.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(X,ge.TRIANGLES,ia.disabled,this.stencilClearMode,Qt.disabled,nn.disabled,to(ne),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},Bs.prototype._renderTileClippingMasks=function(X,ge){if(!(this.currentStencilSource===X.source||!X.isTileClipped()||!ge||!ge.length)){this.currentStencilSource=X.source;var ne=this.context,Se=ne.gl;this.nextStencilID+ge.length>256&&this.clearStencil(),ne.setColorMode(Qt.disabled),ne.setDepthMode(ia.disabled);var Je=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var _t=0,Tt=ge;_t<Tt.length;_t+=1){var it=Tt[_t],dt=this._tileClippingMaskIDs[it.key]=this.nextStencilID++;Je.draw(ne,Se.TRIANGLES,ia.disabled,new ea({func:Se.ALWAYS,mask:0},dt,255,Se.KEEP,Se.KEEP,Se.REPLACE),Qt.disabled,nn.disabled,to(it.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},Bs.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var X=this.nextStencilID++,ge=this.context.gl;return new ea({func:ge.NOTEQUAL,mask:255},X,255,ge.KEEP,ge.KEEP,ge.REPLACE)},Bs.prototype.stencilModeForClipping=function(X){var ge=this.context.gl;return new ea({func:ge.EQUAL,mask:255},this._tileClippingMaskIDs[X.key],0,ge.KEEP,ge.KEEP,ge.REPLACE)},Bs.prototype.stencilConfigForOverlap=function(X){var ge,ne=this.context.gl,Se=X.sort(function(dt,Lt){return Lt.overscaledZ-dt.overscaledZ}),Je=Se[Se.length-1].overscaledZ,_t=Se[0].overscaledZ-Je+1;if(_t>1){this.currentStencilSource=void 0,this.nextStencilID+_t>256&&this.clearStencil();for(var Tt={},it=0;it<_t;it++)Tt[it+Je]=new ea({func:ne.GEQUAL,mask:255},it+this.nextStencilID,255,ne.KEEP,ne.KEEP,ne.REPLACE);return this.nextStencilID+=_t,[Tt,Se]}return[(ge={},ge[Je]=ea.disabled,ge),Se]},Bs.prototype.colorModeForRenderPass=function(){var X=this.context.gl;if(this._showOverdrawInspector){var ge=8,ne=1/ge;return new Qt([X.CONSTANT_COLOR,X.ONE],new t.Color(ne,ne,ne,0),[!0,!0,!0,!0])}else return this.renderPass==="opaque"?Qt.unblended:Qt.alphaBlended},Bs.prototype.depthModeForSublayer=function(X,ge,ne){if(!this.opaquePassEnabledForLayer())return ia.disabled;var Se=1-((1+this.currentLayer)*this.numSublayers+X)*this.depthEpsilon;return new ia(ne||this.context.gl.LEQUAL,ge,[Se,Se])},Bs.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},Bs.prototype.render=function(X,ge){var ne=this;this.style=X,this.options=ge,this.lineAtlas=X.lineAtlas,this.imageManager=X.imageManager,this.glyphManager=X.glyphManager,this.symbolFadeChange=X.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var Se=this.style._order,Je=this.style.sourceCaches;for(var _t in Je){var Tt=Je[_t];Tt.used&&Tt.prepare(this.context)}var it={},dt={},Lt={};for(var or in Je){var er=Je[or];it[or]=er.getVisibleCoordinates(),dt[or]=it[or].slice().reverse(),Lt[or]=er.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var ur=0;ur<Se.length;ur++){var mr=Se[ur];if(this.style._layers[mr].is3D()){this.opaquePassCutoff=ur;break}}this.renderPass="offscreen";for(var dr=0,Yt=Se;dr<Yt.length;dr+=1){var ar=Yt[dr],tr=this.style._layers[ar];if(!(!tr.hasOffscreenPass()||tr.isHidden(this.transform.zoom))){var Yr=dt[tr.source];tr.type!=="custom"&&!Yr.length||this.renderLayer(this,Je[tr.source],tr,Yr)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:ge.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=ge.showOverdrawInspector,this.depthRangeFor3D=[0,1-(X._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=Se.length-1;this.currentLayer>=0;this.currentLayer--){var un=this.style._layers[Se[this.currentLayer]],En=Je[un.source],Ea=it[un.source];this._renderTileClippingMasks(un,Ea),this.renderLayer(this,En,un,Ea)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Se.length;this.currentLayer++){var fa=this.style._layers[Se[this.currentLayer]],sa=Je[fa.source],Ma=(fa.type==="symbol"?Lt:dt)[fa.source];this._renderTileClippingMasks(fa,it[fa.source]),this.renderLayer(this,sa,fa,Ma)}if(this.options.showTileBoundaries){var La,Ja,ka=t.values(this.style._layers);ka.forEach(function(ai){ai.source&&!ai.isHidden(ne.transform.zoom)&&(ai.source!==(Ja&&Ja.id)&&(Ja=ne.style.sourceCaches[ai.source]),(!La||La.getSource().maxzoom<Ja.getSource().maxzoom)&&(La=Ja))}),La&&ol.debug(this,La,La.getVisibleCoordinates())}this.options.showPadding&&Ha(this),this.context.setDefault()},Bs.prototype.renderLayer=function(X,ge,ne,Se){ne.isHidden(this.transform.zoom)||ne.type!=="background"&&ne.type!=="custom"&&!Se.length||(this.id=ne.id,this.gpuTimingStart(ne),ol[ne.type](X,ge,ne,Se,this.style.placement.variableOffsets),this.gpuTimingEnd())},Bs.prototype.gpuTimingStart=function(X){if(this.options.gpuTiming){var ge=this.context.extTimerQuery,ne=this.gpuTimers[X.id];ne||(ne=this.gpuTimers[X.id]={calls:0,cpuTime:0,query:ge.createQueryEXT()}),ne.calls++,ge.beginQueryEXT(ge.TIME_ELAPSED_EXT,ne.query)}},Bs.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var X=this.context.extTimerQuery;X.endQueryEXT(X.TIME_ELAPSED_EXT)}},Bs.prototype.collectGpuTimers=function(){var X=this.gpuTimers;return this.gpuTimers={},X},Bs.prototype.queryGpuTimers=function(X){var ge={};for(var ne in X){var Se=X[ne],Je=this.context.extTimerQuery,_t=Je.getQueryObjectEXT(Se.query,Je.QUERY_RESULT_EXT)/(1e3*1e3);Je.deleteQueryEXT(Se.query),ge[ne]=_t}return ge},Bs.prototype.translatePosMatrix=function(X,ge,ne,Se,Je){if(!ne[0]&&!ne[1])return X;var _t=Je?Se==="map"?this.transform.angle:0:Se==="viewport"?-this.transform.angle:0;if(_t){var Tt=Math.sin(_t),it=Math.cos(_t);ne=[ne[0]*it-ne[1]*Tt,ne[0]*Tt+ne[1]*it]}var dt=[Je?ne[0]:Ks(ge,ne[0],this.transform.zoom),Je?ne[1]:Ks(ge,ne[1],this.transform.zoom),0],Lt=new Float32Array(16);return t.translate(Lt,X,dt),Lt},Bs.prototype.saveTileTexture=function(X){var ge=this._tileTextures[X.size[0]];ge?ge.push(X):this._tileTextures[X.size[0]]=[X]},Bs.prototype.getTileTexture=function(X){var ge=this._tileTextures[X];return ge&&ge.length>0?ge.pop():null},Bs.prototype.isPatternMissing=function(X){if(!X)return!1;if(!X.from||!X.to)return!0;var ge=this.imageManager.getPattern(X.from.toString()),ne=this.imageManager.getPattern(X.to.toString());return!ge||!ne},Bs.prototype.useProgram=function(X,ge){this.cache=this.cache||{};var ne=""+X+(ge?ge.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[ne]||(this.cache[ne]=new Eh(this.context,X,Sh[X],ge,_s[X],this._showOverdrawInspector)),this.cache[ne]},Bs.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},Bs.prototype.setBaseState=function(){var X=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(X.FUNC_ADD)},Bs.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var X=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,X.RGBA)}},Bs.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var hl=function(X,ge){this.points=X,this.planes=ge};hl.fromInvProjectionMatrix=function(X,ge,ne){var Se=[[-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]],Je=Math.pow(2,ne),_t=Se.map(function(dt){return t.transformMat4([],dt,X)}).map(function(dt){return t.scale$1([],dt,1/dt[3]/ge*Je)}),Tt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],it=Tt.map(function(dt){var Lt=t.sub([],_t[dt[0]],_t[dt[1]]),or=t.sub([],_t[dt[2]],_t[dt[1]]),er=t.normalize([],t.cross([],Lt,or)),ur=-t.dot(er,_t[dt[1]]);return er.concat(ur)});return new hl(_t,it)};var bu=function(X,ge){this.min=X,this.max=ge,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};bu.prototype.quadrant=function(X){for(var ge=[X%2===0,X<2],ne=t.clone$2(this.min),Se=t.clone$2(this.max),Je=0;Je<ge.length;Je++)ne[Je]=ge[Je]?this.min[Je]:this.center[Je],Se[Je]=ge[Je]?this.center[Je]:this.max[Je];return Se[2]=this.max[2],new bu(ne,Se)},bu.prototype.distanceX=function(X){var ge=Math.max(Math.min(this.max[0],X[0]),this.min[0]);return ge-X[0]},bu.prototype.distanceY=function(X){var ge=Math.max(Math.min(this.max[1],X[1]),this.min[1]);return ge-X[1]},bu.prototype.intersects=function(X){for(var ge=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],ne=!0,Se=0;Se<X.planes.length;Se++){for(var Je=X.planes[Se],_t=0,Tt=0;Tt<ge.length;Tt++)_t+=t.dot$1(Je,ge[Tt])>=0;if(_t===0)return 0;_t!==ge.length&&(ne=!1)}if(ne)return 2;for(var it=0;it<3;it++){for(var dt=Number.MAX_VALUE,Lt=-Number.MAX_VALUE,or=0;or<X.points.length;or++){var er=X.points[or][it]-this.min[it];dt=Math.min(dt,er),Lt=Math.max(Lt,er)}if(Lt<0||dt>this.max[it]-this.min[it])return 0}return 1};var cu=function(X,ge,ne,Se){if(X===void 0&&(X=0),ge===void 0&&(ge=0),ne===void 0&&(ne=0),Se===void 0&&(Se=0),isNaN(X)||X<0||isNaN(ge)||ge<0||isNaN(ne)||ne<0||isNaN(Se)||Se<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=X,this.bottom=ge,this.left=ne,this.right=Se};cu.prototype.interpolate=function(X,ge,ne){return ge.top!=null&&X.top!=null&&(this.top=t.number(X.top,ge.top,ne)),ge.bottom!=null&&X.bottom!=null&&(this.bottom=t.number(X.bottom,ge.bottom,ne)),ge.left!=null&&X.left!=null&&(this.left=t.number(X.left,ge.left,ne)),ge.right!=null&&X.right!=null&&(this.right=t.number(X.right,ge.right,ne)),this},cu.prototype.getCenter=function(X,ge){var ne=t.clamp((this.left+X-this.right)/2,0,X),Se=t.clamp((this.top+ge-this.bottom)/2,0,ge);return new t.Point(ne,Se)},cu.prototype.equals=function(X){return this.top===X.top&&this.bottom===X.bottom&&this.left===X.left&&this.right===X.right},cu.prototype.clone=function(){return new cu(this.top,this.bottom,this.left,this.right)},cu.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var js=function(X,ge,ne,Se,Je){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Je===void 0?!0:Je,this._minZoom=X||0,this._maxZoom=ge||22,this._minPitch=ne??0,this._maxPitch=Se??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new cu,this._posMatrixCache={},this._alignedPosMatrixCache={}},Us={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};js.prototype.clone=function(){var X=new js(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return X.tileSize=this.tileSize,X.latRange=this.latRange,X.width=this.width,X.height=this.height,X._center=this._center,X.zoom=this.zoom,X.angle=this.angle,X._fov=this._fov,X._pitch=this._pitch,X._unmodified=this._unmodified,X._edgeInsets=this._edgeInsets.clone(),X._calcMatrices(),X},Us.minZoom.get=function(){return this._minZoom},Us.minZoom.set=function(Me){this._minZoom!==Me&&(this._minZoom=Me,this.zoom=Math.max(this.zoom,Me))},Us.maxZoom.get=function(){return this._maxZoom},Us.maxZoom.set=function(Me){this._maxZoom!==Me&&(this._maxZoom=Me,this.zoom=Math.min(this.zoom,Me))},Us.minPitch.get=function(){return this._minPitch},Us.minPitch.set=function(Me){this._minPitch!==Me&&(this._minPitch=Me,this.pitch=Math.max(this.pitch,Me))},Us.maxPitch.get=function(){return this._maxPitch},Us.maxPitch.set=function(Me){this._maxPitch!==Me&&(this._maxPitch=Me,this.pitch=Math.min(this.pitch,Me))},Us.renderWorldCopies.get=function(){return this._renderWorldCopies},Us.renderWorldCopies.set=function(Me){Me===void 0?Me=!0:Me===null&&(Me=!1),this._renderWorldCopies=Me},Us.worldSize.get=function(){return this.tileSize*this.scale},Us.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Us.size.get=function(){return new t.Point(this.width,this.height)},Us.bearing.get=function(){return-this.angle/Math.PI*180},Us.bearing.set=function(Me){var X=-t.wrap(Me,-180,180)*Math.PI/180;this.angle!==X&&(this._unmodified=!1,this.angle=X,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Us.pitch.get=function(){return this._pitch/Math.PI*180},Us.pitch.set=function(Me){var X=t.clamp(Me,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==X&&(this._unmodified=!1,this._pitch=X,this._calcMatrices())},Us.fov.get=function(){return this._fov/Math.PI*180},Us.fov.set=function(Me){Me=Math.max(.01,Math.min(60,Me)),this._fov!==Me&&(this._unmodified=!1,this._fov=Me/180*Math.PI,this._calcMatrices())},Us.zoom.get=function(){return this._zoom},Us.zoom.set=function(Me){var X=Math.min(Math.max(Me,this.minZoom),this.maxZoom);this._zoom!==X&&(this._unmodified=!1,this._zoom=X,this.scale=this.zoomScale(X),this.tileZoom=Math.floor(X),this.zoomFraction=X-this.tileZoom,this._constrain(),this._calcMatrices())},Us.center.get=function(){return this._center},Us.center.set=function(Me){Me.lat===this._center.lat&&Me.lng===this._center.lng||(this._unmodified=!1,this._center=Me,this._constrain(),this._calcMatrices())},Us.padding.get=function(){return this._edgeInsets.toJSON()},Us.padding.set=function(Me){this._edgeInsets.equals(Me)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,Me,1),this._calcMatrices())},Us.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},js.prototype.isPaddingEqual=function(X){return this._edgeInsets.equals(X)},js.prototype.interpolatePadding=function(X,ge,ne){this._unmodified=!1,this._edgeInsets.interpolate(X,ge,ne),this._constrain(),this._calcMatrices()},js.prototype.coveringZoomLevel=function(X){var ge=(X.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/X.tileSize));return Math.max(0,ge)},js.prototype.getVisibleUnwrappedCoordinates=function(X){var ge=[new t.UnwrappedTileID(0,X)];if(this._renderWorldCopies)for(var ne=this.pointCoordinate(new t.Point(0,0)),Se=this.pointCoordinate(new t.Point(this.width,0)),Je=this.pointCoordinate(new t.Point(this.width,this.height)),_t=this.pointCoordinate(new t.Point(0,this.height)),Tt=Math.floor(Math.min(ne.x,Se.x,Je.x,_t.x)),it=Math.floor(Math.max(ne.x,Se.x,Je.x,_t.x)),dt=1,Lt=Tt-dt;Lt<=it+dt;Lt++)Lt!==0&&ge.push(new t.UnwrappedTileID(Lt,X));return ge},js.prototype.coveringTiles=function(X){var ge=this.coveringZoomLevel(X),ne=ge;if(X.minzoom!==void 0&&ge<X.minzoom)return[];X.maxzoom!==void 0&&ge>X.maxzoom&&(ge=X.maxzoom);var Se=t.MercatorCoordinate.fromLngLat(this.center),Je=Math.pow(2,ge),_t=[Je*Se.x,Je*Se.y,0],Tt=hl.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,ge),it=X.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(it=ge);var dt=3,Lt=function(ka){return{aabb:new bu([ka*Je,0,0],[(ka+1)*Je,Je,0]),zoom:0,x:0,y:0,wrap:ka,fullyVisible:!1}},or=[],er=[],ur=ge,mr=X.reparseOverscaled?ne:ge;if(this._renderWorldCopies)for(var dr=1;dr<=3;dr++)or.push(Lt(-dr)),or.push(Lt(dr));for(or.push(Lt(0));or.length>0;){var Yt=or.pop(),ar=Yt.x,tr=Yt.y,Yr=Yt.fullyVisible;if(!Yr){var un=Yt.aabb.intersects(Tt);if(un===0)continue;Yr=un===2}var En=Yt.aabb.distanceX(_t),Ea=Yt.aabb.distanceY(_t),fa=Math.max(Math.abs(En),Math.abs(Ea)),sa=dt+(1<<ur-Yt.zoom)-2;if(Yt.zoom===ur||fa>sa&&Yt.zoom>=it){er.push({tileID:new t.OverscaledTileID(Yt.zoom===ur?mr:Yt.zoom,Yt.wrap,Yt.zoom,ar,tr),distanceSq:t.sqrLen([_t[0]-.5-ar,_t[1]-.5-tr])});continue}for(var Ma=0;Ma<4;Ma++){var La=(ar<<1)+Ma%2,Ja=(tr<<1)+(Ma>>1);or.push({aabb:Yt.aabb.quadrant(Ma),zoom:Yt.zoom+1,x:La,y:Ja,wrap:Yt.wrap,fullyVisible:Yr})}}return er.sort(function(ka,ai){return ka.distanceSq-ai.distanceSq}).map(function(ka){return ka.tileID})},js.prototype.resize=function(X,ge){this.width=X,this.height=ge,this.pixelsToGLUnits=[2/X,-2/ge],this._constrain(),this._calcMatrices()},Us.unmodified.get=function(){return this._unmodified},js.prototype.zoomScale=function(X){return Math.pow(2,X)},js.prototype.scaleZoom=function(X){return Math.log(X)/Math.LN2},js.prototype.project=function(X){var ge=t.clamp(X.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(X.lng)*this.worldSize,t.mercatorYfromLat(ge)*this.worldSize)},js.prototype.unproject=function(X){return new t.MercatorCoordinate(X.x/this.worldSize,X.y/this.worldSize).toLngLat()},Us.point.get=function(){return this.project(this.center)},js.prototype.setLocationAtPoint=function(X,ge){var ne=this.pointCoordinate(ge),Se=this.pointCoordinate(this.centerPoint),Je=this.locationCoordinate(X),_t=new t.MercatorCoordinate(Je.x-(ne.x-Se.x),Je.y-(ne.y-Se.y));this.center=this.coordinateLocation(_t),this._renderWorldCopies&&(this.center=this.center.wrap())},js.prototype.locationPoint=function(X){return this.coordinatePoint(this.locationCoordinate(X))},js.prototype.pointLocation=function(X){return this.coordinateLocation(this.pointCoordinate(X))},js.prototype.locationCoordinate=function(X){return t.MercatorCoordinate.fromLngLat(X)},js.prototype.coordinateLocation=function(X){return X.toLngLat()},js.prototype.pointCoordinate=function(X){var ge=0,ne=[X.x,X.y,0,1],Se=[X.x,X.y,1,1];t.transformMat4(ne,ne,this.pixelMatrixInverse),t.transformMat4(Se,Se,this.pixelMatrixInverse);var Je=ne[3],_t=Se[3],Tt=ne[0]/Je,it=Se[0]/_t,dt=ne[1]/Je,Lt=Se[1]/_t,or=ne[2]/Je,er=Se[2]/_t,ur=or===er?0:(ge-or)/(er-or);return new t.MercatorCoordinate(t.number(Tt,it,ur)/this.worldSize,t.number(dt,Lt,ur)/this.worldSize)},js.prototype.coordinatePoint=function(X){var ge=[X.x*this.worldSize,X.y*this.worldSize,0,1];return t.transformMat4(ge,ge,this.pixelMatrix),new t.Point(ge[0]/ge[3],ge[1]/ge[3])},js.prototype.getBounds=function(){return new t.LngLatBounds().extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},js.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},js.prototype.setMaxBounds=function(X){X?(this.lngRange=[X.getWest(),X.getEast()],this.latRange=[X.getSouth(),X.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},js.prototype.calculatePosMatrix=function(X,ge){ge===void 0&&(ge=!1);var ne=X.key,Se=ge?this._alignedPosMatrixCache:this._posMatrixCache;if(Se[ne])return Se[ne];var Je=X.canonical,_t=this.worldSize/this.zoomScale(Je.z),Tt=Je.x+Math.pow(2,Je.z)*X.wrap,it=t.identity(new Float64Array(16));return t.translate(it,it,[Tt*_t,Je.y*_t,0]),t.scale(it,it,[_t/t.EXTENT,_t/t.EXTENT,1]),t.multiply(it,ge?this.alignedProjMatrix:this.projMatrix,it),Se[ne]=new Float32Array(it),Se[ne]},js.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},js.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var X=-90,ge=90,ne=-180,Se=180,Je,_t,Tt,it,dt=this.size,Lt=this._unmodified;if(this.latRange){var or=this.latRange;X=t.mercatorYfromLat(or[1])*this.worldSize,ge=t.mercatorYfromLat(or[0])*this.worldSize,Je=ge-X<dt.y?dt.y/(ge-X):0}if(this.lngRange){var er=this.lngRange;ne=t.mercatorXfromLng(er[0])*this.worldSize,Se=t.mercatorXfromLng(er[1])*this.worldSize,_t=Se-ne<dt.x?dt.x/(Se-ne):0}var ur=this.point,mr=Math.max(_t||0,Je||0);if(mr){this.center=this.unproject(new t.Point(_t?(Se+ne)/2:ur.x,Je?(ge+X)/2:ur.y)),this.zoom+=this.scaleZoom(mr),this._unmodified=Lt,this._constraining=!1;return}if(this.latRange){var dr=ur.y,Yt=dt.y/2;dr-Yt<X&&(it=X+Yt),dr+Yt>ge&&(it=ge-Yt)}if(this.lngRange){var ar=ur.x,tr=dt.x/2;ar-tr<ne&&(Tt=ne+tr),ar+tr>Se&&(Tt=Se-tr)}(Tt!==void 0||it!==void 0)&&(this.center=this.unproject(new t.Point(Tt!==void 0?Tt:ur.x,it!==void 0?it:ur.y))),this._unmodified=Lt,this._constraining=!1}},js.prototype._calcMatrices=function(){if(this.height){var X=this._fov/2,ge=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(X)*this.height;var ne=Math.PI/2+this._pitch,Se=this._fov*(.5+ge.y/this.height),Je=Math.sin(Se)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-ne-Se,.01,Math.PI-.01)),_t=this.point,Tt=_t.x,it=_t.y,dt=Math.cos(Math.PI/2-this._pitch)*Je+this.cameraToCenterDistance,Lt=dt*1.01,or=this.height/50,er=new Float64Array(16);t.perspective(er,this._fov,this.width/this.height,or,Lt),er[8]=-ge.x*2/this.width,er[9]=ge.y*2/this.height,t.scale(er,er,[1,-1,1]),t.translate(er,er,[0,0,-this.cameraToCenterDistance]),t.rotateX(er,er,this._pitch),t.rotateZ(er,er,this.angle),t.translate(er,er,[-Tt,-it,0]),this.mercatorMatrix=t.scale([],er,[this.worldSize,this.worldSize,this.worldSize]),t.scale(er,er,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=er,this.invProjMatrix=t.invert([],this.projMatrix);var ur=this.width%2/2,mr=this.height%2/2,dr=Math.cos(this.angle),Yt=Math.sin(this.angle),ar=Tt-Math.round(Tt)+dr*ur+Yt*mr,tr=it-Math.round(it)+dr*mr+Yt*ur,Yr=new Float64Array(er);if(t.translate(Yr,Yr,[ar>.5?ar-1:ar,tr>.5?tr-1:tr,0]),this.alignedProjMatrix=Yr,er=t.create(),t.scale(er,er,[this.width/2,-this.height/2,1]),t.translate(er,er,[1,-1,0]),this.labelPlaneMatrix=er,er=t.create(),t.scale(er,er,[1,-1,1]),t.translate(er,er,[-1,-1,0]),t.scale(er,er,[2/this.width,2/this.height,1]),this.glCoordMatrix=er,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),er=t.invert(new Float64Array(16),this.pixelMatrix),!er)throw new Error("failed to invert matrix");this.pixelMatrixInverse=er,this._posMatrixCache={},this._alignedPosMatrixCache={}}},js.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var X=this.pointCoordinate(new t.Point(0,0)),ge=[X.x*this.worldSize,X.y*this.worldSize,0,1],ne=t.transformMat4(ge,ge,this.pixelMatrix);return ne[3]/this.cameraToCenterDistance},js.prototype.getCameraPoint=function(){var X=this._pitch,ge=Math.tan(X)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,ge))},js.prototype.getCameraQueryGeometry=function(X){var ge=this.getCameraPoint();if(X.length===1)return[X[0],ge];for(var ne=ge.x,Se=ge.y,Je=ge.x,_t=ge.y,Tt=0,it=X;Tt<it.length;Tt+=1){var dt=it[Tt];ne=Math.min(ne,dt.x),Se=Math.min(Se,dt.y),Je=Math.max(Je,dt.x),_t=Math.max(_t,dt.y)}return[new t.Point(ne,Se),new t.Point(Je,Se),new t.Point(Je,_t),new t.Point(ne,_t),new t.Point(ne,Se)]},Object.defineProperties(js.prototype,Us);function Bu(Me,X){var ge=!1,ne=null,Se=function(){ne=null,ge&&(Me(),ne=setTimeout(Se,X),ge=!1)};return function(){return ge=!0,ne||Se(),ne}}var pc=function(X){this._hashName=X&&encodeURIComponent(X),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=Bu(this._updateHashUnthrottled.bind(this),30*1e3/100)};pc.prototype.addTo=function(X){return this._map=X,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},pc.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},pc.prototype.getHashString=function(X){var ge=this._map.getCenter(),ne=Math.round(this._map.getZoom()*100)/100,Se=Math.ceil((ne*Math.LN2+Math.log(512/360/.5))/Math.LN10),Je=Math.pow(10,Se),_t=Math.round(ge.lng*Je)/Je,Tt=Math.round(ge.lat*Je)/Je,it=this._map.getBearing(),dt=this._map.getPitch(),Lt="";if(X?Lt+="/"+_t+"/"+Tt+"/"+ne:Lt+=ne+"/"+Tt+"/"+_t,(it||dt)&&(Lt+="/"+Math.round(it*10)/10),dt&&(Lt+="/"+Math.round(dt)),this._hashName){var or=this._hashName,er=!1,ur=t.window.location.hash.slice(1).split("&").map(function(mr){var dr=mr.split("=")[0];return dr===or?(er=!0,dr+"="+Lt):mr}).filter(function(mr){return mr});return er||ur.push(or+"="+Lt),"#"+ur.join("&")}return"#"+Lt},pc.prototype._getCurrentHash=function(){var X=this,ge=t.window.location.hash.replace("#","");if(this._hashName){var ne;return ge.split("&").map(function(Se){return Se.split("=")}).forEach(function(Se){Se[0]===X._hashName&&(ne=Se)}),(ne&&ne[1]||"").split("/")}return ge.split("/")},pc.prototype._onHashChange=function(){var X=this._getCurrentHash();if(X.length>=3&&!X.some(function(ne){return isNaN(ne)})){var ge=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(X[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+X[2],+X[1]],zoom:+X[0],bearing:ge,pitch:+(X[4]||0)}),!0}return!1},pc.prototype._updateHashUnthrottled=function(){var X=t.window.location.href.replace(/(#.+)?$/,this.getHashString());try{t.window.history.replaceState(t.window.history.state,null,X)}catch{}};var Xc={linearity:.3,easing:t.bezier(0,0,.3,1)},Te=t.extend({deceleration:2500,maxSpeed:1400},Xc),He=t.extend({deceleration:20,maxSpeed:1400},Xc),ct=t.extend({deceleration:1e3,maxSpeed:360},Xc),Pt=t.extend({deceleration:1e3,maxSpeed:90},Xc),It=function(X){this._map=X,this.clear()};It.prototype.clear=function(){this._inertiaBuffer=[]},It.prototype.record=function(X){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:X})},It.prototype._drainInertiaBuffer=function(){for(var X=this._inertiaBuffer,ge=t.browser.now(),ne=160;X.length>0&&ge-X[0].time>ne;)X.shift()},It.prototype._onMoveEnd=function(X){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var ge={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},ne=0,Se=this._inertiaBuffer;ne<Se.length;ne+=1){var Je=Se[ne],_t=Je.settings;ge.zoom+=_t.zoomDelta||0,ge.bearing+=_t.bearingDelta||0,ge.pitch+=_t.pitchDelta||0,_t.panDelta&&ge.pan._add(_t.panDelta),_t.around&&(ge.around=_t.around),_t.pinchAround&&(ge.pinchAround=_t.pinchAround)}var Tt=this._inertiaBuffer[this._inertiaBuffer.length-1],it=Tt.time-this._inertiaBuffer[0].time,dt={};if(ge.pan.mag()){var Lt=hr(ge.pan.mag(),it,t.extend({},Te,X||{}));dt.offset=ge.pan.mult(Lt.amount/ge.pan.mag()),dt.center=this._map.transform.center,Ut(dt,Lt)}if(ge.zoom){var or=hr(ge.zoom,it,He);dt.zoom=this._map.transform.zoom+or.amount,Ut(dt,or)}if(ge.bearing){var er=hr(ge.bearing,it,ct);dt.bearing=this._map.transform.bearing+t.clamp(er.amount,-179,179),Ut(dt,er)}if(ge.pitch){var ur=hr(ge.pitch,it,Pt);dt.pitch=this._map.transform.pitch+ur.amount,Ut(dt,ur)}if(dt.zoom||dt.bearing){var mr=ge.pinchAround===void 0?ge.around:ge.pinchAround;dt.around=mr?this._map.unproject(mr):this._map.getCenter()}return this.clear(),t.extend(dt,{noMoveStart:!0})}};function Ut(Me,X){(!Me.duration||Me.duration<X.duration)&&(Me.duration=X.duration,Me.easing=X.easing)}function hr(Me,X,ge){var ne=ge.maxSpeed,Se=ge.linearity,Je=ge.deceleration,_t=t.clamp(Me*Se/(X/1e3),-ne,ne),Tt=Math.abs(_t)/(Je*Se);return{easing:ge.easing,duration:Tt*1e3,amount:_t*(Tt/2)}}var fr=(function(Me){function X(ne,Se,Je,_t){_t===void 0&&(_t={});var Tt=a.mousePos(Se.getCanvasContainer(),Je),it=Se.unproject(Tt);Me.call(this,ne,t.extend({point:Tt,lngLat:it,originalEvent:Je},_t)),this._defaultPrevented=!1,this.target=Se}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ge={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ge),X})(t.Event),Pr=(function(Me){function X(ne,Se,Je){var _t=ne==="touchend"?Je.changedTouches:Je.touches,Tt=a.touchPos(Se.getCanvasContainer(),_t),it=Tt.map(function(or){return Se.unproject(or)}),dt=Tt.reduce(function(or,er,ur,mr){return or.add(er.div(mr.length))},new t.Point(0,0)),Lt=Se.unproject(dt);Me.call(this,ne,{points:Tt,point:dt,lngLats:it,lngLat:Lt,originalEvent:Je}),this._defaultPrevented=!1}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ge={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ge),X})(t.Event),ln=(function(Me){function X(ne,Se,Je){Me.call(this,ne,{originalEvent:Je}),this._defaultPrevented=!1}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ge={defaultPrevented:{configurable:!0}};return X.prototype.preventDefault=function(){this._defaultPrevented=!0},ge.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(X.prototype,ge),X})(t.Event),on=function(X,ge){this._map=X,this._clickTolerance=ge.clickTolerance};on.prototype.reset=function(){delete this._mousedownPos},on.prototype.wheel=function(X){return this._firePreventable(new ln(X.type,this._map,X))},on.prototype.mousedown=function(X,ge){return this._mousedownPos=ge,this._firePreventable(new fr(X.type,this._map,X))},on.prototype.mouseup=function(X){this._map.fire(new fr(X.type,this._map,X))},on.prototype.click=function(X,ge){this._mousedownPos&&this._mousedownPos.dist(ge)>=this._clickTolerance||this._map.fire(new fr(X.type,this._map,X))},on.prototype.dblclick=function(X){return this._firePreventable(new fr(X.type,this._map,X))},on.prototype.mouseover=function(X){this._map.fire(new fr(X.type,this._map,X))},on.prototype.mouseout=function(X){this._map.fire(new fr(X.type,this._map,X))},on.prototype.touchstart=function(X){return this._firePreventable(new Pr(X.type,this._map,X))},on.prototype.touchmove=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype.touchend=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype.touchcancel=function(X){this._map.fire(new Pr(X.type,this._map,X))},on.prototype._firePreventable=function(X){if(this._map.fire(X),X.defaultPrevented)return{}},on.prototype.isEnabled=function(){return!0},on.prototype.isActive=function(){return!1},on.prototype.enable=function(){},on.prototype.disable=function(){};var Mn=function(X){this._map=X};Mn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Mn.prototype.mousemove=function(X){this._map.fire(new fr(X.type,this._map,X))},Mn.prototype.mousedown=function(){this._delayContextMenu=!0},Mn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new fr("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Mn.prototype.contextmenu=function(X){this._delayContextMenu?this._contextMenuEvent=X:this._map.fire(new fr(X.type,this._map,X)),this._map.listens("contextmenu")&&X.preventDefault()},Mn.prototype.isEnabled=function(){return!0},Mn.prototype.isActive=function(){return!1},Mn.prototype.enable=function(){},Mn.prototype.disable=function(){};var jn=function(X,ge){this._map=X,this._el=X.getCanvasContainer(),this._container=X.getContainer(),this._clickTolerance=ge.clickTolerance||1};jn.prototype.isEnabled=function(){return!!this._enabled},jn.prototype.isActive=function(){return!!this._active},jn.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},jn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},jn.prototype.mousedown=function(X,ge){this.isEnabled()&&X.shiftKey&&X.button===0&&(a.disableDrag(),this._startPos=this._lastPos=ge,this._active=!0)},jn.prototype.mousemoveWindow=function(X,ge){if(this._active){var ne=ge;if(!(this._lastPos.equals(ne)||!this._box&&ne.dist(this._startPos)<this._clickTolerance)){var Se=this._startPos;this._lastPos=ne,this._box||(this._box=a.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",X));var Je=Math.min(Se.x,ne.x),_t=Math.max(Se.x,ne.x),Tt=Math.min(Se.y,ne.y),it=Math.max(Se.y,ne.y);a.setTransform(this._box,"translate("+Je+"px,"+Tt+"px)"),this._box.style.width=_t-Je+"px",this._box.style.height=it-Tt+"px"}}},jn.prototype.mouseupWindow=function(X,ge){var ne=this;if(this._active&&X.button===0){var Se=this._startPos,Je=ge;if(this.reset(),a.suppressClick(),Se.x===Je.x&&Se.y===Je.y)this._fireEvent("boxzoomcancel",X);else return this._map.fire(new t.Event("boxzoomend",{originalEvent:X})),{cameraAnimation:function(_t){return _t.fitScreenCoordinates(Se,Je,ne._map.getBearing(),{linear:!0})}}}},jn.prototype.keydown=function(X){this._active&&X.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",X))},jn.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(a.remove(this._box),this._box=null),a.enableDrag(),delete this._startPos,delete this._lastPos},jn.prototype._fireEvent=function(X,ge){return this._map.fire(new t.Event(X,{originalEvent:ge}))};function Vn(Me,X){for(var ge={},ne=0;ne<Me.length;ne++)ge[Me[ne].identifier]=X[ne];return ge}function Ka(Me){for(var X=new t.Point(0,0),ge=0,ne=Me;ge<ne.length;ge+=1){var Se=ne[ge];X._add(Se)}return X.div(Me.length)}var Zn=500,ya=500,Sa=30,Xa=function(X){this.reset(),this.numTouches=X.numTouches};Xa.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Xa.prototype.touchstart=function(X,ge,ne){(this.centroid||ne.length>this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=X.timeStamp),ne.length===this.numTouches&&(this.centroid=Ka(ge),this.touches=Vn(ne,ge)))},Xa.prototype.touchmove=function(X,ge,ne){if(!(this.aborted||!this.centroid)){var Se=Vn(ne,ge);for(var Je in this.touches){var _t=this.touches[Je],Tt=Se[Je];(!Tt||Tt.dist(_t)>Sa)&&(this.aborted=!0)}}},Xa.prototype.touchend=function(X,ge,ne){if((!this.centroid||X.timeStamp-this.startTime>ya)&&(this.aborted=!0),ne.length===0){var Se=!this.aborted&&this.centroid;if(this.reset(),Se)return Se}};var Qa=function(X){this.singleTap=new Xa(X),this.numTaps=X.numTaps,this.reset()};Qa.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Qa.prototype.touchstart=function(X,ge,ne){this.singleTap.touchstart(X,ge,ne)},Qa.prototype.touchmove=function(X,ge,ne){this.singleTap.touchmove(X,ge,ne)},Qa.prototype.touchend=function(X,ge,ne){var Se=this.singleTap.touchend(X,ge,ne);if(Se){var Je=X.timeStamp-this.lastTime<Zn,_t=!this.lastTap||this.lastTap.dist(Se)<Sa;if((!Je||!_t)&&this.reset(),this.count++,this.lastTime=X.timeStamp,this.lastTap=Se,this.count===this.numTaps)return this.reset(),Se}};var Aa=function(){this._zoomIn=new Qa({numTouches:1,numTaps:2}),this._zoomOut=new Qa({numTouches:2,numTaps:1}),this.reset()};Aa.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Aa.prototype.touchstart=function(X,ge,ne){this._zoomIn.touchstart(X,ge,ne),this._zoomOut.touchstart(X,ge,ne)},Aa.prototype.touchmove=function(X,ge,ne){this._zoomIn.touchmove(X,ge,ne),this._zoomOut.touchmove(X,ge,ne)},Aa.prototype.touchend=function(X,ge,ne){var Se=this,Je=this._zoomIn.touchend(X,ge,ne),_t=this._zoomOut.touchend(X,ge,ne);if(Je)return this._active=!0,X.preventDefault(),setTimeout(function(){return Se.reset()},0),{cameraAnimation:function(Tt){return Tt.easeTo({duration:300,zoom:Tt.getZoom()+1,around:Tt.unproject(Je)},{originalEvent:X})}};if(_t)return this._active=!0,X.preventDefault(),setTimeout(function(){return Se.reset()},0),{cameraAnimation:function(Tt){return Tt.easeTo({duration:300,zoom:Tt.getZoom()-1,around:Tt.unproject(_t)},{originalEvent:X})}}},Aa.prototype.touchcancel=function(){this.reset()},Aa.prototype.enable=function(){this._enabled=!0},Aa.prototype.disable=function(){this._enabled=!1,this.reset()},Aa.prototype.isEnabled=function(){return this._enabled},Aa.prototype.isActive=function(){return this._active};var Si=0,ho=2,Ki={};Ki[Si]=1,Ki[ho]=2;function lo(Me,X){var ge=Ki[X];return Me.buttons===void 0||(Me.buttons&ge)!==ge}var zo=function(X){this.reset(),this._clickTolerance=X.clickTolerance||1};zo.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},zo.prototype._correctButton=function(X,ge){return!1},zo.prototype._move=function(X,ge){return{}},zo.prototype.mousedown=function(X,ge){if(!this._lastPoint){var ne=a.mouseButton(X);this._correctButton(X,ne)&&(this._lastPoint=ge,this._eventButton=ne)}},zo.prototype.mousemoveWindow=function(X,ge){var ne=this._lastPoint;if(ne){if(X.preventDefault(),lo(X,this._eventButton)){this.reset();return}if(!(!this._moved&&ge.dist(ne)<this._clickTolerance))return this._moved=!0,this._lastPoint=ge,this._move(ne,ge)}},zo.prototype.mouseupWindow=function(X){if(this._lastPoint){var ge=a.mouseButton(X);ge===this._eventButton&&(this._moved&&a.suppressClick(),this.reset())}},zo.prototype.enable=function(){this._enabled=!0},zo.prototype.disable=function(){this._enabled=!1,this.reset()},zo.prototype.isEnabled=function(){return this._enabled},zo.prototype.isActive=function(){return this._active};var qo=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.mousedown=function(ne,Se){Me.prototype.mousedown.call(this,ne,Se),this._lastPoint&&(this._active=!0)},X.prototype._correctButton=function(ne,Se){return Se===Si&&!ne.ctrlKey},X.prototype._move=function(ne,Se){return{around:Se,panDelta:Se.sub(ne)}},X})(zo),nl=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype._correctButton=function(ne,Se){return Se===Si&&ne.ctrlKey||Se===ho},X.prototype._move=function(ne,Se){var Je=.8,_t=(Se.x-ne.x)*Je;if(_t)return this._active=!0,{bearingDelta:_t}},X.prototype.contextmenu=function(ne){ne.preventDefault()},X})(zo),Go=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype._correctButton=function(ne,Se){return Se===Si&&ne.ctrlKey||Se===ho},X.prototype._move=function(ne,Se){var Je=-.5,_t=(Se.y-ne.y)*Je;if(_t)return this._active=!0,{pitchDelta:_t}},X.prototype.contextmenu=function(ne){ne.preventDefault()},X})(zo),bs=function(X){this._minTouches=1,this._clickTolerance=X.clickTolerance||1,this.reset()};bs.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},bs.prototype.touchstart=function(X,ge,ne){return this._calculateTransform(X,ge,ne)},bs.prototype.touchmove=function(X,ge,ne){if(!(!this._active||ne.length<this._minTouches))return X.preventDefault(),this._calculateTransform(X,ge,ne)},bs.prototype.touchend=function(X,ge,ne){this._calculateTransform(X,ge,ne),this._active&&ne.length<this._minTouches&&this.reset()},bs.prototype.touchcancel=function(){this.reset()},bs.prototype._calculateTransform=function(X,ge,ne){ne.length>0&&(this._active=!0);var Se=Vn(ne,ge),Je=new t.Point(0,0),_t=new t.Point(0,0),Tt=0;for(var it in Se){var dt=Se[it],Lt=this._touches[it];Lt&&(Je._add(dt),_t._add(dt.sub(Lt)),Tt++,Se[it]=dt)}if(this._touches=Se,!(Tt<this._minTouches||!_t.mag())){var or=_t.div(Tt);if(this._sum._add(or),!(this._sum.mag()<this._clickTolerance)){var er=Je.div(Tt);return{around:er,panDelta:or}}}},bs.prototype.enable=function(){this._enabled=!0},bs.prototype.disable=function(){this._enabled=!1,this.reset()},bs.prototype.isEnabled=function(){return this._enabled},bs.prototype.isActive=function(){return this._active};var fl=function(){this.reset()};fl.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},fl.prototype._start=function(X){},fl.prototype._move=function(X,ge,ne){return{}},fl.prototype.touchstart=function(X,ge,ne){this._firstTwoTouches||ne.length<2||(this._firstTwoTouches=[ne[0].identifier,ne[1].identifier],this._start([ge[0],ge[1]]))},fl.prototype.touchmove=function(X,ge,ne){if(this._firstTwoTouches){X.preventDefault();var Se=this._firstTwoTouches,Je=Se[0],_t=Se[1],Tt=ju(ne,ge,Je),it=ju(ne,ge,_t);if(!(!Tt||!it)){var dt=this._aroundCenter?null:Tt.add(it).div(2);return this._move([Tt,it],dt,X)}}},fl.prototype.touchend=function(X,ge,ne){if(this._firstTwoTouches){var Se=this._firstTwoTouches,Je=Se[0],_t=Se[1],Tt=ju(ne,ge,Je),it=ju(ne,ge,_t);Tt&&it||(this._active&&a.suppressClick(),this.reset())}},fl.prototype.touchcancel=function(){this.reset()},fl.prototype.enable=function(X){this._enabled=!0,this._aroundCenter=!!X&&X.around==="center"},fl.prototype.disable=function(){this._enabled=!1,this.reset()},fl.prototype.isEnabled=function(){return this._enabled},fl.prototype.isActive=function(){return this._active};function ju(Me,X,ge){for(var ne=0;ne<Me.length;ne++)if(Me[ne].identifier===ge)return X[ne]}var ou=.1;function So(Me,X){return Math.log(Me/X)/Math.LN2}var qs=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),delete this._distance,delete this._startDistance},X.prototype._start=function(ne){this._startDistance=this._distance=ne[0].dist(ne[1])},X.prototype._move=function(ne,Se){var Je=this._distance;if(this._distance=ne[0].dist(ne[1]),!(!this._active&&Math.abs(So(this._distance,this._startDistance))<ou))return this._active=!0,{zoomDelta:So(this._distance,Je),pinchAround:Se}},X})(fl),sl=25;function tu(Me,X){return Me.angleWith(X)*180/Math.PI}var Vl=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},X.prototype._start=function(ne){this._startVector=this._vector=ne[0].sub(ne[1]),this._minDiameter=ne[0].dist(ne[1])},X.prototype._move=function(ne,Se){var Je=this._vector;if(this._vector=ne[0].sub(ne[1]),!(!this._active&&this._isBelowThreshold(this._vector)))return this._active=!0,{bearingDelta:tu(this._vector,Je),pinchAround:Se}},X.prototype._isBelowThreshold=function(ne){this._minDiameter=Math.min(this._minDiameter,ne.mag());var Se=Math.PI*this._minDiameter,Je=sl/Se*360,_t=tu(ne,this._startVector);return Math.abs(_t)<Je},X})(fl);function Lc(Me){return Math.abs(Me.y)>Math.abs(Me.x)}var Ol=100,ru=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.reset=function(){Me.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},X.prototype._start=function(ne){this._lastPoints=ne,Lc(ne[0].sub(ne[1]))&&(this._valid=!1)},X.prototype._move=function(ne,Se,Je){var _t=ne[0].sub(this._lastPoints[0]),Tt=ne[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(_t,Tt,Je.timeStamp),!!this._valid){this._lastPoints=ne,this._active=!0;var it=(_t.y+Tt.y)/2,dt=-.5;return{pitchDelta:it*dt}}},X.prototype.gestureBeginsVertically=function(ne,Se,Je){if(this._valid!==void 0)return this._valid;var _t=2,Tt=ne.mag()>=_t,it=Se.mag()>=_t;if(!(!Tt&&!it)){if(!Tt||!it)return this._firstMove===void 0&&(this._firstMove=Je),Je-this._firstMove<Ol?void 0:!1;var dt=ne.y>0==Se.y>0;return Lc(ne)&&Lc(Se)&&dt}},X})(fl),af={panStep:100,bearingStep:15,pitchStep:10},zu=function(){var X=af;this._panStep=X.panStep,this._bearingStep=X.bearingStep,this._pitchStep=X.pitchStep,this._rotationDisabled=!1};zu.prototype.reset=function(){this._active=!1},zu.prototype.keydown=function(X){var ge=this;if(!(X.altKey||X.ctrlKey||X.metaKey)){var ne=0,Se=0,Je=0,_t=0,Tt=0;switch(X.keyCode){case 61:case 107:case 171:case 187:ne=1;break;case 189:case 109:case 173:ne=-1;break;case 37:X.shiftKey?Se=-1:(X.preventDefault(),_t=-1);break;case 39:X.shiftKey?Se=1:(X.preventDefault(),_t=1);break;case 38:X.shiftKey?Je=1:(X.preventDefault(),Tt=-1);break;case 40:X.shiftKey?Je=-1:(X.preventDefault(),Tt=1);break;default:return}return this._rotationDisabled&&(Se=0,Je=0),{cameraAnimation:function(it){var dt=it.getZoom();it.easeTo({duration:300,easeId:"keyboardHandler",easing:At,zoom:ne?Math.round(dt)+ne*(X.shiftKey?2:1):dt,bearing:it.getBearing()+Se*ge._bearingStep,pitch:it.getPitch()+Je*ge._pitchStep,offset:[-_t*ge._panStep,-Tt*ge._panStep],center:it.getCenter()},{originalEvent:X})}}}},zu.prototype.enable=function(){this._enabled=!0},zu.prototype.disable=function(){this._enabled=!1,this.reset()},zu.prototype.isEnabled=function(){return this._enabled},zu.prototype.isActive=function(){return this._active},zu.prototype.disableRotation=function(){this._rotationDisabled=!0},zu.prototype.enableRotation=function(){this._rotationDisabled=!1};function At(Me){return Me*(2-Me)}var kr=4.000244140625,Dr=1/100,Hn=1/450,Ca=2,Rn=function(X,ge){this._map=X,this._el=X.getCanvasContainer(),this._handler=ge,this._delta=0,this._defaultZoomRate=Dr,this._wheelZoomRate=Hn,t.bindAll(["_onTimeout"],this)};Rn.prototype.setZoomRate=function(X){this._defaultZoomRate=X},Rn.prototype.setWheelZoomRate=function(X){this._wheelZoomRate=X},Rn.prototype.isEnabled=function(){return!!this._enabled},Rn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},Rn.prototype.isZooming=function(){return!!this._zooming},Rn.prototype.enable=function(X){this.isEnabled()||(this._enabled=!0,this._aroundCenter=X&&X.around==="center")},Rn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Rn.prototype.wheel=function(X){if(this.isEnabled()){var ge=X.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?X.deltaY*40:X.deltaY,ne=t.browser.now(),Se=ne-(this._lastWheelEventTime||0);this._lastWheelEventTime=ne,ge!==0&&ge%kr===0?this._type="wheel":ge!==0&&Math.abs(ge)<4?this._type="trackpad":Se>400?(this._type=null,this._lastValue=ge,this._timeout=setTimeout(this._onTimeout,40,X)):this._type||(this._type=Math.abs(Se*ge)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,ge+=this._lastValue)),X.shiftKey&&ge&&(ge=ge/4),this._type&&(this._lastWheelEvent=X,this._delta-=ge,this._active||this._start(X)),X.preventDefault()}},Rn.prototype._onTimeout=function(X){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(X)},Rn.prototype._start=function(X){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var ge=a.mousePos(this._el,X);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(ge)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Rn.prototype.renderFrame=function(){var X=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var ge=this._map.transform;if(this._delta!==0){var ne=this._type==="wheel"&&Math.abs(this._delta)>kr?this._wheelZoomRate:this._defaultZoomRate,Se=Ca/(1+Math.exp(-Math.abs(this._delta*ne)));this._delta<0&&Se!==0&&(Se=1/Se);var Je=typeof this._targetZoom=="number"?ge.zoomScale(this._targetZoom):ge.scale;this._targetZoom=Math.min(ge.maxZoom,Math.max(ge.minZoom,ge.scaleZoom(Je*Se))),this._type==="wheel"&&(this._startZoom=ge.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var _t=typeof this._targetZoom=="number"?this._targetZoom:ge.zoom,Tt=this._startZoom,it=this._easing,dt=!1,Lt;if(this._type==="wheel"&&Tt&&it){var or=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),er=it(or);Lt=t.number(Tt,_t,er),or<1?this._frameId||(this._frameId=!0):dt=!0}else Lt=_t,dt=!0;return this._active=!0,dt&&(this._active=!1,this._finishTimeout=setTimeout(function(){X._zooming=!1,X._handler._triggerRenderFrame(),delete X._targetZoom,delete X._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!dt,zoomDelta:Lt-ge.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Rn.prototype._smoothOutEasing=function(X){var ge=t.ease;if(this._prevEase){var ne=this._prevEase,Se=(t.browser.now()-ne.start)/ne.duration,Je=ne.easing(Se+.01)-ne.easing(Se),_t=.27/Math.sqrt(Je*Je+1e-4)*.01,Tt=Math.sqrt(.27*.27-_t*_t);ge=t.bezier(_t,Tt,.25,1)}return this._prevEase={start:t.browser.now(),duration:X,easing:ge},ge},Rn.prototype.reset=function(){this._active=!1};var Pn=function(X,ge){this._clickZoom=X,this._tapZoom=ge};Pn.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Pn.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Pn.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Pn.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ri=function(){this.reset()};ri.prototype.reset=function(){this._active=!1},ri.prototype.dblclick=function(X,ge){return X.preventDefault(),{cameraAnimation:function(ne){ne.easeTo({duration:300,zoom:ne.getZoom()+(X.shiftKey?-1:1),around:ne.unproject(ge)},{originalEvent:X})}}},ri.prototype.enable=function(){this._enabled=!0},ri.prototype.disable=function(){this._enabled=!1,this.reset()},ri.prototype.isEnabled=function(){return this._enabled},ri.prototype.isActive=function(){return this._active};var ei=function(){this._tap=new Qa({numTouches:1,numTaps:1}),this.reset()};ei.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ei.prototype.touchstart=function(X,ge,ne){this._swipePoint||(this._tapTime&&X.timeStamp-this._tapTime>Zn&&this.reset(),this._tapTime?ne.length>0&&(this._swipePoint=ge[0],this._swipeTouch=ne[0].identifier):this._tap.touchstart(X,ge,ne))},ei.prototype.touchmove=function(X,ge,ne){if(!this._tapTime)this._tap.touchmove(X,ge,ne);else if(this._swipePoint){if(ne[0].identifier!==this._swipeTouch)return;var Se=ge[0],Je=Se.y-this._swipePoint.y;return this._swipePoint=Se,X.preventDefault(),this._active=!0,{zoomDelta:Je/128}}},ei.prototype.touchend=function(X,ge,ne){if(this._tapTime)this._swipePoint&&ne.length===0&&this.reset();else{var Se=this._tap.touchend(X,ge,ne);Se&&(this._tapTime=X.timeStamp)}},ei.prototype.touchcancel=function(){this.reset()},ei.prototype.enable=function(){this._enabled=!0},ei.prototype.disable=function(){this._enabled=!1,this.reset()},ei.prototype.isEnabled=function(){return this._enabled},ei.prototype.isActive=function(){return this._active};var ti=function(X,ge,ne){this._el=X,this._mousePan=ge,this._touchPan=ne};ti.prototype.enable=function(X){this._inertiaOptions=X||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ti.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ti.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ti.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(X,ge,ne){this._pitchWithRotate=X.pitchWithRotate,this._mouseRotate=ge,this._mousePitch=ne};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var eo=function(X,ge,ne,Se){this._el=X,this._touchZoom=ge,this._touchRotate=ne,this._tapDragZoom=Se,this._rotationDisabled=!1,this._enabled=!0};eo.prototype.enable=function(X){this._touchZoom.enable(X),this._rotationDisabled||this._touchRotate.enable(X),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},eo.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},eo.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},eo.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},eo.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},eo.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Bi=function(Me){return Me.zoom||Me.drag||Me.pitch||Me.rotate},fi=(function(Me){function X(){Me.apply(this,arguments)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X})(t.Event);function Oa(Me){return Me.panDelta&&Me.panDelta.mag()||Me.zoomDelta||Me.bearingDelta||Me.pitchDelta}var gn=function(X,ge){this._map=X,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new It(X),this._bearingSnap=ge.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(ge),t.bindAll(["handleEvent","handleWindowEvent"],this);var ne=this._el;this._listeners=[[ne,"touchstart",{passive:!0}],[ne,"touchmove",{passive:!1}],[ne,"touchend",void 0],[ne,"touchcancel",void 0],[ne,"mousedown",void 0],[ne,"mousemove",void 0],[ne,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[ne,"mouseover",void 0],[ne,"mouseout",void 0],[ne,"dblclick",void 0],[ne,"click",void 0],[ne,"keydown",{capture:!1}],[ne,"keyup",void 0],[ne,"wheel",{passive:!1}],[ne,"contextmenu",void 0],[t.window,"blur",void 0]];for(var Se=0,Je=this._listeners;Se<Je.length;Se+=1){var _t=Je[Se],Tt=_t[0],it=_t[1],dt=_t[2];a.addEventListener(Tt,it,Tt===t.window.document?this.handleWindowEvent:this.handleEvent,dt)}};gn.prototype.destroy=function(){for(var X=0,ge=this._listeners;X<ge.length;X+=1){var ne=ge[X],Se=ne[0],Je=ne[1],_t=ne[2];a.removeEventListener(Se,Je,Se===t.window.document?this.handleWindowEvent:this.handleEvent,_t)}},gn.prototype._addDefaultHandlers=function(X){var ge=this._map,ne=ge.getCanvasContainer();this._add("mapEvent",new on(ge,X));var Se=ge.boxZoom=new jn(ge,X);this._add("boxZoom",Se);var Je=new Aa,_t=new ri;ge.doubleClickZoom=new Pn(_t,Je),this._add("tapZoom",Je),this._add("clickZoom",_t);var Tt=new ei;this._add("tapDragZoom",Tt);var it=ge.touchPitch=new ru;this._add("touchPitch",it);var dt=new nl(X),Lt=new Go(X);ge.dragRotate=new pi(X,dt,Lt),this._add("mouseRotate",dt,["mousePitch"]),this._add("mousePitch",Lt,["mouseRotate"]);var or=new qo(X),er=new bs(X);ge.dragPan=new ti(ne,or,er),this._add("mousePan",or),this._add("touchPan",er,["touchZoom","touchRotate"]);var ur=new Vl,mr=new qs;ge.touchZoomRotate=new eo(ne,mr,ur,Tt),this._add("touchRotate",ur,["touchPan","touchZoom"]),this._add("touchZoom",mr,["touchPan","touchRotate"]);var dr=ge.scrollZoom=new Rn(ge,this);this._add("scrollZoom",dr,["mousePan"]);var Yt=ge.keyboard=new zu;this._add("keyboard",Yt),this._add("blockableMapEvent",new Mn(ge));for(var ar=0,tr=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];ar<tr.length;ar+=1){var Yr=tr[ar];X.interactive&&X[Yr]&&ge[Yr].enable(X[Yr])}},gn.prototype._add=function(X,ge,ne){this._handlers.push({handlerName:X,handler:ge,allowed:ne}),this._handlersById[X]=ge},gn.prototype.stop=function(X){if(!this._updatingCamera){for(var ge=0,ne=this._handlers;ge<ne.length;ge+=1){var Se=ne[ge],Je=Se.handler;Je.reset()}this._inertia.clear(),this._fireEvents({},{},X),this._changes=[]}},gn.prototype.isActive=function(){for(var X=0,ge=this._handlers;X<ge.length;X+=1){var ne=ge[X],Se=ne.handler;if(Se.isActive())return!0}return!1},gn.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},gn.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},gn.prototype.isMoving=function(){return!!Bi(this._eventsInProgress)||this.isZooming()},gn.prototype._blockedByActive=function(X,ge,ne){for(var Se in X)if(Se!==ne&&(!ge||ge.indexOf(Se)<0))return!0;return!1},gn.prototype.handleWindowEvent=function(X){this.handleEvent(X,X.type+"Window")},gn.prototype._getMapTouches=function(X){for(var ge=[],ne=0,Se=X;ne<Se.length;ne+=1){var Je=Se[ne],_t=Je.target;this._el.contains(_t)&&ge.push(Je)}return ge},gn.prototype.handleEvent=function(X,ge){if(X.type==="blur"){this.stop(!0);return}this._updatingCamera=!0;for(var ne=X.type==="renderFrame"?void 0:X,Se={needsRenderFrame:!1},Je={},_t={},Tt=X.touches?this._getMapTouches(X.touches):void 0,it=Tt?a.touchPos(this._el,Tt):a.mousePos(this._el,X),dt=0,Lt=this._handlers;dt<Lt.length;dt+=1){var or=Lt[dt],er=or.handlerName,ur=or.handler,mr=or.allowed;if(ur.isEnabled()){var dr=void 0;this._blockedByActive(_t,mr,er)?ur.reset():ur[ge||X.type]&&(dr=ur[ge||X.type](X,it,Tt),this.mergeHandlerResult(Se,Je,dr,er,ne),dr&&dr.needsRenderFrame&&this._triggerRenderFrame()),(dr||ur.isActive())&&(_t[er]=ur)}}var Yt={};for(var ar in this._previousActiveHandlers)_t[ar]||(Yt[ar]=ne);this._previousActiveHandlers=_t,(Object.keys(Yt).length||Oa(Se))&&(this._changes.push([Se,Je,Yt]),this._triggerRenderFrame()),(Object.keys(_t).length||Oa(Se))&&this._map._stop(!0),this._updatingCamera=!1;var tr=Se.cameraAnimation;tr&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],tr(this._map))},gn.prototype.mergeHandlerResult=function(X,ge,ne,Se,Je){if(ne){t.extend(X,ne);var _t={handlerName:Se,originalEvent:ne.originalEvent||Je};ne.zoomDelta!==void 0&&(ge.zoom=_t),ne.panDelta!==void 0&&(ge.drag=_t),ne.pitchDelta!==void 0&&(ge.pitch=_t),ne.bearingDelta!==void 0&&(ge.rotate=_t)}},gn.prototype._applyChanges=function(){for(var X={},ge={},ne={},Se=0,Je=this._changes;Se<Je.length;Se+=1){var _t=Je[Se],Tt=_t[0],it=_t[1],dt=_t[2];Tt.panDelta&&(X.panDelta=(X.panDelta||new t.Point(0,0))._add(Tt.panDelta)),Tt.zoomDelta&&(X.zoomDelta=(X.zoomDelta||0)+Tt.zoomDelta),Tt.bearingDelta&&(X.bearingDelta=(X.bearingDelta||0)+Tt.bearingDelta),Tt.pitchDelta&&(X.pitchDelta=(X.pitchDelta||0)+Tt.pitchDelta),Tt.around!==void 0&&(X.around=Tt.around),Tt.pinchAround!==void 0&&(X.pinchAround=Tt.pinchAround),Tt.noInertia&&(X.noInertia=Tt.noInertia),t.extend(ge,it),t.extend(ne,dt)}this._updateMapTransform(X,ge,ne),this._changes=[]},gn.prototype._updateMapTransform=function(X,ge,ne){var Se=this._map,Je=Se.transform;if(!Oa(X))return this._fireEvents(ge,ne,!0);var _t=X.panDelta,Tt=X.zoomDelta,it=X.bearingDelta,dt=X.pitchDelta,Lt=X.around,or=X.pinchAround;or!==void 0&&(Lt=or),Se._stop(!0),Lt=Lt||Se.transform.centerPoint;var er=Je.pointLocation(_t?Lt.sub(_t):Lt);it&&(Je.bearing+=it),dt&&(Je.pitch+=dt),Tt&&(Je.zoom+=Tt),Je.setLocationAtPoint(er,Lt),this._map._update(),X.noInertia||this._inertia.record(X),this._fireEvents(ge,ne,!0)},gn.prototype._fireEvents=function(X,ge,ne){var Se=this,Je=Bi(this._eventsInProgress),_t=Bi(X),Tt={};for(var it in X){var dt=X[it],Lt=dt.originalEvent;this._eventsInProgress[it]||(Tt[it+"start"]=Lt),this._eventsInProgress[it]=X[it]}!Je&&_t&&this._fireEvent("movestart",_t.originalEvent);for(var or in Tt)this._fireEvent(or,Tt[or]);_t&&this._fireEvent("move",_t.originalEvent);for(var er in X){var ur=X[er],mr=ur.originalEvent;this._fireEvent(er,mr)}var dr={},Yt;for(var ar in this._eventsInProgress){var tr=this._eventsInProgress[ar],Yr=tr.handlerName,un=tr.originalEvent;this._handlersById[Yr].isActive()||(delete this._eventsInProgress[ar],Yt=ge[Yr]||un,dr[ar+"end"]=Yt)}for(var En in dr)this._fireEvent(En,dr[En]);var Ea=Bi(this._eventsInProgress);if(ne&&(Je||_t)&&!Ea){this._updatingCamera=!0;var fa=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),sa=function(Ma){return Ma!==0&&-Se._bearingSnap<Ma&&Ma<Se._bearingSnap};fa?(sa(fa.bearing||this._map.getBearing())&&(fa.bearing=0),this._map.easeTo(fa,{originalEvent:Yt})):(this._map.fire(new t.Event("moveend",{originalEvent:Yt})),sa(this._map.getBearing())&&this._map.resetNorth()),this._updatingCamera=!1}},gn.prototype._fireEvent=function(X,ge){this._map.fire(new t.Event(X,ge?{originalEvent:ge}:{}))},gn.prototype._requestFrame=function(){var X=this;return this._map.triggerRepaint(),this._map._renderTaskQueue.add(function(ge){delete X._frameId,X.handleEvent(new fi("renderFrame",{timeStamp:ge})),X._applyChanges()})},gn.prototype._triggerRenderFrame=function(){this._frameId===void 0&&(this._frameId=this._requestFrame())};var Kn=(function(Me){function X(ge,ne){Me.call(this),this._moving=!1,this._zooming=!1,this.transform=ge,this._bearingSnap=ne.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},X.prototype.setCenter=function(ne,Se){return this.jumpTo({center:ne},Se)},X.prototype.panBy=function(ne,Se,Je){return ne=t.Point.convert(ne).mult(-1),this.panTo(this.transform.center,t.extend({offset:ne},Se),Je)},X.prototype.panTo=function(ne,Se,Je){return this.easeTo(t.extend({center:ne},Se),Je)},X.prototype.getZoom=function(){return this.transform.zoom},X.prototype.setZoom=function(ne,Se){return this.jumpTo({zoom:ne},Se),this},X.prototype.zoomTo=function(ne,Se,Je){return this.easeTo(t.extend({zoom:ne},Se),Je)},X.prototype.zoomIn=function(ne,Se){return this.zoomTo(this.getZoom()+1,ne,Se),this},X.prototype.zoomOut=function(ne,Se){return this.zoomTo(this.getZoom()-1,ne,Se),this},X.prototype.getBearing=function(){return this.transform.bearing},X.prototype.setBearing=function(ne,Se){return this.jumpTo({bearing:ne},Se),this},X.prototype.getPadding=function(){return this.transform.padding},X.prototype.setPadding=function(ne,Se){return this.jumpTo({padding:ne},Se),this},X.prototype.rotateTo=function(ne,Se,Je){return this.easeTo(t.extend({bearing:ne},Se),Je)},X.prototype.resetNorth=function(ne,Se){return this.rotateTo(0,t.extend({duration:1e3},ne),Se),this},X.prototype.resetNorthPitch=function(ne,Se){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},ne),Se),this},X.prototype.snapToNorth=function(ne,Se){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(ne,Se):this},X.prototype.getPitch=function(){return this.transform.pitch},X.prototype.setPitch=function(ne,Se){return this.jumpTo({pitch:ne},Se),this},X.prototype.cameraForBounds=function(ne,Se){ne=t.LngLatBounds.convert(ne);var Je=Se&&Se.bearing||0;return this._cameraForBoxAndBearing(ne.getNorthWest(),ne.getSouthEast(),Je,Se)},X.prototype._cameraForBoxAndBearing=function(ne,Se,Je,_t){var Tt={top:0,bottom:0,right:0,left:0};if(_t=t.extend({padding:Tt,offset:[0,0],maxZoom:this.transform.maxZoom},_t),typeof _t.padding=="number"){var it=_t.padding;_t.padding={top:it,bottom:it,right:it,left:it}}_t.padding=t.extend(Tt,_t.padding);var dt=this.transform,Lt=dt.padding,or=dt.project(t.LngLat.convert(ne)),er=dt.project(t.LngLat.convert(Se)),ur=or.rotate(-Je*Math.PI/180),mr=er.rotate(-Je*Math.PI/180),dr=new t.Point(Math.max(ur.x,mr.x),Math.max(ur.y,mr.y)),Yt=new t.Point(Math.min(ur.x,mr.x),Math.min(ur.y,mr.y)),ar=dr.sub(Yt),tr=(dt.width-(Lt.left+Lt.right+_t.padding.left+_t.padding.right))/ar.x,Yr=(dt.height-(Lt.top+Lt.bottom+_t.padding.top+_t.padding.bottom))/ar.y;if(Yr<0||tr<0){t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.");return}var un=Math.min(dt.scaleZoom(dt.scale*Math.min(tr,Yr)),_t.maxZoom),En=typeof _t.offset.x=="number"?new t.Point(_t.offset.x,_t.offset.y):t.Point.convert(_t.offset),Ea=(_t.padding.left-_t.padding.right)/2,fa=(_t.padding.top-_t.padding.bottom)/2,sa=new t.Point(Ea,fa),Ma=sa.rotate(Je*Math.PI/180),La=En.add(Ma),Ja=La.mult(dt.scale/dt.zoomScale(un)),ka=dt.unproject(or.add(er).div(2).sub(Ja));return{center:ka,zoom:un,bearing:Je}},X.prototype.fitBounds=function(ne,Se,Je){return this._fitInternal(this.cameraForBounds(ne,Se),Se,Je)},X.prototype.fitScreenCoordinates=function(ne,Se,Je,_t,Tt){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(ne)),this.transform.pointLocation(t.Point.convert(Se)),Je,_t),_t,Tt)},X.prototype._fitInternal=function(ne,Se,Je){return ne?(Se=t.extend(ne,Se),delete Se.padding,Se.linear?this.easeTo(Se,Je):this.flyTo(Se,Je)):this},X.prototype.jumpTo=function(ne,Se){this.stop();var Je=this.transform,_t=!1,Tt=!1,it=!1;return"zoom"in ne&&Je.zoom!==+ne.zoom&&(_t=!0,Je.zoom=+ne.zoom),ne.center!==void 0&&(Je.center=t.LngLat.convert(ne.center)),"bearing"in ne&&Je.bearing!==+ne.bearing&&(Tt=!0,Je.bearing=+ne.bearing),"pitch"in ne&&Je.pitch!==+ne.pitch&&(it=!0,Je.pitch=+ne.pitch),ne.padding!=null&&!Je.isPaddingEqual(ne.padding)&&(Je.padding=ne.padding),this.fire(new t.Event("movestart",Se)).fire(new t.Event("move",Se)),_t&&this.fire(new t.Event("zoomstart",Se)).fire(new t.Event("zoom",Se)).fire(new t.Event("zoomend",Se)),Tt&&this.fire(new t.Event("rotatestart",Se)).fire(new t.Event("rotate",Se)).fire(new t.Event("rotateend",Se)),it&&this.fire(new t.Event("pitchstart",Se)).fire(new t.Event("pitch",Se)).fire(new t.Event("pitchend",Se)),this.fire(new t.Event("moveend",Se))},X.prototype.easeTo=function(ne,Se){var Je=this;this._stop(!1,ne.easeId),ne=t.extend({offset:[0,0],duration:500,easing:t.ease},ne),(ne.animate===!1||!ne.essential&&t.browser.prefersReducedMotion)&&(ne.duration=0);var _t=this.transform,Tt=this.getZoom(),it=this.getBearing(),dt=this.getPitch(),Lt=this.getPadding(),or="zoom"in ne?+ne.zoom:Tt,er="bearing"in ne?this._normalizeBearing(ne.bearing,it):it,ur="pitch"in ne?+ne.pitch:dt,mr="padding"in ne?ne.padding:_t.padding,dr=t.Point.convert(ne.offset),Yt=_t.centerPoint.add(dr),ar=_t.pointLocation(Yt),tr=t.LngLat.convert(ne.center||ar);this._normalizeCenter(tr);var Yr=_t.project(ar),un=_t.project(tr).sub(Yr),En=_t.zoomScale(or-Tt),Ea,fa;ne.around&&(Ea=t.LngLat.convert(ne.around),fa=_t.locationPoint(Ea));var sa={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||or!==Tt,this._rotating=this._rotating||it!==er,this._pitching=this._pitching||ur!==dt,this._padding=!_t.isPaddingEqual(mr),this._easeId=ne.easeId,this._prepareEase(Se,ne.noMoveStart,sa),this._ease(function(Ma){if(Je._zooming&&(_t.zoom=t.number(Tt,or,Ma)),Je._rotating&&(_t.bearing=t.number(it,er,Ma)),Je._pitching&&(_t.pitch=t.number(dt,ur,Ma)),Je._padding&&(_t.interpolatePadding(Lt,mr,Ma),Yt=_t.centerPoint.add(dr)),Ea)_t.setLocationAtPoint(Ea,fa);else{var La=_t.zoomScale(_t.zoom-Tt),Ja=or>Tt?Math.min(2,En):Math.max(.5,En),ka=Math.pow(Ja,1-Ma),ai=_t.unproject(Yr.add(un.mult(Ma*ka)).mult(La));_t.setLocationAtPoint(_t.renderWorldCopies?ai.wrap():ai,Yt)}Je._fireMoveEvents(Se)},function(Ma){Je._afterEase(Se,Ma)},ne),this},X.prototype._prepareEase=function(ne,Se,Je){Je===void 0&&(Je={}),this._moving=!0,!Se&&!Je.moving&&this.fire(new t.Event("movestart",ne)),this._zooming&&!Je.zooming&&this.fire(new t.Event("zoomstart",ne)),this._rotating&&!Je.rotating&&this.fire(new t.Event("rotatestart",ne)),this._pitching&&!Je.pitching&&this.fire(new t.Event("pitchstart",ne))},X.prototype._fireMoveEvents=function(ne){this.fire(new t.Event("move",ne)),this._zooming&&this.fire(new t.Event("zoom",ne)),this._rotating&&this.fire(new t.Event("rotate",ne)),this._pitching&&this.fire(new t.Event("pitch",ne))},X.prototype._afterEase=function(ne,Se){if(!(this._easeId&&Se&&this._easeId===Se)){delete this._easeId;var Je=this._zooming,_t=this._rotating,Tt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Je&&this.fire(new t.Event("zoomend",ne)),_t&&this.fire(new t.Event("rotateend",ne)),Tt&&this.fire(new t.Event("pitchend",ne)),this.fire(new t.Event("moveend",ne))}},X.prototype.flyTo=function(ne,Se){var Je=this;if(!ne.essential&&t.browser.prefersReducedMotion){var _t=t.pick(ne,["center","zoom","bearing","pitch","around"]);return this.jumpTo(_t,Se)}this.stop(),ne=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},ne);var Tt=this.transform,it=this.getZoom(),dt=this.getBearing(),Lt=this.getPitch(),or=this.getPadding(),er="zoom"in ne?t.clamp(+ne.zoom,Tt.minZoom,Tt.maxZoom):it,ur="bearing"in ne?this._normalizeBearing(ne.bearing,dt):dt,mr="pitch"in ne?+ne.pitch:Lt,dr="padding"in ne?ne.padding:Tt.padding,Yt=Tt.zoomScale(er-it),ar=t.Point.convert(ne.offset),tr=Tt.centerPoint.add(ar),Yr=Tt.pointLocation(tr),un=t.LngLat.convert(ne.center||Yr);this._normalizeCenter(un);var En=Tt.project(Yr),Ea=Tt.project(un).sub(En),fa=ne.curve,sa=Math.max(Tt.width,Tt.height),Ma=sa/Yt,La=Ea.mag();if("minZoom"in ne){var Ja=t.clamp(Math.min(ne.minZoom,it,er),Tt.minZoom,Tt.maxZoom),ka=sa/Tt.zoomScale(Ja-it);fa=Math.sqrt(ka/La*2)}var ai=fa*fa;function gi(vl){var Eu=(Ma*Ma-sa*sa+(vl?-1:1)*ai*ai*La*La)/(2*(vl?Ma:sa)*ai*La);return Math.log(Math.sqrt(Eu*Eu+1)-Eu)}function Vi(vl){return(Math.exp(vl)-Math.exp(-vl))/2}function oo(vl){return(Math.exp(vl)+Math.exp(-vl))/2}function Is(vl){return Vi(vl)/oo(vl)}var Cs=gi(0),Sl=function(vl){return oo(Cs)/oo(Cs+fa*vl)},xl=function(vl){return sa*((oo(Cs)*Is(Cs+fa*vl)-Vi(Cs))/ai)/La},Cl=(gi(1)-Cs)/fa;if(Math.abs(La)<1e-6||!isFinite(Cl)){if(Math.abs(sa-Ma)<1e-6)return this.easeTo(ne,Se);var El=Ma<sa?-1:1;Cl=Math.abs(Math.log(Ma/sa))/fa,xl=function(){return 0},Sl=function(vl){return Math.exp(El*fa*vl)}}if("duration"in ne)ne.duration=+ne.duration;else{var lc="screenSpeed"in ne?+ne.screenSpeed/fa:+ne.speed;ne.duration=1e3*Cl/lc}return ne.maxDuration&&ne.duration>ne.maxDuration&&(ne.duration=0),this._zooming=!0,this._rotating=dt!==ur,this._pitching=mr!==Lt,this._padding=!Tt.isPaddingEqual(dr),this._prepareEase(Se,!1),this._ease(function(vl){var Eu=vl*Cl,sh=1/Sl(Eu);Tt.zoom=vl===1?er:it+Tt.scaleZoom(sh),Je._rotating&&(Tt.bearing=t.number(dt,ur,vl)),Je._pitching&&(Tt.pitch=t.number(Lt,mr,vl)),Je._padding&&(Tt.interpolatePadding(or,dr,vl),tr=Tt.centerPoint.add(ar));var Bh=vl===1?un:Tt.unproject(En.add(Ea.mult(xl(Eu))).mult(sh));Tt.setLocationAtPoint(Tt.renderWorldCopies?Bh.wrap():Bh,tr),Je._fireMoveEvents(Se)},function(){return Je._afterEase(Se)},ne),this},X.prototype.isEasing=function(){return!!this._easeFrameId},X.prototype.stop=function(){return this._stop()},X.prototype._stop=function(ne,Se){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Je=this._onEaseEnd;delete this._onEaseEnd,Je.call(this,Se)}if(!ne){var _t=this.handlers;_t&&_t.stop(!1)}return this},X.prototype._ease=function(ne,Se,Je){Je.animate===!1||Je.duration===0?(ne(1),Se()):(this._easeStart=t.browser.now(),this._easeOptions=Je,this._onEaseFrame=ne,this._onEaseEnd=Se,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},X.prototype._renderFrameCallback=function(){var ne=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ne)),ne<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},X.prototype._normalizeBearing=function(ne,Se){ne=t.wrap(ne,-180,180);var Je=Math.abs(ne-Se);return Math.abs(ne-360-Se)<Je&&(ne-=360),Math.abs(ne+360-Se)<Je&&(ne+=360),ne},X.prototype._normalizeCenter=function(ne){var Se=this.transform;if(!(!Se.renderWorldCopies||Se.lngRange)){var Je=ne.lng-Se.center.lng;ne.lng+=Je>180?-360:Je<-180?360:0}},X})(t.Evented),ga=function(X){X===void 0&&(X={}),this.options=X,t.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};ga.prototype.getDefaultPosition=function(){return"bottom-right"},ga.prototype.onAdd=function(X){var ge=this.options&&this.options.compact;return this._map=X,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=a.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=a.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),ge&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),ge===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},ga.prototype.onRemove=function(){a.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},ga.prototype._setElementTitle=function(X,ge){var ne=this._map._getUIString("AttributionControl."+ge);X.title=ne,X.setAttribute("aria-label",ne)},ga.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},ga.prototype._updateEditLink=function(){var X=this._editLink;X||(X=this._editLink=this._container.querySelector(".mapbox-improve-map"));var ge=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(X){var ne=ge.reduce(function(Se,Je,_t){return Je.value&&(Se+=Je.key+"="+Je.value+(_t<ge.length-1?"&":"")),Se},"?");X.href=t.config.FEEDBACK_URL+"/"+ne+(this._map._hash?this._map._hash.getHashString(!0):""),X.rel="noopener nofollow",this._setElementTitle(X,"MapFeedback")}},ga.prototype._updateData=function(X){X&&(X.sourceDataType==="metadata"||X.sourceDataType==="visibility"||X.dataType==="style")&&(this._updateAttributions(),this._updateEditLink())},ga.prototype._updateAttributions=function(){if(this._map.style){var X=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?X=X.concat(this.options.customAttribution.map(function(it){return typeof it!="string"?"":it})):typeof this.options.customAttribution=="string"&&X.push(this.options.customAttribution)),this._map.style.stylesheet){var ge=this._map.style.stylesheet;this.styleOwner=ge.owner,this.styleId=ge.id}var ne=this._map.style.sourceCaches;for(var Se in ne){var Je=ne[Se];if(Je.used){var _t=Je.getSource();_t.attribution&&X.indexOf(_t.attribution)<0&&X.push(_t.attribution)}}X.sort(function(it,dt){return it.length-dt.length}),X=X.filter(function(it,dt){for(var Lt=dt+1;Lt<X.length;Lt++)if(X[Lt].indexOf(it)>=0)return!1;return!0});var Tt=X.join(" | ");Tt!==this._attribHTML&&(this._attribHTML=Tt,X.length?(this._innerContainer.innerHTML=Tt,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},ga.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var za=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};za.prototype.onAdd=function(X){this._map=X,this._container=a.create("div","mapboxgl-ctrl");var ge=a.create("a","mapboxgl-ctrl-logo");return ge.target="_blank",ge.rel="noopener nofollow",ge.href="https://www.mapbox.com/",ge.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ge.setAttribute("rel","noopener nofollow"),this._container.appendChild(ge),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},za.prototype.onRemove=function(){a.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},za.prototype.getDefaultPosition=function(){return"bottom-left"},za.prototype._updateLogo=function(X){(!X||X.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},za.prototype._logoRequired=function(){if(this._map.style){var X=this._map.style.sourceCaches;for(var ge in X){var ne=X[ge].getSource();if(ne.mapbox_logo)return!0}return!1}},za.prototype._updateCompact=function(){var X=this._container.children;if(X.length){var ge=X[0];this._map.getCanvasContainer().offsetWidth<250?ge.classList.add("mapboxgl-compact"):ge.classList.remove("mapboxgl-compact")}};var wa=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wa.prototype.add=function(X){var ge=++this._id,ne=this._queue;return ne.push({callback:X,id:ge,cancelled:!1}),ge},wa.prototype.remove=function(X){for(var ge=this._currentlyRunning,ne=ge?this._queue.concat(ge):this._queue,Se=0,Je=ne;Se<Je.length;Se+=1){var _t=Je[Se];if(_t.id===X){_t.cancelled=!0;return}}},wa.prototype.run=function(X){X===void 0&&(X=0);var ge=this._currentlyRunning=this._queue;this._queue=[];for(var ne=0,Se=ge;ne<Se.length;ne+=1){var Je=Se[ne];if(!Je.cancelled&&(Je.callback(X),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},wa.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Ii={"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":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},si=t.window.HTMLImageElement,$i=t.window.HTMLElement,Ta=t.window.ImageBitmap,ca=-2,Ei=22,Yn=0,yi=60,ni={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:ca,maxZoom:Ei,minPitch:Yn,maxPitch:yi,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Ji=(function(Me){function X(ne){var Se=this;if(ne=t.extend({},ni,ne),ne.minZoom!=null&&ne.maxZoom!=null&&ne.minZoom>ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ne.minPitch!=null&&ne.maxPitch!=null&&ne.minPitch>ne.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ne.minPitch!=null&&ne.minPitch<Yn)throw new Error("minPitch must be greater than or equal to "+Yn);if(ne.maxPitch!=null&&ne.maxPitch>yi)throw new Error("maxPitch must be less than or equal to "+yi);var Je=new js(ne.minZoom,ne.maxZoom,ne.minPitch,ne.maxPitch,ne.renderWorldCopies);if(Me.call(this,Je,ne),this._interactive=ne.interactive,this._maxTileCacheSize=ne.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ne.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ne.preserveDrawingBuffer,this._antialias=ne.antialias,this._trackResize=ne.trackResize,this._bearingSnap=ne.bearingSnap,this._refreshExpiredTiles=ne.refreshExpiredTiles,this._fadeDuration=ne.fadeDuration,this._crossSourceCollisions=ne.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ne.collectResourceTiming,this._renderTaskQueue=new wa,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ii,ne.locale),this._clickTolerance=ne.clickTolerance,this._requestManager=new t.RequestManager(ne.transformRequest,ne.accessToken),typeof ne.container=="string"){if(this._container=t.window.document.getElementById(ne.container),!this._container)throw new Error("Container '"+ne.container+"' not found.")}else if(ne.container instanceof $i)this._container=ne.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(ne.maxBounds&&this.setMaxBounds(ne.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return Se._update(!1)}),this.on("moveend",function(){return Se._update(!1)}),this.on("zoom",function(){return Se._update(!0)}),typeof t.window<"u"&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1),t.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new gn(this,ne);var _t=typeof ne.hash=="string"&&ne.hash||void 0;this._hash=ne.hash&&new pc(_t).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:ne.center,zoom:ne.zoom,bearing:ne.bearing,pitch:ne.pitch}),ne.bounds&&(this.resize(),this.fitBounds(ne.bounds,t.extend({},ne.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ne.localIdeographFontFamily,ne.style&&this.setStyle(ne.style,{localIdeographFontFamily:ne.localIdeographFontFamily}),ne.attributionControl&&this.addControl(new ga({customAttribution:ne.customAttribution})),this.addControl(new za,ne.logoPosition),this.on("style.load",function(){Se.transform.unmodified&&Se.jumpTo(Se.style.stylesheet)}),this.on("data",function(Tt){Se._update(Tt.dataType==="style"),Se.fire(new t.Event(Tt.dataType+"data",Tt))}),this.on("dataloading",function(Tt){Se.fire(new t.Event(Tt.dataType+"dataloading",Tt))})}Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X;var ge={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return X.prototype._getMapId=function(){return this._mapId},X.prototype.addControl=function(Se,Je){if(Je===void 0&&(Se.getDefaultPosition?Je=Se.getDefaultPosition():Je="top-right"),!Se||!Se.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var _t=Se.onAdd(this);this._controls.push(Se);var Tt=this._controlPositions[Je];return Je.indexOf("bottom")!==-1?Tt.insertBefore(_t,Tt.firstChild):Tt.appendChild(_t),this},X.prototype.removeControl=function(Se){if(!Se||!Se.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Je=this._controls.indexOf(Se);return Je>-1&&this._controls.splice(Je,1),Se.onRemove(this),this},X.prototype.hasControl=function(Se){return this._controls.indexOf(Se)>-1},X.prototype.resize=function(Se){var Je=this._containerDimensions(),_t=Je[0],Tt=Je[1];this._resizeCanvas(_t,Tt),this.transform.resize(_t,Tt),this.painter.resize(_t,Tt);var it=!this._moving;return it&&(this.stop(),this.fire(new t.Event("movestart",Se)).fire(new t.Event("move",Se))),this.fire(new t.Event("resize",Se)),it&&this.fire(new t.Event("moveend",Se)),this},X.prototype.getBounds=function(){return this.transform.getBounds()},X.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},X.prototype.setMaxBounds=function(Se){return this.transform.setMaxBounds(t.LngLatBounds.convert(Se)),this._update()},X.prototype.setMinZoom=function(Se){if(Se=Se??ca,Se>=ca&&Se<=this.transform.maxZoom)return this.transform.minZoom=Se,this._update(),this.getZoom()<Se&&this.setZoom(Se),this;throw new Error("minZoom must be between "+ca+" and the current maxZoom, inclusive")},X.prototype.getMinZoom=function(){return this.transform.minZoom},X.prototype.setMaxZoom=function(Se){if(Se=Se??Ei,Se>=this.transform.minZoom)return this.transform.maxZoom=Se,this._update(),this.getZoom()>Se&&this.setZoom(Se),this;throw new Error("maxZoom must be greater than the current minZoom")},X.prototype.getMaxZoom=function(){return this.transform.maxZoom},X.prototype.setMinPitch=function(Se){if(Se=Se??Yn,Se<Yn)throw new Error("minPitch must be greater than or equal to "+Yn);if(Se>=Yn&&Se<=this.transform.maxPitch)return this.transform.minPitch=Se,this._update(),this.getPitch()<Se&&this.setPitch(Se),this;throw new Error("minPitch must be between "+Yn+" and the current maxPitch, inclusive")},X.prototype.getMinPitch=function(){return this.transform.minPitch},X.prototype.setMaxPitch=function(Se){if(Se=Se??yi,Se>yi)throw new Error("maxPitch must be less than or equal to "+yi);if(Se>=this.transform.minPitch)return this.transform.maxPitch=Se,this._update(),this.getPitch()>Se&&this.setPitch(Se),this;throw new Error("maxPitch must be greater than the current minPitch")},X.prototype.getMaxPitch=function(){return this.transform.maxPitch},X.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},X.prototype.setRenderWorldCopies=function(Se){return this.transform.renderWorldCopies=Se,this._update()},X.prototype.project=function(Se){return this.transform.locationPoint(t.LngLat.convert(Se))},X.prototype.unproject=function(Se){return this.transform.pointLocation(t.Point.convert(Se))},X.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},X.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},X.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},X.prototype._createDelegatedListener=function(Se,Je,_t){var Tt=this,it;if(Se==="mouseenter"||Se==="mouseover"){var dt=!1,Lt=function(Yt){var ar=Tt.getLayer(Je)?Tt.queryRenderedFeatures(Yt.point,{layers:[Je]}):[];ar.length?dt||(dt=!0,_t.call(Tt,new fr(Se,Tt,Yt.originalEvent,{features:ar}))):dt=!1},or=function(){dt=!1};return{layer:Je,listener:_t,delegates:{mousemove:Lt,mouseout:or}}}else if(Se==="mouseleave"||Se==="mouseout"){var er=!1,ur=function(Yt){var ar=Tt.getLayer(Je)?Tt.queryRenderedFeatures(Yt.point,{layers:[Je]}):[];ar.length?er=!0:er&&(er=!1,_t.call(Tt,new fr(Se,Tt,Yt.originalEvent)))},mr=function(Yt){er&&(er=!1,_t.call(Tt,new fr(Se,Tt,Yt.originalEvent)))};return{layer:Je,listener:_t,delegates:{mousemove:ur,mouseout:mr}}}else{var dr=function(Yt){var ar=Tt.getLayer(Je)?Tt.queryRenderedFeatures(Yt.point,{layers:[Je]}):[];ar.length&&(Yt.features=ar,_t.call(Tt,Yt),delete Yt.features)};return{layer:Je,listener:_t,delegates:(it={},it[Se]=dr,it)}}},X.prototype.on=function(Se,Je,_t){if(_t===void 0)return Me.prototype.on.call(this,Se,Je);var Tt=this._createDelegatedListener(Se,Je,_t);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Se]=this._delegatedListeners[Se]||[],this._delegatedListeners[Se].push(Tt);for(var it in Tt.delegates)this.on(it,Tt.delegates[it]);return this},X.prototype.once=function(Se,Je,_t){if(_t===void 0)return Me.prototype.once.call(this,Se,Je);var Tt=this._createDelegatedListener(Se,Je,_t);for(var it in Tt.delegates)this.once(it,Tt.delegates[it]);return this},X.prototype.off=function(Se,Je,_t){var Tt=this;if(_t===void 0)return Me.prototype.off.call(this,Se,Je);var it=function(dt){for(var Lt=dt[Se],or=0;or<Lt.length;or++){var er=Lt[or];if(er.layer===Je&&er.listener===_t){for(var ur in er.delegates)Tt.off(ur,er.delegates[ur]);return Lt.splice(or,1),Tt}}};return this._delegatedListeners&&this._delegatedListeners[Se]&&it(this._delegatedListeners),this},X.prototype.queryRenderedFeatures=function(Se,Je){if(!this.style)return[];Je===void 0&&Se!==void 0&&!(Se instanceof t.Point)&&!Array.isArray(Se)&&(Je=Se,Se=void 0),Je=Je||{},Se=Se||[[0,0],[this.transform.width,this.transform.height]];var _t;if(Se instanceof t.Point||typeof Se[0]=="number")_t=[t.Point.convert(Se)];else{var Tt=t.Point.convert(Se[0]),it=t.Point.convert(Se[1]);_t=[Tt,new t.Point(it.x,Tt.y),it,new t.Point(Tt.x,it.y),Tt]}return this.style.queryRenderedFeatures(_t,Je,this.transform)},X.prototype.querySourceFeatures=function(Se,Je){return this.style.querySourceFeatures(Se,Je)},X.prototype.setStyle=function(Se,Je){return Je=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},Je),Je.diff!==!1&&Je.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Se?(this._diffStyle(Se,Je),this):(this._localIdeographFontFamily=Je.localIdeographFontFamily,this._updateStyle(Se,Je))},X.prototype._getUIString=function(Se){var Je=this._locale[Se];if(Je==null)throw new Error("Missing UI string '"+Se+"'");return Je},X.prototype._updateStyle=function(Se,Je){if(this.style&&(this.style.setEventedParent(null),this.style._remove()),Se)this.style=new tc(this,Je||{});else return delete this.style,this;return this.style.setEventedParent(this,{style:this.style}),typeof Se=="string"?this.style.loadURL(Se):this.style.loadJSON(Se),this},X.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new tc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},X.prototype._diffStyle=function(Se,Je){var _t=this;if(typeof Se=="string"){var Tt=this._requestManager.normalizeStyleURL(Se),it=this._requestManager.transformRequest(Tt,t.ResourceType.Style);t.getJSON(it,function(dt,Lt){dt?_t.fire(new t.ErrorEvent(dt)):Lt&&_t._updateDiff(Lt,Je)})}else typeof Se=="object"&&this._updateDiff(Se,Je)},X.prototype._updateDiff=function(Se,Je){try{this.style.setState(Se)&&this._update(!0)}catch(_t){t.warnOnce("Unable to perform style diff: "+(_t.message||_t.error||_t)+".  Rebuilding the style from scratch."),this._updateStyle(Se,Je)}},X.prototype.getStyle=function(){if(this.style)return this.style.serialize()},X.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},X.prototype.addSource=function(Se,Je){return this._lazyInitEmptyStyle(),this.style.addSource(Se,Je),this._update(!0)},X.prototype.isSourceLoaded=function(Se){var Je=this.style&&this.style.sourceCaches[Se];if(Je===void 0){this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+Se+"'")));return}return Je.loaded()},X.prototype.areTilesLoaded=function(){var Se=this.style&&this.style.sourceCaches;for(var Je in Se){var _t=Se[Je],Tt=_t._tiles;for(var it in Tt){var dt=Tt[it];if(!(dt.state==="loaded"||dt.state==="errored"))return!1}}return!0},X.prototype.addSourceType=function(Se,Je,_t){return this._lazyInitEmptyStyle(),this.style.addSourceType(Se,Je,_t)},X.prototype.removeSource=function(Se){return this.style.removeSource(Se),this._update(!0)},X.prototype.getSource=function(Se){return this.style.getSource(Se)},X.prototype.addImage=function(Se,Je,_t){_t===void 0&&(_t={});var Tt=_t.pixelRatio;Tt===void 0&&(Tt=1);var it=_t.sdf;it===void 0&&(it=!1);var dt=_t.stretchX,Lt=_t.stretchY,or=_t.content;this._lazyInitEmptyStyle();var er=0;if(Je instanceof si||Ta&&Je instanceof Ta){var ur=t.browser.getImageData(Je),mr=ur.width,dr=ur.height,Yt=ur.data;this.style.addImage(Se,{data:new t.RGBAImage({width:mr,height:dr},Yt),pixelRatio:Tt,stretchX:dt,stretchY:Lt,content:or,sdf:it,version:er})}else{if(Je.width===void 0||Je.height===void 0)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var ar=Je.width,tr=Je.height,Yr=Je.data,un=Je;this.style.addImage(Se,{data:new t.RGBAImage({width:ar,height:tr},new Uint8Array(Yr)),pixelRatio:Tt,stretchX:dt,stretchY:Lt,content:or,sdf:it,version:er,userImage:un}),un.onAdd&&un.onAdd(this,Se)}},X.prototype.updateImage=function(Se,Je){var _t=this.style.getImage(Se);if(!_t)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var Tt=Je instanceof si||Ta&&Je instanceof Ta?t.browser.getImageData(Je):Je,it=Tt.width,dt=Tt.height,Lt=Tt.data;if(it===void 0||dt===void 0)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(it!==_t.data.width||dt!==_t.data.height)return this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var or=!(Je instanceof si||Ta&&Je instanceof Ta);_t.data.replace(Lt,or),this.style.updateImage(Se,_t)},X.prototype.hasImage=function(Se){return Se?!!this.style.getImage(Se):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},X.prototype.removeImage=function(Se){this.style.removeImage(Se)},X.prototype.loadImage=function(Se,Je){t.getImage(this._requestManager.transformRequest(Se,t.ResourceType.Image),Je)},X.prototype.listImages=function(){return this.style.listImages()},X.prototype.addLayer=function(Se,Je){return this._lazyInitEmptyStyle(),this.style.addLayer(Se,Je),this._update(!0)},X.prototype.moveLayer=function(Se,Je){return this.style.moveLayer(Se,Je),this._update(!0)},X.prototype.removeLayer=function(Se){return this.style.removeLayer(Se),this._update(!0)},X.prototype.getLayer=function(Se){return this.style.getLayer(Se)},X.prototype.setLayerZoomRange=function(Se,Je,_t){return this.style.setLayerZoomRange(Se,Je,_t),this._update(!0)},X.prototype.setFilter=function(Se,Je,_t){return _t===void 0&&(_t={}),this.style.setFilter(Se,Je,_t),this._update(!0)},X.prototype.getFilter=function(Se){return this.style.getFilter(Se)},X.prototype.setPaintProperty=function(Se,Je,_t,Tt){return Tt===void 0&&(Tt={}),this.style.setPaintProperty(Se,Je,_t,Tt),this._update(!0)},X.prototype.getPaintProperty=function(Se,Je){return this.style.getPaintProperty(Se,Je)},X.prototype.setLayoutProperty=function(Se,Je,_t,Tt){return Tt===void 0&&(Tt={}),this.style.setLayoutProperty(Se,Je,_t,Tt),this._update(!0)},X.prototype.getLayoutProperty=function(Se,Je){return this.style.getLayoutProperty(Se,Je)},X.prototype.setLight=function(Se,Je){return Je===void 0&&(Je={}),this._lazyInitEmptyStyle(),this.style.setLight(Se,Je),this._update(!0)},X.prototype.getLight=function(){return this.style.getLight()},X.prototype.setFeatureState=function(Se,Je){return this.style.setFeatureState(Se,Je),this._update()},X.prototype.removeFeatureState=function(Se,Je){return this.style.removeFeatureState(Se,Je),this._update()},X.prototype.getFeatureState=function(Se){return this.style.getFeatureState(Se)},X.prototype.getContainer=function(){return this._container},X.prototype.getCanvasContainer=function(){return this._canvasContainer},X.prototype.getCanvas=function(){return this._canvas},X.prototype._containerDimensions=function(){var Se=0,Je=0;return this._container&&(Se=this._container.clientWidth||400,Je=this._container.clientHeight||300),[Se,Je]},X.prototype._detectMissingCSS=function(){var Se=t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color");Se!=="rgb(250, 128, 114)"&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},X.prototype._setupContainer=function(){var Se=this._container;Se.classList.add("mapboxgl-map");var Je=this._missingCSSCanary=a.create("div","mapboxgl-canary",Se);Je.style.visibility="hidden",this._detectMissingCSS();var _t=this._canvasContainer=a.create("div","mapboxgl-canvas-container",Se);this._interactive&&_t.classList.add("mapboxgl-interactive"),this._canvas=a.create("canvas","mapboxgl-canvas",_t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map"),this._canvas.setAttribute("role","region");var Tt=this._containerDimensions();this._resizeCanvas(Tt[0],Tt[1]);var it=this._controlContainer=a.create("div","mapboxgl-control-container",Se),dt=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(Lt){dt[Lt]=a.create("div","mapboxgl-ctrl-"+Lt,it)}),this._container.addEventListener("scroll",this._onMapScroll,!1)},X.prototype._resizeCanvas=function(Se,Je){var _t=t.browser.devicePixelRatio||1;this._canvas.width=_t*Se,this._canvas.height=_t*Je,this._canvas.style.width=Se+"px",this._canvas.style.height=Je+"px"},X.prototype._setupPainter=function(){var Se=t.extend({},r.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),Je=this._canvas.getContext("webgl",Se)||this._canvas.getContext("experimental-webgl",Se);if(!Je){this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")));return}this.painter=new Bs(Je,this.transform),t.webpSupported.testSupport(Je)},X.prototype._contextLost=function(Se){Se.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:Se}))},X.prototype._contextRestored=function(Se){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:Se}))},X.prototype._onMapScroll=function(Se){if(Se.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},X.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},X.prototype._update=function(Se){return this.style?(this._styleDirty=this._styleDirty||Se,this._sourcesDirty=!0,this.triggerRepaint(),this):this},X.prototype._requestRenderFrame=function(Se){return this._update(),this._renderTaskQueue.add(Se)},X.prototype._cancelRenderFrame=function(Se){this._renderTaskQueue.remove(Se)},X.prototype._render=function(Se){var Je=this,_t,Tt=0,it=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(_t=it.createQueryEXT(),it.beginQueryEXT(it.TIME_ELAPSED_EXT,_t),Tt=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Se),!this._removed){var dt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var Lt=this.transform.zoom,or=t.browser.now();this.style.zoomHistory.update(Lt,or);var er=new t.EvaluationParameters(Lt,{now:or,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ur=er.crossFadingFactor();(ur!==1||ur!==this._crossFadingFactor)&&(dt=!0,this._crossFadingFactor=ur),this.style.update(er)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||dt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var mr=t.browser.now()-Tt;it.endQueryEXT(it.TIME_ELAPSED_EXT,_t),setTimeout(function(){var ar=it.getQueryObjectEXT(_t,it.QUERY_RESULT_EXT)/1e6;it.deleteQueryEXT(_t),Je.fire(new t.Event("gpu-timing-frame",{cpuTime:mr,gpuTime:ar}))},50)}if(this.listens("gpu-timing-layer")){var dr=this.painter.collectGpuTimers();setTimeout(function(){var ar=Je.painter.queryGpuTimers(dr);Je.fire(new t.Event("gpu-timing-layer",{layerTimes:ar}))},50)}var Yt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Yt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this._loaded&&!this._fullyLoaded&&!Yt&&(this._fullyLoaded=!0),this}},X.prototype.remove=function(){this._hash&&this._hash.remove();for(var Se=0,Je=this._controls;Se<Je.length;Se+=1){var _t=Je[Se];_t.onRemove(this)}this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof t.window<"u"&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("orientationchange",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var Tt=this.painter.context.gl.getExtension("WEBGL_lose_context");Tt&&Tt.loseContext&&Tt.loseContext(),Ho(this._canvasContainer),Ho(this._controlContainer),Ho(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},X.prototype.triggerRepaint=function(){var Se=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(Je){Se._frame=null,Se._render(Je)}))},X.prototype._onWindowOnline=function(){this._update()},X.prototype._onWindowResize=function(Se){this._trackResize&&this.resize({originalEvent:Se})._update()},ge.showTileBoundaries.get=function(){return!!this._showTileBoundaries},ge.showTileBoundaries.set=function(ne){this._showTileBoundaries!==ne&&(this._showTileBoundaries=ne,this._update())},ge.showPadding.get=function(){return!!this._showPadding},ge.showPadding.set=function(ne){this._showPadding!==ne&&(this._showPadding=ne,this._update())},ge.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},ge.showCollisionBoxes.set=function(ne){this._showCollisionBoxes!==ne&&(this._showCollisionBoxes=ne,ne?this.style._generateCollisionBoxes():this._update())},ge.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},ge.showOverdrawInspector.set=function(ne){this._showOverdrawInspector!==ne&&(this._showOverdrawInspector=ne,this._update())},ge.repaint.get=function(){return!!this._repaint},ge.repaint.set=function(ne){this._repaint!==ne&&(this._repaint=ne,this.triggerRepaint())},ge.vertices.get=function(){return!!this._vertices},ge.vertices.set=function(ne){this._vertices=ne,this._update()},X.prototype._setCacheLimits=function(Se,Je){t.setCacheLimits(Se,Je)},ge.version.get=function(){return t.version},Object.defineProperties(X.prototype,ge),X})(Kn);function Ho(Me){Me.parentNode&&Me.parentNode.removeChild(Me)}var ji={showCompass:!0,showZoom:!0,visualizePitch:!1},no=function(X){var ge=this;this.options=t.extend({},ji,X),this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(ne){return ne.preventDefault()}),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(ne){return ge._map.zoomIn({},{originalEvent:ne})}),a.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(ne){return ge._map.zoomOut({},{originalEvent:ne})}),a.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(ne){ge.options.visualizePitch?ge._map.resetNorthPitch({},{originalEvent:ne}):ge._map.resetNorth({},{originalEvent:ne})}),this._compassIcon=a.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};no.prototype._updateZoomButtons=function(){var X=this._map.getZoom(),ge=X===this._map.getMaxZoom(),ne=X===this._map.getMinZoom();this._zoomInButton.disabled=ge,this._zoomOutButton.disabled=ne,this._zoomInButton.setAttribute("aria-disabled",ge.toString()),this._zoomOutButton.setAttribute("aria-disabled",ne.toString())},no.prototype._rotateCompassArrow=function(){var X=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=X},no.prototype.onAdd=function(X){return this._map=X,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new di(this._map,this._compass,this.options.visualizePitch)),this._container},no.prototype.onRemove=function(){a.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},no.prototype._createButton=function(X,ge){var ne=a.create("button",X,this._container);return ne.type="button",ne.addEventListener("click",ge),ne},no.prototype._setButtonTitle=function(X,ge){var ne=this._map._getUIString("NavigationControl."+ge);X.title=ne,X.setAttribute("aria-label",ne)};var di=function(X,ge,ne){ne===void 0&&(ne=!1),this._clickTolerance=10,this.element=ge,this.mouseRotate=new nl({clickTolerance:X.dragRotate._mouseRotate._clickTolerance}),this.map=X,ne&&(this.mousePitch=new Go({clickTolerance:X.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),a.addEventListener(ge,"mousedown",this.mousedown),a.addEventListener(ge,"touchstart",this.touchstart,{passive:!1}),a.addEventListener(ge,"touchmove",this.touchmove),a.addEventListener(ge,"touchend",this.touchend),a.addEventListener(ge,"touchcancel",this.reset)};di.prototype.down=function(X,ge){this.mouseRotate.mousedown(X,ge),this.mousePitch&&this.mousePitch.mousedown(X,ge),a.disableDrag()},di.prototype.move=function(X,ge){var ne=this.map,Se=this.mouseRotate.mousemoveWindow(X,ge);if(Se&&Se.bearingDelta&&ne.setBearing(ne.getBearing()+Se.bearingDelta),this.mousePitch){var Je=this.mousePitch.mousemoveWindow(X,ge);Je&&Je.pitchDelta&&ne.setPitch(ne.getPitch()+Je.pitchDelta)}},di.prototype.off=function(){var X=this.element;a.removeEventListener(X,"mousedown",this.mousedown),a.removeEventListener(X,"touchstart",this.touchstart,{passive:!1}),a.removeEventListener(X,"touchmove",this.touchmove),a.removeEventListener(X,"touchend",this.touchend),a.removeEventListener(X,"touchcancel",this.reset),this.offTemp()},di.prototype.offTemp=function(){a.enableDrag(),a.removeEventListener(t.window,"mousemove",this.mousemove),a.removeEventListener(t.window,"mouseup",this.mouseup)},di.prototype.mousedown=function(X){this.down(t.extend({},X,{ctrlKey:!0,preventDefault:function(){return X.preventDefault()}}),a.mousePos(this.element,X)),a.addEventListener(t.window,"mousemove",this.mousemove),a.addEventListener(t.window,"mouseup",this.mouseup)},di.prototype.mousemove=function(X){this.move(X,a.mousePos(this.element,X))},di.prototype.mouseup=function(X){this.mouseRotate.mouseupWindow(X),this.mousePitch&&this.mousePitch.mouseupWindow(X),this.offTemp()},di.prototype.touchstart=function(X){X.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=a.touchPos(this.element,X.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return X.preventDefault()}},this._startPos))},di.prototype.touchmove=function(X){X.targetTouches.length!==1?this.reset():(this._lastPos=a.touchPos(this.element,X.targetTouches)[0],this.move({preventDefault:function(){return X.preventDefault()}},this._lastPos))},di.prototype.touchend=function(X){X.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},di.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};function jo(Me,X,ge){if(Me=new t.LngLat(Me.lng,Me.lat),X){var ne=new t.LngLat(Me.lng-360,Me.lat),Se=new t.LngLat(Me.lng+360,Me.lat),Je=ge.locationPoint(Me).distSqr(X);ge.locationPoint(ne).distSqr(X)<Je?Me=ne:ge.locationPoint(Se).distSqr(X)<Je&&(Me=Se)}for(;Math.abs(Me.lng-ge.center.lng)>180;){var _t=ge.locationPoint(Me);if(_t.x>=0&&_t.y>=0&&_t.x<=ge.width&&_t.y<=ge.height)break;Me.lng>ge.center.lng?Me.lng-=360:Me.lng+=360}return Me}var rs={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function ds(Me,X,ge){var ne=Me.classList;for(var Se in rs)ne.remove("mapboxgl-"+ge+"-anchor-"+Se);ne.add("mapboxgl-"+ge+"-anchor-"+X)}var _l=(function(Me){function X(ge,ne){if(Me.call(this),(ge instanceof t.window.HTMLElement||ne)&&(ge=t.extend({element:ge},ne)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=ge&&ge.anchor||"center",this._color=ge&&ge.color||"#3FB1CE",this._scale=ge&&ge.scale||1,this._draggable=ge&&ge.draggable||!1,this._clickTolerance=ge&&ge.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=ge&&ge.rotation||0,this._rotationAlignment=ge&&ge.rotationAlignment||"auto",this._pitchAlignment=ge&&ge.pitchAlignment&&ge.pitchAlignment!=="auto"?ge.pitchAlignment:this._rotationAlignment,!ge||!ge.element){this._defaultMarker=!0,this._element=a.create("div"),this._element.setAttribute("aria-label","Map marker");var Se=a.createNS("http://www.w3.org/2000/svg","svg"),Je=41,_t=27;Se.setAttributeNS(null,"display","block"),Se.setAttributeNS(null,"height",Je+"px"),Se.setAttributeNS(null,"width",_t+"px"),Se.setAttributeNS(null,"viewBox","0 0 "+_t+" "+Je);var Tt=a.createNS("http://www.w3.org/2000/svg","g");Tt.setAttributeNS(null,"stroke","none"),Tt.setAttributeNS(null,"stroke-width","1"),Tt.setAttributeNS(null,"fill","none"),Tt.setAttributeNS(null,"fill-rule","evenodd");var it=a.createNS("http://www.w3.org/2000/svg","g");it.setAttributeNS(null,"fill-rule","nonzero");var dt=a.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),dt.setAttributeNS(null,"fill","#000000");for(var Lt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}],or=0,er=Lt;or<er.length;or+=1){var ur=er[or],mr=a.createNS("http://www.w3.org/2000/svg","ellipse");mr.setAttributeNS(null,"opacity","0.04"),mr.setAttributeNS(null,"cx","10.5"),mr.setAttributeNS(null,"cy","5.80029008"),mr.setAttributeNS(null,"rx",ur.rx),mr.setAttributeNS(null,"ry",ur.ry),dt.appendChild(mr)}var dr=a.createNS("http://www.w3.org/2000/svg","g");dr.setAttributeNS(null,"fill",this._color);var Yt=a.createNS("http://www.w3.org/2000/svg","path");Yt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),dr.appendChild(Yt);var ar=a.createNS("http://www.w3.org/2000/svg","g");ar.setAttributeNS(null,"opacity","0.25"),ar.setAttributeNS(null,"fill","#000000");var tr=a.createNS("http://www.w3.org/2000/svg","path");tr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),ar.appendChild(tr);var Yr=a.createNS("http://www.w3.org/2000/svg","g");Yr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Yr.setAttributeNS(null,"fill","#FFFFFF");var un=a.createNS("http://www.w3.org/2000/svg","g");un.setAttributeNS(null,"transform","translate(8.0, 8.0)");var En=a.createNS("http://www.w3.org/2000/svg","circle");En.setAttributeNS(null,"fill","#000000"),En.setAttributeNS(null,"opacity","0.25"),En.setAttributeNS(null,"cx","5.5"),En.setAttributeNS(null,"cy","5.5"),En.setAttributeNS(null,"r","5.4999962");var Ea=a.createNS("http://www.w3.org/2000/svg","circle");Ea.setAttributeNS(null,"fill","#FFFFFF"),Ea.setAttributeNS(null,"cx","5.5"),Ea.setAttributeNS(null,"cy","5.5"),Ea.setAttributeNS(null,"r","5.4999962"),un.appendChild(En),un.appendChild(Ea),it.appendChild(dt),it.appendChild(dr),it.appendChild(ar),it.appendChild(Yr),it.appendChild(un),Se.appendChild(it),Se.setAttributeNS(null,"height",Je*this._scale+"px"),Se.setAttributeNS(null,"width",_t*this._scale+"px"),this._element.appendChild(Se),this._offset=t.Point.convert(ge&&ge.offset||[0,-14])}else this._element=ge.element,this._offset=t.Point.convert(ge&&ge.offset||[0,0]);this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(fa){fa.preventDefault()}),this._element.addEventListener("mousedown",function(fa){fa.preventDefault()}),ds(this._element,this._anchor,"marker"),this._popup=null}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.addTo=function(ne){return this.remove(),this._map=ne,ne.getCanvasContainer().appendChild(this._element),ne.on("move",this._update),ne.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},X.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",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),a.remove(this._element),this._popup&&this._popup.remove(),this},X.prototype.getLngLat=function(){return this._lngLat},X.prototype.setLngLat=function(ne){return this._lngLat=t.LngLat.convert(ne),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},X.prototype.getElement=function(){return this._element},X.prototype.setPopup=function(ne){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),ne){if(!("offset"in ne.options)){var Se=38.1,Je=13.5,_t=Math.sqrt(Math.pow(Je,2)/2);ne.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-Se],"bottom-left":[_t,(Se-Je+_t)*-1],"bottom-right":[-_t,(Se-Je+_t)*-1],left:[Je,(Se-Je)*-1],right:[-Je,(Se-Je)*-1]}:this._offset}this._popup=ne,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},X.prototype._onKeyPress=function(ne){var Se=ne.code,Je=ne.charCode||ne.keyCode;(Se==="Space"||Se==="Enter"||Je===32||Je===13)&&this.togglePopup()},X.prototype._onMapClick=function(ne){var Se=ne.originalEvent.target,Je=this._element;this._popup&&(Se===Je||Je.contains(Se))&&this.togglePopup()},X.prototype.getPopup=function(){return this._popup},X.prototype.togglePopup=function(){var ne=this._popup;if(ne)ne.isOpen()?ne.remove():ne.addTo(this._map);else return this;return this},X.prototype._update=function(ne){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=jo(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var Se="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Se="rotateZ("+this._rotation+"deg)":this._rotationAlignment==="map"&&(Se="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var Je="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Je="rotateX(0deg)":this._pitchAlignment==="map"&&(Je="rotateX("+this._map.getPitch()+"deg)"),(!ne||ne.type==="moveend")&&(this._pos=this._pos.round()),a.setTransform(this._element,rs[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+Je+" "+Se)}},X.prototype.getOffset=function(){return this._offset},X.prototype.setOffset=function(ne){return this._offset=t.Point.convert(ne),this._update(),this},X.prototype._onMove=function(ne){if(!this._isDragging){var Se=this._clickTolerance||this._map._clickTolerance;this._isDragging=ne.point.dist(this._pointerdownPos)>=Se}this._isDragging&&(this._pos=ne.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag")))},X.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new t.Event("dragend")),this._state="inactive"},X.prototype._addDragHandler=function(ne){this._element.contains(ne.originalEvent.target)&&(ne.preventDefault(),this._positionDelta=ne.point.sub(this._pos).add(this._offset),this._pointerdownPos=ne.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))},X.prototype.setDraggable=function(ne){return this._draggable=!!ne,this._map&&(ne?(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},X.prototype.isDraggable=function(){return this._draggable},X.prototype.setRotation=function(ne){return this._rotation=ne||0,this._update(),this},X.prototype.getRotation=function(){return this._rotation},X.prototype.setRotationAlignment=function(ne){return this._rotationAlignment=ne||"auto",this._update(),this},X.prototype.getRotationAlignment=function(){return this._rotationAlignment},X.prototype.setPitchAlignment=function(ne){return this._pitchAlignment=ne&&ne!=="auto"?ne:this._rotationAlignment,this._update(),this},X.prototype.getPitchAlignment=function(){return this._pitchAlignment},X})(t.Evented),vs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Lu;function ll(Me){Lu!==void 0?Me(Lu):t.window.navigator.permissions!==void 0?t.window.navigator.permissions.query({name:"geolocation"}).then(function(X){Lu=X.state!=="denied",Me(Lu)}):(Lu=!!t.window.navigator.geolocation,Me(Lu))}var wu=0,Gu=!1,oc=(function(Me){function X(ge){Me.call(this),this.options=t.extend({},vs,ge),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.onAdd=function(ne){return this._map=ne,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),ll(this._setupUI),this._container},X.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(t.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(),a.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,wu=0,Gu=!1},X.prototype._isOutOfMapMaxBounds=function(ne){var Se=this._map.getMaxBounds(),Je=ne.coords;return Se&&(Je.longitude<Se.getWest()||Je.longitude>Se.getEast()||Je.latitude<Se.getSouth()||Je.latitude>Se.getNorth())},X.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break}},X.prototype._onSuccess=function(ne){if(this._map){if(this._isOutOfMapMaxBounds(ne)){this._setErrorState(),this.fire(new t.Event("outofmaxbounds",ne)),this._updateMarker(),this._finish();return}if(this.options.trackUserLocation)switch(this._lastKnownPosition=ne,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(ne),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(ne),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",ne)),this._finish()}},X.prototype._updateCamera=function(ne){var Se=new t.LngLat(ne.coords.longitude,ne.coords.latitude),Je=ne.coords.accuracy,_t=this._map.getBearing(),Tt=t.extend({bearing:_t},this.options.fitBoundsOptions);this._map.fitBounds(Se.toBounds(Je),Tt,{geolocateSource:!0})},X.prototype._updateMarker=function(ne){if(ne){var Se=new t.LngLat(ne.coords.longitude,ne.coords.latitude);this._accuracyCircleMarker.setLngLat(Se).addTo(this._map),this._userLocationDotMarker.setLngLat(Se).addTo(this._map),this._accuracy=ne.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},X.prototype._updateCircleRadius=function(){var ne=this._map._container.clientHeight/2,Se=this._map.unproject([0,ne]),Je=this._map.unproject([1,ne]),_t=Se.distanceTo(Je),Tt=Math.ceil(2*this._accuracy/_t);this._circleElement.style.width=Tt+"px",this._circleElement.style.height=Tt+"px"},X.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},X.prototype._onError=function(ne){if(this._map){if(this.options.trackUserLocation)if(ne.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var Se=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=Se,this._geolocateButton.setAttribute("aria-label",Se),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(ne.code===3&&Gu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",ne)),this._finish()}},X.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},X.prototype._setupUI=function(ne){var Se=this;if(this._container.addEventListener("contextmenu",function(Tt){return Tt.preventDefault()}),this._geolocateButton=a.create("button","mapboxgl-ctrl-geolocate",this._container),a.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",ne===!1){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Je=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Je,this._geolocateButton.setAttribute("aria-label",Je)}else{var _t=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=_t,this._geolocateButton.setAttribute("aria-label",_t)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=a.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new _l(this._dotElement),this._circleElement=a.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new _l({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(Tt){var it=Tt.originalEvent&&Tt.originalEvent.type==="resize";!Tt.geolocateSource&&Se._watchState==="ACTIVE_LOCK"&&!it&&(Se._watchState="BACKGROUND",Se._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),Se._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),Se.fire(new t.Event("trackuserlocationend")))})},X.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":wu--,Gu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"));break}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),wu++;var ne;wu>1?(ne={maximumAge:6e5,timeout:0},Gu=!0):(ne=this.options.positionOptions,Gu=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,ne)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},X.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},X})(t.Evented),Mf={maxWidth:100,unit:"metric"},su=function(X){this.options=t.extend({},Mf,X),t.bindAll(["_onMove","setUnit"],this)};su.prototype.getDefaultPosition=function(){return"bottom-left"},su.prototype._onMove=function(){gu(this._map,this._container,this.options)},su.prototype.onAdd=function(X){return this._map=X,this._container=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",X.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},su.prototype.onRemove=function(){a.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},su.prototype.setUnit=function(X){this.options.unit=X,gu(this._map,this._container,this.options)};function gu(Me,X,ge){var ne=ge&&ge.maxWidth||100,Se=Me._container.clientHeight/2,Je=Me.unproject([0,Se]),_t=Me.unproject([ne,Se]),Tt=Je.distanceTo(_t);if(ge&&ge.unit==="imperial"){var it=3.2808*Tt;if(it>5280){var dt=it/5280;ko(X,ne,dt,Me._getUIString("ScaleControl.Miles"))}else ko(X,ne,it,Me._getUIString("ScaleControl.Feet"))}else if(ge&&ge.unit==="nautical"){var Lt=Tt/1852;ko(X,ne,Lt,Me._getUIString("ScaleControl.NauticalMiles"))}else Tt>=1e3?ko(X,ne,Tt/1e3,Me._getUIString("ScaleControl.Kilometers")):ko(X,ne,Tt,Me._getUIString("ScaleControl.Meters"))}function ko(Me,X,ge,ne){var Se=$s(ge),Je=Se/ge;Me.style.width=X*Je+"px",Me.innerHTML=Se+"&nbsp;"+ne}function sc(Me){var X=Math.pow(10,Math.ceil(-Math.log(Me)/Math.LN10));return Math.round(Me*X)/X}function $s(Me){var X=Math.pow(10,(""+Math.floor(Me)).length-1),ge=Me/X;return ge=ge>=10?10:ge>=5?5:ge>=3?3:ge>=2?2:ge>=1?1:sc(ge),X*ge}var Hl=function(X){this._fullscreen=!1,X&&X.container&&(X.container instanceof t.window.HTMLElement?this._container=X.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Hl.prototype.onAdd=function(X){return this._map=X,this._container||(this._container=this._map.getContainer()),this._controlContainer=a.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Hl.prototype.onRemove=function(){a.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Hl.prototype._setupUI=function(){var X=this._fullscreenButton=a.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);a.create("span","mapboxgl-ctrl-icon",X).setAttribute("aria-hidden",!0),X.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hl.prototype._updateTitle=function(){var X=this._getTitle();this._fullscreenButton.setAttribute("aria-label",X),this._fullscreenButton.title=X},Hl.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Hl.prototype._isFullscreen=function(){return this._fullscreen},Hl.prototype._changeIcon=function(){var X=t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement;X===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Hl.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var gc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},_c=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),Vo=(function(Me){function X(ge){Me.call(this),this.options=t.extend(Object.create(gc),ge),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return Me&&(X.__proto__=Me),X.prototype=Object.create(Me&&Me.prototype),X.prototype.constructor=X,X.prototype.addTo=function(ne){return this._map&&this.remove(),this._map=ne,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},X.prototype.isOpen=function(){return!!this._map},X.prototype.remove=function(){return this._content&&a.remove(this._content),this._container&&(a.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},X.prototype.getLngLat=function(){return this._lngLat},X.prototype.setLngLat=function(ne){return this._lngLat=t.LngLat.convert(ne),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},X.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},X.prototype.getElement=function(){return this._container},X.prototype.setText=function(ne){return this.setDOMContent(t.window.document.createTextNode(ne))},X.prototype.setHTML=function(ne){var Se=t.window.document.createDocumentFragment(),Je=t.window.document.createElement("body"),_t;for(Je.innerHTML=ne;_t=Je.firstChild,!!_t;)Se.appendChild(_t);return this.setDOMContent(Se)},X.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},X.prototype.setMaxWidth=function(ne){return this.options.maxWidth=ne,this._update(),this},X.prototype.setDOMContent=function(ne){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=a.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(ne),this._createCloseButton(),this._update(),this._focusFirstElement(),this},X.prototype.addClassName=function(ne){this._container&&this._container.classList.add(ne)},X.prototype.removeClassName=function(ne){this._container&&this._container.classList.remove(ne)},X.prototype.setOffset=function(ne){return this.options.offset=ne,this._update(),this},X.prototype.toggleClassName=function(ne){if(this._container)return this._container.classList.toggle(ne)},X.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=a.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},X.prototype._onMouseUp=function(ne){this._update(ne.point)},X.prototype._onMouseMove=function(ne){this._update(ne.point)},X.prototype._onDrag=function(ne){this._update(ne.point)},X.prototype._update=function(ne){var Se=this,Je=this._lngLat||this._trackPointer;if(!(!this._map||!Je||!this._content)&&(this._container||(this._container=a.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=a.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ur){return Se._container.classList.add(ur)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=jo(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!ne))){var _t=this._pos=this._trackPointer&&ne?ne:this._map.project(this._lngLat),Tt=this.options.anchor,it=Ms(this.options.offset);if(!Tt){var dt=this._container.offsetWidth,Lt=this._container.offsetHeight,or;_t.y+it.bottom.y<Lt?or=["top"]:_t.y>this._map.transform.height-Lt?or=["bottom"]:or=[],_t.x<dt/2?or.push("left"):_t.x>this._map.transform.width-dt/2&&or.push("right"),or.length===0?Tt="bottom":Tt=or.join("-")}var er=_t.add(it[Tt]).round();a.setTransform(this._container,rs[Tt]+" translate("+er.x+"px,"+er.y+"px)"),ds(this._container,Tt,"popup")}},X.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var ne=this._container.querySelector(_c);ne&&ne.focus()}},X.prototype._onClose=function(){this.remove()},X})(t.Evented);function Ms(Me){if(Me)if(typeof Me=="number"){var X=Math.round(Math.sqrt(.5*Math.pow(Me,2)));return{center:new t.Point(0,0),top:new t.Point(0,Me),"top-left":new t.Point(X,X),"top-right":new t.Point(-X,X),bottom:new t.Point(0,-Me),"bottom-left":new t.Point(X,-X),"bottom-right":new t.Point(-X,-X),left:new t.Point(Me,0),right:new t.Point(-Me,0)}}else if(Me instanceof t.Point||Array.isArray(Me)){var ge=t.Point.convert(Me);return{center:ge,top:ge,"top-left":ge,"top-right":ge,bottom:ge,"bottom-left":ge,"bottom-right":ge,left:ge,right:ge}}else return{center:t.Point.convert(Me.center||[0,0]),top:t.Point.convert(Me.top||[0,0]),"top-left":t.Point.convert(Me["top-left"]||[0,0]),"top-right":t.Point.convert(Me["top-right"]||[0,0]),bottom:t.Point.convert(Me.bottom||[0,0]),"bottom-left":t.Point.convert(Me["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(Me["bottom-right"]||[0,0]),left:t.Point.convert(Me.left||[0,0]),right:t.Point.convert(Me.right||[0,0])};else return Ms(new t.Point(0,0))}var Rs={version:t.version,supported:r,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ji,NavigationControl:no,GeolocateControl:oc,AttributionControl:ga,ScaleControl:su,FullscreenControl:Hl,Popup:Vo,Marker:_l,Style:tc,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:Gi,clearPrewarmedResources:qt,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(Me){t.config.ACCESS_TOKEN=Me},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(Me){t.config.API_URL=Me},get workerCount(){return Fa.workerCount},set workerCount(Me){Fa.workerCount=Me},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(Me){t.config.MAX_PARALLEL_IMAGE_REQUESTS=Me},clearStorage:function(X){t.clearTileCache(X)},workerUrl:""};return Rs}),C})}}),ate=Ne({"src/plots/mapbox/layers.js"(te,Z){var v=In(),w=uc().sanitizeHTML,C=aF(),P=R_();function t(s,o){this.subplot=s,this.uid=s.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=P.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var r=t.prototype;r.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=a(o)},r.needsNewImage=function(s){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},r.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},r.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},r.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},r.updateImage=function(s){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var u=this.findFollowingMapboxLayerId(this.lookupBelow());u!==null&&this.subplot.map.moveLayer(this.idLayer,u)},r.updateSource=function(s){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!a(s)){var u=i(s);o.addSource(this.idSource,u)}},r.findFollowingMapboxLayerId=function(s){if(s==="traces")for(var o=this.subplot.getMapLayers(),u=0;u<o.length;u++){var d=o[u].id;if(typeof d=="string"&&d.indexOf(P.traceLayerPrefix)===0){s=d;break}}return s},r.updateLayer=function(s){var o=this.subplot,u=l(s),d=this.lookupBelow(),h=this.findFollowingMapboxLayerId(d);this.removeLayer(),a(s)&&o.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:u.layout,paint:u.paint},h),this.layerType=s.type,this.below=d},r.updateStyle=function(s){if(a(s)){var o=l(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",o.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",o.paint)}},r.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},r.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function a(s){if(!s.visible)return!1;var o=s.source;if(Array.isArray(o)&&o.length>0){for(var u=0;u<o.length;u++)if(typeof o[u]!="string"||o[u].length===0)return!1;return!0}return v.isPlainObject(o)||typeof o=="string"&&o.length>0}function l(s){var o={},u={};switch(s.type){case"circle":v.extendFlat(u,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":v.extendFlat(u,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":v.extendFlat(u,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var d=s.symbol,h=C(d.textposition,d.iconsize);v.extendFlat(o,{"icon-image":d.icon+"-15","icon-size":d.iconsize/10,"text-field":d.text,"text-size":d.textfont.size,"text-anchor":h.anchor,"text-offset":h.offset,"symbol-placement":d.placement}),v.extendFlat(u,{"icon-color":s.color,"text-color":d.textfont.color,"text-opacity":s.opacity});break;case"raster":v.extendFlat(u,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:o,paint:u}}function i(s){var o=s.sourcetype,u=s.source,d={type:o},h;return o==="geojson"?h="data":o==="vector"?h=typeof u=="string"?"url":"tiles":o==="raster"?(h="tiles",d.tileSize=256):o==="image"&&(h="url",d.coordinates=s.coordinates),d[h]=u,s.sourceattribution&&(d.attribution=w(s.sourceattribution)),d}Z.exports=function(o,u,d){var h=new t(o,u);return h.update(d),h}}}),ite=Ne({"src/plots/mapbox/mapbox.js"(te,Z){var v=iF(),w=In(),C=Db(),P=Xo(),t=Os(),r=Bv(),a=nh(),l=Pm(),i=l.drawMode,s=l.selectMode,o=fh().prepSelect,u=fh().clearOutline,d=fh().clearSelectionsCache,h=fh().selectOnClick,y=R_(),m=ate();function E(b,A){this.id=A,this.gd=b;var g=b._fullLayout,f=b._context;this.container=g._glcontainer.node(),this.isStatic=f.staticPlot,this.uid=g._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(g),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var c=E.prototype;c.plot=function(b,A,g){var f=this,p=A[f.id];f.map&&p.accesstoken!==f.accessToken&&(f.map.remove(),f.map=null,f.styleObj=null,f.traceHash={},f.layerList=[]);var x;f.map?x=new Promise(function(N,D){f.updateMap(b,A,N,D)}):x=new Promise(function(N,D){f.createMap(b,A,N,D)}),g.push(x)},c.createMap=function(b,A,g,f){var p=this,x=A[p.id],N=p.styleObj=T(x.style,A);p.accessToken=x.accesstoken;var D=x.bounds,B=D?[[D.west,D.south],[D.east,D.north]]:null,U=p.map=new v.Map({container:p.div,style:N.style,center:k(x.center),zoom:x.zoom,bearing:x.bearing,pitch:x.pitch,maxBounds:B,interactive:!p.isStatic,preserveDrawingBuffer:p.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0}));U._canvas.style.left="0px",U._canvas.style.top="0px",p.rejectOnError(f),p.isStatic||p.initFx(b,A);var V=[];V.push(new Promise(function(q){U.once("load",q)})),V=V.concat(C.fetchTraceGeoData(b)),Promise.all(V).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(g)}).catch(f)},c.updateMap=function(b,A,g,f){var p=this,x=p.map,N=A[this.id];p.rejectOnError(f);var D=[],B=T(N.style,A);JSON.stringify(p.styleObj)!==JSON.stringify(B)&&(p.styleObj=B,x.setStyle(B.style),p.traceHash={},D.push(new Promise(function(U){x.once("styledata",U)}))),D=D.concat(C.fetchTraceGeoData(b)),Promise.all(D).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(g)}).catch(f)},c.fillBelowLookup=function(b,A){var g=A[this.id],f=g.layers,p,x,N=this.belowLookup={},D=!1;for(p=0;p<b.length;p++){var B=b[p][0].trace,U=B._module;typeof B.below=="string"?x=B.below:U.getBelow&&(x=U.getBelow(B,this)),x===""&&(D=!0),N["trace-"+B.uid]=x||""}for(p=0;p<f.length;p++){var V=f[p];typeof V.below=="string"?x=V.below:D?x="traces":x="",N["layout-"+p]=x}var q={},z,H;for(z in N)x=N[z],q[x]?q[x].push(z):q[x]=[z];for(x in q){var G=q[x];if(G.length>1)for(p=0;p<G.length;p++)z=G[p],z.indexOf("trace-")===0?(H=z.split("trace-")[1],this.traceHash[H]&&(this.traceHash[H].below=null)):z.indexOf("layout-")===0&&(H=z.split("layout-")[1],this.layerList[H]&&(this.layerList[H].below=null))}};var _={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};c.updateData=function(b){var A=this.traceHash,g,f,p,x,N=b.slice().sort(function(q,z){return _[q[0].trace.type]-_[z[0].trace.type]});for(p=0;p<N.length;p++){var D=N[p];f=D[0].trace,g=A[f.uid];var B=!1;g&&(g.type===f.type?(g.update(D),B=!0):g.dispose()),!B&&f._module&&(A[f.uid]=f._module.plot(this,D))}var U=Object.keys(A);e:for(p=0;p<U.length;p++){var V=U[p];for(x=0;x<b.length;x++)if(f=b[x][0].trace,V===f.uid)continue e;g=A[V],g.dispose(),delete A[V]}},c.updateLayout=function(b){var A=this.map,g=b[this.id];!this.dragging&&!this.wheeling&&(A.setCenter(k(g.center)),A.setZoom(g.zoom),A.setBearing(g.bearing),A.setPitch(g.pitch)),this.updateLayers(b),this.updateFramework(b),this.updateFx(b),this.map.resize(),this.gd._context._scrollZoom.mapbox?A.scrollZoom.enable():A.scrollZoom.disable()},c.resolveOnRender=function(b){var A=this.map;A.on("render",function g(){A.loaded()&&(A.off("render",g),setTimeout(b,10))})},c.rejectOnError=function(b){var A=this.map;function g(){b(new Error(y.mapOnErrorMsg))}A.once("error",g),A.once("style.error",g),A.once("source.error",g),A.once("tile.error",g),A.once("layer.error",g)},c.createFramework=function(b){var A=this,g=A.div=document.createElement("div");g.id=A.uid,g.style.position="absolute",A.container.appendChild(g),A.xaxis={_id:"x",c2p:function(f){return A.project(f).x}},A.yaxis={_id:"y",c2p:function(f){return A.project(f).y}},A.updateFramework(b),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(A.mockAxis,b)},c.initFx=function(b,A){var g=this,f=g.gd,p=g.map;p.on("moveend",function(D){if(g.map){var B=f._fullLayout;if(D.originalEvent||g.wheeling){var U=B[g.id];P.call("_storeDirectGUIEdit",f.layout,B._preGUI,g.getViewEdits(U));var V=g.getView();U._input.center=U.center=V.center,U._input.zoom=U.zoom=V.zoom,U._input.bearing=U.bearing=V.bearing,U._input.pitch=U.pitch=V.pitch,f.emit("plotly_relayout",g.getViewEditsWithDerived(V))}D.originalEvent&&D.originalEvent.type==="mouseup"?g.dragging=!1:g.wheeling&&(g.wheeling=!1),B._rehover&&B._rehover()}}),p.on("wheel",function(){g.wheeling=!0}),p.on("mousemove",function(D){var B=g.div.getBoundingClientRect(),U=[D.originalEvent.offsetX,D.originalEvent.offsetY];D.target.getBoundingClientRect=function(){return B},g.xaxis.p2c=function(){return p.unproject(U).lng},g.yaxis.p2c=function(){return p.unproject(U).lat},f._fullLayout._rehover=function(){f._fullLayout._hoversubplot===g.id&&f._fullLayout[g.id]&&a.hover(f,D,g.id)},a.hover(f,D,g.id),f._fullLayout._hoversubplot=g.id});function x(){a.loneUnhover(A._hoverlayer)}p.on("dragstart",function(){g.dragging=!0,x()}),p.on("zoomstart",x),p.on("mouseout",function(){f._fullLayout._hoversubplot=null});function N(){var D=g.getView();f.emit("plotly_relayouting",g.getViewEditsWithDerived(D))}p.on("drag",N),p.on("zoom",N),p.on("dblclick",function(){var D=f._fullLayout[g.id];P.call("_storeDirectGUIEdit",f.layout,f._fullLayout._preGUI,g.getViewEdits(D));var B=g.viewInitial;p.setCenter(k(B.center)),p.setZoom(B.zoom),p.setBearing(B.bearing),p.setPitch(B.pitch);var U=g.getView();D._input.center=D.center=U.center,D._input.zoom=D.zoom=U.zoom,D._input.bearing=D.bearing=U.bearing,D._input.pitch=D.pitch=U.pitch,f.emit("plotly_doubleclick",null),f.emit("plotly_relayout",g.getViewEditsWithDerived(U))}),g.clearOutline=function(){d(g.dragOptions),u(g.dragOptions.gd)},g.onClickInPanFn=function(D){return function(B){var U=f._fullLayout.clickmode;U.indexOf("select")>-1&&h(B.originalEvent,f,[g.xaxis],[g.yaxis],g.id,D),U.indexOf("event")>-1&&a.click(f,B.originalEvent)}}},c.updateFx=function(b){var A=this,g=A.map,f=A.gd;if(A.isStatic)return;function p(B){var U=A.map.unproject(B);return[U.lng,U.lat]}var x=b.dragmode,N;N=function(B,U){if(U.isRect){var V=B.range={};V[A.id]=[p([U.xmin,U.ymin]),p([U.xmax,U.ymax])]}else{var q=B.lassoPoints={};q[A.id]=U.map(p)}};var D=A.dragOptions;A.dragOptions=w.extendDeep(D||{},{dragmode:b.dragmode,element:A.div,gd:f,plotinfo:{id:A.id,domain:b[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:N},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),g.off("click",A.onClickInPanHandler),s(x)||i(x)?(g.dragPan.disable(),g.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(B,U,V){o(B,U,V,A.dragOptions,x)},r.init(A.dragOptions)):(g.dragPan.enable(),g.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),g.on("click",A.onClickInPanHandler))},c.updateFramework=function(b){var A=b[this.id].domain,g=b._size,f=this.div.style;f.width=g.w*(A.x[1]-A.x[0])+"px",f.height=g.h*(A.y[1]-A.y[0])+"px",f.left=g.l+A.x[0]*g.w+"px",f.top=g.t+(1-A.y[1])*g.h+"px",this.xaxis._offset=g.l+A.x[0]*g.w,this.xaxis._length=g.w*(A.x[1]-A.x[0]),this.yaxis._offset=g.t+(1-A.y[1])*g.h,this.yaxis._length=g.h*(A.y[1]-A.y[0])},c.updateLayers=function(b){var A=b[this.id],g=A.layers,f=this.layerList,p;if(g.length!==f.length){for(p=0;p<f.length;p++)f[p].dispose();for(f=this.layerList=[],p=0;p<g.length;p++)f.push(m(this,p,g[p]))}else for(p=0;p<g.length;p++)f[p].update(g[p])},c.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},c.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},c.setOptions=function(b,A,g){for(var f in g)this.map[A](b,f,g[f])},c.getMapLayers=function(){return this.map.getStyle().layers},c.addLayer=function(b,A){var g=this.map;if(typeof A=="string"){if(A===""){g.addLayer(b,A);return}for(var f=this.getMapLayers(),p=0;p<f.length;p++)if(A===f[p].id){g.addLayer(b,A);return}w.warn(["Trying to add layer with *below* value",A,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}g.addLayer(b)},c.project=function(b){return this.map.project(new v.LngLat(b[0],b[1]))},c.getView=function(){var b=this.map,A=b.getCenter(),g=A.lng,f=A.lat,p={lon:g,lat:f},x=b.getCanvas(),N=parseInt(x.style.width),D=parseInt(x.style.height);return{center:p,zoom:b.getZoom(),bearing:b.getBearing(),pitch:b.getPitch(),_derived:{coordinates:[b.unproject([0,0]).toArray(),b.unproject([N,0]).toArray(),b.unproject([N,D]).toArray(),b.unproject([0,D]).toArray()]}}},c.getViewEdits=function(b){for(var A=this.id,g=["center","zoom","bearing","pitch"],f={},p=0;p<g.length;p++){var x=g[p];f[A+"."+x]=b[x]}return f},c.getViewEditsWithDerived=function(b){var A=this.id,g=this.getViewEdits(b);return g[A+"._derived"]=b._derived,g};function T(b,A){var g={};if(w.isPlainObject(b))g.id=b.id,g.style=b;else if(typeof b=="string")if(g.id=b,y.styleValuesMapbox.indexOf(b)!==-1)g.style=M(b);else if(y.stylesNonMapbox[b]){g.style=y.stylesNonMapbox[b];var f=g.style.sources["plotly-"+b],p=f?f.tiles:void 0;p&&p[0]&&p[0].slice(-9)==="?api_key="&&(p[0]+=A._mapboxAccessToken)}else g.style=b;else g.id=y.styleValueDflt,g.style=M(y.styleValueDflt);return g.transition={duration:0,delay:0},g}function M(b){return y.styleUrlPrefix+b+"-"+y.styleUrlSuffix}function k(b){return[b.lon,b.lat]}Z.exports=E}}),ote=Ne({"src/plots/mapbox/layout_defaults.js"(te,Z){var v=In(),w=X0(),C=zd(),P=p6();Z.exports=function(l,i,s){w(l,i,s,{type:"mapbox",attributes:P,handleDefaults:t,partition:"y",accessToken:i._mapboxAccessToken})};function t(a,l,i,s){i("accesstoken",s.accessToken),i("style"),i("center.lon"),i("center.lat"),i("zoom"),i("bearing"),i("pitch");var o=i("bounds.west"),u=i("bounds.east"),d=i("bounds.south"),h=i("bounds.north");(o===void 0||u===void 0||d===void 0||h===void 0)&&delete l.bounds,C(a,l,{name:"layers",handleItemDefaults:r}),l._input=a}function r(a,l){function i(y,m){return v.coerce(a,l,P.layers,y,m)}var s=i("visible");if(s){var o=i("sourcetype"),u=o==="raster"||o==="image";i("source"),i("sourceattribution"),o==="vector"&&i("sourcelayer"),o==="image"&&i("coordinates");var d;u&&(d="raster");var h=i("type",d);u&&h!=="raster"&&(h=l.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),h==="circle"&&i("circle.radius"),h==="line"&&(i("line.width"),i("line.dash")),h==="fill"&&i("fill.outlinecolor"),h==="symbol"&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),v.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}}}),FR=Ne({"src/plots/mapbox/index.js"(te){var Z=iF(),v=In(),w=v.strTranslate,C=v.strScale,P=iv().getSubplotCalcData,t=cp(),r=xn(),a=zs(),l=uc(),i=ite(),s="mapbox",o=te.constants=R_();te.name=s,te.attr="subplot",te.idRoot=s,te.idRegex=te.attrRegex=v.counterRegex(s);var u=["mapbox subplots and traces are deprecated!","Please consider switching to `map` subplots and traces.","Learn more at: https://plotly.com/python/maplibre-migration/","as well as https://plotly.com/javascript/maplibre-migration/"].join(" ");te.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},te.layoutAttributes=p6(),te.supplyLayoutDefaults=ote();var d=!0;te.plot=function(E){d&&(d=!1,v.warn(u));var c=E._fullLayout,_=E.calcdata,T=c._subplots[s];if(Z.version!==o.requiredVersion)throw new Error(o.wrongVersionErrorMsg);var M=h(E,T);Z.accessToken=M;for(var k=0;k<T.length;k++){var b=T[k],A=P(_,s,b),g=c[b],f=g._subplot;f||(f=new i(E,b),c[b]._subplot=f),f.viewInitial||(f.viewInitial={center:v.extendFlat({},g.center),zoom:g.zoom,bearing:g.bearing,pitch:g.pitch}),f.plot(A,c,E._promises)}},te.clean=function(m,E,c,_){for(var T=_._subplots[s]||[],M=0;M<T.length;M++){var k=T[M];!E[k]&&_[k]._subplot&&_[k]._subplot.destroy()}},te.toSVG=function(m){for(var E=m._fullLayout,c=E._subplots[s],_=E._size,T=0;T<c.length;T++){var M=E[c[T]],k=M.domain,b=M._subplot,A=b.toImage("png"),g=E._glimages.append("svg:image");g.attr({xmlns:t.svg,"xlink:href":A,x:_.l+_.w*k.x[0],y:_.t+_.h*(1-k.y[1]),width:_.w*(k.x[1]-k.x[0]),height:_.h*(k.y[1]-k.y[0]),preserveAspectRatio:"none"});var f=r.select(M._subplot.div),p=f.select(".mapboxgl-ctrl-logo").node().offsetParent===null;if(!p){var x=E._glimages.append("g");x.attr("transform",w(_.l+_.w*k.x[0]+10,_.t+_.h*(1-k.y[0])-31)),x.append("path").attr("d",o.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),x.append("path").attr("d",o.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),x.append("path").attr("d",o.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),x.append("polygon").attr("points",o.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var N=f.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),D=E._glimages.append("g"),B=D.append("text");B.text(N).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":N});var U=a.bBox(B.node()),V=_.w*(k.x[1]-k.x[0]);if(U.width>V/2){var q=N.split("|").join("<br>");B.text(q).attr("data-unformatted",q).call(l.convertToTspans,m),U=a.bBox(B.node())}B.attr("transform",w(-3,-U.height+8)),D.insert("rect",".static-attribution").attr({x:-U.width-6,y:-U.height-3,width:U.width+6,height:U.height+3,fill:"rgba(255, 255, 255, 0.75)"});var z=1;U.width+6>V&&(z=V/(U.width+6));var H=[_.l+_.w*k.x[1],_.t+_.h*(1-k.y[0])];D.attr("transform",w(H[0],H[1])+C(z))}};function h(m,E){var c=m._fullLayout,_=m._context;if(_.mapboxAccessToken==="")return"";for(var T=[],M=[],k=!1,b=!1,A=0;A<E.length;A++){var g=c[E[A]],f=g.accesstoken;y(g.style)&&(f?v.pushUnique(T,f):(y(g._input.style)&&(v.error("Uses Mapbox map style, but did not set an access token."),k=!0),b=!0)),f&&v.pushUnique(M,f)}if(b){var p=k?o.noAccessTokenErrorMsg:o.missingStyleErrorMsg;throw v.error(p),new Error(p)}return T.length?(T.length>1&&v.warn(o.multipleTokensErrorMsg),T[0]):(M.length&&v.log(["Listed mapbox access token(s)",M.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function y(m){return typeof m=="string"&&(o.styleValuesMapbox.indexOf(m)!==-1||m.indexOf("mapbox://")===0||m.indexOf("stamen")===0)}te.updateFx=function(m){for(var E=m._fullLayout,c=E._subplots[s],_=0;_<c.length;_++){var T=E[c[_]]._subplot;T.updateFx(E)}}}}),ste=Ne({"src/traces/scattermapbox/index.js"(te,Z){Z.exports={attributes:zR(),supplyDefaults:Qee(),colorbar:ah(),formatLabels:nF(),calc:mR(),plot:tte(),hoverPoints:NR().hoverPoints,eventData:rte(),selectPoints:nte(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.update(w)}},moduleType:"trace",name:"scattermapbox",basePlotModule:FR(),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}}}),lte=Ne({"lib/scattermapbox.js"(te,Z){Z.exports=ste()}}),oF=Ne({"src/traces/choroplethmapbox/attributes.js"(te,Z){var v=KS(),w=Vu(),{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=ns(),r=co().extendFlat;Z.exports=r({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:r({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:r({},v.marker.line.color,{editType:"plot"}),width:r({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:r({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:r({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:r({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:C({},{keys:["properties"]}),hovertemplatefallback:P(),showlegend:r({},t.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),ute=Ne({"src/traces/choroplethmapbox/defaults.js"(te,Z){var v=In(),w=Ph(),C=oF();Z.exports=function(t,r,a,l){function i(h,y){return v.coerce(t,r,C,h,y)}var s=i("locations"),o=i("z"),u=i("geojson");if(!v.isArrayOrTypedArray(s)||!s.length||!v.isArrayOrTypedArray(o)||!o.length||!(typeof u=="string"&&u!==""||v.isPlainObject(u))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(s.length,o.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var d=i("marker.line.width");d&&i("marker.line.color"),i("marker.opacity"),w(t,r,l,i,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(r,i)}}}),sF=Ne({"src/traces/choroplethmapbox/convert.js"(te,Z){var v=la(),w=In(),C=Dc(),P=zs(),t=Ib().makeBlank,r=Db();function a(i){var s=i[0].trace,o=s.visible===!0&&s._length!==0,u={layout:{visibility:"none"},paint:{}},d={layout:{visibility:"none"},paint:{}},h=s._opts={fill:u,line:d,geojson:t()};if(!o)return h;var y=r.extractTraceFeature(i);if(!y)return h;var m=C.makeColorScaleFuncFromTrace(s),E=s.marker,c=E.line||{},_;w.isArrayOrTypedArray(E.opacity)&&(_=function(p){var x=p.mo;return v(x)?+w.constrain(x,0,1):0});var T;w.isArrayOrTypedArray(c.color)&&(T=function(p){return p.mlc});var M;w.isArrayOrTypedArray(c.width)&&(M=function(p){return p.mlw});for(var k=0;k<i.length;k++){var b=i[k],A=b.fOut;if(A){var g=A.properties;g.fc=m(b.z),_&&(g.mo=_(b)),T&&(g.mlc=T(b)),M&&(g.mlw=M(b)),b.ct=g.ct,b._polygons=r.feature2polygons(A)}}var f=_?{type:"identity",property:"mo"}:E.opacity;return w.extendFlat(u.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":f}),w.extendFlat(d.paint,{"line-color":T?{type:"identity",property:"mlc"}:c.color,"line-width":M?{type:"identity",property:"mlw"}:c.width,"line-opacity":f}),u.layout.visibility="visible",d.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:y},l(i),h}function l(i){var s=i[0].trace,o=s._opts,u;if(s.selectedpoints){for(var d=P.makeSelectedPointStyleFns(s),h=0;h<i.length;h++){var y=i[h];y.fOut&&(y.fOut.properties.mo2=d.selectedOpacityFn(y))}u={type:"identity",property:"mo2"}}else u=w.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return w.extendFlat(o.fill.paint,{"fill-opacity":u}),w.extendFlat(o.line.paint,{"line-opacity":u}),o}Z.exports={convert:a,convertOnSelect:l}}}),cte=Ne({"src/traces/choroplethmapbox/plot.js"(te,Z){var v=sF().convert,w=sF().convertOnSelect,C=R_().traceLayerPrefix;function P(r,a){this.type="choroplethmapbox",this.subplot=r,this.uid=a,this.sourceId="source-"+a,this.layerList=[["fill",C+a+"-fill"],["line",C+a+"-line"]],this.below=null}var t=P.prototype;t.update=function(r){this._update(v(r)),r[0].trace._glTrace=this},t.updateOnSelect=function(r){this._update(w(r))},t._update=function(r){var a=this.subplot,l=this.layerList,i=a.belowLookup["trace-"+this.uid];a.map.getSource(this.sourceId).setData(r.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(r,i),this.below=i);for(var s=0;s<l.length;s++){var o=l[s],u=o[0],d=o[1],h=r[u];a.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&a.setOptions(d,"setPaintProperty",h.paint)}},t._addLayers=function(r,a){for(var l=this.subplot,i=this.layerList,s=this.sourceId,o=0;o<i.length;o++){var u=i[o],d=u[0],h=r[d];l.addLayer({type:d,id:u[1],source:s,layout:h.layout,paint:h.paint},a)}},t._removeLayers=function(){for(var r=this.subplot.map,a=this.layerList,l=a.length-1;l>=0;l--)r.removeLayer(a[l][1])},t.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},Z.exports=function(a,l){var i=l[0].trace,s=new P(a,i.uid),o=s.sourceId,u=v(l),d=s.below=a.belowLookup["trace-"+i.uid];return a.map.addSource(o,{type:"geojson",data:u.geojson}),s._addLayers(u,d),l[0].trace._glTrace=s,s}}}),fte=Ne({"src/traces/choroplethmapbox/index.js"(te,Z){Z.exports={attributes:oF(),supplyDefaults:ute(),colorbar:Fy(),calc:xR(),plot:cte(),hoverPoints:wR(),eventData:TR(),selectPoints:AR(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.updateOnSelect(w)}},getBelow:function(v,w){for(var C=w.getMapLayers(),P=C.length-2;P>=0;P--){var t=C[P].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=P+1;r<C.length;r++)if(t=C[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:FR(),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}}}),hte=Ne({"lib/choroplethmapbox.js"(te,Z){Z.exports=fte()}}),lF=Ne({"src/traces/densitymapbox/attributes.js"(te,Z){var v=Vu(),{hovertemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=ns(),t=zR(),r=co().extendFlat;Z.exports=r({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:r({},P.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:w(),hovertemplatefallback:C(),showlegend:r({},P.showlegend,{dflt:!1})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),dte=Ne({"src/traces/densitymapbox/defaults.js"(te,Z){var v=In(),w=Ph(),C=lF();Z.exports=function(t,r,a,l){function i(d,h){return v.coerce(t,r,C,d,h)}var s=i("lon")||[],o=i("lat")||[],u=Math.min(s.length,o.length);if(!u){r.visible=!1;return}r._length=u,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),w(t,r,l,i,{prefix:"",cLetter:"z"})}}}),vte=Ne({"src/traces/densitymapbox/calc.js"(te,Z){var v=la(),w=In().isArrayOrTypedArray,C=ja().BADNUM,P=Nd(),t=In()._;Z.exports=function(a,l){for(var i=l._length,s=new Array(i),o=l.z,u=w(o)&&o.length,d=0;d<i;d++){var h=s[d]={},y=l.lon[d],m=l.lat[d];if(h.lonlat=v(y)&&v(m)?[+y,+m]:[C,C],u){var E=o[d];h.z=v(E)?E:C}}return P(a,l,{vals:u?o:[0,1],containerStr:"",cLetter:"z"}),i&&(s[0].t={labels:{lat:t(a,"lat:")+" ",lon:t(a,"lon:")+" "}}),s}}}),pte=Ne({"src/traces/densitymapbox/convert.js"(te,Z){var v=la(),w=In(),C=io(),P=Dc(),t=ja().BADNUM,r=Ib().makeBlank;Z.exports=function(l){var i=l[0].trace,s=i.visible===!0&&i._length!==0,o={layout:{visibility:"none"},paint:{}},u=i._opts={heatmap:o,geojson:r()};if(!s)return u;var d=[],h,y=i.z,m=i.radius,E=w.isArrayOrTypedArray(y)&&y.length,c=w.isArrayOrTypedArray(m);for(h=0;h<l.length;h++){var _=l[h],T=_.lonlat;if(T[0]!==t){var M={};if(E){var k=_.z;M.z=k!==t?k:0}c&&(M.r=v(m[h])&&m[h]>0?+m[h]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:T},properties:M})}}var b=P.extractOpts(i),A=b.reversescale?P.flipScale(b.colorscale):b.colorscale,g=A[0][1],f=C.opacity(g)<1?g:C.addOpacity(g,0),p=["interpolate",["linear"],["heatmap-density"],0,f];for(h=1;h<A.length;h++)p.push(A[h][0],A[h][1]);var x=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return w.extendFlat(u.heatmap.paint,{"heatmap-weight":E?x:1/(b.max-b.min),"heatmap-color":p,"heatmap-radius":c?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),u.geojson={type:"FeatureCollection",features:d},u.heatmap.layout.visibility="visible",u}}}),mte=Ne({"src/traces/densitymapbox/plot.js"(te,Z){var v=pte(),w=R_().traceLayerPrefix;function C(t,r){this.type="densitymapbox",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["heatmap",w+r+"-heatmap"]],this.below=null}var P=C.prototype;P.update=function(t){var r=this.subplot,a=this.layerList,l=v(t),i=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(l.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(l,i),this.below=i);for(var s=0;s<a.length;s++){var o=a[s],u=o[0],d=o[1],h=l[u];r.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&r.setOptions(d,"setPaintProperty",h.paint)}},P._addLayers=function(t,r){for(var a=this.subplot,l=this.layerList,i=this.sourceId,s=0;s<l.length;s++){var o=l[s],u=o[0],d=t[u];a.addLayer({type:u,id:o[1],source:i,layout:d.layout,paint:d.paint},r)}},P._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,a=r.length-1;a>=0;a--)t.removeLayer(r[a][1])},P.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(r,a){var l=a[0].trace,i=new C(r,l.uid),s=i.sourceId,o=v(a),u=i.below=r.belowLookup["trace-"+l.uid];return r.map.addSource(s,{type:"geojson",data:o.geojson}),i._addLayers(o,u),i}}}),yte=Ne({"src/traces/densitymapbox/hover.js"(te,Z){var v=Os(),w=NR().hoverPoints,C=NR().getExtraText;Z.exports=function(t,r,a){var l=w(t,r,a);if(l){var i=l[0],s=i.cd,o=s[0].trace,u=s[i.index];if(delete i.color,"z"in u){var d=i.subplot.mockAxis;i.z=u.z,i.zLabel=v.tickText(d,d.c2l(u.z),"hover").text}return i.extraText=C(o,u,s[0].t.labels),[i]}}}}),gte=Ne({"src/traces/densitymapbox/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w.z=C.z,w}}}),_te=Ne({"src/traces/densitymapbox/index.js"(te,Z){Z.exports={attributes:lF(),supplyDefaults:dte(),colorbar:Fy(),formatLabels:nF(),calc:vte(),plot:mte(),hoverPoints:yte(),eventData:gte(),getBelow:function(v,w){for(var C=w.getMapLayers(),P=0;P<C.length;P++){var t=C[P],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymapbox",basePlotModule:FR(),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}}}),xte=Ne({"lib/densitymapbox.js"(te,Z){Z.exports=_te()}}),bte=Ne({"src/plots/map/styles/arcgis-sat-hybrid.js"(te,Z){Z.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 &copy; <a href='http://www.esri.com'>ESRI</a>"},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"}}}),wte=Ne({"src/plots/map/styles/arcgis-sat.js"(te,Z){Z.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 &copy; <a href='http://www.esri.com'>ESRI</a>"},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"}}]}}}),Fb=Ne({"src/plots/map/constants.js"(te,Z){var v=Sm(),w=bte(),C=wte(),P='© <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',t="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",i="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:a,streets:a,outdoors:a,light:t,dark:r,satellite:C,"satellite-streets":w,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:P,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":t,"carto-darkmatter":r,"carto-voyager":a,"carto-positron-nolabels":l,"carto-darkmatter-nolabels":i,"carto-voyager-nolabels":s},u=v(o);Z.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:u,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",u.join(", "),"or use a tile service."].join(`
`),mapOnErrorMsg:"Map error."}}}),m6=Ne({"src/plots/map/layout_attributes.js"(te,Z){var v=In(),w=io().defaultLine,C=Oc().attributes,P=$o(),t=Jc().textposition,r=Kc().overrideAll,a=Tu().templatedArray,l=Fb(),i=P({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});i.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=Z.exports=r({_arrayAttrRegexps:[v.counterRegex("map",".layers",!0)],domain:C({name:"map"}),style:{valType:"any",values:l.styleValuesMap,dflt:l.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:a("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:w},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:w}},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:i,textposition:v.extendFlat({},t,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}}}),BR=Ne({"src/traces/scattermap/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=jv(),t=v3(),r=Jc(),a=m6(),l=ns(),i=Vu(),s=co().extendFlat,o=Kc().overrideAll,u=m6(),d=t.line,h=t.marker;Z.exports=o({lon:t.lon,lat:t.lat,cluster:{enabled:{valType:"boolean"},maxzoom:s({},u.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:s({},h.opacity,{dflt:1})},mode:s({},r.mode,{dflt:"markers"}),text:s({},r.text,{}),texttemplate:w({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:s({},r.hovertext,{}),line:{color:d.color,width:d.width},connectgaps:r.connectgaps,marker:s({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:h.opacity,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode},i("marker")),fill:t.fill,fillcolor:P(),textfont:a.layers.symbol.textfont,textposition:a.layers.symbol.textposition,below:{valType:"string"},selected:{marker:r.selected.marker},unselected:{marker:r.unselected.marker},hoverinfo:s({},l.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:C()},"calc","nested")}}),uF=Ne({"src/traces/scattermap/constants.js"(te,Z){var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];Z.exports={isSupportedFont:function(w){return v.indexOf(w)!==-1}}}}),Tte=Ne({"src/traces/scattermap/defaults.js"(te,Z){var v=In(),w=vu(),C=xv(),P=Im(),t=Xp(),r=ov(),a=BR(),l=uF().isSupportedFont;Z.exports=function(o,u,d,h){function y(p,x){return v.coerce(o,u,a,p,x)}function m(p,x){return v.coerce2(o,u,a,p,x)}var E=i(o,u,y);if(!E){u.visible=!1;return}if(y("text"),y("texttemplate"),y("texttemplatefallback"),y("hovertext"),y("hovertemplate"),y("hovertemplatefallback"),y("mode"),y("below"),w.hasMarkers(u)){C(o,u,d,h,y,{noLine:!0,noAngle:!0}),y("marker.allowoverlap"),y("marker.angle");var c=u.marker;c.symbol!=="circle"&&(v.isArrayOrTypedArray(c.size)&&(c.size=c.size[0]),v.isArrayOrTypedArray(c.color)&&(c.color=c.color[0]))}w.hasLines(u)&&(P(o,u,d,h,y,{noDash:!0}),y("connectgaps"));var _=m("cluster.maxzoom"),T=m("cluster.step"),M=m("cluster.color",u.marker&&u.marker.color||d),k=m("cluster.size"),b=m("cluster.opacity"),A=_!==!1||T!==!1||M!==!1||k!==!1||b!==!1,g=y("cluster.enabled",A);if(g||w.hasText(u)){var f=h.font.family;t(o,u,h,y,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:l(f)?f:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}y("fill"),u.fill!=="none"&&r(o,u,d,y),v.coerceSelectionMarkerOpacity(u,y)};function i(s,o,u){var d=u("lon")||[],h=u("lat")||[],y=Math.min(d.length,h.length);return o._length=y,y}}}),cF=Ne({"src/traces/scattermap/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot,l=a.mockAxis,i=C.lonlat;return r.lonLabel=v.tickText(l,l.c2l(i[0]),!0).text,r.latLabel=v.tickText(l,l.c2l(i[1]),!0).text,r}}}),fF=Ne({"src/plots/map/convert_text_opts.js"(te,Z){var v=In();Z.exports=function(C,P){var t=C.split(" "),r=t[0],a=t[1],l=v.isArrayOrTypedArray(P)?v.mean(P):P,i=.5+l/100,s=1.5+l/100,o=["",""],u=[0,0];switch(r){case"top":o[0]="top",u[1]=-s;break;case"bottom":o[0]="bottom",u[1]=s;break}switch(a){case"left":o[1]="right",u[0]=-i;break;case"right":o[1]="left",u[0]=i;break}var d;return o[0]&&o[1]?d=o.join("-"):o[0]?d=o[0]:o[1]?d=o[1]:d="center",{anchor:d,offset:u}}}}),Ate=Ne({"src/traces/scattermap/convert.js"(te,Z){var v=la(),w=In(),C=ja().BADNUM,P=Ib(),t=Dc(),r=zs(),a=Mm(),l=vu(),i=uF().isSupportedFont,s=fF(),o=_v().appendArrayPointValue,u=uc().NEWLINES,d=uc().BR_TAG_ALL;Z.exports=function(b,A){var g=A[0].trace,f=g.visible===!0&&g._length!==0,p=g.fill!=="none",x=l.hasLines(g),N=l.hasMarkers(g),D=l.hasText(g),B=N&&g.marker.symbol==="circle",U=N&&g.marker.symbol!=="circle",V=g.cluster&&g.cluster.enabled,q=h("fill"),z=h("line"),H=h("circle"),G=h("symbol"),J={fill:q,line:z,circle:H,symbol:G};if(!f)return J;var le;if((p||x)&&(le=P.calcTraceToLineCoords(A)),p&&(q.geojson=P.makePolygon(le),q.layout.visibility="visible",w.extendFlat(q.paint,{"fill-color":g.fillcolor})),x&&(z.geojson=P.makeLine(le),z.layout.visibility="visible",w.extendFlat(z.paint,{"line-width":g.line.width,"line-color":g.line.color,"line-opacity":g.opacity})),B){var ye=y(A);H.geojson=ye.geojson,H.layout.visibility="visible",V&&(H.filter=["!",["has","point_count"]],J.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":T(g.cluster.color,g.cluster.step),"circle-radius":T(g.cluster.size,g.cluster.step),"circle-opacity":T(g.cluster.opacity,g.cluster.step)}},J.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(g),"text-size":12}}),w.extendFlat(H.paint,{"circle-color":ye.mcc,"circle-radius":ye.mrc,"circle-opacity":ye.mo})}if(B&&V&&(H.filter=["!",["has","point_count"]]),(U||D)&&(G.geojson=m(A,b),w.extendFlat(G.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),U&&(w.extendFlat(G.layout,{"icon-size":g.marker.size/10}),"angle"in g.marker&&g.marker.angle!=="auto"&&w.extendFlat(G.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),G.layout["icon-allow-overlap"]=g.marker.allowoverlap,w.extendFlat(G.paint,{"icon-opacity":g.opacity*g.marker.opacity,"icon-color":g.marker.color})),D)){var de=(g.marker||{}).size,me=s(g.textposition,de);w.extendFlat(G.layout,{"text-size":g.textfont.size,"text-anchor":me.anchor,"text-offset":me.offset,"text-font":M(g)}),w.extendFlat(G.paint,{"text-color":g.textfont.color,"text-opacity":g.opacity})}return J};function h(k){return{type:k,geojson:P.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function y(k){var b=k[0].trace,A=b.marker,g=b.selectedpoints,f=w.isArrayOrTypedArray(A.color),p=w.isArrayOrTypedArray(A.size),x=w.isArrayOrTypedArray(A.opacity),N;function D(de){return b.opacity*de}function B(de){return de/2}var U;f&&(t.hasColorscale(b,"marker")?U=t.makeColorScaleFuncFromTrace(A):U=w.identity);var V;p&&(V=a(b));var q;x&&(q=function(de){var me=v(de)?+w.constrain(de,0,1):0;return D(me)});var z=[];for(N=0;N<k.length;N++){var H=k[N],G=H.lonlat;if(!_(G)){var J={};U&&(J.mcc=H.mcc=U(H.mc)),V&&(J.mrc=H.mrc=V(H.ms)),q&&(J.mo=q(H.mo)),g&&(J.selected=H.selected||0),z.push({type:"Feature",id:N+1,geometry:{type:"Point",coordinates:G},properties:J})}}var le;if(g)for(le=r.makeSelectedPointStyleFns(b),N=0;N<z.length;N++){var ye=z[N].properties;le.selectedOpacityFn&&(ye.mo=D(le.selectedOpacityFn(ye))),le.selectedColorFn&&(ye.mcc=le.selectedColorFn(ye)),le.selectedSizeFn&&(ye.mrc=le.selectedSizeFn(ye))}return{geojson:{type:"FeatureCollection",features:z},mcc:f||le&&le.selectedColorFn?{type:"identity",property:"mcc"}:A.color,mrc:p||le&&le.selectedSizeFn?{type:"identity",property:"mrc"}:B(A.size),mo:x||le&&le.selectedOpacityFn?{type:"identity",property:"mo"}:D(A.opacity)}}function m(k,b){for(var A=b._fullLayout,g=k[0].trace,f=g.marker||{},p=f.symbol,x=f.angle,N=p!=="circle"?E(p):c,D=x!=="auto"?E(x,!0):c,B=l.hasText(g)?E(g.text):c,U=[],V=0;V<k.length;V++){var q=k[V];if(!_(q.lonlat)){var z=g.texttemplate,H;if(z){var G=Array.isArray(z)?z[V]||"":z,J=g._module.formatLabels(q,g,A),le={};o(le,g,q.i),H=w.texttemplateString({data:[le,q,g._meta],fallback:g.texttemplatefallback,labels:J,locale:A._d3locale,template:G})}else H=B(V);H&&(H=H.replace(u,"").replace(d,`
`)),U.push({type:"Feature",geometry:{type:"Point",coordinates:q.lonlat},properties:{symbol:N(V),angle:D(V),text:H}})}}return{type:"FeatureCollection",features:U}}function E(k,b){return w.isArrayOrTypedArray(k)?b?function(A){return v(k[A])?+k[A]:0}:function(A){return k[A]}:k?function(){return k}:c}function c(){return""}function _(k){return k[0]===C}function T(k,b){var A;if(w.isArrayOrTypedArray(k)&&w.isArrayOrTypedArray(b)){A=["step",["get","point_count"],k[0]];for(var g=1;g<k.length;g++)A.push(b[g-1],k[g])}else A=k;return A}function M(k){var b=k.textfont,A=b.family,g=b.style,f=b.weight,p=A.split(" "),x=p[p.length-1]==="Italic";x&&p.pop(),x=x||g==="italic";var N=p.join(" ");f==="bold"&&p.indexOf("Bold")===-1?N+=" Bold":f<=1e3&&(p[0]==="Metropolis"?(N="Metropolis",f>850?N+=" Black":f>750?N+=" Extra Bold":f>650?N+=" Bold":f>550?N+=" Semi Bold":f>450?N+=" Medium":f>350?N+=" Regular":f>250?N+=" Light":f>150?N+=" Extra Light":N+=" Thin"):p.slice(0,2).join(" ")==="Open Sans"?(N="Open Sans",f>750?N+=" Extrabold":f>650?N+=" Bold":f>550?N+=" Semibold":f>350?N+=" Regular":N+=" Light"):p.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(N="Klokantech Noto Sans",p[3]==="CJK"&&(N+=" CJK"),N+=f>500?" Bold":" Regular")),x&&(N+=" Italic"),N==="Open Sans Regular Italic"?N="Open Sans Italic":N==="Open Sans Regular Bold"?N="Open Sans Bold":N==="Open Sans Regular Bold Italic"?N="Open Sans Bold Italic":N==="Klokantech Noto Sans Regular Italic"&&(N="Klokantech Noto Sans Italic"),i(N)||(N=A);var D=N.split(", ");return D}}}),Ste=Ne({"src/traces/scattermap/plot.js"(te,Z){var v=In(),w=Ate(),C=Fb().traceLayerPrefix,P={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function t(a,l,i,s){this.type="scattermap",this.subplot=a,this.uid=l,this.clusterEnabled=i,this.isHidden=s,this.sourceIds={fill:"source-"+l+"-fill",line:"source-"+l+"-line",circle:"source-"+l+"-circle",symbol:"source-"+l+"-symbol",cluster:"source-"+l+"-circle",clusterCount:"source-"+l+"-circle"},this.layerIds={fill:C+l+"-fill",line:C+l+"-line",circle:C+l+"-circle",symbol:C+l+"-symbol",cluster:C+l+"-cluster",clusterCount:C+l+"-cluster-count"},this.below=null}var r=t.prototype;r.addSource=function(a,l,i){var s={type:"geojson",data:l.geojson};i&&i.enabled&&v.extendFlat(s,{cluster:!0,clusterMaxZoom:i.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[a]);o?o.setData(l.geojson):this.subplot.map.addSource(this.sourceIds[a],s)},r.setSourceData=function(a,l){this.subplot.map.getSource(this.sourceIds[a]).setData(l.geojson)},r.addLayer=function(a,l,i){var s={type:l.type,id:this.layerIds[a],source:this.sourceIds[a],layout:l.layout,paint:l.paint};l.filter&&(s.filter=l.filter);for(var o=this.layerIds[a],u,d=this.subplot.getMapLayers(),h=0;h<d.length;h++)if(d[h].id===o){u=!0;break}u?(this.subplot.setOptions(o,"setLayoutProperty",s.layout),s.layout.visibility==="visible"&&this.subplot.setOptions(o,"setPaintProperty",s.paint)):this.subplot.addLayer(s,i)},r.update=function(l){var i=l[0].trace,s=this.subplot,o=s.map,u=w(s.gd,l),d=s.belowLookup["trace-"+this.uid],h=!!(i.cluster&&i.cluster.enabled),y=!!this.clusterEnabled,m=this;function E(f){f||m.addSource("circle",u.circle,i.cluster);for(var p=P.cluster,x=0;x<p.length;x++){var N=p[x],D=u[N];m.addLayer(N,D,d)}}function c(f){for(var p=P.cluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N])}f||o.removeSource(m.sourceIds.circle)}function _(f){for(var p=P.nonCluster,x=0;x<p.length;x++){var N=p[x],D=u[N];f||m.addSource(N,D),m.addLayer(N,D,d)}}function T(f){for(var p=P.nonCluster,x=p.length-1;x>=0;x--){var N=p[x];o.removeLayer(m.layerIds[N]),f||o.removeSource(m.sourceIds[N])}}function M(f){y?c(f):T(f)}function k(f){h?E(f):_(f)}function b(){for(var f=h?P.cluster:P.nonCluster,p=0;p<f.length;p++){var x=f[p],N=u[x];N&&(s.setOptions(m.layerIds[x],"setLayoutProperty",N.layout),N.layout.visibility==="visible"&&(x!=="cluster"&&m.setSourceData(x,N),s.setOptions(m.layerIds[x],"setPaintProperty",N.paint)))}}var A=this.isHidden,g=i.visible!==!0;g?A||M():A?g||k():y!==h?(M(),k()):(this.below!==d&&(M(!0),k(!0)),b()),this.clusterEnabled=h,this.isHidden=g,this.below=d,l[0].trace._glTrace=this},r.dispose=function(){for(var l=this.subplot.map,i=this.clusterEnabled?P.cluster:P.nonCluster,s=i.length-1;s>=0;s--){var o=i[s];l.removeLayer(this.layerIds[o]),l.removeSource(this.sourceIds[o])}},Z.exports=function(l,i){var s=i[0].trace,o=s.cluster&&s.cluster.enabled,u=s.visible!==!0,d=new t(l,s.uid,o,u),h=w(l.gd,i),y=d.below=l.belowLookup["trace-"+s.uid],m,E,c;if(o)for(d.addSource("circle",h.circle,s.cluster),m=0;m<P.cluster.length;m++)E=P.cluster[m],c=h[E],d.addLayer(E,c,y);else for(m=0;m<P.nonCluster.length;m++)E=P.nonCluster[m],c=h[E],d.addSource(E,c,s.cluster),d.addLayer(E,c,y);return i[0].trace._glTrace=d,d}}}),jR=Ne({"src/traces/scattermap/hover.js"(te,Z){var v=nh(),w=In(),C=G1(),P=w.fillText,t=ja().BADNUM,r=Fb().traceLayerPrefix;function a(i,s,o){var u=i.cd,d=u[0].trace,h=i.xa,y=i.ya,m=i.subplot,E=[],c=r+d.uid+"-circle",_=d.cluster&&d.cluster.enabled;if(_){var T=m.map.queryRenderedFeatures(null,{layers:[c]});E=T.map(function(V){return V.id})}var M=s>=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),k=M*360,b=s-k;function A(V){var q=V.lonlat;if(q[0]===t||_&&E.indexOf(V.i+1)===-1)return 1/0;var z=w.modHalf(q[0],360),H=q[1],G=m.project([z,H]),J=G.x-h.c2p([b,H]),le=G.y-y.c2p([z,o]),ye=Math.max(3,V.mrc||0);return Math.max(Math.sqrt(J*J+le*le)-ye,1-3/ye)}if(v.getClosest(u,A,i),i.index!==!1){var g=u[i.index],f=g.lonlat,p=[w.modHalf(f[0],360)+k,f[1]],x=h.c2p(p),N=y.c2p(p),D=g.mrc||1;i.x0=x-D,i.x1=x+D,i.y0=N-D,i.y1=N+D;var B={};B[d.subplot]={_subplot:m};var U=d._module.formatLabels(g,d,B);return i.lonLabel=U.lonLabel,i.latLabel=U.latLabel,i.color=C(d,g),i.extraText=l(d,g,u[0].t.labels),i.hovertemplate=d.hovertemplate,[i]}}function l(i,s,o){if(i.hovertemplate)return;var u=s.hi||i.hoverinfo,d=u.split("+"),h=d.indexOf("all")!==-1,y=d.indexOf("lon")!==-1,m=d.indexOf("lat")!==-1,E=s.lonlat,c=[];function _(T){return T+"°"}return h||y&&m?c.push("("+_(E[1])+", "+_(E[0])+")"):y?c.push(o.lon+_(E[0])):m&&c.push(o.lat+_(E[1])),(h||d.indexOf("text")!==-1)&&P(s,i,c),c.join("<br>")}Z.exports={hoverPoints:a,getExtraText:l}}}),Ete=Ne({"src/traces/scattermap/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w}}}),Mte=Ne({"src/traces/scattermap/select.js"(te,Z){var v=In(),w=vu(),C=ja().BADNUM;Z.exports=function(t,r){var a=t.cd,l=t.xaxis,i=t.yaxis,s=[],o=a[0].trace,u;if(!w.hasMarkers(o))return[];if(r===!1)for(u=0;u<a.length;u++)a[u].selected=0;else for(u=0;u<a.length;u++){var d=a[u],h=d.lonlat;if(h[0]!==C){var y=[v.modHalf(h[0],360),h[1]],m=[l.c2p(y),i.c2p(y)];r.contains(m,null,u,t)?(s.push({pointNumber:u,lon:h[0],lat:h[1]}),d.selected=1):d.selected=0}}return s}}}),Cte=Ne({"node_modules/maplibre-gl/dist/maplibre-gl.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?Z.exports=w():(v=typeof globalThis<"u"?globalThis:v||self,v.maplibregl=w())})(te,function(){var v={},w={};function C(t,r,a){if(w[t]=a,t==="index"){var l="var sharedModule = {}; ("+w.shared+")(sharedModule); ("+w.worker+")(sharedModule);",i={};return w.shared(i),w.index(v,i),typeof window<"u"&&v.setWorkerUrl(window.URL.createObjectURL(new Blob([l],{type:"text/javascript"}))),v}}C("shared",["exports"],function(t){function r(K,F,ae,we){return new(ae||(ae=Promise))(function(je,Qe){function at(ir){try{jt(we.next(ir))}catch(Er){Qe(Er)}}function St(ir){try{jt(we.throw(ir))}catch(Er){Qe(Er)}}function jt(ir){var Er;ir.done?je(ir.value):(Er=ir.value,Er instanceof ae?Er:new ae(function(Ir){Ir(Er)})).then(at,St)}jt((we=we.apply(K,F||[])).next())})}function a(K){return K&&K.__esModule&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K}typeof SuppressedError=="function"&&SuppressedError;var l=i;function i(K,F){this.x=K,this.y=F}i.prototype={clone:function(){return new i(this.x,this.y)},add:function(K){return this.clone()._add(K)},sub:function(K){return this.clone()._sub(K)},multByPoint:function(K){return this.clone()._multByPoint(K)},divByPoint:function(K){return this.clone()._divByPoint(K)},mult:function(K){return this.clone()._mult(K)},div:function(K){return this.clone()._div(K)},rotate:function(K){return this.clone()._rotate(K)},rotateAround:function(K,F){return this.clone()._rotateAround(K,F)},matMult:function(K){return this.clone()._matMult(K)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(K){return this.x===K.x&&this.y===K.y},dist:function(K){return Math.sqrt(this.distSqr(K))},distSqr:function(K){var F=K.x-this.x,ae=K.y-this.y;return F*F+ae*ae},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(K){return Math.atan2(this.y-K.y,this.x-K.x)},angleWith:function(K){return this.angleWithSep(K.x,K.y)},angleWithSep:function(K,F){return Math.atan2(this.x*F-this.y*K,this.x*K+this.y*F)},_matMult:function(K){var F=K[2]*this.x+K[3]*this.y;return this.x=K[0]*this.x+K[1]*this.y,this.y=F,this},_add:function(K){return this.x+=K.x,this.y+=K.y,this},_sub:function(K){return this.x-=K.x,this.y-=K.y,this},_mult:function(K){return this.x*=K,this.y*=K,this},_div:function(K){return this.x/=K,this.y/=K,this},_multByPoint:function(K){return this.x*=K.x,this.y*=K.y,this},_divByPoint:function(K){return this.x/=K.x,this.y/=K.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var K=this.y;return this.y=this.x,this.x=-K,this},_rotate:function(K){var F=Math.cos(K),ae=Math.sin(K),we=ae*this.x+F*this.y;return this.x=F*this.x-ae*this.y,this.y=we,this},_rotateAround:function(K,F){var ae=Math.cos(K),we=Math.sin(K),je=F.y+we*(this.x-F.x)+ae*(this.y-F.y);return this.x=F.x+ae*(this.x-F.x)-we*(this.y-F.y),this.y=je,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},i.convert=function(K){return K instanceof i?K:Array.isArray(K)?new i(K[0],K[1]):K};var s=a(l),o=u;function u(K,F,ae,we){this.cx=3*K,this.bx=3*(ae-K)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(we-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=K,this.p1y=F,this.p2x=ae,this.p2y=we}u.prototype={sampleCurveX:function(K){return((this.ax*K+this.bx)*K+this.cx)*K},sampleCurveY:function(K){return((this.ay*K+this.by)*K+this.cy)*K},sampleCurveDerivativeX:function(K){return(3*this.ax*K+2*this.bx)*K+this.cx},solveCurveX:function(K,F){if(F===void 0&&(F=1e-6),K<0)return 0;if(K>1)return 1;for(var ae=K,we=0;we<8;we++){var je=this.sampleCurveX(ae)-K;if(Math.abs(je)<F)return ae;var Qe=this.sampleCurveDerivativeX(ae);if(Math.abs(Qe)<1e-6)break;ae-=je/Qe}var at=0,St=1;for(ae=K,we=0;we<20&&(je=this.sampleCurveX(ae),!(Math.abs(je-K)<F));we++)K>je?at=ae:St=ae,ae=.5*(St-at)+at;return ae},solve:function(K,F){return this.sampleCurveY(this.solveCurveX(K,F))}};var d=a(o);let h,y;function m(){return h==null&&(h=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),h}function E(){if(y==null&&(y=!1,m())){const F=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(F){for(let we=0;we<25;we++){const je=4*we;F.fillStyle=`rgb(${je},${je+1},${je+2})`,F.fillRect(we%5,Math.floor(we/5),1,1)}const ae=F.getImageData(0,0,5,5).data;for(let we=0;we<100;we++)if(we%4!=3&&ae[we]!==we){y=!0;break}}}return y||!1}function c(K,F,ae,we){const je=new d(K,F,ae,we);return Qe=>je.solve(Qe)}const _=c(.25,.1,.25,1);function T(K,F,ae){return Math.min(ae,Math.max(F,K))}function M(K,F,ae){const we=ae-F,je=((K-F)%we+we)%we+F;return je===F?ae:je}function k(K,...F){for(const ae of F)for(const we in ae)K[we]=ae[we];return K}let b=1;function A(K,F,ae){const we={};for(const je in K)we[je]=F.call(this,K[je],je,K);return we}function g(K,F,ae){const we={};for(const je in K)F.call(this,K[je],je,K)&&(we[je]=K[je]);return we}function f(K){return Array.isArray(K)?K.map(f):typeof K=="object"&&K?A(K,f):K}const p={};function x(K){p[K]||(typeof console<"u"&&console.warn(K),p[K]=!0)}function N(K,F,ae){return(ae.y-K.y)*(F.x-K.x)>(F.y-K.y)*(ae.x-K.x)}function D(K){return typeof WorkerGlobalScope<"u"&&K!==void 0&&K instanceof WorkerGlobalScope}let B=null;function U(K){return typeof ImageBitmap<"u"&&K instanceof ImageBitmap}const V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function q(K,F,ae,we,je){return r(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");const Qe=new VideoFrame(K,{timestamp:0});try{const at=Qe?.format;if(!at||!at.startsWith("BGR")&&!at.startsWith("RGB"))throw new Error(`Unrecognized format ${at}`);const St=at.startsWith("BGR"),jt=new Uint8ClampedArray(we*je*4);if(yield Qe.copyTo(jt,(function(ir,Er,Ir,rn,vn){const Cn=4*Math.max(-Er,0),Bn=(Math.max(0,Ir)-Ir)*rn*4+Cn,Qn=4*rn,Ia=Math.max(0,Er),Mi=Math.max(0,Ir);return{rect:{x:Ia,y:Mi,width:Math.min(ir.width,Er+rn)-Ia,height:Math.min(ir.height,Ir+vn)-Mi},layout:[{offset:Bn,stride:Qn}]}})(K,F,ae,we,je)),St)for(let ir=0;ir<jt.length;ir+=4){const Er=jt[ir];jt[ir]=jt[ir+2],jt[ir+2]=Er}return jt}finally{Qe.close()}})}let z,H;const G="AbortError";function J(){return new Error(G)}const le={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function ye(K){return le.REGISTERED_PROTOCOLS[K.substring(0,K.indexOf("://"))]}const de="global-dispatcher";class me extends Error{constructor(F,ae,we,je){super(`AJAXError: ${ae} (${F}): ${we}`),this.status=F,this.statusText=ae,this.url=we,this.body=je}}const W=()=>D(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,ie=function(K,F){if(/:\/\//.test(K.url)&&!/^https?:|^file:/.test(K.url)){const we=ye(K.url);if(we)return we(K,F);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:K,targetMapId:de},F)}if(!(/^file:/.test(ae=K.url)||/^file:/.test(W())&&!/^\w+:/.test(ae))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(we,je){return r(this,void 0,void 0,function*(){const Qe=new Request(we.url,{method:we.method||"GET",body:we.body,credentials:we.credentials,headers:we.headers,cache:we.cache,referrer:W(),signal:je.signal});we.type!=="json"||Qe.headers.has("Accept")||Qe.headers.set("Accept","application/json");const at=yield fetch(Qe);if(!at.ok){const ir=yield at.blob();throw new me(at.status,at.statusText,we.url,ir)}let St;St=we.type==="arrayBuffer"||we.type==="image"?at.arrayBuffer():we.type==="json"?at.json():at.text();const jt=yield St;if(je.signal.aborted)throw J();return{data:jt,cacheControl:at.headers.get("Cache-Control"),expires:at.headers.get("Expires")}})})(K,F);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:K,mustQueue:!0,targetMapId:de},F)}var ae;return(function(we,je){return new Promise((Qe,at)=>{var St;const jt=new XMLHttpRequest;jt.open(we.method||"GET",we.url,!0),we.type!=="arrayBuffer"&&we.type!=="image"||(jt.responseType="arraybuffer");for(const ir in we.headers)jt.setRequestHeader(ir,we.headers[ir]);we.type==="json"&&(jt.responseType="text",!((St=we.headers)===null||St===void 0)&&St.Accept||jt.setRequestHeader("Accept","application/json")),jt.withCredentials=we.credentials==="include",jt.onerror=()=>{at(new Error(jt.statusText))},jt.onload=()=>{if(!je.signal.aborted)if((jt.status>=200&&jt.status<300||jt.status===0)&&jt.response!==null){let ir=jt.response;if(we.type==="json")try{ir=JSON.parse(jt.response)}catch(Er){return void at(Er)}Qe({data:ir,cacheControl:jt.getResponseHeader("Cache-Control"),expires:jt.getResponseHeader("Expires")})}else{const ir=new Blob([jt.response],{type:jt.getResponseHeader("Content-Type")});at(new me(jt.status,jt.statusText,we.url,ir))}},je.signal.addEventListener("abort",()=>{jt.abort(),at(J())}),jt.send(we.body)})})(K,F)};function se(K){if(!K||K.indexOf("://")<=0||K.indexOf("data:image/")===0||K.indexOf("blob:")===0)return!0;const F=new URL(K),ae=window.location;return F.protocol===ae.protocol&&F.host===ae.host}function ee(K,F,ae){ae[K]&&ae[K].indexOf(F)!==-1||(ae[K]=ae[K]||[],ae[K].push(F))}function pe(K,F,ae){if(ae&&ae[K]){const we=ae[K].indexOf(F);we!==-1&&ae[K].splice(we,1)}}class oe{constructor(F,ae={}){k(this,ae),this.type=F}}class Y extends oe{constructor(F,ae={}){super("error",k({error:F},ae))}}class ce{on(F,ae){return this._listeners=this._listeners||{},ee(F,ae,this._listeners),this}off(F,ae){return pe(F,ae,this._listeners),pe(F,ae,this._oneTimeListeners),this}once(F,ae){return ae?(this._oneTimeListeners=this._oneTimeListeners||{},ee(F,ae,this._oneTimeListeners),this):new Promise(we=>this.once(F,we))}fire(F,ae){typeof F=="string"&&(F=new oe(F,ae||{}));const we=F.type;if(this.listens(we)){F.target=this;const je=this._listeners&&this._listeners[we]?this._listeners[we].slice():[];for(const St of je)St.call(this,F);const Qe=this._oneTimeListeners&&this._oneTimeListeners[we]?this._oneTimeListeners[we].slice():[];for(const St of Qe)pe(we,St,this._oneTimeListeners),St.call(this,F);const at=this._eventedParent;at&&(k(F,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),at.fire(F))}else F instanceof Y&&console.error(F.error);return this}listens(F){return this._listeners&&this._listeners[F]&&this._listeners[F].length>0||this._oneTimeListeners&&this._oneTimeListeners[F]&&this._oneTimeListeners[F].length>0||this._eventedParent&&this._eventedParent.listens(F)}setEventedParent(F,ae){return this._eventedParent=F,this._eventedParentData=ae,this}}var ue={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},"viewport-glyph":{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};const _e=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Le(K,F){const ae={};for(const we in K)we!=="ref"&&(ae[we]=K[we]);return _e.forEach(we=>{we in F&&(ae[we]=F[we])}),ae}function ze(K,F){if(Array.isArray(K)){if(!Array.isArray(F)||K.length!==F.length)return!1;for(let ae=0;ae<K.length;ae++)if(!ze(K[ae],F[ae]))return!1;return!0}if(typeof K=="object"&&K!==null&&F!==null){if(typeof F!="object"||Object.keys(K).length!==Object.keys(F).length)return!1;for(const ae in K)if(!ze(K[ae],F[ae]))return!1;return!0}return K===F}function Ge(K,F){K.push(F)}function Ve(K,F,ae){Ge(ae,{command:"addSource",args:[K,F[K]]})}function rt(K,F,ae){Ge(F,{command:"removeSource",args:[K]}),ae[K]=!0}function pt(K,F,ae,we){rt(K,ae,we),Ve(K,F,ae)}function gt(K,F,ae){let we;for(we in K[ae])if(Object.prototype.hasOwnProperty.call(K[ae],we)&&we!=="data"&&!ze(K[ae][we],F[ae][we]))return!1;for(we in F[ae])if(Object.prototype.hasOwnProperty.call(F[ae],we)&&we!=="data"&&!ze(K[ae][we],F[ae][we]))return!1;return!0}function ht(K,F,ae,we,je,Qe){K=K||{},F=F||{};for(const at in K)Object.prototype.hasOwnProperty.call(K,at)&&(ze(K[at],F[at])||ae.push({command:Qe,args:[we,at,F[at],je]}));for(const at in F)Object.prototype.hasOwnProperty.call(F,at)&&!Object.prototype.hasOwnProperty.call(K,at)&&(ze(K[at],F[at])||ae.push({command:Qe,args:[we,at,F[at],je]}))}function lt(K){return K.id}function Fe(K,F){return K[F.id]=F,K}class Pe{constructor(F,ae,we,je){this.message=(F?`${F}: `:"")+we,je&&(this.identifier=je),ae!=null&&ae.__line__&&(this.line=ae.__line__)}}function be(K,...F){for(const ae of F)for(const we in ae)K[we]=ae[we];return K}class Ye extends Error{constructor(F,ae){super(ae),this.message=ae,this.key=F}}class mt{constructor(F,ae=[]){this.parent=F,this.bindings={};for(const[we,je]of ae)this.bindings[we]=je}concat(F){return new mt(this,F)}get(F){if(this.bindings[F])return this.bindings[F];if(this.parent)return this.parent.get(F);throw new Error(`${F} not found in scope.`)}has(F){return!!this.bindings[F]||!!this.parent&&this.parent.has(F)}}const bt={kind:"null"},ft={kind:"number"},Wt={kind:"string"},Zt={kind:"boolean"},cr={kind:"color"},pr={kind:"object"},Br={kind:"value"},Fr={kind:"collator"},cn={kind:"formatted"},Nr={kind:"padding"},Jr={kind:"resolvedImage"},Dt={kind:"variableAnchorOffsetCollection"};function $e(K,F){return{kind:"array",itemType:K,N:F}}function ot(K){if(K.kind==="array"){const F=ot(K.itemType);return typeof K.N=="number"?`array<${F}, ${K.N}>`:K.itemType.kind==="value"?"array":`array<${F}>`}return K.kind}const De=[bt,ft,Wt,Zt,cr,cn,pr,$e(Br),Nr,Jr,Dt];function Ee(K,F){if(F.kind==="error")return null;if(K.kind==="array"){if(F.kind==="array"&&(F.N===0&&F.itemType.kind==="value"||!Ee(K.itemType,F.itemType))&&(typeof K.N!="number"||K.N===F.N))return null}else{if(K.kind===F.kind)return null;if(K.kind==="value"){for(const ae of De)if(!Ee(ae,F))return null}}return`Expected ${ot(K)} but found ${ot(F)} instead.`}function Ae(K,F){return F.some(ae=>ae.kind===K.kind)}function Ie(K,F){return F.some(ae=>ae==="null"?K===null:ae==="array"?Array.isArray(K):ae==="object"?K&&!Array.isArray(K)&&typeof K=="object":ae===typeof K)}function tt(K,F){return K.kind==="array"&&F.kind==="array"?K.itemType.kind===F.itemType.kind&&typeof K.N=="number":K.kind===F.kind}const st=.96422,Ft=.82521,Nt=4/29,Xt=6/29,lr=3*Xt*Xt,Rr=Xt*Xt*Xt,Mr=Math.PI/180,Sr=180/Math.PI;function Kr(K){return(K%=360)<0&&(K+=360),K}function qn([K,F,ae,we]){let je,Qe;const at=ia((.2225045*(K=ha(K))+.7168786*(F=ha(F))+.0606169*(ae=ha(ae)))/1);K===F&&F===ae?je=Qe=at:(je=ia((.4360747*K+.3850649*F+.1430804*ae)/st),Qe=ia((.0139322*K+.0971045*F+.7141733*ae)/Ft));const St=116*at-16;return[St<0?0:St,500*(je-at),200*(at-Qe),we]}function ha(K){return K<=.04045?K/12.92:Math.pow((K+.055)/1.055,2.4)}function ia(K){return K>Rr?Math.pow(K,1/3):K/lr+Nt}function xa([K,F,ae,we]){let je=(K+16)/116,Qe=isNaN(F)?je:je+F/500,at=isNaN(ae)?je:je-ae/200;return je=1*ea(je),Qe=st*ea(Qe),at=Ft*ea(at),[ba(3.1338561*Qe-1.6168667*je-.4906146*at),ba(-.9787684*Qe+1.9161415*je+.033454*at),ba(.0719453*Qe-.2289914*je+1.4052427*at),we]}function ba(K){return(K=K<=.00304?12.92*K:1.055*Math.pow(K,1/2.4)-.055)<0?0:K>1?1:K}function ea(K){return K>Xt?K*K*K:lr*(K-Nt)}function Za(K){return parseInt(K.padEnd(2,K),16)/255}function ui(K,F){return _r(F?K/100:K,0,1)}function _r(K,F,ae){return Math.min(Math.max(F,K),ae)}function Qt(K){return!K.some(Number.isNaN)}const yr={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};class br{constructor(F,ae,we,je=1,Qe=!0){this.r=F,this.g=ae,this.b=we,this.a=je,Qe||(this.r*=je,this.g*=je,this.b*=je,je||this.overwriteGetter("rgb",[F,ae,we,je]))}static parse(F){if(F instanceof br)return F;if(typeof F!="string")return;const ae=(function(we){if((we=we.toLowerCase().trim())==="transparent")return[0,0,0,0];const je=yr[we];if(je){const[at,St,jt]=je;return[at/255,St/255,jt/255,1]}if(we.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(we)){const at=we.length<6?1:2;let St=1;return[Za(we.slice(St,St+=at)),Za(we.slice(St,St+=at)),Za(we.slice(St,St+=at)),Za(we.slice(St,St+at)||"ff")]}if(we.startsWith("rgb")){const at=we.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(at){const[St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia,Mi]=at,ii=[Er||" ",vn||" ",Qn].join("");if(ii==="  "||ii==="  /"||ii===",,"||ii===",,,"){const bi=[ir,rn,Bn].join(""),Qi=bi==="%%%"?100:bi===""?255:0;if(Qi){const Co=[_r(+jt/Qi,0,1),_r(+Ir/Qi,0,1),_r(+Cn/Qi,0,1),Ia?ui(+Ia,Mi):1];if(Qt(Co))return Co}}return}}const Qe=we.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Qe){const[at,St,jt,ir,Er,Ir,rn,vn,Cn]=Qe,Bn=[jt||" ",Er||" ",rn].join("");if(Bn==="  "||Bn==="  /"||Bn===",,"||Bn===",,,"){const Qn=[+St,_r(+ir,0,100),_r(+Ir,0,100),vn?ui(+vn,Cn):1];if(Qt(Qn))return(function([Ia,Mi,ii,bi]){function Qi(Co){const cs=(Co+Ia/30)%12,bl=Mi*Math.min(ii,1-ii);return ii-bl*Math.max(-1,Math.min(cs-3,9-cs,1))}return Ia=Kr(Ia),Mi/=100,ii/=100,[Qi(0),Qi(8),Qi(4),bi]})(Qn)}}})(F);return ae?new br(...ae,!1):void 0}get rgb(){const{r:F,g:ae,b:we,a:je}=this,Qe=je||1/0;return this.overwriteGetter("rgb",[F/Qe,ae/Qe,we/Qe,je])}get hcl(){return this.overwriteGetter("hcl",(function(F){const[ae,we,je,Qe]=qn(F),at=Math.sqrt(we*we+je*je);return[Math.round(1e4*at)?Kr(Math.atan2(je,we)*Sr):NaN,at,ae,Qe]})(this.rgb))}get lab(){return this.overwriteGetter("lab",qn(this.rgb))}overwriteGetter(F,ae){return Object.defineProperty(this,F,{value:ae}),ae}toString(){const[F,ae,we,je]=this.rgb;return`rgba(${[F,ae,we].map(Qe=>Math.round(255*Qe)).join(",")},${je})`}}br.black=new br(0,0,0,1),br.white=new br(1,1,1,1),br.transparent=new br(0,0,0,0),br.red=new br(1,0,0,1);class nn{constructor(F,ae,we){this.sensitivity=F?ae?"variant":"case":ae?"accent":"base",this.locale=we,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(F,ae){return this.collator.compare(F,ae)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class wn{constructor(F,ae,we,je,Qe){this.text=F,this.image=ae,this.scale=we,this.fontStack=je,this.textColor=Qe}}class Ln{constructor(F){this.sections=F}static fromString(F){return new Ln([new wn(F,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(F=>F.text.length!==0||F.image&&F.image.name.length!==0)}static factory(F){return F instanceof Ln?F:Ln.fromString(F)}toString(){return this.sections.length===0?"":this.sections.map(F=>F.text).join("")}}class Fn{constructor(F){this.values=F.slice()}static parse(F){if(F instanceof Fn)return F;if(typeof F=="number")return new Fn([F,F,F,F]);if(Array.isArray(F)&&!(F.length<1||F.length>4)){for(const ae of F)if(typeof ae!="number")return;switch(F.length){case 1:F=[F[0],F[0],F[0],F[0]];break;case 2:F=[F[0],F[1],F[0],F[1]];break;case 3:F=[F[0],F[1],F[2],F[1]]}return new Fn(F)}}toString(){return JSON.stringify(this.values)}}const va=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Da{constructor(F){this.values=F.slice()}static parse(F){if(F instanceof Da)return F;if(Array.isArray(F)&&!(F.length<1)&&F.length%2==0){for(let ae=0;ae<F.length;ae+=2){const we=F[ae],je=F[ae+1];if(typeof we!="string"||!va.has(we)||!Array.isArray(je)||je.length!==2||typeof je[0]!="number"||typeof je[1]!="number")return}return new Da(F)}}toString(){return JSON.stringify(this.values)}}class Pa{constructor(F){this.name=F.name,this.available=F.available}toString(){return this.name}static fromString(F){return F?new Pa({name:F,available:!1}):null}}function Fa(K,F,ae,we){return typeof K=="number"&&K>=0&&K<=255&&typeof F=="number"&&F>=0&&F<=255&&typeof ae=="number"&&ae>=0&&ae<=255?we===void 0||typeof we=="number"&&we>=0&&we<=1?null:`Invalid rgba value [${[K,F,ae,we].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof we=="number"?[K,F,ae,we]:[K,F,ae]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function $a(K){if(K===null||typeof K=="string"||typeof K=="boolean"||typeof K=="number"||K instanceof br||K instanceof nn||K instanceof Ln||K instanceof Fn||K instanceof Da||K instanceof Pa)return!0;if(Array.isArray(K)){for(const F of K)if(!$a(F))return!1;return!0}if(typeof K=="object"){for(const F in K)if(!$a(K[F]))return!1;return!0}return!1}function oa(K){if(K===null)return bt;if(typeof K=="string")return Wt;if(typeof K=="boolean")return Zt;if(typeof K=="number")return ft;if(K instanceof br)return cr;if(K instanceof nn)return Fr;if(K instanceof Ln)return cn;if(K instanceof Fn)return Nr;if(K instanceof Da)return Dt;if(K instanceof Pa)return Jr;if(Array.isArray(K)){const F=K.length;let ae;for(const we of K){const je=oa(we);if(ae){if(ae===je)continue;ae=Br;break}ae=je}return $e(ae||Br,F)}return pr}function zi(K){const F=typeof K;return K===null?"":F==="string"||F==="number"||F==="boolean"?String(K):K instanceof br||K instanceof Ln||K instanceof Fn||K instanceof Da||K instanceof Pa?K.toString():JSON.stringify(K)}class Gi{constructor(F,ae){this.type=F,this.value=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'literal' expression requires exactly one argument, but found ${F.length-1} instead.`);if(!$a(F[1]))return ae.error("invalid value");const we=F[1];let je=oa(we);const Qe=ae.expectedType;return je.kind!=="array"||je.N!==0||!Qe||Qe.kind!=="array"||typeof Qe.N=="number"&&Qe.N!==0||(je=Qe),new Gi(je,we)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class qt{constructor(F){this.name="ExpressionEvaluationError",this.message=F}toJSON(){return this.message}}const Ct={string:Wt,number:ft,boolean:Zt,object:pr};class Ur{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");let we,je=1;const Qe=F[0];if(Qe==="array"){let St,jt;if(F.length>2){const ir=F[1];if(typeof ir!="string"||!(ir in Ct)||ir==="object")return ae.error('The item type argument of "array" must be one of string, number, boolean',1);St=Ct[ir],je++}else St=Br;if(F.length>3){if(F[2]!==null&&(typeof F[2]!="number"||F[2]<0||F[2]!==Math.floor(F[2])))return ae.error('The length argument to "array" must be a positive integer literal',2);jt=F[2],je++}we=$e(St,jt)}else{if(!Ct[Qe])throw new Error(`Types doesn't contain name = ${Qe}`);we=Ct[Qe]}const at=[];for(;je<F.length;je++){const St=ae.parse(F[je],je,Br);if(!St)return null;at.push(St)}return new Ur(we,at)}evaluate(F){for(let ae=0;ae<this.args.length;ae++){const we=this.args[ae].evaluate(F);if(!Ee(this.type,oa(we)))return we;if(ae===this.args.length-1)throw new qt(`Expected value to be of type ${ot(this.type)}, but found ${ot(oa(we))} instead.`)}throw new Error}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}const Qr={"to-boolean":Zt,"to-color":cr,"to-number":ft,"to-string":Wt};class tn{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");const we=F[0];if(!Qr[we])throw new Error(`Can't parse ${we} as it is not part of the known types`);if((we==="to-boolean"||we==="to-string")&&F.length!==2)return ae.error("Expected one argument.");const je=Qr[we],Qe=[];for(let at=1;at<F.length;at++){const St=ae.parse(F[at],at,Br);if(!St)return null;Qe.push(St)}return new tn(je,Qe)}evaluate(F){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(F);case"color":{let ae,we;for(const je of this.args){if(ae=je.evaluate(F),we=null,ae instanceof br)return ae;if(typeof ae=="string"){const Qe=F.parseColor(ae);if(Qe)return Qe}else if(Array.isArray(ae)&&(we=ae.length<3||ae.length>4?`Invalid rbga value ${JSON.stringify(ae)}: expected an array containing either three or four numeric values.`:Fa(ae[0],ae[1],ae[2],ae[3]),!we))return new br(ae[0]/255,ae[1]/255,ae[2]/255,ae[3])}throw new qt(we||`Could not parse color from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"padding":{let ae;for(const we of this.args){ae=we.evaluate(F);const je=Fn.parse(ae);if(je)return je}throw new qt(`Could not parse padding from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"variableAnchorOffsetCollection":{let ae;for(const we of this.args){ae=we.evaluate(F);const je=Da.parse(ae);if(je)return je}throw new qt(`Could not parse variableAnchorOffsetCollection from value '${typeof ae=="string"?ae:JSON.stringify(ae)}'`)}case"number":{let ae=null;for(const we of this.args){if(ae=we.evaluate(F),ae===null)return 0;const je=Number(ae);if(!isNaN(je))return je}throw new qt(`Could not convert ${JSON.stringify(ae)} to number.`)}case"formatted":return Ln.fromString(zi(this.args[0].evaluate(F)));case"resolvedImage":return Pa.fromString(zi(this.args[0].evaluate(F)));default:return zi(this.args[0].evaluate(F))}}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}const Xr=["Unknown","Point","LineString","Polygon"];class en{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Xr[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(F){let ae=this._parseColorCache[F];return ae||(ae=this._parseColorCache[F]=br.parse(F)),ae}}class Tn{constructor(F,ae,we=[],je,Qe=new mt,at=[]){this.registry=F,this.path=we,this.key=we.map(St=>`[${St}]`).join(""),this.scope=Qe,this.errors=at,this.expectedType=je,this._isConstant=ae}parse(F,ae,we,je,Qe={}){return ae?this.concat(ae,we,je)._parse(F,Qe):this._parse(F,Qe)}_parse(F,ae){function we(je,Qe,at){return at==="assert"?new Ur(Qe,[je]):at==="coerce"?new tn(Qe,[je]):je}if(F!==null&&typeof F!="string"&&typeof F!="boolean"&&typeof F!="number"||(F=["literal",F]),Array.isArray(F)){if(F.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');const je=F[0];if(typeof je!="string")return this.error(`Expression name must be a string, but found ${typeof je} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;const Qe=this.registry[je];if(Qe){let at=Qe.parse(F,this);if(!at)return null;if(this.expectedType){const St=this.expectedType,jt=at.type;if(St.kind!=="string"&&St.kind!=="number"&&St.kind!=="boolean"&&St.kind!=="object"&&St.kind!=="array"||jt.kind!=="value")if(St.kind!=="color"&&St.kind!=="formatted"&&St.kind!=="resolvedImage"||jt.kind!=="value"&&jt.kind!=="string")if(St.kind!=="padding"||jt.kind!=="value"&&jt.kind!=="number"&&jt.kind!=="array")if(St.kind!=="variableAnchorOffsetCollection"||jt.kind!=="value"&&jt.kind!=="array"){if(this.checkSubtype(St,jt))return null}else at=we(at,St,ae.typeAnnotation||"coerce");else at=we(at,St,ae.typeAnnotation||"coerce");else at=we(at,St,ae.typeAnnotation||"coerce");else at=we(at,St,ae.typeAnnotation||"assert")}if(!(at instanceof Gi)&&at.type.kind!=="resolvedImage"&&this._isConstant(at)){const St=new en;try{at=new Gi(at.type,at.evaluate(St))}catch(jt){return this.error(jt.message),null}}return at}return this.error(`Unknown expression "${je}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(F===void 0?"'undefined' value invalid. Use null instead.":typeof F=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof F} instead.`)}concat(F,ae,we){const je=typeof F=="number"?this.path.concat(F):this.path,Qe=we?this.scope.concat(we):this.scope;return new Tn(this.registry,this._isConstant,je,ae||null,Qe,this.errors)}error(F,...ae){const we=`${this.key}${ae.map(je=>`[${je}]`).join("")}`;this.errors.push(new Ye(we,F))}checkSubtype(F,ae){const we=Ee(F,ae);return we&&this.error(we),we}}class hn{constructor(F,ae){this.type=ae.type,this.bindings=[].concat(F),this.result=ae}evaluate(F){return this.result.evaluate(F)}eachChild(F){for(const ae of this.bindings)F(ae[1]);F(this.result)}static parse(F,ae){if(F.length<4)return ae.error(`Expected at least 3 arguments, but found ${F.length-1} instead.`);const we=[];for(let Qe=1;Qe<F.length-1;Qe+=2){const at=F[Qe];if(typeof at!="string")return ae.error(`Expected string, but found ${typeof at} instead.`,Qe);if(/[^a-zA-Z0-9_]/.test(at))return ae.error("Variable names must contain only alphanumeric characters or '_'.",Qe);const St=ae.parse(F[Qe+1],Qe+1);if(!St)return null;we.push([at,St])}const je=ae.parse(F[F.length-1],F.length-1,ae.expectedType,we);return je?new hn(we,je):null}outputDefined(){return this.result.outputDefined()}}class Rt{constructor(F,ae){this.type=ae.type,this.name=F,this.boundExpression=ae}static parse(F,ae){if(F.length!==2||typeof F[1]!="string")return ae.error("'var' expression requires exactly one string literal argument.");const we=F[1];return ae.scope.has(we)?new Rt(we,ae.scope.get(we)):ae.error(`Unknown variable "${we}". Make sure "${we}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(F){return this.boundExpression.evaluate(F)}eachChild(){}outputDefined(){return!1}}class xr{constructor(F,ae,we){this.type=F,this.index=ae,this.input=we}static parse(F,ae){if(F.length!==3)return ae.error(`Expected 2 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,ft),je=ae.parse(F[2],2,$e(ae.expectedType||Br));return we&&je?new xr(je.type.itemType,we,je):null}evaluate(F){const ae=this.index.evaluate(F),we=this.input.evaluate(F);if(ae<0)throw new qt(`Array index out of bounds: ${ae} < 0.`);if(ae>=we.length)throw new qt(`Array index out of bounds: ${ae} > ${we.length-1}.`);if(ae!==Math.floor(ae))throw new qt(`Array index must be an integer, but found ${ae} instead.`);return we[ae]}eachChild(F){F(this.index),F(this.input)}outputDefined(){return!1}}class Wr{constructor(F,ae){this.type=Zt,this.needle=F,this.haystack=ae}static parse(F,ae){if(F.length!==3)return ae.error(`Expected 2 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Br),je=ae.parse(F[2],2,Br);return we&&je?Ae(we.type,[Zt,Wt,ft,bt,Br])?new Wr(we,je):ae.error(`Expected first argument to be of type boolean, string, number or null, but found ${ot(we.type)} instead`):null}evaluate(F){const ae=this.needle.evaluate(F),we=this.haystack.evaluate(F);if(!we)return!1;if(!Ie(ae,["boolean","string","number","null"]))throw new qt(`Expected first argument to be of type boolean, string, number or null, but found ${ot(oa(ae))} instead.`);if(!Ie(we,["string","array"]))throw new qt(`Expected second argument to be of type array or string, but found ${ot(oa(we))} instead.`);return we.indexOf(ae)>=0}eachChild(F){F(this.needle),F(this.haystack)}outputDefined(){return!0}}class An{constructor(F,ae,we){this.type=ft,this.needle=F,this.haystack=ae,this.fromIndex=we}static parse(F,ae){if(F.length<=2||F.length>=5)return ae.error(`Expected 3 or 4 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Br),je=ae.parse(F[2],2,Br);if(!we||!je)return null;if(!Ae(we.type,[Zt,Wt,ft,bt,Br]))return ae.error(`Expected first argument to be of type boolean, string, number or null, but found ${ot(we.type)} instead`);if(F.length===4){const Qe=ae.parse(F[3],3,ft);return Qe?new An(we,je,Qe):null}return new An(we,je)}evaluate(F){const ae=this.needle.evaluate(F),we=this.haystack.evaluate(F);if(!Ie(ae,["boolean","string","number","null"]))throw new qt(`Expected first argument to be of type boolean, string, number or null, but found ${ot(oa(ae))} instead.`);let je;if(this.fromIndex&&(je=this.fromIndex.evaluate(F)),Ie(we,["string"])){const Qe=we.indexOf(ae,je);return Qe===-1?-1:[...we.slice(0,Qe)].length}if(Ie(we,["array"]))return we.indexOf(ae,je);throw new qt(`Expected second argument to be of type array or string, but found ${ot(oa(we))} instead.`)}eachChild(F){F(this.needle),F(this.haystack),this.fromIndex&&F(this.fromIndex)}outputDefined(){return!1}}class Xn{constructor(F,ae,we,je,Qe,at){this.inputType=F,this.type=ae,this.input=we,this.cases=je,this.outputs=Qe,this.otherwise=at}static parse(F,ae){if(F.length<5)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if(F.length%2!=1)return ae.error("Expected an even number of arguments.");let we,je;ae.expectedType&&ae.expectedType.kind!=="value"&&(je=ae.expectedType);const Qe={},at=[];for(let ir=2;ir<F.length-1;ir+=2){let Er=F[ir];const Ir=F[ir+1];Array.isArray(Er)||(Er=[Er]);const rn=ae.concat(ir);if(Er.length===0)return rn.error("Expected at least one branch label.");for(const Cn of Er){if(typeof Cn!="number"&&typeof Cn!="string")return rn.error("Branch labels must be numbers or strings.");if(typeof Cn=="number"&&Math.abs(Cn)>Number.MAX_SAFE_INTEGER)return rn.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Cn=="number"&&Math.floor(Cn)!==Cn)return rn.error("Numeric branch labels must be integer values.");if(we){if(rn.checkSubtype(we,oa(Cn)))return null}else we=oa(Cn);if(Qe[String(Cn)]!==void 0)return rn.error("Branch labels must be unique.");Qe[String(Cn)]=at.length}const vn=ae.parse(Ir,ir,je);if(!vn)return null;je=je||vn.type,at.push(vn)}const St=ae.parse(F[1],1,Br);if(!St)return null;const jt=ae.parse(F[F.length-1],F.length-1,je);return jt?St.type.kind!=="value"&&ae.concat(1).checkSubtype(we,St.type)?null:new Xn(we,je,St,Qe,at,jt):null}evaluate(F){const ae=this.input.evaluate(F);return(oa(ae)===this.inputType&&this.outputs[this.cases[ae]]||this.otherwise).evaluate(F)}eachChild(F){F(this.input),this.outputs.forEach(F),F(this.otherwise)}outputDefined(){return this.outputs.every(F=>F.outputDefined())&&this.otherwise.outputDefined()}}class na{constructor(F,ae,we){this.type=F,this.branches=ae,this.otherwise=we}static parse(F,ae){if(F.length<4)return ae.error(`Expected at least 3 arguments, but found only ${F.length-1}.`);if(F.length%2!=0)return ae.error("Expected an odd number of arguments.");let we;ae.expectedType&&ae.expectedType.kind!=="value"&&(we=ae.expectedType);const je=[];for(let at=1;at<F.length-1;at+=2){const St=ae.parse(F[at],at,Zt);if(!St)return null;const jt=ae.parse(F[at+1],at+1,we);if(!jt)return null;je.push([St,jt]),we=we||jt.type}const Qe=ae.parse(F[F.length-1],F.length-1,we);if(!Qe)return null;if(!we)throw new Error("Can't infer output type");return new na(we,je,Qe)}evaluate(F){for(const[ae,we]of this.branches)if(ae.evaluate(F))return we.evaluate(F);return this.otherwise.evaluate(F)}eachChild(F){for(const[ae,we]of this.branches)F(ae),F(we);F(this.otherwise)}outputDefined(){return this.branches.every(([F,ae])=>ae.outputDefined())&&this.otherwise.outputDefined()}}class ra{constructor(F,ae,we,je){this.type=F,this.input=ae,this.beginIndex=we,this.endIndex=je}static parse(F,ae){if(F.length<=2||F.length>=5)return ae.error(`Expected 3 or 4 arguments, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1,Br),je=ae.parse(F[2],2,ft);if(!we||!je)return null;if(!Ae(we.type,[$e(Br),Wt,Br]))return ae.error(`Expected first argument to be of type array or string, but found ${ot(we.type)} instead`);if(F.length===4){const Qe=ae.parse(F[3],3,ft);return Qe?new ra(we.type,we,je,Qe):null}return new ra(we.type,we,je)}evaluate(F){const ae=this.input.evaluate(F),we=this.beginIndex.evaluate(F);let je;if(this.endIndex&&(je=this.endIndex.evaluate(F)),Ie(ae,["string"]))return[...ae].slice(we,je).join("");if(Ie(ae,["array"]))return ae.slice(we,je);throw new qt(`Expected first argument to be of type array or string, but found ${ot(oa(ae))} instead.`)}eachChild(F){F(this.input),F(this.beginIndex),this.endIndex&&F(this.endIndex)}outputDefined(){return!1}}function Sn(K,F){const ae=K.length-1;let we,je,Qe=0,at=ae,St=0;for(;Qe<=at;)if(St=Math.floor((Qe+at)/2),we=K[St],je=K[St+1],we<=F){if(St===ae||F<je)return St;Qe=St+1}else{if(!(we>F))throw new qt("Input is not a number.");at=St-1}return 0}class Wn{constructor(F,ae,we){this.type=F,this.input=ae,this.labels=[],this.outputs=[];for(const[je,Qe]of we)this.labels.push(je),this.outputs.push(Qe)}static parse(F,ae){if(F.length-1<4)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if((F.length-1)%2!=0)return ae.error("Expected an even number of arguments.");const we=ae.parse(F[1],1,ft);if(!we)return null;const je=[];let Qe=null;ae.expectedType&&ae.expectedType.kind!=="value"&&(Qe=ae.expectedType);for(let at=1;at<F.length;at+=2){const St=at===1?-1/0:F[at],jt=F[at+1],ir=at,Er=at+1;if(typeof St!="number")return ae.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',ir);if(je.length&&je[je.length-1][0]>=St)return ae.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',ir);const Ir=ae.parse(jt,Er,Qe);if(!Ir)return null;Qe=Qe||Ir.type,je.push([St,Ir])}return new Wn(Qe,we,je)}evaluate(F){const ae=this.labels,we=this.outputs;if(ae.length===1)return we[0].evaluate(F);const je=this.input.evaluate(F);if(je<=ae[0])return we[0].evaluate(F);const Qe=ae.length;return je>=ae[Qe-1]?we[Qe-1].evaluate(F):we[Sn(ae,je)].evaluate(F)}eachChild(F){F(this.input);for(const ae of this.outputs)F(ae)}outputDefined(){return this.outputs.every(F=>F.outputDefined())}}function Fi(K){return K&&K.__esModule&&Object.prototype.hasOwnProperty.call(K,"default")?K.default:K}var Ya=Wi;function Wi(K,F,ae,we){this.cx=3*K,this.bx=3*(ae-K)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*F,this.by=3*(we-F)-this.cy,this.ay=1-this.cy-this.by,this.p1x=K,this.p1y=F,this.p2x=ae,this.p2y=we}Wi.prototype={sampleCurveX:function(K){return((this.ax*K+this.bx)*K+this.cx)*K},sampleCurveY:function(K){return((this.ay*K+this.by)*K+this.cy)*K},sampleCurveDerivativeX:function(K){return(3*this.ax*K+2*this.bx)*K+this.cx},solveCurveX:function(K,F){if(F===void 0&&(F=1e-6),K<0)return 0;if(K>1)return 1;for(var ae=K,we=0;we<8;we++){var je=this.sampleCurveX(ae)-K;if(Math.abs(je)<F)return ae;var Qe=this.sampleCurveDerivativeX(ae);if(Math.abs(Qe)<1e-6)break;ae-=je/Qe}var at=0,St=1;for(ae=K,we=0;we<20&&(je=this.sampleCurveX(ae),!(Math.abs(je-K)<F));we++)K>je?at=ae:St=ae,ae=.5*(St-at)+at;return ae},solve:function(K,F){return this.sampleCurveY(this.solveCurveX(K,F))}};var uo=Fi(Ya);function Ao(K,F,ae){return K+ae*(F-K)}function wo(K,F,ae){return K.map((we,je)=>Ao(we,F[je],ae))}const Uo={number:Ao,color:function(K,F,ae,we="rgb"){switch(we){case"rgb":{const[je,Qe,at,St]=wo(K.rgb,F.rgb,ae);return new br(je,Qe,at,St,!1)}case"hcl":{const[je,Qe,at,St]=K.hcl,[jt,ir,Er,Ir]=F.hcl;let rn,vn;if(isNaN(je)||isNaN(jt))isNaN(je)?isNaN(jt)?rn=NaN:(rn=jt,at!==1&&at!==0||(vn=ir)):(rn=je,Er!==1&&Er!==0||(vn=Qe));else{let Mi=jt-je;jt>je&&Mi>180?Mi-=360:jt<je&&je-jt>180&&(Mi+=360),rn=je+ae*Mi}const[Cn,Bn,Qn,Ia]=(function([Mi,ii,bi,Qi]){return Mi=isNaN(Mi)?0:Mi*Mr,xa([bi,Math.cos(Mi)*ii,Math.sin(Mi)*ii,Qi])})([rn,vn??Ao(Qe,ir,ae),Ao(at,Er,ae),Ao(St,Ir,ae)]);return new br(Cn,Bn,Qn,Ia,!1)}case"lab":{const[je,Qe,at,St]=xa(wo(K.lab,F.lab,ae));return new br(je,Qe,at,St,!1)}}},array:wo,padding:function(K,F,ae){return new Fn(wo(K.values,F.values,ae))},variableAnchorOffsetCollection:function(K,F,ae){const we=K.values,je=F.values;if(we.length!==je.length)throw new qt(`Cannot interpolate values of different length. from: ${K.toString()}, to: ${F.toString()}`);const Qe=[];for(let at=0;at<we.length;at+=2){if(we[at]!==je[at])throw new qt(`Cannot interpolate values containing mismatched anchors. from[${at}]: ${we[at]}, to[${at}]: ${je[at]}`);Qe.push(we[at]);const[St,jt]=we[at+1],[ir,Er]=je[at+1];Qe.push([Ao(St,ir,ae),Ao(jt,Er,ae)])}return new Da(Qe)}};class Ri{constructor(F,ae,we,je,Qe){this.type=F,this.operator=ae,this.interpolation=we,this.input=je,this.labels=[],this.outputs=[];for(const[at,St]of Qe)this.labels.push(at),this.outputs.push(St)}static interpolationFactor(F,ae,we,je){let Qe=0;if(F.name==="exponential")Qe=ps(ae,F.base,we,je);else if(F.name==="linear")Qe=ps(ae,1,we,je);else if(F.name==="cubic-bezier"){const at=F.controlPoints;Qe=new uo(at[0],at[1],at[2],at[3]).solve(ps(ae,1,we,je))}return Qe}static parse(F,ae){let[we,je,Qe,...at]=F;if(!Array.isArray(je)||je.length===0)return ae.error("Expected an interpolation type expression.",1);if(je[0]==="linear")je={name:"linear"};else if(je[0]==="exponential"){const ir=je[1];if(typeof ir!="number")return ae.error("Exponential interpolation requires a numeric base.",1,1);je={name:"exponential",base:ir}}else{if(je[0]!=="cubic-bezier")return ae.error(`Unknown interpolation type ${String(je[0])}`,1,0);{const ir=je.slice(1);if(ir.length!==4||ir.some(Er=>typeof Er!="number"||Er<0||Er>1))return ae.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);je={name:"cubic-bezier",controlPoints:ir}}}if(F.length-1<4)return ae.error(`Expected at least 4 arguments, but found only ${F.length-1}.`);if((F.length-1)%2!=0)return ae.error("Expected an even number of arguments.");if(Qe=ae.parse(Qe,2,ft),!Qe)return null;const St=[];let jt=null;we==="interpolate-hcl"||we==="interpolate-lab"?jt=cr:ae.expectedType&&ae.expectedType.kind!=="value"&&(jt=ae.expectedType);for(let ir=0;ir<at.length;ir+=2){const Er=at[ir],Ir=at[ir+1],rn=ir+3,vn=ir+4;if(typeof Er!="number")return ae.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',rn);if(St.length&&St[St.length-1][0]>=Er)return ae.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',rn);const Cn=ae.parse(Ir,vn,jt);if(!Cn)return null;jt=jt||Cn.type,St.push([Er,Cn])}return tt(jt,ft)||tt(jt,cr)||tt(jt,Nr)||tt(jt,Dt)||tt(jt,$e(ft))?new Ri(jt,we,je,Qe,St):ae.error(`Type ${ot(jt)} is not interpolatable.`)}evaluate(F){const ae=this.labels,we=this.outputs;if(ae.length===1)return we[0].evaluate(F);const je=this.input.evaluate(F);if(je<=ae[0])return we[0].evaluate(F);const Qe=ae.length;if(je>=ae[Qe-1])return we[Qe-1].evaluate(F);const at=Sn(ae,je),St=Ri.interpolationFactor(this.interpolation,je,ae[at],ae[at+1]),jt=we[at].evaluate(F),ir=we[at+1].evaluate(F);switch(this.operator){case"interpolate":return Uo[this.type.kind](jt,ir,St);case"interpolate-hcl":return Uo.color(jt,ir,St,"hcl");case"interpolate-lab":return Uo.color(jt,ir,St,"lab")}}eachChild(F){F(this.input);for(const ae of this.outputs)F(ae)}outputDefined(){return this.outputs.every(F=>F.outputDefined())}}function ps(K,F,ae,we){const je=we-ae,Qe=K-ae;return je===0?0:F===1?Qe/je:(Math.pow(F,Qe)-1)/(Math.pow(F,je)-1)}class as{constructor(F,ae){this.type=F,this.args=ae}static parse(F,ae){if(F.length<2)return ae.error("Expectected at least one argument.");let we=null;const je=ae.expectedType;je&&je.kind!=="value"&&(we=je);const Qe=[];for(const St of F.slice(1)){const jt=ae.parse(St,1+Qe.length,we,void 0,{typeAnnotation:"omit"});if(!jt)return null;we=we||jt.type,Qe.push(jt)}if(!we)throw new Error("No output type");const at=je&&Qe.some(St=>Ee(je,St.type));return new as(at?Br:we,Qe)}evaluate(F){let ae,we=null,je=0;for(const Qe of this.args)if(je++,we=Qe.evaluate(F),we&&we instanceof Pa&&!we.available&&(ae||(ae=we.name),we=null,je===this.args.length&&(we=ae)),we!==null)break;return we}eachChild(F){this.args.forEach(F)}outputDefined(){return this.args.every(F=>F.outputDefined())}}function el(K,F){return K==="=="||K==="!="?F.kind==="boolean"||F.kind==="string"||F.kind==="number"||F.kind==="null"||F.kind==="value":F.kind==="string"||F.kind==="number"||F.kind==="value"}function As(K,F,ae,we){return we.compare(F,ae)===0}function hs(K,F,ae){const we=K!=="=="&&K!=="!=";return class oK{constructor(Qe,at,St){this.type=Zt,this.lhs=Qe,this.rhs=at,this.collator=St,this.hasUntypedArgument=Qe.type.kind==="value"||at.type.kind==="value"}static parse(Qe,at){if(Qe.length!==3&&Qe.length!==4)return at.error("Expected two or three arguments.");const St=Qe[0];let jt=at.parse(Qe[1],1,Br);if(!jt)return null;if(!el(St,jt.type))return at.concat(1).error(`"${St}" comparisons are not supported for type '${ot(jt.type)}'.`);let ir=at.parse(Qe[2],2,Br);if(!ir)return null;if(!el(St,ir.type))return at.concat(2).error(`"${St}" comparisons are not supported for type '${ot(ir.type)}'.`);if(jt.type.kind!==ir.type.kind&&jt.type.kind!=="value"&&ir.type.kind!=="value")return at.error(`Cannot compare types '${ot(jt.type)}' and '${ot(ir.type)}'.`);we&&(jt.type.kind==="value"&&ir.type.kind!=="value"?jt=new Ur(ir.type,[jt]):jt.type.kind!=="value"&&ir.type.kind==="value"&&(ir=new Ur(jt.type,[ir])));let Er=null;if(Qe.length===4){if(jt.type.kind!=="string"&&ir.type.kind!=="string"&&jt.type.kind!=="value"&&ir.type.kind!=="value")return at.error("Cannot use collator to compare non-string types.");if(Er=at.parse(Qe[3],3,Fr),!Er)return null}return new oK(jt,ir,Er)}evaluate(Qe){const at=this.lhs.evaluate(Qe),St=this.rhs.evaluate(Qe);if(we&&this.hasUntypedArgument){const jt=oa(at),ir=oa(St);if(jt.kind!==ir.kind||jt.kind!=="string"&&jt.kind!=="number")throw new qt(`Expected arguments for "${K}" to be (string, string) or (number, number), but found (${jt.kind}, ${ir.kind}) instead.`)}if(this.collator&&!we&&this.hasUntypedArgument){const jt=oa(at),ir=oa(St);if(jt.kind!=="string"||ir.kind!=="string")return F(Qe,at,St)}return this.collator?ae(Qe,at,St,this.collator.evaluate(Qe)):F(Qe,at,St)}eachChild(Qe){Qe(this.lhs),Qe(this.rhs),this.collator&&Qe(this.collator)}outputDefined(){return!0}}}const es=hs("==",function(K,F,ae){return F===ae},As),tl=hs("!=",function(K,F,ae){return F!==ae},function(K,F,ae,we){return!As(0,F,ae,we)}),Ks=hs("<",function(K,F,ae){return F<ae},function(K,F,ae,we){return we.compare(F,ae)<0}),pl=hs(">",function(K,F,ae){return F>ae},function(K,F,ae,we){return we.compare(F,ae)>0}),Ss=hs("<=",function(K,F,ae){return F<=ae},function(K,F,ae,we){return we.compare(F,ae)<=0}),ls=hs(">=",function(K,F,ae){return F>=ae},function(K,F,ae,we){return we.compare(F,ae)>=0});class Lo{constructor(F,ae,we){this.type=Fr,this.locale=we,this.caseSensitive=F,this.diacriticSensitive=ae}static parse(F,ae){if(F.length!==2)return ae.error("Expected one argument.");const we=F[1];if(typeof we!="object"||Array.isArray(we))return ae.error("Collator options argument must be an object.");const je=ae.parse(we["case-sensitive"]!==void 0&&we["case-sensitive"],1,Zt);if(!je)return null;const Qe=ae.parse(we["diacritic-sensitive"]!==void 0&&we["diacritic-sensitive"],1,Zt);if(!Qe)return null;let at=null;return we.locale&&(at=ae.parse(we.locale,1,Wt),!at)?null:new Lo(je,Qe,at)}evaluate(F){return new nn(this.caseSensitive.evaluate(F),this.diacriticSensitive.evaluate(F),this.locale?this.locale.evaluate(F):null)}eachChild(F){F(this.caseSensitive),F(this.diacriticSensitive),this.locale&&F(this.locale)}outputDefined(){return!1}}class Es{constructor(F,ae,we,je,Qe){this.type=Wt,this.number=F,this.locale=ae,this.currency=we,this.minFractionDigits=je,this.maxFractionDigits=Qe}static parse(F,ae){if(F.length!==3)return ae.error("Expected two arguments.");const we=ae.parse(F[1],1,ft);if(!we)return null;const je=F[2];if(typeof je!="object"||Array.isArray(je))return ae.error("NumberFormat options argument must be an object.");let Qe=null;if(je.locale&&(Qe=ae.parse(je.locale,1,Wt),!Qe))return null;let at=null;if(je.currency&&(at=ae.parse(je.currency,1,Wt),!at))return null;let St=null;if(je["min-fraction-digits"]&&(St=ae.parse(je["min-fraction-digits"],1,ft),!St))return null;let jt=null;return je["max-fraction-digits"]&&(jt=ae.parse(je["max-fraction-digits"],1,ft),!jt)?null:new Es(we,Qe,at,St,jt)}evaluate(F){return new Intl.NumberFormat(this.locale?this.locale.evaluate(F):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(F):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(F):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(F):void 0}).format(this.number.evaluate(F))}eachChild(F){F(this.number),this.locale&&F(this.locale),this.currency&&F(this.currency),this.minFractionDigits&&F(this.minFractionDigits),this.maxFractionDigits&&F(this.maxFractionDigits)}outputDefined(){return!1}}class ml{constructor(F){this.type=cn,this.sections=F}static parse(F,ae){if(F.length<2)return ae.error("Expected at least one argument.");const we=F[1];if(!Array.isArray(we)&&typeof we=="object")return ae.error("First argument must be an image or text section.");const je=[];let Qe=!1;for(let at=1;at<=F.length-1;++at){const St=F[at];if(Qe&&typeof St=="object"&&!Array.isArray(St)){Qe=!1;let jt=null;if(St["font-scale"]&&(jt=ae.parse(St["font-scale"],1,ft),!jt))return null;let ir=null;if(St["text-font"]&&(ir=ae.parse(St["text-font"],1,$e(Wt)),!ir))return null;let Er=null;if(St["text-color"]&&(Er=ae.parse(St["text-color"],1,cr),!Er))return null;const Ir=je[je.length-1];Ir.scale=jt,Ir.font=ir,Ir.textColor=Er}else{const jt=ae.parse(F[at],1,Br);if(!jt)return null;const ir=jt.type.kind;if(ir!=="string"&&ir!=="value"&&ir!=="null"&&ir!=="resolvedImage")return ae.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");Qe=!0,je.push({content:jt,scale:null,font:null,textColor:null})}}return new ml(je)}evaluate(F){return new Ln(this.sections.map(ae=>{const we=ae.content.evaluate(F);return oa(we)===Jr?new wn("",we,null,null,null):new wn(zi(we),null,ae.scale?ae.scale.evaluate(F):null,ae.font?ae.font.evaluate(F).join(","):null,ae.textColor?ae.textColor.evaluate(F):null)}))}eachChild(F){for(const ae of this.sections)F(ae.content),ae.scale&&F(ae.scale),ae.font&&F(ae.font),ae.textColor&&F(ae.textColor)}outputDefined(){return!1}}class zl{constructor(F){this.type=Jr,this.input=F}static parse(F,ae){if(F.length!==2)return ae.error("Expected two arguments.");const we=ae.parse(F[1],1,Wt);return we?new zl(we):ae.error("No image name provided.")}evaluate(F){const ae=this.input.evaluate(F),we=Pa.fromString(ae);return we&&F.availableImages&&(we.available=F.availableImages.indexOf(ae)>-1),we}eachChild(F){F(this.input)}outputDefined(){return!1}}class Bl{constructor(F){this.type=ft,this.input=F}static parse(F,ae){if(F.length!==2)return ae.error(`Expected 1 argument, but found ${F.length-1} instead.`);const we=ae.parse(F[1],1);return we?we.type.kind!=="array"&&we.type.kind!=="string"&&we.type.kind!=="value"?ae.error(`Expected argument of type string or array, but found ${ot(we.type)} instead.`):new Bl(we):null}evaluate(F){const ae=this.input.evaluate(F);if(typeof ae=="string")return[...ae].length;if(Array.isArray(ae))return ae.length;throw new qt(`Expected value to be of type string or array, but found ${ot(oa(ae))} instead.`)}eachChild(F){F(this.input)}outputDefined(){return!1}}const Fs=8192;function Di(K,F){const ae=(180+K[0])/360,we=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+K[1]*Math.PI/360)))/360,je=Math.pow(2,F.z);return[Math.round(ae*je*Fs),Math.round(we*je*Fs)]}function _o(K,F){const ae=Math.pow(2,F.z);return[(je=(K[0]/Fs+F.x)/ae,360*je-180),(we=(K[1]/Fs+F.y)/ae,360/Math.PI*Math.atan(Math.exp((180-360*we)*Math.PI/180))-90)];var we,je}function Nl(K,F){K[0]=Math.min(K[0],F[0]),K[1]=Math.min(K[1],F[1]),K[2]=Math.max(K[2],F[0]),K[3]=Math.max(K[3],F[1])}function Vs(K,F){return!(K[0]<=F[0]||K[2]>=F[2]||K[1]<=F[1]||K[3]>=F[3])}function Ko(K,F,ae){const we=K[0]-F[0],je=K[1]-F[1],Qe=K[0]-ae[0],at=K[1]-ae[1];return we*at-Qe*je==0&&we*Qe<=0&&je*at<=0}function jl(K,F,ae,we){return(je=[we[0]-ae[0],we[1]-ae[1]])[0]*(Qe=[F[0]-K[0],F[1]-K[1]])[1]-je[1]*Qe[0]!=0&&!(!ms(K,F,ae,we)||!ms(ae,we,K,F));var je,Qe}function rl(K,F,ae){for(const we of ae)for(let je=0;je<we.length-1;++je)if(jl(K,F,we[je],we[je+1]))return!0;return!1}function yl(K,F,ae=!1){let we=!1;for(const St of F)for(let jt=0;jt<St.length-1;jt++){if(Ko(K,St[jt],St[jt+1]))return ae;(Qe=St[jt])[1]>(je=K)[1]!=(at=St[jt+1])[1]>je[1]&&je[0]<(at[0]-Qe[0])*(je[1]-Qe[1])/(at[1]-Qe[1])+Qe[0]&&(we=!we)}var je,Qe,at;return we}function Cu(K,F){for(const ae of F)if(yl(K,ae))return!0;return!1}function yo(K,F){for(const ae of K)if(!yl(ae,F))return!1;for(let ae=0;ae<K.length-1;++ae)if(rl(K[ae],K[ae+1],F))return!1;return!0}function Ps(K,F){for(const ae of F)if(yo(K,ae))return!0;return!1}function ms(K,F,ae,we){const je=we[0]-ae[0],Qe=we[1]-ae[1],at=(K[0]-ae[0])*Qe-je*(K[1]-ae[1]),St=(F[0]-ae[0])*Qe-je*(F[1]-ae[1]);return at>0&&St<0||at<0&&St>0}function Kl(K,F,ae){const we=[];for(let je=0;je<K.length;je++){const Qe=[];for(let at=0;at<K[je].length;at++){const St=Di(K[je][at],ae);Nl(F,St),Qe.push(St)}we.push(Qe)}return we}function Jl(K,F,ae){const we=[];for(let je=0;je<K.length;je++){const Qe=Kl(K[je],F,ae);we.push(Qe)}return we}function Wo(K,F,ae,we){if(K[0]<ae[0]||K[0]>ae[2]){const je=.5*we;let Qe=K[0]-ae[0]>je?-we:ae[0]-K[0]>je?we:0;Qe===0&&(Qe=K[0]-ae[2]>je?-we:ae[2]-K[0]>je?we:0),K[0]+=Qe}Nl(F,K)}function pu(K,F,ae,we){const je=Math.pow(2,we.z)*Fs,Qe=[we.x*Fs,we.y*Fs],at=[];for(const St of K)for(const jt of St){const ir=[jt.x+Qe[0],jt.y+Qe[1]];Wo(ir,F,ae,je),at.push(ir)}return at}function _u(K,F,ae,we){const je=Math.pow(2,we.z)*Fs,Qe=[we.x*Fs,we.y*Fs],at=[];for(const jt of K){const ir=[];for(const Er of jt){const Ir=[Er.x+Qe[0],Er.y+Qe[1]];Nl(F,Ir),ir.push(Ir)}at.push(ir)}if(F[2]-F[0]<=je/2){(St=F)[0]=St[1]=1/0,St[2]=St[3]=-1/0;for(const jt of at)for(const ir of jt)Wo(ir,F,ae,je)}var St;return at}class Xs{constructor(F,ae){this.type=Zt,this.geojson=F,this.geometries=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'within' expression requires exactly one argument, but found ${F.length-1} instead.`);if($a(F[1])){const we=F[1];if(we.type==="FeatureCollection"){const je=[];for(const Qe of we.features){const{type:at,coordinates:St}=Qe.geometry;at==="Polygon"&&je.push(St),at==="MultiPolygon"&&je.push(...St)}if(je.length)return new Xs(we,{type:"MultiPolygon",coordinates:je})}else if(we.type==="Feature"){const je=we.geometry.type;if(je==="Polygon"||je==="MultiPolygon")return new Xs(we,we.geometry)}else if(we.type==="Polygon"||we.type==="MultiPolygon")return new Xs(we,we)}return ae.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(F){if(F.geometry()!=null&&F.canonicalID()!=null){if(F.geometryType()==="Point")return(function(ae,we){const je=[1/0,1/0,-1/0,-1/0],Qe=[1/0,1/0,-1/0,-1/0],at=ae.canonicalID();if(we.type==="Polygon"){const St=Kl(we.coordinates,Qe,at),jt=pu(ae.geometry(),je,Qe,at);if(!Vs(je,Qe))return!1;for(const ir of jt)if(!yl(ir,St))return!1}if(we.type==="MultiPolygon"){const St=Jl(we.coordinates,Qe,at),jt=pu(ae.geometry(),je,Qe,at);if(!Vs(je,Qe))return!1;for(const ir of jt)if(!Cu(ir,St))return!1}return!0})(F,this.geometries);if(F.geometryType()==="LineString")return(function(ae,we){const je=[1/0,1/0,-1/0,-1/0],Qe=[1/0,1/0,-1/0,-1/0],at=ae.canonicalID();if(we.type==="Polygon"){const St=Kl(we.coordinates,Qe,at),jt=_u(ae.geometry(),je,Qe,at);if(!Vs(je,Qe))return!1;for(const ir of jt)if(!yo(ir,St))return!1}if(we.type==="MultiPolygon"){const St=Jl(we.coordinates,Qe,at),jt=_u(ae.geometry(),je,Qe,at);if(!Vs(je,Qe))return!1;for(const ir of jt)if(!Ps(ir,St))return!1}return!0})(F,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let Pl=class{constructor(K=[],F=(ae,we)=>ae<we?-1:ae>we?1:0){if(this.data=K,this.length=this.data.length,this.compare=F,this.length>0)for(let ae=(this.length>>1)-1;ae>=0;ae--)this._down(ae)}push(K){this.data.push(K),this._up(this.length++)}pop(){if(this.length===0)return;const K=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),K}peek(){return this.data[0]}_up(K){const{data:F,compare:ae}=this,we=F[K];for(;K>0;){const je=K-1>>1,Qe=F[je];if(ae(we,Qe)>=0)break;F[K]=Qe,K=je}F[K]=we}_down(K){const{data:F,compare:ae}=this,we=this.length>>1,je=F[K];for(;K<we;){let Qe=1+(K<<1);const at=Qe+1;if(at<this.length&&ae(F[at],F[Qe])<0&&(Qe=at),ae(F[Qe],je)>=0)break;F[K]=F[Qe],K=Qe}F[K]=je}};function Gl(K,F,ae,we,je){Yl(K,F,ae,we||K.length-1,je||bf)}function Yl(K,F,ae,we,je){for(;we>ae;){if(we-ae>600){var Qe=we-ae+1,at=F-ae+1,St=Math.log(Qe),jt=.5*Math.exp(2*St/3),ir=.5*Math.sqrt(St*jt*(Qe-jt)/Qe)*(at-Qe/2<0?-1:1);Yl(K,F,Math.max(ae,Math.floor(F-at*jt/Qe+ir)),Math.min(we,Math.floor(F+(Qe-at)*jt/Qe+ir)),je)}var Er=K[F],Ir=ae,rn=we;for(tc(K,ae,F),je(K[we],Er)>0&&tc(K,ae,we);Ir<rn;){for(tc(K,Ir,rn),Ir++,rn--;je(K[Ir],Er)<0;)Ir++;for(;je(K[rn],Er)>0;)rn--}je(K[ae],Er)===0?tc(K,ae,rn):tc(K,++rn,we),rn<=F&&(ae=rn+1),F<=rn&&(we=rn-1)}}function tc(K,F,ae){var we=K[F];K[F]=K[ae],K[ae]=we}function bf(K,F){return K<F?-1:K>F?1:0}function Qc(K,F){if(K.length<=1)return[K];const ae=[];let we,je;for(const Qe of K){const at=Wh(Qe);at!==0&&(Qe.area=Math.abs(at),je===void 0&&(je=at<0),je===at<0?(we&&ae.push(we),we=[Qe]):we.push(Qe))}if(we&&ae.push(we),F>1)for(let Qe=0;Qe<ae.length;Qe++)ae[Qe].length<=F||(Gl(ae[Qe],F,1,ae[Qe].length-1,ff),ae[Qe]=ae[Qe].slice(0,F));return ae}function ff(K,F){return F.area-K.area}function Wh(K){let F=0;for(let ae,we,je=0,Qe=K.length,at=Qe-1;je<Qe;at=je++)ae=K[je],we=K[at],F+=(we.x-ae.x)*(ae.y+we.y);return F}const Dh=1/298.257223563,Ll=Dh*(2-Dh),jc=Math.PI/180;class Yh{constructor(F){const ae=6378.137*jc*1e3,we=Math.cos(F*jc),je=1/(1-Ll*(1-we*we)),Qe=Math.sqrt(je);this.kx=ae*Qe*we,this.ky=ae*Qe*je*(1-Ll)}distance(F,ae){const we=this.wrap(F[0]-ae[0])*this.kx,je=(F[1]-ae[1])*this.ky;return Math.sqrt(we*we+je*je)}pointOnLine(F,ae){let we,je,Qe,at,St=1/0;for(let jt=0;jt<F.length-1;jt++){let ir=F[jt][0],Er=F[jt][1],Ir=this.wrap(F[jt+1][0]-ir)*this.kx,rn=(F[jt+1][1]-Er)*this.ky,vn=0;Ir===0&&rn===0||(vn=(this.wrap(ae[0]-ir)*this.kx*Ir+(ae[1]-Er)*this.ky*rn)/(Ir*Ir+rn*rn),vn>1?(ir=F[jt+1][0],Er=F[jt+1][1]):vn>0&&(ir+=Ir/this.kx*vn,Er+=rn/this.ky*vn)),Ir=this.wrap(ae[0]-ir)*this.kx,rn=(ae[1]-Er)*this.ky;const Cn=Ir*Ir+rn*rn;Cn<St&&(St=Cn,we=ir,je=Er,Qe=jt,at=vn)}return{point:[we,je],index:Qe,t:Math.max(0,Math.min(1,at))}}wrap(F){for(;F<-180;)F+=360;for(;F>180;)F-=360;return F}}function hc(K,F){return F[0]-K[0]}function rc(K){return K[1]-K[0]+1}function dc(K,F){return K[1]>=K[0]&&K[1]<F}function hf(K,F){if(K[0]>K[1])return[null,null];const ae=rc(K);if(F){if(ae===2)return[K,null];const je=Math.floor(ae/2);return[[K[0],K[0]+je],[K[0]+je,K[1]]]}if(ae===1)return[K,null];const we=Math.floor(ae/2)-1;return[[K[0],K[0]+we],[K[0]+we+1,K[1]]]}function au(K,F){if(!dc(F,K.length))return[1/0,1/0,-1/0,-1/0];const ae=[1/0,1/0,-1/0,-1/0];for(let we=F[0];we<=F[1];++we)Nl(ae,K[we]);return ae}function nc(K){const F=[1/0,1/0,-1/0,-1/0];for(const ae of K)for(const we of ae)Nl(F,we);return F}function Js(K){return K[0]!==-1/0&&K[1]!==-1/0&&K[2]!==1/0&&K[3]!==1/0}function Ul(K,F,ae){if(!Js(K)||!Js(F))return NaN;let we=0,je=0;return K[2]<F[0]&&(we=F[0]-K[2]),K[0]>F[2]&&(we=K[0]-F[2]),K[1]>F[3]&&(je=K[1]-F[3]),K[3]<F[1]&&(je=F[1]-K[3]),ae.distance([0,0],[we,je])}function Df(K,F,ae){const we=ae.pointOnLine(F,K);return ae.distance(K,we.point)}function Cc(K,F,ae,we,je){const Qe=Math.min(Df(K,[ae,we],je),Df(F,[ae,we],je)),at=Math.min(Df(ae,[K,F],je),Df(we,[K,F],je));return Math.min(Qe,at)}function Wf(K,F,ae,we,je){if(!dc(F,K.length)||!dc(we,ae.length))return 1/0;let Qe=1/0;for(let at=F[0];at<F[1];++at){const St=K[at],jt=K[at+1];for(let ir=we[0];ir<we[1];++ir){const Er=ae[ir],Ir=ae[ir+1];if(jl(St,jt,Er,Ir))return 0;Qe=Math.min(Qe,Cc(St,jt,Er,Ir,je))}}return Qe}function mu(K,F,ae,we,je){if(!dc(F,K.length)||!dc(we,ae.length))return NaN;let Qe=1/0;for(let at=F[0];at<=F[1];++at)for(let St=we[0];St<=we[1];++St)if(Qe=Math.min(Qe,je.distance(K[at],ae[St])),Qe===0)return Qe;return Qe}function Vd(K,F,ae){if(yl(K,F,!0))return 0;let we=1/0;for(const je of F){const Qe=je[0],at=je[je.length-1];if(Qe!==at&&(we=Math.min(we,Df(K,[at,Qe],ae)),we===0))return we;const St=ae.pointOnLine(je,K);if(we=Math.min(we,ae.distance(K,St.point)),we===0)return we}return we}function Ws(K,F,ae,we){if(!dc(F,K.length))return NaN;for(let Qe=F[0];Qe<=F[1];++Qe)if(yl(K[Qe],ae,!0))return 0;let je=1/0;for(let Qe=F[0];Qe<F[1];++Qe){const at=K[Qe],St=K[Qe+1];for(const jt of ae)for(let ir=0,Er=jt.length,Ir=Er-1;ir<Er;Ir=ir++){const rn=jt[Ir],vn=jt[ir];if(jl(at,St,rn,vn))return 0;je=Math.min(je,Cc(at,St,rn,vn,we))}}return je}function cv(K,F){for(const ae of K)for(const we of ae)if(yl(we,F,!0))return!0;return!1}function Tl(K,F,ae,we=1/0){const je=nc(K),Qe=nc(F);if(we!==1/0&&Ul(je,Qe,ae)>=we)return we;if(Vs(je,Qe)){if(cv(K,F))return 0}else if(cv(F,K))return 0;let at=1/0;for(const St of K)for(let jt=0,ir=St.length,Er=ir-1;jt<ir;Er=jt++){const Ir=St[Er],rn=St[jt];for(const vn of F)for(let Cn=0,Bn=vn.length,Qn=Bn-1;Cn<Bn;Qn=Cn++){const Ia=vn[Qn],Mi=vn[Cn];if(jl(Ir,rn,Ia,Mi))return 0;at=Math.min(at,Cc(Ir,rn,Ia,Mi,ae))}}return at}function Zo(K,F,ae,we,je,Qe){if(!Qe)return;const at=Ul(au(we,Qe),je,ae);at<F&&K.push([at,Qe,[0,0]])}function dh(K,F,ae,we,je,Qe,at){if(!Qe||!at)return;const St=Ul(au(we,Qe),au(je,at),ae);St<F&&K.push([St,Qe,at])}function df(K,F,ae,we,je=1/0){let Qe=Math.min(we.distance(K[0],ae[0][0]),je);if(Qe===0)return Qe;const at=new Pl([[0,[0,K.length-1],[0,0]]],hc),St=nc(ae);for(;at.length>0;){const jt=at.pop();if(jt[0]>=Qe)continue;const ir=jt[1],Er=F?50:100;if(rc(ir)<=Er){if(!dc(ir,K.length))return NaN;if(F){const Ir=Ws(K,ir,ae,we);if(isNaN(Ir)||Ir===0)return Ir;Qe=Math.min(Qe,Ir)}else for(let Ir=ir[0];Ir<=ir[1];++Ir){const rn=Vd(K[Ir],ae,we);if(Qe=Math.min(Qe,rn),Qe===0)return 0}}else{const Ir=hf(ir,F);Zo(at,Qe,we,K,St,Ir[0]),Zo(at,Qe,we,K,St,Ir[1])}}return Qe}function Hu(K,F,ae,we,je,Qe=1/0){let at=Math.min(Qe,je.distance(K[0],ae[0]));if(at===0)return at;const St=new Pl([[0,[0,K.length-1],[0,ae.length-1]]],hc);for(;St.length>0;){const jt=St.pop();if(jt[0]>=at)continue;const ir=jt[1],Er=jt[2],Ir=F?50:100,rn=we?50:100;if(rc(ir)<=Ir&&rc(Er)<=rn){if(!dc(ir,K.length)&&dc(Er,ae.length))return NaN;let vn;if(F&&we)vn=Wf(K,ir,ae,Er,je),at=Math.min(at,vn);else if(F&&!we){const Cn=K.slice(ir[0],ir[1]+1);for(let Bn=Er[0];Bn<=Er[1];++Bn)if(vn=Df(ae[Bn],Cn,je),at=Math.min(at,vn),at===0)return at}else if(!F&&we){const Cn=ae.slice(Er[0],Er[1]+1);for(let Bn=ir[0];Bn<=ir[1];++Bn)if(vn=Df(K[Bn],Cn,je),at=Math.min(at,vn),at===0)return at}else vn=mu(K,ir,ae,Er,je),at=Math.min(at,vn)}else{const vn=hf(ir,F),Cn=hf(Er,we);dh(St,at,je,K,ae,vn[0],Cn[0]),dh(St,at,je,K,ae,vn[0],Cn[1]),dh(St,at,je,K,ae,vn[1],Cn[0]),dh(St,at,je,K,ae,vn[1],Cn[1])}}return at}function Zh(K){return K.type==="MultiPolygon"?K.coordinates.map(F=>({type:"Polygon",coordinates:F})):K.type==="MultiLineString"?K.coordinates.map(F=>({type:"LineString",coordinates:F})):K.type==="MultiPoint"?K.coordinates.map(F=>({type:"Point",coordinates:F})):[K]}class Yf{constructor(F,ae){this.type=ft,this.geojson=F,this.geometries=ae}static parse(F,ae){if(F.length!==2)return ae.error(`'distance' expression requires exactly one argument, but found ${F.length-1} instead.`);if($a(F[1])){const we=F[1];if(we.type==="FeatureCollection")return new Yf(we,we.features.map(je=>Zh(je.geometry)).flat());if(we.type==="Feature")return new Yf(we,Zh(we.geometry));if("type"in we&&"coordinates"in we)return new Yf(we,Zh(we))}return ae.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(F){if(F.geometry()!=null&&F.canonicalID()!=null){if(F.geometryType()==="Point")return(function(ae,we){const je=ae.geometry(),Qe=je.flat().map(jt=>_o([jt.x,jt.y],ae.canonical));if(je.length===0)return NaN;const at=new Yh(Qe[0][1]);let St=1/0;for(const jt of we){switch(jt.type){case"Point":St=Math.min(St,Hu(Qe,!1,[jt.coordinates],!1,at,St));break;case"LineString":St=Math.min(St,Hu(Qe,!1,jt.coordinates,!0,at,St));break;case"Polygon":St=Math.min(St,df(Qe,!1,jt.coordinates,at,St))}if(St===0)return St}return St})(F,this.geometries);if(F.geometryType()==="LineString")return(function(ae,we){const je=ae.geometry(),Qe=je.flat().map(jt=>_o([jt.x,jt.y],ae.canonical));if(je.length===0)return NaN;const at=new Yh(Qe[0][1]);let St=1/0;for(const jt of we){switch(jt.type){case"Point":St=Math.min(St,Hu(Qe,!0,[jt.coordinates],!1,at,St));break;case"LineString":St=Math.min(St,Hu(Qe,!0,jt.coordinates,!0,at,St));break;case"Polygon":St=Math.min(St,df(Qe,!0,jt.coordinates,at,St))}if(St===0)return St}return St})(F,this.geometries);if(F.geometryType()==="Polygon")return(function(ae,we){const je=ae.geometry();if(je.length===0||je[0].length===0)return NaN;const Qe=Qc(je,0).map(jt=>jt.map(ir=>ir.map(Er=>_o([Er.x,Er.y],ae.canonical)))),at=new Yh(Qe[0][0][0][1]);let St=1/0;for(const jt of we)for(const ir of Qe){switch(jt.type){case"Point":St=Math.min(St,df([jt.coordinates],!1,ir,at,St));break;case"LineString":St=Math.min(St,df(jt.coordinates,!0,ir,at,St));break;case"Polygon":St=Math.min(St,Tl(ir,jt.coordinates,at,St))}if(St===0)return St}return St})(F,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}const wh={"==":es,"!=":tl,">":pl,"<":Ks,">=":ls,"<=":Ss,array:Ur,at:xr,boolean:Ur,case:na,coalesce:as,collator:Lo,format:ml,image:zl,in:Wr,"index-of":An,interpolate:Ri,"interpolate-hcl":Ri,"interpolate-lab":Ri,length:Bl,let:hn,literal:Gi,match:Xn,number:Ur,"number-format":Es,object:Ur,slice:ra,step:Wn,string:Ur,"to-boolean":tn,"to-color":tn,"to-number":tn,"to-string":tn,var:Rt,within:Xs,distance:Yf};class ac{constructor(F,ae,we,je){this.name=F,this.type=ae,this._evaluate=we,this.args=je}evaluate(F){return this._evaluate(F,this.args)}eachChild(F){this.args.forEach(F)}outputDefined(){return!1}static parse(F,ae){const we=F[0],je=ac.definitions[we];if(!je)return ae.error(`Unknown expression "${we}". If you wanted a literal array, use ["literal", [...]].`,0);const Qe=Array.isArray(je)?je[0]:je.type,at=Array.isArray(je)?[[je[1],je[2]]]:je.overloads,St=at.filter(([ir])=>!Array.isArray(ir)||ir.length===F.length-1);let jt=null;for(const[ir,Er]of St){jt=new Tn(ae.registry,$h,ae.path,null,ae.scope);const Ir=[];let rn=!1;for(let vn=1;vn<F.length;vn++){const Cn=F[vn],Bn=Array.isArray(ir)?ir[vn-1]:ir.type,Qn=jt.parse(Cn,1+Ir.length,Bn);if(!Qn){rn=!0;break}Ir.push(Qn)}if(!rn)if(Array.isArray(ir)&&ir.length!==Ir.length)jt.error(`Expected ${ir.length} arguments, but found ${Ir.length} instead.`);else{for(let vn=0;vn<Ir.length;vn++){const Cn=Array.isArray(ir)?ir[vn]:ir.type,Bn=Ir[vn];jt.concat(vn+1).checkSubtype(Cn,Bn.type)}if(jt.errors.length===0)return new ac(we,Qe,Er,Ir)}}if(St.length===1)ae.errors.push(...jt.errors);else{const ir=(St.length?St:at).map(([Ir])=>{return rn=Ir,Array.isArray(rn)?`(${rn.map(ot).join(", ")})`:`(${ot(rn.type)}...)`;var rn}).join(" | "),Er=[];for(let Ir=1;Ir<F.length;Ir++){const rn=ae.parse(F[Ir],1+Er.length);if(!rn)return null;Er.push(ot(rn.type))}ae.error(`Expected arguments of type ${ir}, but found (${Er.join(", ")}) instead.`)}return null}static register(F,ae){ac.definitions=ae;for(const we in ae)F[we]=ac}}function Cd(K,[F,ae,we,je]){F=F.evaluate(K),ae=ae.evaluate(K),we=we.evaluate(K);const Qe=je?je.evaluate(K):1,at=Fa(F,ae,we,Qe);if(at)throw new qt(at);return new br(F/255,ae/255,we/255,Qe,!1)}function ad(K,F){return K in F}function Th(K,F){const ae=F[K];return ae===void 0?null:ae}function Zf(K){return{type:K}}function $h(K){if(K instanceof Rt)return $h(K.boundExpression);if(K instanceof ac&&K.name==="error"||K instanceof Lo||K instanceof Xs||K instanceof Yf)return!1;const F=K instanceof tn||K instanceof Ur;let ae=!0;return K.eachChild(we=>{ae=F?ae&&$h(we):ae&&we instanceof Gi}),!!ae&&Kh(K)&&id(K,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Kh(K){if(K instanceof ac&&(K.name==="get"&&K.args.length===1||K.name==="feature-state"||K.name==="has"&&K.args.length===1||K.name==="properties"||K.name==="geometry-type"||K.name==="id"||/^filter-/.test(K.name))||K instanceof Xs||K instanceof Yf)return!1;let F=!0;return K.eachChild(ae=>{F&&!Kh(ae)&&(F=!1)}),F}function vf(K){if(K instanceof ac&&K.name==="feature-state")return!1;let F=!0;return K.eachChild(ae=>{F&&!vf(ae)&&(F=!1)}),F}function id(K,F){if(K instanceof ac&&F.indexOf(K.name)>=0)return!1;let ae=!0;return K.eachChild(we=>{ae&&!id(we,F)&&(ae=!1)}),ae}function Of(K){return{result:"success",value:K}}function wf(K){return{result:"error",value:K}}function ic(K){return K["property-type"]==="data-driven"||K["property-type"]==="cross-faded-data-driven"}function ih(K){return!!K.expression&&K.expression.parameters.indexOf("zoom")>-1}function Jh(K){return!!K.expression&&K.expression.interpolated}function Xl(K){return K instanceof Number?"number":K instanceof String?"string":K instanceof Boolean?"boolean":Array.isArray(K)?"array":K===null?"null":typeof K}function Oh(K){return typeof K=="object"&&K!==null&&!Array.isArray(K)}function Hd(K){return K}function od(K,F){const ae=F.type==="color",we=K.stops&&typeof K.stops[0][0]=="object",je=we||!(we||K.property!==void 0),Qe=K.type||(Jh(F)?"exponential":"interval");if(ae||F.type==="padding"){const Er=ae?br.parse:Fn.parse;(K=be({},K)).stops&&(K.stops=K.stops.map(Ir=>[Ir[0],Er(Ir[1])])),K.default=Er(K.default?K.default:F.default)}if(K.colorSpace&&(at=K.colorSpace)!=="rgb"&&at!=="hcl"&&at!=="lab")throw new Error(`Unknown color space: "${K.colorSpace}"`);var at;let St,jt,ir;if(Qe==="exponential")St=ld;else if(Qe==="interval")St=Uc;else if(Qe==="categorical"){St=sd,jt=Object.create(null);for(const Er of K.stops)jt[Er[0]]=Er[1];ir=typeof K.stops[0][0]}else{if(Qe!=="identity")throw new Error(`Unknown function type "${Qe}"`);St=Su}if(we){const Er={},Ir=[];for(let Cn=0;Cn<K.stops.length;Cn++){const Bn=K.stops[Cn],Qn=Bn[0].zoom;Er[Qn]===void 0&&(Er[Qn]={zoom:Qn,type:K.type,property:K.property,default:K.default,stops:[]},Ir.push(Qn)),Er[Qn].stops.push([Bn[0].value,Bn[1]])}const rn=[];for(const Cn of Ir)rn.push([Er[Cn].zoom,od(Er[Cn],F)]);const vn={name:"linear"};return{kind:"composite",interpolationType:vn,interpolationFactor:Ri.interpolationFactor.bind(void 0,vn),zoomStops:rn.map(Cn=>Cn[0]),evaluate:({zoom:Cn},Bn)=>ld({stops:rn,base:K.base},F,Cn).evaluate(Cn,Bn)}}if(je){const Er=Qe==="exponential"?{name:"exponential",base:K.base!==void 0?K.base:1}:null;return{kind:"camera",interpolationType:Er,interpolationFactor:Ri.interpolationFactor.bind(void 0,Er),zoomStops:K.stops.map(Ir=>Ir[0]),evaluate:({zoom:Ir})=>St(K,F,Ir,jt,ir)}}return{kind:"source",evaluate(Er,Ir){const rn=Ir&&Ir.properties?Ir.properties[K.property]:void 0;return rn===void 0?Ah(K.default,F.default):St(K,F,rn,jt,ir)}}}function Ah(K,F,ae){return K!==void 0?K:F!==void 0?F:ae!==void 0?ae:void 0}function sd(K,F,ae,we,je){return Ah(typeof ae===je?we[ae]:void 0,K.default,F.default)}function Uc(K,F,ae){if(Xl(ae)!=="number")return Ah(K.default,F.default);const we=K.stops.length;if(we===1||ae<=K.stops[0][0])return K.stops[0][1];if(ae>=K.stops[we-1][0])return K.stops[we-1][1];const je=Sn(K.stops.map(Qe=>Qe[0]),ae);return K.stops[je][1]}function ld(K,F,ae){const we=K.base!==void 0?K.base:1;if(Xl(ae)!=="number")return Ah(K.default,F.default);const je=K.stops.length;if(je===1||ae<=K.stops[0][0])return K.stops[0][1];if(ae>=K.stops[je-1][0])return K.stops[je-1][1];const Qe=Sn(K.stops.map(Er=>Er[0]),ae),at=(function(Er,Ir,rn,vn){const Cn=vn-rn,Bn=Er-rn;return Cn===0?0:Ir===1?Bn/Cn:(Math.pow(Ir,Bn)-1)/(Math.pow(Ir,Cn)-1)})(ae,we,K.stops[Qe][0],K.stops[Qe+1][0]),St=K.stops[Qe][1],jt=K.stops[Qe+1][1],ir=Uo[F.type]||Hd;return typeof St.evaluate=="function"?{evaluate(...Er){const Ir=St.evaluate.apply(void 0,Er),rn=jt.evaluate.apply(void 0,Er);if(Ir!==void 0&&rn!==void 0)return ir(Ir,rn,at,K.colorSpace)}}:ir(St,jt,at,K.colorSpace)}function Su(K,F,ae){switch(F.type){case"color":ae=br.parse(ae);break;case"formatted":ae=Ln.fromString(ae.toString());break;case"resolvedImage":ae=Pa.fromString(ae.toString());break;case"padding":ae=Fn.parse(ae);break;default:Xl(ae)===F.type||F.type==="enum"&&F.values[ae]||(ae=void 0)}return Ah(ae,K.default,F.default)}ac.register(wh,{error:[{kind:"error"},[Wt],(K,[F])=>{throw new qt(F.evaluate(K))}],typeof:[Wt,[Br],(K,[F])=>ot(oa(F.evaluate(K)))],"to-rgba":[$e(ft,4),[cr],(K,[F])=>{const[ae,we,je,Qe]=F.evaluate(K).rgb;return[255*ae,255*we,255*je,Qe]}],rgb:[cr,[ft,ft,ft],Cd],rgba:[cr,[ft,ft,ft,ft],Cd],has:{type:Zt,overloads:[[[Wt],(K,[F])=>ad(F.evaluate(K),K.properties())],[[Wt,pr],(K,[F,ae])=>ad(F.evaluate(K),ae.evaluate(K))]]},get:{type:Br,overloads:[[[Wt],(K,[F])=>Th(F.evaluate(K),K.properties())],[[Wt,pr],(K,[F,ae])=>Th(F.evaluate(K),ae.evaluate(K))]]},"feature-state":[Br,[Wt],(K,[F])=>Th(F.evaluate(K),K.featureState||{})],properties:[pr,[],K=>K.properties()],"geometry-type":[Wt,[],K=>K.geometryType()],id:[Br,[],K=>K.id()],zoom:[ft,[],K=>K.globals.zoom],"heatmap-density":[ft,[],K=>K.globals.heatmapDensity||0],"line-progress":[ft,[],K=>K.globals.lineProgress||0],accumulated:[Br,[],K=>K.globals.accumulated===void 0?null:K.globals.accumulated],"+":[ft,Zf(ft),(K,F)=>{let ae=0;for(const we of F)ae+=we.evaluate(K);return ae}],"*":[ft,Zf(ft),(K,F)=>{let ae=1;for(const we of F)ae*=we.evaluate(K);return ae}],"-":{type:ft,overloads:[[[ft,ft],(K,[F,ae])=>F.evaluate(K)-ae.evaluate(K)],[[ft],(K,[F])=>-F.evaluate(K)]]},"/":[ft,[ft,ft],(K,[F,ae])=>F.evaluate(K)/ae.evaluate(K)],"%":[ft,[ft,ft],(K,[F,ae])=>F.evaluate(K)%ae.evaluate(K)],ln2:[ft,[],()=>Math.LN2],pi:[ft,[],()=>Math.PI],e:[ft,[],()=>Math.E],"^":[ft,[ft,ft],(K,[F,ae])=>Math.pow(F.evaluate(K),ae.evaluate(K))],sqrt:[ft,[ft],(K,[F])=>Math.sqrt(F.evaluate(K))],log10:[ft,[ft],(K,[F])=>Math.log(F.evaluate(K))/Math.LN10],ln:[ft,[ft],(K,[F])=>Math.log(F.evaluate(K))],log2:[ft,[ft],(K,[F])=>Math.log(F.evaluate(K))/Math.LN2],sin:[ft,[ft],(K,[F])=>Math.sin(F.evaluate(K))],cos:[ft,[ft],(K,[F])=>Math.cos(F.evaluate(K))],tan:[ft,[ft],(K,[F])=>Math.tan(F.evaluate(K))],asin:[ft,[ft],(K,[F])=>Math.asin(F.evaluate(K))],acos:[ft,[ft],(K,[F])=>Math.acos(F.evaluate(K))],atan:[ft,[ft],(K,[F])=>Math.atan(F.evaluate(K))],min:[ft,Zf(ft),(K,F)=>Math.min(...F.map(ae=>ae.evaluate(K)))],max:[ft,Zf(ft),(K,F)=>Math.max(...F.map(ae=>ae.evaluate(K)))],abs:[ft,[ft],(K,[F])=>Math.abs(F.evaluate(K))],round:[ft,[ft],(K,[F])=>{const ae=F.evaluate(K);return ae<0?-Math.round(-ae):Math.round(ae)}],floor:[ft,[ft],(K,[F])=>Math.floor(F.evaluate(K))],ceil:[ft,[ft],(K,[F])=>Math.ceil(F.evaluate(K))],"filter-==":[Zt,[Wt,Br],(K,[F,ae])=>K.properties()[F.value]===ae.value],"filter-id-==":[Zt,[Br],(K,[F])=>K.id()===F.value],"filter-type-==":[Zt,[Wt],(K,[F])=>K.geometryType()===F.value],"filter-<":[Zt,[Wt,Br],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we<je}],"filter-id-<":[Zt,[Br],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae<we}],"filter->":[Zt,[Wt,Br],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we>je}],"filter-id->":[Zt,[Br],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae>we}],"filter-<=":[Zt,[Wt,Br],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we<=je}],"filter-id-<=":[Zt,[Br],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae<=we}],"filter->=":[Zt,[Wt,Br],(K,[F,ae])=>{const we=K.properties()[F.value],je=ae.value;return typeof we==typeof je&&we>=je}],"filter-id->=":[Zt,[Br],(K,[F])=>{const ae=K.id(),we=F.value;return typeof ae==typeof we&&ae>=we}],"filter-has":[Zt,[Br],(K,[F])=>F.value in K.properties()],"filter-has-id":[Zt,[],K=>K.id()!==null&&K.id()!==void 0],"filter-type-in":[Zt,[$e(Wt)],(K,[F])=>F.value.indexOf(K.geometryType())>=0],"filter-id-in":[Zt,[$e(Br)],(K,[F])=>F.value.indexOf(K.id())>=0],"filter-in-small":[Zt,[Wt,$e(Br)],(K,[F,ae])=>ae.value.indexOf(K.properties()[F.value])>=0],"filter-in-large":[Zt,[Wt,$e(Br)],(K,[F,ae])=>(function(we,je,Qe,at){for(;Qe<=at;){const St=Qe+at>>1;if(je[St]===we)return!0;je[St]>we?at=St-1:Qe=St+1}return!1})(K.properties()[F.value],ae.value,0,ae.value.length-1)],all:{type:Zt,overloads:[[[Zt,Zt],(K,[F,ae])=>F.evaluate(K)&&ae.evaluate(K)],[Zf(Zt),(K,F)=>{for(const ae of F)if(!ae.evaluate(K))return!1;return!0}]]},any:{type:Zt,overloads:[[[Zt,Zt],(K,[F,ae])=>F.evaluate(K)||ae.evaluate(K)],[Zf(Zt),(K,F)=>{for(const ae of F)if(ae.evaluate(K))return!0;return!1}]]},"!":[Zt,[Zt],(K,[F])=>!F.evaluate(K)],"is-supported-script":[Zt,[Wt],(K,[F])=>{const ae=K.globals&&K.globals.isSupportedScript;return!ae||ae(F.evaluate(K))}],upcase:[Wt,[Wt],(K,[F])=>F.evaluate(K).toUpperCase()],downcase:[Wt,[Wt],(K,[F])=>F.evaluate(K).toLowerCase()],concat:[Wt,Zf(Br),(K,F)=>F.map(ae=>zi(ae.evaluate(K))).join("")],"resolved-locale":[Wt,[Fr],(K,[F])=>F.evaluate(K).resolvedLocale()]});class qc{constructor(F,ae){var we;this.expression=F,this._warningHistory={},this._evaluator=new en,this._defaultValue=ae?(we=ae).type==="color"&&Oh(we.default)?new br(0,0,0,0):we.type==="color"?br.parse(we.default)||null:we.type==="padding"?Fn.parse(we.default)||null:we.type==="variableAnchorOffsetCollection"?Da.parse(we.default)||null:we.default===void 0?null:we.default:null,this._enumValues=ae&&ae.type==="enum"?ae.values:null}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._evaluator.globals=F,this._evaluator.feature=ae,this._evaluator.featureState=we,this._evaluator.canonical=je,this._evaluator.availableImages=Qe||null,this._evaluator.formattedSection=at,this.expression.evaluate(this._evaluator)}evaluate(F,ae,we,je,Qe,at){this._evaluator.globals=F,this._evaluator.feature=ae||null,this._evaluator.featureState=we||null,this._evaluator.canonical=je,this._evaluator.availableImages=Qe||null,this._evaluator.formattedSection=at||null;try{const St=this.expression.evaluate(this._evaluator);if(St==null||typeof St=="number"&&St!=St)return this._defaultValue;if(this._enumValues&&!(St in this._enumValues))throw new qt(`Expected value to be one of ${Object.keys(this._enumValues).map(jt=>JSON.stringify(jt)).join(", ")}, but found ${JSON.stringify(St)} instead.`);return St}catch(St){return this._warningHistory[St.message]||(this._warningHistory[St.message]=!0,typeof console<"u"&&console.warn(St.message)),this._defaultValue}}}function $f(K){return Array.isArray(K)&&K.length>0&&typeof K[0]=="string"&&K[0]in wh}function iu(K,F){const ae=new Tn(wh,$h,[],F?(function(je){const Qe={color:cr,string:Wt,number:ft,enum:Wt,boolean:Zt,formatted:cn,padding:Nr,resolvedImage:Jr,variableAnchorOffsetCollection:Dt};return je.type==="array"?$e(Qe[je.value]||Br,je.length):Qe[je.type]})(F):void 0),we=ae.parse(K,void 0,void 0,void 0,F&&F.type==="string"?{typeAnnotation:"coerce"}:void 0);return we?Of(new qc(we,F)):wf(ae.errors)}class zf{constructor(F,ae){this.kind=F,this._styleExpression=ae,this.isStateDependent=F!=="constant"&&!vf(ae.expression)}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._styleExpression.evaluateWithoutErrorHandling(F,ae,we,je,Qe,at)}evaluate(F,ae,we,je,Qe,at){return this._styleExpression.evaluate(F,ae,we,je,Qe,at)}}class wc{constructor(F,ae,we,je){this.kind=F,this.zoomStops=we,this._styleExpression=ae,this.isStateDependent=F!=="camera"&&!vf(ae.expression),this.interpolationType=je}evaluateWithoutErrorHandling(F,ae,we,je,Qe,at){return this._styleExpression.evaluateWithoutErrorHandling(F,ae,we,je,Qe,at)}evaluate(F,ae,we,je,Qe,at){return this._styleExpression.evaluate(F,ae,we,je,Qe,at)}interpolationFactor(F,ae,we){return this.interpolationType?Ri.interpolationFactor(this.interpolationType,F,ae,we):0}}function Vc(K,F){const ae=iu(K,F);if(ae.result==="error")return ae;const we=ae.value.expression,je=Kh(we);if(!je&&!ic(F))return wf([new Ye("","data expressions not supported")]);const Qe=id(we,["zoom"]);if(!Qe&&!ih(F))return wf([new Ye("","zoom expressions not supported")]);const at=vh(we);return at||Qe?at instanceof Ye?wf([at]):at instanceof Ri&&!Jh(F)?wf([new Ye("",'"interpolate" expressions cannot be used with this property')]):Of(at?new wc(je?"camera":"composite",ae.value,at.labels,at instanceof Ri?at.interpolation:void 0):new zf(je?"constant":"source",ae.value)):wf([new Ye("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yu{constructor(F,ae){this._parameters=F,this._specification=ae,be(this,od(this._parameters,this._specification))}static deserialize(F){return new yu(F._parameters,F._specification)}static serialize(F){return{_parameters:F._parameters,_specification:F._specification}}}function vh(K){let F=null;if(K instanceof hn)F=vh(K.result);else if(K instanceof as){for(const ae of K.args)if(F=vh(ae),F)break}else(K instanceof Wn||K instanceof Ri)&&K.input instanceof ac&&K.input.name==="zoom"&&(F=K);return F instanceof Ye||K.eachChild(ae=>{const we=vh(ae);we instanceof Ye?F=we:!F&&we?F=new Ye("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):F&&we&&F!==we&&(F=new Ye("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),F}function Tf(K){if(K===!0||K===!1)return!0;if(!Array.isArray(K)||K.length===0)return!1;switch(K[0]){case"has":return K.length>=2&&K[1]!=="$id"&&K[1]!=="$type";case"in":return K.length>=3&&(typeof K[1]!="string"||Array.isArray(K[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return K.length!==3||Array.isArray(K[1])||Array.isArray(K[2]);case"any":case"all":for(const F of K.slice(1))if(!Tf(F)&&typeof F!="boolean")return!1;return!0;default:return!0}}const Kf={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function zh(K){if(K==null)return{filter:()=>!0,needGeometry:!1};Tf(K)||(K=ph(K));const F=iu(K,Kf);if(F.result==="error")throw new Error(F.value.map(ae=>`${ae.key}: ${ae.message}`).join(", "));return{filter:(ae,we,je)=>F.value.evaluate(ae,we,{},je),needGeometry:Tv(K)}}function Gd(K,F){return K<F?-1:K>F?1:0}function Tv(K){if(!Array.isArray(K))return!1;if(K[0]==="within"||K[0]==="distance")return!0;for(let F=1;F<K.length;F++)if(Tv(K[F]))return!0;return!1}function ph(K){if(!K)return!0;const F=K[0];return K.length<=1?F!=="any":F==="=="?Nh(K[1],K[2],"=="):F==="!="?vc(Nh(K[1],K[2],"==")):F==="<"||F===">"||F==="<="||F===">="?Nh(K[1],K[2],F):F==="any"?(ae=K.slice(1),["any"].concat(ae.map(ph))):F==="all"?["all"].concat(K.slice(1).map(ph)):F==="none"?["all"].concat(K.slice(1).map(ph).map(vc)):F==="in"?ef(K[1],K.slice(2)):F==="!in"?vc(ef(K[1],K.slice(2))):F==="has"?Fh(K[1]):F!=="!has"||vc(Fh(K[1]));var ae}function Nh(K,F,ae){switch(K){case"$type":return[`filter-type-${ae}`,F];case"$id":return[`filter-id-${ae}`,F];default:return[`filter-${ae}`,K,F]}}function ef(K,F){if(F.length===0)return!1;switch(K){case"$type":return["filter-type-in",["literal",F]];case"$id":return["filter-id-in",["literal",F]];default:return F.length>200&&!F.some(ae=>typeof ae!=typeof F[0])?["filter-in-large",K,["literal",F.sort(Gd)]]:["filter-in-small",K,["literal",F]]}}function Fh(K){switch(K){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",K]}}function vc(K){return["!",K]}function mh(K){const F=typeof K;if(F==="number"||F==="boolean"||F==="string"||K==null)return JSON.stringify(K);if(Array.isArray(K)){let je="[";for(const Qe of K)je+=`${mh(Qe)},`;return`${je}]`}const ae=Object.keys(K).sort();let we="{";for(let je=0;je<ae.length;je++)we+=`${JSON.stringify(ae[je])}:${mh(K[ae[je]])},`;return`${we}}`}function ud(K){let F="";for(const ae of _e)F+=`/${mh(K[ae])}`;return F}function yh(K){const F=K.value;return F?[new Pe(K.key,F,"constants have been deprecated as of v8")]:[]}function uu(K){return K instanceof Number||K instanceof String||K instanceof Boolean?K.valueOf():K}function Hc(K){if(Array.isArray(K))return K.map(Hc);if(K instanceof Object&&!(K instanceof Number||K instanceof String||K instanceof Boolean)){const F={};for(const ae in K)F[ae]=Hc(K[ae]);return F}return uu(K)}function pf(K){const F=K.key,ae=K.value,we=K.valueSpec||{},je=K.objectElementValidators||{},Qe=K.style,at=K.styleSpec,St=K.validateSpec;let jt=[];const ir=Xl(ae);if(ir!=="object")return[new Pe(F,ae,`object expected, ${ir} found`)];for(const Er in ae){const Ir=Er.split(".")[0],rn=we[Ir]||we["*"];let vn;if(je[Ir])vn=je[Ir];else if(we[Ir])vn=St;else if(je["*"])vn=je["*"];else{if(!we["*"]){jt.push(new Pe(F,ae[Er],`unknown property "${Er}"`));continue}vn=St}jt=jt.concat(vn({key:(F&&`${F}.`)+Er,value:ae[Er],valueSpec:rn,style:Qe,styleSpec:at,object:ae,objectKey:Er,validateSpec:St},ae))}for(const Er in we)je[Er]||we[Er].required&&we[Er].default===void 0&&ae[Er]===void 0&&jt.push(new Pe(F,ae,`missing required property "${Er}"`));return jt}function Qh(K){const F=K.value,ae=K.valueSpec,we=K.style,je=K.styleSpec,Qe=K.key,at=K.arrayElementValidator||K.validateSpec;if(Xl(F)!=="array")return[new Pe(Qe,F,`array expected, ${Xl(F)} found`)];if(ae.length&&F.length!==ae.length)return[new Pe(Qe,F,`array length ${ae.length} expected, length ${F.length} found`)];if(ae["min-length"]&&F.length<ae["min-length"])return[new Pe(Qe,F,`array length at least ${ae["min-length"]} expected, length ${F.length} found`)];let St={type:ae.value,values:ae.values};je.$version<7&&(St.function=ae.function),Xl(ae.value)==="object"&&(St=ae.value);let jt=[];for(let ir=0;ir<F.length;ir++)jt=jt.concat(at({array:F,arrayIndex:ir,value:F[ir],valueSpec:St,validateSpec:K.validateSpec,style:we,styleSpec:je,key:`${Qe}[${ir}]`}));return jt}function du(K){const F=K.key,ae=K.value,we=K.valueSpec;let je=Xl(ae);return je==="number"&&ae!=ae&&(je="NaN"),je!=="number"?[new Pe(F,ae,`number expected, ${je} found`)]:"minimum"in we&&ae<we.minimum?[new Pe(F,ae,`${ae} is less than the minimum value ${we.minimum}`)]:"maximum"in we&&ae>we.maximum?[new Pe(F,ae,`${ae} is greater than the maximum value ${we.maximum}`)]:[]}function Sh(K){const F=K.valueSpec,ae=uu(K.value.type);let we,je,Qe,at={};const St=ae!=="categorical"&&K.value.property===void 0,jt=!St,ir=Xl(K.value.stops)==="array"&&Xl(K.value.stops[0])==="array"&&Xl(K.value.stops[0][0])==="object",Er=pf({key:K.key,value:K.value,valueSpec:K.styleSpec.function,validateSpec:K.validateSpec,style:K.style,styleSpec:K.styleSpec,objectElementValidators:{stops:function(vn){if(ae==="identity")return[new Pe(vn.key,vn.value,'identity function may not have a "stops" property')];let Cn=[];const Bn=vn.value;return Cn=Cn.concat(Qh({key:vn.key,value:Bn,valueSpec:vn.valueSpec,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec,arrayElementValidator:Ir})),Xl(Bn)==="array"&&Bn.length===0&&Cn.push(new Pe(vn.key,Bn,"array must have at least one stop")),Cn},default:function(vn){return vn.validateSpec({key:vn.key,value:vn.value,valueSpec:F,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec})}}});return ae==="identity"&&St&&Er.push(new Pe(K.key,K.value,'missing required property "property"')),ae==="identity"||K.value.stops||Er.push(new Pe(K.key,K.value,'missing required property "stops"')),ae==="exponential"&&K.valueSpec.expression&&!Jh(K.valueSpec)&&Er.push(new Pe(K.key,K.value,"exponential functions not supported")),K.styleSpec.$version>=8&&(jt&&!ic(K.valueSpec)?Er.push(new Pe(K.key,K.value,"property functions not supported")):St&&!ih(K.valueSpec)&&Er.push(new Pe(K.key,K.value,"zoom functions not supported"))),ae!=="categorical"&&!ir||K.value.property!==void 0||Er.push(new Pe(K.key,K.value,'"property" property is required')),Er;function Ir(vn){let Cn=[];const Bn=vn.value,Qn=vn.key;if(Xl(Bn)!=="array")return[new Pe(Qn,Bn,`array expected, ${Xl(Bn)} found`)];if(Bn.length!==2)return[new Pe(Qn,Bn,`array length 2 expected, length ${Bn.length} found`)];if(ir){if(Xl(Bn[0])!=="object")return[new Pe(Qn,Bn,`object expected, ${Xl(Bn[0])} found`)];if(Bn[0].zoom===void 0)return[new Pe(Qn,Bn,"object stop key must have zoom")];if(Bn[0].value===void 0)return[new Pe(Qn,Bn,"object stop key must have value")];if(Qe&&Qe>uu(Bn[0].zoom))return[new Pe(Qn,Bn[0].zoom,"stop zoom values must appear in ascending order")];uu(Bn[0].zoom)!==Qe&&(Qe=uu(Bn[0].zoom),je=void 0,at={}),Cn=Cn.concat(pf({key:`${Qn}[0]`,value:Bn[0],valueSpec:{zoom:{}},validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec,objectElementValidators:{zoom:du,value:rn}}))}else Cn=Cn.concat(rn({key:`${Qn}[0]`,value:Bn[0],validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec},Bn));return $f(Hc(Bn[1]))?Cn.concat([new Pe(`${Qn}[1]`,Bn[1],"expressions are not allowed in function stops.")]):Cn.concat(vn.validateSpec({key:`${Qn}[1]`,value:Bn[1],valueSpec:F,validateSpec:vn.validateSpec,style:vn.style,styleSpec:vn.styleSpec}))}function rn(vn,Cn){const Bn=Xl(vn.value),Qn=uu(vn.value),Ia=vn.value!==null?vn.value:Cn;if(we){if(Bn!==we)return[new Pe(vn.key,Ia,`${Bn} stop domain type must match previous stop domain type ${we}`)]}else we=Bn;if(Bn!=="number"&&Bn!=="string"&&Bn!=="boolean")return[new Pe(vn.key,Ia,"stop domain value must be a number, string, or boolean")];if(Bn!=="number"&&ae!=="categorical"){let Mi=`number expected, ${Bn} found`;return ic(F)&&ae===void 0&&(Mi+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Pe(vn.key,Ia,Mi)]}return ae!=="categorical"||Bn!=="number"||isFinite(Qn)&&Math.floor(Qn)===Qn?ae!=="categorical"&&Bn==="number"&&je!==void 0&&Qn<je?[new Pe(vn.key,Ia,"stop domain values must appear in ascending order")]:(je=Qn,ae==="categorical"&&Qn in at?[new Pe(vn.key,Ia,"stop domain values must be unique")]:(at[Qn]=!0,[])):[new Pe(vn.key,Ia,`integer expected, found ${Qn}`)]}}function Jf(K){const F=(K.expressionContext==="property"?Vc:iu)(Hc(K.value),K.valueSpec);if(F.result==="error")return F.value.map(we=>new Pe(`${K.key}${we.key}`,K.value,we.message));const ae=F.value.expression||F.value._styleExpression.expression;if(K.expressionContext==="property"&&K.propertyKey==="text-font"&&!ae.outputDefined())return[new Pe(K.key,K.value,`Invalid data expression for "${K.propertyKey}". Output values must be contained as literals within the expression.`)];if(K.expressionContext==="property"&&K.propertyType==="layout"&&!vf(ae))return[new Pe(K.key,K.value,'"feature-state" data expressions are not supported with layout properties.')];if(K.expressionContext==="filter"&&!vf(ae))return[new Pe(K.key,K.value,'"feature-state" data expressions are not supported with filters.')];if(K.expressionContext&&K.expressionContext.indexOf("cluster")===0){if(!id(ae,["zoom","feature-state"]))return[new Pe(K.key,K.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(K.expressionContext==="cluster-initial"&&!Kh(ae))return[new Pe(K.key,K.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function tf(K){const F=K.key,ae=K.value,we=K.valueSpec,je=[];return Array.isArray(we.values)?we.values.indexOf(uu(ae))===-1&&je.push(new Pe(F,ae,`expected one of [${we.values.join(", ")}], ${JSON.stringify(ae)} found`)):Object.keys(we.values).indexOf(uu(ae))===-1&&je.push(new Pe(F,ae,`expected one of [${Object.keys(we.values).join(", ")}], ${JSON.stringify(ae)} found`)),je}function Eh(K){return Tf(Hc(K.value))?Jf(be({},K,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Af(K)}function Af(K){const F=K.value,ae=K.key;if(Xl(F)!=="array")return[new Pe(ae,F,`array expected, ${Xl(F)} found`)];const we=K.styleSpec;let je,Qe=[];if(F.length<1)return[new Pe(ae,F,"filter array must have at least 1 element")];switch(Qe=Qe.concat(tf({key:`${ae}[0]`,value:F[0],valueSpec:we.filter_operator,style:K.style,styleSpec:K.styleSpec})),uu(F[0])){case"<":case"<=":case">":case">=":F.length>=2&&uu(F[1])==="$type"&&Qe.push(new Pe(ae,F,`"$type" cannot be use with operator "${F[0]}"`));case"==":case"!=":F.length!==3&&Qe.push(new Pe(ae,F,`filter array for operator "${F[0]}" must have 3 elements`));case"in":case"!in":F.length>=2&&(je=Xl(F[1]),je!=="string"&&Qe.push(new Pe(`${ae}[1]`,F[1],`string expected, ${je} found`)));for(let at=2;at<F.length;at++)je=Xl(F[at]),uu(F[1])==="$type"?Qe=Qe.concat(tf({key:`${ae}[${at}]`,value:F[at],valueSpec:we.geometry_type,style:K.style,styleSpec:K.styleSpec})):je!=="string"&&je!=="number"&&je!=="boolean"&&Qe.push(new Pe(`${ae}[${at}]`,F[at],`string, number, or boolean expected, ${je} found`));break;case"any":case"all":case"none":for(let at=1;at<F.length;at++)Qe=Qe.concat(Af({key:`${ae}[${at}]`,value:F[at],style:K.style,styleSpec:K.styleSpec}));break;case"has":case"!has":je=Xl(F[1]),F.length!==2?Qe.push(new Pe(ae,F,`filter array for "${F[0]}" operator must have 2 elements`)):je!=="string"&&Qe.push(new Pe(`${ae}[1]`,F[1],`string expected, ${je} found`))}return Qe}function Mh(K,F){const ae=K.key,we=K.validateSpec,je=K.style,Qe=K.styleSpec,at=K.value,St=K.objectKey,jt=Qe[`${F}_${K.layerType}`];if(!jt)return[];const ir=St.match(/^(.*)-transition$/);if(F==="paint"&&ir&&jt[ir[1]]&&jt[ir[1]].transition)return we({key:ae,value:at,valueSpec:Qe.transition,style:je,styleSpec:Qe});const Er=K.valueSpec||jt[St];if(!Er)return[new Pe(ae,at,`unknown property "${St}"`)];let Ir;if(Xl(at)==="string"&&ic(Er)&&!Er.tokens&&(Ir=/^{([^}]+)}$/.exec(at)))return[new Pe(ae,at,`"${St}" does not support interpolation syntax
Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(Ir[1])} }\`.`)];const rn=[];return K.layerType==="symbol"&&(St==="text-field"&&je&&!je.glyphs&&rn.push(new Pe(ae,at,'use of "text-field" requires a style "glyphs" property')),St==="text-font"&&Oh(Hc(at))&&uu(at.type)==="identity"&&rn.push(new Pe(ae,at,'"text-font" does not support identity functions'))),rn.concat(we({key:K.key,value:at,valueSpec:Er,style:je,styleSpec:Qe,expressionContext:"property",propertyType:F,propertyKey:St}))}function Xd(K){return Mh(K,"paint")}function yc(K){return Mh(K,"layout")}function cd(K){let F=[];const ae=K.value,we=K.key,je=K.style,Qe=K.styleSpec;ae.type||ae.ref||F.push(new Pe(we,ae,'either "type" or "ref" is required'));let at=uu(ae.type);const St=uu(ae.ref);if(ae.id){const jt=uu(ae.id);for(let ir=0;ir<K.arrayIndex;ir++){const Er=je.layers[ir];uu(Er.id)===jt&&F.push(new Pe(we,ae.id,`duplicate layer id "${ae.id}", previously used at line ${Er.id.__line__}`))}}if("ref"in ae){let jt;["type","source","source-layer","filter","layout"].forEach(ir=>{ir in ae&&F.push(new Pe(we,ae[ir],`"${ir}" is prohibited for ref layers`))}),je.layers.forEach(ir=>{uu(ir.id)===St&&(jt=ir)}),jt?jt.ref?F.push(new Pe(we,ae.ref,"ref cannot reference another ref layer")):at=uu(jt.type):F.push(new Pe(we,ae.ref,`ref layer "${St}" not found`))}else if(at!=="background")if(ae.source){const jt=je.sources&&je.sources[ae.source],ir=jt&&uu(jt.type);jt?ir==="vector"&&at==="raster"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a raster source`)):ir!=="raster-dem"&&at==="hillshade"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a raster-dem source`)):ir==="raster"&&at!=="raster"?F.push(new Pe(we,ae.source,`layer "${ae.id}" requires a vector source`)):ir!=="vector"||ae["source-layer"]?ir==="raster-dem"&&at!=="hillshade"?F.push(new Pe(we,ae.source,"raster-dem source can only be used with layer type 'hillshade'.")):at!=="line"||!ae.paint||!ae.paint["line-gradient"]||ir==="geojson"&&jt.lineMetrics||F.push(new Pe(we,ae,`layer "${ae.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):F.push(new Pe(we,ae,`layer "${ae.id}" must specify a "source-layer"`)):F.push(new Pe(we,ae.source,`source "${ae.source}" not found`))}else F.push(new Pe(we,ae,'missing required property "source"'));return F=F.concat(pf({key:we,value:ae,valueSpec:Qe.layer,style:K.style,styleSpec:K.styleSpec,validateSpec:K.validateSpec,objectElementValidators:{"*":()=>[],type:()=>K.validateSpec({key:`${we}.type`,value:ae.type,valueSpec:Qe.layer.type,style:K.style,styleSpec:K.styleSpec,validateSpec:K.validateSpec,object:ae,objectKey:"type"}),filter:Eh,layout:jt=>pf({layer:ae,key:jt.key,value:jt.value,style:jt.style,styleSpec:jt.styleSpec,validateSpec:jt.validateSpec,objectElementValidators:{"*":ir=>yc(be({layerType:at},ir))}}),paint:jt=>pf({layer:ae,key:jt.key,value:jt.value,style:jt.style,styleSpec:jt.styleSpec,validateSpec:jt.validateSpec,objectElementValidators:{"*":ir=>Xd(be({layerType:at},ir))}})}})),F}function rf(K){const F=K.value,ae=K.key,we=Xl(F);return we!=="string"?[new Pe(ae,F,`string expected, ${we} found`)]:[]}const Nf={promoteId:function({key:K,value:F}){if(Xl(F)==="string")return rf({key:K,value:F});{const ae=[];for(const we in F)ae.push(...rf({key:`${K}.${we}`,value:F[we]}));return ae}}};function Sf(K){const F=K.value,ae=K.key,we=K.styleSpec,je=K.style,Qe=K.validateSpec;if(!F.type)return[new Pe(ae,F,'"type" is required')];const at=uu(F.type);let St;switch(at){case"vector":case"raster":return St=pf({key:ae,value:F,valueSpec:we[`source_${at.replace("-","_")}`],style:K.style,styleSpec:we,objectElementValidators:Nf,validateSpec:Qe}),St;case"raster-dem":return St=(function(jt){var ir;const Er=(ir=jt.sourceName)!==null&&ir!==void 0?ir:"",Ir=jt.value,rn=jt.styleSpec,vn=rn.source_raster_dem,Cn=jt.style;let Bn=[];const Qn=Xl(Ir);if(Ir===void 0)return Bn;if(Qn!=="object")return Bn.push(new Pe("source_raster_dem",Ir,`object expected, ${Qn} found`)),Bn;const Ia=uu(Ir.encoding)==="custom",Mi=["redFactor","greenFactor","blueFactor","baseShift"],ii=jt.value.encoding?`"${jt.value.encoding}"`:"Default";for(const bi in Ir)!Ia&&Mi.includes(bi)?Bn.push(new Pe(bi,Ir[bi],`In "${Er}": "${bi}" is only valid when "encoding" is set to "custom". ${ii} encoding found`)):vn[bi]?Bn=Bn.concat(jt.validateSpec({key:bi,value:Ir[bi],valueSpec:vn[bi],validateSpec:jt.validateSpec,style:Cn,styleSpec:rn})):Bn.push(new Pe(bi,Ir[bi],`unknown property "${bi}"`));return Bn})({sourceName:ae,value:F,style:K.style,styleSpec:we,validateSpec:Qe}),St;case"geojson":if(St=pf({key:ae,value:F,valueSpec:we.source_geojson,style:je,styleSpec:we,validateSpec:Qe,objectElementValidators:Nf}),F.cluster)for(const jt in F.clusterProperties){const[ir,Er]=F.clusterProperties[jt],Ir=typeof ir=="string"?[ir,["accumulated"],["get",jt]]:ir;St.push(...Jf({key:`${ae}.${jt}.map`,value:Er,expressionContext:"cluster-map"})),St.push(...Jf({key:`${ae}.${jt}.reduce`,value:Ir,expressionContext:"cluster-reduce"}))}return St;case"video":return pf({key:ae,value:F,valueSpec:we.source_video,style:je,validateSpec:Qe,styleSpec:we});case"image":return pf({key:ae,value:F,valueSpec:we.source_image,style:je,validateSpec:Qe,styleSpec:we});case"canvas":return[new Pe(ae,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return tf({key:`${ae}.type`,value:F.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function ku(K){const F=K.value,ae=K.styleSpec,we=ae.light,je=K.style;let Qe=[];const at=Xl(F);if(F===void 0)return Qe;if(at!=="object")return Qe=Qe.concat([new Pe("light",F,`object expected, ${at} found`)]),Qe;for(const St in F){const jt=St.match(/^(.*)-transition$/);Qe=Qe.concat(jt&&we[jt[1]]&&we[jt[1]].transition?K.validateSpec({key:St,value:F[St],valueSpec:ae.transition,validateSpec:K.validateSpec,style:je,styleSpec:ae}):we[St]?K.validateSpec({key:St,value:F[St],valueSpec:we[St],validateSpec:K.validateSpec,style:je,styleSpec:ae}):[new Pe(St,F[St],`unknown property "${St}"`)])}return Qe}function kc(K){const F=K.value,ae=K.styleSpec,we=ae.sky,je=K.style,Qe=Xl(F);if(F===void 0)return[];if(Qe!=="object")return[new Pe("sky",F,`object expected, ${Qe} found`)];let at=[];for(const St in F)at=at.concat(we[St]?K.validateSpec({key:St,value:F[St],valueSpec:we[St],style:je,styleSpec:ae}):[new Pe(St,F[St],`unknown property "${St}"`)]);return at}function xu(K){const F=K.value,ae=K.styleSpec,we=ae.terrain,je=K.style;let Qe=[];const at=Xl(F);if(F===void 0)return Qe;if(at!=="object")return Qe=Qe.concat([new Pe("terrain",F,`object expected, ${at} found`)]),Qe;for(const St in F)Qe=Qe.concat(we[St]?K.validateSpec({key:St,value:F[St],valueSpec:we[St],validateSpec:K.validateSpec,style:je,styleSpec:ae}):[new Pe(St,F[St],`unknown property "${St}"`)]);return Qe}function Qf(K){let F=[];const ae=K.value,we=K.key;if(Array.isArray(ae)){const je=[],Qe=[];for(const at in ae)ae[at].id&&je.includes(ae[at].id)&&F.push(new Pe(we,ae,`all the sprites' ids must be unique, but ${ae[at].id} is duplicated`)),je.push(ae[at].id),ae[at].url&&Qe.includes(ae[at].url)&&F.push(new Pe(we,ae,`all the sprites' URLs must be unique, but ${ae[at].url} is duplicated`)),Qe.push(ae[at].url),F=F.concat(pf({key:`${we}[${at}]`,value:ae[at],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:K.validateSpec}));return F}return rf({key:we,value:ae})}const Ef={"*":()=>[],array:Qh,boolean:function(K){const F=K.value,ae=K.key,we=Xl(F);return we!=="boolean"?[new Pe(ae,F,`boolean expected, ${we} found`)]:[]},number:du,color:function(K){const F=K.key,ae=K.value,we=Xl(ae);return we!=="string"?[new Pe(F,ae,`color expected, ${we} found`)]:br.parse(String(ae))?[]:[new Pe(F,ae,`color expected, "${ae}" found`)]},constants:yh,enum:tf,filter:Eh,function:Sh,layer:cd,object:pf,source:Sf,light:ku,sky:kc,terrain:xu,projection:function(K){const F=K.value,ae=K.styleSpec,we=ae.projection,je=K.style,Qe=Xl(F);if(F===void 0)return[];if(Qe!=="object")return[new Pe("projection",F,`object expected, ${Qe} found`)];let at=[];for(const St in F)at=at.concat(we[St]?K.validateSpec({key:St,value:F[St],valueSpec:we[St],style:je,styleSpec:ae}):[new Pe(St,F[St],`unknown property "${St}"`)]);return at},string:rf,formatted:function(K){return rf(K).length===0?[]:Jf(K)},resolvedImage:function(K){return rf(K).length===0?[]:Jf(K)},padding:function(K){const F=K.key,ae=K.value;if(Xl(ae)==="array"){if(ae.length<1||ae.length>4)return[new Pe(F,ae,`padding requires 1 to 4 values; ${ae.length} values found`)];const we={type:"number"};let je=[];for(let Qe=0;Qe<ae.length;Qe++)je=je.concat(K.validateSpec({key:`${F}[${Qe}]`,value:ae[Qe],validateSpec:K.validateSpec,valueSpec:we}));return je}return du({key:F,value:ae,valueSpec:{}})},variableAnchorOffsetCollection:function(K){const F=K.key,ae=K.value,we=Xl(ae),je=K.styleSpec;if(we!=="array"||ae.length<1||ae.length%2!=0)return[new Pe(F,ae,"variableAnchorOffsetCollection requires a non-empty array of even length")];let Qe=[];for(let at=0;at<ae.length;at+=2)Qe=Qe.concat(tf({key:`${F}[${at}]`,value:ae[at],valueSpec:je.layout_symbol["text-anchor"]})),Qe=Qe.concat(Qh({key:`${F}[${at+1}]`,value:ae[at+1],valueSpec:{length:2,value:"number"},validateSpec:K.validateSpec,style:K.style,styleSpec:je}));return Qe},sprite:Qf};function ed(K){const F=K.value,ae=K.valueSpec,we=K.styleSpec;return K.validateSpec=ed,ae.expression&&Oh(uu(F))?Sh(K):ae.expression&&$f(Hc(F))?Jf(K):ae.type&&Ef[ae.type]?Ef[ae.type](K):pf(be({},K,{valueSpec:ae.type?we[ae.type]:ae}))}function wr(K){const F=K.value,ae=K.key,we=rf(K);return we.length||(F.indexOf("{fontstack}")===-1&&we.push(new Pe(ae,F,'"glyphs" url must include a "{fontstack}" token')),F.indexOf("{range}")===-1&&we.push(new Pe(ae,F,'"glyphs" url must include a "{range}" token'))),we}function Hr(K,F=ue){let ae=[];return ae=ae.concat(ed({key:"",value:K,valueSpec:F.$root,styleSpec:F,style:K,validateSpec:ed,objectElementValidators:{glyphs:wr,"*":()=>[]}})),K.constants&&(ae=ae.concat(yh({key:"constants",value:K.constants}))),_n(ae)}function kn(K){return function(F){return K(sr(gr({},F),{validateSpec:ed}))}}function _n(K){return[].concat(K).sort((F,ae)=>F.line-ae.line)}function $n(K){return function(...F){return _n(K.apply(this,F))}}Hr.source=$n(kn(Sf)),Hr.sprite=$n(kn(Qf)),Hr.glyphs=$n(kn(wr)),Hr.light=$n(kn(ku)),Hr.sky=$n(kn(kc)),Hr.terrain=$n(kn(xu)),Hr.layer=$n(kn(cd)),Hr.filter=$n(kn(Eh)),Hr.paintProperty=$n(kn(Xd)),Hr.layoutProperty=$n(kn(yc));const Ga=Hr,Ba=Ga.light,wi=Ga.sky,ki=Ga.paintProperty,to=Ga.layoutProperty;function ci(K,F){let ae=!1;if(F&&F.length)for(const we of F)K.fire(new Y(new Error(we.message))),ae=!0;return ae}class qi{constructor(F,ae,we){const je=this.cells=[];if(F instanceof ArrayBuffer){this.arrayBuffer=F;const at=new Int32Array(this.arrayBuffer);F=at[0],this.d=(ae=at[1])+2*(we=at[2]);for(let jt=0;jt<this.d*this.d;jt++){const ir=at[3+jt],Er=at[3+jt+1];je.push(ir===Er?null:at.subarray(ir,Er))}const St=at[3+je.length+1];this.keys=at.subarray(at[3+je.length],St),this.bboxes=at.subarray(St),this.insert=this._insertReadonly}else{this.d=ae+2*we;for(let at=0;at<this.d*this.d;at++)je.push([]);this.keys=[],this.bboxes=[]}this.n=ae,this.extent=F,this.padding=we,this.scale=ae/F,this.uid=0;const Qe=we/ae*F;this.min=-Qe,this.max=F+Qe}insert(F,ae,we,je,Qe){this._forEachCell(ae,we,je,Qe,this._insertCell,this.uid++,void 0,void 0),this.keys.push(F),this.bboxes.push(ae),this.bboxes.push(we),this.bboxes.push(je),this.bboxes.push(Qe)}_insertReadonly(){throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.")}_insertCell(F,ae,we,je,Qe,at){this.cells[Qe].push(at)}query(F,ae,we,je,Qe){const at=this.min,St=this.max;if(F<=at&&ae<=at&&St<=we&&St<=je&&!Qe)return Array.prototype.slice.call(this.keys);{const jt=[];return this._forEachCell(F,ae,we,je,this._queryCell,jt,{},Qe),jt}}_queryCell(F,ae,we,je,Qe,at,St,jt){const ir=this.cells[Qe];if(ir!==null){const Er=this.keys,Ir=this.bboxes;for(let rn=0;rn<ir.length;rn++){const vn=ir[rn];if(St[vn]===void 0){const Cn=4*vn;(jt?jt(Ir[Cn+0],Ir[Cn+1],Ir[Cn+2],Ir[Cn+3]):F<=Ir[Cn+2]&&ae<=Ir[Cn+3]&&we>=Ir[Cn+0]&&je>=Ir[Cn+1])?(St[vn]=!0,at.push(Er[vn])):St[vn]=!1}}}}_forEachCell(F,ae,we,je,Qe,at,St,jt){const ir=this._convertToCellCoord(F),Er=this._convertToCellCoord(ae),Ir=this._convertToCellCoord(we),rn=this._convertToCellCoord(je);for(let vn=ir;vn<=Ir;vn++)for(let Cn=Er;Cn<=rn;Cn++){const Bn=this.d*Cn+vn;if((!jt||jt(this._convertFromCellCoord(vn),this._convertFromCellCoord(Cn),this._convertFromCellCoord(vn+1),this._convertFromCellCoord(Cn+1)))&&Qe.call(this,F,ae,we,je,Bn,at,St,jt))return}}_convertFromCellCoord(F){return(F-this.padding)/this.scale}_convertToCellCoord(F){return Math.max(0,Math.min(this.d-1,Math.floor(F*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;const F=this.cells,ae=3+this.cells.length+1+1;let we=0;for(let at=0;at<this.cells.length;at++)we+=this.cells[at].length;const je=new Int32Array(ae+we+this.keys.length+this.bboxes.length);je[0]=this.extent,je[1]=this.n,je[2]=this.padding;let Qe=ae;for(let at=0;at<F.length;at++){const St=F[at];je[3+at]=Qe,je.set(St,Qe),Qe+=St.length}return je[3+F.length]=Qe,je.set(this.keys,Qe),Qe+=this.keys.length,je[3+F.length+1]=Qe,je.set(this.bboxes,Qe),Qe+=this.bboxes.length,je.buffer}static serialize(F,ae){const we=F.toArrayBuffer();return ae&&ae.push(we),{buffer:we}}static deserialize(F){return new qi(F.buffer)}}const xi={};function oi(K,F,ae={}){if(xi[K])throw new Error(`${K} is already registered.`);Object.defineProperty(F,"_classRegistryKey",{value:K,writeable:!1}),xi[K]={klass:F,omit:ae.omit||[],shallow:ae.shallow||[]}}oi("Object",Object),oi("TransferableGridIndex",qi),oi("Color",br),oi("Error",Error),oi("AJAXError",me),oi("ResolvedImage",Pa),oi("StylePropertyFunction",yu),oi("StyleExpression",qc,{omit:["_evaluator"]}),oi("ZoomDependentExpression",wc),oi("ZoomConstantExpression",zf),oi("CompoundExpression",ac,{omit:["_evaluate"]});for(const K in wh)wh[K]._classRegistryKey||oi(`Expression_${K}`,wh[K]);function fo(K){return K&&typeof ArrayBuffer<"u"&&(K instanceof ArrayBuffer||K.constructor&&K.constructor.name==="ArrayBuffer")}function Qo(K){return K.$name||K.constructor._classRegistryKey}function Yo(K){return!(function(F){if(F===null||typeof F!="object")return!1;const ae=Qo(F);return!(!ae||ae==="Object")})(K)&&(K==null||typeof K=="boolean"||typeof K=="number"||typeof K=="string"||K instanceof Boolean||K instanceof Number||K instanceof String||K instanceof Date||K instanceof RegExp||K instanceof Blob||K instanceof Error||fo(K)||U(K)||ArrayBuffer.isView(K)||K instanceof ImageData)}function is(K,F){if(Yo(K))return(fo(K)||U(K))&&F&&F.push(K),ArrayBuffer.isView(K)&&F&&F.push(K.buffer),K instanceof ImageData&&F&&F.push(K.data.buffer),K;if(Array.isArray(K)){const Qe=[];for(const at of K)Qe.push(is(at,F));return Qe}if(typeof K!="object")throw new Error("can't serialize object of type "+typeof K);const ae=Qo(K);if(!ae)throw new Error(`can't serialize object of unregistered class ${K.constructor.name}`);if(!xi[ae])throw new Error(`${ae} is not registered.`);const{klass:we}=xi[ae],je=we.serialize?we.serialize(K,F):{};if(we.serialize){if(F&&je===F[F.length-1])throw new Error("statically serialized object won't survive transfer of $name property")}else{for(const Qe in K){if(!K.hasOwnProperty(Qe)||xi[ae].omit.indexOf(Qe)>=0)continue;const at=K[Qe];je[Qe]=xi[ae].shallow.indexOf(Qe)>=0?at:is(at,F)}K instanceof Error&&(je.message=K.message)}if(je.$name)throw new Error("$name property is reserved for worker serialization logic.");return ae!=="Object"&&(je.$name=ae),je}function ts(K){if(Yo(K))return K;if(Array.isArray(K))return K.map(ts);if(typeof K!="object")throw new Error("can't deserialize object of type "+typeof K);const F=Qo(K)||"Object";if(!xi[F])throw new Error(`can't deserialize unregistered class ${F}`);const{klass:ae}=xi[F];if(!ae)throw new Error(`can't deserialize unregistered class ${F}`);if(ae.deserialize)return ae.deserialize(K);const we=Object.create(ae.prototype);for(const je of Object.keys(K)){if(je==="$name")continue;const Qe=K[je];we[je]=xi[F].shallow.indexOf(je)>=0?Qe:ts(Qe)}return we}class vo{constructor(){this.first=!0}update(F,ae){const we=Math.floor(F);return this.first?(this.first=!1,this.lastIntegerZoom=we,this.lastIntegerZoomTime=0,this.lastZoom=F,this.lastFloorZoom=we,!0):(this.lastFloorZoom>we?(this.lastIntegerZoom=we+1,this.lastIntegerZoomTime=ae):this.lastFloorZoom<we&&(this.lastIntegerZoom=we,this.lastIntegerZoomTime=ae),F!==this.lastZoom&&(this.lastZoom=F,this.lastFloorZoom=we,!0))}}const Yi={"Latin-1 Supplement":K=>K>=128&&K<=255,"Hangul Jamo":K=>K>=4352&&K<=4607,Khmer:K=>K>=6016&&K<=6143,"General Punctuation":K=>K>=8192&&K<=8303,"Letterlike Symbols":K=>K>=8448&&K<=8527,"Number Forms":K=>K>=8528&&K<=8591,"Miscellaneous Technical":K=>K>=8960&&K<=9215,"Control Pictures":K=>K>=9216&&K<=9279,"Optical Character Recognition":K=>K>=9280&&K<=9311,"Enclosed Alphanumerics":K=>K>=9312&&K<=9471,"Geometric Shapes":K=>K>=9632&&K<=9727,"Miscellaneous Symbols":K=>K>=9728&&K<=9983,"Miscellaneous Symbols and Arrows":K=>K>=11008&&K<=11263,"Ideographic Description Characters":K=>K>=12272&&K<=12287,"CJK Symbols and Punctuation":K=>K>=12288&&K<=12351,Katakana:K=>K>=12448&&K<=12543,Kanbun:K=>K>=12688&&K<=12703,"CJK Strokes":K=>K>=12736&&K<=12783,"Enclosed CJK Letters and Months":K=>K>=12800&&K<=13055,"CJK Compatibility":K=>K>=13056&&K<=13311,"Yijing Hexagram Symbols":K=>K>=19904&&K<=19967,"Private Use Area":K=>K>=57344&&K<=63743,"Vertical Forms":K=>K>=65040&&K<=65055,"CJK Compatibility Forms":K=>K>=65072&&K<=65103,"Small Form Variants":K=>K>=65104&&K<=65135,"Halfwidth and Fullwidth Forms":K=>K>=65280&&K<=65519};function ys(K){for(const F of K)if(cl(F.charCodeAt(0)))return!0;return!1}function Ys(K){for(const F of K)if(!Dl(F.charCodeAt(0)))return!1;return!0}function Rl(K){const F=K.map(ae=>{try{return new RegExp(`\\p{sc=${ae}}`,"u").source}catch{return null}}).filter(ae=>ae);return new RegExp(F.join("|"),"u")}const Ql=Rl(["Arab","Dupl","Mong","Ougr","Syrc"]);function Dl(K){return!Ql.test(String.fromCodePoint(K))}const eu=Rl(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function cl(K){return!(K!==746&&K!==747&&(K<4352||!(Yi["CJK Compatibility Forms"](K)&&!(K>=65097&&K<=65103)||Yi["CJK Compatibility"](K)||Yi["CJK Strokes"](K)||!(!Yi["CJK Symbols and Punctuation"](K)||K>=12296&&K<=12305||K>=12308&&K<=12319||K===12336)||Yi["Enclosed CJK Letters and Months"](K)||Yi["Ideographic Description Characters"](K)||Yi.Kanbun(K)||Yi.Katakana(K)&&K!==12540||!(!Yi["Halfwidth and Fullwidth Forms"](K)||K===65288||K===65289||K===65293||K>=65306&&K<=65310||K===65339||K===65341||K===65343||K>=65371&&K<=65503||K===65507||K>=65512&&K<=65519)||!(!Yi["Small Form Variants"](K)||K>=65112&&K<=65118||K>=65123&&K<=65126)||Yi["Vertical Forms"](K)||Yi["Yijing Hexagram Symbols"](K)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(K))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(K))||eu.test(String.fromCodePoint(K)))))}function Du(K){return!(cl(K)||(function(F){return!!(Yi["Latin-1 Supplement"](F)&&(F===167||F===169||F===174||F===177||F===188||F===189||F===190||F===215||F===247)||Yi["General Punctuation"](F)&&(F===8214||F===8224||F===8225||F===8240||F===8241||F===8251||F===8252||F===8258||F===8263||F===8264||F===8265||F===8273)||Yi["Letterlike Symbols"](F)||Yi["Number Forms"](F)||Yi["Miscellaneous Technical"](F)&&(F>=8960&&F<=8967||F>=8972&&F<=8991||F>=8996&&F<=9e3||F===9003||F>=9085&&F<=9114||F>=9150&&F<=9165||F===9167||F>=9169&&F<=9179||F>=9186&&F<=9215)||Yi["Control Pictures"](F)&&F!==9251||Yi["Optical Character Recognition"](F)||Yi["Enclosed Alphanumerics"](F)||Yi["Geometric Shapes"](F)||Yi["Miscellaneous Symbols"](F)&&!(F>=9754&&F<=9759)||Yi["Miscellaneous Symbols and Arrows"](F)&&(F>=11026&&F<=11055||F>=11088&&F<=11097||F>=11192&&F<=11243)||Yi["CJK Symbols and Punctuation"](F)||Yi.Katakana(F)||Yi["Private Use Area"](F)||Yi["CJK Compatibility Forms"](F)||Yi["Small Form Variants"](F)||Yi["Halfwidth and Fullwidth Forms"](F)||F===8734||F===8756||F===8757||F>=9984&&F<=10087||F>=10102&&F<=10131||F===65532||F===65533)})(K))}const Pu=Rl(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Zl(K){return Pu.test(String.fromCodePoint(K))}function Oo(K,F){return!(!F&&Zl(K)||K>=2304&&K<=3583||K>=3840&&K<=4255||Yi.Khmer(K))}function Ls(K){for(const F of K)if(Zl(F.charCodeAt(0)))return!0;return!1}const ql=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(K){this.pluginStatus=K.pluginStatus,this.pluginURL=K.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(K){this.applyArabicShaping=K.applyArabicShaping,this.processBidirectionalText=K.processBidirectionalText,this.processStyledBidirectionalText=K.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Al{constructor(F,ae){this.zoom=F,ae?(this.now=ae.now,this.fadeDuration=ae.fadeDuration,this.zoomHistory=ae.zoomHistory,this.transition=ae.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new vo,this.transition={})}isSupportedScript(F){return(function(ae,we){for(const je of ae)if(!Oo(je.charCodeAt(0),we))return!1;return!0})(F,ql.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){const F=this.zoom,ae=F-Math.floor(F),we=this.crossFadingFactor();return F>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:ae+(1-ae)*we}:{fromScale:.5,toScale:1,t:1-(1-we)*ae}}}class Tc{constructor(F,ae){this.property=F,this.value=ae,this.expression=(function(we,je){if(Oh(we))return new yu(we,je);if($f(we)){const Qe=Vc(we,je);if(Qe.result==="error")throw new Error(Qe.value.map(at=>`${at.key}: ${at.message}`).join(", "));return Qe.value}{let Qe=we;return je.type==="color"&&typeof we=="string"?Qe=br.parse(we):je.type!=="padding"||typeof we!="number"&&!Array.isArray(we)?je.type==="variableAnchorOffsetCollection"&&Array.isArray(we)&&(Qe=Da.parse(we)):Qe=Fn.parse(we),{kind:"constant",evaluate:()=>Qe}}})(ae===void 0?F.specification.default:ae,F.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(F,ae,we){return this.property.possiblyEvaluate(this,F,ae,we)}}class Ac{constructor(F){this.property=F,this.value=new Tc(F,void 0)}transitioned(F,ae){return new oh(this.property,this.value,ae,k({},F.transition,this.transition),F.now)}untransitioned(){return new oh(this.property,this.value,null,{},0)}}class Pc{constructor(F){this._properties=F,this._values=Object.create(F.defaultTransitionablePropertyValues)}getValue(F){return f(this._values[F].value.value)}setValue(F,ae){Object.prototype.hasOwnProperty.call(this._values,F)||(this._values[F]=new Ac(this._values[F].property)),this._values[F].value=new Tc(this._values[F].property,ae===null?void 0:f(ae))}getTransition(F){return f(this._values[F].transition)}setTransition(F,ae){Object.prototype.hasOwnProperty.call(this._values,F)||(this._values[F]=new Ac(this._values[F].property)),this._values[F].transition=f(ae)||void 0}serialize(){const F={};for(const ae of Object.keys(this._values)){const we=this.getValue(ae);we!==void 0&&(F[ae]=we);const je=this.getTransition(ae);je!==void 0&&(F[`${ae}-transition`]=je)}return F}transitioned(F,ae){const we=new Sc(this._properties);for(const je of Object.keys(this._values))we._values[je]=this._values[je].transitioned(F,ae._values[je]);return we}untransitioned(){const F=new Sc(this._properties);for(const ae of Object.keys(this._values))F._values[ae]=this._values[ae].untransitioned();return F}}class oh{constructor(F,ae,we,je,Qe){this.property=F,this.value=ae,this.begin=Qe+je.delay||0,this.end=this.begin+je.duration||0,F.specification.transition&&(je.delay||je.duration)&&(this.prior=we)}possiblyEvaluate(F,ae,we){const je=F.now||0,Qe=this.value.possiblyEvaluate(F,ae,we),at=this.prior;if(at){if(je>this.end)return this.prior=null,Qe;if(this.value.isDataDriven())return this.prior=null,Qe;if(je<this.begin)return at.possiblyEvaluate(F,ae,we);{const St=(je-this.begin)/(this.end-this.begin);return this.property.interpolate(at.possiblyEvaluate(F,ae,we),Qe,(function(jt){if(jt<=0)return 0;if(jt>=1)return 1;const ir=jt*jt,Er=ir*jt;return 4*(jt<.5?Er:3*(jt-ir)+Er-.75)})(St))}}return Qe}}class Sc{constructor(F){this._properties=F,this._values=Object.create(F.defaultTransitioningPropertyValues)}possiblyEvaluate(F,ae,we){const je=new Bf(this._properties);for(const Qe of Object.keys(this._values))je._values[Qe]=this._values[Qe].possiblyEvaluate(F,ae,we);return je}hasTransition(){for(const F of Object.keys(this._values))if(this._values[F].prior)return!0;return!1}}class Ff{constructor(F){this._properties=F,this._values=Object.create(F.defaultPropertyValues)}hasValue(F){return this._values[F].value!==void 0}getValue(F){return f(this._values[F].value)}setValue(F,ae){this._values[F]=new Tc(this._values[F].property,ae===null?void 0:f(ae))}serialize(){const F={};for(const ae of Object.keys(this._values)){const we=this.getValue(ae);we!==void 0&&(F[ae]=we)}return F}possiblyEvaluate(F,ae,we){const je=new Bf(this._properties);for(const Qe of Object.keys(this._values))je._values[Qe]=this._values[Qe].possiblyEvaluate(F,ae,we);return je}}class Ou{constructor(F,ae,we){this.property=F,this.value=ae,this.parameters=we}isConstant(){return this.value.kind==="constant"}constantOr(F){return this.value.kind==="constant"?this.value.value:F}evaluate(F,ae,we,je){return this.property.evaluate(this.value,this.parameters,F,ae,we,je)}}class Bf{constructor(F){this._properties=F,this._values=Object.create(F.defaultPossiblyEvaluatedValues)}get(F){return this._values[F]}}class os{constructor(F){this.specification=F}possiblyEvaluate(F,ae){if(F.isDataDriven())throw new Error("Value should not be data driven");return F.expression.evaluate(ae)}interpolate(F,ae,we){const je=Uo[this.specification.type];return je?je(F,ae,we):F}}class _s{constructor(F,ae){this.specification=F,this.overrides=ae}possiblyEvaluate(F,ae,we,je){return new Ou(this,F.expression.kind==="constant"||F.expression.kind==="camera"?{kind:"constant",value:F.expression.evaluate(ae,null,{},we,je)}:F.expression,ae)}interpolate(F,ae,we){if(F.value.kind!=="constant"||ae.value.kind!=="constant")return F;if(F.value.value===void 0||ae.value.value===void 0)return new Ou(this,{kind:"constant",value:void 0},F.parameters);const je=Uo[this.specification.type];if(je){const Qe=je(F.value.value,ae.value.value,we);return new Ou(this,{kind:"constant",value:Qe},F.parameters)}return F}evaluate(F,ae,we,je,Qe,at){return F.kind==="constant"?F.value:F.evaluate(ae,we,je,Qe,at)}}class jf extends _s{possiblyEvaluate(F,ae,we,je){if(F.value===void 0)return new Ou(this,{kind:"constant",value:void 0},ae);if(F.expression.kind==="constant"){const Qe=F.expression.evaluate(ae,null,{},we,je),at=F.property.specification.type==="resolvedImage"&&typeof Qe!="string"?Qe.name:Qe,St=this._calculate(at,at,at,ae);return new Ou(this,{kind:"constant",value:St},ae)}if(F.expression.kind==="camera"){const Qe=this._calculate(F.expression.evaluate({zoom:ae.zoom-1}),F.expression.evaluate({zoom:ae.zoom}),F.expression.evaluate({zoom:ae.zoom+1}),ae);return new Ou(this,{kind:"constant",value:Qe},ae)}return new Ou(this,F.expression,ae)}evaluate(F,ae,we,je,Qe,at){if(F.kind==="source"){const St=F.evaluate(ae,we,je,Qe,at);return this._calculate(St,St,St,ae)}return F.kind==="composite"?this._calculate(F.evaluate({zoom:Math.floor(ae.zoom)-1},we,je),F.evaluate({zoom:Math.floor(ae.zoom)},we,je),F.evaluate({zoom:Math.floor(ae.zoom)+1},we,je),ae):F.value}_calculate(F,ae,we,je){return je.zoom>je.zoomHistory.lastIntegerZoom?{from:F,to:ae}:{from:we,to:ae}}interpolate(F){return F}}class nf{constructor(F){this.specification=F}possiblyEvaluate(F,ae,we,je){if(F.value!==void 0){if(F.expression.kind==="constant"){const Qe=F.expression.evaluate(ae,null,{},we,je);return this._calculate(Qe,Qe,Qe,ae)}return this._calculate(F.expression.evaluate(new Al(Math.floor(ae.zoom-1),ae)),F.expression.evaluate(new Al(Math.floor(ae.zoom),ae)),F.expression.evaluate(new Al(Math.floor(ae.zoom+1),ae)),ae)}}_calculate(F,ae,we,je){return je.zoom>je.zoomHistory.lastIntegerZoom?{from:F,to:ae}:{from:we,to:ae}}interpolate(F){return F}}class Gc{constructor(F){this.specification=F}possiblyEvaluate(F,ae,we,je){return!!F.expression.evaluate(ae,null,{},we,je)}interpolate(){return!1}}class Ze{constructor(F){this.properties=F,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(const ae in F){const we=F[ae];we.specification.overridable&&this.overridableProperties.push(ae);const je=this.defaultPropertyValues[ae]=new Tc(we,void 0),Qe=this.defaultTransitionablePropertyValues[ae]=new Ac(we);this.defaultTransitioningPropertyValues[ae]=Qe.untransitioned(),this.defaultPossiblyEvaluatedValues[ae]=je.possiblyEvaluate({})}}}oi("DataDrivenProperty",_s),oi("DataConstantProperty",os),oi("CrossFadedDataDrivenProperty",jf),oi("CrossFadedProperty",nf),oi("ColorRampProperty",Gc);const O="-transition";class fe extends ce{constructor(F,ae){if(super(),this.id=F.id,this.type=F.type,this._featureFilter={filter:()=>!0,needGeometry:!1},F.type!=="custom"&&(this.metadata=F.metadata,this.minzoom=F.minzoom,this.maxzoom=F.maxzoom,F.type!=="background"&&(this.source=F.source,this.sourceLayer=F["source-layer"],this.filter=F.filter),ae.layout&&(this._unevaluatedLayout=new Ff(ae.layout)),ae.paint)){this._transitionablePaint=new Pc(ae.paint);for(const we in F.paint)this.setPaintProperty(we,F.paint[we],{validate:!1});for(const we in F.layout)this.setLayoutProperty(we,F.layout[we],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Bf(ae.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(F){return F==="visibility"?this.visibility:this._unevaluatedLayout.getValue(F)}setLayoutProperty(F,ae,we={}){ae!=null&&this._validate(to,`layers.${this.id}.layout.${F}`,F,ae,we)||(F!=="visibility"?this._unevaluatedLayout.setValue(F,ae):this.visibility=ae)}getPaintProperty(F){return F.endsWith(O)?this._transitionablePaint.getTransition(F.slice(0,-11)):this._transitionablePaint.getValue(F)}setPaintProperty(F,ae,we={}){if(ae!=null&&this._validate(ki,`layers.${this.id}.paint.${F}`,F,ae,we))return!1;if(F.endsWith(O))return this._transitionablePaint.setTransition(F.slice(0,-11),ae||void 0),!1;{const je=this._transitionablePaint._values[F],Qe=je.property.specification["property-type"]==="cross-faded-data-driven",at=je.value.isDataDriven(),St=je.value;this._transitionablePaint.setValue(F,ae),this._handleSpecialPaintPropertyUpdate(F);const jt=this._transitionablePaint._values[F].value;return jt.isDataDriven()||at||Qe||this._handleOverridablePaintPropertyUpdate(F,St,jt)}}_handleSpecialPaintPropertyUpdate(F){}_handleOverridablePaintPropertyUpdate(F,ae,we){return!1}isHidden(F){return!!(this.minzoom&&F<this.minzoom)||!!(this.maxzoom&&F>=this.maxzoom)||this.visibility==="none"}updateTransitions(F){this._transitioningPaint=this._transitionablePaint.transitioned(F,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(F,ae){F.getCrossfadeParameters&&(this._crossfadeParameters=F.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(F,void 0,ae)),this.paint=this._transitioningPaint.possiblyEvaluate(F,void 0,ae)}serialize(){const F={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(F.layout=F.layout||{},F.layout.visibility=this.visibility),g(F,(ae,we)=>!(ae===void 0||we==="layout"&&!Object.keys(ae).length||we==="paint"&&!Object.keys(ae).length))}_validate(F,ae,we,je,Qe={}){return(!Qe||Qe.validate!==!1)&&ci(this,F.call(Ga,{key:ae,layerType:this.type,objectKey:we,value:je,styleSpec:ue,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(const F in this.paint._values){const ae=this.paint.get(F);if(ae instanceof Ou&&ic(ae.property.specification)&&(ae.value.kind==="source"||ae.value.kind==="composite")&&ae.value.isStateDependent)return!0}return!1}}const Re={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Oe{constructor(F,ae){this._structArray=F,this._pos1=ae*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class We{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(F,ae){return F._trim(),ae&&(F.isTransferred=!0,ae.push(F.arrayBuffer)),{length:F.length,arrayBuffer:F.arrayBuffer}}static deserialize(F){const ae=Object.create(this.prototype);return ae.arrayBuffer=F.arrayBuffer,ae.length=F.length,ae.capacity=F.arrayBuffer.byteLength/ae.bytesPerElement,ae._refreshViews(),ae}_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(F){this.reserve(F),this.length=F}reserve(F){if(F>this.capacity){this.capacity=Math.max(F,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);const ae=this.uint8;this._refreshViews(),ae&&this.uint8.set(ae)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Mt(K,F=1){let ae=0,we=0;return{members:K.map(je=>{const Qe=Re[je.type].BYTES_PER_ELEMENT,at=ae=zt(ae,Math.max(F,Qe)),St=je.components||1;return we=Math.max(we,Qe),ae+=Qe*St,{name:je.name,type:je.type,components:St,offset:at}}),size:zt(ae,Math.max(we,F)),alignment:F}}function zt(K,F){return Math.ceil(K/F)*F}class rr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.int16[je+0]=ae,this.int16[je+1]=we,F}}rr.prototype.bytesPerElement=4,oi("StructArrayLayout2i4",rr);class Tr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.int16[Qe+0]=ae,this.int16[Qe+1]=we,this.int16[Qe+2]=je,F}}Tr.prototype.bytesPerElement=6,oi("StructArrayLayout3i6",Tr);class zr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je){const Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,F,ae,we,je)}emplace(F,ae,we,je,Qe){const at=4*F;return this.int16[at+0]=ae,this.int16[at+1]=we,this.int16[at+2]=je,this.int16[at+3]=Qe,F}}zr.prototype.bytesPerElement=8,oi("StructArrayLayout4i8",zr);class qr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const St=this.length;return this.resize(St+1),this.emplace(St,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,St){const jt=6*F;return this.int16[jt+0]=ae,this.int16[jt+1]=we,this.int16[jt+2]=je,this.int16[jt+3]=Qe,this.int16[jt+4]=at,this.int16[jt+5]=St,F}}qr.prototype.bytesPerElement=12,oi("StructArrayLayout2i4i12",qr);class pn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const St=this.length;return this.resize(St+1),this.emplace(St,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,St){const jt=4*F,ir=8*F;return this.int16[jt+0]=ae,this.int16[jt+1]=we,this.uint8[ir+4]=je,this.uint8[ir+5]=Qe,this.uint8[ir+6]=at,this.uint8[ir+7]=St,F}}pn.prototype.bytesPerElement=8,oi("StructArrayLayout2i4ub8",pn);class Dn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.float32[je+0]=ae,this.float32[je+1]=we,F}}Dn.prototype.bytesPerElement=8,oi("StructArrayLayout2f8",Dn);class nt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,St,jt,ir,Er){const Ir=this.length;return this.resize(Ir+1),this.emplace(Ir,F,ae,we,je,Qe,at,St,jt,ir,Er)}emplace(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir){const rn=10*F;return this.uint16[rn+0]=ae,this.uint16[rn+1]=we,this.uint16[rn+2]=je,this.uint16[rn+3]=Qe,this.uint16[rn+4]=at,this.uint16[rn+5]=St,this.uint16[rn+6]=jt,this.uint16[rn+7]=ir,this.uint16[rn+8]=Er,this.uint16[rn+9]=Ir,F}}nt.prototype.bytesPerElement=20,oi("StructArrayLayout10ui20",nt);class ut extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn){const vn=this.length;return this.resize(vn+1),this.emplace(vn,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn)}emplace(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn){const Cn=12*F;return this.int16[Cn+0]=ae,this.int16[Cn+1]=we,this.int16[Cn+2]=je,this.int16[Cn+3]=Qe,this.uint16[Cn+4]=at,this.uint16[Cn+5]=St,this.uint16[Cn+6]=jt,this.uint16[Cn+7]=ir,this.int16[Cn+8]=Er,this.int16[Cn+9]=Ir,this.int16[Cn+10]=rn,this.int16[Cn+11]=vn,F}}ut.prototype.bytesPerElement=24,oi("StructArrayLayout4i4ui4i24",ut);class wt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.float32[Qe+0]=ae,this.float32[Qe+1]=we,this.float32[Qe+2]=je,F}}wt.prototype.bytesPerElement=12,oi("StructArrayLayout3f12",wt);class kt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.uint32[1*F+0]=ae,F}}kt.prototype.bytesPerElement=4,oi("StructArrayLayout1ul4",kt);class Ht extends We{_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(F,ae,we,je,Qe,at,St,jt,ir){const Er=this.length;return this.resize(Er+1),this.emplace(Er,F,ae,we,je,Qe,at,St,jt,ir)}emplace(F,ae,we,je,Qe,at,St,jt,ir,Er){const Ir=10*F,rn=5*F;return this.int16[Ir+0]=ae,this.int16[Ir+1]=we,this.int16[Ir+2]=je,this.int16[Ir+3]=Qe,this.int16[Ir+4]=at,this.int16[Ir+5]=St,this.uint32[rn+3]=jt,this.uint16[Ir+8]=ir,this.uint16[Ir+9]=Er,F}}Ht.prototype.bytesPerElement=20,oi("StructArrayLayout6i1ul2ui20",Ht);class Ot extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const St=this.length;return this.resize(St+1),this.emplace(St,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,St){const jt=6*F;return this.int16[jt+0]=ae,this.int16[jt+1]=we,this.int16[jt+2]=je,this.int16[jt+3]=Qe,this.int16[jt+4]=at,this.int16[jt+5]=St,F}}Ot.prototype.bytesPerElement=12,oi("StructArrayLayout2i2i2i12",Ot);class Kt extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe){const at=this.length;return this.resize(at+1),this.emplace(at,F,ae,we,je,Qe)}emplace(F,ae,we,je,Qe,at){const St=4*F,jt=8*F;return this.float32[St+0]=ae,this.float32[St+1]=we,this.float32[St+2]=je,this.int16[jt+6]=Qe,this.int16[jt+7]=at,F}}Kt.prototype.bytesPerElement=16,oi("StructArrayLayout2f1f2i16",Kt);class Cr extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(F,ae,we,je,Qe,at){const St=this.length;return this.resize(St+1),this.emplace(St,F,ae,we,je,Qe,at)}emplace(F,ae,we,je,Qe,at,St){const jt=16*F,ir=4*F,Er=8*F;return this.uint8[jt+0]=ae,this.uint8[jt+1]=we,this.float32[ir+1]=je,this.float32[ir+2]=Qe,this.int16[Er+6]=at,this.int16[Er+7]=St,F}}Cr.prototype.bytesPerElement=16,oi("StructArrayLayout2ub2f2i16",Cr);class Or extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.uint16[Qe+0]=ae,this.uint16[Qe+1]=we,this.uint16[Qe+2]=je,F}}Or.prototype.bytesPerElement=6,oi("StructArrayLayout3ui6",Or);class Vr extends We{_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(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia){const Mi=this.length;return this.resize(Mi+1),this.emplace(Mi,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia)}emplace(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia,Mi){const ii=24*F,bi=12*F,Qi=48*F;return this.int16[ii+0]=ae,this.int16[ii+1]=we,this.uint16[ii+2]=je,this.uint16[ii+3]=Qe,this.uint32[bi+2]=at,this.uint32[bi+3]=St,this.uint32[bi+4]=jt,this.uint16[ii+10]=ir,this.uint16[ii+11]=Er,this.uint16[ii+12]=Ir,this.float32[bi+7]=rn,this.float32[bi+8]=vn,this.uint8[Qi+36]=Cn,this.uint8[Qi+37]=Bn,this.uint8[Qi+38]=Qn,this.uint32[bi+10]=Ia,this.int16[ii+22]=Mi,F}}Vr.prototype.bytesPerElement=48,oi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Vr);class sn extends We{_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(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia,Mi,ii,bi,Qi,Co,cs,bl,xs,ss,Hs,Ns){const Ds=this.length;return this.resize(Ds+1),this.emplace(Ds,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia,Mi,ii,bi,Qi,Co,cs,bl,xs,ss,Hs,Ns)}emplace(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn,Qn,Ia,Mi,ii,bi,Qi,Co,cs,bl,xs,ss,Hs,Ns,Ds){const go=32*F,Qs=16*F;return this.int16[go+0]=ae,this.int16[go+1]=we,this.int16[go+2]=je,this.int16[go+3]=Qe,this.int16[go+4]=at,this.int16[go+5]=St,this.int16[go+6]=jt,this.int16[go+7]=ir,this.uint16[go+8]=Er,this.uint16[go+9]=Ir,this.uint16[go+10]=rn,this.uint16[go+11]=vn,this.uint16[go+12]=Cn,this.uint16[go+13]=Bn,this.uint16[go+14]=Qn,this.uint16[go+15]=Ia,this.uint16[go+16]=Mi,this.uint16[go+17]=ii,this.uint16[go+18]=bi,this.uint16[go+19]=Qi,this.uint16[go+20]=Co,this.uint16[go+21]=cs,this.uint16[go+22]=bl,this.uint32[Qs+12]=xs,this.float32[Qs+13]=ss,this.float32[Qs+14]=Hs,this.uint16[go+30]=Ns,this.uint16[go+31]=Ds,F}}sn.prototype.bytesPerElement=64,oi("StructArrayLayout8i15ui1ul2f2ui64",sn);class bn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.float32[1*F+0]=ae,F}}bn.prototype.bytesPerElement=4,oi("StructArrayLayout1f4",bn);class Un extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=3*F;return this.uint16[6*F+0]=ae,this.float32[Qe+1]=we,this.float32[Qe+2]=je,F}}Un.prototype.bytesPerElement=12,oi("StructArrayLayout1ui2f12",Un);class Gn extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae,we){const je=this.length;return this.resize(je+1),this.emplace(je,F,ae,we)}emplace(F,ae,we,je){const Qe=4*F;return this.uint32[2*F+0]=ae,this.uint16[Qe+2]=we,this.uint16[Qe+3]=je,F}}Gn.prototype.bytesPerElement=8,oi("StructArrayLayout1ul2ui8",Gn);class ua extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F,ae){const we=this.length;return this.resize(we+1),this.emplace(we,F,ae)}emplace(F,ae,we){const je=2*F;return this.uint16[je+0]=ae,this.uint16[je+1]=we,F}}ua.prototype.bytesPerElement=4,oi("StructArrayLayout2ui4",ua);class Ha extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(F){const ae=this.length;return this.resize(ae+1),this.emplace(ae,F)}emplace(F,ae){return this.uint16[1*F+0]=ae,F}}Ha.prototype.bytesPerElement=2,oi("StructArrayLayout1ui2",Ha);class Ti extends We{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(F,ae,we,je){const Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,F,ae,we,je)}emplace(F,ae,we,je,Qe){const at=4*F;return this.float32[at+0]=ae,this.float32[at+1]=we,this.float32[at+2]=je,this.float32[at+3]=Qe,F}}Ti.prototype.bytesPerElement=16,oi("StructArrayLayout4f16",Ti);class mi extends Oe{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 s(this.anchorPointX,this.anchorPointY)}}mi.prototype.size=20;class Ai extends Ht{get(F){return new mi(this,F)}}oi("CollisionBoxArray",Ai);class po extends Oe{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(F){this._structArray.uint8[this._pos1+37]=F}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(F){this._structArray.uint8[this._pos1+38]=F}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(F){this._structArray.uint32[this._pos4+10]=F}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}po.prototype.size=48;class Fo extends Vr{get(F){return new po(this,F)}}oi("PlacedSymbolArray",Fo);class Po extends Oe{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(F){this._structArray.uint32[this._pos4+12]=F}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]}}Po.prototype.size=64;class us extends sn{get(F){return new Po(this,F)}}oi("SymbolInstanceArray",us);class il extends bn{getoffsetX(F){return this.float32[1*F+0]}}oi("GlyphOffsetArray",il);class ol extends Tr{getx(F){return this.int16[3*F+0]}gety(F){return this.int16[3*F+1]}gettileUnitDistanceFromAnchor(F){return this.int16[3*F+2]}}oi("SymbolLineVertexArray",ol);class Bs extends Oe{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]}}Bs.prototype.size=12;class hl extends Un{get(F){return new Bs(this,F)}}oi("TextAnchorOffsetArray",hl);class bu extends Oe{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]}}bu.prototype.size=8;class cu extends Gn{get(F){return new bu(this,F)}}oi("FeatureIndexArray",cu);class js extends rr{}class Us extends rr{}class Bu extends rr{}class pc extends qr{}class Xc extends pn{}class Te extends Dn{}class He extends nt{}class ct extends ut{}class Pt extends wt{}class It extends kt{}class Ut extends Ot{}class hr extends Cr{}class fr extends Or{}class Pr extends ua{}const ln=Mt([{name:"a_pos",components:2,type:"Int16"}],4),{members:on}=ln;class Mn{constructor(F=[]){this.segments=F}prepareSegment(F,ae,we,je){let Qe=this.segments[this.segments.length-1];return F>Mn.MAX_VERTEX_ARRAY_LENGTH&&x(`Max vertices per segment is ${Mn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${F}`),(!Qe||Qe.vertexLength+F>Mn.MAX_VERTEX_ARRAY_LENGTH||Qe.sortKey!==je)&&(Qe={vertexOffset:ae.length,primitiveOffset:we.length,vertexLength:0,primitiveLength:0},je!==void 0&&(Qe.sortKey=je),this.segments.push(Qe)),Qe}get(){return this.segments}destroy(){for(const F of this.segments)for(const ae in F.vaos)F.vaos[ae].destroy()}static simpleSegment(F,ae,we,je){return new Mn([{vertexOffset:F,primitiveOffset:ae,vertexLength:we,primitiveLength:je,vaos:{},sortKey:0}])}}function jn(K,F){return 256*(K=T(Math.floor(K),0,255))+T(Math.floor(F),0,255)}Mn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,oi("SegmentVector",Mn);const Vn=Mt([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ka={exports:{}},Zn={exports:{}};Zn.exports=function(K,F){var ae,we,je,Qe,at,St,jt,ir;for(we=K.length-(ae=3&K.length),je=F,at=3432918353,St=461845907,ir=0;ir<we;)jt=255&K.charCodeAt(ir)|(255&K.charCodeAt(++ir))<<8|(255&K.charCodeAt(++ir))<<16|(255&K.charCodeAt(++ir))<<24,++ir,je=27492+(65535&(Qe=5*(65535&(je=(je^=jt=(65535&(jt=(jt=(65535&jt)*at+(((jt>>>16)*at&65535)<<16)&4294967295)<<15|jt>>>17))*St+(((jt>>>16)*St&65535)<<16)&4294967295)<<13|je>>>19))+((5*(je>>>16)&65535)<<16)&4294967295))+((58964+(Qe>>>16)&65535)<<16);switch(jt=0,ae){case 3:jt^=(255&K.charCodeAt(ir+2))<<16;case 2:jt^=(255&K.charCodeAt(ir+1))<<8;case 1:je^=jt=(65535&(jt=(jt=(65535&(jt^=255&K.charCodeAt(ir)))*at+(((jt>>>16)*at&65535)<<16)&4294967295)<<15|jt>>>17))*St+(((jt>>>16)*St&65535)<<16)&4294967295}return je^=K.length,je=2246822507*(65535&(je^=je>>>16))+((2246822507*(je>>>16)&65535)<<16)&4294967295,je=3266489909*(65535&(je^=je>>>13))+((3266489909*(je>>>16)&65535)<<16)&4294967295,(je^=je>>>16)>>>0};var ya=Zn.exports,Sa={exports:{}};Sa.exports=function(K,F){for(var ae,we=K.length,je=F^we,Qe=0;we>=4;)ae=1540483477*(65535&(ae=255&K.charCodeAt(Qe)|(255&K.charCodeAt(++Qe))<<8|(255&K.charCodeAt(++Qe))<<16|(255&K.charCodeAt(++Qe))<<24))+((1540483477*(ae>>>16)&65535)<<16),je=1540483477*(65535&je)+((1540483477*(je>>>16)&65535)<<16)^(ae=1540483477*(65535&(ae^=ae>>>24))+((1540483477*(ae>>>16)&65535)<<16)),we-=4,++Qe;switch(we){case 3:je^=(255&K.charCodeAt(Qe+2))<<16;case 2:je^=(255&K.charCodeAt(Qe+1))<<8;case 1:je=1540483477*(65535&(je^=255&K.charCodeAt(Qe)))+((1540483477*(je>>>16)&65535)<<16)}return je=1540483477*(65535&(je^=je>>>13))+((1540483477*(je>>>16)&65535)<<16),(je^=je>>>15)>>>0};var Xa=ya,Qa=Sa.exports;Ka.exports=Xa,Ka.exports.murmur3=Xa,Ka.exports.murmur2=Qa;var Aa=a(Ka.exports);class Si{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(F,ae,we,je){this.ids.push(ho(F)),this.positions.push(ae,we,je)}getPositions(F){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");const ae=ho(F);let we=0,je=this.ids.length-1;for(;we<je;){const at=we+je>>1;this.ids[at]>=ae?je=at:we=at+1}const Qe=[];for(;this.ids[we]===ae;)Qe.push({index:this.positions[3*we],start:this.positions[3*we+1],end:this.positions[3*we+2]}),we++;return Qe}static serialize(F,ae){const we=new Float64Array(F.ids),je=new Uint32Array(F.positions);return Ki(we,je,0,we.length-1),ae&&ae.push(we.buffer,je.buffer),{ids:we,positions:je}}static deserialize(F){const ae=new Si;return ae.ids=F.ids,ae.positions=F.positions,ae.indexed=!0,ae}}function ho(K){const F=+K;return!isNaN(F)&&F<=Number.MAX_SAFE_INTEGER?F:Aa(String(K))}function Ki(K,F,ae,we){for(;ae<we;){const je=K[ae+we>>1];let Qe=ae-1,at=we+1;for(;;){do Qe++;while(K[Qe]<je);do at--;while(K[at]>je);if(Qe>=at)break;lo(K,Qe,at),lo(F,3*Qe,3*at),lo(F,3*Qe+1,3*at+1),lo(F,3*Qe+2,3*at+2)}at-ae<we-at?(Ki(K,F,ae,at),ae=at+1):(Ki(K,F,at+1,we),we=at)}}function lo(K,F,ae){const we=K[F];K[F]=K[ae],K[ae]=we}oi("FeaturePositionMap",Si);class zo{constructor(F,ae){this.gl=F.gl,this.location=ae}}class qo extends zo{constructor(F,ae){super(F,ae),this.current=0}set(F){this.current!==F&&(this.current=F,this.gl.uniform1f(this.location,F))}}class nl extends zo{constructor(F,ae){super(F,ae),this.current=[0,0,0,0]}set(F){F[0]===this.current[0]&&F[1]===this.current[1]&&F[2]===this.current[2]&&F[3]===this.current[3]||(this.current=F,this.gl.uniform4f(this.location,F[0],F[1],F[2],F[3]))}}class Go extends zo{constructor(F,ae){super(F,ae),this.current=br.transparent}set(F){F.r===this.current.r&&F.g===this.current.g&&F.b===this.current.b&&F.a===this.current.a||(this.current=F,this.gl.uniform4f(this.location,F.r,F.g,F.b,F.a))}}const bs=new Float32Array(16);function fl(K){return[jn(255*K.r,255*K.g),jn(255*K.b,255*K.a)]}class ju{constructor(F,ae,we){this.value=F,this.uniformNames=ae.map(je=>`u_${je}`),this.type=we}setUniform(F,ae,we){F.set(we.constantOr(this.value))}getBinding(F,ae,we){return this.type==="color"?new Go(F,ae):new qo(F,ae)}}class ou{constructor(F,ae){this.uniformNames=ae.map(we=>`u_${we}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(F,ae){this.pixelRatioFrom=ae.pixelRatio,this.pixelRatioTo=F.pixelRatio,this.patternFrom=ae.tlbr,this.patternTo=F.tlbr}setUniform(F,ae,we,je){const Qe=je==="u_pattern_to"?this.patternTo:je==="u_pattern_from"?this.patternFrom:je==="u_pixel_ratio_to"?this.pixelRatioTo:je==="u_pixel_ratio_from"?this.pixelRatioFrom:null;Qe&&F.set(Qe)}getBinding(F,ae,we){return we.substr(0,9)==="u_pattern"?new nl(F,ae):new qo(F,ae)}}class So{constructor(F,ae,we,je){this.expression=F,this.type=we,this.maxValue=0,this.paintVertexAttributes=ae.map(Qe=>({name:`a_${Qe}`,type:"Float32",components:we==="color"?2:1,offset:0})),this.paintVertexArray=new je}populatePaintArray(F,ae,we,je,Qe){const at=this.paintVertexArray.length,St=this.expression.evaluate(new Al(0),ae,{},je,[],Qe);this.paintVertexArray.resize(F),this._setPaintValue(at,F,St)}updatePaintArray(F,ae,we,je){const Qe=this.expression.evaluate({zoom:0},we,je);this._setPaintValue(F,ae,Qe)}_setPaintValue(F,ae,we){if(this.type==="color"){const je=fl(we);for(let Qe=F;Qe<ae;Qe++)this.paintVertexArray.emplace(Qe,je[0],je[1])}else{for(let je=F;je<ae;je++)this.paintVertexArray.emplace(je,we);this.maxValue=Math.max(this.maxValue,Math.abs(we))}}upload(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}}class qs{constructor(F,ae,we,je,Qe,at){this.expression=F,this.uniformNames=ae.map(St=>`u_${St}_t`),this.type=we,this.useIntegerZoom=je,this.zoom=Qe,this.maxValue=0,this.paintVertexAttributes=ae.map(St=>({name:`a_${St}`,type:"Float32",components:we==="color"?4:2,offset:0})),this.paintVertexArray=new at}populatePaintArray(F,ae,we,je,Qe){const at=this.expression.evaluate(new Al(this.zoom),ae,{},je,[],Qe),St=this.expression.evaluate(new Al(this.zoom+1),ae,{},je,[],Qe),jt=this.paintVertexArray.length;this.paintVertexArray.resize(F),this._setPaintValue(jt,F,at,St)}updatePaintArray(F,ae,we,je){const Qe=this.expression.evaluate({zoom:this.zoom},we,je),at=this.expression.evaluate({zoom:this.zoom+1},we,je);this._setPaintValue(F,ae,Qe,at)}_setPaintValue(F,ae,we,je){if(this.type==="color"){const Qe=fl(we),at=fl(je);for(let St=F;St<ae;St++)this.paintVertexArray.emplace(St,Qe[0],Qe[1],at[0],at[1])}else{for(let Qe=F;Qe<ae;Qe++)this.paintVertexArray.emplace(Qe,we,je);this.maxValue=Math.max(this.maxValue,Math.abs(we),Math.abs(je))}}upload(F){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=F.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))}destroy(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()}setUniform(F,ae){const we=this.useIntegerZoom?Math.floor(ae.zoom):ae.zoom,je=T(this.expression.interpolationFactor(we,this.zoom,this.zoom+1),0,1);F.set(je)}getBinding(F,ae,we){return new qo(F,ae)}}class sl{constructor(F,ae,we,je,Qe,at){this.expression=F,this.type=ae,this.useIntegerZoom=we,this.zoom=je,this.layerId=at,this.zoomInPaintVertexArray=new Qe,this.zoomOutPaintVertexArray=new Qe}populatePaintArray(F,ae,we){const je=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(F),this.zoomOutPaintVertexArray.resize(F),this._setPaintValues(je,F,ae.patterns&&ae.patterns[this.layerId],we)}updatePaintArray(F,ae,we,je,Qe){this._setPaintValues(F,ae,we.patterns&&we.patterns[this.layerId],Qe)}_setPaintValues(F,ae,we,je){if(!je||!we)return;const{min:Qe,mid:at,max:St}=we,jt=je[Qe],ir=je[at],Er=je[St];if(jt&&ir&&Er)for(let Ir=F;Ir<ae;Ir++)this.zoomInPaintVertexArray.emplace(Ir,ir.tl[0],ir.tl[1],ir.br[0],ir.br[1],jt.tl[0],jt.tl[1],jt.br[0],jt.br[1],ir.pixelRatio,jt.pixelRatio),this.zoomOutPaintVertexArray.emplace(Ir,ir.tl[0],ir.tl[1],ir.br[0],ir.br[1],Er.tl[0],Er.tl[1],Er.br[0],Er.br[1],ir.pixelRatio,Er.pixelRatio)}upload(F){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=F.createVertexBuffer(this.zoomInPaintVertexArray,Vn.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=F.createVertexBuffer(this.zoomOutPaintVertexArray,Vn.members,this.expression.isStateDependent))}destroy(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()}}class tu{constructor(F,ae,we){this.binders={},this._buffers=[];const je=[];for(const Qe in F.paint._values){if(!we(Qe))continue;const at=F.paint.get(Qe);if(!(at instanceof Ou&&ic(at.property.specification)))continue;const St=Lc(Qe,F.type),jt=at.value,ir=at.property.specification.type,Er=at.property.useIntegerZoom,Ir=at.property.specification["property-type"],rn=Ir==="cross-faded"||Ir==="cross-faded-data-driven";if(jt.kind==="constant")this.binders[Qe]=rn?new ou(jt.value,St):new ju(jt.value,St,ir),je.push(`/u_${Qe}`);else if(jt.kind==="source"||rn){const vn=Ol(Qe,ir,"source");this.binders[Qe]=rn?new sl(jt,ir,Er,ae,vn,F.id):new So(jt,St,ir,vn),je.push(`/a_${Qe}`)}else{const vn=Ol(Qe,ir,"composite");this.binders[Qe]=new qs(jt,St,ir,Er,ae,vn),je.push(`/z_${Qe}`)}}this.cacheKey=je.sort().join("")}getMaxValue(F){const ae=this.binders[F];return ae instanceof So||ae instanceof qs?ae.maxValue:0}populatePaintArrays(F,ae,we,je,Qe){for(const at in this.binders){const St=this.binders[at];(St instanceof So||St instanceof qs||St instanceof sl)&&St.populatePaintArray(F,ae,we,je,Qe)}}setConstantPatternPositions(F,ae){for(const we in this.binders){const je=this.binders[we];je instanceof ou&&je.setConstantPatternPositions(F,ae)}}updatePaintArrays(F,ae,we,je,Qe){let at=!1;for(const St in F){const jt=ae.getPositions(St);for(const ir of jt){const Er=we.feature(ir.index);for(const Ir in this.binders){const rn=this.binders[Ir];if((rn instanceof So||rn instanceof qs||rn instanceof sl)&&rn.expression.isStateDependent===!0){const vn=je.paint.get(Ir);rn.expression=vn.value,rn.updatePaintArray(ir.start,ir.end,Er,F[St],Qe),at=!0}}}}return at}defines(){const F=[];for(const ae in this.binders){const we=this.binders[ae];(we instanceof ju||we instanceof ou)&&F.push(...we.uniformNames.map(je=>`#define HAS_UNIFORM_${je}`))}return F}getBinderAttributes(){const F=[];for(const ae in this.binders){const we=this.binders[ae];if(we instanceof So||we instanceof qs)for(let je=0;je<we.paintVertexAttributes.length;je++)F.push(we.paintVertexAttributes[je].name);else if(we instanceof sl)for(let je=0;je<Vn.members.length;je++)F.push(Vn.members[je].name)}return F}getBinderUniforms(){const F=[];for(const ae in this.binders){const we=this.binders[ae];if(we instanceof ju||we instanceof ou||we instanceof qs)for(const je of we.uniformNames)F.push(je)}return F}getPaintVertexBuffers(){return this._buffers}getUniforms(F,ae){const we=[];for(const je in this.binders){const Qe=this.binders[je];if(Qe instanceof ju||Qe instanceof ou||Qe instanceof qs){for(const at of Qe.uniformNames)if(ae[at]){const St=Qe.getBinding(F,ae[at],at);we.push({name:at,property:je,binding:St})}}}return we}setUniforms(F,ae,we,je){for(const{name:Qe,property:at,binding:St}of ae)this.binders[at].setUniform(St,je,we.get(at),Qe)}updatePaintBuffers(F){this._buffers=[];for(const ae in this.binders){const we=this.binders[ae];if(F&&we instanceof sl){const je=F.fromScale===2?we.zoomInPaintVertexBuffer:we.zoomOutPaintVertexBuffer;je&&this._buffers.push(je)}else(we instanceof So||we instanceof qs)&&we.paintVertexBuffer&&this._buffers.push(we.paintVertexBuffer)}}upload(F){for(const ae in this.binders){const we=this.binders[ae];(we instanceof So||we instanceof qs||we instanceof sl)&&we.upload(F)}this.updatePaintBuffers()}destroy(){for(const F in this.binders){const ae=this.binders[F];(ae instanceof So||ae instanceof qs||ae instanceof sl)&&ae.destroy()}}}class Vl{constructor(F,ae,we=()=>!0){this.programConfigurations={};for(const je of F)this.programConfigurations[je.id]=new tu(je,ae,we);this.needsUpload=!1,this._featureMap=new Si,this._bufferOffset=0}populatePaintArrays(F,ae,we,je,Qe,at){for(const St in this.programConfigurations)this.programConfigurations[St].populatePaintArrays(F,ae,je,Qe,at);ae.id!==void 0&&this._featureMap.add(ae.id,we,this._bufferOffset,F),this._bufferOffset=F,this.needsUpload=!0}updatePaintArrays(F,ae,we,je){for(const Qe of we)this.needsUpload=this.programConfigurations[Qe.id].updatePaintArrays(F,this._featureMap,ae,Qe,je)||this.needsUpload}get(F){return this.programConfigurations[F]}upload(F){if(this.needsUpload){for(const ae in this.programConfigurations)this.programConfigurations[ae].upload(F);this.needsUpload=!1}}destroy(){for(const F in this.programConfigurations)this.programConfigurations[F].destroy()}}function Lc(K,F){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[K]||[K.replace(`${F}-`,"").replace(/-/g,"_")]}function Ol(K,F,ae){const we={color:{source:Dn,composite:Ti},number:{source:bn,composite:Dn}},je=(function(Qe){return{"line-pattern":{source:He,composite:He},"fill-pattern":{source:He,composite:He},"fill-extrusion-pattern":{source:He,composite:He}}[Qe]})(K);return je&&je[ae]||we[F][ae]}oi("ConstantBinder",ju),oi("CrossFadedConstantBinder",ou),oi("SourceExpressionBinder",So),oi("CrossFadedCompositeBinder",sl),oi("CompositeExpressionBinder",qs),oi("ProgramConfiguration",tu,{omit:["_buffers"]}),oi("ProgramConfigurationSet",Vl);const ru=8192,af=Math.pow(2,14)-1,zu=-af-1;function At(K){const F=ru/K.extent,ae=K.loadGeometry();for(let we=0;we<ae.length;we++){const je=ae[we];for(let Qe=0;Qe<je.length;Qe++){const at=je[Qe],St=Math.round(at.x*F),jt=Math.round(at.y*F);at.x=T(St,zu,af),at.y=T(jt,zu,af),(St<at.x||St>at.x+1||jt<at.y||jt>at.y+1)&&x("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return ae}function kr(K,F){return{type:K.type,id:K.id,properties:K.properties,geometry:F?At(K):[]}}function Dr(K,F,ae,we,je){K.emplaceBack(2*F+(we+1)/2,2*ae+(je+1)/2)}class Hn{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new Us,this.indexArray=new fr,this.segments=new Mn,this.programConfigurations=new Vl(F.layers,F.zoom),this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){const je=this.layers[0],Qe=[];let at=null,St=!1;je.type==="circle"&&(at=je.layout.get("circle-sort-key"),St=!at.isConstant());for(const{feature:jt,id:ir,index:Er,sourceLayerIndex:Ir}of F){const rn=this.layers[0]._featureFilter.needGeometry,vn=kr(jt,rn);if(!this.layers[0]._featureFilter.filter(new Al(this.zoom),vn,we))continue;const Cn=St?at.evaluate(vn,{},we):void 0,Bn={id:ir,properties:jt.properties,type:jt.type,sourceLayerIndex:Ir,index:Er,geometry:rn?vn.geometry:At(jt),patterns:{},sortKey:Cn};Qe.push(Bn)}St&&Qe.sort((jt,ir)=>jt.sortKey-ir.sortKey);for(const jt of Qe){const{geometry:ir,index:Er,sourceLayerIndex:Ir}=jt,rn=F[Er].feature;this.addFeature(jt,ir,Er,we),ae.featureIndex.insert(rn,ir,Er,Ir,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,on),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(F,ae,we,je){for(const Qe of ae)for(const at of Qe){const St=at.x,jt=at.y;if(St<0||St>=ru||jt<0||jt>=ru)continue;const ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,F.sortKey),Er=ir.vertexLength;Dr(this.layoutVertexArray,St,jt,-1,-1),Dr(this.layoutVertexArray,St,jt,1,-1),Dr(this.layoutVertexArray,St,jt,1,1),Dr(this.layoutVertexArray,St,jt,-1,1),this.indexArray.emplaceBack(Er,Er+1,Er+2),this.indexArray.emplaceBack(Er,Er+3,Er+2),ir.vertexLength+=4,ir.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,{},je)}}function Ca(K,F){for(let ae=0;ae<K.length;ae++)if(fi(F,K[ae]))return!0;for(let ae=0;ae<F.length;ae++)if(fi(K,F[ae]))return!0;return!!ei(K,F)}function Rn(K,F,ae){return!!fi(K,F)||!!pi(F,K,ae)}function Pn(K,F){if(K.length===1)return Bi(F,K[0]);for(let ae=0;ae<F.length;ae++){const we=F[ae];for(let je=0;je<we.length;je++)if(fi(K,we[je]))return!0}for(let ae=0;ae<K.length;ae++)if(Bi(F,K[ae]))return!0;for(let ae=0;ae<F.length;ae++)if(ei(K,F[ae]))return!0;return!1}function ri(K,F,ae){if(K.length>1){if(ei(K,F))return!0;for(let we=0;we<F.length;we++)if(pi(F[we],K,ae))return!0}for(let we=0;we<K.length;we++)if(pi(K[we],F,ae))return!0;return!1}function ei(K,F){if(K.length===0||F.length===0)return!1;for(let ae=0;ae<K.length-1;ae++){const we=K[ae],je=K[ae+1];for(let Qe=0;Qe<F.length-1;Qe++)if(ti(we,je,F[Qe],F[Qe+1]))return!0}return!1}function ti(K,F,ae,we){return N(K,ae,we)!==N(F,ae,we)&&N(K,F,ae)!==N(K,F,we)}function pi(K,F,ae){const we=ae*ae;if(F.length===1)return K.distSqr(F[0])<we;for(let je=1;je<F.length;je++)if(eo(K,F[je-1],F[je])<we)return!0;return!1}function eo(K,F,ae){const we=F.distSqr(ae);if(we===0)return K.distSqr(F);const je=((K.x-F.x)*(ae.x-F.x)+(K.y-F.y)*(ae.y-F.y))/we;return K.distSqr(je<0?F:je>1?ae:ae.sub(F)._mult(je)._add(F))}function Bi(K,F){let ae,we,je,Qe=!1;for(let at=0;at<K.length;at++){ae=K[at];for(let St=0,jt=ae.length-1;St<ae.length;jt=St++)we=ae[St],je=ae[jt],we.y>F.y!=je.y>F.y&&F.x<(je.x-we.x)*(F.y-we.y)/(je.y-we.y)+we.x&&(Qe=!Qe)}return Qe}function fi(K,F){let ae=!1;for(let we=0,je=K.length-1;we<K.length;je=we++){const Qe=K[we],at=K[je];Qe.y>F.y!=at.y>F.y&&F.x<(at.x-Qe.x)*(F.y-Qe.y)/(at.y-Qe.y)+Qe.x&&(ae=!ae)}return ae}function Oa(K,F,ae){const we=ae[0],je=ae[2];if(K.x<we.x&&F.x<we.x||K.x>je.x&&F.x>je.x||K.y<we.y&&F.y<we.y||K.y>je.y&&F.y>je.y)return!1;const Qe=N(K,F,ae[0]);return Qe!==N(K,F,ae[1])||Qe!==N(K,F,ae[2])||Qe!==N(K,F,ae[3])}function gn(K,F,ae){const we=F.paint.get(K).value;return we.kind==="constant"?we.value:ae.programConfigurations.get(F.id).getMaxValue(K)}function Kn(K){return Math.sqrt(K[0]*K[0]+K[1]*K[1])}function ga(K,F,ae,we,je){if(!F[0]&&!F[1])return K;const Qe=s.convert(F)._mult(je);ae==="viewport"&&Qe._rotate(-we);const at=[];for(let St=0;St<K.length;St++)at.push(K[St].sub(Qe));return at}let za,wa;oi("CircleBucket",Hn,{omit:["layers"]});var Ii={get paint(){return wa=wa||new Ze({"circle-radius":new _s(ue.paint_circle["circle-radius"]),"circle-color":new _s(ue.paint_circle["circle-color"]),"circle-blur":new _s(ue.paint_circle["circle-blur"]),"circle-opacity":new _s(ue.paint_circle["circle-opacity"]),"circle-translate":new os(ue.paint_circle["circle-translate"]),"circle-translate-anchor":new os(ue.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new os(ue.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new os(ue.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new _s(ue.paint_circle["circle-stroke-width"]),"circle-stroke-color":new _s(ue.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new _s(ue.paint_circle["circle-stroke-opacity"])})},get layout(){return za=za||new Ze({"circle-sort-key":new _s(ue.layout_circle["circle-sort-key"])})}},si=1e-6,$i=typeof Float32Array<"u"?Float32Array:Array;function Ta(K){return K[0]=1,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=1,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=1,K[11]=0,K[12]=0,K[13]=0,K[14]=0,K[15]=1,K}function ca(K,F,ae){var we=F[0],je=F[1],Qe=F[2],at=F[3],St=F[4],jt=F[5],ir=F[6],Er=F[7],Ir=F[8],rn=F[9],vn=F[10],Cn=F[11],Bn=F[12],Qn=F[13],Ia=F[14],Mi=F[15],ii=ae[0],bi=ae[1],Qi=ae[2],Co=ae[3];return K[0]=ii*we+bi*St+Qi*Ir+Co*Bn,K[1]=ii*je+bi*jt+Qi*rn+Co*Qn,K[2]=ii*Qe+bi*ir+Qi*vn+Co*Ia,K[3]=ii*at+bi*Er+Qi*Cn+Co*Mi,K[4]=(ii=ae[4])*we+(bi=ae[5])*St+(Qi=ae[6])*Ir+(Co=ae[7])*Bn,K[5]=ii*je+bi*jt+Qi*rn+Co*Qn,K[6]=ii*Qe+bi*ir+Qi*vn+Co*Ia,K[7]=ii*at+bi*Er+Qi*Cn+Co*Mi,K[8]=(ii=ae[8])*we+(bi=ae[9])*St+(Qi=ae[10])*Ir+(Co=ae[11])*Bn,K[9]=ii*je+bi*jt+Qi*rn+Co*Qn,K[10]=ii*Qe+bi*ir+Qi*vn+Co*Ia,K[11]=ii*at+bi*Er+Qi*Cn+Co*Mi,K[12]=(ii=ae[12])*we+(bi=ae[13])*St+(Qi=ae[14])*Ir+(Co=ae[15])*Bn,K[13]=ii*je+bi*jt+Qi*rn+Co*Qn,K[14]=ii*Qe+bi*ir+Qi*vn+Co*Ia,K[15]=ii*at+bi*Er+Qi*Cn+Co*Mi,K}Math.hypot||(Math.hypot=function(){for(var K=0,F=arguments.length;F--;)K+=arguments[F]*arguments[F];return Math.sqrt(K)});var Ei,Yn=ca;function yi(K,F,ae){var we=F[0],je=F[1],Qe=F[2],at=F[3];return K[0]=ae[0]*we+ae[4]*je+ae[8]*Qe+ae[12]*at,K[1]=ae[1]*we+ae[5]*je+ae[9]*Qe+ae[13]*at,K[2]=ae[2]*we+ae[6]*je+ae[10]*Qe+ae[14]*at,K[3]=ae[3]*we+ae[7]*je+ae[11]*Qe+ae[15]*at,K}Ei=new $i(4),$i!=Float32Array&&(Ei[0]=0,Ei[1]=0,Ei[2]=0,Ei[3]=0);class ni extends fe{constructor(F){super(F,Ii)}createBucket(F){return new Hn(F)}queryRadius(F){const ae=F;return gn("circle-radius",this,ae)+gn("circle-stroke-width",this,ae)+Kn(this.paint.get("circle-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,St,jt){const ir=ga(F,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),at.angle,St),Er=this.paint.get("circle-radius").evaluate(ae,we)+this.paint.get("circle-stroke-width").evaluate(ae,we),Ir=this.paint.get("circle-pitch-alignment")==="map",rn=Ir?ir:(function(Cn,Bn){return Cn.map(Qn=>Ji(Qn,Bn))})(ir,jt),vn=Ir?Er*St:Er;for(const Cn of je)for(const Bn of Cn){const Qn=Ir?Bn:Ji(Bn,jt);let Ia=vn;const Mi=yi([],[Bn.x,Bn.y,0,1],jt);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Ia*=Mi[3]/at.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Ia*=at.cameraToCenterDistance/Mi[3]),Rn(rn,Qn,Ia))return!0}return!1}}function Ji(K,F){const ae=yi([],[K.x,K.y,0,1],F);return new s(ae[0]/ae[3],ae[1]/ae[3])}class Ho extends Hn{}let ji;oi("HeatmapBucket",Ho,{omit:["layers"]});var no={get paint(){return ji=ji||new Ze({"heatmap-radius":new _s(ue.paint_heatmap["heatmap-radius"]),"heatmap-weight":new _s(ue.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new os(ue.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Gc(ue.paint_heatmap["heatmap-color"]),"heatmap-opacity":new os(ue.paint_heatmap["heatmap-opacity"])})}};function di(K,{width:F,height:ae},we,je){if(je){if(je instanceof Uint8ClampedArray)je=new Uint8Array(je.buffer);else if(je.length!==F*ae*we)throw new RangeError(`mismatched image size. expected: ${je.length} but got: ${F*ae*we}`)}else je=new Uint8Array(F*ae*we);return K.width=F,K.height=ae,K.data=je,K}function jo(K,{width:F,height:ae},we){if(F===K.width&&ae===K.height)return;const je=di({},{width:F,height:ae},we);rs(K,je,{x:0,y:0},{x:0,y:0},{width:Math.min(K.width,F),height:Math.min(K.height,ae)},we),K.width=F,K.height=ae,K.data=je.data}function rs(K,F,ae,we,je,Qe){if(je.width===0||je.height===0)return F;if(je.width>K.width||je.height>K.height||ae.x>K.width-je.width||ae.y>K.height-je.height)throw new RangeError("out of range source coordinates for image copy");if(je.width>F.width||je.height>F.height||we.x>F.width-je.width||we.y>F.height-je.height)throw new RangeError("out of range destination coordinates for image copy");const at=K.data,St=F.data;if(at===St)throw new Error("srcData equals dstData, so image is already copied");for(let jt=0;jt<je.height;jt++){const ir=((ae.y+jt)*K.width+ae.x)*Qe,Er=((we.y+jt)*F.width+we.x)*Qe;for(let Ir=0;Ir<je.width*Qe;Ir++)St[Er+Ir]=at[ir+Ir]}return F}class ds{constructor(F,ae){di(this,F,1,ae)}resize(F){jo(this,F,1)}clone(){return new ds({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(F,ae,we,je,Qe){rs(F,ae,we,je,Qe,1)}}class _l{constructor(F,ae){di(this,F,4,ae)}resize(F){jo(this,F,4)}replace(F,ae){ae?this.data.set(F):this.data=F instanceof Uint8ClampedArray?new Uint8Array(F.buffer):F}clone(){return new _l({width:this.width,height:this.height},new Uint8Array(this.data))}static copy(F,ae,we,je,Qe){rs(F,ae,we,je,Qe,4)}}function vs(K){const F={},ae=K.resolution||256,we=K.clips?K.clips.length:1,je=K.image||new _l({width:ae,height:we});if(Math.log(ae)/Math.LN2%1!=0)throw new Error(`width is not a power of 2 - ${ae}`);const Qe=(at,St,jt)=>{F[K.evaluationKey]=jt;const ir=K.expression.evaluate(F);je.data[at+St+0]=Math.floor(255*ir.r/ir.a),je.data[at+St+1]=Math.floor(255*ir.g/ir.a),je.data[at+St+2]=Math.floor(255*ir.b/ir.a),je.data[at+St+3]=Math.floor(255*ir.a)};if(K.clips)for(let at=0,St=0;at<we;++at,St+=4*ae)for(let jt=0,ir=0;jt<ae;jt++,ir+=4){const Er=jt/(ae-1),{start:Ir,end:rn}=K.clips[at];Qe(St,ir,Ir*(1-Er)+rn*Er)}else for(let at=0,St=0;at<ae;at++,St+=4)Qe(0,St,at/(ae-1));return je}oi("AlphaImage",ds),oi("RGBAImage",_l);const Lu="big-fb";class ll extends fe{createBucket(F){return new Ho(F)}constructor(F){super(F,no),this.heatmapFbos=new Map,this._updateColorRamp()}_handleSpecialPaintPropertyUpdate(F){F==="heatmap-color"&&this._updateColorRamp()}_updateColorRamp(){this.colorRamp=vs({expression:this._transitionablePaint._values["heatmap-color"].value.expression,evaluationKey:"heatmapDensity",image:this.colorRamp}),this.colorRampTexture=null}resize(){this.heatmapFbos.has(Lu)&&this.heatmapFbos.delete(Lu)}queryRadius(){return 0}queryIntersectsFeature(){return!1}hasOffscreenPass(){return this.paint.get("heatmap-opacity")!==0&&this.visibility!=="none"}}let wu;var Gu={get paint(){return wu=wu||new Ze({"hillshade-illumination-direction":new os(ue.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new os(ue.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new os(ue.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new os(ue.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new os(ue.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new os(ue.paint_hillshade["hillshade-accent-color"])})}};class oc extends fe{constructor(F){super(F,Gu)}hasOffscreenPass(){return this.paint.get("hillshade-exaggeration")!==0&&this.visibility!=="none"}}const Mf=Mt([{name:"a_pos",components:2,type:"Int16"}],4),{members:su}=Mf;function gu(K,F,ae=2){const we=F&&F.length,je=we?F[0]*ae:K.length;let Qe=ko(K,0,je,ae,!0);const at=[];if(!Qe||Qe.next===Qe.prev)return at;let St,jt,ir;if(we&&(Qe=(function(Er,Ir,rn,vn){const Cn=[];for(let Bn=0,Qn=Ir.length;Bn<Qn;Bn++){const Ia=ko(Er,Ir[Bn]*vn,Bn<Qn-1?Ir[Bn+1]*vn:Er.length,vn,!1);Ia===Ia.next&&(Ia.steiner=!0),Cn.push(ge(Ia))}Cn.sort(Ms);for(let Bn=0;Bn<Cn.length;Bn++)rn=Rs(Cn[Bn],rn);return rn})(K,F,Qe,ae)),K.length>80*ae){St=1/0,jt=1/0;let Er=-1/0,Ir=-1/0;for(let rn=ae;rn<je;rn+=ae){const vn=K[rn],Cn=K[rn+1];vn<St&&(St=vn),Cn<jt&&(jt=Cn),vn>Er&&(Er=vn),Cn>Ir&&(Ir=Cn)}ir=Math.max(Er-St,Ir-jt),ir=ir!==0?32767/ir:0}return $s(Qe,at,ae,St,jt,ir,0),at}function ko(K,F,ae,we,je){let Qe;if(je===(function(at,St,jt,ir){let Er=0;for(let Ir=St,rn=jt-ir;Ir<jt;Ir+=ir)Er+=(at[rn]-at[Ir])*(at[Ir+1]+at[rn+1]),rn=Ir;return Er})(K,F,ae,we)>0)for(let at=F;at<ae;at+=we)Qe=er(at/we|0,K[at],K[at+1],Qe);else for(let at=ae-we;at>=F;at-=we)Qe=er(at/we|0,K[at],K[at+1],Qe);return Qe&&_t(Qe,Qe.next)&&(ur(Qe),Qe=Qe.next),Qe}function sc(K,F){if(!K)return K;F||(F=K);let ae,we=K;do if(ae=!1,we.steiner||!_t(we,we.next)&&Je(we.prev,we,we.next)!==0)we=we.next;else{if(ur(we),we=F=we.prev,we===we.next)break;ae=!0}while(ae||we!==F);return F}function $s(K,F,ae,we,je,Qe,at){if(!K)return;!at&&Qe&&(function(jt,ir,Er,Ir){let rn=jt;do rn.z===0&&(rn.z=X(rn.x,rn.y,ir,Er,Ir)),rn.prevZ=rn.prev,rn.nextZ=rn.next,rn=rn.next;while(rn!==jt);rn.prevZ.nextZ=null,rn.prevZ=null,(function(vn){let Cn,Bn=1;do{let Qn,Ia=vn;vn=null;let Mi=null;for(Cn=0;Ia;){Cn++;let ii=Ia,bi=0;for(let Co=0;Co<Bn&&(bi++,ii=ii.nextZ,ii);Co++);let Qi=Bn;for(;bi>0||Qi>0&&ii;)bi!==0&&(Qi===0||!ii||Ia.z<=ii.z)?(Qn=Ia,Ia=Ia.nextZ,bi--):(Qn=ii,ii=ii.nextZ,Qi--),Mi?Mi.nextZ=Qn:vn=Qn,Qn.prevZ=Mi,Mi=Qn;Ia=ii}Mi.nextZ=null,Bn*=2}while(Cn>1)})(rn)})(K,we,je,Qe);let St=K;for(;K.prev!==K.next;){const jt=K.prev,ir=K.next;if(Qe?gc(K,we,je,Qe):Hl(K))F.push(jt.i,K.i,ir.i),ur(K),K=ir.next,St=ir.next;else if((K=ir)===St){at?at===1?$s(K=_c(sc(K),F),F,ae,we,je,Qe,2):at===2&&Vo(K,F,ae,we,je,Qe):$s(sc(K),F,ae,we,je,Qe,1);break}}}function Hl(K){const F=K.prev,ae=K,we=K.next;if(Je(F,ae,we)>=0)return!1;const je=F.x,Qe=ae.x,at=we.x,St=F.y,jt=ae.y,ir=we.y,Er=je<Qe?je<at?je:at:Qe<at?Qe:at,Ir=St<jt?St<ir?St:ir:jt<ir?jt:ir,rn=je>Qe?je>at?je:at:Qe>at?Qe:at,vn=St>jt?St>ir?St:ir:jt>ir?jt:ir;let Cn=we.next;for(;Cn!==F;){if(Cn.x>=Er&&Cn.x<=rn&&Cn.y>=Ir&&Cn.y<=vn&&ne(je,St,Qe,jt,at,ir,Cn.x,Cn.y)&&Je(Cn.prev,Cn,Cn.next)>=0)return!1;Cn=Cn.next}return!0}function gc(K,F,ae,we){const je=K.prev,Qe=K,at=K.next;if(Je(je,Qe,at)>=0)return!1;const St=je.x,jt=Qe.x,ir=at.x,Er=je.y,Ir=Qe.y,rn=at.y,vn=St<jt?St<ir?St:ir:jt<ir?jt:ir,Cn=Er<Ir?Er<rn?Er:rn:Ir<rn?Ir:rn,Bn=St>jt?St>ir?St:ir:jt>ir?jt:ir,Qn=Er>Ir?Er>rn?Er:rn:Ir>rn?Ir:rn,Ia=X(vn,Cn,F,ae,we),Mi=X(Bn,Qn,F,ae,we);let ii=K.prevZ,bi=K.nextZ;for(;ii&&ii.z>=Ia&&bi&&bi.z<=Mi;){if(ii.x>=vn&&ii.x<=Bn&&ii.y>=Cn&&ii.y<=Qn&&ii!==je&&ii!==at&&ne(St,Er,jt,Ir,ir,rn,ii.x,ii.y)&&Je(ii.prev,ii,ii.next)>=0||(ii=ii.prevZ,bi.x>=vn&&bi.x<=Bn&&bi.y>=Cn&&bi.y<=Qn&&bi!==je&&bi!==at&&ne(St,Er,jt,Ir,ir,rn,bi.x,bi.y)&&Je(bi.prev,bi,bi.next)>=0))return!1;bi=bi.nextZ}for(;ii&&ii.z>=Ia;){if(ii.x>=vn&&ii.x<=Bn&&ii.y>=Cn&&ii.y<=Qn&&ii!==je&&ii!==at&&ne(St,Er,jt,Ir,ir,rn,ii.x,ii.y)&&Je(ii.prev,ii,ii.next)>=0)return!1;ii=ii.prevZ}for(;bi&&bi.z<=Mi;){if(bi.x>=vn&&bi.x<=Bn&&bi.y>=Cn&&bi.y<=Qn&&bi!==je&&bi!==at&&ne(St,Er,jt,Ir,ir,rn,bi.x,bi.y)&&Je(bi.prev,bi,bi.next)>=0)return!1;bi=bi.nextZ}return!0}function _c(K,F){let ae=K;do{const we=ae.prev,je=ae.next.next;!_t(we,je)&&Tt(we,ae,ae.next,je)&&Lt(we,je)&&Lt(je,we)&&(F.push(we.i,ae.i,je.i),ur(ae),ur(ae.next),ae=K=je),ae=ae.next}while(ae!==K);return sc(ae)}function Vo(K,F,ae,we,je,Qe){let at=K;do{let St=at.next.next;for(;St!==at.prev;){if(at.i!==St.i&&Se(at,St)){let jt=or(at,St);return at=sc(at,at.next),jt=sc(jt,jt.next),$s(at,F,ae,we,je,Qe,0),void $s(jt,F,ae,we,je,Qe,0)}St=St.next}at=at.next}while(at!==K)}function Ms(K,F){return K.x-F.x}function Rs(K,F){const ae=(function(je,Qe){let at=Qe;const St=je.x,jt=je.y;let ir,Er=-1/0;do{if(jt<=at.y&&jt>=at.next.y&&at.next.y!==at.y){const Bn=at.x+(jt-at.y)*(at.next.x-at.x)/(at.next.y-at.y);if(Bn<=St&&Bn>Er&&(Er=Bn,ir=at.x<at.next.x?at:at.next,Bn===St))return ir}at=at.next}while(at!==Qe);if(!ir)return null;const Ir=ir,rn=ir.x,vn=ir.y;let Cn=1/0;at=ir;do{if(St>=at.x&&at.x>=rn&&St!==at.x&&ne(jt<vn?St:Er,jt,rn,vn,jt<vn?Er:St,jt,at.x,at.y)){const Bn=Math.abs(jt-at.y)/(St-at.x);Lt(at,je)&&(Bn<Cn||Bn===Cn&&(at.x>ir.x||at.x===ir.x&&Me(ir,at)))&&(ir=at,Cn=Bn)}at=at.next}while(at!==Ir);return ir})(K,F);if(!ae)return F;const we=or(ae,K);return sc(we,we.next),sc(ae,ae.next)}function Me(K,F){return Je(K.prev,K,F.prev)<0&&Je(F.next,K,K.next)<0}function X(K,F,ae,we,je){return(K=1431655765&((K=858993459&((K=252645135&((K=16711935&((K=(K-ae)*je|0)|K<<8))|K<<4))|K<<2))|K<<1))|(F=1431655765&((F=858993459&((F=252645135&((F=16711935&((F=(F-we)*je|0)|F<<8))|F<<4))|F<<2))|F<<1))<<1}function ge(K){let F=K,ae=K;do(F.x<ae.x||F.x===ae.x&&F.y<ae.y)&&(ae=F),F=F.next;while(F!==K);return ae}function ne(K,F,ae,we,je,Qe,at,St){return(je-at)*(F-St)>=(K-at)*(Qe-St)&&(K-at)*(we-St)>=(ae-at)*(F-St)&&(ae-at)*(Qe-St)>=(je-at)*(we-St)}function Se(K,F){return K.next.i!==F.i&&K.prev.i!==F.i&&!(function(ae,we){let je=ae;do{if(je.i!==ae.i&&je.next.i!==ae.i&&je.i!==we.i&&je.next.i!==we.i&&Tt(je,je.next,ae,we))return!0;je=je.next}while(je!==ae);return!1})(K,F)&&(Lt(K,F)&&Lt(F,K)&&(function(ae,we){let je=ae,Qe=!1;const at=(ae.x+we.x)/2,St=(ae.y+we.y)/2;do je.y>St!=je.next.y>St&&je.next.y!==je.y&&at<(je.next.x-je.x)*(St-je.y)/(je.next.y-je.y)+je.x&&(Qe=!Qe),je=je.next;while(je!==ae);return Qe})(K,F)&&(Je(K.prev,K,F.prev)||Je(K,F.prev,F))||_t(K,F)&&Je(K.prev,K,K.next)>0&&Je(F.prev,F,F.next)>0)}function Je(K,F,ae){return(F.y-K.y)*(ae.x-F.x)-(F.x-K.x)*(ae.y-F.y)}function _t(K,F){return K.x===F.x&&K.y===F.y}function Tt(K,F,ae,we){const je=dt(Je(K,F,ae)),Qe=dt(Je(K,F,we)),at=dt(Je(ae,we,K)),St=dt(Je(ae,we,F));return je!==Qe&&at!==St||!(je!==0||!it(K,ae,F))||!(Qe!==0||!it(K,we,F))||!(at!==0||!it(ae,K,we))||!(St!==0||!it(ae,F,we))}function it(K,F,ae){return F.x<=Math.max(K.x,ae.x)&&F.x>=Math.min(K.x,ae.x)&&F.y<=Math.max(K.y,ae.y)&&F.y>=Math.min(K.y,ae.y)}function dt(K){return K>0?1:K<0?-1:0}function Lt(K,F){return Je(K.prev,K,K.next)<0?Je(K,F,K.next)>=0&&Je(K,K.prev,F)>=0:Je(K,F,K.prev)<0||Je(K,K.next,F)<0}function or(K,F){const ae=mr(K.i,K.x,K.y),we=mr(F.i,F.x,F.y),je=K.next,Qe=F.prev;return K.next=F,F.prev=K,ae.next=je,je.prev=ae,we.next=ae,ae.prev=we,Qe.next=we,we.prev=Qe,we}function er(K,F,ae,we){const je=mr(K,F,ae);return we?(je.next=we.next,je.prev=we,we.next.prev=je,we.next=je):(je.prev=je,je.next=je),je}function ur(K){K.next.prev=K.prev,K.prev.next=K.next,K.prevZ&&(K.prevZ.nextZ=K.nextZ),K.nextZ&&(K.nextZ.prevZ=K.prevZ)}function mr(K,F,ae){return{i:K,x:F,y:ae,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function dr(K,F,ae){const we=ae.patternDependencies;let je=!1;for(const Qe of F){const at=Qe.paint.get(`${K}-pattern`);at.isConstant()||(je=!0);const St=at.constantOr(null);St&&(je=!0,we[St.to]=!0,we[St.from]=!0)}return je}function Yt(K,F,ae,we,je){const Qe=je.patternDependencies;for(const at of F){const St=at.paint.get(`${K}-pattern`).value;if(St.kind!=="constant"){let jt=St.evaluate({zoom:we-1},ae,{},je.availableImages),ir=St.evaluate({zoom:we},ae,{},je.availableImages),Er=St.evaluate({zoom:we+1},ae,{},je.availableImages);jt=jt&&jt.name?jt.name:jt,ir=ir&&ir.name?ir.name:ir,Er=Er&&Er.name?Er.name:Er,Qe[jt]=!0,Qe[ir]=!0,Qe[Er]=!0,ae.patterns[at.id]={min:jt,mid:ir,max:Er}}}return ae}class ar{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Bu,this.indexArray=new fr,this.indexArray2=new Pr,this.programConfigurations=new Vl(F.layers,F.zoom),this.segments=new Mn,this.segments2=new Mn,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.hasPattern=dr("fill",this.layers,ae);const je=this.layers[0].layout.get("fill-sort-key"),Qe=!je.isConstant(),at=[];for(const{feature:St,id:jt,index:ir,sourceLayerIndex:Er}of F){const Ir=this.layers[0]._featureFilter.needGeometry,rn=kr(St,Ir);if(!this.layers[0]._featureFilter.filter(new Al(this.zoom),rn,we))continue;const vn=Qe?je.evaluate(rn,{},we,ae.availableImages):void 0,Cn={id:jt,properties:St.properties,type:St.type,sourceLayerIndex:Er,index:ir,geometry:Ir?rn.geometry:At(St),patterns:{},sortKey:vn};at.push(Cn)}Qe&&at.sort((St,jt)=>St.sortKey-jt.sortKey);for(const St of at){const{geometry:jt,index:ir,sourceLayerIndex:Er}=St;if(this.hasPattern){const Ir=Yt("fill",this.layers,St,this.zoom,ae);this.patternFeatures.push(Ir)}else this.addFeature(St,jt,ir,we,{});ae.featureIndex.insert(F[ir].feature,jt,ir,Er,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}addFeatures(F,ae,we){for(const je of this.patternFeatures)this.addFeature(je,je.geometry,je.index,ae,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,su),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.indexBuffer2=F.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(F),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(F,ae,we,je,Qe){for(const at of Qc(ae,500)){let St=0;for(const vn of at)St+=vn.length;const jt=this.segments.prepareSegment(St,this.layoutVertexArray,this.indexArray),ir=jt.vertexLength,Er=[],Ir=[];for(const vn of at){if(vn.length===0)continue;vn!==at[0]&&Ir.push(Er.length/2);const Cn=this.segments2.prepareSegment(vn.length,this.layoutVertexArray,this.indexArray2),Bn=Cn.vertexLength;this.layoutVertexArray.emplaceBack(vn[0].x,vn[0].y),this.indexArray2.emplaceBack(Bn+vn.length-1,Bn),Er.push(vn[0].x),Er.push(vn[0].y);for(let Qn=1;Qn<vn.length;Qn++)this.layoutVertexArray.emplaceBack(vn[Qn].x,vn[Qn].y),this.indexArray2.emplaceBack(Bn+Qn-1,Bn+Qn),Er.push(vn[Qn].x),Er.push(vn[Qn].y);Cn.vertexLength+=vn.length,Cn.primitiveLength+=vn.length}const rn=gu(Er,Ir);for(let vn=0;vn<rn.length;vn+=3)this.indexArray.emplaceBack(ir+rn[vn],ir+rn[vn+1],ir+rn[vn+2]);jt.vertexLength+=St,jt.primitiveLength+=rn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}}let tr,Yr;oi("FillBucket",ar,{omit:["layers","patternFeatures"]});var un={get paint(){return Yr=Yr||new Ze({"fill-antialias":new os(ue.paint_fill["fill-antialias"]),"fill-opacity":new _s(ue.paint_fill["fill-opacity"]),"fill-color":new _s(ue.paint_fill["fill-color"]),"fill-outline-color":new _s(ue.paint_fill["fill-outline-color"]),"fill-translate":new os(ue.paint_fill["fill-translate"]),"fill-translate-anchor":new os(ue.paint_fill["fill-translate-anchor"]),"fill-pattern":new jf(ue.paint_fill["fill-pattern"])})},get layout(){return tr=tr||new Ze({"fill-sort-key":new _s(ue.layout_fill["fill-sort-key"])})}};class En extends fe{constructor(F){super(F,un)}recalculate(F,ae){super.recalculate(F,ae);const we=this.paint._values["fill-outline-color"];we.value.kind==="constant"&&we.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(F){return new ar(F)}queryRadius(){return Kn(this.paint.get("fill-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,St){return Pn(ga(F,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),at.angle,St),je)}isTileClipped(){return!0}}const Ea=Mt([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),fa=Mt([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sa}=Ea;var Ma={},La=l,Ja=ka;function ka(K,F,ae,we,je){this.properties={},this.extent=ae,this.type=0,this._pbf=K,this._geometry=-1,this._keys=we,this._values=je,K.readFields(ai,this,F)}function ai(K,F,ae){K==1?F.id=ae.readVarint():K==2?(function(we,je){for(var Qe=we.readVarint()+we.pos;we.pos<Qe;){var at=je._keys[we.readVarint()],St=je._values[we.readVarint()];je.properties[at]=St}})(ae,F):K==3?F.type=ae.readVarint():K==4&&(F._geometry=ae.pos)}function gi(K){for(var F,ae,we=0,je=0,Qe=K.length,at=Qe-1;je<Qe;at=je++)we+=((ae=K[at]).x-(F=K[je]).x)*(F.y+ae.y);return we}ka.types=["Unknown","Point","LineString","Polygon"],ka.prototype.loadGeometry=function(){var K=this._pbf;K.pos=this._geometry;for(var F,ae=K.readVarint()+K.pos,we=1,je=0,Qe=0,at=0,St=[];K.pos<ae;){if(je<=0){var jt=K.readVarint();we=7&jt,je=jt>>3}if(je--,we===1||we===2)Qe+=K.readSVarint(),at+=K.readSVarint(),we===1&&(F&&St.push(F),F=[]),F.push(new La(Qe,at));else{if(we!==7)throw new Error("unknown command "+we);F&&F.push(F[0].clone())}}return F&&St.push(F),St},ka.prototype.bbox=function(){var K=this._pbf;K.pos=this._geometry;for(var F=K.readVarint()+K.pos,ae=1,we=0,je=0,Qe=0,at=1/0,St=-1/0,jt=1/0,ir=-1/0;K.pos<F;){if(we<=0){var Er=K.readVarint();ae=7&Er,we=Er>>3}if(we--,ae===1||ae===2)(je+=K.readSVarint())<at&&(at=je),je>St&&(St=je),(Qe+=K.readSVarint())<jt&&(jt=Qe),Qe>ir&&(ir=Qe);else if(ae!==7)throw new Error("unknown command "+ae)}return[at,jt,St,ir]},ka.prototype.toGeoJSON=function(K,F,ae){var we,je,Qe=this.extent*Math.pow(2,ae),at=this.extent*K,St=this.extent*F,jt=this.loadGeometry(),ir=ka.types[this.type];function Er(vn){for(var Cn=0;Cn<vn.length;Cn++){var Bn=vn[Cn];vn[Cn]=[360*(Bn.x+at)/Qe-180,360/Math.PI*Math.atan(Math.exp((180-360*(Bn.y+St)/Qe)*Math.PI/180))-90]}}switch(this.type){case 1:var Ir=[];for(we=0;we<jt.length;we++)Ir[we]=jt[we][0];Er(jt=Ir);break;case 2:for(we=0;we<jt.length;we++)Er(jt[we]);break;case 3:for(jt=(function(vn){var Cn=vn.length;if(Cn<=1)return[vn];for(var Bn,Qn,Ia=[],Mi=0;Mi<Cn;Mi++){var ii=gi(vn[Mi]);ii!==0&&(Qn===void 0&&(Qn=ii<0),Qn===ii<0?(Bn&&Ia.push(Bn),Bn=[vn[Mi]]):Bn.push(vn[Mi]))}return Bn&&Ia.push(Bn),Ia})(jt),we=0;we<jt.length;we++)for(je=0;je<jt[we].length;je++)Er(jt[we][je])}jt.length===1?jt=jt[0]:ir="Multi"+ir;var rn={type:"Feature",geometry:{type:ir,coordinates:jt},properties:this.properties};return"id"in this&&(rn.id=this.id),rn};var Vi=Ja,oo=Is;function Is(K,F){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=K,this._keys=[],this._values=[],this._features=[],K.readFields(Cs,this,F),this.length=this._features.length}function Cs(K,F,ae){K===15?F.version=ae.readVarint():K===1?F.name=ae.readString():K===5?F.extent=ae.readVarint():K===2?F._features.push(ae.pos):K===3?F._keys.push(ae.readString()):K===4&&F._values.push((function(we){for(var je=null,Qe=we.readVarint()+we.pos;we.pos<Qe;){var at=we.readVarint()>>3;je=at===1?we.readString():at===2?we.readFloat():at===3?we.readDouble():at===4?we.readVarint64():at===5?we.readVarint():at===6?we.readSVarint():at===7?we.readBoolean():null}return je})(ae))}Is.prototype.feature=function(K){if(K<0||K>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[K];var F=this._pbf.readVarint()+this._pbf.pos;return new Vi(this._pbf,F,this.extent,this._keys,this._values)};var Sl=oo;function xl(K,F,ae){if(K===3){var we=new Sl(ae,ae.readVarint()+ae.pos);we.length&&(F[we.name]=we)}}Ma.VectorTile=function(K,F){this.layers=K.readFields(xl,{},F)},Ma.VectorTileFeature=Ja,Ma.VectorTileLayer=oo;const Cl=Ma.VectorTileFeature.types,El=Math.pow(2,13);function lc(K,F,ae,we,je,Qe,at,St){K.emplaceBack(F,ae,2*Math.floor(we*El)+at,je*El*2,Qe*El*2,Math.round(St))}class vl{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.layoutVertexArray=new pc,this.centroidVertexArray=new js,this.indexArray=new fr,this.programConfigurations=new Vl(F.layers,F.zoom),this.segments=new Mn,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.features=[],this.hasPattern=dr("fill-extrusion",this.layers,ae);for(const{feature:je,id:Qe,index:at,sourceLayerIndex:St}of F){const jt=this.layers[0]._featureFilter.needGeometry,ir=kr(je,jt);if(!this.layers[0]._featureFilter.filter(new Al(this.zoom),ir,we))continue;const Er={id:Qe,sourceLayerIndex:St,index:at,geometry:jt?ir.geometry:At(je),properties:je.properties,type:je.type,patterns:{}};this.hasPattern?this.features.push(Yt("fill-extrusion",this.layers,Er,this.zoom,ae)):this.addFeature(Er,Er.geometry,at,we,{}),ae.featureIndex.insert(je,Er.geometry,at,St,this.index,!0)}}addFeatures(F,ae,we){for(const je of this.features){const{geometry:Qe}=je;this.addFeature(je,Qe,je.index,ae,we)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,sa),this.centroidVertexBuffer=F.createVertexBuffer(this.centroidVertexArray,fa.members,!0),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(F,ae,we,je,Qe){for(const at of Qc(ae,500)){const St={x:0,y:0,vertexCount:0};let jt=0;for(const Cn of at)jt+=Cn.length;let ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(const Cn of at){if(Cn.length===0||sh(Cn))continue;let Bn=0;for(let Qn=0;Qn<Cn.length;Qn++){const Ia=Cn[Qn];if(Qn>=1){const Mi=Cn[Qn-1];if(!Eu(Ia,Mi)){ir.vertexLength+4>Mn.MAX_VERTEX_ARRAY_LENGTH&&(ir=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));const ii=Ia.sub(Mi)._perp()._unit(),bi=Mi.dist(Ia);Bn+bi>32768&&(Bn=0),lc(this.layoutVertexArray,Ia.x,Ia.y,ii.x,ii.y,0,0,Bn),lc(this.layoutVertexArray,Ia.x,Ia.y,ii.x,ii.y,0,1,Bn),St.x+=2*Ia.x,St.y+=2*Ia.y,St.vertexCount+=2,Bn+=bi,lc(this.layoutVertexArray,Mi.x,Mi.y,ii.x,ii.y,0,0,Bn),lc(this.layoutVertexArray,Mi.x,Mi.y,ii.x,ii.y,0,1,Bn),St.x+=2*Mi.x,St.y+=2*Mi.y,St.vertexCount+=2;const Qi=ir.vertexLength;this.indexArray.emplaceBack(Qi,Qi+2,Qi+1),this.indexArray.emplaceBack(Qi+1,Qi+2,Qi+3),ir.vertexLength+=4,ir.primitiveLength+=2}}}}if(ir.vertexLength+jt>Mn.MAX_VERTEX_ARRAY_LENGTH&&(ir=this.segments.prepareSegment(jt,this.layoutVertexArray,this.indexArray)),Cl[F.type]!=="Polygon")continue;const Er=[],Ir=[],rn=ir.vertexLength;for(const Cn of at)if(Cn.length!==0){Cn!==at[0]&&Ir.push(Er.length/2);for(let Bn=0;Bn<Cn.length;Bn++){const Qn=Cn[Bn];lc(this.layoutVertexArray,Qn.x,Qn.y,0,0,1,1,0),St.x+=Qn.x,St.y+=Qn.y,St.vertexCount+=1,Er.push(Qn.x),Er.push(Qn.y)}}const vn=gu(Er,Ir);for(let Cn=0;Cn<vn.length;Cn+=3)this.indexArray.emplaceBack(rn+vn[Cn],rn+vn[Cn+2],rn+vn[Cn+1]);ir.primitiveLength+=vn.length/3,ir.vertexLength+=jt;for(let Cn=0;Cn<St.vertexCount;Cn++){const Bn=Math.floor(St.x/St.vertexCount),Qn=Math.floor(St.y/St.vertexCount);this.centroidVertexArray.emplaceBack(Bn,Qn)}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}}function Eu(K,F){return K.x===F.x&&(K.x<0||K.x>ru)||K.y===F.y&&(K.y<0||K.y>ru)}function sh(K){return K.every(F=>F.x<0)||K.every(F=>F.x>ru)||K.every(F=>F.y<0)||K.every(F=>F.y>ru)}let Bh;oi("FillExtrusionBucket",vl,{omit:["layers","features"]});var Ap={get paint(){return Bh=Bh||new Ze({"fill-extrusion-opacity":new os(ue["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new _s(ue["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new os(ue["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new os(ue["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new jf(ue["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new _s(ue["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new _s(ue["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new os(ue["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class Sp extends fe{constructor(F){super(F,Ap)}createBucket(F){return new vl(F)}queryRadius(){return Kn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(F,ae,we,je,Qe,at,St,jt){const ir=ga(F,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),at.angle,St),Er=this.paint.get("fill-extrusion-height").evaluate(ae,we),Ir=this.paint.get("fill-extrusion-base").evaluate(ae,we),rn=(function(Cn,Bn,Qn,Ia){const Mi=[];for(const ii of Cn){const bi=[ii.x,ii.y,0,1];yi(bi,bi,Bn),Mi.push(new s(bi[0]/bi[3],bi[1]/bi[3]))}return Mi})(ir,jt),vn=(function(Cn,Bn,Qn,Ia){const Mi=[],ii=[],bi=Ia[8]*Bn,Qi=Ia[9]*Bn,Co=Ia[10]*Bn,cs=Ia[11]*Bn,bl=Ia[8]*Qn,xs=Ia[9]*Qn,ss=Ia[10]*Qn,Hs=Ia[11]*Qn;for(const Ns of Cn){const Ds=[],go=[];for(const Qs of Ns){const Gs=Qs.x,Fl=Qs.y,mf=Ia[0]*Gs+Ia[4]*Fl+Ia[12],of=Ia[1]*Gs+Ia[5]*Fl+Ia[13],kd=Ia[2]*Gs+Ia[6]*Fl+Ia[14],np=Ia[3]*Gs+Ia[7]*Fl+Ia[15],jh=kd+Co,dd=np+cs,Gv=mf+bl,Xv=of+xs,Wv=kd+ss,lh=np+Hs,Pd=new s((mf+bi)/dd,(of+Qi)/dd);Pd.z=jh/dd,Ds.push(Pd);const Cv=new s(Gv/lh,Xv/lh);Cv.z=Wv/lh,go.push(Cv)}Mi.push(Ds),ii.push(go)}return[Mi,ii]})(je,Ir,Er,jt);return(function(Cn,Bn,Qn){let Ia=1/0;Pn(Qn,Bn)&&(Ia=Jp(Qn,Bn[0]));for(let Mi=0;Mi<Bn.length;Mi++){const ii=Bn[Mi],bi=Cn[Mi];for(let Qi=0;Qi<ii.length-1;Qi++){const Co=ii[Qi],cs=[Co,ii[Qi+1],bi[Qi+1],bi[Qi],Co];Ca(Qn,cs)&&(Ia=Math.min(Ia,Jp(Qn,cs)))}}return Ia!==1/0&&Ia})(vn[0],vn[1],rn)}}function Av(K,F){return K.x*F.x+K.y*F.y}function Jp(K,F){if(K.length===1){let ae=0;const we=F[ae++];let je;for(;!je||we.equals(je);)if(je=F[ae++],!je)return 1/0;for(;ae<F.length;ae++){const Qe=F[ae],at=K[0],St=je.sub(we),jt=Qe.sub(we),ir=at.sub(we),Er=Av(St,St),Ir=Av(St,jt),rn=Av(jt,jt),vn=Av(ir,St),Cn=Av(ir,jt),Bn=Er*rn-Ir*Ir,Qn=(rn*vn-Ir*Cn)/Bn,Ia=(Er*Cn-Ir*vn)/Bn,Mi=we.z*(1-Qn-Ia)+je.z*Qn+Qe.z*Ia;if(isFinite(Mi))return Mi}return 1/0}{let ae=1/0;for(const we of F)ae=Math.min(ae,we.z);return ae}}const ry=Mt([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),{members:hm}=ry,Sv=Mt([{name:"a_uv_x",components:1,type:"Float32"},{name:"a_split_index",components:1,type:"Float32"}]),{members:dm}=Sv,Hv=Ma.VectorTileFeature.types,Ev=Math.cos(Math.PI/180*37.5),Ep=Math.pow(2,14)/.5;class Qp{constructor(F){this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(ae=>ae.id),this.index=F.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(ae=>{this.gradients[ae.id]={}}),this.layoutVertexArray=new Xc,this.layoutVertexArray2=new Te,this.indexArray=new fr,this.programConfigurations=new Vl(F.layers,F.zoom),this.segments=new Mn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(ae=>ae.isStateDependent()).map(ae=>ae.id)}populate(F,ae,we){this.hasPattern=dr("line",this.layers,ae);const je=this.layers[0].layout.get("line-sort-key"),Qe=!je.isConstant(),at=[];for(const{feature:St,id:jt,index:ir,sourceLayerIndex:Er}of F){const Ir=this.layers[0]._featureFilter.needGeometry,rn=kr(St,Ir);if(!this.layers[0]._featureFilter.filter(new Al(this.zoom),rn,we))continue;const vn=Qe?je.evaluate(rn,{},we):void 0,Cn={id:jt,properties:St.properties,type:St.type,sourceLayerIndex:Er,index:ir,geometry:Ir?rn.geometry:At(St),patterns:{},sortKey:vn};at.push(Cn)}Qe&&at.sort((St,jt)=>St.sortKey-jt.sortKey);for(const St of at){const{geometry:jt,index:ir,sourceLayerIndex:Er}=St;if(this.hasPattern){const Ir=Yt("line",this.layers,St,this.zoom,ae);this.patternFeatures.push(Ir)}else this.addFeature(St,jt,ir,we,{});ae.featureIndex.insert(F[ir].feature,jt,ir,Er,this.index)}}update(F,ae,we){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(F,ae,this.stateDependentLayers,we)}addFeatures(F,ae,we){for(const je of this.patternFeatures)this.addFeature(je,je.geometry,je.index,ae,we)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(F){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=F.createVertexBuffer(this.layoutVertexArray2,dm)),this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,hm),this.indexBuffer=F.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(F),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(F){if(F.properties&&Object.prototype.hasOwnProperty.call(F.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(F.properties,"mapbox_clip_end"))return{start:+F.properties.mapbox_clip_start,end:+F.properties.mapbox_clip_end}}addFeature(F,ae,we,je,Qe){const at=this.layers[0].layout,St=at.get("line-join").evaluate(F,{}),jt=at.get("line-cap"),ir=at.get("line-miter-limit"),Er=at.get("line-round-limit");this.lineClips=this.lineFeatureClips(F);for(const Ir of ae)this.addLine(Ir,F,St,jt,ir,Er);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,F,we,Qe,je)}addLine(F,ae,we,je,Qe,at){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Ia=0;Ia<F.length-1;Ia++)this.totalDistance+=F[Ia].dist(F[Ia+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}const St=Hv[ae.type]==="Polygon";let jt=F.length;for(;jt>=2&&F[jt-1].equals(F[jt-2]);)jt--;let ir=0;for(;ir<jt-1&&F[ir].equals(F[ir+1]);)ir++;if(jt<(St?3:2))return;we==="bevel"&&(Qe=1.05);const Er=this.overscaling<=16?15*ru/(512*this.overscaling):0,Ir=this.segments.prepareSegment(10*jt,this.layoutVertexArray,this.indexArray);let rn,vn,Cn,Bn,Qn;this.e1=this.e2=-1,St&&(rn=F[jt-2],Qn=F[ir].sub(rn)._unit()._perp());for(let Ia=ir;Ia<jt;Ia++){if(Cn=Ia===jt-1?St?F[ir+1]:void 0:F[Ia+1],Cn&&F[Ia].equals(Cn))continue;Qn&&(Bn=Qn),rn&&(vn=rn),rn=F[Ia],Qn=Cn?Cn.sub(rn)._unit()._perp():Bn,Bn=Bn||Qn;let Mi=Bn.add(Qn);Mi.x===0&&Mi.y===0||Mi._unit();const ii=Bn.x*Qn.x+Bn.y*Qn.y,bi=Mi.x*Qn.x+Mi.y*Qn.y,Qi=bi!==0?1/bi:1/0,Co=2*Math.sqrt(2-2*bi),cs=bi<Ev&&vn&&Cn,bl=Bn.x*Qn.y-Bn.y*Qn.x>0;if(cs&&Ia>ir){const Hs=rn.dist(vn);if(Hs>2*Er){const Ns=rn.sub(rn.sub(vn)._mult(Er/Hs)._round());this.updateDistance(vn,Ns),this.addCurrentVertex(Ns,Bn,0,0,Ir),vn=Ns}}const xs=vn&&Cn;let ss=xs?we:St?"butt":je;if(xs&&ss==="round"&&(Qi<at?ss="miter":Qi<=2&&(ss="fakeround")),ss==="miter"&&Qi>Qe&&(ss="bevel"),ss==="bevel"&&(Qi>2&&(ss="flipbevel"),Qi<Qe&&(ss="miter")),vn&&this.updateDistance(vn,rn),ss==="miter")Mi._mult(Qi),this.addCurrentVertex(rn,Mi,0,0,Ir);else if(ss==="flipbevel"){if(Qi>100)Mi=Qn.mult(-1);else{const Hs=Qi*Bn.add(Qn).mag()/Bn.sub(Qn).mag();Mi._perp()._mult(Hs*(bl?-1:1))}this.addCurrentVertex(rn,Mi,0,0,Ir),this.addCurrentVertex(rn,Mi.mult(-1),0,0,Ir)}else if(ss==="bevel"||ss==="fakeround"){const Hs=-Math.sqrt(Qi*Qi-1),Ns=bl?Hs:0,Ds=bl?0:Hs;if(vn&&this.addCurrentVertex(rn,Bn,Ns,Ds,Ir),ss==="fakeround"){const go=Math.round(180*Co/Math.PI/20);for(let Qs=1;Qs<go;Qs++){let Gs=Qs/go;if(Gs!==.5){const mf=Gs-.5;Gs+=Gs*mf*(Gs-1)*((1.0904+ii*(ii*(3.55645-1.43519*ii)-3.2452))*mf*mf+(.848013+ii*(.215638*ii-1.06021)))}const Fl=Qn.sub(Bn)._mult(Gs)._add(Bn)._unit()._mult(bl?-1:1);this.addHalfVertex(rn,Fl.x,Fl.y,!1,bl,0,Ir)}}Cn&&this.addCurrentVertex(rn,Qn,-Ns,-Ds,Ir)}else if(ss==="butt")this.addCurrentVertex(rn,Mi,0,0,Ir);else if(ss==="square"){const Hs=vn?1:-1;this.addCurrentVertex(rn,Mi,Hs,Hs,Ir)}else ss==="round"&&(vn&&(this.addCurrentVertex(rn,Bn,0,0,Ir),this.addCurrentVertex(rn,Bn,1,1,Ir,!0)),Cn&&(this.addCurrentVertex(rn,Qn,-1,-1,Ir,!0),this.addCurrentVertex(rn,Qn,0,0,Ir)));if(cs&&Ia<jt-1){const Hs=rn.dist(Cn);if(Hs>2*Er){const Ns=rn.add(Cn.sub(rn)._mult(Er/Hs)._round());this.updateDistance(rn,Ns),this.addCurrentVertex(Ns,Qn,0,0,Ir),rn=Ns}}}}addCurrentVertex(F,ae,we,je,Qe,at=!1){const St=ae.y*je-ae.x,jt=-ae.y-ae.x*je;this.addHalfVertex(F,ae.x+ae.y*we,ae.y-ae.x*we,at,!1,we,Qe),this.addHalfVertex(F,St,jt,at,!0,-je,Qe),this.distance>Ep/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(F,ae,we,je,Qe,at))}addHalfVertex({x:F,y:ae},we,je,Qe,at,St,jt){const ir=.5*(this.lineClips?this.scaledDistance*(Ep-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((F<<1)+(Qe?1:0),(ae<<1)+(at?1:0),Math.round(63*we)+128,Math.round(63*je)+128,1+(St===0?0:St<0?-1:1)|(63&ir)<<2,ir>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);const Er=jt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Er),jt.primitiveLength++),at?this.e2=Er:this.e1=Er}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(F,ae){this.distance+=F.dist(ae),this.updateScaledDistance()}}let Mp,i1;oi("LineBucket",Qp,{omit:["layers","patternFeatures"]});var ny={get paint(){return i1=i1||new Ze({"line-opacity":new _s(ue.paint_line["line-opacity"]),"line-color":new _s(ue.paint_line["line-color"]),"line-translate":new os(ue.paint_line["line-translate"]),"line-translate-anchor":new os(ue.paint_line["line-translate-anchor"]),"line-width":new _s(ue.paint_line["line-width"]),"line-gap-width":new _s(ue.paint_line["line-gap-width"]),"line-offset":new _s(ue.paint_line["line-offset"]),"line-blur":new _s(ue.paint_line["line-blur"]),"line-dasharray":new nf(ue.paint_line["line-dasharray"]),"line-pattern":new jf(ue.paint_line["line-pattern"]),"line-gradient":new Gc(ue.paint_line["line-gradient"])})},get layout(){return Mp=Mp||new Ze({"line-cap":new os(ue.layout_line["line-cap"]),"line-join":new _s(ue.layout_line["line-join"]),"line-miter-limit":new os(ue.layout_line["line-miter-limit"]),"line-round-limit":new os(ue.layout_line["line-round-limit"]),"line-sort-key":new _s(ue.layout_line["line-sort-key"])})}};class fd extends _s{possiblyEvaluate(F,ae){return ae=new Al(Math.floor(ae.zoom),{now:ae.now,fadeDuration:ae.fadeDuration,zoomHistory:ae.zoomHistory,transition:ae.transition}),super.possiblyEvaluate(F,ae)}evaluate(F,ae,we,je){return ae=k({},ae,{zoom:Math.floor(ae.zoom)}),super.evaluate(F,ae,we,je)}}let ay;class o1 extends fe{constructor(F){super(F,ny),this.gradientVersion=0,ay||(ay=new fd(ny.paint.properties["line-width"].specification),ay.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(F){if(F==="line-gradient"){const ae=this.gradientExpression();this.stepInterpolant=!!(function(we){return we._styleExpression!==void 0})(ae)&&ae._styleExpression.expression instanceof Wn,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(F,ae){super.recalculate(F,ae),this.paint._values["line-floorwidth"]=ay.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,F)}createBucket(F){return new Qp(F)}queryRadius(F){const ae=F,we=Wd(gn("line-width",this,ae),gn("line-gap-width",this,ae)),je=gn("line-offset",this,ae);return we/2+Math.abs(je)+Kn(this.paint.get("line-translate"))}queryIntersectsFeature(F,ae,we,je,Qe,at,St){const jt=ga(F,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),at.angle,St),ir=St/2*Wd(this.paint.get("line-width").evaluate(ae,we),this.paint.get("line-gap-width").evaluate(ae,we)),Er=this.paint.get("line-offset").evaluate(ae,we);return Er&&(je=(function(Ir,rn){const vn=[];for(let Cn=0;Cn<Ir.length;Cn++){const Bn=Ir[Cn],Qn=[];for(let Ia=0;Ia<Bn.length;Ia++){const Mi=Bn[Ia-1],ii=Bn[Ia],bi=Bn[Ia+1],Qi=Ia===0?new s(0,0):ii.sub(Mi)._unit()._perp(),Co=Ia===Bn.length-1?new s(0,0):bi.sub(ii)._unit()._perp(),cs=Qi._add(Co)._unit(),bl=cs.x*Co.x+cs.y*Co.y;bl!==0&&cs._mult(1/bl),Qn.push(cs._mult(rn)._add(ii))}vn.push(Qn)}return vn})(je,Er*St)),(function(Ir,rn,vn){for(let Cn=0;Cn<rn.length;Cn++){const Bn=rn[Cn];if(Ir.length>=3){for(let Qn=0;Qn<Bn.length;Qn++)if(fi(Ir,Bn[Qn]))return!0}if(ri(Ir,Bn,vn))return!0}return!1})(jt,je,ir)}isTileClipped(){return!0}}function Wd(K,F){return F>0?F+2*K:K}const Qy=Mt([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),I_=Mt([{name:"a_projected_pos",components:3,type:"Float32"}],4);Mt([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);const D_=Mt([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Mt([{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"}]);const s1=Mt([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),eg=Mt([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function tg(K,F,ae){return K.sections.forEach(we=>{we.text=(function(je,Qe,at){const St=Qe.layout.get("text-transform").evaluate(at,{});return St==="uppercase"?je=je.toLocaleUpperCase():St==="lowercase"&&(je=je.toLocaleLowerCase()),ql.applyArabicShaping&&(je=ql.applyArabicShaping(je)),je})(we.text,F,ae)}),K}Mt([{name:"triangle",components:3,type:"Uint16"}]),Mt([{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"}]),Mt([{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"}]),Mt([{type:"Float32",name:"offsetX"}]),Mt([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Mt([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);const Cf={"!":"︕","#":"＃",$:"＄","%":"％","&":"＆","(":"︵",")":"︶","*":"＊","+":"＋",",":"︐","-":"︲",".":"・","/":"／",":":"︓",";":"︔","<":"︿","=":"＝",">":"﹀","?":"︖","@":"＠","[":"﹇","\\":"＼","]":"﹈","^":"＾",_:"︳","`":"｀","{":"︷","|":"―","}":"︸","~":"～","¢":"￠","£":"￡","¥":"￥","¦":"￤","¬":"￢","¯":"￣","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"￦","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","！":"︕","（":"︵","）":"︶","，":"︐","－":"︲","．":"・","：":"︓","；":"︔","＜":"︿","＞":"﹀","？":"︖","［":"﹇","］":"﹈","＿":"︳","｛":"︷","｜":"―","｝":"︸","｟":"︵","｠":"︶","｡":"︒","｢":"﹁","｣":"﹂"};var xc=24,Mv=Rc,l1=function(K,F,ae,we,je){var Qe,at,St=8*je-we-1,jt=(1<<St)-1,ir=jt>>1,Er=-7,Ir=je-1,rn=-1,vn=K[F+Ir];for(Ir+=rn,Qe=vn&(1<<-Er)-1,vn>>=-Er,Er+=St;Er>0;Qe=256*Qe+K[F+Ir],Ir+=rn,Er-=8);for(at=Qe&(1<<-Er)-1,Qe>>=-Er,Er+=we;Er>0;at=256*at+K[F+Ir],Ir+=rn,Er-=8);if(Qe===0)Qe=1-ir;else{if(Qe===jt)return at?NaN:1/0*(vn?-1:1);at+=Math.pow(2,we),Qe-=ir}return(vn?-1:1)*at*Math.pow(2,Qe-we)},O_=function(K,F,ae,we,je,Qe){var at,St,jt,ir=8*Qe-je-1,Er=(1<<ir)-1,Ir=Er>>1,rn=je===23?Math.pow(2,-24)-Math.pow(2,-77):0,vn=0,Cn=1,Bn=F<0||F===0&&1/F<0?1:0;for(F=Math.abs(F),isNaN(F)||F===1/0?(St=isNaN(F)?1:0,at=Er):(at=Math.floor(Math.log(F)/Math.LN2),F*(jt=Math.pow(2,-at))<1&&(at--,jt*=2),(F+=at+Ir>=1?rn/jt:rn*Math.pow(2,1-Ir))*jt>=2&&(at++,jt/=2),at+Ir>=Er?(St=0,at=Er):at+Ir>=1?(St=(F*jt-1)*Math.pow(2,je),at+=Ir):(St=F*Math.pow(2,Ir-1)*Math.pow(2,je),at=0));je>=8;K[ae+vn]=255&St,vn+=Cn,St/=256,je-=8);for(at=at<<je|St,ir+=je;ir>0;K[ae+vn]=255&at,vn+=Cn,at/=256,ir-=8);K[ae+vn-Cn]|=128*Bn};function Rc(K){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(K)?K:new Uint8Array(K||0),this.pos=0,this.type=0,this.length=this.buf.length}Rc.Varint=0,Rc.Fixed64=1,Rc.Bytes=2,Rc.Fixed32=5;var Bb=4294967296,rg=1/Bb,_3=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function Cp(K){return K.type===Rc.Bytes?K.readVarint()+K.pos:K.pos+1}function ng(K,F,ae){return ae?4294967296*F+(K>>>0):4294967296*(F>>>0)+(K>>>0)}function x3(K,F,ae){var we=F<=16383?1:F<=2097151?2:F<=268435455?3:Math.floor(Math.log(F)/(7*Math.LN2));ae.realloc(we);for(var je=ae.pos-1;je>=K;je--)ae.buf[je+we]=ae.buf[je]}function jb(K,F){for(var ae=0;ae<K.length;ae++)F.writeVarint(K[ae])}function JR(K,F){for(var ae=0;ae<K.length;ae++)F.writeSVarint(K[ae])}function QR(K,F){for(var ae=0;ae<K.length;ae++)F.writeFloat(K[ae])}function e8(K,F){for(var ae=0;ae<K.length;ae++)F.writeDouble(K[ae])}function t8(K,F){for(var ae=0;ae<K.length;ae++)F.writeBoolean(K[ae])}function r8(K,F){for(var ae=0;ae<K.length;ae++)F.writeFixed32(K[ae])}function n8(K,F){for(var ae=0;ae<K.length;ae++)F.writeSFixed32(K[ae])}function a8(K,F){for(var ae=0;ae<K.length;ae++)F.writeFixed64(K[ae])}function b3(K,F){for(var ae=0;ae<K.length;ae++)F.writeSFixed64(K[ae])}function w3(K,F){return(K[F]|K[F+1]<<8|K[F+2]<<16)+16777216*K[F+3]}function z_(K,F,ae){K[ae]=F,K[ae+1]=F>>>8,K[ae+2]=F>>>16,K[ae+3]=F>>>24}function g6(K,F){return(K[F]|K[F+1]<<8|K[F+2]<<16)+(K[F+3]<<24)}Rc.prototype={destroy:function(){this.buf=null},readFields:function(K,F,ae){for(ae=ae||this.length;this.pos<ae;){var we=this.readVarint(),je=we>>3,Qe=this.pos;this.type=7&we,K(je,F,this),this.pos===Qe&&this.skip(we)}return F},readMessage:function(K,F){return this.readFields(K,F,this.readVarint()+this.pos)},readFixed32:function(){var K=w3(this.buf,this.pos);return this.pos+=4,K},readSFixed32:function(){var K=g6(this.buf,this.pos);return this.pos+=4,K},readFixed64:function(){var K=w3(this.buf,this.pos)+w3(this.buf,this.pos+4)*Bb;return this.pos+=8,K},readSFixed64:function(){var K=w3(this.buf,this.pos)+g6(this.buf,this.pos+4)*Bb;return this.pos+=8,K},readFloat:function(){var K=l1(this.buf,this.pos,!0,23,4);return this.pos+=4,K},readDouble:function(){var K=l1(this.buf,this.pos,!0,52,8);return this.pos+=8,K},readVarint:function(K){var F,ae,we=this.buf;return F=127&(ae=we[this.pos++]),ae<128?F:(F|=(127&(ae=we[this.pos++]))<<7,ae<128?F:(F|=(127&(ae=we[this.pos++]))<<14,ae<128?F:(F|=(127&(ae=we[this.pos++]))<<21,ae<128?F:(function(je,Qe,at){var St,jt,ir=at.buf;if(St=(112&(jt=ir[at.pos++]))>>4,jt<128||(St|=(127&(jt=ir[at.pos++]))<<3,jt<128)||(St|=(127&(jt=ir[at.pos++]))<<10,jt<128)||(St|=(127&(jt=ir[at.pos++]))<<17,jt<128)||(St|=(127&(jt=ir[at.pos++]))<<24,jt<128)||(St|=(1&(jt=ir[at.pos++]))<<31,jt<128))return ng(je,St,Qe);throw new Error("Expected varint not more than 10 bytes")})(F|=(15&(ae=we[this.pos]))<<28,K,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var K=this.readVarint();return K%2==1?(K+1)/-2:K/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var K=this.readVarint()+this.pos,F=this.pos;return this.pos=K,K-F>=12&&_3?(function(ae,we,je){return _3.decode(ae.subarray(we,je))})(this.buf,F,K):(function(ae,we,je){for(var Qe="",at=we;at<je;){var St,jt,ir,Er=ae[at],Ir=null,rn=Er>239?4:Er>223?3:Er>191?2:1;if(at+rn>je)break;rn===1?Er<128&&(Ir=Er):rn===2?(192&(St=ae[at+1]))==128&&(Ir=(31&Er)<<6|63&St)<=127&&(Ir=null):rn===3?(jt=ae[at+2],(192&(St=ae[at+1]))==128&&(192&jt)==128&&((Ir=(15&Er)<<12|(63&St)<<6|63&jt)<=2047||Ir>=55296&&Ir<=57343)&&(Ir=null)):rn===4&&(jt=ae[at+2],ir=ae[at+3],(192&(St=ae[at+1]))==128&&(192&jt)==128&&(192&ir)==128&&((Ir=(15&Er)<<18|(63&St)<<12|(63&jt)<<6|63&ir)<=65535||Ir>=1114112)&&(Ir=null)),Ir===null?(Ir=65533,rn=1):Ir>65535&&(Ir-=65536,Qe+=String.fromCharCode(Ir>>>10&1023|55296),Ir=56320|1023&Ir),Qe+=String.fromCharCode(Ir),at+=rn}return Qe})(this.buf,F,K)},readBytes:function(){var K=this.readVarint()+this.pos,F=this.buf.subarray(this.pos,K);return this.pos=K,F},readPackedVarint:function(K,F){if(this.type!==Rc.Bytes)return K.push(this.readVarint(F));var ae=Cp(this);for(K=K||[];this.pos<ae;)K.push(this.readVarint(F));return K},readPackedSVarint:function(K){if(this.type!==Rc.Bytes)return K.push(this.readSVarint());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readSVarint());return K},readPackedBoolean:function(K){if(this.type!==Rc.Bytes)return K.push(this.readBoolean());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readBoolean());return K},readPackedFloat:function(K){if(this.type!==Rc.Bytes)return K.push(this.readFloat());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readFloat());return K},readPackedDouble:function(K){if(this.type!==Rc.Bytes)return K.push(this.readDouble());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readDouble());return K},readPackedFixed32:function(K){if(this.type!==Rc.Bytes)return K.push(this.readFixed32());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readFixed32());return K},readPackedSFixed32:function(K){if(this.type!==Rc.Bytes)return K.push(this.readSFixed32());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readSFixed32());return K},readPackedFixed64:function(K){if(this.type!==Rc.Bytes)return K.push(this.readFixed64());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readFixed64());return K},readPackedSFixed64:function(K){if(this.type!==Rc.Bytes)return K.push(this.readSFixed64());var F=Cp(this);for(K=K||[];this.pos<F;)K.push(this.readSFixed64());return K},skip:function(K){var F=7&K;if(F===Rc.Varint)for(;this.buf[this.pos++]>127;);else if(F===Rc.Bytes)this.pos=this.readVarint()+this.pos;else if(F===Rc.Fixed32)this.pos+=4;else{if(F!==Rc.Fixed64)throw new Error("Unimplemented type: "+F);this.pos+=8}},writeTag:function(K,F){this.writeVarint(K<<3|F)},realloc:function(K){for(var F=this.length||16;F<this.pos+K;)F*=2;if(F!==this.length){var ae=new Uint8Array(F);ae.set(this.buf),this.buf=ae,this.length=F}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(K){this.realloc(4),z_(this.buf,K,this.pos),this.pos+=4},writeSFixed32:function(K){this.realloc(4),z_(this.buf,K,this.pos),this.pos+=4},writeFixed64:function(K){this.realloc(8),z_(this.buf,-1&K,this.pos),z_(this.buf,Math.floor(K*rg),this.pos+4),this.pos+=8},writeSFixed64:function(K){this.realloc(8),z_(this.buf,-1&K,this.pos),z_(this.buf,Math.floor(K*rg),this.pos+4),this.pos+=8},writeVarint:function(K){(K=+K||0)>268435455||K<0?(function(F,ae){var we,je;if(F>=0?(we=F%4294967296|0,je=F/4294967296|0):(je=~(-F/4294967296),4294967295^(we=~(-F%4294967296))?we=we+1|0:(we=0,je=je+1|0)),F>=18446744073709552e3||F<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");ae.realloc(10),(function(Qe,at,St){St.buf[St.pos++]=127&Qe|128,Qe>>>=7,St.buf[St.pos++]=127&Qe|128,Qe>>>=7,St.buf[St.pos++]=127&Qe|128,Qe>>>=7,St.buf[St.pos++]=127&Qe|128,St.buf[St.pos]=127&(Qe>>>=7)})(we,0,ae),(function(Qe,at){var St=(7&Qe)<<4;at.buf[at.pos++]|=St|((Qe>>>=3)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe|((Qe>>>=7)?128:0),Qe&&(at.buf[at.pos++]=127&Qe)))))})(je,ae)})(K,this):(this.realloc(4),this.buf[this.pos++]=127&K|(K>127?128:0),K<=127||(this.buf[this.pos++]=127&(K>>>=7)|(K>127?128:0),K<=127||(this.buf[this.pos++]=127&(K>>>=7)|(K>127?128:0),K<=127||(this.buf[this.pos++]=K>>>7&127))))},writeSVarint:function(K){this.writeVarint(K<0?2*-K-1:2*K)},writeBoolean:function(K){this.writeVarint(!!K)},writeString:function(K){K=String(K),this.realloc(4*K.length),this.pos++;var F=this.pos;this.pos=(function(we,je,Qe){for(var at,St,jt=0;jt<je.length;jt++){if((at=je.charCodeAt(jt))>55295&&at<57344){if(!St){at>56319||jt+1===je.length?(we[Qe++]=239,we[Qe++]=191,we[Qe++]=189):St=at;continue}if(at<56320){we[Qe++]=239,we[Qe++]=191,we[Qe++]=189,St=at;continue}at=St-55296<<10|at-56320|65536,St=null}else St&&(we[Qe++]=239,we[Qe++]=191,we[Qe++]=189,St=null);at<128?we[Qe++]=at:(at<2048?we[Qe++]=at>>6|192:(at<65536?we[Qe++]=at>>12|224:(we[Qe++]=at>>18|240,we[Qe++]=at>>12&63|128),we[Qe++]=at>>6&63|128),we[Qe++]=63&at|128)}return Qe})(this.buf,K,this.pos);var ae=this.pos-F;ae>=128&&x3(F,ae,this),this.pos=F-1,this.writeVarint(ae),this.pos+=ae},writeFloat:function(K){this.realloc(4),O_(this.buf,K,this.pos,!0,23,4),this.pos+=4},writeDouble:function(K){this.realloc(8),O_(this.buf,K,this.pos,!0,52,8),this.pos+=8},writeBytes:function(K){var F=K.length;this.writeVarint(F),this.realloc(F);for(var ae=0;ae<F;ae++)this.buf[this.pos++]=K[ae]},writeRawMessage:function(K,F){this.pos++;var ae=this.pos;K(F,this);var we=this.pos-ae;we>=128&&x3(ae,we,this),this.pos=ae-1,this.writeVarint(we),this.pos+=we},writeMessage:function(K,F,ae){this.writeTag(K,Rc.Bytes),this.writeRawMessage(F,ae)},writePackedVarint:function(K,F){F.length&&this.writeMessage(K,jb,F)},writePackedSVarint:function(K,F){F.length&&this.writeMessage(K,JR,F)},writePackedBoolean:function(K,F){F.length&&this.writeMessage(K,t8,F)},writePackedFloat:function(K,F){F.length&&this.writeMessage(K,QR,F)},writePackedDouble:function(K,F){F.length&&this.writeMessage(K,e8,F)},writePackedFixed32:function(K,F){F.length&&this.writeMessage(K,r8,F)},writePackedSFixed32:function(K,F){F.length&&this.writeMessage(K,n8,F)},writePackedFixed64:function(K,F){F.length&&this.writeMessage(K,a8,F)},writePackedSFixed64:function(K,F){F.length&&this.writeMessage(K,b3,F)},writeBytesField:function(K,F){this.writeTag(K,Rc.Bytes),this.writeBytes(F)},writeFixed32Field:function(K,F){this.writeTag(K,Rc.Fixed32),this.writeFixed32(F)},writeSFixed32Field:function(K,F){this.writeTag(K,Rc.Fixed32),this.writeSFixed32(F)},writeFixed64Field:function(K,F){this.writeTag(K,Rc.Fixed64),this.writeFixed64(F)},writeSFixed64Field:function(K,F){this.writeTag(K,Rc.Fixed64),this.writeSFixed64(F)},writeVarintField:function(K,F){this.writeTag(K,Rc.Varint),this.writeVarint(F)},writeSVarintField:function(K,F){this.writeTag(K,Rc.Varint),this.writeSVarint(F)},writeStringField:function(K,F){this.writeTag(K,Rc.Bytes),this.writeString(F)},writeFloatField:function(K,F){this.writeTag(K,Rc.Fixed32),this.writeFloat(F)},writeDoubleField:function(K,F){this.writeTag(K,Rc.Fixed64),this.writeDouble(F)},writeBooleanField:function(K,F){this.writeVarintField(K,!!F)}};var e5=a(Mv);const T3=3;function i8(K,F,ae){K===1&&ae.readMessage(_6,F)}function _6(K,F,ae){if(K===3){const{id:we,bitmap:je,width:Qe,height:at,left:St,top:jt,advance:ir}=ae.readMessage(t5,{});F.push({id:we,bitmap:new ds({width:Qe+2*T3,height:at+2*T3},je),metrics:{width:Qe,height:at,left:St,top:jt,advance:ir}})}}function t5(K,F,ae){K===1?F.id=ae.readVarint():K===2?F.bitmap=ae.readBytes():K===3?F.width=ae.readVarint():K===4?F.height=ae.readVarint():K===5?F.left=ae.readSVarint():K===6?F.top=ae.readSVarint():K===7&&(F.advance=ae.readVarint())}const r5=T3;function A3(K){let F=0,ae=0;for(const at of K)F+=at.w*at.h,ae=Math.max(ae,at.w);K.sort((at,St)=>St.h-at.h);const we=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(F/.95)),ae),h:1/0}];let je=0,Qe=0;for(const at of K)for(let St=we.length-1;St>=0;St--){const jt=we[St];if(!(at.w>jt.w||at.h>jt.h)){if(at.x=jt.x,at.y=jt.y,Qe=Math.max(Qe,at.y+at.h),je=Math.max(je,at.x+at.w),at.w===jt.w&&at.h===jt.h){const ir=we.pop();St<we.length&&(we[St]=ir)}else at.h===jt.h?(jt.x+=at.w,jt.w-=at.w):at.w===jt.w?(jt.y+=at.h,jt.h-=at.h):(we.push({x:jt.x+at.w,y:jt.y,w:jt.w-at.w,h:at.h}),jt.y+=at.h,jt.h-=at.h);break}}return{w:je,h:Qe,fill:F/(je*Qe)||0}}const hd=1;class fv{constructor(F,{pixelRatio:ae,version:we,stretchX:je,stretchY:Qe,content:at,textFitWidth:St,textFitHeight:jt}){this.paddedRect=F,this.pixelRatio=ae,this.stretchX=je,this.stretchY=Qe,this.content=at,this.version=we,this.textFitWidth=St,this.textFitHeight=jt}get tl(){return[this.paddedRect.x+hd,this.paddedRect.y+hd]}get br(){return[this.paddedRect.x+this.paddedRect.w-hd,this.paddedRect.y+this.paddedRect.h-hd]}get tlbr(){return this.tl.concat(this.br)}get displaySize(){return[(this.paddedRect.w-2*hd)/this.pixelRatio,(this.paddedRect.h-2*hd)/this.pixelRatio]}}class x6{constructor(F,ae){const we={},je={};this.haveRenderCallbacks=[];const Qe=[];this.addImages(F,we,Qe),this.addImages(ae,je,Qe);const{w:at,h:St}=A3(Qe),jt=new _l({width:at||1,height:St||1});for(const ir in F){const Er=F[ir],Ir=we[ir].paddedRect;_l.copy(Er.data,jt,{x:0,y:0},{x:Ir.x+hd,y:Ir.y+hd},Er.data)}for(const ir in ae){const Er=ae[ir],Ir=je[ir].paddedRect,rn=Ir.x+hd,vn=Ir.y+hd,Cn=Er.data.width,Bn=Er.data.height;_l.copy(Er.data,jt,{x:0,y:0},{x:rn,y:vn},Er.data),_l.copy(Er.data,jt,{x:0,y:Bn-1},{x:rn,y:vn-1},{width:Cn,height:1}),_l.copy(Er.data,jt,{x:0,y:0},{x:rn,y:vn+Bn},{width:Cn,height:1}),_l.copy(Er.data,jt,{x:Cn-1,y:0},{x:rn-1,y:vn},{width:1,height:Bn}),_l.copy(Er.data,jt,{x:0,y:0},{x:rn+Cn,y:vn},{width:1,height:Bn})}this.image=jt,this.iconPositions=we,this.patternPositions=je}addImages(F,ae,we){for(const je in F){const Qe=F[je],at={x:0,y:0,w:Qe.data.width+2*hd,h:Qe.data.height+2*hd};we.push(at),ae[je]=new fv(at,Qe),Qe.hasRenderCallback&&this.haveRenderCallbacks.push(je)}}patchUpdatedImages(F,ae){F.dispatchRenderCallbacks(this.haveRenderCallbacks);for(const we in F.updatedImages)this.patchUpdatedImage(this.iconPositions[we],F.getImage(we),ae),this.patchUpdatedImage(this.patternPositions[we],F.getImage(we),ae)}patchUpdatedImage(F,ae,we){if(!F||!ae||F.version===ae.version)return;F.version=ae.version;const[je,Qe]=F.tl;we.update(ae.data,void 0,{x:je,y:Qe})}}var ag;oi("ImagePosition",fv),oi("ImageAtlas",x6),t.ah=void 0,(ag=t.ah||(t.ah={}))[ag.none=0]="none",ag[ag.horizontal=1]="horizontal",ag[ag.vertical=2]="vertical",ag[ag.horizontalOnly=3]="horizontalOnly";const N_=-17;class Ub{constructor(){this.scale=1,this.fontStack="",this.imageName=null}static forText(F,ae){const we=new Ub;return we.scale=F||1,we.fontStack=ae,we}static forImage(F){const ae=new Ub;return ae.imageName=F,ae}}class F_{constructor(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null}static fromFeature(F,ae){const we=new F_;for(let je=0;je<F.sections.length;je++){const Qe=F.sections[je];Qe.image?we.addImageSection(Qe):we.addTextSection(Qe,ae)}return we}length(){return this.text.length}getSection(F){return this.sections[this.sectionIndex[F]]}getSectionIndex(F){return this.sectionIndex[F]}getCharCode(F){return this.text.charCodeAt(F)}verticalizePunctuation(){this.text=(function(F){let ae="";for(let we=0;we<F.length;we++){const je=F.charCodeAt(we+1)||null,Qe=F.charCodeAt(we-1)||null;ae+=je&&Du(je)&&!Cf[F[we+1]]||Qe&&Du(Qe)&&!Cf[F[we-1]]||!Cf[F[we]]?F[we]:Cf[F[we]]}return ae})(this.text)}trim(){let F=0;for(let we=0;we<this.text.length&&E3[this.text.charCodeAt(we)];we++)F++;let ae=this.text.length;for(let we=this.text.length-1;we>=0&&we>=F&&E3[this.text.charCodeAt(we)];we--)ae--;this.text=this.text.substring(F,ae),this.sectionIndex=this.sectionIndex.slice(F,ae)}substring(F,ae){const we=new F_;return we.text=this.text.substring(F,ae),we.sectionIndex=this.sectionIndex.slice(F,ae),we.sections=this.sections,we}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((F,ae)=>Math.max(F,this.sections[ae].scale),0)}addTextSection(F,ae){this.text+=F.text,this.sections.push(Ub.forText(F.scale,F.fontStack||ae));const we=this.sections.length-1;for(let je=0;je<F.text.length;++je)this.sectionIndex.push(we)}addImageSection(F){const ae=F.image?F.image.name:"";if(ae.length===0)return void x("Can't add FormattedSection with an empty image.");const we=this.getNextImageSectionCharCode();we?(this.text+=String.fromCharCode(we),this.sections.push(Ub.forImage(ae)),this.sectionIndex.push(this.sections.length-1)):x("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function S3(K,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn){const Bn=F_.fromFeature(K,je);let Qn;Ir===t.ah.vertical&&Bn.verticalizePunctuation();const{processBidirectionalText:Ia,processStyledBidirectionalText:Mi}=ql;if(Ia&&Bn.sections.length===1){Qn=[];const Qi=Ia(Bn.toString(),u1(Bn,ir,Qe,F,we,vn));for(const Co of Qi){const cs=new F_;cs.text=Co,cs.sections=Bn.sections;for(let bl=0;bl<Co.length;bl++)cs.sectionIndex.push(0);Qn.push(cs)}}else if(Mi){Qn=[];const Qi=Mi(Bn.text,Bn.sectionIndex,u1(Bn,ir,Qe,F,we,vn));for(const Co of Qi){const cs=new F_;cs.text=Co[0],cs.sectionIndex=Co[1],cs.sections=Bn.sections,Qn.push(cs)}}else Qn=(function(Qi,Co){const cs=[],bl=Qi.text;let xs=0;for(const ss of Co)cs.push(Qi.substring(xs,ss)),xs=ss;return xs<bl.length&&cs.push(Qi.substring(xs,bl.length)),cs})(Bn,u1(Bn,ir,Qe,F,we,vn));const ii=[],bi={positionedLines:ii,text:Bn.toString(),top:Er[1],bottom:Er[1],left:Er[0],right:Er[0],writingMode:Ir,iconsInText:!1,verticalizable:!1};return(function(Qi,Co,cs,bl,xs,ss,Hs,Ns,Ds,go,Qs,Gs){let Fl=0,mf=N_,of=0,kd=0;const np=Ns==="right"?1:Ns==="left"?0:.5;let jh=0;for(const lh of xs){lh.trim();const Pd=lh.getMaxScale(),Cv=(Pd-1)*xc,dv={positionedGlyphs:[],lineOffset:0};Qi.positionedLines[jh]=dv;const Yv=dv.positionedGlyphs;let Zd=0;if(!lh.length()){mf+=ss,++jh;continue}for(let kf=0;kf<lh.length();kf++){const Xu=lh.getSection(kf),Ic=lh.getSectionIndex(kf),Wc=lh.getCharCode(kf);let eh=0,Pf=null,W_=null,Gm=null,Xm=xc;const kv=!(Ds===t.ah.horizontal||!Qs&&!cl(Wc)||Qs&&(E3[Wc]||(dd=Wc,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(dd)))));if(Xu.imageName){const yf=bl[Xu.imageName];if(!yf)continue;Gm=Xu.imageName,Qi.iconsInText=Qi.iconsInText||!0,W_=yf.paddedRect;const $d=yf.displaySize;Xu.scale=Xu.scale*xc/Gs,Pf={width:$d[0],height:$d[1],left:hd,top:-r5,advance:kv?$d[1]:$d[0]},eh=Cv+(xc-$d[1]*Xu.scale),Xm=Pf.advance;const pm=kv?$d[0]*Xu.scale-xc*Pd:$d[1]*Xu.scale-xc*Pd;pm>0&&pm>Zd&&(Zd=pm)}else{const yf=cs[Xu.fontStack],$d=yf&&yf[Wc];if($d&&$d.rect)W_=$d.rect,Pf=$d.metrics;else{const pm=Co[Xu.fontStack],Lp=pm&&pm[Wc];if(!Lp)continue;Pf=Lp.metrics}eh=(Pd-Xu.scale)*xc}kv?(Qi.verticalizable=!0,Yv.push({glyph:Wc,imageName:Gm,x:Fl,y:mf+eh,vertical:kv,scale:Xu.scale,fontStack:Xu.fontStack,sectionIndex:Ic,metrics:Pf,rect:W_}),Fl+=Xm*Xu.scale+go):(Yv.push({glyph:Wc,imageName:Gm,x:Fl,y:mf+eh,vertical:kv,scale:Xu.scale,fontStack:Xu.fontStack,sectionIndex:Ic,metrics:Pf,rect:W_}),Fl+=Pf.advance*Xu.scale+go)}Yv.length!==0&&(of=Math.max(Fl-go,of),l8(Yv,0,Yv.length-1,np,Zd)),Fl=0;const Pp=ss*Pd+Zd;dv.lineOffset=Math.max(Zd,Cv),mf+=Pp,kd=Math.max(Pp,kd),++jh}var dd;const Gv=mf-N_,{horizontalAlign:Xv,verticalAlign:Wv}=a5(Hs);(function(lh,Pd,Cv,dv,Yv,Zd,Pp,kf,Xu){const Ic=(Pd-Cv)*Yv;let Wc=0;Wc=Zd!==Pp?-kf*dv-N_:(-dv*Xu+.5)*Pp;for(const eh of lh)for(const Pf of eh.positionedGlyphs)Pf.x+=Ic,Pf.y+=Wc})(Qi.positionedLines,np,Xv,Wv,of,kd,ss,Gv,xs.length),Qi.top+=-Wv*Gv,Qi.bottom=Qi.top+Gv,Qi.left+=-Xv*of,Qi.right=Qi.left+of})(bi,F,ae,we,Qn,at,St,jt,Ir,ir,rn,Cn),!(function(Qi){for(const Co of Qi)if(Co.positionedGlyphs.length!==0)return!1;return!0})(ii)&&bi}const E3={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},o8={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},s8={40:!0};function M3(K,F,ae,we,je,Qe){if(F.imageName){const at=we[F.imageName];return at?at.displaySize[0]*F.scale*xc/Qe+je:0}{const at=ae[F.fontStack],St=at&&at[K];return St?St.metrics.advance*F.scale+je:0}}function b6(K,F,ae,we){const je=Math.pow(K-F,2);return we?K<F?je/2:2*je:je+Math.abs(ae)*ae}function C3(K,F,ae){let we=0;return K===10&&(we-=1e4),ae&&(we+=150),K!==40&&K!==65288||(we+=50),F!==41&&F!==65289||(we+=50),we}function n5(K,F,ae,we,je,Qe){let at=null,St=b6(F,ae,je,Qe);for(const jt of we){const ir=b6(F-jt.x,ae,je,Qe)+jt.badness;ir<=St&&(at=jt,St=ir)}return{index:K,x:F,priorBreak:at,badness:St}}function iy(K){return K?iy(K.priorBreak).concat(K.index):[]}function u1(K,F,ae,we,je,Qe){if(!K)return[];const at=[],St=(function(Ir,rn,vn,Cn,Bn,Qn){let Ia=0;for(let Mi=0;Mi<Ir.length();Mi++){const ii=Ir.getSection(Mi);Ia+=M3(Ir.getCharCode(Mi),ii,Cn,Bn,rn,Qn)}return Ia/Math.max(1,Math.ceil(Ia/vn))})(K,F,ae,we,je,Qe),jt=K.text.indexOf("​")>=0;let ir=0;for(let Ir=0;Ir<K.length();Ir++){const rn=K.getSection(Ir),vn=K.getCharCode(Ir);if(E3[vn]||(ir+=M3(vn,rn,we,je,F,Qe)),Ir<K.length()-1){const Cn=!((Er=vn)<11904)&&(!!Yi["CJK Compatibility Forms"](Er)||!!Yi["CJK Compatibility"](Er)||!!Yi["CJK Strokes"](Er)||!!Yi["CJK Symbols and Punctuation"](Er)||!!Yi["Enclosed CJK Letters and Months"](Er)||!!Yi["Halfwidth and Fullwidth Forms"](Er)||!!Yi["Ideographic Description Characters"](Er)||!!Yi["Vertical Forms"](Er)||eu.test(String.fromCodePoint(Er)));(o8[vn]||Cn||rn.imageName||Ir!==K.length()-2&&s8[K.getCharCode(Ir+1)])&&at.push(n5(Ir+1,ir,St,at,C3(vn,K.getCharCode(Ir+1),Cn&&jt),!1))}}var Er;return iy(n5(K.length(),ir,St,at,0,!0))}function a5(K){let F=.5,ae=.5;switch(K){case"right":case"top-right":case"bottom-right":F=1;break;case"left":case"top-left":case"bottom-left":F=0}switch(K){case"bottom":case"bottom-right":case"bottom-left":ae=1;break;case"top":case"top-right":case"top-left":ae=0}return{horizontalAlign:F,verticalAlign:ae}}function l8(K,F,ae,we,je){if(!we&&!je)return;const Qe=K[ae],at=(K[ae].x+Qe.metrics.advance*Qe.scale)*we;for(let St=F;St<=ae;St++)K[St].x-=at,K[St].y+=je}function u8(K,F,ae){const{horizontalAlign:we,verticalAlign:je}=a5(ae),Qe=F[0]-K.displaySize[0]*we,at=F[1]-K.displaySize[1]*je;return{image:K,top:at,bottom:at+K.displaySize[1],left:Qe,right:Qe+K.displaySize[0]}}function w6(K){var F,ae;let we=K.left,je=K.top,Qe=K.right-we,at=K.bottom-je;const St=(F=K.image.textFitWidth)!==null&&F!==void 0?F:"stretchOrShrink",jt=(ae=K.image.textFitHeight)!==null&&ae!==void 0?ae:"stretchOrShrink",ir=(K.image.content[2]-K.image.content[0])/(K.image.content[3]-K.image.content[1]);if(jt==="proportional"){if(St==="stretchOnly"&&Qe/at<ir||St==="proportional"){const Er=Math.ceil(at*ir);we*=Er/Qe,Qe=Er}}else if(St==="proportional"&&jt==="stretchOnly"&&ir!==0&&Qe/at>ir){const Er=Math.ceil(Qe/ir);je*=Er/at,at=Er}return{x1:we,y1:je,x2:we+Qe,y2:je+at}}function T6(K,F,ae,we,je,Qe){const at=K.image;let St;if(at.content){const Qn=at.content,Ia=at.pixelRatio||1;St=[Qn[0]/Ia,Qn[1]/Ia,at.displaySize[0]-Qn[2]/Ia,at.displaySize[1]-Qn[3]/Ia]}const jt=F.left*Qe,ir=F.right*Qe;let Er,Ir,rn,vn;ae==="width"||ae==="both"?(vn=je[0]+jt-we[3],Ir=je[0]+ir+we[1]):(vn=je[0]+(jt+ir-at.displaySize[0])/2,Ir=vn+at.displaySize[0]);const Cn=F.top*Qe,Bn=F.bottom*Qe;return ae==="height"||ae==="both"?(Er=je[1]+Cn-we[0],rn=je[1]+Bn+we[2]):(Er=je[1]+(Cn+Bn-at.displaySize[1])/2,rn=Er+at.displaySize[1]),{image:at,top:Er,right:Ir,bottom:rn,left:vn,collisionPadding:St}}const qb=255,g0=128,ig=qb*g0;function A6(K,F){const{expression:ae}=F;if(ae.kind==="constant")return{kind:"constant",layoutSize:ae.evaluate(new Al(K+1))};if(ae.kind==="source")return{kind:"source"};{const{zoomStops:we,interpolationType:je}=ae;let Qe=0;for(;Qe<we.length&&we[Qe]<=K;)Qe++;Qe=Math.max(0,Qe-1);let at=Qe;for(;at<we.length&&we[at]<K+1;)at++;at=Math.min(we.length-1,at);const St=we[Qe],jt=we[at];return ae.kind==="composite"?{kind:"composite",minZoom:St,maxZoom:jt,interpolationType:je}:{kind:"camera",minZoom:St,maxZoom:jt,minSize:ae.evaluate(new Al(St)),maxSize:ae.evaluate(new Al(jt)),interpolationType:je}}}function i5(K,F,ae){let we="never";const je=K.get(F);return je?we=je:K.get(ae)&&(we="always"),we}const c8=Ma.VectorTileFeature.types,o5=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function k3(K,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn){const vn=St?Math.min(ig,Math.round(St[0])):0,Cn=St?Math.min(ig,Math.round(St[1])):0;K.emplaceBack(F,ae,Math.round(32*we),Math.round(32*je),Qe,at,(vn<<1)+(jt?1:0),Cn,16*ir,16*Er,256*Ir,256*rn)}function og(K,F,ae){K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae),K.emplaceBack(F.x,F.y,ae)}function f8(K){for(const F of K.sections)if(Ls(F.text))return!0;return!1}class gh{constructor(F){this.layoutVertexArray=new ct,this.indexArray=new fr,this.programConfigurations=F,this.segments=new Mn,this.dynamicLayoutVertexArray=new Pt,this.opacityVertexArray=new It,this.hasVisibleVertices=!1,this.placedSymbolArray=new Fo}isEmpty(){return this.layoutVertexArray.length===0&&this.indexArray.length===0&&this.dynamicLayoutVertexArray.length===0&&this.opacityVertexArray.length===0}upload(F,ae,we,je){this.isEmpty()||(we&&(this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,Qy.members),this.indexBuffer=F.createIndexBuffer(this.indexArray,ae),this.dynamicLayoutVertexBuffer=F.createVertexBuffer(this.dynamicLayoutVertexArray,I_.members,!0),this.opacityVertexBuffer=F.createVertexBuffer(this.opacityVertexArray,o5,!0),this.opacityVertexBuffer.itemSize=1),(we||je)&&this.programConfigurations.upload(F))}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())}}oi("SymbolBuffers",gh);class B_{constructor(F,ae,we){this.layoutVertexArray=new F,this.layoutAttributes=ae,this.indexArray=new we,this.segments=new Mn,this.collisionVertexArray=new hr}upload(F){this.layoutVertexBuffer=F.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=F.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=F.createVertexBuffer(this.collisionVertexArray,D_.members,!0)}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())}}oi("CollisionBuffers",B_);class c1{constructor(F){this.collisionBoxArray=F.collisionBoxArray,this.zoom=F.zoom,this.overscaling=F.overscaling,this.layers=F.layers,this.layerIds=this.layers.map(at=>at.id),this.index=F.index,this.pixelRatio=F.pixelRatio,this.sourceLayerIndex=F.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ta([]),this.placementViewportMatrix=Ta([]);const ae=this.layers[0]._unevaluatedLayout._values;this.textSizeData=A6(this.zoom,ae["text-size"]),this.iconSizeData=A6(this.zoom,ae["icon-size"]);const we=this.layers[0].layout,je=we.get("symbol-sort-key"),Qe=we.get("symbol-z-order");this.canOverlap=i5(we,"text-overlap","text-allow-overlap")!=="never"||i5(we,"icon-overlap","icon-allow-overlap")!=="never"||we.get("text-ignore-placement")||we.get("icon-ignore-placement"),this.sortFeaturesByKey=Qe!=="viewport-y"&&!je.isConstant(),this.sortFeaturesByY=(Qe==="viewport-y"||Qe==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,we.get("symbol-placement")==="point"&&(this.writingModes=we.get("text-writing-mode").map(at=>t.ah[at])),this.stateDependentLayerIds=this.layers.filter(at=>at.isStateDependent()).map(at=>at.id),this.sourceID=F.sourceID}createArrays(){this.text=new gh(new Vl(this.layers,this.zoom,F=>/^text/.test(F))),this.icon=new gh(new Vl(this.layers,this.zoom,F=>/^icon/.test(F))),this.glyphOffsetArray=new il,this.lineVertexArray=new ol,this.symbolInstances=new us,this.textAnchorOffsets=new hl}calculateGlyphDependencies(F,ae,we,je,Qe){for(let at=0;at<F.length;at++)if(ae[F.charCodeAt(at)]=!0,(we||je)&&Qe){const St=Cf[F.charAt(at)];St&&(ae[St.charCodeAt(0)]=!0)}}populate(F,ae,we){const je=this.layers[0],Qe=je.layout,at=Qe.get("text-font"),St=Qe.get("text-field"),jt=Qe.get("icon-image"),ir=(St.value.kind!=="constant"||St.value.value instanceof Ln&&!St.value.value.isEmpty()||St.value.value.toString().length>0)&&(at.value.kind!=="constant"||at.value.value.length>0),Er=jt.value.kind!=="constant"||!!jt.value.value||Object.keys(jt.parameters).length>0,Ir=Qe.get("symbol-sort-key");if(this.features=[],!ir&&!Er)return;const rn=ae.iconDependencies,vn=ae.glyphDependencies,Cn=ae.availableImages,Bn=new Al(this.zoom);for(const{feature:Qn,id:Ia,index:Mi,sourceLayerIndex:ii}of F){const bi=je._featureFilter.needGeometry,Qi=kr(Qn,bi);if(!je._featureFilter.filter(Bn,Qi,we))continue;let Co,cs;if(bi||(Qi.geometry=At(Qn)),ir){const xs=je.getValueAndResolveTokens("text-field",Qi,we,Cn),ss=Ln.factory(xs),Hs=this.hasRTLText=this.hasRTLText||f8(ss);(!Hs||ql.getRTLTextPluginStatus()==="unavailable"||Hs&&ql.isParsed())&&(Co=tg(ss,je,Qi))}if(Er){const xs=je.getValueAndResolveTokens("icon-image",Qi,we,Cn);cs=xs instanceof Pa?xs:Pa.fromString(xs)}if(!Co&&!cs)continue;const bl=this.sortFeaturesByKey?Ir.evaluate(Qi,{},we):void 0;if(this.features.push({id:Ia,text:Co,icon:cs,index:Mi,sourceLayerIndex:ii,geometry:Qi.geometry,properties:Qn.properties,type:c8[Qn.type],sortKey:bl}),cs&&(rn[cs.name]=!0),Co){const xs=at.evaluate(Qi,{},we).join(","),ss=Qe.get("text-rotation-alignment")!=="viewport"&&Qe.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(t.ah.vertical)>=0;for(const Hs of Co.sections)if(Hs.image)rn[Hs.image.name]=!0;else{const Ns=ys(Co.toString()),Ds=Hs.fontStack||xs,go=vn[Ds]=vn[Ds]||{};this.calculateGlyphDependencies(Hs.text,go,ss,this.allowVerticalPlacement,Ns)}}}Qe.get("symbol-placement")==="line"&&(this.features=(function(Qn){const Ia={},Mi={},ii=[];let bi=0;function Qi(xs){ii.push(Qn[xs]),bi++}function Co(xs,ss,Hs){const Ns=Mi[xs];return delete Mi[xs],Mi[ss]=Ns,ii[Ns].geometry[0].pop(),ii[Ns].geometry[0]=ii[Ns].geometry[0].concat(Hs[0]),Ns}function cs(xs,ss,Hs){const Ns=Ia[ss];return delete Ia[ss],Ia[xs]=Ns,ii[Ns].geometry[0].shift(),ii[Ns].geometry[0]=Hs[0].concat(ii[Ns].geometry[0]),Ns}function bl(xs,ss,Hs){const Ns=Hs?ss[0][ss[0].length-1]:ss[0][0];return`${xs}:${Ns.x}:${Ns.y}`}for(let xs=0;xs<Qn.length;xs++){const ss=Qn[xs],Hs=ss.geometry,Ns=ss.text?ss.text.toString():null;if(!Ns){Qi(xs);continue}const Ds=bl(Ns,Hs),go=bl(Ns,Hs,!0);if(Ds in Mi&&go in Ia&&Mi[Ds]!==Ia[go]){const Qs=cs(Ds,go,Hs),Gs=Co(Ds,go,ii[Qs].geometry);delete Ia[Ds],delete Mi[go],Mi[bl(Ns,ii[Gs].geometry,!0)]=Gs,ii[Qs].geometry=null}else Ds in Mi?Co(Ds,go,Hs):go in Ia?cs(Ds,go,Hs):(Qi(xs),Ia[Ds]=bi-1,Mi[go]=bi-1)}return ii.filter(xs=>xs.geometry)})(this.features)),this.sortFeaturesByKey&&this.features.sort((Qn,Ia)=>Qn.sortKey-Ia.sortKey)}update(F,ae,we){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(F,ae,this.layers,we),this.icon.programConfigurations.updatePaintArrays(F,ae,this.layers,we))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(F){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(F),this.iconCollisionBox.upload(F)),this.text.upload(F,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(F,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(F,ae){const we=this.lineVertexArray.length;if(F.segment!==void 0){let je=F.dist(ae[F.segment+1]),Qe=F.dist(ae[F.segment]);const at={};for(let St=F.segment+1;St<ae.length;St++)at[St]={x:ae[St].x,y:ae[St].y,tileUnitDistanceFromAnchor:je},St<ae.length-1&&(je+=ae[St+1].dist(ae[St]));for(let St=F.segment||0;St>=0;St--)at[St]={x:ae[St].x,y:ae[St].y,tileUnitDistanceFromAnchor:Qe},St>0&&(Qe+=ae[St-1].dist(ae[St]));for(let St=0;St<ae.length;St++){const jt=at[St];this.lineVertexArray.emplaceBack(jt.x,jt.y,jt.tileUnitDistanceFromAnchor)}}return{lineStartIndex:we,lineLength:this.lineVertexArray.length-we}}addSymbols(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn){const vn=F.indexArray,Cn=F.layoutVertexArray,Bn=F.segments.prepareSegment(4*ae.length,Cn,vn,this.canOverlap?at.sortKey:void 0),Qn=this.glyphOffsetArray.length,Ia=Bn.vertexLength,Mi=this.allowVerticalPlacement&&St===t.ah.vertical?Math.PI/2:0,ii=at.text&&at.text.sections;for(let bi=0;bi<ae.length;bi++){const{tl:Qi,tr:Co,bl:cs,br:bl,tex:xs,pixelOffsetTL:ss,pixelOffsetBR:Hs,minFontScaleX:Ns,minFontScaleY:Ds,glyphOffset:go,isSDF:Qs,sectionIndex:Gs}=ae[bi],Fl=Bn.vertexLength,mf=go[1];k3(Cn,jt.x,jt.y,Qi.x,mf+Qi.y,xs.x,xs.y,we,Qs,ss.x,ss.y,Ns,Ds),k3(Cn,jt.x,jt.y,Co.x,mf+Co.y,xs.x+xs.w,xs.y,we,Qs,Hs.x,ss.y,Ns,Ds),k3(Cn,jt.x,jt.y,cs.x,mf+cs.y,xs.x,xs.y+xs.h,we,Qs,ss.x,Hs.y,Ns,Ds),k3(Cn,jt.x,jt.y,bl.x,mf+bl.y,xs.x+xs.w,xs.y+xs.h,we,Qs,Hs.x,Hs.y,Ns,Ds),og(F.dynamicLayoutVertexArray,jt,Mi),vn.emplaceBack(Fl,Fl+1,Fl+2),vn.emplaceBack(Fl+1,Fl+2,Fl+3),Bn.vertexLength+=4,Bn.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(go[0]),bi!==ae.length-1&&Gs===ae[bi+1].sectionIndex||F.programConfigurations.populatePaintArrays(Cn.length,at,at.index,{},rn,ii&&ii[Gs])}F.placedSymbolArray.emplaceBack(jt.x,jt.y,Qn,this.glyphOffsetArray.length-Qn,Ia,ir,Er,jt.segment,we?we[0]:0,we?we[1]:0,je[0],je[1],St,0,!1,0,Ir)}_addCollisionDebugVertex(F,ae,we,je,Qe,at){return ae.emplaceBack(0,0),F.emplaceBack(we.x,we.y,je,Qe,Math.round(at.x),Math.round(at.y))}addCollisionDebugVertices(F,ae,we,je,Qe,at,St){const jt=Qe.segments.prepareSegment(4,Qe.layoutVertexArray,Qe.indexArray),ir=jt.vertexLength,Er=Qe.layoutVertexArray,Ir=Qe.collisionVertexArray,rn=St.anchorX,vn=St.anchorY;this._addCollisionDebugVertex(Er,Ir,at,rn,vn,new s(F,ae)),this._addCollisionDebugVertex(Er,Ir,at,rn,vn,new s(we,ae)),this._addCollisionDebugVertex(Er,Ir,at,rn,vn,new s(we,je)),this._addCollisionDebugVertex(Er,Ir,at,rn,vn,new s(F,je)),jt.vertexLength+=4;const Cn=Qe.indexArray;Cn.emplaceBack(ir,ir+1),Cn.emplaceBack(ir+1,ir+2),Cn.emplaceBack(ir+2,ir+3),Cn.emplaceBack(ir+3,ir),jt.primitiveLength+=4}addDebugCollisionBoxes(F,ae,we,je){for(let Qe=F;Qe<ae;Qe++){const at=this.collisionBoxArray.get(Qe);this.addCollisionDebugVertices(at.x1,at.y1,at.x2,at.y2,je?this.textCollisionBox:this.iconCollisionBox,at.anchorPoint,we)}}generateCollisionDebugBuffers(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new B_(Ut,s1.members,Pr),this.iconCollisionBox=new B_(Ut,s1.members,Pr);for(let F=0;F<this.symbolInstances.length;F++){const ae=this.symbolInstances.get(F);this.addDebugCollisionBoxes(ae.textBoxStartIndex,ae.textBoxEndIndex,ae,!0),this.addDebugCollisionBoxes(ae.verticalTextBoxStartIndex,ae.verticalTextBoxEndIndex,ae,!0),this.addDebugCollisionBoxes(ae.iconBoxStartIndex,ae.iconBoxEndIndex,ae,!1),this.addDebugCollisionBoxes(ae.verticalIconBoxStartIndex,ae.verticalIconBoxEndIndex,ae,!1)}}_deserializeCollisionBoxesForSymbol(F,ae,we,je,Qe,at,St,jt,ir){const Er={};for(let Ir=ae;Ir<we;Ir++){const rn=F.get(Ir);Er.textBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},Er.textFeatureIndex=rn.featureIndex;break}for(let Ir=je;Ir<Qe;Ir++){const rn=F.get(Ir);Er.verticalTextBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},Er.verticalTextFeatureIndex=rn.featureIndex;break}for(let Ir=at;Ir<St;Ir++){const rn=F.get(Ir);Er.iconBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},Er.iconFeatureIndex=rn.featureIndex;break}for(let Ir=jt;Ir<ir;Ir++){const rn=F.get(Ir);Er.verticalIconBox={x1:rn.x1,y1:rn.y1,x2:rn.x2,y2:rn.y2,anchorPointX:rn.anchorPointX,anchorPointY:rn.anchorPointY},Er.verticalIconFeatureIndex=rn.featureIndex;break}return Er}deserializeCollisionBoxes(F){this.collisionArrays=[];for(let ae=0;ae<this.symbolInstances.length;ae++){const we=this.symbolInstances.get(ae);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(F,we.textBoxStartIndex,we.textBoxEndIndex,we.verticalTextBoxStartIndex,we.verticalTextBoxEndIndex,we.iconBoxStartIndex,we.iconBoxEndIndex,we.verticalIconBoxStartIndex,we.verticalIconBoxEndIndex))}}hasTextData(){return this.text.segments.get().length>0}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(F,ae){const we=F.placedSymbolArray.get(ae),je=we.vertexStartIndex+4*we.numGlyphs;for(let Qe=we.vertexStartIndex;Qe<je;Qe+=4)F.indexArray.emplaceBack(Qe,Qe+1,Qe+2),F.indexArray.emplaceBack(Qe+1,Qe+2,Qe+3)}getSortedSymbolIndexes(F){if(this.sortedAngle===F&&this.symbolInstanceIndexes!==void 0)return this.symbolInstanceIndexes;const ae=Math.sin(F),we=Math.cos(F),je=[],Qe=[],at=[];for(let St=0;St<this.symbolInstances.length;++St){at.push(St);const jt=this.symbolInstances.get(St);je.push(0|Math.round(ae*jt.anchorX+we*jt.anchorY)),Qe.push(jt.featureIndex)}return at.sort((St,jt)=>je[St]-je[jt]||Qe[jt]-Qe[St]),at}addToSortKeyRanges(F,ae){const we=this.sortKeyRanges[this.sortKeyRanges.length-1];we&&we.sortKey===ae?we.symbolInstanceEnd=F+1:this.sortKeyRanges.push({sortKey:ae,symbolInstanceStart:F,symbolInstanceEnd:F+1})}sortFeatures(F){if(this.sortFeaturesByY&&this.sortedAngle!==F&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(F),this.sortedAngle=F,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(const ae of this.symbolInstanceIndexes){const we=this.symbolInstances.get(ae);this.featureSortOrder.push(we.featureIndex),[we.rightJustifiedTextSymbolIndex,we.centerJustifiedTextSymbolIndex,we.leftJustifiedTextSymbolIndex].forEach((je,Qe,at)=>{je>=0&&at.indexOf(je)===Qe&&this.addIndicesForPlacedSymbol(this.text,je)}),we.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,we.verticalPlacedTextSymbolIndex),we.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,we.placedIconSymbolIndex),we.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,we.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let Vb,Hb;oi("SymbolBucket",c1,{omit:["layers","collisionBoxArray","features","compareText"]}),c1.MAX_GLYPHS=65535,c1.addDynamicAttributes=og;var s5={get paint(){return Hb=Hb||new Ze({"icon-opacity":new _s(ue.paint_symbol["icon-opacity"]),"icon-color":new _s(ue.paint_symbol["icon-color"]),"icon-halo-color":new _s(ue.paint_symbol["icon-halo-color"]),"icon-halo-width":new _s(ue.paint_symbol["icon-halo-width"]),"icon-halo-blur":new _s(ue.paint_symbol["icon-halo-blur"]),"icon-translate":new os(ue.paint_symbol["icon-translate"]),"icon-translate-anchor":new os(ue.paint_symbol["icon-translate-anchor"]),"text-opacity":new _s(ue.paint_symbol["text-opacity"]),"text-color":new _s(ue.paint_symbol["text-color"],{runtimeType:cr,getOverride:K=>K.textColor,hasOverride:K=>!!K.textColor}),"text-halo-color":new _s(ue.paint_symbol["text-halo-color"]),"text-halo-width":new _s(ue.paint_symbol["text-halo-width"]),"text-halo-blur":new _s(ue.paint_symbol["text-halo-blur"]),"text-translate":new os(ue.paint_symbol["text-translate"]),"text-translate-anchor":new os(ue.paint_symbol["text-translate-anchor"])})},get layout(){return Vb=Vb||new Ze({"symbol-placement":new os(ue.layout_symbol["symbol-placement"]),"symbol-spacing":new os(ue.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new os(ue.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new _s(ue.layout_symbol["symbol-sort-key"]),"symbol-z-order":new os(ue.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new os(ue.layout_symbol["icon-allow-overlap"]),"icon-overlap":new os(ue.layout_symbol["icon-overlap"]),"icon-ignore-placement":new os(ue.layout_symbol["icon-ignore-placement"]),"icon-optional":new os(ue.layout_symbol["icon-optional"]),"icon-rotation-alignment":new os(ue.layout_symbol["icon-rotation-alignment"]),"icon-size":new _s(ue.layout_symbol["icon-size"]),"icon-text-fit":new os(ue.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new os(ue.layout_symbol["icon-text-fit-padding"]),"icon-image":new _s(ue.layout_symbol["icon-image"]),"icon-rotate":new _s(ue.layout_symbol["icon-rotate"]),"icon-padding":new _s(ue.layout_symbol["icon-padding"]),"icon-keep-upright":new os(ue.layout_symbol["icon-keep-upright"]),"icon-offset":new _s(ue.layout_symbol["icon-offset"]),"icon-anchor":new _s(ue.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new os(ue.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new os(ue.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new os(ue.layout_symbol["text-rotation-alignment"]),"text-field":new _s(ue.layout_symbol["text-field"]),"text-font":new _s(ue.layout_symbol["text-font"]),"text-size":new _s(ue.layout_symbol["text-size"]),"text-max-width":new _s(ue.layout_symbol["text-max-width"]),"text-line-height":new os(ue.layout_symbol["text-line-height"]),"text-letter-spacing":new _s(ue.layout_symbol["text-letter-spacing"]),"text-justify":new _s(ue.layout_symbol["text-justify"]),"text-radial-offset":new _s(ue.layout_symbol["text-radial-offset"]),"text-variable-anchor":new os(ue.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new _s(ue.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new _s(ue.layout_symbol["text-anchor"]),"text-max-angle":new os(ue.layout_symbol["text-max-angle"]),"text-writing-mode":new os(ue.layout_symbol["text-writing-mode"]),"text-rotate":new _s(ue.layout_symbol["text-rotate"]),"text-padding":new os(ue.layout_symbol["text-padding"]),"text-keep-upright":new os(ue.layout_symbol["text-keep-upright"]),"text-transform":new _s(ue.layout_symbol["text-transform"]),"text-offset":new _s(ue.layout_symbol["text-offset"]),"text-allow-overlap":new os(ue.layout_symbol["text-allow-overlap"]),"text-overlap":new os(ue.layout_symbol["text-overlap"]),"text-ignore-placement":new os(ue.layout_symbol["text-ignore-placement"]),"text-optional":new os(ue.layout_symbol["text-optional"])})}};class j_{constructor(F){if(F.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=F.property.overrides?F.property.overrides.runtimeType:bt,this.defaultValue=F}evaluate(F){if(F.formattedSection){const ae=this.defaultValue.property.overrides;if(ae&&ae.hasOverride(F.formattedSection))return ae.getOverride(F.formattedSection)}return F.feature&&F.featureState?this.defaultValue.evaluate(F.feature,F.featureState):this.defaultValue.property.specification.default}eachChild(F){this.defaultValue.isConstant()||F(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}oi("FormatSectionOverride",j_,{omit:["defaultValue"]});class P3 extends fe{constructor(F){super(F,s5)}recalculate(F,ae){if(super.recalculate(F,ae),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){const we=this.layout.get("text-writing-mode");if(we){const je=[];for(const Qe of we)je.indexOf(Qe)<0&&je.push(Qe);this.layout._values["text-writing-mode"]=je}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(F,ae,we,je){const Qe=this.layout.get(F).evaluate(ae,{},we,je),at=this._unevaluatedLayout._values[F];return at.isDataDriven()||$f(at.value)||!Qe?Qe:(function(St,jt){return jt.replace(/{([^{}]+)}/g,(ir,Er)=>St&&Er in St?String(St[Er]):"")})(ae.properties,Qe)}createBucket(F){return new c1(F)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(const F of s5.paint.overridableProperties){if(!P3.hasPaintOverride(this.layout,F))continue;const ae=this.paint.get(F),we=new j_(ae),je=new qc(we,ae.property.specification);let Qe=null;Qe=ae.value.kind==="constant"||ae.value.kind==="source"?new zf("source",je):new wc("composite",je,ae.value.zoomStops),this.paint._values[F]=new Ou(ae.property,Qe,ae.parameters)}}_handleOverridablePaintPropertyUpdate(F,ae,we){return!(!this.layout||ae.isDataDriven()||we.isDataDriven())&&P3.hasPaintOverride(this.layout,F)}static hasPaintOverride(F,ae){const we=F.get("text-field"),je=s5.paint.properties[ae];let Qe=!1;const at=St=>{for(const jt of St)if(je.overrides&&je.overrides.hasOverride(jt))return void(Qe=!0)};if(we.value.kind==="constant"&&we.value.value instanceof Ln)at(we.value.value.sections);else if(we.value.kind==="source"){const St=ir=>{Qe||(ir instanceof Gi&&oa(ir.value)===cn?at(ir.value.sections):ir instanceof ml?at(ir.sections):ir.eachChild(St))},jt=we.value;jt._styleExpression&&St(jt._styleExpression.expression)}return Qe}}let l5;var S6={get paint(){return l5=l5||new Ze({"background-color":new os(ue.paint_background["background-color"]),"background-pattern":new nf(ue.paint_background["background-pattern"]),"background-opacity":new os(ue.paint_background["background-opacity"])})}};class Gb extends fe{constructor(F){super(F,S6)}}let L3;var u5={get paint(){return L3=L3||new Ze({"raster-opacity":new os(ue.paint_raster["raster-opacity"]),"raster-hue-rotate":new os(ue.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new os(ue.paint_raster["raster-brightness-min"]),"raster-brightness-max":new os(ue.paint_raster["raster-brightness-max"]),"raster-saturation":new os(ue.paint_raster["raster-saturation"]),"raster-contrast":new os(ue.paint_raster["raster-contrast"]),"raster-resampling":new os(ue.paint_raster["raster-resampling"]),"raster-fade-duration":new os(ue.paint_raster["raster-fade-duration"])})}};class h8 extends fe{constructor(F){super(F,u5)}}class E6 extends fe{constructor(F){super(F,{}),this.onAdd=ae=>{this.implementation.onAdd&&this.implementation.onAdd(ae,ae.painter.context.gl)},this.onRemove=ae=>{this.implementation.onRemove&&this.implementation.onRemove(ae,ae.painter.context.gl)},this.implementation=F}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class Xb{constructor(F){this._methodToThrottle=F,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}const c5=63710088e-1;class _0{constructor(F,ae){if(isNaN(F)||isNaN(ae))throw new Error(`Invalid LngLat object: (${F}, ${ae})`);if(this.lng=+F,this.lat=+ae,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new _0(M(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(F){const ae=Math.PI/180,we=this.lat*ae,je=F.lat*ae,Qe=Math.sin(we)*Math.sin(je)+Math.cos(we)*Math.cos(je)*Math.cos((F.lng-this.lng)*ae);return c5*Math.acos(Math.min(Qe,1))}static convert(F){if(F instanceof _0)return F;if(Array.isArray(F)&&(F.length===2||F.length===3))return new _0(Number(F[0]),Number(F[1]));if(!Array.isArray(F)&&typeof F=="object"&&F!==null)return new _0(Number("lng"in F?F.lng:F.lon),Number(F.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")}}const M6=2*Math.PI*c5;function R3(K){return M6*Math.cos(K*Math.PI/180)}function I3(K){return(180+K)/360}function C6(K){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+K*Math.PI/360)))/360}function vm(K,F){return K/R3(F)}function f5(K){return 360/Math.PI*Math.atan(Math.exp((180-360*K)*Math.PI/180))-90}class Wb{constructor(F,ae,we=0){this.x=+F,this.y=+ae,this.z=+we}static fromLngLat(F,ae=0){const we=_0.convert(F);return new Wb(I3(we.lng),C6(we.lat),vm(ae,we.lat))}toLngLat(){return new _0(360*this.x-180,f5(this.y))}toAltitude(){return this.z*R3(f5(this.y))}meterInMercatorCoordinateUnits(){return 1/M6*(F=f5(this.y),1/Math.cos(F*Math.PI/180));var F}}function k6(K,F,ae){var we=2*Math.PI*6378137/256/Math.pow(2,ae);return[K*we-2*Math.PI*6378137/2,F*we-2*Math.PI*6378137/2]}class h5{constructor(F,ae,we){if(!(function(je,Qe,at){return!(je<0||je>25||at<0||at>=Math.pow(2,je)||Qe<0||Qe>=Math.pow(2,je))})(F,ae,we))throw new Error(`x=${ae}, y=${we}, z=${F} outside of bounds. 0<=x<${Math.pow(2,F)}, 0<=y<${Math.pow(2,F)} 0<=z<=25 `);this.z=F,this.x=ae,this.y=we,this.key=U_(0,F,F,ae,we)}equals(F){return this.z===F.z&&this.x===F.x&&this.y===F.y}url(F,ae,we){const je=(at=this.y,St=this.z,jt=k6(256*(Qe=this.x),256*(at=Math.pow(2,St)-at-1),St),ir=k6(256*(Qe+1),256*(at+1),St),jt[0]+","+jt[1]+","+ir[0]+","+ir[1]);var Qe,at,St,jt,ir;const Er=(function(Ir,rn,vn){let Cn,Bn="";for(let Qn=Ir;Qn>0;Qn--)Cn=1<<Qn-1,Bn+=(rn&Cn?1:0)+(vn&Cn?2:0);return Bn})(this.z,this.x,this.y);return F[(this.x+this.y)%F.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(we==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace(/{ratio}/g,ae>1?"@2x":"").replace(/{quadkey}/g,Er).replace(/{bbox-epsg-3857}/g,je)}isChildOf(F){const ae=this.z-F.z;return ae>0&&F.x===this.x>>ae&&F.y===this.y>>ae}getTilePoint(F){const ae=Math.pow(2,this.z);return new s((F.x*ae-this.x)*ru,(F.y*ae-this.y)*ru)}toString(){return`${this.z}/${this.x}/${this.y}`}}class P6{constructor(F,ae){this.wrap=F,this.canonical=ae,this.key=U_(F,ae.z,ae.z,ae.x,ae.y)}}class em{constructor(F,ae,we,je,Qe){if(F<we)throw new Error(`overscaledZ should be >= z; overscaledZ = ${F}; z = ${we}`);this.overscaledZ=F,this.wrap=ae,this.canonical=new h5(we,+je,+Qe),this.key=U_(ae,F,we,je,Qe)}clone(){return new em(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(F){return this.overscaledZ===F.overscaledZ&&this.wrap===F.wrap&&this.canonical.equals(F.canonical)}scaledTo(F){if(F>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${F}; overscaledZ = ${this.overscaledZ}`);const ae=this.canonical.z-F;return F>this.canonical.z?new em(F,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new em(F,this.wrap,F,this.canonical.x>>ae,this.canonical.y>>ae)}calculateScaledKey(F,ae){if(F>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${F}; overscaledZ = ${this.overscaledZ}`);const we=this.canonical.z-F;return F>this.canonical.z?U_(this.wrap*+ae,F,this.canonical.z,this.canonical.x,this.canonical.y):U_(this.wrap*+ae,F,F,this.canonical.x>>we,this.canonical.y>>we)}isChildOf(F){if(F.wrap!==this.wrap)return!1;const ae=this.canonical.z-F.canonical.z;return F.overscaledZ===0||F.overscaledZ<this.overscaledZ&&F.canonical.x===this.canonical.x>>ae&&F.canonical.y===this.canonical.y>>ae}children(F){if(this.overscaledZ>=F)return[new em(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];const ae=this.canonical.z+1,we=2*this.canonical.x,je=2*this.canonical.y;return[new em(ae,this.wrap,ae,we,je),new em(ae,this.wrap,ae,we+1,je),new em(ae,this.wrap,ae,we,je+1),new em(ae,this.wrap,ae,we+1,je+1)]}isLessThan(F){return this.wrap<F.wrap||!(this.wrap>F.wrap)&&(this.overscaledZ<F.overscaledZ||!(this.overscaledZ>F.overscaledZ)&&(this.canonical.x<F.canonical.x||!(this.canonical.x>F.canonical.x)&&this.canonical.y<F.canonical.y))}wrapped(){return new em(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(F){return new em(this.overscaledZ,F,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new P6(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(F){return this.canonical.getTilePoint(new Wb(F.x-this.wrap,F.y))}}function U_(K,F,ae,we,je){(K*=2)<0&&(K=-1*K-1);const Qe=1<<ae;return(Qe*Qe*K+Qe*je+we).toString(36)+ae.toString(36)+F.toString(36)}oi("CanonicalTileID",h5),oi("OverscaledTileID",em,{omit:["posMatrix"]});class f1{constructor(F,ae,we,je=1,Qe=1,at=1,St=0){if(this.uid=F,ae.height!==ae.width)throw new RangeError("DEM tiles must be square");if(we&&!["mapbox","terrarium","custom"].includes(we))return void x(`"${we}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);this.stride=ae.height;const jt=this.dim=ae.height-2;switch(this.data=new Uint32Array(ae.data.buffer),we){case"terrarium":this.redFactor=256,this.greenFactor=1,this.blueFactor=1/256,this.baseShift=32768;break;case"custom":this.redFactor=je,this.greenFactor=Qe,this.blueFactor=at,this.baseShift=St;break;default:this.redFactor=6553.6,this.greenFactor=25.6,this.blueFactor=.1,this.baseShift=1e4}for(let ir=0;ir<jt;ir++)this.data[this._idx(-1,ir)]=this.data[this._idx(0,ir)],this.data[this._idx(jt,ir)]=this.data[this._idx(jt-1,ir)],this.data[this._idx(ir,-1)]=this.data[this._idx(ir,0)],this.data[this._idx(ir,jt)]=this.data[this._idx(ir,jt-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(jt,-1)]=this.data[this._idx(jt-1,0)],this.data[this._idx(-1,jt)]=this.data[this._idx(0,jt-1)],this.data[this._idx(jt,jt)]=this.data[this._idx(jt-1,jt-1)],this.min=Number.MAX_SAFE_INTEGER,this.max=Number.MIN_SAFE_INTEGER;for(let ir=0;ir<jt;ir++)for(let Er=0;Er<jt;Er++){const Ir=this.get(ir,Er);Ir>this.max&&(this.max=Ir),Ir<this.min&&(this.min=Ir)}}get(F,ae){const we=new Uint8Array(this.data.buffer),je=4*this._idx(F,ae);return this.unpack(we[je],we[je+1],we[je+2])}getUnpackVector(){return[this.redFactor,this.greenFactor,this.blueFactor,this.baseShift]}_idx(F,ae){if(F<-1||F>=this.dim+1||ae<-1||ae>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(ae+1)*this.stride+(F+1)}unpack(F,ae,we){return F*this.redFactor+ae*this.greenFactor+we*this.blueFactor-this.baseShift}getPixels(){return new _l({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(F,ae,we){if(this.dim!==F.dim)throw new Error("dem dimension mismatch");let je=ae*this.dim,Qe=ae*this.dim+this.dim,at=we*this.dim,St=we*this.dim+this.dim;switch(ae){case-1:je=Qe-1;break;case 1:Qe=je+1}switch(we){case-1:at=St-1;break;case 1:St=at+1}const jt=-ae*this.dim,ir=-we*this.dim;for(let Er=at;Er<St;Er++)for(let Ir=je;Ir<Qe;Ir++)this.data[this._idx(Ir,Er)]=F.data[this._idx(Ir+jt,Er+ir)]}}oi("DEMData",f1);class L6{constructor(F){this._stringToNumber={},this._numberToString=[];for(let ae=0;ae<F.length;ae++){const we=F[ae];this._stringToNumber[we]=ae,this._numberToString[ae]=we}}encode(F){return this._stringToNumber[F]}decode(F){if(F>=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${F} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[F]}}class R6{constructor(F,ae,we,je,Qe){this.type="Feature",this._vectorTileFeature=F,F._z=ae,F._x=we,F._y=je,this.properties=F.properties,this.id=Qe}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(F){this._geometry=F}toJSON(){const F={geometry:this.geometry};for(const ae in this)ae!=="_geometry"&&ae!=="_vectorTileFeature"&&(F[ae]=this[ae]);return F}}class I6{constructor(F,ae){this.tileID=F,this.x=F.canonical.x,this.y=F.canonical.y,this.z=F.canonical.z,this.grid=new qi(ru,16,0),this.grid3D=new qi(ru,16,0),this.featureIndexArray=new cu,this.promoteId=ae}insert(F,ae,we,je,Qe,at){const St=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(we,je,Qe);const jt=at?this.grid3D:this.grid;for(let ir=0;ir<ae.length;ir++){const Er=ae[ir],Ir=[1/0,1/0,-1/0,-1/0];for(let rn=0;rn<Er.length;rn++){const vn=Er[rn];Ir[0]=Math.min(Ir[0],vn.x),Ir[1]=Math.min(Ir[1],vn.y),Ir[2]=Math.max(Ir[2],vn.x),Ir[3]=Math.max(Ir[3],vn.y)}Ir[0]<ru&&Ir[1]<ru&&Ir[2]>=0&&Ir[3]>=0&&jt.insert(St,Ir[0],Ir[1],Ir[2],Ir[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Ma.VectorTile(new e5(this.rawTileData)).layers,this.sourceLayerCoder=new L6(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(F,ae,we,je){this.loadVTLayers();const Qe=F.params||{},at=ru/F.tileSize/F.scale,St=zh(Qe.filter),jt=F.queryGeometry,ir=F.queryPadding*at,Er=d5(jt),Ir=this.grid.query(Er.minX-ir,Er.minY-ir,Er.maxX+ir,Er.maxY+ir),rn=d5(F.cameraQueryGeometry),vn=this.grid3D.query(rn.minX-ir,rn.minY-ir,rn.maxX+ir,rn.maxY+ir,(Qn,Ia,Mi,ii)=>(function(bi,Qi,Co,cs,bl){for(const ss of bi)if(Qi<=ss.x&&Co<=ss.y&&cs>=ss.x&&bl>=ss.y)return!0;const xs=[new s(Qi,Co),new s(Qi,bl),new s(cs,bl),new s(cs,Co)];if(bi.length>2){for(const ss of xs)if(fi(bi,ss))return!0}for(let ss=0;ss<bi.length-1;ss++)if(Oa(bi[ss],bi[ss+1],xs))return!0;return!1})(F.cameraQueryGeometry,Qn-ir,Ia-ir,Mi+ir,ii+ir));for(const Qn of vn)Ir.push(Qn);Ir.sort(O6);const Cn={};let Bn;for(let Qn=0;Qn<Ir.length;Qn++){const Ia=Ir[Qn];if(Ia===Bn)continue;Bn=Ia;const Mi=this.featureIndexArray.get(Ia);let ii=null;this.loadMatchingFeature(Cn,Mi.bucketIndex,Mi.sourceLayerIndex,Mi.featureIndex,St,Qe.layers,Qe.availableImages,ae,we,je,(bi,Qi,Co)=>(ii||(ii=At(bi)),Qi.queryIntersectsFeature(jt,bi,Co,ii,this.z,F.transform,at,F.pixelPosMatrix)))}return Cn}loadMatchingFeature(F,ae,we,je,Qe,at,St,jt,ir,Er,Ir){const rn=this.bucketLayerIDs[ae];if(at&&!(function(Qn,Ia){for(let Mi=0;Mi<Qn.length;Mi++)if(Ia.indexOf(Qn[Mi])>=0)return!0;return!1})(at,rn))return;const vn=this.sourceLayerCoder.decode(we),Cn=this.vtLayers[vn].feature(je);if(Qe.needGeometry){const Qn=kr(Cn,!0);if(!Qe.filter(new Al(this.tileID.overscaledZ),Qn,this.tileID.canonical))return}else if(!Qe.filter(new Al(this.tileID.overscaledZ),Cn))return;const Bn=this.getId(Cn,vn);for(let Qn=0;Qn<rn.length;Qn++){const Ia=rn[Qn];if(at&&at.indexOf(Ia)<0)continue;const Mi=jt[Ia];if(!Mi)continue;let ii={};Bn&&Er&&(ii=Er.getState(Mi.sourceLayer||"_geojsonTileLayer",Bn));const bi=k({},ir[Ia]);bi.paint=D6(bi.paint,Mi.paint,Cn,ii,St),bi.layout=D6(bi.layout,Mi.layout,Cn,ii,St);const Qi=!Ir||Ir(Cn,Mi,ii);if(!Qi)continue;const Co=new R6(Cn,this.z,this.x,this.y,Bn);Co.layer=bi;let cs=F[Ia];cs===void 0&&(cs=F[Ia]=[]),cs.push({featureIndex:je,feature:Co,intersectionZ:Qi})}}lookupSymbolFeatures(F,ae,we,je,Qe,at,St,jt){const ir={};this.loadVTLayers();const Er=zh(Qe);for(const Ir of F)this.loadMatchingFeature(ir,we,je,Ir,Er,at,St,jt,ae);return ir}hasLayer(F){for(const ae of this.bucketLayerIDs)for(const we of ae)if(F===we)return!0;return!1}getId(F,ae){let we=F.id;return this.promoteId&&(we=F.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[ae]],typeof we=="boolean"&&(we=Number(we))),we}}function D6(K,F,ae,we,je){return A(K,(Qe,at)=>{const St=F instanceof Bf?F.get(at):null;return St&&St.evaluate?St.evaluate(ae,we,je):St})}function d5(K){let F=1/0,ae=1/0,we=-1/0,je=-1/0;for(const Qe of K)F=Math.min(F,Qe.x),ae=Math.min(ae,Qe.y),we=Math.max(we,Qe.x),je=Math.max(je,Qe.y);return{minX:F,minY:ae,maxX:we,maxY:je}}function O6(K,F){return F-K}function z6(K,F,ae,we,je){const Qe=[];for(let at=0;at<K.length;at++){const St=K[at];let jt;for(let ir=0;ir<St.length-1;ir++){let Er=St[ir],Ir=St[ir+1];Er.x<F&&Ir.x<F||(Er.x<F?Er=new s(F,Er.y+(F-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round():Ir.x<F&&(Ir=new s(F,Er.y+(F-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round()),Er.y<ae&&Ir.y<ae||(Er.y<ae?Er=new s(Er.x+(ae-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),ae)._round():Ir.y<ae&&(Ir=new s(Er.x+(ae-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),ae)._round()),Er.x>=we&&Ir.x>=we||(Er.x>=we?Er=new s(we,Er.y+(we-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round():Ir.x>=we&&(Ir=new s(we,Er.y+(we-Er.x)/(Ir.x-Er.x)*(Ir.y-Er.y))._round()),Er.y>=je&&Ir.y>=je||(Er.y>=je?Er=new s(Er.x+(je-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),je)._round():Ir.y>=je&&(Ir=new s(Er.x+(je-Er.y)/(Ir.y-Er.y)*(Ir.x-Er.x),je)._round()),jt&&Er.equals(jt[jt.length-1])||(jt=[Er],Qe.push(jt)),jt.push(Ir)))))}}return Qe}oi("FeatureIndex",I6,{omit:["rawTileData","sourceLayerCoder"]});class sg extends s{constructor(F,ae,we,je){super(F,ae),this.angle=we,je!==void 0&&(this.segment=je)}clone(){return new sg(this.x,this.y,this.angle,this.segment)}}function N6(K,F,ae,we,je){if(F.segment===void 0||ae===0)return!0;let Qe=F,at=F.segment+1,St=0;for(;St>-ae/2;){if(at--,at<0)return!1;St-=K[at].dist(Qe),Qe=K[at]}St+=K[at].dist(K[at+1]),at++;const jt=[];let ir=0;for(;St<ae/2;){const Er=K[at],Ir=K[at+1];if(!Ir)return!1;let rn=K[at-1].angleTo(Er)-Er.angleTo(Ir);for(rn=Math.abs((rn+3*Math.PI)%(2*Math.PI)-Math.PI),jt.push({distance:St,angleDelta:rn}),ir+=rn;St-jt[0].distance>we;)ir-=jt.shift().angleDelta;if(ir>je)return!1;at++,St+=Er.dist(Ir)}return!0}function F6(K){let F=0;for(let ae=0;ae<K.length-1;ae++)F+=K[ae].dist(K[ae+1]);return F}function B6(K,F,ae){return K?.6*F*ae:0}function j6(K,F){return Math.max(K?K.right-K.left:0,F?F.right-F.left:0)}function d8(K,F,ae,we,je,Qe){const at=B6(ae,je,Qe),St=j6(ae,we)*Qe;let jt=0;const ir=F6(K)/2;for(let Er=0;Er<K.length-1;Er++){const Ir=K[Er],rn=K[Er+1],vn=Ir.dist(rn);if(jt+vn>ir){const Cn=(ir-jt)/vn,Bn=Uo.number(Ir.x,rn.x,Cn),Qn=Uo.number(Ir.y,rn.y,Cn),Ia=new sg(Bn,Qn,rn.angleTo(Ir),Er);return Ia._round(),!at||N6(K,Ia,St,at,F)?Ia:void 0}jt+=vn}}function v8(K,F,ae,we,je,Qe,at,St,jt){const ir=B6(we,Qe,at),Er=j6(we,je),Ir=Er*at,rn=K[0].x===0||K[0].x===jt||K[0].y===0||K[0].y===jt;return F-Ir<F/4&&(F=Ir+F/4),h1(K,rn?F/2*St%F:(Er/2+2*Qe)*at*St%F,F,ir,ae,Ir,rn,!1,jt)}function h1(K,F,ae,we,je,Qe,at,St,jt){const ir=Qe/2,Er=F6(K);let Ir=0,rn=F-ae,vn=[];for(let Cn=0;Cn<K.length-1;Cn++){const Bn=K[Cn],Qn=K[Cn+1],Ia=Bn.dist(Qn),Mi=Qn.angleTo(Bn);for(;rn+ae<Ir+Ia;){rn+=ae;const ii=(rn-Ir)/Ia,bi=Uo.number(Bn.x,Qn.x,ii),Qi=Uo.number(Bn.y,Qn.y,ii);if(bi>=0&&bi<jt&&Qi>=0&&Qi<jt&&rn-ir>=0&&rn+ir<=Er){const Co=new sg(bi,Qi,Mi,Cn);Co._round(),we&&!N6(K,Co,Qe,we,je)||vn.push(Co)}}Ir+=Ia}return St||vn.length||at||(vn=h1(K,Ir/2,ae,we,je,Qe,at,!0,jt)),vn}oi("Anchor",sg);const q_=hd;function U6(K,F,ae,we){const je=[],Qe=K.image,at=Qe.pixelRatio,St=Qe.paddedRect.w-2*q_,jt=Qe.paddedRect.h-2*q_;let ir={x1:K.left,y1:K.top,x2:K.right,y2:K.bottom};const Er=Qe.stretchX||[[0,St]],Ir=Qe.stretchY||[[0,jt]],rn=(go,Qs)=>go+Qs[1]-Qs[0],vn=Er.reduce(rn,0),Cn=Ir.reduce(rn,0),Bn=St-vn,Qn=jt-Cn;let Ia=0,Mi=vn,ii=0,bi=Cn,Qi=0,Co=Bn,cs=0,bl=Qn;if(Qe.content&&we){const go=Qe.content,Qs=go[2]-go[0],Gs=go[3]-go[1];(Qe.textFitWidth||Qe.textFitHeight)&&(ir=w6(K)),Ia=V_(Er,0,go[0]),ii=V_(Ir,0,go[1]),Mi=V_(Er,go[0],go[2]),bi=V_(Ir,go[1],go[3]),Qi=go[0]-Ia,cs=go[1]-ii,Co=Qs-Mi,bl=Gs-bi}const xs=ir.x1,ss=ir.y1,Hs=ir.x2-xs,Ns=ir.y2-ss,Ds=(go,Qs,Gs,Fl)=>{const mf=kp(go.stretch-Ia,Mi,Hs,xs),of=D3(go.fixed-Qi,Co,go.stretch,vn),kd=kp(Qs.stretch-ii,bi,Ns,ss),np=D3(Qs.fixed-cs,bl,Qs.stretch,Cn),jh=kp(Gs.stretch-Ia,Mi,Hs,xs),dd=D3(Gs.fixed-Qi,Co,Gs.stretch,vn),Gv=kp(Fl.stretch-ii,bi,Ns,ss),Xv=D3(Fl.fixed-cs,bl,Fl.stretch,Cn),Wv=new s(mf,kd),lh=new s(jh,kd),Pd=new s(jh,Gv),Cv=new s(mf,Gv),dv=new s(of/at,np/at),Yv=new s(dd/at,Xv/at),Zd=F*Math.PI/180;if(Zd){const Xu=Math.sin(Zd),Ic=Math.cos(Zd),Wc=[Ic,-Xu,Xu,Ic];Wv._matMult(Wc),lh._matMult(Wc),Cv._matMult(Wc),Pd._matMult(Wc)}const Pp=go.stretch+go.fixed,kf=Qs.stretch+Qs.fixed;return{tl:Wv,tr:lh,bl:Cv,br:Pd,tex:{x:Qe.paddedRect.x+q_+Pp,y:Qe.paddedRect.y+q_+kf,w:Gs.stretch+Gs.fixed-Pp,h:Fl.stretch+Fl.fixed-kf},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:dv,pixelOffsetBR:Yv,minFontScaleX:Co/at/Hs,minFontScaleY:bl/at/Ns,isSDF:ae}};if(we&&(Qe.stretchX||Qe.stretchY)){const go=H_(Er,Bn,vn),Qs=H_(Ir,Qn,Cn);for(let Gs=0;Gs<go.length-1;Gs++){const Fl=go[Gs],mf=go[Gs+1];for(let of=0;of<Qs.length-1;of++)je.push(Ds(Fl,Qs[of],mf,Qs[of+1]))}}else je.push(Ds({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:St+1},{fixed:0,stretch:jt+1}));return je}function V_(K,F,ae){let we=0;for(const je of K)we+=Math.max(F,Math.min(ae,je[1]))-Math.max(F,Math.min(ae,je[0]));return we}function H_(K,F,ae){const we=[{fixed:-q_,stretch:0}];for(const[je,Qe]of K){const at=we[we.length-1];we.push({fixed:je-at.stretch,stretch:at.stretch}),we.push({fixed:je-at.stretch,stretch:at.stretch+(Qe-je)})}return we.push({fixed:F+q_,stretch:ae}),we}function kp(K,F,ae,we){return K/F*ae+we}function D3(K,F,ae,we){return K-F*ae/we}class O3{constructor(F,ae,we,je,Qe,at,St,jt,ir,Er){var Ir;if(this.boxStartIndex=F.length,ir){let rn=at.top,vn=at.bottom;const Cn=at.collisionPadding;Cn&&(rn-=Cn[1],vn+=Cn[3]);let Bn=vn-rn;Bn>0&&(Bn=Math.max(10,Bn),this.circleDiameter=Bn)}else{const rn=!((Ir=at.image)===null||Ir===void 0)&&Ir.content&&(at.image.textFitWidth||at.image.textFitHeight)?w6(at):{x1:at.left,y1:at.top,x2:at.right,y2:at.bottom};rn.y1=rn.y1*St-jt[0],rn.y2=rn.y2*St+jt[2],rn.x1=rn.x1*St-jt[3],rn.x2=rn.x2*St+jt[1];const vn=at.collisionPadding;if(vn&&(rn.x1-=vn[0]*St,rn.y1-=vn[1]*St,rn.x2+=vn[2]*St,rn.y2+=vn[3]*St),Er){const Cn=new s(rn.x1,rn.y1),Bn=new s(rn.x2,rn.y1),Qn=new s(rn.x1,rn.y2),Ia=new s(rn.x2,rn.y2),Mi=Er*Math.PI/180;Cn._rotate(Mi),Bn._rotate(Mi),Qn._rotate(Mi),Ia._rotate(Mi),rn.x1=Math.min(Cn.x,Bn.x,Qn.x,Ia.x),rn.x2=Math.max(Cn.x,Bn.x,Qn.x,Ia.x),rn.y1=Math.min(Cn.y,Bn.y,Qn.y,Ia.y),rn.y2=Math.max(Cn.y,Bn.y,Qn.y,Ia.y)}F.emplaceBack(ae.x,ae.y,rn.x1,rn.y1,rn.x2,rn.y2,we,je,Qe)}this.boxEndIndex=F.length}}class p8{constructor(F=[],ae=(we,je)=>we<je?-1:we>je?1:0){if(this.data=F,this.length=this.data.length,this.compare=ae,this.length>0)for(let we=(this.length>>1)-1;we>=0;we--)this._down(we)}push(F){this.data.push(F),this._up(this.length++)}pop(){if(this.length===0)return;const F=this.data[0],ae=this.data.pop();return--this.length>0&&(this.data[0]=ae,this._down(0)),F}peek(){return this.data[0]}_up(F){const{data:ae,compare:we}=this,je=ae[F];for(;F>0;){const Qe=F-1>>1,at=ae[Qe];if(we(je,at)>=0)break;ae[F]=at,F=Qe}ae[F]=je}_down(F){const{data:ae,compare:we}=this,je=this.length>>1,Qe=ae[F];for(;F<je;){let at=1+(F<<1);const St=at+1;if(St<this.length&&we(ae[St],ae[at])<0&&(at=St),we(ae[at],Qe)>=0)break;ae[F]=ae[at],F=at}ae[F]=Qe}}function m8(K,F=1,ae=!1){let we=1/0,je=1/0,Qe=-1/0,at=-1/0;const St=K[0];for(let vn=0;vn<St.length;vn++){const Cn=St[vn];(!vn||Cn.x<we)&&(we=Cn.x),(!vn||Cn.y<je)&&(je=Cn.y),(!vn||Cn.x>Qe)&&(Qe=Cn.x),(!vn||Cn.y>at)&&(at=Cn.y)}const jt=Math.min(Qe-we,at-je);let ir=jt/2;const Er=new p8([],y8);if(jt===0)return new s(we,je);for(let vn=we;vn<Qe;vn+=jt)for(let Cn=je;Cn<at;Cn+=jt)Er.push(new x0(vn+ir,Cn+ir,ir,K));let Ir=(function(vn){let Cn=0,Bn=0,Qn=0;const Ia=vn[0];for(let Mi=0,ii=Ia.length,bi=ii-1;Mi<ii;bi=Mi++){const Qi=Ia[Mi],Co=Ia[bi],cs=Qi.x*Co.y-Co.x*Qi.y;Bn+=(Qi.x+Co.x)*cs,Qn+=(Qi.y+Co.y)*cs,Cn+=3*cs}return new x0(Bn/Cn,Qn/Cn,0,vn)})(K),rn=Er.length;for(;Er.length;){const vn=Er.pop();(vn.d>Ir.d||!Ir.d)&&(Ir=vn,ae&&console.log("found best %d after %d probes",Math.round(1e4*vn.d)/1e4,rn)),vn.max-Ir.d<=F||(ir=vn.h/2,Er.push(new x0(vn.p.x-ir,vn.p.y-ir,ir,K)),Er.push(new x0(vn.p.x+ir,vn.p.y-ir,ir,K)),Er.push(new x0(vn.p.x-ir,vn.p.y+ir,ir,K)),Er.push(new x0(vn.p.x+ir,vn.p.y+ir,ir,K)),rn+=4)}return ae&&(console.log(`num probes: ${rn}`),console.log(`best distance: ${Ir.d}`)),Ir.p}function y8(K,F){return F.max-K.max}function x0(K,F,ae,we){this.p=new s(K,F),this.h=ae,this.d=(function(je,Qe){let at=!1,St=1/0;for(let jt=0;jt<Qe.length;jt++){const ir=Qe[jt];for(let Er=0,Ir=ir.length,rn=Ir-1;Er<Ir;rn=Er++){const vn=ir[Er],Cn=ir[rn];vn.y>je.y!=Cn.y>je.y&&je.x<(Cn.x-vn.x)*(je.y-vn.y)/(Cn.y-vn.y)+vn.x&&(at=!at),St=Math.min(St,eo(je,vn,Cn))}}return(at?1:-1)*Math.sqrt(St)})(this.p,we),this.max=this.d+this.h*Math.SQRT2}var Yd;t.aq=void 0,(Yd=t.aq||(t.aq={}))[Yd.center=1]="center",Yd[Yd.left=2]="left",Yd[Yd.right=3]="right",Yd[Yd.top=4]="top",Yd[Yd.bottom=5]="bottom",Yd[Yd["top-left"]=6]="top-left",Yd[Yd["top-right"]=7]="top-right",Yd[Yd["bottom-left"]=8]="bottom-left",Yd[Yd["bottom-right"]=9]="bottom-right";const lg=7,v5=Number.POSITIVE_INFINITY;function q6(K,F){return F[1]!==v5?(function(ae,we,je){let Qe=0,at=0;switch(we=Math.abs(we),je=Math.abs(je),ae){case"top-right":case"top-left":case"top":at=je-lg;break;case"bottom-right":case"bottom-left":case"bottom":at=-je+lg}switch(ae){case"top-right":case"bottom-right":case"right":Qe=-we;break;case"top-left":case"bottom-left":case"left":Qe=we}return[Qe,at]})(K,F[0],F[1]):(function(ae,we){let je=0,Qe=0;we<0&&(we=0);const at=we/Math.SQRT2;switch(ae){case"top-right":case"top-left":Qe=at-lg;break;case"bottom-right":case"bottom-left":Qe=-at+lg;break;case"bottom":Qe=-we+lg;break;case"top":Qe=we-lg}switch(ae){case"top-right":case"bottom-right":je=-at;break;case"top-left":case"bottom-left":je=at;break;case"left":je=we;break;case"right":je=-we}return[je,Qe]})(K,F[0])}function V6(K,F,ae){var we;const je=K.layout,Qe=(we=je.get("text-variable-anchor-offset"))===null||we===void 0?void 0:we.evaluate(F,{},ae);if(Qe){const St=Qe.values,jt=[];for(let ir=0;ir<St.length;ir+=2){const Er=jt[ir]=St[ir],Ir=St[ir+1].map(rn=>rn*xc);Er.startsWith("top")?Ir[1]-=lg:Er.startsWith("bottom")&&(Ir[1]+=lg),jt[ir+1]=Ir}return new Da(jt)}const at=je.get("text-variable-anchor");if(at){let St;St=K._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[je.get("text-radial-offset").evaluate(F,{},ae)*xc,v5]:je.get("text-offset").evaluate(F,{},ae).map(ir=>ir*xc);const jt=[];for(const ir of at)jt.push(ir,q6(ir,St));return new Da(jt)}return null}function p5(K){switch(K){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function g8(K,F,ae,we,je,Qe,at,St,jt,ir,Er){let Ir=Qe.textMaxSize.evaluate(F,{});Ir===void 0&&(Ir=at);const rn=K.layers[0].layout,vn=rn.get("icon-offset").evaluate(F,{},Er),Cn=G6(ae.horizontal),Bn=at/24,Qn=K.tilePixelRatio*Bn,Ia=K.tilePixelRatio*Ir/24,Mi=K.tilePixelRatio*St,ii=K.tilePixelRatio*rn.get("symbol-spacing"),bi=rn.get("text-padding")*K.tilePixelRatio,Qi=(function(go,Qs,Gs,Fl=1){const mf=go.get("icon-padding").evaluate(Qs,{},Gs),of=mf&&mf.values;return[of[0]*Fl,of[1]*Fl,of[2]*Fl,of[3]*Fl]})(rn,F,Er,K.tilePixelRatio),Co=rn.get("text-max-angle")/180*Math.PI,cs=rn.get("text-rotation-alignment")!=="viewport"&&rn.get("symbol-placement")!=="point",bl=rn.get("icon-rotation-alignment")==="map"&&rn.get("symbol-placement")!=="point",xs=rn.get("symbol-placement"),ss=ii/2,Hs=rn.get("icon-text-fit");let Ns;we&&Hs!=="none"&&(K.allowVerticalPlacement&&ae.vertical&&(Ns=T6(we,ae.vertical,Hs,rn.get("icon-text-fit-padding"),vn,Bn)),Cn&&(we=T6(we,Cn,Hs,rn.get("icon-text-fit-padding"),vn,Bn)));const Ds=(go,Qs)=>{Qs.x<0||Qs.x>=ru||Qs.y<0||Qs.y>=ru||(function(Gs,Fl,mf,of,kd,np,jh,dd,Gv,Xv,Wv,lh,Pd,Cv,dv,Yv,Zd,Pp,kf,Xu,Ic,Wc,eh,Pf,W_){const Gm=Gs.addToLineVertexArray(Fl,mf);let Xm,kv,yf,$d,pm=0,Lp=0,Zv=0,b5=0,w5=-1,B3=-1;const oy={};let T5=Aa("");if(Gs.allowVerticalPlacement&&of.vertical){const vv=dd.layout.get("text-rotate").evaluate(Ic,{},Pf)+90;yf=new O3(Gv,Fl,Xv,Wv,lh,of.vertical,Pd,Cv,dv,vv),jh&&($d=new O3(Gv,Fl,Xv,Wv,lh,jh,Zd,Pp,dv,vv))}if(kd){const vv=dd.layout.get("icon-rotate").evaluate(Ic,{}),Rp=dd.layout.get("icon-text-fit")!=="none",ug=U6(kd,vv,eh,Rp),Wm=jh?U6(jh,vv,eh,Rp):void 0;kv=new O3(Gv,Fl,Xv,Wv,lh,kd,Zd,Pp,!1,vv),pm=4*ug.length;const d1=Gs.iconSizeData;let Ym=null;d1.kind==="source"?(Ym=[g0*dd.layout.get("icon-size").evaluate(Ic,{})],Ym[0]>ig&&x(`${Gs.layerIds[0]}: Value for "icon-size" is >= ${qb}. Reduce your "icon-size".`)):d1.kind==="composite"&&(Ym=[g0*Wc.compositeIconSizes[0].evaluate(Ic,{},Pf),g0*Wc.compositeIconSizes[1].evaluate(Ic,{},Pf)],(Ym[0]>ig||Ym[1]>ig)&&x(`${Gs.layerIds[0]}: Value for "icon-size" is >= ${qb}. Reduce your "icon-size".`)),Gs.addSymbols(Gs.icon,ug,Ym,Xu,kf,Ic,t.ah.none,Fl,Gm.lineStartIndex,Gm.lineLength,-1,Pf),w5=Gs.icon.placedSymbolArray.length-1,Wm&&(Lp=4*Wm.length,Gs.addSymbols(Gs.icon,Wm,Ym,Xu,kf,Ic,t.ah.vertical,Fl,Gm.lineStartIndex,Gm.lineLength,-1,Pf),B3=Gs.icon.placedSymbolArray.length-1)}const A5=Object.keys(of.horizontal);for(const vv of A5){const Rp=of.horizontal[vv];if(!Xm){T5=Aa(Rp.text);const Wm=dd.layout.get("text-rotate").evaluate(Ic,{},Pf);Xm=new O3(Gv,Fl,Xv,Wv,lh,Rp,Pd,Cv,dv,Wm)}const ug=Rp.positionedLines.length===1;if(Zv+=H6(Gs,Fl,Rp,np,dd,dv,Ic,Yv,Gm,of.vertical?t.ah.horizontal:t.ah.horizontalOnly,ug?A5:[vv],oy,w5,Wc,Pf),ug)break}of.vertical&&(b5+=H6(Gs,Fl,of.vertical,np,dd,dv,Ic,Yv,Gm,t.ah.vertical,["vertical"],oy,B3,Wc,Pf));const S5=Xm?Xm.boxStartIndex:Gs.collisionBoxArray.length,E5=Xm?Xm.boxEndIndex:Gs.collisionBoxArray.length,_8=yf?yf.boxStartIndex:Gs.collisionBoxArray.length,x8=yf?yf.boxEndIndex:Gs.collisionBoxArray.length,b8=kv?kv.boxStartIndex:Gs.collisionBoxArray.length,w8=kv?kv.boxEndIndex:Gs.collisionBoxArray.length,$6=$d?$d.boxStartIndex:Gs.collisionBoxArray.length,Y_=$d?$d.boxEndIndex:Gs.collisionBoxArray.length;let vd=-1;const Z_=(vv,Rp)=>vv&&vv.circleDiameter?Math.max(vv.circleDiameter,Rp):Rp;vd=Z_(Xm,vd),vd=Z_(yf,vd),vd=Z_(kv,vd),vd=Z_($d,vd);const M5=vd>-1?1:0;M5&&(vd*=W_/xc),Gs.glyphOffsetArray.length>=c1.MAX_GLYPHS&&x("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ic.sortKey!==void 0&&Gs.addToSortKeyRanges(Gs.symbolInstances.length,Ic.sortKey);const K6=V6(dd,Ic,Pf),[T8,J6]=(function(vv,Rp){const ug=vv.length,Wm=Rp?.values;if(Wm?.length>0)for(let d1=0;d1<Wm.length;d1+=2){const Ym=Wm[d1+1];vv.emplaceBack(t.aq[Wm[d1]],Ym[0],Ym[1])}return[ug,vv.length]})(Gs.textAnchorOffsets,K6);Gs.symbolInstances.emplaceBack(Fl.x,Fl.y,oy.right>=0?oy.right:-1,oy.center>=0?oy.center:-1,oy.left>=0?oy.left:-1,oy.vertical||-1,w5,B3,T5,S5,E5,_8,x8,b8,w8,$6,Y_,Xv,Zv,b5,pm,Lp,M5,0,Pd,vd,T8,J6)})(K,Qs,go,ae,we,je,Ns,K.layers[0],K.collisionBoxArray,F.index,F.sourceLayerIndex,K.index,Qn,[bi,bi,bi,bi],cs,jt,Mi,Qi,bl,vn,F,Qe,ir,Er,at)};if(xs==="line")for(const go of z6(F.geometry,0,0,ru,ru)){const Qs=v8(go,ii,Co,ae.vertical||Cn,we,24,Ia,K.overscaling,ru);for(const Gs of Qs)Cn&&X6(K,Cn.text,ss,Gs)||Ds(go,Gs)}else if(xs==="line-center"){for(const go of F.geometry)if(go.length>1){const Qs=d8(go,Co,ae.vertical||Cn,we,24,Ia);Qs&&Ds(go,Qs)}}else if(F.type==="Polygon")for(const go of Qc(F.geometry,0)){const Qs=m8(go,16);Ds(go[0],new sg(Qs.x,Qs.y,0))}else if(F.type==="LineString")for(const go of F.geometry)Ds(go,new sg(go[0].x,go[0].y,0));else if(F.type==="Point")for(const go of F.geometry)for(const Qs of go)Ds([Qs],new sg(Qs.x,Qs.y,0))}function H6(K,F,ae,we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn){const Bn=(function(Mi,ii,bi,Qi,Co,cs,bl,xs){const ss=Qi.layout.get("text-rotate").evaluate(cs,{})*Math.PI/180,Hs=[];for(const Ns of ii.positionedLines)for(const Ds of Ns.positionedGlyphs){if(!Ds.rect)continue;const go=Ds.rect||{};let Qs=r5+1,Gs=!0,Fl=1,mf=0;const of=(Co||xs)&&Ds.vertical,kd=Ds.metrics.advance*Ds.scale/2;if(xs&&ii.verticalizable&&(mf=Ns.lineOffset/2-(Ds.imageName?-(xc-Ds.metrics.width*Ds.scale)/2:(Ds.scale-1)*xc)),Ds.imageName){const Xu=bl[Ds.imageName];Gs=Xu.sdf,Fl=Xu.pixelRatio,Qs=hd/Fl}const np=Co?[Ds.x+kd,Ds.y]:[0,0];let jh=Co?[0,0]:[Ds.x+kd+bi[0],Ds.y+bi[1]-mf],dd=[0,0];of&&(dd=jh,jh=[0,0]);const Gv=Ds.metrics.isDoubleResolution?2:1,Xv=(Ds.metrics.left-Qs)*Ds.scale-kd+jh[0],Wv=(-Ds.metrics.top-Qs)*Ds.scale+jh[1],lh=Xv+go.w/Gv*Ds.scale/Fl,Pd=Wv+go.h/Gv*Ds.scale/Fl,Cv=new s(Xv,Wv),dv=new s(lh,Wv),Yv=new s(Xv,Pd),Zd=new s(lh,Pd);if(of){const Xu=new s(-kd,kd-N_),Ic=-Math.PI/2,Wc=xc/2-kd,eh=new s(5-N_-Wc,-(Ds.imageName?Wc:0)),Pf=new s(...dd);Cv._rotateAround(Ic,Xu)._add(eh)._add(Pf),dv._rotateAround(Ic,Xu)._add(eh)._add(Pf),Yv._rotateAround(Ic,Xu)._add(eh)._add(Pf),Zd._rotateAround(Ic,Xu)._add(eh)._add(Pf)}if(ss){const Xu=Math.sin(ss),Ic=Math.cos(ss),Wc=[Ic,-Xu,Xu,Ic];Cv._matMult(Wc),dv._matMult(Wc),Yv._matMult(Wc),Zd._matMult(Wc)}const Pp=new s(0,0),kf=new s(0,0);Hs.push({tl:Cv,tr:dv,bl:Yv,br:Zd,tex:go,writingMode:ii.writingMode,glyphOffset:np,sectionIndex:Ds.sectionIndex,isSDF:Gs,pixelOffsetTL:Pp,pixelOffsetBR:kf,minFontScaleX:0,minFontScaleY:0})}return Hs})(0,ae,St,je,Qe,at,we,K.allowVerticalPlacement),Qn=K.textSizeData;let Ia=null;Qn.kind==="source"?(Ia=[g0*je.layout.get("text-size").evaluate(at,{})],Ia[0]>ig&&x(`${K.layerIds[0]}: Value for "text-size" is >= ${qb}. Reduce your "text-size".`)):Qn.kind==="composite"&&(Ia=[g0*vn.compositeTextSizes[0].evaluate(at,{},Cn),g0*vn.compositeTextSizes[1].evaluate(at,{},Cn)],(Ia[0]>ig||Ia[1]>ig)&&x(`${K.layerIds[0]}: Value for "text-size" is >= ${qb}. Reduce your "text-size".`)),K.addSymbols(K.text,Bn,Ia,St,Qe,at,ir,F,jt.lineStartIndex,jt.lineLength,rn,Cn);for(const Mi of Er)Ir[Mi]=K.text.placedSymbolArray.length-1;return 4*Bn.length}function G6(K){for(const F in K)return K[F];return null}function X6(K,F,ae,we){const je=K.compareText;if(F in je){const Qe=je[F];for(let at=Qe.length-1;at>=0;at--)if(we.dist(Qe[at])<ae)return!0}else je[F]=[];return je[F].push(we),!1}const W6=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class m5{static from(F){if(!(F instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[ae,we]=new Uint8Array(F,0,2);if(ae!==219)throw new Error("Data does not appear to be in a KDBush format.");const je=we>>4;if(je!==1)throw new Error(`Got v${je} data when expected v1.`);const Qe=W6[15&we];if(!Qe)throw new Error("Unrecognized array type.");const[at]=new Uint16Array(F,2,1),[St]=new Uint32Array(F,4,1);return new m5(St,at,Qe,F)}constructor(F,ae=64,we=Float64Array,je){if(isNaN(F)||F<0)throw new Error(`Unpexpected numItems value: ${F}.`);this.numItems=+F,this.nodeSize=Math.min(Math.max(+ae,2),65535),this.ArrayType=we,this.IndexArrayType=F<65536?Uint16Array:Uint32Array;const Qe=W6.indexOf(this.ArrayType),at=2*F*this.ArrayType.BYTES_PER_ELEMENT,St=F*this.IndexArrayType.BYTES_PER_ELEMENT,jt=(8-St%8)%8;if(Qe<0)throw new Error(`Unexpected typed array class: ${we}.`);je&&je instanceof ArrayBuffer?(this.data=je,this.ids=new this.IndexArrayType(this.data,8,F),this.coords=new this.ArrayType(this.data,8+St+jt,2*F),this._pos=2*F,this._finished=!0):(this.data=new ArrayBuffer(8+at+St+jt),this.ids=new this.IndexArrayType(this.data,8,F),this.coords=new this.ArrayType(this.data,8+St+jt,2*F),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+Qe]),new Uint16Array(this.data,2,1)[0]=ae,new Uint32Array(this.data,4,1)[0]=F)}add(F,ae){const we=this._pos>>1;return this.ids[we]=we,this.coords[this._pos++]=F,this.coords[this._pos++]=ae,we}finish(){const F=this._pos>>1;if(F!==this.numItems)throw new Error(`Added ${F} items when expected ${this.numItems}.`);return y5(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(F,ae,we,je){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:Qe,coords:at,nodeSize:St}=this,jt=[0,Qe.length-1,0],ir=[];for(;jt.length;){const Er=jt.pop()||0,Ir=jt.pop()||0,rn=jt.pop()||0;if(Ir-rn<=St){for(let Qn=rn;Qn<=Ir;Qn++){const Ia=at[2*Qn],Mi=at[2*Qn+1];Ia>=F&&Ia<=we&&Mi>=ae&&Mi<=je&&ir.push(Qe[Qn])}continue}const vn=rn+Ir>>1,Cn=at[2*vn],Bn=at[2*vn+1];Cn>=F&&Cn<=we&&Bn>=ae&&Bn<=je&&ir.push(Qe[vn]),(Er===0?F<=Cn:ae<=Bn)&&(jt.push(rn),jt.push(vn-1),jt.push(1-Er)),(Er===0?we>=Cn:je>=Bn)&&(jt.push(vn+1),jt.push(Ir),jt.push(1-Er))}return ir}within(F,ae,we){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:je,coords:Qe,nodeSize:at}=this,St=[0,je.length-1,0],jt=[],ir=we*we;for(;St.length;){const Er=St.pop()||0,Ir=St.pop()||0,rn=St.pop()||0;if(Ir-rn<=at){for(let Qn=rn;Qn<=Ir;Qn++)hv(Qe[2*Qn],Qe[2*Qn+1],F,ae)<=ir&&jt.push(je[Qn]);continue}const vn=rn+Ir>>1,Cn=Qe[2*vn],Bn=Qe[2*vn+1];hv(Cn,Bn,F,ae)<=ir&&jt.push(je[vn]),(Er===0?F-we<=Cn:ae-we<=Bn)&&(St.push(rn),St.push(vn-1),St.push(1-Er)),(Er===0?F+we>=Cn:ae+we>=Bn)&&(St.push(vn+1),St.push(Ir),St.push(1-Er))}return jt}}function y5(K,F,ae,we,je,Qe){if(je-we<=ae)return;const at=we+je>>1;Y6(K,F,at,we,je,Qe),y5(K,F,ae,we,at-1,1-Qe),y5(K,F,ae,at+1,je,1-Qe)}function Y6(K,F,ae,we,je,Qe){for(;je>we;){if(je-we>600){const ir=je-we+1,Er=ae-we+1,Ir=Math.log(ir),rn=.5*Math.exp(2*Ir/3),vn=.5*Math.sqrt(Ir*rn*(ir-rn)/ir)*(Er-ir/2<0?-1:1);Y6(K,F,ae,Math.max(we,Math.floor(ae-Er*rn/ir+vn)),Math.min(je,Math.floor(ae+(ir-Er)*rn/ir+vn)),Qe)}const at=F[2*ae+Qe];let St=we,jt=je;for(G_(K,F,we,ae),F[2*je+Qe]>at&&G_(K,F,we,je);St<jt;){for(G_(K,F,St,jt),St++,jt--;F[2*St+Qe]<at;)St++;for(;F[2*jt+Qe]>at;)jt--}F[2*we+Qe]===at?G_(K,F,we,jt):(jt++,G_(K,F,jt,je)),jt<=ae&&(we=jt+1),ae<=jt&&(je=jt-1)}}function G_(K,F,ae,we){z3(K,ae,we),z3(F,2*ae,2*we),z3(F,2*ae+1,2*we+1)}function z3(K,F,ae){const we=K[F];K[F]=K[ae],K[ae]=we}function hv(K,F,ae,we){const je=K-ae,Qe=F-we;return je*je+Qe*Qe}var g5;t.bg=void 0,(g5=t.bg||(t.bg={})).create="create",g5.load="load",g5.fullLoad="fullLoad";let N3=null,X_=[];const _5=1e3/60,F3="loadTime",x5="fullLoadTime",Z6={mark(K){performance.mark(K)},frame(K){const F=K;N3!=null&&X_.push(F-N3),N3=F},clearMetrics(){N3=null,X_=[],performance.clearMeasures(F3),performance.clearMeasures(x5);for(const K in t.bg)performance.clearMarks(t.bg[K])},getPerformanceMetrics(){performance.measure(F3,t.bg.create,t.bg.load),performance.measure(x5,t.bg.create,t.bg.fullLoad);const K=performance.getEntriesByName(F3)[0].duration,F=performance.getEntriesByName(x5)[0].duration,ae=X_.length,we=1/(X_.reduce((Qe,at)=>Qe+at,0)/ae/1e3),je=X_.filter(Qe=>Qe>_5).reduce((Qe,at)=>Qe+(at-_5)/_5,0);return{loadTime:K,fullLoadTime:F,fps:we,percentDroppedFrames:je/(ae+je)*100,totalFrames:ae}}};t.$=class extends zr{},t.A=$i,t.B=wi,t.C=function(K){if(B==null){const F=K.navigator?K.navigator.userAgent:null;B=!!K.safari||!(!F||!(/\b(iPad|iPhone|iPod)\b/.test(F)||F.match("Safari")&&!F.match("Chrome")))}return B},t.D=os,t.E=ce,t.F=class{constructor(K,F){this.target=K,this.mapId=F,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new Xb(()=>this.process()),this.subscription=(function(ae,we,je,Qe){return ae.addEventListener(we,je,!1),{unsubscribe:()=>{ae.removeEventListener(we,je,!1)}}})(this.target,"message",ae=>this.receive(ae)),this.globalScope=D(self)?K:window}registerMessageHandler(K,F){this.messageHandlers[K]=F}sendAsync(K,F){return new Promise((ae,we)=>{const je=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[je]={resolve:ae,reject:we},F&&F.signal.addEventListener("abort",()=>{delete this.resolveRejects[je];const St={id:je,type:"<cancel>",origin:location.origin,targetMapId:K.targetMapId,sourceMapId:this.mapId};this.target.postMessage(St)},{once:!0});const Qe=[],at=Object.assign(Object.assign({},K),{id:je,sourceMapId:this.mapId,origin:location.origin,data:is(K.data,Qe)});this.target.postMessage(at,{transfer:Qe})})}receive(K){const F=K.data,ae=F.id;if(!(F.origin!=="file://"&&location.origin!=="file://"&&F.origin!=="resource://android"&&location.origin!=="resource://android"&&F.origin!==location.origin||F.targetMapId&&this.mapId!==F.targetMapId)){if(F.type==="<cancel>"){delete this.tasks[ae];const we=this.abortControllers[ae];return delete this.abortControllers[ae],void(we&&we.abort())}if(D(self)||F.mustQueue)return this.tasks[ae]=F,this.taskQueue.push(ae),void this.invoker.trigger();this.processTask(ae,F)}}process(){if(this.taskQueue.length===0)return;const K=this.taskQueue.shift(),F=this.tasks[K];delete this.tasks[K],this.taskQueue.length>0&&this.invoker.trigger(),F&&this.processTask(K,F)}processTask(K,F){return r(this,void 0,void 0,function*(){if(F.type==="<response>"){const je=this.resolveRejects[K];return delete this.resolveRejects[K],je?void(F.error?je.reject(ts(F.error)):je.resolve(ts(F.data))):void 0}if(!this.messageHandlers[F.type])return void this.completeTask(K,new Error(`Could not find a registered handler for ${F.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));const ae=ts(F.data),we=new AbortController;this.abortControllers[K]=we;try{const je=yield this.messageHandlers[F.type](F.sourceMapId,ae,we);this.completeTask(K,null,je)}catch(je){this.completeTask(K,je)}})}completeTask(K,F,ae){const we=[];delete this.abortControllers[K];const je={id:K,type:"<response>",sourceMapId:this.mapId,origin:location.origin,error:F?is(F):null,data:is(ae,we)};this.target.postMessage(je,{transfer:we})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},t.G=de,t.H=function(){var K=new $i(16);return $i!=Float32Array&&(K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[11]=0,K[12]=0,K[13]=0,K[14]=0),K[0]=1,K[5]=1,K[10]=1,K[15]=1,K},t.I=fv,t.J=function(K,F,ae){var we,je,Qe,at,St,jt,ir,Er,Ir,rn,vn,Cn,Bn=ae[0],Qn=ae[1],Ia=ae[2];return F===K?(K[12]=F[0]*Bn+F[4]*Qn+F[8]*Ia+F[12],K[13]=F[1]*Bn+F[5]*Qn+F[9]*Ia+F[13],K[14]=F[2]*Bn+F[6]*Qn+F[10]*Ia+F[14],K[15]=F[3]*Bn+F[7]*Qn+F[11]*Ia+F[15]):(je=F[1],Qe=F[2],at=F[3],St=F[4],jt=F[5],ir=F[6],Er=F[7],Ir=F[8],rn=F[9],vn=F[10],Cn=F[11],K[0]=we=F[0],K[1]=je,K[2]=Qe,K[3]=at,K[4]=St,K[5]=jt,K[6]=ir,K[7]=Er,K[8]=Ir,K[9]=rn,K[10]=vn,K[11]=Cn,K[12]=we*Bn+St*Qn+Ir*Ia+F[12],K[13]=je*Bn+jt*Qn+rn*Ia+F[13],K[14]=Qe*Bn+ir*Qn+vn*Ia+F[14],K[15]=at*Bn+Er*Qn+Cn*Ia+F[15]),K},t.K=function(K,F,ae){var we=ae[0],je=ae[1],Qe=ae[2];return K[0]=F[0]*we,K[1]=F[1]*we,K[2]=F[2]*we,K[3]=F[3]*we,K[4]=F[4]*je,K[5]=F[5]*je,K[6]=F[6]*je,K[7]=F[7]*je,K[8]=F[8]*Qe,K[9]=F[9]*Qe,K[10]=F[10]*Qe,K[11]=F[11]*Qe,K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15],K},t.L=ca,t.M=function(K,F){const ae={};for(let we=0;we<F.length;we++){const je=F[we];je in K&&(ae[je]=K[je])}return ae},t.N=_0,t.O=I3,t.P=s,t.Q=C6,t.R=_l,t.S=em,t.T=Pc,t.U=m,t.V=E,t.W=q,t.X=ru,t.Y=Mt,t.Z=Wb,t._=r,t.a=le,t.a$=function(K,F){var ae=K[0],we=K[1],je=K[2],Qe=K[3],at=K[4],St=K[5],jt=K[6],ir=K[7],Er=K[8],Ir=K[9],rn=K[10],vn=K[11],Cn=K[12],Bn=K[13],Qn=K[14],Ia=K[15],Mi=F[0],ii=F[1],bi=F[2],Qi=F[3],Co=F[4],cs=F[5],bl=F[6],xs=F[7],ss=F[8],Hs=F[9],Ns=F[10],Ds=F[11],go=F[12],Qs=F[13],Gs=F[14],Fl=F[15];return Math.abs(ae-Mi)<=si*Math.max(1,Math.abs(ae),Math.abs(Mi))&&Math.abs(we-ii)<=si*Math.max(1,Math.abs(we),Math.abs(ii))&&Math.abs(je-bi)<=si*Math.max(1,Math.abs(je),Math.abs(bi))&&Math.abs(Qe-Qi)<=si*Math.max(1,Math.abs(Qe),Math.abs(Qi))&&Math.abs(at-Co)<=si*Math.max(1,Math.abs(at),Math.abs(Co))&&Math.abs(St-cs)<=si*Math.max(1,Math.abs(St),Math.abs(cs))&&Math.abs(jt-bl)<=si*Math.max(1,Math.abs(jt),Math.abs(bl))&&Math.abs(ir-xs)<=si*Math.max(1,Math.abs(ir),Math.abs(xs))&&Math.abs(Er-ss)<=si*Math.max(1,Math.abs(Er),Math.abs(ss))&&Math.abs(Ir-Hs)<=si*Math.max(1,Math.abs(Ir),Math.abs(Hs))&&Math.abs(rn-Ns)<=si*Math.max(1,Math.abs(rn),Math.abs(Ns))&&Math.abs(vn-Ds)<=si*Math.max(1,Math.abs(vn),Math.abs(Ds))&&Math.abs(Cn-go)<=si*Math.max(1,Math.abs(Cn),Math.abs(go))&&Math.abs(Bn-Qs)<=si*Math.max(1,Math.abs(Bn),Math.abs(Qs))&&Math.abs(Qn-Gs)<=si*Math.max(1,Math.abs(Qn),Math.abs(Gs))&&Math.abs(Ia-Fl)<=si*Math.max(1,Math.abs(Ia),Math.abs(Fl))},t.a0=Mn,t.a1=h5,t.a2=Pe,t.a3=K=>{const F=window.document.createElement("video");return F.muted=!0,new Promise(ae=>{F.onloadstart=()=>{ae(F)};for(const we of K){const je=window.document.createElement("source");se(we)||(F.crossOrigin="Anonymous"),je.src=we,F.appendChild(je)}})},t.a4=function(){return b++},t.a5=Ai,t.a6=c1,t.a7=zh,t.a8=kr,t.a9=R6,t.aA=function(K){if(K.type==="custom")return new E6(K);switch(K.type){case"background":return new Gb(K);case"circle":return new ni(K);case"fill":return new En(K);case"fill-extrusion":return new Sp(K);case"heatmap":return new ll(K);case"hillshade":return new oc(K);case"line":return new o1(K);case"raster":return new h8(K);case"symbol":return new P3(K)}},t.aB=f,t.aC=function(K,F){if(!K)return[{command:"setStyle",args:[F]}];let ae=[];try{if(!ze(K.version,F.version))return[{command:"setStyle",args:[F]}];ze(K.center,F.center)||ae.push({command:"setCenter",args:[F.center]}),ze(K.zoom,F.zoom)||ae.push({command:"setZoom",args:[F.zoom]}),ze(K.bearing,F.bearing)||ae.push({command:"setBearing",args:[F.bearing]}),ze(K.pitch,F.pitch)||ae.push({command:"setPitch",args:[F.pitch]}),ze(K.sprite,F.sprite)||ae.push({command:"setSprite",args:[F.sprite]}),ze(K.glyphs,F.glyphs)||ae.push({command:"setGlyphs",args:[F.glyphs]}),ze(K.transition,F.transition)||ae.push({command:"setTransition",args:[F.transition]}),ze(K.light,F.light)||ae.push({command:"setLight",args:[F.light]}),ze(K.terrain,F.terrain)||ae.push({command:"setTerrain",args:[F.terrain]}),ze(K.sky,F.sky)||ae.push({command:"setSky",args:[F.sky]}),ze(K.projection,F.projection)||ae.push({command:"setProjection",args:[F.projection]});const we={},je=[];(function(at,St,jt,ir){let Er;for(Er in St=St||{},at=at||{})Object.prototype.hasOwnProperty.call(at,Er)&&(Object.prototype.hasOwnProperty.call(St,Er)||rt(Er,jt,ir));for(Er in St)Object.prototype.hasOwnProperty.call(St,Er)&&(Object.prototype.hasOwnProperty.call(at,Er)?ze(at[Er],St[Er])||(at[Er].type==="geojson"&&St[Er].type==="geojson"&&gt(at,St,Er)?Ge(jt,{command:"setGeoJSONSourceData",args:[Er,St[Er].data]}):pt(Er,St,jt,ir)):Ve(Er,St,jt))})(K.sources,F.sources,je,we);const Qe=[];K.layers&&K.layers.forEach(at=>{"source"in at&&we[at.source]?ae.push({command:"removeLayer",args:[at.id]}):Qe.push(at)}),ae=ae.concat(je),(function(at,St,jt){St=St||[];const ir=(at=at||[]).map(lt),Er=St.map(lt),Ir=at.reduce(Fe,{}),rn=St.reduce(Fe,{}),vn=ir.slice(),Cn=Object.create(null);let Bn,Qn,Ia,Mi,ii;for(let bi=0,Qi=0;bi<ir.length;bi++)Bn=ir[bi],Object.prototype.hasOwnProperty.call(rn,Bn)?Qi++:(Ge(jt,{command:"removeLayer",args:[Bn]}),vn.splice(vn.indexOf(Bn,Qi),1));for(let bi=0,Qi=0;bi<Er.length;bi++)Bn=Er[Er.length-1-bi],vn[vn.length-1-bi]!==Bn&&(Object.prototype.hasOwnProperty.call(Ir,Bn)?(Ge(jt,{command:"removeLayer",args:[Bn]}),vn.splice(vn.lastIndexOf(Bn,vn.length-Qi),1)):Qi++,Mi=vn[vn.length-bi],Ge(jt,{command:"addLayer",args:[rn[Bn],Mi]}),vn.splice(vn.length-bi,0,Bn),Cn[Bn]=!0);for(let bi=0;bi<Er.length;bi++)if(Bn=Er[bi],Qn=Ir[Bn],Ia=rn[Bn],!Cn[Bn]&&!ze(Qn,Ia))if(ze(Qn.source,Ia.source)&&ze(Qn["source-layer"],Ia["source-layer"])&&ze(Qn.type,Ia.type)){for(ii in ht(Qn.layout,Ia.layout,jt,Bn,null,"setLayoutProperty"),ht(Qn.paint,Ia.paint,jt,Bn,null,"setPaintProperty"),ze(Qn.filter,Ia.filter)||Ge(jt,{command:"setFilter",args:[Bn,Ia.filter]}),ze(Qn.minzoom,Ia.minzoom)&&ze(Qn.maxzoom,Ia.maxzoom)||Ge(jt,{command:"setLayerZoomRange",args:[Bn,Ia.minzoom,Ia.maxzoom]}),Qn)Object.prototype.hasOwnProperty.call(Qn,ii)&&ii!=="layout"&&ii!=="paint"&&ii!=="filter"&&ii!=="metadata"&&ii!=="minzoom"&&ii!=="maxzoom"&&(ii.indexOf("paint.")===0?ht(Qn[ii],Ia[ii],jt,Bn,ii.slice(6),"setPaintProperty"):ze(Qn[ii],Ia[ii])||Ge(jt,{command:"setLayerProperty",args:[Bn,ii,Ia[ii]]}));for(ii in Ia)Object.prototype.hasOwnProperty.call(Ia,ii)&&!Object.prototype.hasOwnProperty.call(Qn,ii)&&ii!=="layout"&&ii!=="paint"&&ii!=="filter"&&ii!=="metadata"&&ii!=="minzoom"&&ii!=="maxzoom"&&(ii.indexOf("paint.")===0?ht(Qn[ii],Ia[ii],jt,Bn,ii.slice(6),"setPaintProperty"):ze(Qn[ii],Ia[ii])||Ge(jt,{command:"setLayerProperty",args:[Bn,ii,Ia[ii]]}))}else Ge(jt,{command:"removeLayer",args:[Bn]}),Mi=vn[vn.lastIndexOf(Bn)+1],Ge(jt,{command:"addLayer",args:[Ia,Mi]})})(Qe,F.layers,ae)}catch(we){console.warn("Unable to compute style diff:",we),ae=[{command:"setStyle",args:[F]}]}return ae},t.aD=function(K){const F=[],ae=K.id;return ae===void 0&&F.push({message:`layers.${ae}: missing required property "id"`}),K.render===void 0&&F.push({message:`layers.${ae}: missing required method "render"`}),K.renderingMode&&K.renderingMode!=="2d"&&K.renderingMode!=="3d"&&F.push({message:`layers.${ae}: property "renderingMode" must be either "2d" or "3d"`}),F},t.aE=function K(F,ae){if(Array.isArray(F)){if(!Array.isArray(ae)||F.length!==ae.length)return!1;for(let we=0;we<F.length;we++)if(!K(F[we],ae[we]))return!1;return!0}if(typeof F=="object"&&F!==null&&ae!==null){if(typeof ae!="object"||Object.keys(F).length!==Object.keys(ae).length)return!1;for(const we in F)if(!K(F[we],ae[we]))return!1;return!0}return F===ae},t.aF=A,t.aG=g,t.aH=class extends zo{constructor(K,F){super(K,F),this.current=0}set(K){this.current!==K&&(this.current=K,this.gl.uniform1i(this.location,K))}},t.aI=qo,t.aJ=class extends zo{constructor(K,F){super(K,F),this.current=bs}set(K){if(K[12]!==this.current[12]||K[0]!==this.current[0])return this.current=K,void this.gl.uniformMatrix4fv(this.location,!1,K);for(let F=1;F<16;F++)if(K[F]!==this.current[F]){this.current=K,this.gl.uniformMatrix4fv(this.location,!1,K);break}}},t.aK=nl,t.aL=Go,t.aM=br,t.aN=class extends zo{constructor(K,F){super(K,F),this.current=[0,0,0]}set(K){K[0]===this.current[0]&&K[1]===this.current[1]&&K[2]===this.current[2]||(this.current=K,this.gl.uniform3f(this.location,K[0],K[1],K[2]))}},t.aO=class extends zo{constructor(K,F){super(K,F),this.current=[0,0]}set(K){K[0]===this.current[0]&&K[1]===this.current[1]||(this.current=K,this.gl.uniform2f(this.location,K[0],K[1]))}},t.aP=function(K,F,ae,we,je,Qe,at){var St=1/(F-ae),jt=1/(we-je),ir=1/(Qe-at);return K[0]=-2*St,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=-2*jt,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=2*ir,K[11]=0,K[12]=(F+ae)*St,K[13]=(je+we)*jt,K[14]=(at+Qe)*ir,K[15]=1,K},t.aQ=Yn,t.aR=class extends Kt{},t.aS=eg,t.aT=class extends Or{},t.aU=Lu,t.aV=function(K){return K<=1?1:Math.pow(2,Math.ceil(Math.log(K)/Math.LN2))},t.aW=vs,t.aX=js,t.aY=fr,t.aZ=class extends Ha{},t.a_=function(K,F){return K[0]===F[0]&&K[1]===F[1]&&K[2]===F[2]&&K[3]===F[3]&&K[4]===F[4]&&K[5]===F[5]&&K[6]===F[6]&&K[7]===F[7]&&K[8]===F[8]&&K[9]===F[9]&&K[10]===F[10]&&K[11]===F[11]&&K[12]===F[12]&&K[13]===F[13]&&K[14]===F[14]&&K[15]===F[15]},t.aa=function(K){const F={};if(K.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(ae,we,je,Qe)=>{const at=je||Qe;return F[we]=!at||at.toLowerCase(),""}),F["max-age"]){const ae=parseInt(F["max-age"],10);isNaN(ae)?delete F["max-age"]:F["max-age"]=ae}return F},t.ab=function(K,F){const ae=[];for(const we in K)we in F||ae.push(we);return ae},t.ac=T,t.ad=function(K,F,ae){var we=Math.sin(ae),je=Math.cos(ae),Qe=F[0],at=F[1],St=F[2],jt=F[3],ir=F[4],Er=F[5],Ir=F[6],rn=F[7];return F!==K&&(K[8]=F[8],K[9]=F[9],K[10]=F[10],K[11]=F[11],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15]),K[0]=Qe*je+ir*we,K[1]=at*je+Er*we,K[2]=St*je+Ir*we,K[3]=jt*je+rn*we,K[4]=ir*je-Qe*we,K[5]=Er*je-at*we,K[6]=Ir*je-St*we,K[7]=rn*je-jt*we,K},t.ae=function(K){var F=new $i(16);return F[0]=K[0],F[1]=K[1],F[2]=K[2],F[3]=K[3],F[4]=K[4],F[5]=K[5],F[6]=K[6],F[7]=K[7],F[8]=K[8],F[9]=K[9],F[10]=K[10],F[11]=K[11],F[12]=K[12],F[13]=K[13],F[14]=K[14],F[15]=K[15],F},t.af=yi,t.ag=function(K,F){let ae=0,we=0;if(K.kind==="constant")we=K.layoutSize;else if(K.kind!=="source"){const{interpolationType:je,minZoom:Qe,maxZoom:at}=K,St=je?T(Ri.interpolationFactor(je,F,Qe,at),0,1):0;K.kind==="camera"?we=Uo.number(K.minSize,K.maxSize,St):ae=St}return{uSizeT:ae,uSize:we}},t.ai=function(K,{uSize:F,uSizeT:ae},{lowerSize:we,upperSize:je}){return K.kind==="source"?we/g0:K.kind==="composite"?Uo.number(we/g0,je/g0,ae):F},t.aj=og,t.ak=function(K,F,ae,we){const je=F.y-K.y,Qe=F.x-K.x,at=we.y-ae.y,St=we.x-ae.x,jt=at*Qe-St*je;if(jt===0)return null;const ir=(St*(K.y-ae.y)-at*(K.x-ae.x))/jt;return new s(K.x+ir*Qe,K.y+ir*je)},t.al=z6,t.am=Ca,t.an=Ta,t.ao=function(K){let F=1/0,ae=1/0,we=-1/0,je=-1/0;for(const Qe of K)F=Math.min(F,Qe.x),ae=Math.min(ae,Qe.y),we=Math.max(we,Qe.x),je=Math.max(je,Qe.y);return[F,ae,we,je]},t.ap=xc,t.ar=i5,t.as=function(K,F){var ae=F[0],we=F[1],je=F[2],Qe=F[3],at=F[4],St=F[5],jt=F[6],ir=F[7],Er=F[8],Ir=F[9],rn=F[10],vn=F[11],Cn=F[12],Bn=F[13],Qn=F[14],Ia=F[15],Mi=ae*St-we*at,ii=ae*jt-je*at,bi=ae*ir-Qe*at,Qi=we*jt-je*St,Co=we*ir-Qe*St,cs=je*ir-Qe*jt,bl=Er*Bn-Ir*Cn,xs=Er*Qn-rn*Cn,ss=Er*Ia-vn*Cn,Hs=Ir*Qn-rn*Bn,Ns=Ir*Ia-vn*Bn,Ds=rn*Ia-vn*Qn,go=Mi*Ds-ii*Ns+bi*Hs+Qi*ss-Co*xs+cs*bl;return go?(K[0]=(St*Ds-jt*Ns+ir*Hs)*(go=1/go),K[1]=(je*Ns-we*Ds-Qe*Hs)*go,K[2]=(Bn*cs-Qn*Co+Ia*Qi)*go,K[3]=(rn*Co-Ir*cs-vn*Qi)*go,K[4]=(jt*ss-at*Ds-ir*xs)*go,K[5]=(ae*Ds-je*ss+Qe*xs)*go,K[6]=(Qn*bi-Cn*cs-Ia*ii)*go,K[7]=(Er*cs-rn*bi+vn*ii)*go,K[8]=(at*Ns-St*ss+ir*bl)*go,K[9]=(we*ss-ae*Ns-Qe*bl)*go,K[10]=(Cn*Co-Bn*bi+Ia*Mi)*go,K[11]=(Ir*bi-Er*Co-vn*Mi)*go,K[12]=(St*xs-at*Hs-jt*bl)*go,K[13]=(ae*Hs-we*xs+je*bl)*go,K[14]=(Bn*ii-Cn*Qi-Qn*Mi)*go,K[15]=(Er*Qi-Ir*ii+rn*Mi)*go,K):null},t.at=p5,t.au=a5,t.av=m5,t.aw=function(){const K={},F=ue.$version;for(const ae in ue.$root){const we=ue.$root[ae];if(we.required){let je=null;je=ae==="version"?F:we.type==="array"?[]:{},je!=null&&(K[ae]=je)}}return K},t.ax=vo,t.ay=W,t.az=function(K){K=K.slice();const F=Object.create(null);for(let ae=0;ae<K.length;ae++)F[K[ae].id]=K[ae];for(let ae=0;ae<K.length;ae++)"ref"in K[ae]&&(K[ae]=Le(K[ae],F[K[ae].ref]));return K},t.b=U,t.b0=function(K,F){return K[0]=F[0],K[1]=F[1],K[2]=F[2],K[3]=F[3],K[4]=F[4],K[5]=F[5],K[6]=F[6],K[7]=F[7],K[8]=F[8],K[9]=F[9],K[10]=F[10],K[11]=F[11],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15],K},t.b1=function(K,F,ae){return K[0]=F[0]*ae[0],K[1]=F[1]*ae[1],K[2]=F[2]*ae[2],K[3]=F[3]*ae[3],K},t.b2=function(K,F){return K[0]*F[0]+K[1]*F[1]+K[2]*F[2]+K[3]*F[3]},t.b3=M,t.b4=P6,t.b5=vm,t.b6=function(K,F,ae,we,je){var Qe,at=1/Math.tan(F/2);return K[0]=at/ae,K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=at,K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[11]=-1,K[12]=0,K[13]=0,K[15]=0,je!=null&&je!==1/0?(K[10]=(je+we)*(Qe=1/(we-je)),K[14]=2*je*we*Qe):(K[10]=-1,K[14]=-2*we),K},t.b7=function(K,F,ae){var we=Math.sin(ae),je=Math.cos(ae),Qe=F[4],at=F[5],St=F[6],jt=F[7],ir=F[8],Er=F[9],Ir=F[10],rn=F[11];return F!==K&&(K[0]=F[0],K[1]=F[1],K[2]=F[2],K[3]=F[3],K[12]=F[12],K[13]=F[13],K[14]=F[14],K[15]=F[15]),K[4]=Qe*je+ir*we,K[5]=at*je+Er*we,K[6]=St*je+Ir*we,K[7]=jt*je+rn*we,K[8]=ir*je-Qe*we,K[9]=Er*je-at*we,K[10]=Ir*je-St*we,K[11]=rn*je-jt*we,K},t.b8=c,t.b9=_,t.bA=Mv,t.bB=function(K){return K.message===G},t.bC=iu,t.bD=ql,t.ba=function(K){return K*Math.PI/180},t.bb=function(K,F){const{x:ae,y:we}=Wb.fromLngLat(F);return!(K<0||K>25||we<0||we>=1||ae<0||ae>=1)},t.bc=function(K,F){return K[0]=F[0],K[1]=0,K[2]=0,K[3]=0,K[4]=0,K[5]=F[1],K[6]=0,K[7]=0,K[8]=0,K[9]=0,K[10]=F[2],K[11]=0,K[12]=0,K[13]=0,K[14]=0,K[15]=1,K},t.bd=class extends Tr{},t.be=c5,t.bf=Z6,t.bh=me,t.bi=function(K,F){le.REGISTERED_PROTOCOLS[K]=F},t.bj=function(K){delete le.REGISTERED_PROTOCOLS[K]},t.bk=function(K,F){const ae={};for(let je=0;je<K.length;je++){const Qe=F&&F[K[je].id]||ud(K[je]);F&&(F[K[je].id]=Qe);let at=ae[Qe];at||(at=ae[Qe]=[]),at.push(K[je])}const we=[];for(const je in ae)we.push(ae[je]);return we},t.bl=oi,t.bm=L6,t.bn=I6,t.bo=x6,t.bp=function(K){K.bucket.createArrays(),K.bucket.tilePixelRatio=ru/(512*K.bucket.overscaling),K.bucket.compareText={},K.bucket.iconsNeedLinear=!1;const F=K.bucket.layers[0],ae=F.layout,we=F._unevaluatedLayout._values,je={layoutIconSize:we["icon-size"].possiblyEvaluate(new Al(K.bucket.zoom+1),K.canonical),layoutTextSize:we["text-size"].possiblyEvaluate(new Al(K.bucket.zoom+1),K.canonical),textMaxSize:we["text-size"].possiblyEvaluate(new Al(18))};if(K.bucket.textSizeData.kind==="composite"){const{minZoom:ir,maxZoom:Er}=K.bucket.textSizeData;je.compositeTextSizes=[we["text-size"].possiblyEvaluate(new Al(ir),K.canonical),we["text-size"].possiblyEvaluate(new Al(Er),K.canonical)]}if(K.bucket.iconSizeData.kind==="composite"){const{minZoom:ir,maxZoom:Er}=K.bucket.iconSizeData;je.compositeIconSizes=[we["icon-size"].possiblyEvaluate(new Al(ir),K.canonical),we["icon-size"].possiblyEvaluate(new Al(Er),K.canonical)]}const Qe=ae.get("text-line-height")*xc,at=ae.get("text-rotation-alignment")!=="viewport"&&ae.get("symbol-placement")!=="point",St=ae.get("text-keep-upright"),jt=ae.get("text-size");for(const ir of K.bucket.features){const Er=ae.get("text-font").evaluate(ir,{},K.canonical).join(","),Ir=jt.evaluate(ir,{},K.canonical),rn=je.layoutTextSize.evaluate(ir,{},K.canonical),vn=je.layoutIconSize.evaluate(ir,{},K.canonical),Cn={horizontal:{},vertical:void 0},Bn=ir.text;let Qn,Ia=[0,0];if(Bn){const bi=Bn.toString(),Qi=ae.get("text-letter-spacing").evaluate(ir,{},K.canonical)*xc,Co=Ys(bi)?Qi:0,cs=ae.get("text-anchor").evaluate(ir,{},K.canonical),bl=V6(F,ir,K.canonical);if(!bl){const Ns=ae.get("text-radial-offset").evaluate(ir,{},K.canonical);Ia=Ns?q6(cs,[Ns*xc,v5]):ae.get("text-offset").evaluate(ir,{},K.canonical).map(Ds=>Ds*xc)}let xs=at?"center":ae.get("text-justify").evaluate(ir,{},K.canonical);const ss=ae.get("symbol-placement")==="point"?ae.get("text-max-width").evaluate(ir,{},K.canonical)*xc:1/0,Hs=()=>{K.bucket.allowVerticalPlacement&&ys(bi)&&(Cn.vertical=S3(Bn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,"left",Co,Ia,t.ah.vertical,!0,rn,Ir))};if(!at&&bl){const Ns=new Set;if(xs==="auto")for(let go=0;go<bl.values.length;go+=2)Ns.add(p5(bl.values[go]));else Ns.add(xs);let Ds=!1;for(const go of Ns)if(!Cn.horizontal[go])if(Ds)Cn.horizontal[go]=Cn.horizontal[0];else{const Qs=S3(Bn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,"center",go,Co,Ia,t.ah.horizontal,!1,rn,Ir);Qs&&(Cn.horizontal[go]=Qs,Ds=Qs.positionedLines.length===1)}Hs()}else{xs==="auto"&&(xs=p5(cs));const Ns=S3(Bn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,xs,Co,Ia,t.ah.horizontal,!1,rn,Ir);Ns&&(Cn.horizontal[xs]=Ns),Hs(),ys(bi)&&at&&St&&(Cn.vertical=S3(Bn,K.glyphMap,K.glyphPositions,K.imagePositions,Er,ss,Qe,cs,xs,Co,Ia,t.ah.vertical,!1,rn,Ir))}}let Mi=!1;if(ir.icon&&ir.icon.name){const bi=K.imageMap[ir.icon.name];bi&&(Qn=u8(K.imagePositions[ir.icon.name],ae.get("icon-offset").evaluate(ir,{},K.canonical),ae.get("icon-anchor").evaluate(ir,{},K.canonical)),Mi=!!bi.sdf,K.bucket.sdfIcons===void 0?K.bucket.sdfIcons=Mi:K.bucket.sdfIcons!==Mi&&x("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(bi.pixelRatio!==K.bucket.pixelRatio||ae.get("icon-rotate").constantOr(1)!==0)&&(K.bucket.iconsNeedLinear=!0))}const ii=G6(Cn.horizontal)||Cn.vertical;K.bucket.iconsInText=!!ii&&ii.iconsInText,(ii||Qn)&&g8(K.bucket,ir,Cn,Qn,K.imageMap,je,rn,vn,Ia,Mi,K.canonical)}K.showCollisionBoxes&&K.bucket.generateCollisionDebugBuffers()},t.bq=Qp,t.br=ar,t.bs=vl,t.bt=Ma,t.bu=e5,t.bv=class{constructor(K){this._marks={start:[K.url,"start"].join("#"),end:[K.url,"end"].join("#"),measure:K.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let K=performance.getEntriesByName(this._marks.measure);return K.length===0&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),K=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),K}},t.bw=function(K,F,ae,we,je){return r(this,void 0,void 0,function*(){if(E())try{return yield q(K,F,ae,we,je)}catch{}return(function(Qe,at,St,jt,ir){const Er=Qe.width,Ir=Qe.height;z&&H||(z=new OffscreenCanvas(Er,Ir),H=z.getContext("2d",{willReadFrequently:!0})),z.width=Er,z.height=Ir,H.drawImage(Qe,0,0,Er,Ir);const rn=H.getImageData(at,St,jt,ir);return H.clearRect(0,0,Er,Ir),rn.data})(K,F,ae,we,je)})},t.bx=f1,t.by=a,t.bz=l,t.c=J,t.d=K=>r(void 0,void 0,void 0,function*(){if(K.byteLength===0)return createImageBitmap(new ImageData(1,1));const F=new Blob([new Uint8Array(K)],{type:"image/png"});try{return createImageBitmap(F)}catch(ae){throw new Error(`Could not load image because of ${ae.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),t.e=k,t.f=K=>new Promise((F,ae)=>{const we=new Image;we.onload=()=>{F(we),URL.revokeObjectURL(we.src),we.onload=null,window.requestAnimationFrame(()=>{we.src=V})},we.onerror=()=>ae(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));const je=new Blob([new Uint8Array(K)],{type:"image/png"});we.src=K.byteLength?URL.createObjectURL(je):V}),t.g=ye,t.h=(K,F)=>ie(k(K,{type:"json"}),F),t.i=D,t.j=Y,t.k=oe,t.l=(K,F)=>ie(k(K,{type:"arrayBuffer"}),F),t.m=ie,t.n=function(K){return new e5(K).readFields(i8,[])},t.o=ds,t.p=A3,t.q=Ze,t.r=Ba,t.s=se,t.t=ci,t.u=Ga,t.v=ue,t.w=x,t.x=function([K,F,ae]){return F+=90,F*=Math.PI/180,ae*=Math.PI/180,{x:K*Math.cos(F)*Math.sin(ae),y:K*Math.sin(F)*Math.sin(ae),z:K*Math.cos(ae)}},t.y=Uo,t.z=Al}),C("worker",["./shared"],function(t){class r{constructor($e){this.keyCache={},$e&&this.replace($e)}replace($e){this._layerConfigs={},this._layers={},this.update($e,[])}update($e,ot){for(const Ee of $e){this._layerConfigs[Ee.id]=Ee;const Ae=this._layers[Ee.id]=t.aA(Ee);Ae._featureFilter=t.a7(Ae.filter),this.keyCache[Ee.id]&&delete this.keyCache[Ee.id]}for(const Ee of ot)delete this.keyCache[Ee],delete this._layerConfigs[Ee],delete this._layers[Ee];this.familiesBySource={};const De=t.bk(Object.values(this._layerConfigs),this.keyCache);for(const Ee of De){const Ae=Ee.map(Xt=>this._layers[Xt.id]),Ie=Ae[0];if(Ie.visibility==="none")continue;const tt=Ie.source||"";let st=this.familiesBySource[tt];st||(st=this.familiesBySource[tt]={});const Ft=Ie.sourceLayer||"_geojsonTileLayer";let Nt=st[Ft];Nt||(Nt=st[Ft]=[]),Nt.push(Ae)}}}class a{constructor($e){const ot={},De=[];for(const tt in $e){const st=$e[tt],Ft=ot[tt]={};for(const Nt in st){const Xt=st[+Nt];if(!Xt||Xt.bitmap.width===0||Xt.bitmap.height===0)continue;const lr={x:0,y:0,w:Xt.bitmap.width+2,h:Xt.bitmap.height+2};De.push(lr),Ft[Nt]={rect:lr,metrics:Xt.metrics}}}const{w:Ee,h:Ae}=t.p(De),Ie=new t.o({width:Ee||1,height:Ae||1});for(const tt in $e){const st=$e[tt];for(const Ft in st){const Nt=st[+Ft];if(!Nt||Nt.bitmap.width===0||Nt.bitmap.height===0)continue;const Xt=ot[tt][Ft].rect;t.o.copy(Nt.bitmap,Ie,{x:0,y:0},{x:Xt.x+1,y:Xt.y+1},Nt.bitmap)}}this.image=Ie,this.positions=ot}}t.bl("GlyphAtlas",a);class l{constructor($e){this.tileID=new t.S($e.tileID.overscaledZ,$e.tileID.wrap,$e.tileID.canonical.z,$e.tileID.canonical.x,$e.tileID.canonical.y),this.uid=$e.uid,this.zoom=$e.zoom,this.pixelRatio=$e.pixelRatio,this.tileSize=$e.tileSize,this.source=$e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=$e.showCollisionBoxes,this.collectResourceTiming=!!$e.collectResourceTiming,this.returnDependencies=!!$e.returnDependencies,this.promoteId=$e.promoteId,this.inFlightDependencies=[]}parse($e,ot,De,Ee){return t._(this,void 0,void 0,function*(){this.status="parsing",this.data=$e,this.collisionBoxArray=new t.a5;const Ae=new t.bm(Object.keys($e.layers).sort()),Ie=new t.bn(this.tileID,this.promoteId);Ie.bucketLayerIDs=[];const tt={},st={featureIndex:Ie,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:De},Ft=ot.familiesBySource[this.source];for(const ba in Ft){const ea=$e.layers[ba];if(!ea)continue;ea.version===1&&t.w(`Vector tile source "${this.source}" layer "${ba}" does not use vector tile spec v2 and therefore may have some rendering errors.`);const Za=Ae.encode(ba),ui=[];for(let _r=0;_r<ea.length;_r++){const Qt=ea.feature(_r),yr=Ie.getId(Qt,ba);ui.push({feature:Qt,id:yr,index:_r,sourceLayerIndex:Za})}for(const _r of Ft[ba]){const Qt=_r[0];Qt.source!==this.source&&t.w(`layer.source = ${Qt.source} does not equal this.source = ${this.source}`),Qt.minzoom&&this.zoom<Math.floor(Qt.minzoom)||Qt.maxzoom&&this.zoom>=Qt.maxzoom||Qt.visibility!=="none"&&(i(_r,this.zoom,De),(tt[Qt.id]=Qt.createBucket({index:Ie.bucketLayerIDs.length,layers:_r,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Za,sourceID:this.source})).populate(ui,st,this.tileID.canonical),Ie.bucketLayerIDs.push(_r.map(yr=>yr.id)))}}const Nt=t.aF(st.glyphDependencies,ba=>Object.keys(ba).map(Number));this.inFlightDependencies.forEach(ba=>ba?.abort()),this.inFlightDependencies=[];let Xt=Promise.resolve({});if(Object.keys(Nt).length){const ba=new AbortController;this.inFlightDependencies.push(ba),Xt=Ee.sendAsync({type:"GG",data:{stacks:Nt,source:this.source,tileID:this.tileID,type:"glyphs"}},ba)}const lr=Object.keys(st.iconDependencies);let Rr=Promise.resolve({});if(lr.length){const ba=new AbortController;this.inFlightDependencies.push(ba),Rr=Ee.sendAsync({type:"GI",data:{icons:lr,source:this.source,tileID:this.tileID,type:"icons"}},ba)}const Mr=Object.keys(st.patternDependencies);let Sr=Promise.resolve({});if(Mr.length){const ba=new AbortController;this.inFlightDependencies.push(ba),Sr=Ee.sendAsync({type:"GI",data:{icons:Mr,source:this.source,tileID:this.tileID,type:"patterns"}},ba)}const[Kr,qn,ha]=yield Promise.all([Xt,Rr,Sr]),ia=new a(Kr),xa=new t.bo(qn,ha);for(const ba in tt){const ea=tt[ba];ea instanceof t.a6?(i(ea.layers,this.zoom,De),t.bp({bucket:ea,glyphMap:Kr,glyphPositions:ia.positions,imageMap:qn,imagePositions:xa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):ea.hasPattern&&(ea instanceof t.bq||ea instanceof t.br||ea instanceof t.bs)&&(i(ea.layers,this.zoom,De),ea.addFeatures(st,this.tileID.canonical,xa.patternPositions))}return this.status="done",{buckets:Object.values(tt).filter(ba=>!ba.isEmpty()),featureIndex:Ie,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ia.image,imageAtlas:xa,glyphMap:this.returnDependencies?Kr:null,iconMap:this.returnDependencies?qn:null,glyphPositions:this.returnDependencies?ia.positions:null}})}}function i(Dt,$e,ot){const De=new t.z($e);for(const Ee of Dt)Ee.recalculate(De,ot)}class s{constructor($e,ot,De){this.actor=$e,this.layerIndex=ot,this.availableImages=De,this.fetching={},this.loading={},this.loaded={}}loadVectorTile($e,ot){return t._(this,void 0,void 0,function*(){const De=yield t.l($e.request,ot);try{return{vectorTile:new t.bt.VectorTile(new t.bu(De.data)),rawData:De.data,cacheControl:De.cacheControl,expires:De.expires}}catch(Ee){const Ae=new Uint8Array(De.data);let Ie=`Unable to parse the tile at ${$e.request.url}, `;throw Ie+=Ae[0]===31&&Ae[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Ee.message}`,new Error(Ie)}})}loadTile($e){return t._(this,void 0,void 0,function*(){const ot=$e.uid,De=!!($e&&$e.request&&$e.request.collectResourceTiming)&&new t.bv($e.request),Ee=new l($e);this.loading[ot]=Ee;const Ae=new AbortController;Ee.abort=Ae;try{const Ie=yield this.loadVectorTile($e,Ae);if(delete this.loading[ot],!Ie)return null;const tt=Ie.rawData,st={};Ie.expires&&(st.expires=Ie.expires),Ie.cacheControl&&(st.cacheControl=Ie.cacheControl);const Ft={};if(De){const Xt=De.finish();Xt&&(Ft.resourceTiming=JSON.parse(JSON.stringify(Xt)))}Ee.vectorTile=Ie.vectorTile;const Nt=Ee.parse(Ie.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ot]=Ee,this.fetching[ot]={rawTileData:tt,cacheControl:st,resourceTiming:Ft};try{const Xt=yield Nt;return t.e({rawTileData:tt.slice(0)},Xt,st,Ft)}finally{delete this.fetching[ot]}}catch(Ie){throw delete this.loading[ot],Ee.status="done",this.loaded[ot]=Ee,Ie}})}reloadTile($e){return t._(this,void 0,void 0,function*(){const ot=$e.uid;if(!this.loaded||!this.loaded[ot])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");const De=this.loaded[ot];if(De.showCollisionBoxes=$e.showCollisionBoxes,De.status==="parsing"){const Ee=yield De.parse(De.vectorTile,this.layerIndex,this.availableImages,this.actor);let Ae;if(this.fetching[ot]){const{rawTileData:Ie,cacheControl:tt,resourceTiming:st}=this.fetching[ot];delete this.fetching[ot],Ae=t.e({rawTileData:Ie.slice(0)},Ee,tt,st)}else Ae=Ee;return Ae}if(De.status==="done"&&De.vectorTile)return De.parse(De.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile($e){return t._(this,void 0,void 0,function*(){const ot=this.loading,De=$e.uid;ot&&ot[De]&&ot[De].abort&&(ot[De].abort.abort(),delete ot[De])})}removeTile($e){return t._(this,void 0,void 0,function*(){this.loaded&&this.loaded[$e.uid]&&delete this.loaded[$e.uid]})}}class o{constructor(){this.loaded={}}loadTile($e){return t._(this,void 0,void 0,function*(){const{uid:ot,encoding:De,rawImageData:Ee,redFactor:Ae,greenFactor:Ie,blueFactor:tt,baseShift:st}=$e,Ft=Ee.width+2,Nt=Ee.height+2,Xt=t.b(Ee)?new t.R({width:Ft,height:Nt},yield t.bw(Ee,-1,-1,Ft,Nt)):Ee,lr=new t.bx(ot,Xt,De,Ae,Ie,tt,st);return this.loaded=this.loaded||{},this.loaded[ot]=lr,lr})}removeTile($e){const ot=this.loaded,De=$e.uid;ot&&ot[De]&&delete ot[De]}}function u(Dt,$e){if(Dt.length!==0){d(Dt[0],$e);for(var ot=1;ot<Dt.length;ot++)d(Dt[ot],!$e)}}function d(Dt,$e){for(var ot=0,De=0,Ee=0,Ae=Dt.length,Ie=Ae-1;Ee<Ae;Ie=Ee++){var tt=(Dt[Ee][0]-Dt[Ie][0])*(Dt[Ie][1]+Dt[Ee][1]),st=ot+tt;De+=Math.abs(ot)>=Math.abs(tt)?ot-st+tt:tt-st+ot,ot=st}ot+De>=0!=!!$e&&Dt.reverse()}var h=t.by(function Dt($e,ot){var De,Ee=$e&&$e.type;if(Ee==="FeatureCollection")for(De=0;De<$e.features.length;De++)Dt($e.features[De],ot);else if(Ee==="GeometryCollection")for(De=0;De<$e.geometries.length;De++)Dt($e.geometries[De],ot);else if(Ee==="Feature")Dt($e.geometry,ot);else if(Ee==="Polygon")u($e.coordinates,ot);else if(Ee==="MultiPolygon")for(De=0;De<$e.coordinates.length;De++)u($e.coordinates[De],ot);return $e});const y=t.bt.VectorTileFeature.prototype.toGeoJSON;var m={exports:{}},E=t.bz,c=t.bt.VectorTileFeature,_=T;function T(Dt,$e){this.options=$e||{},this.features=Dt,this.length=Dt.length}function M(Dt,$e){this.id=typeof Dt.id=="number"?Dt.id:void 0,this.type=Dt.type,this.rawGeometry=Dt.type===1?[Dt.geometry]:Dt.geometry,this.properties=Dt.tags,this.extent=$e||4096}T.prototype.feature=function(Dt){return new M(this.features[Dt],this.options.extent)},M.prototype.loadGeometry=function(){var Dt=this.rawGeometry;this.geometry=[];for(var $e=0;$e<Dt.length;$e++){for(var ot=Dt[$e],De=[],Ee=0;Ee<ot.length;Ee++)De.push(new E(ot[Ee][0],ot[Ee][1]));this.geometry.push(De)}return this.geometry},M.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Dt=this.geometry,$e=1/0,ot=-1/0,De=1/0,Ee=-1/0,Ae=0;Ae<Dt.length;Ae++)for(var Ie=Dt[Ae],tt=0;tt<Ie.length;tt++){var st=Ie[tt];$e=Math.min($e,st.x),ot=Math.max(ot,st.x),De=Math.min(De,st.y),Ee=Math.max(Ee,st.y)}return[$e,De,ot,Ee]},M.prototype.toGeoJSON=c.prototype.toGeoJSON;var k=t.bA,b=_;function A(Dt){var $e=new k;return(function(ot,De){for(var Ee in ot.layers)De.writeMessage(3,g,ot.layers[Ee])})(Dt,$e),$e.finish()}function g(Dt,$e){var ot;$e.writeVarintField(15,Dt.version||1),$e.writeStringField(1,Dt.name||""),$e.writeVarintField(5,Dt.extent||4096);var De={keys:[],values:[],keycache:{},valuecache:{}};for(ot=0;ot<Dt.length;ot++)De.feature=Dt.feature(ot),$e.writeMessage(2,f,De);var Ee=De.keys;for(ot=0;ot<Ee.length;ot++)$e.writeStringField(3,Ee[ot]);var Ae=De.values;for(ot=0;ot<Ae.length;ot++)$e.writeMessage(4,B,Ae[ot])}function f(Dt,$e){var ot=Dt.feature;ot.id!==void 0&&$e.writeVarintField(1,ot.id),$e.writeMessage(2,p,Dt),$e.writeVarintField(3,ot.type),$e.writeMessage(4,D,ot)}function p(Dt,$e){var ot=Dt.feature,De=Dt.keys,Ee=Dt.values,Ae=Dt.keycache,Ie=Dt.valuecache;for(var tt in ot.properties){var st=ot.properties[tt],Ft=Ae[tt];if(st!==null){Ft===void 0&&(De.push(tt),Ae[tt]=Ft=De.length-1),$e.writeVarint(Ft);var Nt=typeof st;Nt!=="string"&&Nt!=="boolean"&&Nt!=="number"&&(st=JSON.stringify(st));var Xt=Nt+":"+st,lr=Ie[Xt];lr===void 0&&(Ee.push(st),Ie[Xt]=lr=Ee.length-1),$e.writeVarint(lr)}}}function x(Dt,$e){return($e<<3)+(7&Dt)}function N(Dt){return Dt<<1^Dt>>31}function D(Dt,$e){for(var ot=Dt.loadGeometry(),De=Dt.type,Ee=0,Ae=0,Ie=ot.length,tt=0;tt<Ie;tt++){var st=ot[tt],Ft=1;De===1&&(Ft=st.length),$e.writeVarint(x(1,Ft));for(var Nt=De===3?st.length-1:st.length,Xt=0;Xt<Nt;Xt++){Xt===1&&De!==1&&$e.writeVarint(x(2,Nt-1));var lr=st[Xt].x-Ee,Rr=st[Xt].y-Ae;$e.writeVarint(N(lr)),$e.writeVarint(N(Rr)),Ee+=lr,Ae+=Rr}De===3&&$e.writeVarint(x(7,1))}}function B(Dt,$e){var ot=typeof Dt;ot==="string"?$e.writeStringField(1,Dt):ot==="boolean"?$e.writeBooleanField(7,Dt):ot==="number"&&(Dt%1!=0?$e.writeDoubleField(3,Dt):Dt<0?$e.writeSVarintField(6,Dt):$e.writeVarintField(5,Dt))}m.exports=A,m.exports.fromVectorTileJs=A,m.exports.fromGeojsonVt=function(Dt,$e){$e=$e||{};var ot={};for(var De in Dt)ot[De]=new b(Dt[De].features,$e),ot[De].name=De,ot[De].version=$e.version,ot[De].extent=$e.extent;return A({layers:ot})},m.exports.GeoJSONWrapper=b;var U=t.by(m.exports);const V={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:Dt=>Dt},q=Math.fround||(z=new Float32Array(1),Dt=>(z[0]=+Dt,z[0]));var z;const H=3,G=5,J=6;class le{constructor($e){this.options=Object.assign(Object.create(V),$e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load($e){const{log:ot,minZoom:De,maxZoom:Ee}=this.options;ot&&console.time("total time");const Ae=`prepare ${$e.length} points`;ot&&console.time(Ae),this.points=$e;const Ie=[];for(let st=0;st<$e.length;st++){const Ft=$e[st];if(!Ft.geometry)continue;const[Nt,Xt]=Ft.geometry.coordinates,lr=q(me(Nt)),Rr=q(W(Xt));Ie.push(lr,Rr,1/0,st,-1,1),this.options.reduce&&Ie.push(0)}let tt=this.trees[Ee+1]=this._createTree(Ie);ot&&console.timeEnd(Ae);for(let st=Ee;st>=De;st--){const Ft=+Date.now();tt=this.trees[st]=this._createTree(this._cluster(tt,st)),ot&&console.log("z%d: %d clusters in %dms",st,tt.numItems,+Date.now()-Ft)}return ot&&console.timeEnd("total time"),this}getClusters($e,ot){let De=(($e[0]+180)%360+360)%360-180;const Ee=Math.max(-90,Math.min(90,$e[1]));let Ae=$e[2]===180?180:(($e[2]+180)%360+360)%360-180;const Ie=Math.max(-90,Math.min(90,$e[3]));if($e[2]-$e[0]>=360)De=-180,Ae=180;else if(De>Ae){const Xt=this.getClusters([De,Ee,180,Ie],ot),lr=this.getClusters([-180,Ee,Ae,Ie],ot);return Xt.concat(lr)}const tt=this.trees[this._limitZoom(ot)],st=tt.range(me(De),W(Ie),me(Ae),W(Ee)),Ft=tt.data,Nt=[];for(const Xt of st){const lr=this.stride*Xt;Nt.push(Ft[lr+G]>1?ye(Ft,lr,this.clusterProps):this.points[Ft[lr+H]])}return Nt}getChildren($e){const ot=this._getOriginId($e),De=this._getOriginZoom($e),Ee="No cluster with the specified id.",Ae=this.trees[De];if(!Ae)throw new Error(Ee);const Ie=Ae.data;if(ot*this.stride>=Ie.length)throw new Error(Ee);const tt=this.options.radius/(this.options.extent*Math.pow(2,De-1)),st=Ae.within(Ie[ot*this.stride],Ie[ot*this.stride+1],tt),Ft=[];for(const Nt of st){const Xt=Nt*this.stride;Ie[Xt+4]===$e&&Ft.push(Ie[Xt+G]>1?ye(Ie,Xt,this.clusterProps):this.points[Ie[Xt+H]])}if(Ft.length===0)throw new Error(Ee);return Ft}getLeaves($e,ot,De){const Ee=[];return this._appendLeaves(Ee,$e,ot=ot||10,De=De||0,0),Ee}getTile($e,ot,De){const Ee=this.trees[this._limitZoom($e)],Ae=Math.pow(2,$e),{extent:Ie,radius:tt}=this.options,st=tt/Ie,Ft=(De-st)/Ae,Nt=(De+1+st)/Ae,Xt={features:[]};return this._addTileFeatures(Ee.range((ot-st)/Ae,Ft,(ot+1+st)/Ae,Nt),Ee.data,ot,De,Ae,Xt),ot===0&&this._addTileFeatures(Ee.range(1-st/Ae,Ft,1,Nt),Ee.data,Ae,De,Ae,Xt),ot===Ae-1&&this._addTileFeatures(Ee.range(0,Ft,st/Ae,Nt),Ee.data,-1,De,Ae,Xt),Xt.features.length?Xt:null}getClusterExpansionZoom($e){let ot=this._getOriginZoom($e)-1;for(;ot<=this.options.maxZoom;){const De=this.getChildren($e);if(ot++,De.length!==1)break;$e=De[0].properties.cluster_id}return ot}_appendLeaves($e,ot,De,Ee,Ae){const Ie=this.getChildren(ot);for(const tt of Ie){const st=tt.properties;if(st&&st.cluster?Ae+st.point_count<=Ee?Ae+=st.point_count:Ae=this._appendLeaves($e,st.cluster_id,De,Ee,Ae):Ae<Ee?Ae++:$e.push(tt),$e.length===De)break}return Ae}_createTree($e){const ot=new t.av($e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let De=0;De<$e.length;De+=this.stride)ot.add($e[De],$e[De+1]);return ot.finish(),ot.data=$e,ot}_addTileFeatures($e,ot,De,Ee,Ae,Ie){for(const tt of $e){const st=tt*this.stride,Ft=ot[st+G]>1;let Nt,Xt,lr;if(Ft)Nt=de(ot,st,this.clusterProps),Xt=ot[st],lr=ot[st+1];else{const Sr=this.points[ot[st+H]];Nt=Sr.properties;const[Kr,qn]=Sr.geometry.coordinates;Xt=me(Kr),lr=W(qn)}const Rr={type:1,geometry:[[Math.round(this.options.extent*(Xt*Ae-De)),Math.round(this.options.extent*(lr*Ae-Ee))]],tags:Nt};let Mr;Mr=Ft||this.options.generateId?ot[st+H]:this.points[ot[st+H]].id,Mr!==void 0&&(Rr.id=Mr),Ie.features.push(Rr)}}_limitZoom($e){return Math.max(this.options.minZoom,Math.min(Math.floor(+$e),this.options.maxZoom+1))}_cluster($e,ot){const{radius:De,extent:Ee,reduce:Ae,minPoints:Ie}=this.options,tt=De/(Ee*Math.pow(2,ot)),st=$e.data,Ft=[],Nt=this.stride;for(let Xt=0;Xt<st.length;Xt+=Nt){if(st[Xt+2]<=ot)continue;st[Xt+2]=ot;const lr=st[Xt],Rr=st[Xt+1],Mr=$e.within(st[Xt],st[Xt+1],tt),Sr=st[Xt+G];let Kr=Sr;for(const qn of Mr){const ha=qn*Nt;st[ha+2]>ot&&(Kr+=st[ha+G])}if(Kr>Sr&&Kr>=Ie){let qn,ha=lr*Sr,ia=Rr*Sr,xa=-1;const ba=((Xt/Nt|0)<<5)+(ot+1)+this.points.length;for(const ea of Mr){const Za=ea*Nt;if(st[Za+2]<=ot)continue;st[Za+2]=ot;const ui=st[Za+G];ha+=st[Za]*ui,ia+=st[Za+1]*ui,st[Za+4]=ba,Ae&&(qn||(qn=this._map(st,Xt,!0),xa=this.clusterProps.length,this.clusterProps.push(qn)),Ae(qn,this._map(st,Za)))}st[Xt+4]=ba,Ft.push(ha/Kr,ia/Kr,1/0,ba,-1,Kr),Ae&&Ft.push(xa)}else{for(let qn=0;qn<Nt;qn++)Ft.push(st[Xt+qn]);if(Kr>1)for(const qn of Mr){const ha=qn*Nt;if(!(st[ha+2]<=ot)){st[ha+2]=ot;for(let ia=0;ia<Nt;ia++)Ft.push(st[ha+ia])}}}}return Ft}_getOriginId($e){return $e-this.points.length>>5}_getOriginZoom($e){return($e-this.points.length)%32}_map($e,ot,De){if($e[ot+G]>1){const Ie=this.clusterProps[$e[ot+J]];return De?Object.assign({},Ie):Ie}const Ee=this.points[$e[ot+H]].properties,Ae=this.options.map(Ee);return De&&Ae===Ee?Object.assign({},Ae):Ae}}function ye(Dt,$e,ot){return{type:"Feature",id:Dt[$e+H],properties:de(Dt,$e,ot),geometry:{type:"Point",coordinates:[(De=Dt[$e],360*(De-.5)),ie(Dt[$e+1])]}};var De}function de(Dt,$e,ot){const De=Dt[$e+G],Ee=De>=1e4?`${Math.round(De/1e3)}k`:De>=1e3?Math.round(De/100)/10+"k":De,Ae=Dt[$e+J],Ie=Ae===-1?{}:Object.assign({},ot[Ae]);return Object.assign(Ie,{cluster:!0,cluster_id:Dt[$e+H],point_count:De,point_count_abbreviated:Ee})}function me(Dt){return Dt/360+.5}function W(Dt){const $e=Math.sin(Dt*Math.PI/180),ot=.5-.25*Math.log((1+$e)/(1-$e))/Math.PI;return ot<0?0:ot>1?1:ot}function ie(Dt){const $e=(180-360*Dt)*Math.PI/180;return 360*Math.atan(Math.exp($e))/Math.PI-90}function se(Dt,$e,ot,De){let Ee=De;const Ae=$e+(ot-$e>>1);let Ie,tt=ot-$e;const st=Dt[$e],Ft=Dt[$e+1],Nt=Dt[ot],Xt=Dt[ot+1];for(let lr=$e+3;lr<ot;lr+=3){const Rr=ee(Dt[lr],Dt[lr+1],st,Ft,Nt,Xt);if(Rr>Ee)Ie=lr,Ee=Rr;else if(Rr===Ee){const Mr=Math.abs(lr-Ae);Mr<tt&&(Ie=lr,tt=Mr)}}Ee>De&&(Ie-$e>3&&se(Dt,$e,Ie,De),Dt[Ie+2]=Ee,ot-Ie>3&&se(Dt,Ie,ot,De))}function ee(Dt,$e,ot,De,Ee,Ae){let Ie=Ee-ot,tt=Ae-De;if(Ie!==0||tt!==0){const st=((Dt-ot)*Ie+($e-De)*tt)/(Ie*Ie+tt*tt);st>1?(ot=Ee,De=Ae):st>0&&(ot+=Ie*st,De+=tt*st)}return Ie=Dt-ot,tt=$e-De,Ie*Ie+tt*tt}function pe(Dt,$e,ot,De){const Ee={id:Dt??null,type:$e,geometry:ot,tags:De,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if($e==="Point"||$e==="MultiPoint"||$e==="LineString")oe(Ee,ot);else if($e==="Polygon")oe(Ee,ot[0]);else if($e==="MultiLineString")for(const Ae of ot)oe(Ee,Ae);else if($e==="MultiPolygon")for(const Ae of ot)oe(Ee,Ae[0]);return Ee}function oe(Dt,$e){for(let ot=0;ot<$e.length;ot+=3)Dt.minX=Math.min(Dt.minX,$e[ot]),Dt.minY=Math.min(Dt.minY,$e[ot+1]),Dt.maxX=Math.max(Dt.maxX,$e[ot]),Dt.maxY=Math.max(Dt.maxY,$e[ot+1])}function Y(Dt,$e,ot,De){if(!$e.geometry)return;const Ee=$e.geometry.coordinates;if(Ee&&Ee.length===0)return;const Ae=$e.geometry.type,Ie=Math.pow(ot.tolerance/((1<<ot.maxZoom)*ot.extent),2);let tt=[],st=$e.id;if(ot.promoteId?st=$e.properties[ot.promoteId]:ot.generateId&&(st=De||0),Ae==="Point")ce(Ee,tt);else if(Ae==="MultiPoint")for(const Ft of Ee)ce(Ft,tt);else if(Ae==="LineString")ue(Ee,tt,Ie,!1);else if(Ae==="MultiLineString"){if(ot.lineMetrics){for(const Ft of Ee)tt=[],ue(Ft,tt,Ie,!1),Dt.push(pe(st,"LineString",tt,$e.properties));return}_e(Ee,tt,Ie,!1)}else if(Ae==="Polygon")_e(Ee,tt,Ie,!0);else{if(Ae!=="MultiPolygon"){if(Ae==="GeometryCollection"){for(const Ft of $e.geometry.geometries)Y(Dt,{id:st,geometry:Ft,properties:$e.properties},ot,De);return}throw new Error("Input data is not a valid GeoJSON object.")}for(const Ft of Ee){const Nt=[];_e(Ft,Nt,Ie,!0),tt.push(Nt)}}Dt.push(pe(st,Ae,tt,$e.properties))}function ce(Dt,$e){$e.push(Le(Dt[0]),ze(Dt[1]),0)}function ue(Dt,$e,ot,De){let Ee,Ae,Ie=0;for(let st=0;st<Dt.length;st++){const Ft=Le(Dt[st][0]),Nt=ze(Dt[st][1]);$e.push(Ft,Nt,0),st>0&&(Ie+=De?(Ee*Nt-Ft*Ae)/2:Math.sqrt(Math.pow(Ft-Ee,2)+Math.pow(Nt-Ae,2))),Ee=Ft,Ae=Nt}const tt=$e.length-3;$e[2]=1,se($e,0,tt,ot),$e[tt+2]=1,$e.size=Math.abs(Ie),$e.start=0,$e.end=$e.size}function _e(Dt,$e,ot,De){for(let Ee=0;Ee<Dt.length;Ee++){const Ae=[];ue(Dt[Ee],Ae,ot,De),$e.push(Ae)}}function Le(Dt){return Dt/360+.5}function ze(Dt){const $e=Math.sin(Dt*Math.PI/180),ot=.5-.25*Math.log((1+$e)/(1-$e))/Math.PI;return ot<0?0:ot>1?1:ot}function Ge(Dt,$e,ot,De,Ee,Ae,Ie,tt){if(De/=$e,Ae>=(ot/=$e)&&Ie<De)return Dt;if(Ie<ot||Ae>=De)return null;const st=[];for(const Ft of Dt){const Nt=Ft.geometry;let Xt=Ft.type;const lr=Ee===0?Ft.minX:Ft.minY,Rr=Ee===0?Ft.maxX:Ft.maxY;if(lr>=ot&&Rr<De){st.push(Ft);continue}if(Rr<ot||lr>=De)continue;let Mr=[];if(Xt==="Point"||Xt==="MultiPoint")Ve(Nt,Mr,ot,De,Ee);else if(Xt==="LineString")rt(Nt,Mr,ot,De,Ee,!1,tt.lineMetrics);else if(Xt==="MultiLineString")gt(Nt,Mr,ot,De,Ee,!1);else if(Xt==="Polygon")gt(Nt,Mr,ot,De,Ee,!0);else if(Xt==="MultiPolygon")for(const Sr of Nt){const Kr=[];gt(Sr,Kr,ot,De,Ee,!0),Kr.length&&Mr.push(Kr)}if(Mr.length){if(tt.lineMetrics&&Xt==="LineString"){for(const Sr of Mr)st.push(pe(Ft.id,Xt,Sr,Ft.tags));continue}Xt!=="LineString"&&Xt!=="MultiLineString"||(Mr.length===1?(Xt="LineString",Mr=Mr[0]):Xt="MultiLineString"),Xt!=="Point"&&Xt!=="MultiPoint"||(Xt=Mr.length===3?"Point":"MultiPoint"),st.push(pe(Ft.id,Xt,Mr,Ft.tags))}}return st.length?st:null}function Ve(Dt,$e,ot,De,Ee){for(let Ae=0;Ae<Dt.length;Ae+=3){const Ie=Dt[Ae+Ee];Ie>=ot&&Ie<=De&&ht($e,Dt[Ae],Dt[Ae+1],Dt[Ae+2])}}function rt(Dt,$e,ot,De,Ee,Ae,Ie){let tt=pt(Dt);const st=Ee===0?lt:Fe;let Ft,Nt,Xt=Dt.start;for(let Kr=0;Kr<Dt.length-3;Kr+=3){const qn=Dt[Kr],ha=Dt[Kr+1],ia=Dt[Kr+2],xa=Dt[Kr+3],ba=Dt[Kr+4],ea=Ee===0?qn:ha,Za=Ee===0?xa:ba;let ui=!1;Ie&&(Ft=Math.sqrt(Math.pow(qn-xa,2)+Math.pow(ha-ba,2))),ea<ot?Za>ot&&(Nt=st(tt,qn,ha,xa,ba,ot),Ie&&(tt.start=Xt+Ft*Nt)):ea>De?Za<De&&(Nt=st(tt,qn,ha,xa,ba,De),Ie&&(tt.start=Xt+Ft*Nt)):ht(tt,qn,ha,ia),Za<ot&&ea>=ot&&(Nt=st(tt,qn,ha,xa,ba,ot),ui=!0),Za>De&&ea<=De&&(Nt=st(tt,qn,ha,xa,ba,De),ui=!0),!Ae&&ui&&(Ie&&(tt.end=Xt+Ft*Nt),$e.push(tt),tt=pt(Dt)),Ie&&(Xt+=Ft)}let lr=Dt.length-3;const Rr=Dt[lr],Mr=Dt[lr+1],Sr=Ee===0?Rr:Mr;Sr>=ot&&Sr<=De&&ht(tt,Rr,Mr,Dt[lr+2]),lr=tt.length-3,Ae&&lr>=3&&(tt[lr]!==tt[0]||tt[lr+1]!==tt[1])&&ht(tt,tt[0],tt[1],tt[2]),tt.length&&$e.push(tt)}function pt(Dt){const $e=[];return $e.size=Dt.size,$e.start=Dt.start,$e.end=Dt.end,$e}function gt(Dt,$e,ot,De,Ee,Ae){for(const Ie of Dt)rt(Ie,$e,ot,De,Ee,Ae,!1)}function ht(Dt,$e,ot,De){Dt.push($e,ot,De)}function lt(Dt,$e,ot,De,Ee,Ae){const Ie=(Ae-$e)/(De-$e);return ht(Dt,Ae,ot+(Ee-ot)*Ie,1),Ie}function Fe(Dt,$e,ot,De,Ee,Ae){const Ie=(Ae-ot)/(Ee-ot);return ht(Dt,$e+(De-$e)*Ie,Ae,1),Ie}function Pe(Dt,$e){const ot=[];for(let De=0;De<Dt.length;De++){const Ee=Dt[De],Ae=Ee.type;let Ie;if(Ae==="Point"||Ae==="MultiPoint"||Ae==="LineString")Ie=be(Ee.geometry,$e);else if(Ae==="MultiLineString"||Ae==="Polygon"){Ie=[];for(const tt of Ee.geometry)Ie.push(be(tt,$e))}else if(Ae==="MultiPolygon"){Ie=[];for(const tt of Ee.geometry){const st=[];for(const Ft of tt)st.push(be(Ft,$e));Ie.push(st)}}ot.push(pe(Ee.id,Ae,Ie,Ee.tags))}return ot}function be(Dt,$e){const ot=[];ot.size=Dt.size,Dt.start!==void 0&&(ot.start=Dt.start,ot.end=Dt.end);for(let De=0;De<Dt.length;De+=3)ot.push(Dt[De]+$e,Dt[De+1],Dt[De+2]);return ot}function Ye(Dt,$e){if(Dt.transformed)return Dt;const ot=1<<Dt.z,De=Dt.x,Ee=Dt.y;for(const Ae of Dt.features){const Ie=Ae.geometry,tt=Ae.type;if(Ae.geometry=[],tt===1)for(let st=0;st<Ie.length;st+=2)Ae.geometry.push(mt(Ie[st],Ie[st+1],$e,ot,De,Ee));else for(let st=0;st<Ie.length;st++){const Ft=[];for(let Nt=0;Nt<Ie[st].length;Nt+=2)Ft.push(mt(Ie[st][Nt],Ie[st][Nt+1],$e,ot,De,Ee));Ae.geometry.push(Ft)}}return Dt.transformed=!0,Dt}function mt(Dt,$e,ot,De,Ee,Ae){return[Math.round(ot*(Dt*De-Ee)),Math.round(ot*($e*De-Ae))]}function bt(Dt,$e,ot,De,Ee){const Ae=$e===Ee.maxZoom?0:Ee.tolerance/((1<<$e)*Ee.extent),Ie={features:[],numPoints:0,numSimplified:0,numFeatures:Dt.length,source:null,x:ot,y:De,z:$e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0};for(const tt of Dt)ft(Ie,tt,Ae,Ee);return Ie}function ft(Dt,$e,ot,De){const Ee=$e.geometry,Ae=$e.type,Ie=[];if(Dt.minX=Math.min(Dt.minX,$e.minX),Dt.minY=Math.min(Dt.minY,$e.minY),Dt.maxX=Math.max(Dt.maxX,$e.maxX),Dt.maxY=Math.max(Dt.maxY,$e.maxY),Ae==="Point"||Ae==="MultiPoint")for(let tt=0;tt<Ee.length;tt+=3)Ie.push(Ee[tt],Ee[tt+1]),Dt.numPoints++,Dt.numSimplified++;else if(Ae==="LineString")Wt(Ie,Ee,Dt,ot,!1,!1);else if(Ae==="MultiLineString"||Ae==="Polygon")for(let tt=0;tt<Ee.length;tt++)Wt(Ie,Ee[tt],Dt,ot,Ae==="Polygon",tt===0);else if(Ae==="MultiPolygon")for(let tt=0;tt<Ee.length;tt++){const st=Ee[tt];for(let Ft=0;Ft<st.length;Ft++)Wt(Ie,st[Ft],Dt,ot,!0,Ft===0)}if(Ie.length){let tt=$e.tags||null;if(Ae==="LineString"&&De.lineMetrics){tt={};for(const Ft in $e.tags)tt[Ft]=$e.tags[Ft];tt.mapbox_clip_start=Ee.start/Ee.size,tt.mapbox_clip_end=Ee.end/Ee.size}const st={geometry:Ie,type:Ae==="Polygon"||Ae==="MultiPolygon"?3:Ae==="LineString"||Ae==="MultiLineString"?2:1,tags:tt};$e.id!==null&&(st.id=$e.id),Dt.features.push(st)}}function Wt(Dt,$e,ot,De,Ee,Ae){const Ie=De*De;if(De>0&&$e.size<(Ee?Ie:De))return void(ot.numPoints+=$e.length/3);const tt=[];for(let st=0;st<$e.length;st+=3)(De===0||$e[st+2]>Ie)&&(ot.numSimplified++,tt.push($e[st],$e[st+1])),ot.numPoints++;Ee&&(function(st,Ft){let Nt=0;for(let Xt=0,lr=st.length,Rr=lr-2;Xt<lr;Rr=Xt,Xt+=2)Nt+=(st[Xt]-st[Rr])*(st[Xt+1]+st[Rr+1]);if(Nt>0===Ft)for(let Xt=0,lr=st.length;Xt<lr/2;Xt+=2){const Rr=st[Xt],Mr=st[Xt+1];st[Xt]=st[lr-2-Xt],st[Xt+1]=st[lr-1-Xt],st[lr-2-Xt]=Rr,st[lr-1-Xt]=Mr}})(tt,Ae),Dt.push(tt)}const Zt={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0};class cr{constructor($e,ot){const De=(ot=this.options=(function(Ae,Ie){for(const tt in Ie)Ae[tt]=Ie[tt];return Ae})(Object.create(Zt),ot)).debug;if(De&&console.time("preprocess data"),ot.maxZoom<0||ot.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(ot.promoteId&&ot.generateId)throw new Error("promoteId and generateId cannot be used together.");let Ee=(function(Ae,Ie){const tt=[];if(Ae.type==="FeatureCollection")for(let st=0;st<Ae.features.length;st++)Y(tt,Ae.features[st],Ie,st);else Y(tt,Ae.type==="Feature"?Ae:{geometry:Ae},Ie);return tt})($e,ot);this.tiles={},this.tileCoords=[],De&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",ot.indexMaxZoom,ot.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),Ee=(function(Ae,Ie){const tt=Ie.buffer/Ie.extent;let st=Ae;const Ft=Ge(Ae,1,-1-tt,tt,0,-1,2,Ie),Nt=Ge(Ae,1,1-tt,2+tt,0,-1,2,Ie);return(Ft||Nt)&&(st=Ge(Ae,1,-tt,1+tt,0,-1,2,Ie)||[],Ft&&(st=Pe(Ft,1).concat(st)),Nt&&(st=st.concat(Pe(Nt,-1)))),st})(Ee,ot),Ee.length&&this.splitTile(Ee,0,0,0),De&&(Ee.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}splitTile($e,ot,De,Ee,Ae,Ie,tt){const st=[$e,ot,De,Ee],Ft=this.options,Nt=Ft.debug;for(;st.length;){Ee=st.pop(),De=st.pop(),ot=st.pop(),$e=st.pop();const Xt=1<<ot,lr=pr(ot,De,Ee);let Rr=this.tiles[lr];if(!Rr&&(Nt>1&&console.time("creation"),Rr=this.tiles[lr]=bt($e,ot,De,Ee,Ft),this.tileCoords.push({z:ot,x:De,y:Ee}),Nt)){Nt>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ot,De,Ee,Rr.numFeatures,Rr.numPoints,Rr.numSimplified),console.timeEnd("creation"));const ui=`z${ot}`;this.stats[ui]=(this.stats[ui]||0)+1,this.total++}if(Rr.source=$e,Ae==null){if(ot===Ft.indexMaxZoom||Rr.numPoints<=Ft.indexMaxPoints)continue}else{if(ot===Ft.maxZoom||ot===Ae)continue;if(Ae!=null){const ui=Ae-ot;if(De!==Ie>>ui||Ee!==tt>>ui)continue}}if(Rr.source=null,$e.length===0)continue;Nt>1&&console.time("clipping");const Mr=.5*Ft.buffer/Ft.extent,Sr=.5-Mr,Kr=.5+Mr,qn=1+Mr;let ha=null,ia=null,xa=null,ba=null,ea=Ge($e,Xt,De-Mr,De+Kr,0,Rr.minX,Rr.maxX,Ft),Za=Ge($e,Xt,De+Sr,De+qn,0,Rr.minX,Rr.maxX,Ft);$e=null,ea&&(ha=Ge(ea,Xt,Ee-Mr,Ee+Kr,1,Rr.minY,Rr.maxY,Ft),ia=Ge(ea,Xt,Ee+Sr,Ee+qn,1,Rr.minY,Rr.maxY,Ft),ea=null),Za&&(xa=Ge(Za,Xt,Ee-Mr,Ee+Kr,1,Rr.minY,Rr.maxY,Ft),ba=Ge(Za,Xt,Ee+Sr,Ee+qn,1,Rr.minY,Rr.maxY,Ft),Za=null),Nt>1&&console.timeEnd("clipping"),st.push(ha||[],ot+1,2*De,2*Ee),st.push(ia||[],ot+1,2*De,2*Ee+1),st.push(xa||[],ot+1,2*De+1,2*Ee),st.push(ba||[],ot+1,2*De+1,2*Ee+1)}}getTile($e,ot,De){$e=+$e,ot=+ot,De=+De;const Ee=this.options,{extent:Ae,debug:Ie}=Ee;if($e<0||$e>24)return null;const tt=1<<$e,st=pr($e,ot=ot+tt&tt-1,De);if(this.tiles[st])return Ye(this.tiles[st],Ae);Ie>1&&console.log("drilling down to z%d-%d-%d",$e,ot,De);let Ft,Nt=$e,Xt=ot,lr=De;for(;!Ft&&Nt>0;)Nt--,Xt>>=1,lr>>=1,Ft=this.tiles[pr(Nt,Xt,lr)];return Ft&&Ft.source?(Ie>1&&(console.log("found parent tile z%d-%d-%d",Nt,Xt,lr),console.time("drilling down")),this.splitTile(Ft.source,Nt,Xt,lr,$e,ot,De),Ie>1&&console.timeEnd("drilling down"),this.tiles[st]?Ye(this.tiles[st],Ae):null):null}}function pr(Dt,$e,ot){return 32*((1<<Dt)*ot+$e)+Dt}function Br(Dt,$e){return $e?Dt.properties[$e]:Dt.id}function Fr(Dt,$e){if(Dt==null)return!0;if(Dt.type==="Feature")return Br(Dt,$e)!=null;if(Dt.type==="FeatureCollection"){const ot=new Set;for(const De of Dt.features){const Ee=Br(De,$e);if(Ee==null||ot.has(Ee))return!1;ot.add(Ee)}return!0}return!1}function cn(Dt,$e){const ot=new Map;if(Dt!=null)if(Dt.type==="Feature")ot.set(Br(Dt,$e),Dt);else for(const De of Dt.features)ot.set(Br(De,$e),De);return ot}class Nr extends s{constructor(){super(...arguments),this._dataUpdateable=new Map}loadVectorTile($e,ot){return t._(this,void 0,void 0,function*(){const De=$e.tileID.canonical;if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");const Ee=this._geoJSONIndex.getTile(De.z,De.x,De.y);if(!Ee)return null;const Ae=new class{constructor(tt){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.X,this.length=tt.length,this._features=tt}feature(tt){return new class{constructor(st){this._feature=st,this.extent=t.X,this.type=st.type,this.properties=st.tags,"id"in st&&!isNaN(st.id)&&(this.id=parseInt(st.id,10))}loadGeometry(){if(this._feature.type===1){const st=[];for(const Ft of this._feature.geometry)st.push([new t.P(Ft[0],Ft[1])]);return st}{const st=[];for(const Ft of this._feature.geometry){const Nt=[];for(const Xt of Ft)Nt.push(new t.P(Xt[0],Xt[1]));st.push(Nt)}return st}}toGeoJSON(st,Ft,Nt){return y.call(this,st,Ft,Nt)}}(this._features[tt])}}(Ee.features);let Ie=U(Ae);return Ie.byteOffset===0&&Ie.byteLength===Ie.buffer.byteLength||(Ie=new Uint8Array(Ie)),{vectorTile:Ae,rawData:Ie.buffer}})}loadData($e){return t._(this,void 0,void 0,function*(){var ot;(ot=this._pendingRequest)===null||ot===void 0||ot.abort();const De=!!($e&&$e.request&&$e.request.collectResourceTiming)&&new t.bv($e.request);this._pendingRequest=new AbortController;try{this._pendingData=this.loadAndProcessGeoJSON($e,this._pendingRequest),this._geoJSONIndex=$e.cluster?new le((function({superclusterOptions:Ie,clusterProperties:tt}){if(!tt||!Ie)return Ie;const st={},Ft={},Nt={accumulated:null,zoom:0},Xt={properties:null},lr=Object.keys(tt);for(const Rr of lr){const[Mr,Sr]=tt[Rr],Kr=t.bC(Sr),qn=t.bC(typeof Mr=="string"?[Mr,["accumulated"],["get",Rr]]:Mr);st[Rr]=Kr.value,Ft[Rr]=qn.value}return Ie.map=Rr=>{Xt.properties=Rr;const Mr={};for(const Sr of lr)Mr[Sr]=st[Sr].evaluate(Nt,Xt);return Mr},Ie.reduce=(Rr,Mr)=>{Xt.properties=Mr;for(const Sr of lr)Nt.accumulated=Rr[Sr],Rr[Sr]=Ft[Sr].evaluate(Nt,Xt)},Ie})($e)).load((yield this._pendingData).features):(Ee=yield this._pendingData,new cr(Ee,$e.geojsonVtOptions)),this.loaded={};const Ae={};if(De){const Ie=De.finish();Ie&&(Ae.resourceTiming={},Ae.resourceTiming[$e.source]=JSON.parse(JSON.stringify(Ie)))}return Ae}catch(Ae){if(delete this._pendingRequest,t.bB(Ae))return{abandoned:!0};throw Ae}var Ee})}getData(){return t._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile($e){const ot=this.loaded;return ot&&ot[$e.uid]?super.reloadTile($e):this.loadTile($e)}loadAndProcessGeoJSON($e,ot){return t._(this,void 0,void 0,function*(){let De=yield this.loadGeoJSON($e,ot);if(delete this._pendingRequest,typeof De!="object")throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`);if(h(De,!0),$e.filter){const Ee=t.bC($e.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Ee.result==="error")throw new Error(Ee.value.map(Ie=>`${Ie.key}: ${Ie.message}`).join(", "));De={type:"FeatureCollection",features:De.features.filter(Ie=>Ee.value.evaluate({zoom:0},Ie))}}return De})}loadGeoJSON($e,ot){return t._(this,void 0,void 0,function*(){const{promoteId:De}=$e;if($e.request){const Ee=yield t.h($e.request,ot);return this._dataUpdateable=Fr(Ee.data,De)?cn(Ee.data,De):void 0,Ee.data}if(typeof $e.data=="string")try{const Ee=JSON.parse($e.data);return this._dataUpdateable=Fr(Ee,De)?cn(Ee,De):void 0,Ee}catch{throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`)}if(!$e.dataDiff)throw new Error(`Input data given to '${$e.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${$e.source}`);return(function(Ee,Ae,Ie){var tt,st,Ft,Nt;if(Ae.removeAll&&Ee.clear(),Ae.remove)for(const Xt of Ae.remove)Ee.delete(Xt);if(Ae.add)for(const Xt of Ae.add){const lr=Br(Xt,Ie);lr!=null&&Ee.set(lr,Xt)}if(Ae.update)for(const Xt of Ae.update){let lr=Ee.get(Xt.id);if(lr==null)continue;const Rr=!Xt.removeAllProperties&&(((tt=Xt.removeProperties)===null||tt===void 0?void 0:tt.length)>0||((st=Xt.addOrUpdateProperties)===null||st===void 0?void 0:st.length)>0);if((Xt.newGeometry||Xt.removeAllProperties||Rr)&&(lr=Object.assign({},lr),Ee.set(Xt.id,lr),Rr&&(lr.properties=Object.assign({},lr.properties))),Xt.newGeometry&&(lr.geometry=Xt.newGeometry),Xt.removeAllProperties)lr.properties={};else if(((Ft=Xt.removeProperties)===null||Ft===void 0?void 0:Ft.length)>0)for(const Mr of Xt.removeProperties)Object.prototype.hasOwnProperty.call(lr.properties,Mr)&&delete lr.properties[Mr];if(((Nt=Xt.addOrUpdateProperties)===null||Nt===void 0?void 0:Nt.length)>0)for(const{key:Mr,value:Sr}of Xt.addOrUpdateProperties)lr.properties[Mr]=Sr}})(this._dataUpdateable,$e.dataDiff,De),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource($e){return t._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom($e){return this._geoJSONIndex.getClusterExpansionZoom($e.clusterId)}getClusterChildren($e){return this._geoJSONIndex.getChildren($e.clusterId)}getClusterLeaves($e){return this._geoJSONIndex.getLeaves($e.clusterId,$e.limit,$e.offset)}}class Jr{constructor($e){this.self=$e,this.actor=new t.F($e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ot,De)=>{if(this.externalWorkerSourceTypes[ot])throw new Error(`Worker source with name "${ot}" already registered.`);this.externalWorkerSourceTypes[ot]=De},this.self.addProtocol=t.bi,this.self.removeProtocol=t.bj,this.self.registerRTLTextPlugin=ot=>{if(t.bD.isParsed())throw new Error("RTL text plugin already registered.");t.bD.setMethods(ot)},this.actor.registerMessageHandler("LDT",(ot,De)=>this._getDEMWorkerSource(ot,De.source).loadTile(De)),this.actor.registerMessageHandler("RDT",(ot,De)=>t._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ot,De.source).removeTile(De)})),this.actor.registerMessageHandler("GCEZ",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterExpansionZoom(De)})),this.actor.registerMessageHandler("GCC",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterChildren(De)})),this.actor.registerMessageHandler("GCL",(ot,De)=>t._(this,void 0,void 0,function*(){return this._getWorkerSource(ot,De.type,De.source).getClusterLeaves(De)})),this.actor.registerMessageHandler("LD",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).loadData(De)),this.actor.registerMessageHandler("GD",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).getData()),this.actor.registerMessageHandler("LT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).loadTile(De)),this.actor.registerMessageHandler("RT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).reloadTile(De)),this.actor.registerMessageHandler("AT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).abortTile(De)),this.actor.registerMessageHandler("RMT",(ot,De)=>this._getWorkerSource(ot,De.type,De.source).removeTile(De)),this.actor.registerMessageHandler("RS",(ot,De)=>t._(this,void 0,void 0,function*(){if(!this.workerSources[ot]||!this.workerSources[ot][De.type]||!this.workerSources[ot][De.type][De.source])return;const Ee=this.workerSources[ot][De.type][De.source];delete this.workerSources[ot][De.type][De.source],Ee.removeSource!==void 0&&Ee.removeSource(De)})),this.actor.registerMessageHandler("RM",ot=>t._(this,void 0,void 0,function*(){delete this.layerIndexes[ot],delete this.availableImages[ot],delete this.workerSources[ot],delete this.demWorkerSources[ot]})),this.actor.registerMessageHandler("SR",(ot,De)=>t._(this,void 0,void 0,function*(){this.referrer=De})),this.actor.registerMessageHandler("SRPS",(ot,De)=>this._syncRTLPluginState(ot,De)),this.actor.registerMessageHandler("IS",(ot,De)=>t._(this,void 0,void 0,function*(){this.self.importScripts(De)})),this.actor.registerMessageHandler("SI",(ot,De)=>this._setImages(ot,De)),this.actor.registerMessageHandler("UL",(ot,De)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ot).update(De.layers,De.removedIds)})),this.actor.registerMessageHandler("SL",(ot,De)=>t._(this,void 0,void 0,function*(){this._getLayerIndex(ot).replace(De)}))}_setImages($e,ot){return t._(this,void 0,void 0,function*(){this.availableImages[$e]=ot;for(const De in this.workerSources[$e]){const Ee=this.workerSources[$e][De];for(const Ae in Ee)Ee[Ae].availableImages=ot}})}_syncRTLPluginState($e,ot){return t._(this,void 0,void 0,function*(){if(t.bD.isParsed())return t.bD.getState();if(ot.pluginStatus!=="loading")return t.bD.setState(ot),ot;const De=ot.pluginURL;if(this.self.importScripts(De),t.bD.isParsed()){const Ee={pluginStatus:"loaded",pluginURL:De};return t.bD.setState(Ee),Ee}throw t.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${De}`)})}_getAvailableImages($e){let ot=this.availableImages[$e];return ot||(ot=[]),ot}_getLayerIndex($e){let ot=this.layerIndexes[$e];return ot||(ot=this.layerIndexes[$e]=new r),ot}_getWorkerSource($e,ot,De){if(this.workerSources[$e]||(this.workerSources[$e]={}),this.workerSources[$e][ot]||(this.workerSources[$e][ot]={}),!this.workerSources[$e][ot][De]){const Ee={sendAsync:(Ae,Ie)=>(Ae.targetMapId=$e,this.actor.sendAsync(Ae,Ie))};switch(ot){case"vector":this.workerSources[$e][ot][De]=new s(Ee,this._getLayerIndex($e),this._getAvailableImages($e));break;case"geojson":this.workerSources[$e][ot][De]=new Nr(Ee,this._getLayerIndex($e),this._getAvailableImages($e));break;default:this.workerSources[$e][ot][De]=new this.externalWorkerSourceTypes[ot](Ee,this._getLayerIndex($e),this._getAvailableImages($e))}}return this.workerSources[$e][ot][De]}_getDEMWorkerSource($e,ot){return this.demWorkerSources[$e]||(this.demWorkerSources[$e]={}),this.demWorkerSources[$e][ot]||(this.demWorkerSources[$e][ot]=new o),this.demWorkerSources[$e][ot]}}return t.i(self)&&(self.worker=new Jr(self)),Jr}),C("index",["exports","./shared"],function(t,r){var a="4.7.1";let l,i;const s={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Ze=>new Promise((O,fe)=>{const Re=requestAnimationFrame(O);Ze.signal.addEventListener("abort",()=>{cancelAnimationFrame(Re),fe(r.c())})}),getImageData(Ze,O=0){return this.getImageCanvasContext(Ze).getImageData(-O,-O,Ze.width+2*O,Ze.height+2*O)},getImageCanvasContext(Ze){const O=window.document.createElement("canvas"),fe=O.getContext("2d",{willReadFrequently:!0});if(!fe)throw new Error("failed to create canvas 2d context");return O.width=Ze.width,O.height=Ze.height,fe.drawImage(Ze,0,0,Ze.width,Ze.height),fe},resolveURL:Ze=>(l||(l=document.createElement("a")),l.href=Ze,l.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(i==null&&(i=matchMedia("(prefers-reduced-motion: reduce)")),i.matches)}};class o{static testProp(O){if(!o.docStyle)return O[0];for(let fe=0;fe<O.length;fe++)if(O[fe]in o.docStyle)return O[fe];return O[0]}static create(O,fe,Re){const Oe=window.document.createElement(O);return fe!==void 0&&(Oe.className=fe),Re&&Re.appendChild(Oe),Oe}static createNS(O,fe){return window.document.createElementNS(O,fe)}static disableDrag(){o.docStyle&&o.selectProp&&(o.userSelect=o.docStyle[o.selectProp],o.docStyle[o.selectProp]="none")}static enableDrag(){o.docStyle&&o.selectProp&&(o.docStyle[o.selectProp]=o.userSelect)}static setTransform(O,fe){O.style[o.transformProp]=fe}static addEventListener(O,fe,Re,Oe={}){O.addEventListener(fe,Re,"passive"in Oe?Oe:Oe.capture)}static removeEventListener(O,fe,Re,Oe={}){O.removeEventListener(fe,Re,"passive"in Oe?Oe:Oe.capture)}static suppressClickInternal(O){O.preventDefault(),O.stopPropagation(),window.removeEventListener("click",o.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",o.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",o.suppressClickInternal,!0)},0)}static getScale(O){const fe=O.getBoundingClientRect();return{x:fe.width/O.offsetWidth||1,y:fe.height/O.offsetHeight||1,boundingClientRect:fe}}static getPoint(O,fe,Re){const Oe=fe.boundingClientRect;return new r.P((Re.clientX-Oe.left)/fe.x-O.clientLeft,(Re.clientY-Oe.top)/fe.y-O.clientTop)}static mousePos(O,fe){const Re=o.getScale(O);return o.getPoint(O,Re,fe)}static touchPos(O,fe){const Re=[],Oe=o.getScale(O);for(let We=0;We<fe.length;We++)Re.push(o.getPoint(O,Oe,fe[We]));return Re}static mouseButton(O){return O.button}static remove(O){O.parentNode&&O.parentNode.removeChild(O)}}o.docStyle=typeof window<"u"&&window.document&&window.document.documentElement.style,o.selectProp=o.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),o.transformProp=o.testProp(["transform","WebkitTransform"]);const u={supported:!1,testSupport:function(Ze){!y&&h&&(m?E(Ze):d=Ze)}};let d,h,y=!1,m=!1;function E(Ze){const O=Ze.createTexture();Ze.bindTexture(Ze.TEXTURE_2D,O);try{if(Ze.texImage2D(Ze.TEXTURE_2D,0,Ze.RGBA,Ze.RGBA,Ze.UNSIGNED_BYTE,h),Ze.isContextLost())return;u.supported=!0}catch{}Ze.deleteTexture(O),y=!0}var c;typeof document<"u"&&(h=document.createElement("img"),h.onload=()=>{d&&E(d),d=null,m=!0},h.onerror=()=>{y=!0,d=null},h.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(Ze){let O,fe,Re,Oe;Ze.resetRequestQueue=()=>{O=[],fe=0,Re=0,Oe={}},Ze.addThrottleControl=rr=>{const Tr=Re++;return Oe[Tr]=rr,Tr},Ze.removeThrottleControl=rr=>{delete Oe[rr],Mt()},Ze.getImage=(rr,Tr,zr=!0)=>new Promise((qr,pn)=>{u.supported&&(rr.headers||(rr.headers={}),rr.headers.accept="image/webp,*/*"),r.e(rr,{type:"image"}),O.push({abortController:Tr,requestParameters:rr,supportImageRefresh:zr,state:"queued",onError:Dn=>{pn(Dn)},onSuccess:Dn=>{qr(Dn)}}),Mt()});const We=rr=>r._(this,void 0,void 0,function*(){rr.state="running";const{requestParameters:Tr,supportImageRefresh:zr,onError:qr,onSuccess:pn,abortController:Dn}=rr,nt=zr===!1&&!r.i(self)&&!r.g(Tr.url)&&(!Tr.headers||Object.keys(Tr.headers).reduce((kt,Ht)=>kt&&Ht==="accept",!0));fe++;const ut=nt?zt(Tr,Dn):r.m(Tr,Dn);try{const kt=yield ut;delete rr.abortController,rr.state="completed",kt.data instanceof HTMLImageElement||r.b(kt.data)?pn(kt):kt.data&&pn({data:yield(wt=kt.data,typeof createImageBitmap=="function"?r.d(wt):r.f(wt)),cacheControl:kt.cacheControl,expires:kt.expires})}catch(kt){delete rr.abortController,qr(kt)}finally{fe--,Mt()}var wt}),Mt=()=>{const rr=(()=>{for(const Tr of Object.keys(Oe))if(Oe[Tr]())return!0;return!1})()?r.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:r.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Tr=fe;Tr<rr&&O.length>0;Tr++){const zr=O.shift();zr.abortController.signal.aborted?Tr--:We(zr)}},zt=(rr,Tr)=>new Promise((zr,qr)=>{const pn=new Image,Dn=rr.url,nt=rr.credentials;nt&&nt==="include"?pn.crossOrigin="use-credentials":(nt&&nt==="same-origin"||!r.s(Dn))&&(pn.crossOrigin="anonymous"),Tr.signal.addEventListener("abort",()=>{pn.src="",qr(r.c())}),pn.fetchPriority="high",pn.onload=()=>{pn.onerror=pn.onload=null,zr({data:pn})},pn.onerror=()=>{pn.onerror=pn.onload=null,Tr.signal.aborted||qr(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},pn.src=Dn})})(c||(c={})),c.resetRequestQueue();class _{constructor(O){this._transformRequestFn=O}transformRequest(O,fe){return this._transformRequestFn&&this._transformRequestFn(O,fe)||{url:O}}setTransformRequest(O){this._transformRequestFn=O}}function T(Ze){var O=new r.A(3);return O[0]=Ze[0],O[1]=Ze[1],O[2]=Ze[2],O}var M,k=function(Ze,O,fe){return Ze[0]=O[0]-fe[0],Ze[1]=O[1]-fe[1],Ze[2]=O[2]-fe[2],Ze};M=new r.A(3),r.A!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0);var b=function(Ze){var O=Ze[0],fe=Ze[1];return O*O+fe*fe};function A(Ze){const O=[];if(typeof Ze=="string")O.push({id:"default",url:Ze});else if(Ze&&Ze.length>0){const fe=[];for(const{id:Re,url:Oe}of Ze){const We=`${Re}${Oe}`;fe.indexOf(We)===-1&&(fe.push(We),O.push({id:Re,url:Oe}))}}return O}function g(Ze,O,fe){const Re=Ze.split("?");return Re[0]+=`${O}${fe}`,Re.join("?")}(function(){var Ze=new r.A(2);r.A!=Float32Array&&(Ze[0]=0,Ze[1]=0)})();class f{constructor(O,fe,Re,Oe){this.context=O,this.format=Re,this.texture=O.gl.createTexture(),this.update(fe,Oe)}update(O,fe,Re){const{width:Oe,height:We}=O,Mt=!(this.size&&this.size[0]===Oe&&this.size[1]===We||Re),{context:zt}=this,{gl:rr}=zt;if(this.useMipmap=!!(fe&&fe.useMipmap),rr.bindTexture(rr.TEXTURE_2D,this.texture),zt.pixelStoreUnpackFlipY.set(!1),zt.pixelStoreUnpack.set(1),zt.pixelStoreUnpackPremultiplyAlpha.set(this.format===rr.RGBA&&(!fe||fe.premultiply!==!1)),Mt)this.size=[Oe,We],O instanceof HTMLImageElement||O instanceof HTMLCanvasElement||O instanceof HTMLVideoElement||O instanceof ImageData||r.b(O)?rr.texImage2D(rr.TEXTURE_2D,0,this.format,this.format,rr.UNSIGNED_BYTE,O):rr.texImage2D(rr.TEXTURE_2D,0,this.format,Oe,We,0,this.format,rr.UNSIGNED_BYTE,O.data);else{const{x:Tr,y:zr}=Re||{x:0,y:0};O instanceof HTMLImageElement||O instanceof HTMLCanvasElement||O instanceof HTMLVideoElement||O instanceof ImageData||r.b(O)?rr.texSubImage2D(rr.TEXTURE_2D,0,Tr,zr,rr.RGBA,rr.UNSIGNED_BYTE,O):rr.texSubImage2D(rr.TEXTURE_2D,0,Tr,zr,Oe,We,rr.RGBA,rr.UNSIGNED_BYTE,O.data)}this.useMipmap&&this.isSizePowerOfTwo()&&rr.generateMipmap(rr.TEXTURE_2D)}bind(O,fe,Re){const{context:Oe}=this,{gl:We}=Oe;We.bindTexture(We.TEXTURE_2D,this.texture),Re!==We.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Re=We.LINEAR),O!==this.filter&&(We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MAG_FILTER,O),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MIN_FILTER,Re||O),this.filter=O),fe!==this.wrap&&(We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_S,fe),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_T,fe),this.wrap=fe)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){const{gl:O}=this.context;O.deleteTexture(this.texture),this.texture=null}}function p(Ze){const{userImage:O}=Ze;return!!(O&&O.render&&O.render())&&(Ze.data.replace(new Uint8Array(O.data.buffer)),!0)}class x extends r.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new r.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(O){if(this.loaded!==O&&(this.loaded=O,O)){for(const{ids:fe,promiseResolve:Re}of this.requestors)Re(this._getImagesForIds(fe));this.requestors=[]}}getImage(O){const fe=this.images[O];if(fe&&!fe.data&&fe.spriteData){const Re=fe.spriteData;fe.data=new r.R({width:Re.width,height:Re.height},Re.context.getImageData(Re.x,Re.y,Re.width,Re.height).data),fe.spriteData=null}return fe}addImage(O,fe){if(this.images[O])throw new Error(`Image id ${O} already exist, use updateImage instead`);this._validate(O,fe)&&(this.images[O]=fe)}_validate(O,fe){let Re=!0;const Oe=fe.data||fe.spriteData;return this._validateStretch(fe.stretchX,Oe&&Oe.width)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "stretchX" value`))),Re=!1),this._validateStretch(fe.stretchY,Oe&&Oe.height)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "stretchY" value`))),Re=!1),this._validateContent(fe.content,fe)||(this.fire(new r.j(new Error(`Image "${O}" has invalid "content" value`))),Re=!1),Re}_validateStretch(O,fe){if(!O)return!0;let Re=0;for(const Oe of O){if(Oe[0]<Re||Oe[1]<Oe[0]||fe<Oe[1])return!1;Re=Oe[1]}return!0}_validateContent(O,fe){if(!O)return!0;if(O.length!==4)return!1;const Re=fe.spriteData,Oe=Re&&Re.width||fe.data.width,We=Re&&Re.height||fe.data.height;return!(O[0]<0||Oe<O[0]||O[1]<0||We<O[1]||O[2]<0||Oe<O[2]||O[3]<0||We<O[3]||O[2]<O[0]||O[3]<O[1])}updateImage(O,fe,Re=!0){const Oe=this.getImage(O);if(Re&&(Oe.data.width!==fe.data.width||Oe.data.height!==fe.data.height))throw new Error(`size mismatch between old image (${Oe.data.width}x${Oe.data.height}) and new image (${fe.data.width}x${fe.data.height}).`);fe.version=Oe.version+1,this.images[O]=fe,this.updatedImages[O]=!0}removeImage(O){const fe=this.images[O];delete this.images[O],delete this.patterns[O],fe.userImage&&fe.userImage.onRemove&&fe.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(O){return new Promise((fe,Re)=>{let Oe=!0;if(!this.isLoaded())for(const We of O)this.images[We]||(Oe=!1);this.isLoaded()||Oe?fe(this._getImagesForIds(O)):this.requestors.push({ids:O,promiseResolve:fe})})}_getImagesForIds(O){const fe={};for(const Re of O){let Oe=this.getImage(Re);Oe||(this.fire(new r.k("styleimagemissing",{id:Re})),Oe=this.getImage(Re)),Oe?fe[Re]={data:Oe.data.clone(),pixelRatio:Oe.pixelRatio,sdf:Oe.sdf,version:Oe.version,stretchX:Oe.stretchX,stretchY:Oe.stretchY,content:Oe.content,textFitWidth:Oe.textFitWidth,textFitHeight:Oe.textFitHeight,hasRenderCallback:!!(Oe.userImage&&Oe.userImage.render)}:r.w(`Image "${Re}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return fe}getPixelSize(){const{width:O,height:fe}=this.atlasImage;return{width:O,height:fe}}getPattern(O){const fe=this.patterns[O],Re=this.getImage(O);if(!Re)return null;if(fe&&fe.position.version===Re.version)return fe.position;if(fe)fe.position.version=Re.version;else{const Oe={w:Re.data.width+2,h:Re.data.height+2,x:0,y:0},We=new r.I(Oe,Re);this.patterns[O]={bin:Oe,position:We}}return this._updatePatternAtlas(),this.patterns[O].position}bind(O){const fe=O.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new f(O,this.atlasImage,fe.RGBA),this.atlasTexture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE)}_updatePatternAtlas(){const O=[];for(const We in this.patterns)O.push(this.patterns[We].bin);const{w:fe,h:Re}=r.p(O),Oe=this.atlasImage;Oe.resize({width:fe||1,height:Re||1});for(const We in this.patterns){const{bin:Mt}=this.patterns[We],zt=Mt.x+1,rr=Mt.y+1,Tr=this.getImage(We).data,zr=Tr.width,qr=Tr.height;r.R.copy(Tr,Oe,{x:0,y:0},{x:zt,y:rr},{width:zr,height:qr}),r.R.copy(Tr,Oe,{x:0,y:qr-1},{x:zt,y:rr-1},{width:zr,height:1}),r.R.copy(Tr,Oe,{x:0,y:0},{x:zt,y:rr+qr},{width:zr,height:1}),r.R.copy(Tr,Oe,{x:zr-1,y:0},{x:zt-1,y:rr},{width:1,height:qr}),r.R.copy(Tr,Oe,{x:0,y:0},{x:zt+zr,y:rr},{width:1,height:qr})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(O){for(const fe of O){if(this.callbackDispatchedThisFrame[fe])continue;this.callbackDispatchedThisFrame[fe]=!0;const Re=this.getImage(fe);Re||r.w(`Image with ID: "${fe}" was not found`),p(Re)&&this.updateImage(fe,Re)}}}const N=1e20;function D(Ze,O,fe,Re,Oe,We,Mt,zt,rr){for(let Tr=O;Tr<O+Re;Tr++)B(Ze,fe*We+Tr,We,Oe,Mt,zt,rr);for(let Tr=fe;Tr<fe+Oe;Tr++)B(Ze,Tr*We+O,1,Re,Mt,zt,rr)}function B(Ze,O,fe,Re,Oe,We,Mt){We[0]=0,Mt[0]=-N,Mt[1]=N,Oe[0]=Ze[O];for(let zt=1,rr=0,Tr=0;zt<Re;zt++){Oe[zt]=Ze[O+zt*fe];const zr=zt*zt;do{const qr=We[rr];Tr=(Oe[zt]-Oe[qr]+zr-qr*qr)/(zt-qr)/2}while(Tr<=Mt[rr]&&--rr>-1);rr++,We[rr]=zt,Mt[rr]=Tr,Mt[rr+1]=N}for(let zt=0,rr=0;zt<Re;zt++){for(;Mt[rr+1]<zt;)rr++;const Tr=We[rr],zr=zt-Tr;Ze[O+zt*fe]=Oe[Tr]+zr*zr}}class U{constructor(O,fe){this.requestManager=O,this.localIdeographFontFamily=fe,this.entries={}}setURL(O){this.url=O}getGlyphs(O){return r._(this,void 0,void 0,function*(){const fe=[];for(const We in O)for(const Mt of O[We])fe.push(this._getAndCacheGlyphsPromise(We,Mt));const Re=yield Promise.all(fe),Oe={};for(const{stack:We,id:Mt,glyph:zt}of Re)Oe[We]||(Oe[We]={}),Oe[We][Mt]=zt&&{id:zt.id,bitmap:zt.bitmap.clone(),metrics:zt.metrics};return Oe})}_getAndCacheGlyphsPromise(O,fe){return r._(this,void 0,void 0,function*(){let Re=this.entries[O];Re||(Re=this.entries[O]={glyphs:{},requests:{},ranges:{}});let Oe=Re.glyphs[fe];if(Oe!==void 0)return{stack:O,id:fe,glyph:Oe};if(Oe=this._tinySDF(Re,O,fe),Oe)return Re.glyphs[fe]=Oe,{stack:O,id:fe,glyph:Oe};const We=Math.floor(fe/256);if(256*We>65535)throw new Error("glyphs > 65535 not supported");if(Re.ranges[We])return{stack:O,id:fe,glyph:Oe};if(!this.url)throw new Error("glyphsUrl is not set");if(!Re.requests[We]){const zt=U.loadGlyphRange(O,We,this.url,this.requestManager);Re.requests[We]=zt}const Mt=yield Re.requests[We];for(const zt in Mt)this._doesCharSupportLocalGlyph(+zt)||(Re.glyphs[+zt]=Mt[+zt]);return Re.ranges[We]=!0,{stack:O,id:fe,glyph:Mt[fe]||null}})}_doesCharSupportLocalGlyph(O){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(O))}_tinySDF(O,fe,Re){const Oe=this.localIdeographFontFamily;if(!Oe||!this._doesCharSupportLocalGlyph(Re))return;let We=O.tinySDF;if(!We){let zt="400";/bold/i.test(fe)?zt="900":/medium/i.test(fe)?zt="500":/light/i.test(fe)&&(zt="200"),We=O.tinySDF=new U.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:Oe,fontWeight:zt})}const Mt=We.draw(String.fromCharCode(Re));return{id:Re,bitmap:new r.o({width:Mt.width||60,height:Mt.height||60},Mt.data),metrics:{width:Mt.glyphWidth/2||24,height:Mt.glyphHeight/2||24,left:Mt.glyphLeft/2+.5||0,top:Mt.glyphTop/2-27.5||-8,advance:Mt.glyphAdvance/2||24,isDoubleResolution:!0}}}}U.loadGlyphRange=function(Ze,O,fe,Re){return r._(this,void 0,void 0,function*(){const Oe=256*O,We=Oe+255,Mt=Re.transformRequest(fe.replace("{fontstack}",Ze).replace("{range}",`${Oe}-${We}`),"Glyphs"),zt=yield r.l(Mt,new AbortController);if(!zt||!zt.data)throw new Error(`Could not load glyph range. range: ${O}, ${Oe}-${We}`);const rr={};for(const Tr of r.n(zt.data))rr[Tr.id]=Tr;return rr})},U.TinySDF=class{constructor({fontSize:Ze=24,buffer:O=3,radius:fe=8,cutoff:Re=.25,fontFamily:Oe="sans-serif",fontWeight:We="normal",fontStyle:Mt="normal"}={}){this.buffer=O,this.cutoff=Re,this.radius=fe;const zt=this.size=Ze+4*O,rr=this._createCanvas(zt),Tr=this.ctx=rr.getContext("2d",{willReadFrequently:!0});Tr.font=`${Mt} ${We} ${Ze}px ${Oe}`,Tr.textBaseline="alphabetic",Tr.textAlign="left",Tr.fillStyle="black",this.gridOuter=new Float64Array(zt*zt),this.gridInner=new Float64Array(zt*zt),this.f=new Float64Array(zt),this.z=new Float64Array(zt+1),this.v=new Uint16Array(zt)}_createCanvas(Ze){const O=document.createElement("canvas");return O.width=O.height=Ze,O}draw(Ze){const{width:O,actualBoundingBoxAscent:fe,actualBoundingBoxDescent:Re,actualBoundingBoxLeft:Oe,actualBoundingBoxRight:We}=this.ctx.measureText(Ze),Mt=Math.ceil(fe),zt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(We-Oe))),rr=Math.min(this.size-this.buffer,Mt+Math.ceil(Re)),Tr=zt+2*this.buffer,zr=rr+2*this.buffer,qr=Math.max(Tr*zr,0),pn=new Uint8ClampedArray(qr),Dn={data:pn,width:Tr,height:zr,glyphWidth:zt,glyphHeight:rr,glyphTop:Mt,glyphLeft:0,glyphAdvance:O};if(zt===0||rr===0)return Dn;const{ctx:nt,buffer:ut,gridInner:wt,gridOuter:kt}=this;nt.clearRect(ut,ut,zt,rr),nt.fillText(Ze,ut,ut+Mt);const Ht=nt.getImageData(ut,ut,zt,rr);kt.fill(N,0,qr),wt.fill(0,0,qr);for(let Ot=0;Ot<rr;Ot++)for(let Kt=0;Kt<zt;Kt++){const Cr=Ht.data[4*(Ot*zt+Kt)+3]/255;if(Cr===0)continue;const Or=(Ot+ut)*Tr+Kt+ut;if(Cr===1)kt[Or]=0,wt[Or]=N;else{const Vr=.5-Cr;kt[Or]=Vr>0?Vr*Vr:0,wt[Or]=Vr<0?Vr*Vr:0}}D(kt,0,0,Tr,zr,Tr,this.f,this.v,this.z),D(wt,ut,ut,zt,rr,Tr,this.f,this.v,this.z);for(let Ot=0;Ot<qr;Ot++){const Kt=Math.sqrt(kt[Ot])-Math.sqrt(wt[Ot]);pn[Ot]=Math.round(255-255*(Kt/this.radius+this.cutoff))}return Dn}};class V{constructor(){this.specification=r.v.light.position}possiblyEvaluate(O,fe){return r.x(O.expression.evaluate(fe))}interpolate(O,fe,Re){return{x:r.y.number(O.x,fe.x,Re),y:r.y.number(O.y,fe.y,Re),z:r.y.number(O.z,fe.z,Re)}}}let q;class z extends r.E{constructor(O){super(),q=q||new r.q({anchor:new r.D(r.v.light.anchor),position:new V,color:new r.D(r.v.light.color),intensity:new r.D(r.v.light.intensity)}),this._transitionable=new r.T(q),this.setLight(O),this._transitioning=this._transitionable.untransitioned()}getLight(){return this._transitionable.serialize()}setLight(O,fe={}){if(!this._validate(r.r,O,fe))for(const Re in O){const Oe=O[Re];Re.endsWith("-transition")?this._transitionable.setTransition(Re.slice(0,-11),Oe):this._transitionable.setValue(Re,Oe)}}updateTransitions(O){this._transitioning=this._transitionable.transitioned(O,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(O){this.properties=this._transitioning.possiblyEvaluate(O)}_validate(O,fe,Re){return(!Re||Re.validate!==!1)&&r.t(this,O.call(r.u,{value:fe,style:{glyphs:!0,sprite:!0},styleSpec:r.v}))}}const H=new r.q({"sky-color":new r.D(r.v.sky["sky-color"]),"horizon-color":new r.D(r.v.sky["horizon-color"]),"fog-color":new r.D(r.v.sky["fog-color"]),"fog-ground-blend":new r.D(r.v.sky["fog-ground-blend"]),"horizon-fog-blend":new r.D(r.v.sky["horizon-fog-blend"]),"sky-horizon-blend":new r.D(r.v.sky["sky-horizon-blend"]),"atmosphere-blend":new r.D(r.v.sky["atmosphere-blend"])});class G extends r.E{constructor(O){super(),this._transitionable=new r.T(H),this.setSky(O),this._transitioning=this._transitionable.untransitioned(),this.recalculate(new r.z(0))}setSky(O,fe={}){if(!this._validate(r.B,O,fe)){O||(O={"sky-color":"transparent","horizon-color":"transparent","fog-color":"transparent","fog-ground-blend":1,"atmosphere-blend":0});for(const Re in O){const Oe=O[Re];Re.endsWith("-transition")?this._transitionable.setTransition(Re.slice(0,-11),Oe):this._transitionable.setValue(Re,Oe)}}}getSky(){return this._transitionable.serialize()}updateTransitions(O){this._transitioning=this._transitionable.transitioned(O,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()}recalculate(O){this.properties=this._transitioning.possiblyEvaluate(O)}_validate(O,fe,Re={}){return Re?.validate!==!1&&r.t(this,O.call(r.u,r.e({value:fe,style:{glyphs:!0,sprite:!0},styleSpec:r.v})))}calculateFogBlendOpacity(O){return O<60?0:O<70?(O-60)/10:1}}class J{constructor(O,fe){this.width=O,this.height=fe,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}}getDash(O,fe){const Re=O.join(",")+String(fe);return this.dashEntry[Re]||(this.dashEntry[Re]=this.addDash(O,fe)),this.dashEntry[Re]}getDashRanges(O,fe,Re){const Oe=[];let We=O.length%2==1?-O[O.length-1]*Re:0,Mt=O[0]*Re,zt=!0;Oe.push({left:We,right:Mt,isDash:zt,zeroLength:O[0]===0});let rr=O[0];for(let Tr=1;Tr<O.length;Tr++){zt=!zt;const zr=O[Tr];We=rr*Re,rr+=zr,Mt=rr*Re,Oe.push({left:We,right:Mt,isDash:zt,zeroLength:zr===0})}return Oe}addRoundDash(O,fe,Re){const Oe=fe/2;for(let We=-Re;We<=Re;We++){const Mt=this.width*(this.nextRow+Re+We);let zt=0,rr=O[zt];for(let Tr=0;Tr<this.width;Tr++){Tr/rr.right>1&&(rr=O[++zt]);const zr=Math.abs(Tr-rr.left),qr=Math.abs(Tr-rr.right),pn=Math.min(zr,qr);let Dn;const nt=We/Re*(Oe+1);if(rr.isDash){const ut=Oe-Math.abs(nt);Dn=Math.sqrt(pn*pn+ut*ut)}else Dn=Oe-Math.sqrt(pn*pn+nt*nt);this.data[Mt+Tr]=Math.max(0,Math.min(255,Dn+128))}}}addRegularDash(O){for(let zt=O.length-1;zt>=0;--zt){const rr=O[zt],Tr=O[zt+1];rr.zeroLength?O.splice(zt,1):Tr&&Tr.isDash===rr.isDash&&(Tr.left=rr.left,O.splice(zt,1))}const fe=O[0],Re=O[O.length-1];fe.isDash===Re.isDash&&(fe.left=Re.left-this.width,Re.right=fe.right+this.width);const Oe=this.width*this.nextRow;let We=0,Mt=O[We];for(let zt=0;zt<this.width;zt++){zt/Mt.right>1&&(Mt=O[++We]);const rr=Math.abs(zt-Mt.left),Tr=Math.abs(zt-Mt.right),zr=Math.min(rr,Tr);this.data[Oe+zt]=Math.max(0,Math.min(255,(Mt.isDash?zr:-zr)+128))}}addDash(O,fe){const Re=fe?7:0,Oe=2*Re+1;if(this.nextRow+Oe>this.height)return r.w("LineAtlas out of space"),null;let We=0;for(let zt=0;zt<O.length;zt++)We+=O[zt];if(We!==0){const zt=this.width/We,rr=this.getDashRanges(O,this.width,zt);fe?this.addRoundDash(rr,zt,Re):this.addRegularDash(rr)}const Mt={y:(this.nextRow+Re+.5)/this.height,height:2*Re/this.height,width:We};return this.nextRow+=Oe,this.dirty=!0,Mt}bind(O){const fe=O.gl;this.texture?(fe.bindTexture(fe.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,fe.texSubImage2D(fe.TEXTURE_2D,0,0,0,this.width,this.height,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))):(this.texture=fe.createTexture(),fe.bindTexture(fe.TEXTURE_2D,this.texture),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_S,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_WRAP_T,fe.REPEAT),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MIN_FILTER,fe.LINEAR),fe.texParameteri(fe.TEXTURE_2D,fe.TEXTURE_MAG_FILTER,fe.LINEAR),fe.texImage2D(fe.TEXTURE_2D,0,fe.ALPHA,this.width,this.height,0,fe.ALPHA,fe.UNSIGNED_BYTE,this.data))}}const le="maplibre_preloaded_worker_pool";class ye{constructor(){this.active={}}acquire(O){if(!this.workers)for(this.workers=[];this.workers.length<ye.workerCount;)this.workers.push(new Worker(r.a.WORKER_URL));return this.active[O]=!0,this.workers.slice()}release(O){delete this.active[O],this.numActive()===0&&(this.workers.forEach(fe=>{fe.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[le]}numActive(){return Object.keys(this.active).length}}const de=Math.floor(s.hardwareConcurrency/2);let me,W;function ie(){return me||(me=new ye),me}ye.workerCount=r.C(globalThis)?Math.max(Math.min(de,3),1):1;class se{constructor(O,fe){this.workerPool=O,this.actors=[],this.currentActor=0,this.id=fe;const Re=this.workerPool.acquire(fe);for(let Oe=0;Oe<Re.length;Oe++){const We=new r.F(Re[Oe],fe);We.name=`Worker ${Oe}`,this.actors.push(We)}if(!this.actors.length)throw new Error("No actors found")}broadcast(O,fe){const Re=[];for(const Oe of this.actors)Re.push(Oe.sendAsync({type:O,data:fe}));return Promise.all(Re)}getActor(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]}remove(O=!0){this.actors.forEach(fe=>{fe.remove()}),this.actors=[],O&&this.workerPool.release(this.id)}registerMessageHandler(O,fe){for(const Re of this.actors)Re.registerMessageHandler(O,fe)}}function ee(){return W||(W=new se(ie(),r.G),W.registerMessageHandler("GR",(Ze,O,fe)=>r.m(O,fe))),W}function pe(Ze,O){const fe=r.H();return r.J(fe,fe,[1,1,0]),r.K(fe,fe,[.5*Ze.width,.5*Ze.height,1]),r.L(fe,fe,Ze.calculatePosMatrix(O.toUnwrapped()))}function oe(Ze,O,fe,Re,Oe,We){const Mt=(function(qr,pn,Dn){if(qr)for(const nt of qr){const ut=pn[nt];if(ut&&ut.source===Dn&&ut.type==="fill-extrusion")return!0}else for(const nt in pn){const ut=pn[nt];if(ut.source===Dn&&ut.type==="fill-extrusion")return!0}return!1})(Oe&&Oe.layers,O,Ze.id),zt=We.maxPitchScaleFactor(),rr=Ze.tilesIn(Re,zt,Mt);rr.sort(Y);const Tr=[];for(const qr of rr)Tr.push({wrappedTileID:qr.tileID.wrapped().key,queryResults:qr.tile.queryRenderedFeatures(O,fe,Ze._state,qr.queryGeometry,qr.cameraQueryGeometry,qr.scale,Oe,We,zt,pe(Ze.transform,qr.tileID))});const zr=(function(qr){const pn={},Dn={};for(const nt of qr){const ut=nt.queryResults,wt=nt.wrappedTileID,kt=Dn[wt]=Dn[wt]||{};for(const Ht in ut){const Ot=ut[Ht],Kt=kt[Ht]=kt[Ht]||{},Cr=pn[Ht]=pn[Ht]||[];for(const Or of Ot)Kt[Or.featureIndex]||(Kt[Or.featureIndex]=!0,Cr.push(Or))}}return pn})(Tr);for(const qr in zr)zr[qr].forEach(pn=>{const Dn=pn.feature,nt=Ze.getFeatureState(Dn.layer["source-layer"],Dn.id);Dn.source=Dn.layer.source,Dn.layer["source-layer"]&&(Dn.sourceLayer=Dn.layer["source-layer"]),Dn.state=nt});return zr}function Y(Ze,O){const fe=Ze.tileID,Re=O.tileID;return fe.overscaledZ-Re.overscaledZ||fe.canonical.y-Re.canonical.y||fe.wrap-Re.wrap||fe.canonical.x-Re.canonical.x}function ce(Ze,O,fe){return r._(this,void 0,void 0,function*(){let Re=Ze;if(Ze.url?Re=(yield r.h(O.transformRequest(Ze.url,"Source"),fe)).data:yield s.frameAsync(fe),!Re)return null;const Oe=r.M(r.e(Re,Ze),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in Re&&Re.vector_layers&&(Oe.vectorLayerIds=Re.vector_layers.map(We=>We.id)),Oe})}class ue{constructor(O,fe){O&&(fe?this.setSouthWest(O).setNorthEast(fe):Array.isArray(O)&&(O.length===4?this.setSouthWest([O[0],O[1]]).setNorthEast([O[2],O[3]]):this.setSouthWest(O[0]).setNorthEast(O[1])))}setNorthEast(O){return this._ne=O instanceof r.N?new r.N(O.lng,O.lat):r.N.convert(O),this}setSouthWest(O){return this._sw=O instanceof r.N?new r.N(O.lng,O.lat):r.N.convert(O),this}extend(O){const fe=this._sw,Re=this._ne;let Oe,We;if(O instanceof r.N)Oe=O,We=O;else{if(!(O instanceof ue))return Array.isArray(O)?O.length===4||O.every(Array.isArray)?this.extend(ue.convert(O)):this.extend(r.N.convert(O)):O&&("lng"in O||"lon"in O)&&"lat"in O?this.extend(r.N.convert(O)):this;if(Oe=O._sw,We=O._ne,!Oe||!We)return this}return fe||Re?(fe.lng=Math.min(Oe.lng,fe.lng),fe.lat=Math.min(Oe.lat,fe.lat),Re.lng=Math.max(We.lng,Re.lng),Re.lat=Math.max(We.lat,Re.lat)):(this._sw=new r.N(Oe.lng,Oe.lat),this._ne=new r.N(We.lng,We.lat)),this}getCenter(){return new r.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new r.N(this.getWest(),this.getNorth())}getSouthEast(){return new r.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(O){const{lng:fe,lat:Re}=r.N.convert(O);let Oe=this._sw.lng<=fe&&fe<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Oe=this._sw.lng>=fe&&fe>=this._ne.lng),this._sw.lat<=Re&&Re<=this._ne.lat&&Oe}static convert(O){return O instanceof ue?O:O&&new ue(O)}static fromLngLat(O,fe=0){const Re=360*fe/40075017,Oe=Re/Math.cos(Math.PI/180*O.lat);return new ue(new r.N(O.lng-Oe,O.lat-Re),new r.N(O.lng+Oe,O.lat+Re))}adjustAntiMeridian(){const O=new r.N(this._sw.lng,this._sw.lat),fe=new r.N(this._ne.lng,this._ne.lat);return new ue(O,O.lng>fe.lng?new r.N(fe.lng+360,fe.lat):fe)}}class _e{constructor(O,fe,Re){this.bounds=ue.convert(this.validateBounds(O)),this.minzoom=fe||0,this.maxzoom=Re||24}validateBounds(O){return Array.isArray(O)&&O.length===4?[Math.max(-180,O[0]),Math.max(-90,O[1]),Math.min(180,O[2]),Math.min(90,O[3])]:[-180,-90,180,90]}contains(O){const fe=Math.pow(2,O.z),Re=Math.floor(r.O(this.bounds.getWest())*fe),Oe=Math.floor(r.Q(this.bounds.getNorth())*fe),We=Math.ceil(r.O(this.bounds.getEast())*fe),Mt=Math.ceil(r.Q(this.bounds.getSouth())*fe);return O.x>=Re&&O.x<We&&O.y>=Oe&&O.y<Mt}}class Le extends r.E{constructor(O,fe,Re,Oe){if(super(),this.id=O,this.dispatcher=Re,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,r.e(this,r.M(fe,["url","scheme","tileSize","promoteId"])),this._options=r.e({type:"vector"},fe),this._collectResourceTiming=fe.collectResourceTiming,this.tileSize!==512)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Oe)}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const O=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,this.map.style.sourceCaches[this.id].clearTiles(),O&&(r.e(this,O),O.bounds&&(this.tileBounds=new _e(O.bounds,this.minzoom,this.maxzoom)),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})))}catch(O){this._tileJSONRequest=null,this.fire(new r.j(O))}})}loaded(){return this._loaded}hasTile(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)}onAdd(O){this.map=O,this.load()}setSourceProperty(O){this._tileJSONRequest&&this._tileJSONRequest.abort(),O(),this.load()}setTiles(O){return this.setSourceProperty(()=>{this._options.tiles=O}),this}setUrl(O){return this.setSourceProperty(()=>{this.url=O,this._options.url=O}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return r.e({},this._options)}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Re={request:this.map._requestManager.transformRequest(fe,"Tile"),uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,tileSize:this.tileSize*O.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Re.request.collectResourceTiming=this._collectResourceTiming;let Oe="RT";if(O.actor&&O.state!=="expired"){if(O.state==="loading")return new Promise((We,Mt)=>{O.reloadPromise={resolve:We,reject:Mt}})}else O.actor=this.dispatcher.getActor(),Oe="LT";O.abortController=new AbortController;try{const We=yield O.actor.sendAsync({type:Oe,data:Re},O.abortController);if(delete O.abortController,O.aborted)return;this._afterTileLoadWorkerResponse(O,We)}catch(We){if(delete O.abortController,O.aborted)return;if(We&&We.status!==404)throw We;this._afterTileLoadWorkerResponse(O,null)}})}_afterTileLoadWorkerResponse(O,fe){if(fe&&fe.resourceTiming&&(O.resourceTiming=fe.resourceTiming),fe&&this.map._refreshExpiredTiles&&O.setExpiryData(fe),O.loadVectorData(fe,this.map.painter),O.reloadPromise){const Re=O.reloadPromise;O.reloadPromise=null,this.loadTile(O).then(Re.resolve).catch(Re.reject)}}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController),O.actor&&(yield O.actor.sendAsync({type:"AT",data:{uid:O.uid,type:this.type,source:this.id}}))})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.unloadVectorData(),O.actor&&(yield O.actor.sendAsync({type:"RMT",data:{uid:O.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ze extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.dispatcher=Re,this.setEventedParent(Oe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=r.e({type:"raster"},fe),r.e(this,r.M(fe,["url","scheme","tileSize"]))}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{const O=yield ce(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,O&&(r.e(this,O),O.bounds&&(this.tileBounds=new _e(O.bounds,this.minzoom,this.maxzoom)),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})))}catch(O){this._tileJSONRequest=null,this.fire(new r.j(O))}})}loaded(){return this._loaded}onAdd(O){this.map=O,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(O){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),O(),this.load()}setTiles(O){return this.setSourceProperty(()=>{this._options.tiles=O}),this}setUrl(O){return this.setSourceProperty(()=>{this.url=O,this._options.url=O}),this}serialize(){return r.e({},this._options)}hasTile(O){return!this.tileBounds||this.tileBounds.contains(O.canonical)}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);O.abortController=new AbortController;try{const Re=yield c.getImage(this.map._requestManager.transformRequest(fe,"Tile"),O.abortController,this.map._refreshExpiredTiles);if(delete O.abortController,O.aborted)return void(O.state="unloaded");if(Re&&Re.data){this.map._refreshExpiredTiles&&Re.cacheControl&&Re.expires&&O.setExpiryData({cacheControl:Re.cacheControl,expires:Re.expires});const Oe=this.map.painter.context,We=Oe.gl,Mt=Re.data;O.texture=this.map.painter.getTileTexture(Mt.width),O.texture?O.texture.update(Mt,{useMipmap:!0}):(O.texture=new f(Oe,Mt,We.RGBA,{useMipmap:!0}),O.texture.bind(We.LINEAR,We.CLAMP_TO_EDGE,We.LINEAR_MIPMAP_NEAREST)),O.state="loaded"}}catch(Re){if(delete O.abortController,O.aborted)O.state="unloaded";else if(Re)throw O.state="errored",Re}})}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController)})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.texture&&this.map.painter.saveTileTexture(O.texture)})}hasTransition(){return!1}}class Ge extends ze{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),this.type="raster-dem",this.maxzoom=22,this._options=r.e({type:"raster-dem"},fe),this.encoding=fe.encoding||"mapbox",this.redFactor=fe.redFactor,this.greenFactor=fe.greenFactor,this.blueFactor=fe.blueFactor,this.baseShift=fe.baseShift}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),Re=this.map._requestManager.transformRequest(fe,"Tile");O.neighboringTiles=this._getNeighboringTiles(O.tileID),O.abortController=new AbortController;try{const Oe=yield c.getImage(Re,O.abortController,this.map._refreshExpiredTiles);if(delete O.abortController,O.aborted)return void(O.state="unloaded");if(Oe&&Oe.data){const We=Oe.data;this.map._refreshExpiredTiles&&Oe.cacheControl&&Oe.expires&&O.setExpiryData({cacheControl:Oe.cacheControl,expires:Oe.expires});const Mt=r.b(We)&&r.U()?We:yield this.readImageNow(We),zt={type:this.type,uid:O.uid,source:this.id,rawImageData:Mt,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!O.actor||O.state==="expired"){O.actor=this.dispatcher.getActor();const rr=yield O.actor.sendAsync({type:"LDT",data:zt});O.dem=rr,O.needsHillshadePrepare=!0,O.needsTerrainPrepare=!0,O.state="loaded"}}}catch(Oe){if(delete O.abortController,O.aborted)O.state="unloaded";else if(Oe)throw O.state="errored",Oe}})}readImageNow(O){return r._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&r.V()){const fe=O.width+2,Re=O.height+2;try{return new r.R({width:fe,height:Re},yield r.W(O,-1,-1,fe,Re))}catch{}}return s.getImageData(O,1)})}_getNeighboringTiles(O){const fe=O.canonical,Re=Math.pow(2,fe.z),Oe=(fe.x-1+Re)%Re,We=fe.x===0?O.wrap-1:O.wrap,Mt=(fe.x+1+Re)%Re,zt=fe.x+1===Re?O.wrap+1:O.wrap,rr={};return rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y).key]={backfilled:!1},rr[new r.S(O.overscaledZ,zt,fe.z,Mt,fe.y).key]={backfilled:!1},fe.y>0&&(rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y-1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,O.wrap,fe.z,fe.x,fe.y-1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,zt,fe.z,Mt,fe.y-1).key]={backfilled:!1}),fe.y+1<Re&&(rr[new r.S(O.overscaledZ,We,fe.z,Oe,fe.y+1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,O.wrap,fe.z,fe.x,fe.y+1).key]={backfilled:!1},rr[new r.S(O.overscaledZ,zt,fe.z,Mt,fe.y+1).key]={backfilled:!1}),rr}unloadTile(O){return r._(this,void 0,void 0,function*(){O.demTexture&&this.map.painter.saveTileTexture(O.demTexture),O.fbo&&(O.fbo.destroy(),delete O.fbo),O.dem&&delete O.dem,delete O.neighboringTiles,O.state="unloaded",O.actor&&(yield O.actor.sendAsync({type:"RDT",data:{type:this.type,uid:O.uid,source:this.id}}))})}}class Ve extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._pendingLoads=0,this.actor=Re.getActor(),this.setEventedParent(Oe),this._data=fe.data,this._options=r.e({},fe),this._collectResourceTiming=fe.collectResourceTiming,fe.maxzoom!==void 0&&(this.maxzoom=fe.maxzoom),fe.type&&(this.type=fe.type),fe.attribution&&(this.attribution=fe.attribution),this.promoteId=fe.promoteId;const We=r.X/this.tileSize;fe.clusterMaxZoom!==void 0&&this.maxzoom<=fe.clusterMaxZoom&&r.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${fe.clusterMaxZoom}".`),this.workerOptions=r.e({source:this.id,cluster:fe.cluster||!1,geojsonVtOptions:{buffer:(fe.buffer!==void 0?fe.buffer:128)*We,tolerance:(fe.tolerance!==void 0?fe.tolerance:.375)*We,extent:r.X,maxZoom:this.maxzoom,lineMetrics:fe.lineMetrics||!1,generateId:fe.generateId||!1},superclusterOptions:{maxZoom:fe.clusterMaxZoom!==void 0?fe.clusterMaxZoom:this.maxzoom-1,minPoints:Math.max(2,fe.clusterMinPoints||2),extent:r.X,radius:(fe.clusterRadius||50)*We,log:!1,generateId:fe.generateId||!1},clusterProperties:fe.clusterProperties,filter:fe.filter},fe.workerOptions),typeof this.promoteId=="string"&&(this.workerOptions.promoteId=this.promoteId)}load(){return r._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(O){this.map=O,this.load()}setData(O){return this._data=O,this._updateWorkerData(),this}updateData(O){return this._updateWorkerData(O),this}getData(){return r._(this,void 0,void 0,function*(){const O=r.e({type:this.type},this.workerOptions);return this.actor.sendAsync({type:"GD",data:O})})}setClusterOptions(O){return this.workerOptions.cluster=O.cluster,O&&(O.clusterRadius!==void 0&&(this.workerOptions.superclusterOptions.radius=O.clusterRadius),O.clusterMaxZoom!==void 0&&(this.workerOptions.superclusterOptions.maxZoom=O.clusterMaxZoom)),this._updateWorkerData(),this}getClusterExpansionZoom(O){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:O,source:this.id}})}getClusterChildren(O){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:O,source:this.id}})}getClusterLeaves(O,fe,Re){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:O,limit:fe,offset:Re}})}_updateWorkerData(O){return r._(this,void 0,void 0,function*(){const fe=r.e({type:this.type},this.workerOptions);O?fe.dataDiff=O:typeof this._data=="string"?(fe.request=this.map._requestManager.transformRequest(s.resolveURL(this._data),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming):fe.data=JSON.stringify(this._data),this._pendingLoads++,this.fire(new r.k("dataloading",{dataType:"source"}));try{const Re=yield this.actor.sendAsync({type:"LD",data:fe});if(this._pendingLoads--,this._removed||Re.abandoned)return void this.fire(new r.k("dataabort",{dataType:"source"}));let Oe=null;Re.resourceTiming&&Re.resourceTiming[this.id]&&(Oe=Re.resourceTiming[this.id].slice(0));const We={dataType:"source"};this._collectResourceTiming&&Oe&&Oe.length>0&&r.e(We,{resourceTiming:Oe}),this.fire(new r.k("data",Object.assign(Object.assign({},We),{sourceDataType:"metadata"}))),this.fire(new r.k("data",Object.assign(Object.assign({},We),{sourceDataType:"content"})))}catch(Re){if(this._pendingLoads--,this._removed)return void this.fire(new r.k("dataabort",{dataType:"source"}));this.fire(new r.j(Re))}})}loaded(){return this._pendingLoads===0}loadTile(O){return r._(this,void 0,void 0,function*(){const fe=O.actor?"RT":"LT";O.actor=this.actor;const Re={type:this.type,uid:O.uid,tileID:O.tileID,zoom:O.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};O.abortController=new AbortController;const Oe=yield this.actor.sendAsync({type:fe,data:Re},O.abortController);delete O.abortController,O.unloadVectorData(),O.aborted||O.loadVectorData(Oe,this.map.painter,fe==="RT")})}abortTile(O){return r._(this,void 0,void 0,function*(){O.abortController&&(O.abortController.abort(),delete O.abortController),O.aborted=!0})}unloadTile(O){return r._(this,void 0,void 0,function*(){O.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:O.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return r.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var rt=r.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class pt extends r.E{constructor(O,fe,Re,Oe){super(),this.id=O,this.dispatcher=Re,this.coordinates=fe.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Oe),this.options=fe}load(O){return r._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new r.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{const fe=yield c.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,fe&&fe.data&&(this.image=fe.data,O&&(this.coordinates=O),this._finishLoading())}catch(fe){this._request=null,this._loaded=!0,this.fire(new r.j(fe))}})}loaded(){return this._loaded}updateImage(O){return O.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=O.url,this.load(O.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new r.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(O){this.map=O,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(O){this.coordinates=O;const fe=O.map(r.Z.fromLngLat);this.tileID=(function(Oe){let We=1/0,Mt=1/0,zt=-1/0,rr=-1/0;for(const pn of Oe)We=Math.min(We,pn.x),Mt=Math.min(Mt,pn.y),zt=Math.max(zt,pn.x),rr=Math.max(rr,pn.y);const Tr=Math.max(zt-We,rr-Mt),zr=Math.max(0,Math.floor(-Math.log(Tr)/Math.LN2)),qr=Math.pow(2,zr);return new r.a1(zr,Math.floor((We+zt)/2*qr),Math.floor((Mt+rr)/2*qr))})(fe),this.minzoom=this.maxzoom=this.tileID.z;const Re=fe.map(Oe=>this.tileID.getTilePoint(Oe)._round());return this._boundsArray=new r.$,this._boundsArray.emplaceBack(Re[0].x,Re[0].y,0,0),this._boundsArray.emplaceBack(Re[1].x,Re[1].y,r.X,0),this._boundsArray.emplaceBack(Re[3].x,Re[3].y,0,r.X),this._boundsArray.emplaceBack(Re[2].x,Re[2].y,r.X,r.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new r.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;const O=this.map.painter.context,fe=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new f(O,this.image,fe.RGBA),this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE));let Re=!1;for(const Oe in this.tiles){const We=this.tiles[Oe];We.state!=="loaded"&&(We.state="loaded",We.texture=this.texture,Re=!0)}Re&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(O){return r._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(O.tileID.canonical)?(this.tiles[String(O.tileID.wrap)]=O,O.buckets={}):O.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class gt extends pt{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),this.roundZoom=!0,this.type="video",this.options=fe}load(){return r._(this,void 0,void 0,function*(){this._loaded=!1;const O=this.options;this.urls=[];for(const fe of O.urls)this.urls.push(this.map._requestManager.transformRequest(fe,"Source").url);try{const fe=yield r.a3(this.urls);if(this._loaded=!0,!fe)return;this.video=fe,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(fe){this.fire(new r.j(fe))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(O){if(this.video){const fe=this.video.seekable;O<fe.start(0)||O>fe.end(0)?this.fire(new r.j(new r.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${fe.start(0)} and ${fe.end(0)}-second mark.`))):this.video.currentTime=O}}getVideo(){return this.video}onAdd(O){this.map||(this.map=O,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;const O=this.map.painter.context,fe=O.gl;this.boundsBuffer||(this.boundsBuffer=O.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE),fe.texSubImage2D(fe.TEXTURE_2D,0,0,0,fe.RGBA,fe.UNSIGNED_BYTE,this.video)):(this.texture=new f(O,this.video,fe.RGBA),this.texture.bind(fe.LINEAR,fe.CLAMP_TO_EDGE));let Re=!1;for(const Oe in this.tiles){const We=this.tiles[Oe];We.state!=="loaded"&&(We.state="loaded",We.texture=this.texture,Re=!0)}Re&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ht extends pt{constructor(O,fe,Re,Oe){super(O,fe,Re,Oe),fe.coordinates?Array.isArray(fe.coordinates)&&fe.coordinates.length===4&&!fe.coordinates.some(We=>!Array.isArray(We)||We.length!==2||We.some(Mt=>typeof Mt!="number"))||this.fire(new r.j(new r.a2(`sources.${O}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new r.j(new r.a2(`sources.${O}`,null,'missing required property "coordinates"'))),fe.animate&&typeof fe.animate!="boolean"&&this.fire(new r.j(new r.a2(`sources.${O}`,null,'optional "animate" property must be a boolean value'))),fe.canvas?typeof fe.canvas=="string"||fe.canvas instanceof HTMLCanvasElement||this.fire(new r.j(new r.a2(`sources.${O}`,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 r.j(new r.a2(`sources.${O}`,null,'missing required property "canvas"'))),this.options=fe,this.animate=fe.animate===void 0||fe.animate}load(){return r._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new r.j(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())})}getCanvas(){return this.canvas}onAdd(O){this.map=O,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let O=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,O=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,O=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;const fe=this.map.painter.context,Re=fe.gl;this.boundsBuffer||(this.boundsBuffer=fe.createVertexBuffer(this._boundsArray,rt.members)),this.boundsSegments||(this.boundsSegments=r.a0.simpleSegment(0,0,4,2)),this.texture?(O||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new f(fe,this.canvas,Re.RGBA,{premultiply:!0});let Oe=!1;for(const We in this.tiles){const Mt=this.tiles[We];Mt.state!=="loaded"&&(Mt.state="loaded",Mt.texture=this.texture,Oe=!0)}Oe&&this.fire(new r.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(const O of[this.canvas.width,this.canvas.height])if(isNaN(O)||O<=0)return!0;return!1}}const lt={},Fe=Ze=>{switch(Ze){case"geojson":return Ve;case"image":return pt;case"raster":return ze;case"raster-dem":return Ge;case"vector":return Le;case"video":return gt;case"canvas":return ht}return lt[Ze]},Pe="RTLPluginLoaded";class be extends r.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ee()}_syncState(O){return this.status=O,this.dispatcher.broadcast("SRPS",{pluginStatus:O,pluginURL:this.url}).catch(fe=>{throw this.status="error",fe})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(O){return r._(this,arguments,void 0,function*(fe,Re=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(fe),!this.url)throw new Error(`requested url ${fe} is invalid`);if(this.status==="unavailable"){if(!Re)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return r._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new r.k(Pe))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ye=null;function mt(){return Ye||(Ye=new be),Ye}class bt{constructor(O,fe){this.timeAdded=0,this.fadeEndTime=0,this.tileID=O,this.uid=r.a4(),this.uses=0,this.tileSize=fe,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(O){const fe=O+this.timeAdded;fe<this.fadeEndTime||(this.fadeEndTime=fe)}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(O){this.demTexture&&O.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(O,fe,Re){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",O){O.featureIndex&&(this.latestFeatureIndex=O.featureIndex,O.rawTileData?(this.latestRawTileData=O.rawTileData,this.latestFeatureIndex.rawTileData=O.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=O.collisionBoxArray,this.buckets=(function(Oe,We){const Mt={};if(!We)return Mt;for(const zt of Oe){const rr=zt.layerIds.map(Tr=>We.getLayer(Tr)).filter(Boolean);if(rr.length!==0){zt.layers=rr,zt.stateDependentLayerIds&&(zt.stateDependentLayers=zt.stateDependentLayerIds.map(Tr=>rr.filter(zr=>zr.id===Tr)[0]));for(const Tr of rr)Mt[Tr.id]=zt}}return Mt})(O.buckets,fe.style),this.hasSymbolBuckets=!1;for(const Oe in this.buckets){const We=this.buckets[Oe];if(We instanceof r.a6){if(this.hasSymbolBuckets=!0,!Re)break;We.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(const Oe in this.buckets){const We=this.buckets[Oe];if(We instanceof r.a6&&We.hasRTLText){this.hasRTLText=!0,mt().lazyLoad();break}}this.queryPadding=0;for(const Oe in this.buckets){const We=this.buckets[Oe];this.queryPadding=Math.max(this.queryPadding,fe.style.getLayer(Oe).queryRadius(We))}O.imageAtlas&&(this.imageAtlas=O.imageAtlas),O.glyphAtlasImage&&(this.glyphAtlasImage=O.glyphAtlasImage)}else this.collisionBoxArray=new r.a5}unloadVectorData(){for(const O in this.buckets)this.buckets[O].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(O){return this.buckets[O.id]}upload(O){for(const Re in this.buckets){const Oe=this.buckets[Re];Oe.uploadPending()&&Oe.upload(O)}const fe=O.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new f(O,this.imageAtlas.image,fe.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new f(O,this.glyphAtlasImage,fe.ALPHA),this.glyphAtlasImage=null)}prepare(O){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(O,this.imageAtlasTexture)}queryRenderedFeatures(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:Oe,cameraQueryGeometry:We,scale:Mt,tileSize:this.tileSize,pixelPosMatrix:zr,transform:rr,params:zt,queryPadding:this.queryPadding*Tr},O,fe,Re):{}}querySourceFeatures(O,fe){const Re=this.latestFeatureIndex;if(!Re||!Re.rawTileData)return;const Oe=Re.loadVTLayers(),We=fe&&fe.sourceLayer?fe.sourceLayer:"",Mt=Oe._geojsonTileLayer||Oe[We];if(!Mt)return;const zt=r.a7(fe&&fe.filter),{z:rr,x:Tr,y:zr}=this.tileID.canonical,qr={z:rr,x:Tr,y:zr};for(let pn=0;pn<Mt.length;pn++){const Dn=Mt.feature(pn);if(zt.needGeometry){const wt=r.a8(Dn,!0);if(!zt.filter(new r.z(this.tileID.overscaledZ),wt,this.tileID.canonical))continue}else if(!zt.filter(new r.z(this.tileID.overscaledZ),Dn))continue;const nt=Re.getId(Dn,We),ut=new r.a9(Dn,rr,Tr,zr,nt);ut.tile=qr,O.push(ut)}}hasData(){return this.state==="loaded"||this.state==="reloading"||this.state==="expired"}patternsLoaded(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length}setExpiryData(O){const fe=this.expirationTime;if(O.cacheControl){const Re=r.aa(O.cacheControl);Re["max-age"]&&(this.expirationTime=Date.now()+1e3*Re["max-age"])}else O.expires&&(this.expirationTime=new Date(O.expires).getTime());if(this.expirationTime){const Re=Date.now();let Oe=!1;if(this.expirationTime>Re)Oe=!1;else if(fe)if(this.expirationTime<fe)Oe=!0;else{const We=this.expirationTime-fe;We?this.expirationTime=Re+Math.max(We,3e4):Oe=!0}else Oe=!0;Oe?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}}getExpiryTimeout(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-new Date().getTime(),Math.pow(2,31)-1)}setFeatureState(O,fe){if(!this.latestFeatureIndex||!this.latestFeatureIndex.rawTileData||Object.keys(O).length===0)return;const Re=this.latestFeatureIndex.loadVTLayers();for(const Oe in this.buckets){if(!fe.style.hasLayer(Oe))continue;const We=this.buckets[Oe],Mt=We.layers[0].sourceLayer||"_geojsonTileLayer",zt=Re[Mt],rr=O[Mt];if(!zt||!rr||Object.keys(rr).length===0)continue;We.update(rr,zt,this.imageAtlas&&this.imageAtlas.patternPositions||{});const Tr=fe&&fe.style&&fe.style.getLayer(Oe);Tr&&(this.queryPadding=Math.max(this.queryPadding,Tr.queryRadius(We)))}}holdingForFade(){return this.symbolFadeHoldUntil!==void 0}symbolFadeFinished(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<s.now()}clearFadeHold(){this.symbolFadeHoldUntil=void 0}setHoldDuration(O){this.symbolFadeHoldUntil=s.now()+O}setDependencies(O,fe){const Re={};for(const Oe of fe)Re[Oe]=!0;this.dependencies[O]=Re}hasDependency(O,fe){for(const Re of O){const Oe=this.dependencies[Re];if(Oe){for(const We of fe)if(Oe[We])return!0}}return!1}}class ft{constructor(O,fe){this.max=O,this.onRemove=fe,this.reset()}reset(){for(const O in this.data)for(const fe of this.data[O])fe.timeout&&clearTimeout(fe.timeout),this.onRemove(fe.value);return this.data={},this.order=[],this}add(O,fe,Re){const Oe=O.wrapped().key;this.data[Oe]===void 0&&(this.data[Oe]=[]);const We={value:fe,timeout:void 0};if(Re!==void 0&&(We.timeout=setTimeout(()=>{this.remove(O,We)},Re)),this.data[Oe].push(We),this.order.push(Oe),this.order.length>this.max){const Mt=this._getAndRemoveByKey(this.order[0]);Mt&&this.onRemove(Mt)}return this}has(O){return O.wrapped().key in this.data}getAndRemove(O){return this.has(O)?this._getAndRemoveByKey(O.wrapped().key):null}_getAndRemoveByKey(O){const fe=this.data[O].shift();return fe.timeout&&clearTimeout(fe.timeout),this.data[O].length===0&&delete this.data[O],this.order.splice(this.order.indexOf(O),1),fe.value}getByKey(O){const fe=this.data[O];return fe?fe[0].value:null}get(O){return this.has(O)?this.data[O.wrapped().key][0].value:null}remove(O,fe){if(!this.has(O))return this;const Re=O.wrapped().key,Oe=fe===void 0?0:this.data[Re].indexOf(fe),We=this.data[Re][Oe];return this.data[Re].splice(Oe,1),We.timeout&&clearTimeout(We.timeout),this.data[Re].length===0&&delete this.data[Re],this.onRemove(We.value),this.order.splice(this.order.indexOf(Re),1),this}setMaxSize(O){for(this.max=O;this.order.length>this.max;){const fe=this._getAndRemoveByKey(this.order[0]);fe&&this.onRemove(fe)}return this}filter(O){const fe=[];for(const Re in this.data)for(const Oe of this.data[Re])O(Oe.value)||fe.push(Oe);for(const Re of fe)this.remove(Re.value.tileID,Re)}}class Wt{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(O,fe,Re){const Oe=String(fe);if(this.stateChanges[O]=this.stateChanges[O]||{},this.stateChanges[O][Oe]=this.stateChanges[O][Oe]||{},r.e(this.stateChanges[O][Oe],Re),this.deletedStates[O]===null){this.deletedStates[O]={};for(const We in this.state[O])We!==Oe&&(this.deletedStates[O][We]=null)}else if(this.deletedStates[O]&&this.deletedStates[O][Oe]===null){this.deletedStates[O][Oe]={};for(const We in this.state[O][Oe])Re[We]||(this.deletedStates[O][Oe][We]=null)}else for(const We in Re)this.deletedStates[O]&&this.deletedStates[O][Oe]&&this.deletedStates[O][Oe][We]===null&&delete this.deletedStates[O][Oe][We]}removeFeatureState(O,fe,Re){if(this.deletedStates[O]===null)return;const Oe=String(fe);if(this.deletedStates[O]=this.deletedStates[O]||{},Re&&fe!==void 0)this.deletedStates[O][Oe]!==null&&(this.deletedStates[O][Oe]=this.deletedStates[O][Oe]||{},this.deletedStates[O][Oe][Re]=null);else if(fe!==void 0)if(this.stateChanges[O]&&this.stateChanges[O][Oe])for(Re in this.deletedStates[O][Oe]={},this.stateChanges[O][Oe])this.deletedStates[O][Oe][Re]=null;else this.deletedStates[O][Oe]=null;else this.deletedStates[O]=null}getState(O,fe){const Re=String(fe),Oe=r.e({},(this.state[O]||{})[Re],(this.stateChanges[O]||{})[Re]);if(this.deletedStates[O]===null)return{};if(this.deletedStates[O]){const We=this.deletedStates[O][fe];if(We===null)return{};for(const Mt in We)delete Oe[Mt]}return Oe}initializeTileState(O,fe){O.setFeatureState(this.state,fe)}coalesceChanges(O,fe){const Re={};for(const Oe in this.stateChanges){this.state[Oe]=this.state[Oe]||{};const We={};for(const Mt in this.stateChanges[Oe])this.state[Oe][Mt]||(this.state[Oe][Mt]={}),r.e(this.state[Oe][Mt],this.stateChanges[Oe][Mt]),We[Mt]=this.state[Oe][Mt];Re[Oe]=We}for(const Oe in this.deletedStates){this.state[Oe]=this.state[Oe]||{};const We={};if(this.deletedStates[Oe]===null)for(const Mt in this.state[Oe])We[Mt]={},this.state[Oe][Mt]={};else for(const Mt in this.deletedStates[Oe]){if(this.deletedStates[Oe][Mt]===null)this.state[Oe][Mt]={};else for(const zt of Object.keys(this.deletedStates[Oe][Mt]))delete this.state[Oe][Mt][zt];We[Mt]=this.state[Oe][Mt]}Re[Oe]=Re[Oe]||{},r.e(Re[Oe],We)}if(this.stateChanges={},this.deletedStates={},Object.keys(Re).length!==0)for(const Oe in O)O[Oe].setFeatureState(Re,fe)}}class Zt extends r.E{constructor(O,fe,Re){super(),this.id=O,this.dispatcher=Re,this.on("data",Oe=>this._dataHandler(Oe)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((Oe,We,Mt,zt)=>{const rr=new(Fe(We.type))(Oe,We,Mt,zt);if(rr.id!==Oe)throw new Error(`Expected Source id to be ${Oe} instead of ${rr.id}`);return rr})(O,fe,Re,this),this._tiles={},this._cache=new ft(0,Oe=>this._unloadTile(Oe)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Wt,this._didEmitContent=!1,this._updated=!1}onAdd(O){this.map=O,this._maxTileCacheSize=O?O._maxTileCacheSize:null,this._maxTileCacheZoomLevels=O?O._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(O)}onRemove(O){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(O)}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(const O in this._tiles){const fe=this._tiles[O];if(fe.state!=="loaded"&&fe.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;const O=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,O&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(O,fe,Re){return r._(this,void 0,void 0,function*(){try{yield this._source.loadTile(O),this._tileLoaded(O,fe,Re)}catch(Oe){O.state="errored",Oe.status!==404?this._source.fire(new r.j(Oe,{tile:O})):this.update(this.transform,this.terrain)}})}_unloadTile(O){this._source.unloadTile&&this._source.unloadTile(O)}_abortTile(O){this._source.abortTile&&this._source.abortTile(O),this._source.fire(new r.k("dataabort",{tile:O,coord:O.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(O){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(const fe in this._tiles){const Re=this._tiles[fe];Re.upload(O),Re.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(O=>O.tileID).sort(cr).map(O=>O.key)}getRenderableIds(O){const fe=[];for(const Re in this._tiles)this._isIdRenderable(Re,O)&&fe.push(this._tiles[Re]);return O?fe.sort((Re,Oe)=>{const We=Re.tileID,Mt=Oe.tileID,zt=new r.P(We.canonical.x,We.canonical.y)._rotate(this.transform.angle),rr=new r.P(Mt.canonical.x,Mt.canonical.y)._rotate(this.transform.angle);return We.overscaledZ-Mt.overscaledZ||rr.y-zt.y||rr.x-zt.x}).map(Re=>Re.tileID.key):fe.map(Re=>Re.tileID).sort(cr).map(Re=>Re.key)}hasRenderableParent(O){const fe=this.findLoadedParent(O,0);return!!fe&&this._isIdRenderable(fe.tileID.key)}_isIdRenderable(O,fe){return this._tiles[O]&&this._tiles[O].hasData()&&!this._coveredTiles[O]&&(fe||!this._tiles[O].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(const O in this._tiles)this._tiles[O].state!=="errored"&&this._reloadTile(O,"reloading")}}_reloadTile(O,fe){return r._(this,void 0,void 0,function*(){const Re=this._tiles[O];Re&&(Re.state!=="loading"&&(Re.state=fe),yield this._loadTile(Re,O,fe))})}_tileLoaded(O,fe,Re){O.timeAdded=s.now(),Re==="expired"&&(O.refreshedUponExpiration=!0),this._setTileReloadTimer(fe,O),this.getSource().type==="raster-dem"&&O.dem&&this._backfillDEM(O),this._state.initializeTileState(O,this.map?this.map.painter:null),O.aborted||this._source.fire(new r.k("data",{dataType:"source",tile:O,coord:O.tileID}))}_backfillDEM(O){const fe=this.getRenderableIds();for(let Oe=0;Oe<fe.length;Oe++){const We=fe[Oe];if(O.neighboringTiles&&O.neighboringTiles[We]){const Mt=this.getTileByID(We);Re(O,Mt),Re(Mt,O)}}function Re(Oe,We){Oe.needsHillshadePrepare=!0,Oe.needsTerrainPrepare=!0;let Mt=We.tileID.canonical.x-Oe.tileID.canonical.x;const zt=We.tileID.canonical.y-Oe.tileID.canonical.y,rr=Math.pow(2,Oe.tileID.canonical.z),Tr=We.tileID.key;Mt===0&&zt===0||Math.abs(zt)>1||(Math.abs(Mt)>1&&(Math.abs(Mt+rr)===1?Mt+=rr:Math.abs(Mt-rr)===1&&(Mt-=rr)),We.dem&&Oe.dem&&(Oe.dem.backfillBorder(We.dem,Mt,zt),Oe.neighboringTiles&&Oe.neighboringTiles[Tr]&&(Oe.neighboringTiles[Tr].backfilled=!0)))}}getTile(O){return this.getTileByID(O.key)}getTileByID(O){return this._tiles[O]}_retainLoadedChildren(O,fe,Re,Oe){for(const We in this._tiles){let Mt=this._tiles[We];if(Oe[We]||!Mt.hasData()||Mt.tileID.overscaledZ<=fe||Mt.tileID.overscaledZ>Re)continue;let zt=Mt.tileID;for(;Mt&&Mt.tileID.overscaledZ>fe+1;){const Tr=Mt.tileID.scaledTo(Mt.tileID.overscaledZ-1);Mt=this._tiles[Tr.key],Mt&&Mt.hasData()&&(zt=Tr)}let rr=zt;for(;rr.overscaledZ>fe;)if(rr=rr.scaledTo(rr.overscaledZ-1),O[rr.key]){Oe[zt.key]=zt;break}}}findLoadedParent(O,fe){if(O.key in this._loadedParentTiles){const Re=this._loadedParentTiles[O.key];return Re&&Re.tileID.overscaledZ>=fe?Re:null}for(let Re=O.overscaledZ-1;Re>=fe;Re--){const Oe=O.scaledTo(Re),We=this._getLoadedTile(Oe);if(We)return We}}findLoadedSibling(O){return this._getLoadedTile(O)}_getLoadedTile(O){const fe=this._tiles[O.key];return fe&&fe.hasData()?fe:this._cache.getByKey(O.wrapped().key)}updateCacheSize(O){const fe=Math.ceil(O.width/this._source.tileSize)+1,Re=Math.ceil(O.height/this._source.tileSize)+1,Oe=Math.floor(fe*Re*(this._maxTileCacheZoomLevels===null?r.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),We=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,Oe):Oe;this._cache.setMaxSize(We)}handleWrapJump(O){const fe=Math.round((O-(this._prevLng===void 0?O:this._prevLng))/360);if(this._prevLng=O,fe){const Re={};for(const Oe in this._tiles){const We=this._tiles[Oe];We.tileID=We.tileID.unwrapTo(We.tileID.wrap+fe),Re[We.tileID.key]=We}this._tiles=Re;for(const Oe in this._timers)clearTimeout(this._timers[Oe]),delete this._timers[Oe];for(const Oe in this._tiles)this._setTileReloadTimer(Oe,this._tiles[Oe])}}_updateCoveredAndRetainedTiles(O,fe,Re,Oe,We,Mt){const zt={},rr={},Tr=Object.keys(O),zr=s.now();for(const qr of Tr){const pn=O[qr],Dn=this._tiles[qr];if(!Dn||Dn.fadeEndTime!==0&&Dn.fadeEndTime<=zr)continue;const nt=this.findLoadedParent(pn,fe),ut=this.findLoadedSibling(pn),wt=nt||ut||null;wt&&(this._addTile(wt.tileID),zt[wt.tileID.key]=wt.tileID),rr[qr]=pn}this._retainLoadedChildren(rr,Oe,Re,O);for(const qr in zt)O[qr]||(this._coveredTiles[qr]=!0,O[qr]=zt[qr]);if(Mt){const qr={},pn={};for(const Dn of We)this._tiles[Dn.key].hasData()?qr[Dn.key]=Dn:pn[Dn.key]=Dn;for(const Dn in pn){const nt=pn[Dn].children(this._source.maxzoom);this._tiles[nt[0].key]&&this._tiles[nt[1].key]&&this._tiles[nt[2].key]&&this._tiles[nt[3].key]&&(qr[nt[0].key]=O[nt[0].key]=nt[0],qr[nt[1].key]=O[nt[1].key]=nt[1],qr[nt[2].key]=O[nt[2].key]=nt[2],qr[nt[3].key]=O[nt[3].key]=nt[3],delete pn[Dn])}for(const Dn in pn){const nt=pn[Dn],ut=this.findLoadedParent(nt,this._source.minzoom),wt=this.findLoadedSibling(nt),kt=ut||wt||null;if(kt){qr[kt.tileID.key]=O[kt.tileID.key]=kt.tileID;for(const Ht in qr)qr[Ht].isChildOf(kt.tileID)&&delete qr[Ht]}}for(const Dn in this._tiles)qr[Dn]||(this._coveredTiles[Dn]=!0)}}update(O,fe){if(!this._sourceLoaded||this._paused)return;let Re;this.transform=O,this.terrain=fe,this.updateCacheSize(O),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?Re=O.getVisibleUnwrappedCoordinates(this._source.tileID).map(zr=>new r.S(zr.canonical.z,zr.wrap,zr.canonical.z,zr.canonical.x,zr.canonical.y)):(Re=O.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:fe}),this._source.hasTile&&(Re=Re.filter(zr=>this._source.hasTile(zr)))):Re=[];const Oe=O.coveringZoomLevel(this._source),We=Math.max(Oe-Zt.maxOverzooming,this._source.minzoom),Mt=Math.max(Oe+Zt.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){const zr={};for(const qr of Re)if(qr.canonical.z>this._source.minzoom){const pn=qr.scaledTo(qr.canonical.z-1);zr[pn.key]=pn;const Dn=qr.scaledTo(Math.max(this._source.minzoom,Math.min(qr.canonical.z,5)));zr[Dn.key]=Dn}Re=Re.concat(Object.values(zr))}const zt=Re.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,zt&&this.fire(new r.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));const rr=this._updateRetainedTiles(Re,Oe);pr(this._source.type)&&this._updateCoveredAndRetainedTiles(rr,We,Mt,Oe,Re,fe);for(const zr in rr)this._tiles[zr].clearFadeHold();const Tr=r.ab(this._tiles,rr);for(const zr of Tr){const qr=this._tiles[zr];qr.hasSymbolBuckets&&!qr.holdingForFade()?qr.setHoldDuration(this.map._fadeDuration):qr.hasSymbolBuckets&&!qr.symbolFadeFinished()||this._removeTile(zr)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(const O in this._tiles)this._tiles[O].holdingForFade()&&this._removeTile(O)}_updateRetainedTiles(O,fe){var Re;const Oe={},We={},Mt=Math.max(fe-Zt.maxOverzooming,this._source.minzoom),zt=Math.max(fe+Zt.maxUnderzooming,this._source.minzoom),rr={};for(const Tr of O){const zr=this._addTile(Tr);Oe[Tr.key]=Tr,zr.hasData()||fe<this._source.maxzoom&&(rr[Tr.key]=Tr)}this._retainLoadedChildren(rr,fe,zt,Oe);for(const Tr of O){let zr=this._tiles[Tr.key];if(zr.hasData())continue;if(fe+1>this._source.maxzoom){const pn=Tr.children(this._source.maxzoom)[0],Dn=this.getTile(pn);if(Dn&&Dn.hasData()){Oe[pn.key]=pn;continue}}else{const pn=Tr.children(this._source.maxzoom);if(Oe[pn[0].key]&&Oe[pn[1].key]&&Oe[pn[2].key]&&Oe[pn[3].key])continue}let qr=zr.wasRequested();for(let pn=Tr.overscaledZ-1;pn>=Mt;--pn){const Dn=Tr.scaledTo(pn);if(We[Dn.key])break;if(We[Dn.key]=!0,zr=this.getTile(Dn),!zr&&qr&&(zr=this._addTile(Dn)),zr){const nt=zr.hasData();if((nt||!(!((Re=this.map)===null||Re===void 0)&&Re.cancelPendingTileRequestsWhileZooming)||qr)&&(Oe[Dn.key]=Dn),qr=zr.wasRequested(),nt)break}}}return Oe}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(const O in this._tiles){const fe=[];let Re,Oe=this._tiles[O].tileID;for(;Oe.overscaledZ>0;){if(Oe.key in this._loadedParentTiles){Re=this._loadedParentTiles[Oe.key];break}fe.push(Oe.key);const We=Oe.scaledTo(Oe.overscaledZ-1);if(Re=this._getLoadedTile(We),Re)break;Oe=We}for(const We of fe)this._loadedParentTiles[We]=Re}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(const O in this._tiles){const fe=this._tiles[O].tileID,Re=this._getLoadedTile(fe);this._loadedSiblingTiles[fe.key]=Re}}_addTile(O){let fe=this._tiles[O.key];if(fe)return fe;fe=this._cache.getAndRemove(O),fe&&(this._setTileReloadTimer(O.key,fe),fe.tileID=O,this._state.initializeTileState(fe,this.map?this.map.painter:null),this._cacheTimers[O.key]&&(clearTimeout(this._cacheTimers[O.key]),delete this._cacheTimers[O.key],this._setTileReloadTimer(O.key,fe)));const Re=fe;return fe||(fe=new bt(O,this._source.tileSize*O.overscaleFactor()),this._loadTile(fe,O.key,fe.state)),fe.uses++,this._tiles[O.key]=fe,Re||this._source.fire(new r.k("dataloading",{tile:fe,coord:fe.tileID,dataType:"source"})),fe}_setTileReloadTimer(O,fe){O in this._timers&&(clearTimeout(this._timers[O]),delete this._timers[O]);const Re=fe.getExpiryTimeout();Re&&(this._timers[O]=setTimeout(()=>{this._reloadTile(O,"expired"),delete this._timers[O]},Re))}_removeTile(O){const fe=this._tiles[O];fe&&(fe.uses--,delete this._tiles[O],this._timers[O]&&(clearTimeout(this._timers[O]),delete this._timers[O]),fe.uses>0||(fe.hasData()&&fe.state!=="reloading"?this._cache.add(fe.tileID,fe,fe.getExpiryTimeout()):(fe.aborted=!0,this._abortTile(fe),this._unloadTile(fe))))}_dataHandler(O){const fe=O.sourceDataType;O.dataType==="source"&&fe==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&O.dataType==="source"&&fe==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(const O in this._tiles)this._removeTile(O);this._cache.reset()}tilesIn(O,fe,Re){const Oe=[],We=this.transform;if(!We)return Oe;const Mt=Re?We.getCameraQueryGeometry(O):O,zt=O.map(nt=>We.pointCoordinate(nt,this.terrain)),rr=Mt.map(nt=>We.pointCoordinate(nt,this.terrain)),Tr=this.getIds();let zr=1/0,qr=1/0,pn=-1/0,Dn=-1/0;for(const nt of rr)zr=Math.min(zr,nt.x),qr=Math.min(qr,nt.y),pn=Math.max(pn,nt.x),Dn=Math.max(Dn,nt.y);for(let nt=0;nt<Tr.length;nt++){const ut=this._tiles[Tr[nt]];if(ut.holdingForFade())continue;const wt=ut.tileID,kt=Math.pow(2,We.zoom-ut.tileID.overscaledZ),Ht=fe*ut.queryPadding*r.X/ut.tileSize/kt,Ot=[wt.getTilePoint(new r.Z(zr,qr)),wt.getTilePoint(new r.Z(pn,Dn))];if(Ot[0].x-Ht<r.X&&Ot[0].y-Ht<r.X&&Ot[1].x+Ht>=0&&Ot[1].y+Ht>=0){const Kt=zt.map(Or=>wt.getTilePoint(Or)),Cr=rr.map(Or=>wt.getTilePoint(Or));Oe.push({tile:ut,tileID:wt,queryGeometry:Kt,cameraQueryGeometry:Cr,scale:kt})}}return Oe}getVisibleCoordinates(O){const fe=this.getRenderableIds(O).map(Re=>this._tiles[Re].tileID);for(const Re of fe)Re.posMatrix=this.transform.calculatePosMatrix(Re.toUnwrapped());return fe}hasTransition(){if(this._source.hasTransition())return!0;if(pr(this._source.type)){const O=s.now();for(const fe in this._tiles)if(this._tiles[fe].fadeEndTime>=O)return!0}return!1}setFeatureState(O,fe,Re){this._state.updateState(O=O||"_geojsonTileLayer",fe,Re)}removeFeatureState(O,fe,Re){this._state.removeFeatureState(O=O||"_geojsonTileLayer",fe,Re)}getFeatureState(O,fe){return this._state.getState(O=O||"_geojsonTileLayer",fe)}setDependencies(O,fe,Re){const Oe=this._tiles[O];Oe&&Oe.setDependencies(fe,Re)}reloadTilesForDependencies(O,fe){for(const Re in this._tiles)this._tiles[Re].hasDependency(O,fe)&&this._reloadTile(Re,"reloading");this._cache.filter(Re=>!Re.hasDependency(O,fe))}}function cr(Ze,O){const fe=Math.abs(2*Ze.wrap)-+(Ze.wrap<0),Re=Math.abs(2*O.wrap)-+(O.wrap<0);return Ze.overscaledZ-O.overscaledZ||Re-fe||O.canonical.y-Ze.canonical.y||O.canonical.x-Ze.canonical.x}function pr(Ze){return Ze==="raster"||Ze==="image"||Ze==="video"}Zt.maxOverzooming=10,Zt.maxUnderzooming=3;class Br{constructor(O,fe){this.reset(O,fe)}reset(O,fe){this.points=O||[],this._distances=[0];for(let Re=1;Re<this.points.length;Re++)this._distances[Re]=this._distances[Re-1]+this.points[Re].dist(this.points[Re-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(fe||0,.5*this.length),this.paddedLength=this.length-2*this.padding}lerp(O){if(this.points.length===1)return this.points[0];O=r.ac(O,0,1);let fe=1,Re=this._distances[fe];const Oe=O*this.paddedLength+this.padding;for(;Re<Oe&&fe<this._distances.length;)Re=this._distances[++fe];const We=fe-1,Mt=this._distances[We],zt=Re-Mt,rr=zt>0?(Oe-Mt)/zt:0;return this.points[We].mult(1-rr).add(this.points[fe].mult(rr))}}function Fr(Ze,O){let fe=!0;return Ze==="always"||Ze!=="never"&&O!=="never"||(fe=!1),fe}class cn{constructor(O,fe,Re){const Oe=this.boxCells=[],We=this.circleCells=[];this.xCellCount=Math.ceil(O/Re),this.yCellCount=Math.ceil(fe/Re);for(let Mt=0;Mt<this.xCellCount*this.yCellCount;Mt++)Oe.push([]),We.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=O,this.height=fe,this.xScale=this.xCellCount/O,this.yScale=this.yCellCount/fe,this.boxUid=0,this.circleUid=0}keysLength(){return this.boxKeys.length+this.circleKeys.length}insert(O,fe,Re,Oe,We){this._forEachCell(fe,Re,Oe,We,this._insertBoxCell,this.boxUid++),this.boxKeys.push(O),this.bboxes.push(fe),this.bboxes.push(Re),this.bboxes.push(Oe),this.bboxes.push(We)}insertCircle(O,fe,Re,Oe){this._forEachCell(fe-Oe,Re-Oe,fe+Oe,Re+Oe,this._insertCircleCell,this.circleUid++),this.circleKeys.push(O),this.circles.push(fe),this.circles.push(Re),this.circles.push(Oe)}_insertBoxCell(O,fe,Re,Oe,We,Mt){this.boxCells[We].push(Mt)}_insertCircleCell(O,fe,Re,Oe,We,Mt){this.circleCells[We].push(Mt)}_query(O,fe,Re,Oe,We,Mt,zt){if(Re<0||O>this.width||Oe<0||fe>this.height)return[];const rr=[];if(O<=0&&fe<=0&&this.width<=Re&&this.height<=Oe){if(We)return[{key:null,x1:O,y1:fe,x2:Re,y2:Oe}];for(let Tr=0;Tr<this.boxKeys.length;Tr++)rr.push({key:this.boxKeys[Tr],x1:this.bboxes[4*Tr],y1:this.bboxes[4*Tr+1],x2:this.bboxes[4*Tr+2],y2:this.bboxes[4*Tr+3]});for(let Tr=0;Tr<this.circleKeys.length;Tr++){const zr=this.circles[3*Tr],qr=this.circles[3*Tr+1],pn=this.circles[3*Tr+2];rr.push({key:this.circleKeys[Tr],x1:zr-pn,y1:qr-pn,x2:zr+pn,y2:qr+pn})}}else this._forEachCell(O,fe,Re,Oe,this._queryCell,rr,{hitTest:We,overlapMode:Mt,seenUids:{box:{},circle:{}}},zt);return rr}query(O,fe,Re,Oe){return this._query(O,fe,Re,Oe,!1,null)}hitTest(O,fe,Re,Oe,We,Mt){return this._query(O,fe,Re,Oe,!0,We,Mt).length>0}hitTestCircle(O,fe,Re,Oe,We){const Mt=O-Re,zt=O+Re,rr=fe-Re,Tr=fe+Re;if(zt<0||Mt>this.width||Tr<0||rr>this.height)return!1;const zr=[];return this._forEachCell(Mt,rr,zt,Tr,this._queryCellCircle,zr,{hitTest:!0,overlapMode:Oe,circle:{x:O,y:fe,radius:Re},seenUids:{box:{},circle:{}}},We),zr.length>0}_queryCell(O,fe,Re,Oe,We,Mt,zt,rr){const{seenUids:Tr,hitTest:zr,overlapMode:qr}=zt,pn=this.boxCells[We];if(pn!==null){const nt=this.bboxes;for(const ut of pn)if(!Tr.box[ut]){Tr.box[ut]=!0;const wt=4*ut,kt=this.boxKeys[ut];if(O<=nt[wt+2]&&fe<=nt[wt+3]&&Re>=nt[wt+0]&&Oe>=nt[wt+1]&&(!rr||rr(kt))&&(!zr||!Fr(qr,kt.overlapMode))&&(Mt.push({key:kt,x1:nt[wt],y1:nt[wt+1],x2:nt[wt+2],y2:nt[wt+3]}),zr))return!0}}const Dn=this.circleCells[We];if(Dn!==null){const nt=this.circles;for(const ut of Dn)if(!Tr.circle[ut]){Tr.circle[ut]=!0;const wt=3*ut,kt=this.circleKeys[ut];if(this._circleAndRectCollide(nt[wt],nt[wt+1],nt[wt+2],O,fe,Re,Oe)&&(!rr||rr(kt))&&(!zr||!Fr(qr,kt.overlapMode))){const Ht=nt[wt],Ot=nt[wt+1],Kt=nt[wt+2];if(Mt.push({key:kt,x1:Ht-Kt,y1:Ot-Kt,x2:Ht+Kt,y2:Ot+Kt}),zr)return!0}}}return!1}_queryCellCircle(O,fe,Re,Oe,We,Mt,zt,rr){const{circle:Tr,seenUids:zr,overlapMode:qr}=zt,pn=this.boxCells[We];if(pn!==null){const nt=this.bboxes;for(const ut of pn)if(!zr.box[ut]){zr.box[ut]=!0;const wt=4*ut,kt=this.boxKeys[ut];if(this._circleAndRectCollide(Tr.x,Tr.y,Tr.radius,nt[wt+0],nt[wt+1],nt[wt+2],nt[wt+3])&&(!rr||rr(kt))&&!Fr(qr,kt.overlapMode))return Mt.push(!0),!0}}const Dn=this.circleCells[We];if(Dn!==null){const nt=this.circles;for(const ut of Dn)if(!zr.circle[ut]){zr.circle[ut]=!0;const wt=3*ut,kt=this.circleKeys[ut];if(this._circlesCollide(nt[wt],nt[wt+1],nt[wt+2],Tr.x,Tr.y,Tr.radius)&&(!rr||rr(kt))&&!Fr(qr,kt.overlapMode))return Mt.push(!0),!0}}}_forEachCell(O,fe,Re,Oe,We,Mt,zt,rr){const Tr=this._convertToXCellCoord(O),zr=this._convertToYCellCoord(fe),qr=this._convertToXCellCoord(Re),pn=this._convertToYCellCoord(Oe);for(let Dn=Tr;Dn<=qr;Dn++)for(let nt=zr;nt<=pn;nt++)if(We.call(this,O,fe,Re,Oe,this.xCellCount*nt+Dn,Mt,zt,rr))return}_convertToXCellCoord(O){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(O*this.xScale)))}_convertToYCellCoord(O){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(O*this.yScale)))}_circlesCollide(O,fe,Re,Oe,We,Mt){const zt=Oe-O,rr=We-fe,Tr=Re+Mt;return Tr*Tr>zt*zt+rr*rr}_circleAndRectCollide(O,fe,Re,Oe,We,Mt,zt){const rr=(Mt-Oe)/2,Tr=Math.abs(O-(Oe+rr));if(Tr>rr+Re)return!1;const zr=(zt-We)/2,qr=Math.abs(fe-(We+zr));if(qr>zr+Re)return!1;if(Tr<=rr||qr<=zr)return!0;const pn=Tr-rr,Dn=qr-zr;return pn*pn+Dn*Dn<=Re*Re}}function Nr(Ze,O,fe,Re,Oe){const We=r.H();return O?(r.K(We,We,[1/Oe,1/Oe,1]),fe||r.ad(We,We,Re.angle)):r.L(We,Re.labelPlaneMatrix,Ze),We}function Jr(Ze,O,fe,Re,Oe){if(O){const We=r.ae(Ze);return r.K(We,We,[Oe,Oe,1]),fe||r.ad(We,We,-Re.angle),We}return Re.glCoordMatrix}function Dt(Ze,O,fe,Re){let Oe;Re?(Oe=[Ze,O,Re(Ze,O),1],r.af(Oe,Oe,fe)):(Oe=[Ze,O,0,1],Sr(Oe,Oe,fe));const We=Oe[3];return{point:new r.P(Oe[0]/We,Oe[1]/We),signedDistanceFromCamera:We,isOccluded:!1}}function $e(Ze,O){return .5+Ze/O*.5}function ot(Ze,O){return Ze.x>=-O[0]&&Ze.x<=O[0]&&Ze.y>=-O[1]&&Ze.y<=O[1]}function De(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn,nt){const ut=Re?Ze.textSizeData:Ze.iconSizeData,wt=r.ag(ut,fe.transform.zoom),kt=[256/fe.width*2+1,256/fe.height*2+1],Ht=Re?Ze.text.dynamicLayoutVertexArray:Ze.icon.dynamicLayoutVertexArray;Ht.clear();const Ot=Ze.lineVertexArray,Kt=Re?Ze.text.placedSymbolArray:Ze.icon.placedSymbolArray,Cr=fe.transform.width/fe.transform.height;let Or=!1;for(let Vr=0;Vr<Kt.length;Vr++){const sn=Kt.get(Vr);if(sn.hidden||sn.writingMode===r.ah.vertical&&!Or){Mr(sn.numGlyphs,Ht);continue}Or=!1;const bn=Dt(sn.anchorX,sn.anchorY,O,nt);if(!ot(bn.point,kt)){Mr(sn.numGlyphs,Ht);continue}const Un=$e(fe.transform.cameraToCenterDistance,bn.signedDistanceFromCamera),Gn=r.ai(ut,wt,sn),ua=Mt?Gn/Un:Gn*Un,Ha={getElevation:nt,labelPlaneMatrix:Oe,lineVertexArray:Ot,pitchWithMap:Mt,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:Tr,tileAnchorPoint:new r.P(sn.anchorX,sn.anchorY),unwrappedTileID:zr,width:qr,height:pn,translation:Dn},Ti=Ie(Ha,sn,ua,!1,zt,O,We,Ze.glyphOffsetArray,Ht,Cr,rr);Or=Ti.useVertical,(Ti.notEnoughRoom||Or||Ti.needsFlipping&&Ie(Ha,sn,ua,!0,zt,O,We,Ze.glyphOffsetArray,Ht,Cr,rr).notEnoughRoom)&&Mr(sn.numGlyphs,Ht)}Re?Ze.text.dynamicLayoutVertexBuffer.updateData(Ht):Ze.icon.dynamicLayoutVertexBuffer.updateData(Ht)}function Ee(Ze,O,fe,Re,Oe,We,Mt,zt){const rr=We.glyphStartIndex+We.numGlyphs,Tr=We.lineStartIndex,zr=We.lineStartIndex+We.lineLength,qr=O.getoffsetX(We.glyphStartIndex),pn=O.getoffsetX(rr-1),Dn=lr(Ze*qr,fe,Re,Oe,We.segment,Tr,zr,zt,Mt);if(!Dn)return null;const nt=lr(Ze*pn,fe,Re,Oe,We.segment,Tr,zr,zt,Mt);return nt?zt.projectionCache.anyProjectionOccluded?null:{first:Dn,last:nt}:null}function Ae(Ze,O,fe,Re){return Ze===r.ah.horizontal&&Math.abs(fe.y-O.y)>Math.abs(fe.x-O.x)*Re?{useVertical:!0}:(Ze===r.ah.vertical?O.y<fe.y:O.x>fe.x)?{needsFlipping:!0}:null}function Ie(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr){const qr=fe/24,pn=O.lineOffsetX*qr,Dn=O.lineOffsetY*qr;let nt;if(O.numGlyphs>1){const ut=O.glyphStartIndex+O.numGlyphs,wt=O.lineStartIndex,kt=O.lineStartIndex+O.lineLength,Ht=Ee(qr,zt,pn,Dn,Re,O,zr,Ze);if(!Ht)return{notEnoughRoom:!0};const Ot=Dt(Ht.first.point.x,Ht.first.point.y,Mt,Ze.getElevation).point,Kt=Dt(Ht.last.point.x,Ht.last.point.y,Mt,Ze.getElevation).point;if(Oe&&!Re){const Cr=Ae(O.writingMode,Ot,Kt,Tr);if(Cr)return Cr}nt=[Ht.first];for(let Cr=O.glyphStartIndex+1;Cr<ut-1;Cr++)nt.push(lr(qr*zt.getoffsetX(Cr),pn,Dn,Re,O.segment,wt,kt,Ze,zr));nt.push(Ht.last)}else{if(Oe&&!Re){const wt=Dt(Ze.tileAnchorPoint.x,Ze.tileAnchorPoint.y,We,Ze.getElevation).point,kt=O.lineStartIndex+O.segment+1,Ht=new r.P(Ze.lineVertexArray.getx(kt),Ze.lineVertexArray.gety(kt)),Ot=Dt(Ht.x,Ht.y,We,Ze.getElevation),Kt=Ot.signedDistanceFromCamera>0?Ot.point:(function(Or,Vr,sn,bn,Un,Gn){return tt(Or,Vr,sn,1,Un,Gn)})(Ze.tileAnchorPoint,Ht,wt,0,We,Ze),Cr=Ae(O.writingMode,wt,Kt,Tr);if(Cr)return Cr}const ut=lr(qr*zt.getoffsetX(O.glyphStartIndex),pn,Dn,Re,O.segment,O.lineStartIndex,O.lineStartIndex+O.lineLength,Ze,zr);if(!ut||Ze.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};nt=[ut]}for(const ut of nt)r.aj(rr,ut.point,ut.angle);return{}}function tt(Ze,O,fe,Re,Oe,We){const Mt=Ze.add(Ze.sub(O)._unit()),zt=Oe!==void 0?Dt(Mt.x,Mt.y,Oe,We.getElevation).point:Ft(Mt.x,Mt.y,We).point,rr=fe.sub(zt);return fe.add(rr._mult(Re/rr.mag()))}function st(Ze,O,fe){const Re=O.projectionCache;if(Re.projections[Ze])return Re.projections[Ze];const Oe=new r.P(O.lineVertexArray.getx(Ze),O.lineVertexArray.gety(Ze)),We=Ft(Oe.x,Oe.y,O);if(We.signedDistanceFromCamera>0)return Re.projections[Ze]=We.point,Re.anyProjectionOccluded=Re.anyProjectionOccluded||We.isOccluded,We.point;const Mt=Ze-fe.direction;return(function(zt,rr,Tr,zr,qr){return tt(zt,rr,Tr,zr,void 0,qr)})(fe.distanceFromAnchor===0?O.tileAnchorPoint:new r.P(O.lineVertexArray.getx(Mt),O.lineVertexArray.gety(Mt)),Oe,fe.previousVertex,fe.absOffsetX-fe.distanceFromAnchor+1,O)}function Ft(Ze,O,fe){const Re=Ze+fe.translation[0],Oe=O+fe.translation[1];let We;return!fe.pitchWithMap&&fe.projection.useSpecialProjectionForSymbols?(We=fe.projection.projectTileCoordinates(Re,Oe,fe.unwrappedTileID,fe.getElevation),We.point.x=(.5*We.point.x+.5)*fe.width,We.point.y=(.5*-We.point.y+.5)*fe.height):(We=Dt(Re,Oe,fe.labelPlaneMatrix,fe.getElevation),We.isOccluded=!1),We}function Nt(Ze,O,fe){return Ze._unit()._perp()._mult(O*fe)}function Xt(Ze,O,fe,Re,Oe,We,Mt,zt,rr){if(zt.projectionCache.offsets[Ze])return zt.projectionCache.offsets[Ze];const Tr=fe.add(O);if(Ze+rr.direction<Re||Ze+rr.direction>=Oe)return zt.projectionCache.offsets[Ze]=Tr,Tr;const zr=st(Ze+rr.direction,zt,rr),qr=Nt(zr.sub(fe),Mt,rr.direction),pn=fe.add(qr),Dn=zr.add(qr);return zt.projectionCache.offsets[Ze]=r.ak(We,Tr,pn,Dn)||Tr,zt.projectionCache.offsets[Ze]}function lr(Ze,O,fe,Re,Oe,We,Mt,zt,rr){const Tr=Re?Ze-O:Ze+O;let zr=Tr>0?1:-1,qr=0;Re&&(zr*=-1,qr=Math.PI),zr<0&&(qr+=Math.PI);let pn,Dn=zr>0?We+Oe:We+Oe+1;zt.projectionCache.cachedAnchorPoint?pn=zt.projectionCache.cachedAnchorPoint:(pn=Ft(zt.tileAnchorPoint.x,zt.tileAnchorPoint.y,zt).point,zt.projectionCache.cachedAnchorPoint=pn);let nt,ut,wt=pn,kt=pn,Ht=0,Ot=0;const Kt=Math.abs(Tr),Cr=[];let Or;for(;Ht+Ot<=Kt;){if(Dn+=zr,Dn<We||Dn>=Mt)return null;Ht+=Ot,kt=wt,ut=nt;const bn={absOffsetX:Kt,direction:zr,distanceFromAnchor:Ht,previousVertex:kt};if(wt=st(Dn,zt,bn),fe===0)Cr.push(kt),Or=wt.sub(kt);else{let Un;const Gn=wt.sub(kt);Un=Gn.mag()===0?Nt(st(Dn+zr,zt,bn).sub(wt),fe,zr):Nt(Gn,fe,zr),ut||(ut=kt.add(Un)),nt=Xt(Dn,Un,wt,We,Mt,ut,fe,zt,bn),Cr.push(ut),Or=nt.sub(ut)}Ot=Or.mag()}const Vr=Or._mult((Kt-Ht)/Ot)._add(ut||kt),sn=qr+Math.atan2(wt.y-kt.y,wt.x-kt.x);return Cr.push(Vr),{point:Vr,angle:rr?sn:0,path:Cr}}const Rr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Mr(Ze,O){for(let fe=0;fe<Ze;fe++){const Re=O.length;O.resize(Re+4),O.float32.set(Rr,3*Re)}}function Sr(Ze,O,fe){const Re=O[0],Oe=O[1];return Ze[0]=fe[0]*Re+fe[4]*Oe+fe[12],Ze[1]=fe[1]*Re+fe[5]*Oe+fe[13],Ze[3]=fe[3]*Re+fe[7]*Oe+fe[15],Ze}const Kr=100;class qn{constructor(O,fe,Re=new cn(O.width+200,O.height+200,25),Oe=new cn(O.width+200,O.height+200,25)){this.transform=O,this.mapProjection=fe,this.grid=Re,this.ignoredGrid=Oe,this.pitchFactor=Math.cos(O._pitch)*O.cameraToCenterDistance,this.screenRightBoundary=O.width+Kr,this.screenBottomBoundary=O.height+Kr,this.gridRightBoundary=O.width+200,this.gridBottomBoundary=O.height+200,this.perspectiveRatioCutoff=.6}placeCollisionBox(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr){const pn=O.anchorPointX+rr[0],Dn=O.anchorPointY+rr[1],nt=this.projectAndGetPerspectiveRatio(Oe,pn,Dn,We,zr),ut=Re*nt.perspectiveRatio;let wt;if(Mt||zt)wt=this._projectCollisionBox(O,ut,Oe,We,Mt,zt,rr,nt,zr,qr);else{const Cr=nt.point.x+(qr?qr.x*ut:0),Or=nt.point.y+(qr?qr.y*ut:0);wt={allPointsOccluded:!1,box:[Cr+O.x1*ut,Or+O.y1*ut,Cr+O.x2*ut,Or+O.y2*ut]}}const[kt,Ht,Ot,Kt]=wt.box;return this.mapProjection.useSpecialProjectionForSymbols&&(Mt?wt.allPointsOccluded:this.mapProjection.isOccluded(pn,Dn,We))||nt.perspectiveRatio<this.perspectiveRatioCutoff||!this.isInsideGrid(kt,Ht,Ot,Kt)||fe!=="always"&&this.grid.hitTest(kt,Ht,Ot,Kt,fe,Tr)?{box:[kt,Ht,Ot,Kt],placeable:!1,offscreen:!1}:{box:[kt,Ht,Ot,Kt],placeable:!0,offscreen:this.isOffscreen(kt,Ht,Ot,Kt)}}placeCollisionCircles(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn,nt,ut,wt){const kt=[],Ht=new r.P(fe.anchorX,fe.anchorY),Ot=this.getPerspectiveRatio(Mt,Ht.x,Ht.y,zt,wt),Kt=(qr?We/Ot:We*Ot)/r.ap,Cr={getElevation:wt,labelPlaneMatrix:rr,lineVertexArray:Re,pitchWithMap:qr,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:this.mapProjection,tileAnchorPoint:Ht,unwrappedTileID:zt,width:this.transform.width,height:this.transform.height,translation:ut},Or=Ee(Kt,Oe,fe.lineOffsetX*Kt,fe.lineOffsetY*Kt,!1,fe,!1,Cr);let Vr=!1,sn=!1,bn=!0;if(Or){const Un=.5*Dn*Ot+nt,Gn=new r.P(-100,-100),ua=new r.P(this.screenRightBoundary,this.screenBottomBoundary),Ha=new Br,Ti=Or.first,mi=Or.last;let Ai=[];for(let Po=Ti.path.length-1;Po>=1;Po--)Ai.push(Ti.path[Po]);for(let Po=1;Po<mi.path.length;Po++)Ai.push(mi.path[Po]);const po=2.5*Un;if(Tr){const Po=this.projectPathToScreenSpace(Ai,Cr,Tr);Ai=Po.some(us=>us.signedDistanceFromCamera<=0)?[]:Po.map(us=>us.point)}let Fo=[];if(Ai.length>0){const Po=Ai[0].clone(),us=Ai[0].clone();for(let il=1;il<Ai.length;il++)Po.x=Math.min(Po.x,Ai[il].x),Po.y=Math.min(Po.y,Ai[il].y),us.x=Math.max(us.x,Ai[il].x),us.y=Math.max(us.y,Ai[il].y);Fo=Po.x>=Gn.x&&us.x<=ua.x&&Po.y>=Gn.y&&us.y<=ua.y?[Ai]:us.x<Gn.x||Po.x>ua.x||us.y<Gn.y||Po.y>ua.y?[]:r.al([Ai],Gn.x,Gn.y,ua.x,ua.y)}for(const Po of Fo){Ha.reset(Po,.25*Un);let us=0;us=Ha.length<=.5*Un?1:Math.ceil(Ha.paddedLength/po)+1;for(let il=0;il<us;il++){const ol=il/Math.max(us-1,1),Bs=Ha.lerp(ol),hl=Bs.x+Kr,bu=Bs.y+Kr;kt.push(hl,bu,Un,0);const cu=hl-Un,js=bu-Un,Us=hl+Un,Bu=bu+Un;if(bn=bn&&this.isOffscreen(cu,js,Us,Bu),sn=sn||this.isInsideGrid(cu,js,Us,Bu),O!=="always"&&this.grid.hitTestCircle(hl,bu,Un,O,pn)&&(Vr=!0,!zr))return{circles:[],offscreen:!1,collisionDetected:Vr}}}}return{circles:!zr&&Vr||!sn||Ot<this.perspectiveRatioCutoff?[]:kt,offscreen:bn,collisionDetected:Vr}}projectPathToScreenSpace(O,fe,Re){return O.map(Oe=>Dt(Oe.x,Oe.y,Re,fe.getElevation))}queryRenderedSymbols(O){if(O.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};const fe=[];let Re=1/0,Oe=1/0,We=-1/0,Mt=-1/0;for(const zr of O){const qr=new r.P(zr.x+Kr,zr.y+Kr);Re=Math.min(Re,qr.x),Oe=Math.min(Oe,qr.y),We=Math.max(We,qr.x),Mt=Math.max(Mt,qr.y),fe.push(qr)}const zt=this.grid.query(Re,Oe,We,Mt).concat(this.ignoredGrid.query(Re,Oe,We,Mt)),rr={},Tr={};for(const zr of zt){const qr=zr.key;if(rr[qr.bucketInstanceId]===void 0&&(rr[qr.bucketInstanceId]={}),rr[qr.bucketInstanceId][qr.featureIndex])continue;const pn=[new r.P(zr.x1,zr.y1),new r.P(zr.x2,zr.y1),new r.P(zr.x2,zr.y2),new r.P(zr.x1,zr.y2)];r.am(fe,pn)&&(rr[qr.bucketInstanceId][qr.featureIndex]=!0,Tr[qr.bucketInstanceId]===void 0&&(Tr[qr.bucketInstanceId]=[]),Tr[qr.bucketInstanceId].push(qr.featureIndex))}return Tr}insertCollisionBox(O,fe,Re,Oe,We,Mt){(Re?this.ignoredGrid:this.grid).insert({bucketInstanceId:Oe,featureIndex:We,collisionGroupID:Mt,overlapMode:fe},O[0],O[1],O[2],O[3])}insertCollisionCircles(O,fe,Re,Oe,We,Mt){const zt=Re?this.ignoredGrid:this.grid,rr={bucketInstanceId:Oe,featureIndex:We,collisionGroupID:Mt,overlapMode:fe};for(let Tr=0;Tr<O.length;Tr+=4)zt.insertCircle(rr,O[Tr],O[Tr+1],O[Tr+2])}projectAndGetPerspectiveRatio(O,fe,Re,Oe,We){let Mt;We?(Mt=[fe,Re,We(fe,Re),1],r.af(Mt,Mt,O)):(Mt=[fe,Re,0,1],Sr(Mt,Mt,O));const zt=Mt[3];return{point:new r.P((Mt[0]/zt+1)/2*this.transform.width+Kr,(-Mt[1]/zt+1)/2*this.transform.height+Kr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/zt*.5,isOccluded:!1,signedDistanceFromCamera:zt}}getPerspectiveRatio(O,fe,Re,Oe,We){const Mt=this.mapProjection.useSpecialProjectionForSymbols?this.mapProjection.projectTileCoordinates(fe,Re,Oe,We):Dt(fe,Re,O,We);return .5+this.transform.cameraToCenterDistance/Mt.signedDistanceFromCamera*.5}isOffscreen(O,fe,Re,Oe){return Re<Kr||O>=this.screenRightBoundary||Oe<Kr||fe>this.screenBottomBoundary}isInsideGrid(O,fe,Re,Oe){return Re>=0&&O<this.gridRightBoundary&&Oe>=0&&fe<this.gridBottomBoundary}getViewportMatrix(){const O=r.an([]);return r.J(O,O,[-100,-100,0]),O}_projectCollisionBox(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr){let qr=new r.P(1,0),pn=new r.P(0,1);const Dn=new r.P(O.anchorPointX+zt[0],O.anchorPointY+zt[1]);if(Mt&&!We){const bn=this.projectAndGetPerspectiveRatio(Re,Dn.x+1,Dn.y,Oe,Tr).point.sub(rr.point).unit(),Un=Math.atan(bn.y/bn.x)+(bn.x<0?Math.PI:0),Gn=Math.sin(Un),ua=Math.cos(Un);qr=new r.P(ua,Gn),pn=new r.P(-Gn,ua)}else if(!Mt&&We){const bn=-this.transform.angle,Un=Math.sin(bn),Gn=Math.cos(bn);qr=new r.P(Gn,Un),pn=new r.P(-Un,Gn)}let nt=rr.point,ut=fe;if(We){nt=Dn;const bn=this.transform.zoom-Math.floor(this.transform.zoom);ut=Math.pow(2,-bn),ut*=this.mapProjection.getPitchedTextCorrection(this.transform,Dn,Oe),zr||(ut*=r.ac(.5+rr.signedDistanceFromCamera/this.transform.cameraToCenterDistance*.5,0,4))}zr&&(nt=nt.add(qr.mult(zr.x*ut)).add(pn.mult(zr.y*ut)));const wt=O.x1*ut,kt=O.x2*ut,Ht=(wt+kt)/2,Ot=O.y1*ut,Kt=O.y2*ut,Cr=(Ot+Kt)/2,Or=[{offsetX:wt,offsetY:Ot},{offsetX:Ht,offsetY:Ot},{offsetX:kt,offsetY:Ot},{offsetX:kt,offsetY:Cr},{offsetX:kt,offsetY:Kt},{offsetX:Ht,offsetY:Kt},{offsetX:wt,offsetY:Kt},{offsetX:wt,offsetY:Cr}];let Vr=[];for(const{offsetX:bn,offsetY:Un}of Or)Vr.push(new r.P(nt.x+qr.x*bn+pn.x*Un,nt.y+qr.y*bn+pn.y*Un));let sn=!1;if(We){const bn=Vr.map(Un=>this.projectAndGetPerspectiveRatio(Re,Un.x,Un.y,Oe,Tr));sn=bn.some(Un=>!Un.isOccluded),Vr=bn.map(Un=>Un.point)}else sn=!0;return{box:r.ao(Vr),allPointsOccluded:!sn}}}function ha(Ze,O,fe){return O*(r.X/(Ze.tileSize*Math.pow(2,fe-Ze.tileID.overscaledZ)))}class ia{constructor(O,fe,Re,Oe){this.opacity=O?Math.max(0,Math.min(1,O.opacity+(O.placed?fe:-fe))):Oe&&Re?1:0,this.placed=Re}isHidden(){return this.opacity===0&&!this.placed}}class xa{constructor(O,fe,Re,Oe,We){this.text=new ia(O?O.text:null,fe,Re,We),this.icon=new ia(O?O.icon:null,fe,Oe,We)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class ba{constructor(O,fe,Re){this.text=O,this.icon=fe,this.skipFade=Re}}class ea{constructor(){this.invProjMatrix=r.H(),this.viewportMatrix=r.H(),this.circles=[]}}class Za{constructor(O,fe,Re,Oe,We){this.bucketInstanceId=O,this.featureIndex=fe,this.sourceLayerIndex=Re,this.bucketIndex=Oe,this.tileID=We}}class ui{constructor(O){this.crossSourceCollisions=O,this.maxGroupID=0,this.collisionGroups={}}get(O){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[O]){const fe=++this.maxGroupID;this.collisionGroups[O]={ID:fe,predicate:Re=>Re.collisionGroupID===fe}}return this.collisionGroups[O]}}function _r(Ze,O,fe,Re,Oe){const{horizontalAlign:We,verticalAlign:Mt}=r.au(Ze);return new r.P(-(We-.5)*O+Re[0]*Oe,-(Mt-.5)*fe+Re[1]*Oe)}class Qt{constructor(O,fe,Re,Oe,We,Mt){this.transform=O.clone(),this.terrain=Re,this.collisionIndex=new qn(this.transform,fe),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Oe,this.retainedQueryData={},this.collisionGroups=new ui(We),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Mt,Mt&&(Mt.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(O){const fe=this.terrain;return fe?(Re,Oe)=>fe.getElevation(O,Re,Oe):null}getBucketParts(O,fe,Re,Oe){const We=Re.getBucket(fe),Mt=Re.latestFeatureIndex;if(!We||!Mt||fe.id!==We.layerIds[0])return;const zt=Re.collisionBoxArray,rr=We.layers[0].layout,Tr=We.layers[0].paint,zr=Math.pow(2,this.transform.zoom-Re.tileID.overscaledZ),qr=Re.tileSize/r.X,pn=Re.tileID.toUnwrapped(),Dn=this.transform.calculatePosMatrix(pn),nt=rr.get("text-pitch-alignment")==="map",ut=rr.get("text-rotation-alignment")==="map",wt=ha(Re,1,this.transform.zoom),kt=this.collisionIndex.mapProjection.translatePosition(this.transform,Re,Tr.get("text-translate"),Tr.get("text-translate-anchor")),Ht=this.collisionIndex.mapProjection.translatePosition(this.transform,Re,Tr.get("icon-translate"),Tr.get("icon-translate-anchor")),Ot=Nr(Dn,nt,ut,this.transform,wt);let Kt=null;if(nt){const Or=Jr(Dn,nt,ut,this.transform,wt);Kt=r.L([],this.transform.labelPlaneMatrix,Or)}this.retainedQueryData[We.bucketInstanceId]=new Za(We.bucketInstanceId,Mt,We.sourceLayerIndex,We.index,Re.tileID);const Cr={bucket:We,layout:rr,translationText:kt,translationIcon:Ht,posMatrix:Dn,unwrappedTileID:pn,textLabelPlaneMatrix:Ot,labelToScreenMatrix:Kt,scale:zr,textPixelRatio:qr,holdingForFade:Re.holdingForFade(),collisionBoxArray:zt,partiallyEvaluatedTextSize:r.ag(We.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(We.sourceID)};if(Oe)for(const Or of We.sortKeyRanges){const{sortKey:Vr,symbolInstanceStart:sn,symbolInstanceEnd:bn}=Or;O.push({sortKey:Vr,symbolInstanceStart:sn,symbolInstanceEnd:bn,parameters:Cr})}else O.push({symbolInstanceStart:0,symbolInstanceEnd:We.symbolInstances.length,parameters:Cr})}attemptAnchorPlacement(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn,nt,ut,wt,kt,Ht,Ot){const Kt=r.aq[O.textAnchor],Cr=[O.textOffset0,O.textOffset1],Or=_r(Kt,Re,Oe,Cr,We),Vr=this.collisionIndex.placeCollisionBox(fe,pn,rr,Tr,zr,zt,Mt,wt,qr.predicate,Ot,Or);if((!Ht||this.collisionIndex.placeCollisionBox(Ht,pn,rr,Tr,zr,zt,Mt,kt,qr.predicate,Ot,Or).placeable)&&Vr.placeable){let sn;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Dn.crossTileID]&&this.prevPlacement.placements[Dn.crossTileID]&&this.prevPlacement.placements[Dn.crossTileID].text&&(sn=this.prevPlacement.variableOffsets[Dn.crossTileID].anchor),Dn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Dn.crossTileID]={textOffset:Cr,width:Re,height:Oe,anchor:Kt,textBoxScale:We,prevAnchor:sn},this.markUsedJustification(nt,Kt,Dn,ut),nt.allowVerticalPlacement&&(this.markUsedOrientation(nt,ut,Dn),this.placedOrientations[Dn.crossTileID]=ut),{shift:Or,placedGlyphBoxes:Vr}}}placeLayerBucketPart(O,fe,Re){const{bucket:Oe,layout:We,translationText:Mt,translationIcon:zt,posMatrix:rr,unwrappedTileID:Tr,textLabelPlaneMatrix:zr,labelToScreenMatrix:qr,textPixelRatio:pn,holdingForFade:Dn,collisionBoxArray:nt,partiallyEvaluatedTextSize:ut,collisionGroup:wt}=O.parameters,kt=We.get("text-optional"),Ht=We.get("icon-optional"),Ot=r.ar(We,"text-overlap","text-allow-overlap"),Kt=Ot==="always",Cr=r.ar(We,"icon-overlap","icon-allow-overlap"),Or=Cr==="always",Vr=We.get("text-rotation-alignment")==="map",sn=We.get("text-pitch-alignment")==="map",bn=We.get("icon-text-fit")!=="none",Un=We.get("symbol-z-order")==="viewport-y",Gn=Kt&&(Or||!Oe.hasIconData()||Ht),ua=Or&&(Kt||!Oe.hasTextData()||kt);!Oe.collisionArrays&&nt&&Oe.deserializeCollisionBoxes(nt);const Ha=this._getTerrainElevationFunc(this.retainedQueryData[Oe.bucketInstanceId].tileID),Ti=(mi,Ai,po)=>{var Fo,Po;if(fe[mi.crossTileID])return;if(Dn)return void(this.placements[mi.crossTileID]=new ba(!1,!1,!1));let us=!1,il=!1,ol=!0,Bs=null,hl={box:null,placeable:!1,offscreen:null},bu={placeable:!1},cu=null,js=null,Us=null,Bu=0,pc=0,Xc=0;Ai.textFeatureIndex?Bu=Ai.textFeatureIndex:mi.useRuntimeCollisionCircles&&(Bu=mi.featureIndex),Ai.verticalTextFeatureIndex&&(pc=Ai.verticalTextFeatureIndex);const Te=Ai.textBox;if(Te){const It=Pr=>{let ln=r.ah.horizontal;if(Oe.allowVerticalPlacement&&!Pr&&this.prevPlacement){const on=this.prevPlacement.placedOrientations[mi.crossTileID];on&&(this.placedOrientations[mi.crossTileID]=on,ln=on,this.markUsedOrientation(Oe,ln,mi))}return ln},Ut=(Pr,ln)=>{if(Oe.allowVerticalPlacement&&mi.numVerticalGlyphVertices>0&&Ai.verticalTextBox){for(const on of Oe.writingModes)if(on===r.ah.vertical?(hl=ln(),bu=hl):hl=Pr(),hl&&hl.placeable)break}else hl=Pr()},hr=mi.textAnchorOffsetStartIndex,fr=mi.textAnchorOffsetEndIndex;if(fr===hr){const Pr=(ln,on)=>{const Mn=this.collisionIndex.placeCollisionBox(ln,Ot,pn,rr,Tr,sn,Vr,Mt,wt.predicate,Ha);return Mn&&Mn.placeable&&(this.markUsedOrientation(Oe,on,mi),this.placedOrientations[mi.crossTileID]=on),Mn};Ut(()=>Pr(Te,r.ah.horizontal),()=>{const ln=Ai.verticalTextBox;return Oe.allowVerticalPlacement&&mi.numVerticalGlyphVertices>0&&ln?Pr(ln,r.ah.vertical):{box:null,offscreen:null}}),It(hl&&hl.placeable)}else{let Pr=r.aq[(Po=(Fo=this.prevPlacement)===null||Fo===void 0?void 0:Fo.variableOffsets[mi.crossTileID])===null||Po===void 0?void 0:Po.anchor];const ln=(Mn,jn,Vn)=>{const Ka=Mn.x2-Mn.x1,Zn=Mn.y2-Mn.y1,ya=mi.textBoxScale,Sa=bn&&Cr==="never"?jn:null;let Xa=null,Qa=Ot==="never"?1:2,Aa="never";Pr&&Qa++;for(let Si=0;Si<Qa;Si++){for(let ho=hr;ho<fr;ho++){const Ki=Oe.textAnchorOffsets.get(ho);if(Pr&&Ki.textAnchor!==Pr)continue;const lo=this.attemptAnchorPlacement(Ki,Mn,Ka,Zn,ya,Vr,sn,pn,rr,Tr,wt,Aa,mi,Oe,Vn,Mt,zt,Sa,Ha);if(lo&&(Xa=lo.placedGlyphBoxes,Xa&&Xa.placeable))return us=!0,Bs=lo.shift,Xa}Pr?Pr=null:Aa=Ot}return Re&&!Xa&&(Xa={box:this.collisionIndex.placeCollisionBox(Te,"always",pn,rr,Tr,sn,Vr,Mt,wt.predicate,Ha,new r.P(0,0)).box,offscreen:!1,placeable:!1}),Xa};Ut(()=>ln(Te,Ai.iconBox,r.ah.horizontal),()=>{const Mn=Ai.verticalTextBox;return Oe.allowVerticalPlacement&&(!hl||!hl.placeable)&&mi.numVerticalGlyphVertices>0&&Mn?ln(Mn,Ai.verticalIconBox,r.ah.vertical):{box:null,occluded:!0,offscreen:null}}),hl&&(us=hl.placeable,ol=hl.offscreen);const on=It(hl&&hl.placeable);if(!us&&this.prevPlacement){const Mn=this.prevPlacement.variableOffsets[mi.crossTileID];Mn&&(this.variableOffsets[mi.crossTileID]=Mn,this.markUsedJustification(Oe,Mn.anchor,mi,on))}}}if(cu=hl,us=cu&&cu.placeable,ol=cu&&cu.offscreen,mi.useRuntimeCollisionCircles){const It=Oe.text.placedSymbolArray.get(mi.centerJustifiedTextSymbolIndex),Ut=r.ai(Oe.textSizeData,ut,It),hr=We.get("text-padding");js=this.collisionIndex.placeCollisionCircles(Ot,It,Oe.lineVertexArray,Oe.glyphOffsetArray,Ut,rr,Tr,zr,qr,Re,sn,wt.predicate,mi.collisionCircleDiameter,hr,Mt,Ha),js.circles.length&&js.collisionDetected&&!Re&&r.w("Collisions detected, but collision boxes are not shown"),us=Kt||js.circles.length>0&&!js.collisionDetected,ol=ol&&js.offscreen}if(Ai.iconFeatureIndex&&(Xc=Ai.iconFeatureIndex),Ai.iconBox){const It=Ut=>this.collisionIndex.placeCollisionBox(Ut,Cr,pn,rr,Tr,sn,Vr,zt,wt.predicate,Ha,bn&&Bs?Bs:void 0);bu&&bu.placeable&&Ai.verticalIconBox?(Us=It(Ai.verticalIconBox),il=Us.placeable):(Us=It(Ai.iconBox),il=Us.placeable),ol=ol&&Us.offscreen}const He=kt||mi.numHorizontalGlyphVertices===0&&mi.numVerticalGlyphVertices===0,ct=Ht||mi.numIconVertices===0;He||ct?ct?He||(il=il&&us):us=il&&us:il=us=il&&us;const Pt=il&&Us.placeable;if(us&&cu.placeable&&this.collisionIndex.insertCollisionBox(cu.box,Ot,We.get("text-ignore-placement"),Oe.bucketInstanceId,bu&&bu.placeable&&pc?pc:Bu,wt.ID),Pt&&this.collisionIndex.insertCollisionBox(Us.box,Cr,We.get("icon-ignore-placement"),Oe.bucketInstanceId,Xc,wt.ID),js&&us&&this.collisionIndex.insertCollisionCircles(js.circles,Ot,We.get("text-ignore-placement"),Oe.bucketInstanceId,Bu,wt.ID),Re&&this.storeCollisionData(Oe.bucketInstanceId,po,Ai,cu,Us,js),mi.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(Oe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[mi.crossTileID]=new ba(us||Gn,il||ua,ol||Oe.justReloaded),fe[mi.crossTileID]=!0};if(Un){if(O.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");const mi=Oe.getSortedSymbolIndexes(this.transform.angle);for(let Ai=mi.length-1;Ai>=0;--Ai){const po=mi[Ai];Ti(Oe.symbolInstances.get(po),Oe.collisionArrays[po],po)}}else for(let mi=O.symbolInstanceStart;mi<O.symbolInstanceEnd;mi++)Ti(Oe.symbolInstances.get(mi),Oe.collisionArrays[mi],mi);if(Re&&Oe.bucketInstanceId in this.collisionCircleArrays){const mi=this.collisionCircleArrays[Oe.bucketInstanceId];r.as(mi.invProjMatrix,rr),mi.viewportMatrix=this.collisionIndex.getViewportMatrix()}Oe.justReloaded=!1}storeCollisionData(O,fe,Re,Oe,We,Mt){if(Re.textBox||Re.iconBox){let zt,rr;this.collisionBoxArrays.has(O)?zt=this.collisionBoxArrays.get(O):(zt=new Map,this.collisionBoxArrays.set(O,zt)),zt.has(fe)?rr=zt.get(fe):(rr={text:null,icon:null},zt.set(fe,rr)),Re.textBox&&(rr.text=Oe.box),Re.iconBox&&(rr.icon=We.box)}if(Mt){let zt=this.collisionCircleArrays[O];zt===void 0&&(zt=this.collisionCircleArrays[O]=new ea);for(let rr=0;rr<Mt.circles.length;rr+=4)zt.circles.push(Mt.circles[rr+0]),zt.circles.push(Mt.circles[rr+1]),zt.circles.push(Mt.circles[rr+2]),zt.circles.push(Mt.collisionDetected?1:0)}}markUsedJustification(O,fe,Re,Oe){let We;We=Oe===r.ah.vertical?Re.verticalPlacedTextSymbolIndex:{left:Re.leftJustifiedTextSymbolIndex,center:Re.centerJustifiedTextSymbolIndex,right:Re.rightJustifiedTextSymbolIndex}[r.at(fe)];const Mt=[Re.leftJustifiedTextSymbolIndex,Re.centerJustifiedTextSymbolIndex,Re.rightJustifiedTextSymbolIndex,Re.verticalPlacedTextSymbolIndex];for(const zt of Mt)zt>=0&&(O.text.placedSymbolArray.get(zt).crossTileID=We>=0&&zt!==We?0:Re.crossTileID)}markUsedOrientation(O,fe,Re){const Oe=fe===r.ah.horizontal||fe===r.ah.horizontalOnly?fe:0,We=fe===r.ah.vertical?fe:0,Mt=[Re.leftJustifiedTextSymbolIndex,Re.centerJustifiedTextSymbolIndex,Re.rightJustifiedTextSymbolIndex];for(const zt of Mt)O.text.placedSymbolArray.get(zt).placedOrientation=Oe;Re.verticalPlacedTextSymbolIndex&&(O.text.placedSymbolArray.get(Re.verticalPlacedTextSymbolIndex).placedOrientation=We)}commit(O){this.commitTime=O,this.zoomAtLastRecencyCheck=this.transform.zoom;const fe=this.prevPlacement;let Re=!1;this.prevZoomAdjustment=fe?fe.zoomAdjustment(this.transform.zoom):0;const Oe=fe?fe.symbolFadeChange(O):1,We=fe?fe.opacities:{},Mt=fe?fe.variableOffsets:{},zt=fe?fe.placedOrientations:{};for(const rr in this.placements){const Tr=this.placements[rr],zr=We[rr];zr?(this.opacities[rr]=new xa(zr,Oe,Tr.text,Tr.icon),Re=Re||Tr.text!==zr.text.placed||Tr.icon!==zr.icon.placed):(this.opacities[rr]=new xa(null,Oe,Tr.text,Tr.icon,Tr.skipFade),Re=Re||Tr.text||Tr.icon)}for(const rr in We){const Tr=We[rr];if(!this.opacities[rr]){const zr=new xa(Tr,Oe,!1,!1);zr.isHidden()||(this.opacities[rr]=zr,Re=Re||Tr.text.placed||Tr.icon.placed)}}for(const rr in Mt)this.variableOffsets[rr]||!this.opacities[rr]||this.opacities[rr].isHidden()||(this.variableOffsets[rr]=Mt[rr]);for(const rr in zt)this.placedOrientations[rr]||!this.opacities[rr]||this.opacities[rr].isHidden()||(this.placedOrientations[rr]=zt[rr]);if(fe&&fe.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");Re?this.lastPlacementChangeTime=O:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=fe?fe.lastPlacementChangeTime:O)}updateLayerOpacities(O,fe){const Re={};for(const Oe of fe){const We=Oe.getBucket(O);We&&Oe.latestFeatureIndex&&O.id===We.layerIds[0]&&this.updateBucketOpacities(We,Oe.tileID,Re,Oe.collisionBoxArray)}}updateBucketOpacities(O,fe,Re,Oe){O.hasTextData()&&(O.text.opacityVertexArray.clear(),O.text.hasVisibleVertices=!1),O.hasIconData()&&(O.icon.opacityVertexArray.clear(),O.icon.hasVisibleVertices=!1),O.hasIconCollisionBoxData()&&O.iconCollisionBox.collisionVertexArray.clear(),O.hasTextCollisionBoxData()&&O.textCollisionBox.collisionVertexArray.clear();const We=O.layers[0],Mt=We.layout,zt=new xa(null,0,!1,!1,!0),rr=Mt.get("text-allow-overlap"),Tr=Mt.get("icon-allow-overlap"),zr=We._unevaluatedLayout.hasValue("text-variable-anchor")||We._unevaluatedLayout.hasValue("text-variable-anchor-offset"),qr=Mt.get("text-rotation-alignment")==="map",pn=Mt.get("text-pitch-alignment")==="map",Dn=Mt.get("icon-text-fit")!=="none",nt=new xa(null,0,rr&&(Tr||!O.hasIconData()||Mt.get("icon-optional")),Tr&&(rr||!O.hasTextData()||Mt.get("text-optional")),!0);!O.collisionArrays&&Oe&&(O.hasIconCollisionBoxData()||O.hasTextCollisionBoxData())&&O.deserializeCollisionBoxes(Oe);const ut=(kt,Ht,Ot)=>{for(let Kt=0;Kt<Ht/4;Kt++)kt.opacityVertexArray.emplaceBack(Ot);kt.hasVisibleVertices=kt.hasVisibleVertices||Ot!==Fa},wt=this.collisionBoxArrays.get(O.bucketInstanceId);for(let kt=0;kt<O.symbolInstances.length;kt++){const Ht=O.symbolInstances.get(kt),{numHorizontalGlyphVertices:Ot,numVerticalGlyphVertices:Kt,crossTileID:Cr}=Ht;let Or=this.opacities[Cr];Re[Cr]?Or=zt:Or||(Or=nt,this.opacities[Cr]=Or),Re[Cr]=!0;const Vr=Ht.numIconVertices>0,sn=this.placedOrientations[Ht.crossTileID],bn=sn===r.ah.vertical,Un=sn===r.ah.horizontal||sn===r.ah.horizontalOnly;if(Ot>0||Kt>0){const ua=Pa(Or.text);ut(O.text,Ot,bn?Fa:ua),ut(O.text,Kt,Un?Fa:ua);const Ha=Or.text.isHidden();[Ht.rightJustifiedTextSymbolIndex,Ht.centerJustifiedTextSymbolIndex,Ht.leftJustifiedTextSymbolIndex].forEach(Ai=>{Ai>=0&&(O.text.placedSymbolArray.get(Ai).hidden=Ha||bn?1:0)}),Ht.verticalPlacedTextSymbolIndex>=0&&(O.text.placedSymbolArray.get(Ht.verticalPlacedTextSymbolIndex).hidden=Ha||Un?1:0);const Ti=this.variableOffsets[Ht.crossTileID];Ti&&this.markUsedJustification(O,Ti.anchor,Ht,sn);const mi=this.placedOrientations[Ht.crossTileID];mi&&(this.markUsedJustification(O,"left",Ht,mi),this.markUsedOrientation(O,mi,Ht))}if(Vr){const ua=Pa(Or.icon),Ha=!(Dn&&Ht.verticalPlacedIconSymbolIndex&&bn);Ht.placedIconSymbolIndex>=0&&(ut(O.icon,Ht.numIconVertices,Ha?ua:Fa),O.icon.placedSymbolArray.get(Ht.placedIconSymbolIndex).hidden=Or.icon.isHidden()),Ht.verticalPlacedIconSymbolIndex>=0&&(ut(O.icon,Ht.numVerticalIconVertices,Ha?Fa:ua),O.icon.placedSymbolArray.get(Ht.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}const Gn=wt&&wt.has(kt)?wt.get(kt):{text:null,icon:null};if(O.hasIconCollisionBoxData()||O.hasTextCollisionBoxData()){const ua=O.collisionArrays[kt];if(ua){let Ha=new r.P(0,0);if(ua.textBox||ua.verticalTextBox){let Ti=!0;if(zr){const mi=this.variableOffsets[Cr];mi?(Ha=_r(mi.anchor,mi.width,mi.height,mi.textOffset,mi.textBoxScale),qr&&Ha._rotate(pn?this.transform.angle:-this.transform.angle)):Ti=!1}if(ua.textBox||ua.verticalTextBox){let mi;ua.textBox&&(mi=bn),ua.verticalTextBox&&(mi=Un),yr(O.textCollisionBox.collisionVertexArray,Or.text.placed,!Ti||mi,Gn.text,Ha.x,Ha.y)}}if(ua.iconBox||ua.verticalIconBox){const Ti=!!(!Un&&ua.verticalIconBox);let mi;ua.iconBox&&(mi=Ti),ua.verticalIconBox&&(mi=!Ti),yr(O.iconCollisionBox.collisionVertexArray,Or.icon.placed,mi,Gn.icon,Dn?Ha.x:0,Dn?Ha.y:0)}}}}if(O.sortFeatures(this.transform.angle),this.retainedQueryData[O.bucketInstanceId]&&(this.retainedQueryData[O.bucketInstanceId].featureSortOrder=O.featureSortOrder),O.hasTextData()&&O.text.opacityVertexBuffer&&O.text.opacityVertexBuffer.updateData(O.text.opacityVertexArray),O.hasIconData()&&O.icon.opacityVertexBuffer&&O.icon.opacityVertexBuffer.updateData(O.icon.opacityVertexArray),O.hasIconCollisionBoxData()&&O.iconCollisionBox.collisionVertexBuffer&&O.iconCollisionBox.collisionVertexBuffer.updateData(O.iconCollisionBox.collisionVertexArray),O.hasTextCollisionBoxData()&&O.textCollisionBox.collisionVertexBuffer&&O.textCollisionBox.collisionVertexBuffer.updateData(O.textCollisionBox.collisionVertexArray),O.text.opacityVertexArray.length!==O.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${O.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${O.text.layoutVertexArray.length}) / 4`);if(O.icon.opacityVertexArray.length!==O.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${O.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${O.icon.layoutVertexArray.length}) / 4`);if(O.bucketInstanceId in this.collisionCircleArrays){const kt=this.collisionCircleArrays[O.bucketInstanceId];O.placementInvProjMatrix=kt.invProjMatrix,O.placementViewportMatrix=kt.viewportMatrix,O.collisionCircleArray=kt.circles,delete this.collisionCircleArrays[O.bucketInstanceId]}}symbolFadeChange(O){return this.fadeDuration===0?1:(O-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(O){return Math.max(0,(this.transform.zoom-O)/1.5)}hasTransitions(O){return this.stale||O-this.lastPlacementChangeTime<this.fadeDuration}stillRecent(O,fe){const Re=this.zoomAtLastRecencyCheck===fe?1-this.zoomAdjustment(fe):1;return this.zoomAtLastRecencyCheck=fe,this.commitTime+this.fadeDuration*Re>O}setStale(){this.stale=!0}}function yr(Ze,O,fe,Re,Oe,We){Re&&Re.length!==0||(Re=[0,0,0,0]);const Mt=Re[0]-Kr,zt=Re[1]-Kr,rr=Re[2]-Kr,Tr=Re[3]-Kr;Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,Mt,zt),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,rr,zt),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,rr,Tr),Ze.emplaceBack(O?1:0,fe?1:0,Oe||0,We||0,Mt,Tr)}const br=Math.pow(2,25),nn=Math.pow(2,24),wn=Math.pow(2,17),Ln=Math.pow(2,16),Fn=Math.pow(2,9),va=Math.pow(2,8),Da=Math.pow(2,1);function Pa(Ze){if(Ze.opacity===0&&!Ze.placed)return 0;if(Ze.opacity===1&&Ze.placed)return 4294967295;const O=Ze.placed?1:0,fe=Math.floor(127*Ze.opacity);return fe*br+O*nn+fe*wn+O*Ln+fe*Fn+O*va+fe*Da+O}const Fa=0;function $a(){return{isOccluded:(Ze,O,fe)=>!1,getPitchedTextCorrection:(Ze,O,fe)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Ze,O,fe,Re){throw new Error("Not implemented.")},translatePosition:(Ze,O,fe,Re)=>(function(Oe,We,Mt,zt,rr=!1){if(!Mt[0]&&!Mt[1])return[0,0];const Tr=rr?zt==="map"?Oe.angle:0:zt==="viewport"?-Oe.angle:0;if(Tr){const zr=Math.sin(Tr),qr=Math.cos(Tr);Mt=[Mt[0]*qr-Mt[1]*zr,Mt[0]*zr+Mt[1]*qr]}return[rr?Mt[0]:ha(We,Mt[0],Oe.zoom),rr?Mt[1]:ha(We,Mt[1],Oe.zoom)]})(Ze,O,fe,Re),getCircleRadiusCorrection:Ze=>1}}class oa{constructor(O){this._sortAcrossTiles=O.layout.get("symbol-z-order")!=="viewport-y"&&!O.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(O,fe,Re,Oe,We){const Mt=this._bucketParts;for(;this._currentTileIndex<O.length;)if(fe.getBucketParts(Mt,Oe,O[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,We())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Mt.sort((zt,rr)=>zt.sortKey-rr.sortKey));this._currentPartIndex<Mt.length;)if(fe.placeLayerBucketPart(Mt[this._currentPartIndex],this._seenCrossTileIDs,Re),this._currentPartIndex++,We())return!0;return!1}}class zi{constructor(O,fe,Re,Oe,We,Mt,zt,rr){this.placement=new Qt(O,$a(),fe,Mt,zt,rr),this._currentPlacementIndex=Re.length-1,this._forceFullPlacement=Oe,this._showCollisionBoxes=We,this._done=!1}isDone(){return this._done}continuePlacement(O,fe,Re){const Oe=s.now(),We=()=>!this._forceFullPlacement&&s.now()-Oe>2;for(;this._currentPlacementIndex>=0;){const Mt=fe[O[this._currentPlacementIndex]],zt=this.placement.collisionIndex.transform.zoom;if(Mt.type==="symbol"&&(!Mt.minzoom||Mt.minzoom<=zt)&&(!Mt.maxzoom||Mt.maxzoom>zt)){if(this._inProgressLayer||(this._inProgressLayer=new oa(Mt)),this._inProgressLayer.continuePlacement(Re[Mt.source],this.placement,this._showCollisionBoxes,Mt,We))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(O){return this.placement.commit(O),this.placement}}const Gi=512/r.X/2;class qt{constructor(O,fe,Re){this.tileID=O,this.bucketInstanceId=Re,this._symbolsByKey={};const Oe=new Map;for(let We=0;We<fe.length;We++){const Mt=fe.get(We),zt=Mt.key,rr=Oe.get(zt);rr?rr.push(Mt):Oe.set(zt,[Mt])}for(const[We,Mt]of Oe){const zt={positions:Mt.map(rr=>({x:Math.floor(rr.anchorX*Gi),y:Math.floor(rr.anchorY*Gi)})),crossTileIDs:Mt.map(rr=>rr.crossTileID)};if(zt.positions.length>128){const rr=new r.av(zt.positions.length,16,Uint16Array);for(const{x:Tr,y:zr}of zt.positions)rr.add(Tr,zr);rr.finish(),delete zt.positions,zt.index=rr}this._symbolsByKey[We]=zt}}getScaledCoordinates(O,fe){const{x:Re,y:Oe,z:We}=this.tileID.canonical,{x:Mt,y:zt,z:rr}=fe.canonical,Tr=Gi/Math.pow(2,rr-We),zr=(zt*r.X+O.anchorY)*Tr,qr=Oe*r.X*Gi;return{x:Math.floor((Mt*r.X+O.anchorX)*Tr-Re*r.X*Gi),y:Math.floor(zr-qr)}}findMatches(O,fe,Re){const Oe=this.tileID.canonical.z<fe.canonical.z?1:Math.pow(2,this.tileID.canonical.z-fe.canonical.z);for(let We=0;We<O.length;We++){const Mt=O.get(We);if(Mt.crossTileID)continue;const zt=this._symbolsByKey[Mt.key];if(!zt)continue;const rr=this.getScaledCoordinates(Mt,fe);if(zt.index){const Tr=zt.index.range(rr.x-Oe,rr.y-Oe,rr.x+Oe,rr.y+Oe).sort();for(const zr of Tr){const qr=zt.crossTileIDs[zr];if(!Re[qr]){Re[qr]=!0,Mt.crossTileID=qr;break}}}else if(zt.positions)for(let Tr=0;Tr<zt.positions.length;Tr++){const zr=zt.positions[Tr],qr=zt.crossTileIDs[Tr];if(Math.abs(zr.x-rr.x)<=Oe&&Math.abs(zr.y-rr.y)<=Oe&&!Re[qr]){Re[qr]=!0,Mt.crossTileID=qr;break}}}}getCrossTileIDsLists(){return Object.values(this._symbolsByKey).map(({crossTileIDs:O})=>O)}}class Ct{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ur{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(O){const fe=Math.round((O-this.lng)/360);if(fe!==0)for(const Re in this.indexes){const Oe=this.indexes[Re],We={};for(const Mt in Oe){const zt=Oe[Mt];zt.tileID=zt.tileID.unwrapTo(zt.tileID.wrap+fe),We[zt.tileID.key]=zt}this.indexes[Re]=We}this.lng=O}addBucket(O,fe,Re){if(this.indexes[O.overscaledZ]&&this.indexes[O.overscaledZ][O.key]){if(this.indexes[O.overscaledZ][O.key].bucketInstanceId===fe.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(O.overscaledZ,this.indexes[O.overscaledZ][O.key])}for(let We=0;We<fe.symbolInstances.length;We++)fe.symbolInstances.get(We).crossTileID=0;this.usedCrossTileIDs[O.overscaledZ]||(this.usedCrossTileIDs[O.overscaledZ]={});const Oe=this.usedCrossTileIDs[O.overscaledZ];for(const We in this.indexes){const Mt=this.indexes[We];if(Number(We)>O.overscaledZ)for(const zt in Mt){const rr=Mt[zt];rr.tileID.isChildOf(O)&&rr.findMatches(fe.symbolInstances,O,Oe)}else{const zt=Mt[O.scaledTo(Number(We)).key];zt&&zt.findMatches(fe.symbolInstances,O,Oe)}}for(let We=0;We<fe.symbolInstances.length;We++){const Mt=fe.symbolInstances.get(We);Mt.crossTileID||(Mt.crossTileID=Re.generate(),Oe[Mt.crossTileID]=!0)}return this.indexes[O.overscaledZ]===void 0&&(this.indexes[O.overscaledZ]={}),this.indexes[O.overscaledZ][O.key]=new qt(O,fe.symbolInstances,fe.bucketInstanceId),!0}removeBucketCrossTileIDs(O,fe){for(const Re of fe.getCrossTileIDsLists())for(const Oe of Re)delete this.usedCrossTileIDs[O][Oe]}removeStaleBuckets(O){let fe=!1;for(const Re in this.indexes){const Oe=this.indexes[Re];for(const We in Oe)O[Oe[We].bucketInstanceId]||(this.removeBucketCrossTileIDs(Re,Oe[We]),delete Oe[We],fe=!0)}return fe}}class Qr{constructor(){this.layerIndexes={},this.crossTileIDs=new Ct,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}}addLayer(O,fe,Re){let Oe=this.layerIndexes[O.id];Oe===void 0&&(Oe=this.layerIndexes[O.id]=new Ur);let We=!1;const Mt={};Oe.handleWrapJump(Re);for(const zt of fe){const rr=zt.getBucket(O);rr&&O.id===rr.layerIds[0]&&(rr.bucketInstanceId||(rr.bucketInstanceId=++this.maxBucketInstanceId),Oe.addBucket(zt.tileID,rr,this.crossTileIDs)&&(We=!0),Mt[rr.bucketInstanceId]=!0)}return Oe.removeStaleBuckets(Mt)&&(We=!0),We}pruneUnusedLayers(O){const fe={};O.forEach(Re=>{fe[Re]=!0});for(const Re in this.layerIndexes)fe[Re]||delete this.layerIndexes[Re]}}const tn=(Ze,O)=>r.t(Ze,O&&O.filter(fe=>fe.identifier!=="source.canvas")),Xr=r.aw();class en extends r.E{constructor(O,fe={}){super(),this._rtlPluginLoaded=()=>{for(const Re in this.sourceCaches){const Oe=this.sourceCaches[Re].getSource().type;Oe!=="vector"&&Oe!=="geojson"||this.sourceCaches[Re].reload()}},this.map=O,this.dispatcher=new se(ie(),O._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,Oe)=>this.getGlyphs(Re,Oe)),this.dispatcher.registerMessageHandler("GI",(Re,Oe)=>this.getImages(Re,Oe)),this.imageManager=new x,this.imageManager.setEventedParent(this),this.glyphManager=new U(O._requestManager,fe.localIdeographFontFamily),this.lineAtlas=new J(256,512),this.crossTileSymbolIndex=new Qr,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new r.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",r.ay()),mt().on(Pe,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;const Oe=this.sourceCaches[Re.sourceId];if(!Oe)return;const We=Oe.getSource();if(We&&We.vectorLayerIds)for(const Mt in this._layers){const zt=this._layers[Mt];zt.source===We.id&&this._validateLayer(zt)}})}loadURL(O,fe={},Re){this.fire(new r.k("dataloading",{dataType:"style"})),fe.validate=typeof fe.validate!="boolean"||fe.validate;const Oe=this.map._requestManager.transformRequest(O,"Style");this._loadStyleRequest=new AbortController;const We=this._loadStyleRequest;r.h(Oe,this._loadStyleRequest).then(Mt=>{this._loadStyleRequest=null,this._load(Mt.data,fe,Re)}).catch(Mt=>{this._loadStyleRequest=null,Mt&&!We.signal.aborted&&this.fire(new r.j(Mt))})}loadJSON(O,fe={},Re){this.fire(new r.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,fe.validate=fe.validate!==!1,this._load(O,fe,Re)}).catch(()=>{})}loadEmpty(){this.fire(new r.k("dataloading",{dataType:"style"})),this._load(Xr,{validate:!1})}_load(O,fe,Re){var Oe;const We=fe.transformStyle?fe.transformStyle(Re,O):O;if(!fe.validate||!tn(this,r.u(We))){this._loaded=!0,this.stylesheet=We;for(const Mt in We.sources)this.addSource(Mt,We.sources[Mt],{validate:!1});We.sprite?this._loadSprite(We.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(We.glyphs),this._createLayers(),this.light=new z(this.stylesheet.light),this.sky=new G(this.stylesheet.sky),this.map.setTerrain((Oe=this.stylesheet.terrain)!==null&&Oe!==void 0?Oe:null),this.fire(new r.k("data",{dataType:"style"})),this.fire(new r.k("style.load"))}}_createLayers(){const O=r.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",O),this._order=O.map(fe=>fe.id),this._layers={},this._serializedLayers=null;for(const fe of O){const Re=r.aA(fe);Re.setEventedParent(this,{layer:{id:fe.id}}),this._layers[fe.id]=Re}}_loadSprite(O,fe=!1,Re=void 0){let Oe;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(We,Mt,zt,rr){return r._(this,void 0,void 0,function*(){const Tr=A(We),zr=zt>1?"@2x":"",qr={},pn={};for(const{id:Dn,url:nt}of Tr){const ut=Mt.transformRequest(g(nt,zr,".json"),"SpriteJSON");qr[Dn]=r.h(ut,rr);const wt=Mt.transformRequest(g(nt,zr,".png"),"SpriteImage");pn[Dn]=c.getImage(wt,rr)}return yield Promise.all([...Object.values(qr),...Object.values(pn)]),(function(Dn,nt){return r._(this,void 0,void 0,function*(){const ut={};for(const wt in Dn){ut[wt]={};const kt=s.getImageCanvasContext((yield nt[wt]).data),Ht=(yield Dn[wt]).data;for(const Ot in Ht){const{width:Kt,height:Cr,x:Or,y:Vr,sdf:sn,pixelRatio:bn,stretchX:Un,stretchY:Gn,content:ua,textFitWidth:Ha,textFitHeight:Ti}=Ht[Ot];ut[wt][Ot]={data:null,pixelRatio:bn,sdf:sn,stretchX:Un,stretchY:Gn,content:ua,textFitWidth:Ha,textFitHeight:Ti,spriteData:{width:Kt,height:Cr,x:Or,y:Vr,context:kt}}}}return ut})})(qr,pn)})})(O,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(We=>{if(this._spriteRequest=null,We)for(const Mt in We){this._spritesImagesIds[Mt]=[];const zt=this._spritesImagesIds[Mt]?this._spritesImagesIds[Mt].filter(rr=>!(rr in We)):[];for(const rr of zt)this.imageManager.removeImage(rr),this._changedImages[rr]=!0;for(const rr in We[Mt]){const Tr=Mt==="default"?rr:`${Mt}:${rr}`;this._spritesImagesIds[Mt].push(Tr),Tr in this.imageManager.images?this.imageManager.updateImage(Tr,We[Mt][rr],!1):this.imageManager.addImage(Tr,We[Mt][rr]),fe&&(this._changedImages[Tr]=!0)}}}).catch(We=>{this._spriteRequest=null,Oe=We,this.fire(new r.j(Oe))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),fe&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"})),Re&&Re(Oe)})}_unloadSprite(){for(const O of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(O),this._changedImages[O]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}_validateLayer(O){const fe=this.sourceCaches[O.source];if(!fe)return;const Re=O.sourceLayer;if(!Re)return;const Oe=fe.getSource();(Oe.type==="geojson"||Oe.vectorLayerIds&&Oe.vectorLayerIds.indexOf(Re)===-1)&&this.fire(new r.j(new Error(`Source layer "${Re}" does not exist on source "${Oe.id}" as specified by style layer "${O.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(const O in this.sourceCaches)if(!this.sourceCaches[O].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(O,fe=!1){const Re=this._serializedAllLayers();if(!O||O.length===0)return Object.values(fe?r.aB(Re):Re);const Oe=[];for(const We of O)if(Re[We]){const Mt=fe?r.aB(Re[We]):Re[We];Oe.push(Mt)}return Oe}_serializedAllLayers(){let O=this._serializedLayers;if(O)return O;O=this._serializedLayers={};const fe=Object.keys(this._layers);for(const Re of fe){const Oe=this._layers[Re];Oe.type!=="custom"&&(O[Re]=Oe.serialize())}return O}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(const O in this.sourceCaches)if(this.sourceCaches[O].hasTransition())return!0;for(const O in this._layers)if(this._layers[O].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(O){if(!this._loaded)return;const fe=this._changed;if(fe){const Oe=Object.keys(this._updatedLayers),We=Object.keys(this._removedLayers);(Oe.length||We.length)&&this._updateWorkerLayers(Oe,We);for(const Mt in this._updatedSources){const zt=this._updatedSources[Mt];if(zt==="reload")this._reloadSource(Mt);else{if(zt!=="clear")throw new Error(`Invalid action ${zt}`);this._clearSource(Mt)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(const Mt in this._updatedPaintProps)this._layers[Mt].updateTransitions(O);this.light.updateTransitions(O),this.sky.updateTransitions(O),this._resetUpdates()}const Re={};for(const Oe in this.sourceCaches){const We=this.sourceCaches[Oe];Re[Oe]=We.used,We.used=!1}for(const Oe of this._order){const We=this._layers[Oe];We.recalculate(O,this._availableImages),!We.isHidden(O.zoom)&&We.source&&(this.sourceCaches[We.source].used=!0)}for(const Oe in Re){const We=this.sourceCaches[Oe];!!Re[Oe]!=!!We.used&&We.fire(new r.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:Oe}))}this.light.recalculate(O),this.sky.recalculate(O),this.z=O.zoom,fe&&this.fire(new r.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){const O=Object.keys(this._changedImages);if(O.length){for(const fe in this.sourceCaches)this.sourceCaches[fe].reloadTilesForDependencies(["icons","patterns"],O);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(const O in this.sourceCaches)this.sourceCaches[O].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(O,fe){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(O,!1),removedIds:fe})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(O,fe={}){var Re;this._checkLoaded();const Oe=this.serialize();if(O=fe.transformStyle?fe.transformStyle(Oe,O):O,((Re=fe.validate)===null||Re===void 0||Re)&&tn(this,r.u(O)))return!1;(O=r.aB(O)).layers=r.az(O.layers);const We=r.aC(Oe,O),Mt=this._getOperationsToPerform(We);if(Mt.unimplemented.length>0)throw new Error(`Unimplemented: ${Mt.unimplemented.join(", ")}.`);if(Mt.operations.length===0)return!1;for(const zt of Mt.operations)zt();return this.stylesheet=O,this._serializedLayers=null,!0}_getOperationsToPerform(O){const fe=[],Re=[];for(const Oe of O)switch(Oe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":fe.push(()=>this.addLayer.apply(this,Oe.args));break;case"removeLayer":fe.push(()=>this.removeLayer.apply(this,Oe.args));break;case"setPaintProperty":fe.push(()=>this.setPaintProperty.apply(this,Oe.args));break;case"setLayoutProperty":fe.push(()=>this.setLayoutProperty.apply(this,Oe.args));break;case"setFilter":fe.push(()=>this.setFilter.apply(this,Oe.args));break;case"addSource":fe.push(()=>this.addSource.apply(this,Oe.args));break;case"removeSource":fe.push(()=>this.removeSource.apply(this,Oe.args));break;case"setLayerZoomRange":fe.push(()=>this.setLayerZoomRange.apply(this,Oe.args));break;case"setLight":fe.push(()=>this.setLight.apply(this,Oe.args));break;case"setGeoJSONSourceData":fe.push(()=>this.setGeoJSONSourceData.apply(this,Oe.args));break;case"setGlyphs":fe.push(()=>this.setGlyphs.apply(this,Oe.args));break;case"setSprite":fe.push(()=>this.setSprite.apply(this,Oe.args));break;case"setSky":fe.push(()=>this.setSky.apply(this,Oe.args));break;case"setTerrain":fe.push(()=>this.map.setTerrain.apply(this,Oe.args));break;case"setTransition":fe.push(()=>{});break;default:Re.push(Oe.command)}return{operations:fe,unimplemented:Re}}addImage(O,fe){if(this.getImage(O))return this.fire(new r.j(new Error(`An image named "${O}" already exists.`)));this.imageManager.addImage(O,fe),this._afterImageUpdated(O)}updateImage(O,fe){this.imageManager.updateImage(O,fe)}getImage(O){return this.imageManager.getImage(O)}removeImage(O){if(!this.getImage(O))return this.fire(new r.j(new Error(`An image named "${O}" does not exist.`)));this.imageManager.removeImage(O),this._afterImageUpdated(O)}_afterImageUpdated(O){this._availableImages=this.imageManager.listImages(),this._changedImages[O]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(O,fe,Re={}){if(this._checkLoaded(),this.sourceCaches[O]!==void 0)throw new Error(`Source "${O}" already exists.`);if(!fe.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(fe).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(fe.type)>=0&&this._validate(r.u.source,`sources.${O}`,fe,null,Re))return;this.map&&this.map._collectResourceTiming&&(fe.collectResourceTiming=!0);const Oe=this.sourceCaches[O]=new Zt(O,fe,this.dispatcher);Oe.style=this,Oe.setEventedParent(this,()=>({isSourceLoaded:Oe.loaded(),source:Oe.serialize(),sourceId:O})),Oe.onAdd(this.map),this._changed=!0}removeSource(O){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error("There is no source with this ID");for(const Re in this._layers)if(this._layers[Re].source===O)return this.fire(new r.j(new Error(`Source "${O}" cannot be removed while layer "${Re}" is using it.`)));const fe=this.sourceCaches[O];delete this.sourceCaches[O],delete this._updatedSources[O],fe.fire(new r.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:O})),fe.setEventedParent(null),fe.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(O,fe){if(this._checkLoaded(),this.sourceCaches[O]===void 0)throw new Error(`There is no source with this ID=${O}`);const Re=this.sourceCaches[O].getSource();if(Re.type!=="geojson")throw new Error(`geojsonSource.type is ${Re.type}, which is !== 'geojson`);Re.setData(fe),this._changed=!0}getSource(O){return this.sourceCaches[O]&&this.sourceCaches[O].getSource()}addLayer(O,fe,Re={}){this._checkLoaded();const Oe=O.id;if(this.getLayer(Oe))return void this.fire(new r.j(new Error(`Layer "${Oe}" already exists on this map.`)));let We;if(O.type==="custom"){if(tn(this,r.aD(O)))return;We=r.aA(O)}else{if("source"in O&&typeof O.source=="object"&&(this.addSource(Oe,O.source),O=r.aB(O),O=r.e(O,{source:Oe})),this._validate(r.u.layer,`layers.${Oe}`,O,{arrayIndex:-1},Re))return;We=r.aA(O),this._validateLayer(We),We.setEventedParent(this,{layer:{id:Oe}})}const Mt=fe?this._order.indexOf(fe):this._order.length;if(fe&&Mt===-1)this.fire(new r.j(new Error(`Cannot add layer "${Oe}" before non-existing layer "${fe}".`)));else{if(this._order.splice(Mt,0,Oe),this._layerOrderChanged=!0,this._layers[Oe]=We,this._removedLayers[Oe]&&We.source&&We.type!=="custom"){const zt=this._removedLayers[Oe];delete this._removedLayers[Oe],zt.type!==We.type?this._updatedSources[We.source]="clear":(this._updatedSources[We.source]="reload",this.sourceCaches[We.source].pause())}this._updateLayer(We),We.onAdd&&We.onAdd(this.map)}}moveLayer(O,fe){if(this._checkLoaded(),this._changed=!0,!this._layers[O])return void this.fire(new r.j(new Error(`The layer '${O}' does not exist in the map's style and cannot be moved.`)));if(O===fe)return;const Re=this._order.indexOf(O);this._order.splice(Re,1);const Oe=fe?this._order.indexOf(fe):this._order.length;fe&&Oe===-1?this.fire(new r.j(new Error(`Cannot move layer "${O}" before non-existing layer "${fe}".`))):(this._order.splice(Oe,0,O),this._layerOrderChanged=!0)}removeLayer(O){this._checkLoaded();const fe=this._layers[O];if(!fe)return void this.fire(new r.j(new Error(`Cannot remove non-existing layer "${O}".`)));fe.setEventedParent(null);const Re=this._order.indexOf(O);this._order.splice(Re,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[O]=fe,delete this._layers[O],this._serializedLayers&&delete this._serializedLayers[O],delete this._updatedLayers[O],delete this._updatedPaintProps[O],fe.onRemove&&fe.onRemove(this.map)}getLayer(O){return this._layers[O]}getLayersOrder(){return[...this._order]}hasLayer(O){return O in this._layers}setLayerZoomRange(O,fe,Re){this._checkLoaded();const Oe=this.getLayer(O);Oe?Oe.minzoom===fe&&Oe.maxzoom===Re||(fe!=null&&(Oe.minzoom=fe),Re!=null&&(Oe.maxzoom=Re),this._updateLayer(Oe)):this.fire(new r.j(new Error(`Cannot set the zoom range of non-existing layer "${O}".`)))}setFilter(O,fe,Re={}){this._checkLoaded();const Oe=this.getLayer(O);if(Oe){if(!r.aE(Oe.filter,fe))return fe==null?(Oe.filter=void 0,void this._updateLayer(Oe)):void(this._validate(r.u.filter,`layers.${Oe.id}.filter`,fe,null,Re)||(Oe.filter=r.aB(fe),this._updateLayer(Oe)))}else this.fire(new r.j(new Error(`Cannot filter non-existing layer "${O}".`)))}getFilter(O){return r.aB(this.getLayer(O).filter)}setLayoutProperty(O,fe,Re,Oe={}){this._checkLoaded();const We=this.getLayer(O);We?r.aE(We.getLayoutProperty(fe),Re)||(We.setLayoutProperty(fe,Re,Oe),this._updateLayer(We)):this.fire(new r.j(new Error(`Cannot style non-existing layer "${O}".`)))}getLayoutProperty(O,fe){const Re=this.getLayer(O);if(Re)return Re.getLayoutProperty(fe);this.fire(new r.j(new Error(`Cannot get style of non-existing layer "${O}".`)))}setPaintProperty(O,fe,Re,Oe={}){this._checkLoaded();const We=this.getLayer(O);We?r.aE(We.getPaintProperty(fe),Re)||(We.setPaintProperty(fe,Re,Oe)&&this._updateLayer(We),this._changed=!0,this._updatedPaintProps[O]=!0,this._serializedLayers=null):this.fire(new r.j(new Error(`Cannot style non-existing layer "${O}".`)))}getPaintProperty(O,fe){return this.getLayer(O).getPaintProperty(fe)}setFeatureState(O,fe){this._checkLoaded();const Re=O.source,Oe=O.sourceLayer,We=this.sourceCaches[Re];if(We===void 0)return void this.fire(new r.j(new Error(`The source '${Re}' does not exist in the map's style.`)));const Mt=We.getSource().type;Mt==="geojson"&&Oe?this.fire(new r.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Mt!=="vector"||Oe?(O.id===void 0&&this.fire(new r.j(new Error("The feature id parameter must be provided."))),We.setFeatureState(Oe,O.id,fe)):this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(O,fe){this._checkLoaded();const Re=O.source,Oe=this.sourceCaches[Re];if(Oe===void 0)return void this.fire(new r.j(new Error(`The source '${Re}' does not exist in the map's style.`)));const We=Oe.getSource().type,Mt=We==="vector"?O.sourceLayer:void 0;We!=="vector"||Mt?fe&&typeof O.id!="string"&&typeof O.id!="number"?this.fire(new r.j(new Error("A feature id is required to remove its specific state property."))):Oe.removeFeatureState(Mt,O.id,fe):this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(O){this._checkLoaded();const fe=O.source,Re=O.sourceLayer,Oe=this.sourceCaches[fe];if(Oe!==void 0)return Oe.getSource().type!=="vector"||Re?(O.id===void 0&&this.fire(new r.j(new Error("The feature id parameter must be provided."))),Oe.getFeatureState(Re,O.id)):void this.fire(new r.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new r.j(new Error(`The source '${fe}' does not exist in the map's style.`)))}getTransition(){return r.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;const O=r.aF(this.sourceCaches,We=>We.serialize()),fe=this._serializeByIds(this._order,!0),Re=this.map.getTerrain()||void 0,Oe=this.stylesheet;return r.aG({version:Oe.version,name:Oe.name,metadata:Oe.metadata,light:Oe.light,sky:Oe.sky,center:Oe.center,zoom:Oe.zoom,bearing:Oe.bearing,pitch:Oe.pitch,sprite:Oe.sprite,glyphs:Oe.glyphs,transition:Oe.transition,sources:O,layers:fe,terrain:Re},We=>We!==void 0)}_updateLayer(O){this._updatedLayers[O.id]=!0,O.source&&!this._updatedSources[O.source]&&this.sourceCaches[O.source].getSource().type!=="raster"&&(this._updatedSources[O.source]="reload",this.sourceCaches[O.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(O){const fe=Mt=>this._layers[Mt].type==="fill-extrusion",Re={},Oe=[];for(let Mt=this._order.length-1;Mt>=0;Mt--){const zt=this._order[Mt];if(fe(zt)){Re[zt]=Mt;for(const rr of O){const Tr=rr[zt];if(Tr)for(const zr of Tr)Oe.push(zr)}}}Oe.sort((Mt,zt)=>zt.intersectionZ-Mt.intersectionZ);const We=[];for(let Mt=this._order.length-1;Mt>=0;Mt--){const zt=this._order[Mt];if(fe(zt))for(let rr=Oe.length-1;rr>=0;rr--){const Tr=Oe[rr].feature;if(Re[Tr.layer.id]<Mt)break;We.push(Tr),Oe.pop()}else for(const rr of O){const Tr=rr[zt];if(Tr)for(const zr of Tr)We.push(zr.feature)}}return We}queryRenderedFeatures(O,fe,Re){fe&&fe.filter&&this._validate(r.u.filter,"queryRenderedFeatures.filter",fe.filter,null,fe);const Oe={};if(fe&&fe.layers){if(!Array.isArray(fe.layers))return this.fire(new r.j(new Error("parameters.layers must be an Array."))),[];for(const zt of fe.layers){const rr=this._layers[zt];if(!rr)return this.fire(new r.j(new Error(`The layer '${zt}' does not exist in the map's style and cannot be queried for features.`))),[];Oe[rr.source]=!0}}const We=[];fe.availableImages=this._availableImages;const Mt=this._serializedAllLayers();for(const zt in this.sourceCaches)fe.layers&&!Oe[zt]||We.push(oe(this.sourceCaches[zt],this._layers,Mt,O,fe,Re));return this.placement&&We.push((function(zt,rr,Tr,zr,qr,pn,Dn){const nt={},ut=pn.queryRenderedSymbols(zr),wt=[];for(const kt of Object.keys(ut).map(Number))wt.push(Dn[kt]);wt.sort(Y);for(const kt of wt){const Ht=kt.featureIndex.lookupSymbolFeatures(ut[kt.bucketInstanceId],rr,kt.bucketIndex,kt.sourceLayerIndex,qr.filter,qr.layers,qr.availableImages,zt);for(const Ot in Ht){const Kt=nt[Ot]=nt[Ot]||[],Cr=Ht[Ot];Cr.sort((Or,Vr)=>{const sn=kt.featureSortOrder;if(sn){const bn=sn.indexOf(Or.featureIndex);return sn.indexOf(Vr.featureIndex)-bn}return Vr.featureIndex-Or.featureIndex});for(const Or of Cr)Kt.push(Or)}}for(const kt in nt)nt[kt].forEach(Ht=>{const Ot=Ht.feature,Kt=Tr[zt[kt].source].getFeatureState(Ot.layer["source-layer"],Ot.id);Ot.source=Ot.layer.source,Ot.layer["source-layer"]&&(Ot.sourceLayer=Ot.layer["source-layer"]),Ot.state=Kt});return nt})(this._layers,Mt,this.sourceCaches,O,fe,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(We)}querySourceFeatures(O,fe){fe&&fe.filter&&this._validate(r.u.filter,"querySourceFeatures.filter",fe.filter,null,fe);const Re=this.sourceCaches[O];return Re?(function(Oe,We){const Mt=Oe.getRenderableIds().map(Tr=>Oe.getTileByID(Tr)),zt=[],rr={};for(let Tr=0;Tr<Mt.length;Tr++){const zr=Mt[Tr],qr=zr.tileID.canonical.key;rr[qr]||(rr[qr]=!0,zr.querySourceFeatures(zt,We))}return zt})(Re,fe):[]}getLight(){return this.light.getLight()}setLight(O,fe={}){this._checkLoaded();const Re=this.light.getLight();let Oe=!1;for(const Mt in O)if(!r.aE(O[Mt],Re[Mt])){Oe=!0;break}if(!Oe)return;const We={now:s.now(),transition:r.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(O,fe),this.light.updateTransitions(We)}getSky(){var O;return(O=this.stylesheet)===null||O===void 0?void 0:O.sky}setSky(O,fe={}){const Re=this.getSky();let Oe=!1;if(!O&&!Re)return;if(O&&!Re)Oe=!0;else if(!O&&Re)Oe=!0;else for(const Mt in O)if(!r.aE(O[Mt],Re[Mt])){Oe=!0;break}if(!Oe)return;const We={now:s.now(),transition:r.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=O,this.sky.setSky(O,fe),this.sky.updateTransitions(We)}_validate(O,fe,Re,Oe,We={}){return(!We||We.validate!==!1)&&tn(this,O.call(r.u,r.e({key:fe,style:this.serialize(),value:Re,styleSpec:r.v},Oe)))}_remove(O=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),mt().off(Pe,this._rtlPluginLoaded);for(const fe in this._layers)this._layers[fe].setEventedParent(null);for(const fe in this.sourceCaches){const Re=this.sourceCaches[fe];Re.setEventedParent(null),Re.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),O&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(O)}_clearSource(O){this.sourceCaches[O].clearTiles()}_reloadSource(O){this.sourceCaches[O].resume(),this.sourceCaches[O].reload()}_updateSources(O){for(const fe in this.sourceCaches)this.sourceCaches[fe].update(O,this.map.terrain)}_generateCollisionBoxes(){for(const O in this.sourceCaches)this._reloadSource(O)}_updatePlacement(O,fe,Re,Oe,We=!1){let Mt=!1,zt=!1;const rr={};for(const Tr of this._order){const zr=this._layers[Tr];if(zr.type!=="symbol")continue;if(!rr[zr.source]){const pn=this.sourceCaches[zr.source];rr[zr.source]=pn.getRenderableIds(!0).map(Dn=>pn.getTileByID(Dn)).sort((Dn,nt)=>nt.tileID.overscaledZ-Dn.tileID.overscaledZ||(Dn.tileID.isLessThan(nt.tileID)?-1:1))}const qr=this.crossTileSymbolIndex.addLayer(zr,rr[zr.source],O.center.lng);Mt=Mt||qr}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((We=We||this._layerOrderChanged||Re===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(s.now(),O.zoom))&&(this.pauseablePlacement=new zi(O,this.map.terrain,this._order,We,fe,Re,Oe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,rr),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(s.now()),zt=!0),Mt&&this.pauseablePlacement.placement.setStale()),zt||Mt)for(const Tr of this._order){const zr=this._layers[Tr];zr.type==="symbol"&&this.placement.updateLayerOpacities(zr,rr[zr.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(s.now())}_releaseSymbolFadeTiles(){for(const O in this.sourceCaches)this.sourceCaches[O].releaseSymbolFadeTiles()}getImages(O,fe){return r._(this,void 0,void 0,function*(){const Re=yield this.imageManager.getImages(fe.icons);this._updateTilesForChangedImages();const Oe=this.sourceCaches[fe.source];return Oe&&Oe.setDependencies(fe.tileID.key,fe.type,fe.icons),Re})}getGlyphs(O,fe){return r._(this,void 0,void 0,function*(){const Re=yield this.glyphManager.getGlyphs(fe.stacks),Oe=this.sourceCaches[fe.source];return Oe&&Oe.setDependencies(fe.tileID.key,fe.type,[""]),Re})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(O,fe={}){this._checkLoaded(),O&&this._validate(r.u.glyphs,"glyphs",O,null,fe)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=O,this.glyphManager.entries={},this.glyphManager.setURL(O))}addSprite(O,fe,Re={},Oe){this._checkLoaded();const We=[{id:O,url:fe}],Mt=[...A(this.stylesheet.sprite),...We];this._validate(r.u.sprite,"sprite",Mt,null,Re)||(this.stylesheet.sprite=Mt,this._loadSprite(We,!0,Oe))}removeSprite(O){this._checkLoaded();const fe=A(this.stylesheet.sprite);if(fe.find(Re=>Re.id===O)){if(this._spritesImagesIds[O])for(const Re of this._spritesImagesIds[O])this.imageManager.removeImage(Re),this._changedImages[Re]=!0;fe.splice(fe.findIndex(Re=>Re.id===O),1),this.stylesheet.sprite=fe.length>0?fe:void 0,delete this._spritesImagesIds[O],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new r.k("data",{dataType:"style"}))}else this.fire(new r.j(new Error(`Sprite "${O}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(O,fe={},Re){this._checkLoaded(),O&&this._validate(r.u.sprite,"sprite",O,null,fe)||(this.stylesheet.sprite=O,O?this._loadSprite(O,!0,Re):(this._unloadSprite(),Re&&Re(null)))}}var Tn=r.Y([{name:"a_pos",type:"Int16",components:2}]);const hn={prelude:Rt(`#ifdef GL_ES
precision mediump float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
`,`#ifdef GL_ES
precision highp float;
#else
#if !defined(lowp)
#define lowp
#endif
#if !defined(mediump)
#define mediump
#endif
#if !defined(highp)
#define highp
#endif
#endif
vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
#ifdef TERRAIN3D
uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
#endif
const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
#ifdef TERRAIN3D
highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
#else
return 1.0;
#endif
}float calculate_visibility(vec4 pos) {
#ifdef TERRAIN3D
vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
#else
return 1.0;
#endif
}float ele(vec2 pos) {
#ifdef TERRAIN3D
vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
#else
return 0.0;
#endif
}float get_elevation(vec2 pos) {
#ifdef TERRAIN3D
vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
#else
return 0.0;
#endif
}`),background:Rt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Rt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Rt(`varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define mediump float radius
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define highp vec4 stroke_color
#pragma mapbox: define mediump float stroke_width
#pragma mapbox: define lowp float stroke_opacity
void main(void) {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize mediump float radius
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize highp vec4 stroke_color
#pragma mapbox: initialize mediump float stroke_width
#pragma mapbox: initialize lowp float stroke_opacity
vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Rt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Rt(`uniform highp float u_intensity;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#define GAUSS_COEF 0.3989422804014327
void main() {
#pragma mapbox: initialize highp float weight
float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
#pragma mapbox: define highp float weight
#pragma mapbox: define mediump float radius
const highp float ZERO=1.0/255.0/16.0;
#define GAUSS_COEF 0.3989422804014327
void main(void) {
#pragma mapbox: initialize highp float weight
#pragma mapbox: initialize mediump float radius
vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Rt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(0.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Rt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Rt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Rt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Rt(`#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_FragColor=color*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Rt(`varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
#pragma mapbox: define highp vec4 outline_color
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 outline_color
#pragma mapbox: initialize lowp float opacity
gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Rt(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Rt(`#ifdef GL_ES
precision highp float;
#endif
uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Rt(`varying vec4 v_color;void main() {gl_FragColor=v_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec4 v_color;
#pragma mapbox: define highp float base
#pragma mapbox: define highp float height
#pragma mapbox: define highp vec4 color
void main() {
#pragma mapbox: initialize highp float base
#pragma mapbox: initialize highp float height
#pragma mapbox: initialize highp vec4 color
vec3 normal=a_normal_ed.xyz;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`),fillExtrusionPattern:Rt(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
#ifdef TERRAIN3D
attribute vec2 a_centroid;
#endif
varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
#pragma mapbox: define lowp float base
#pragma mapbox: define lowp float height
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float base
#pragma mapbox: initialize lowp float height
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
#ifdef TERRAIN3D
float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
#else
float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
#endif
base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
? a_pos
: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`),hillshadePrepare:Rt(`#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),hillshade:Rt(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
#define PI 3.141592653589793
void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),line:Rt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),lineGradient:Rt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_width2=vec2(outset,inset);}`),linePattern:Rt(`#ifdef GL_ES
precision highp float;
#endif
uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
#pragma mapbox: define lowp vec4 pattern_from
#pragma mapbox: define lowp vec4 pattern_to
#pragma mapbox: define lowp float pixel_ratio_from
#pragma mapbox: define lowp float pixel_ratio_to
void main() {
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
#pragma mapbox: initialize mediump vec4 pattern_from
#pragma mapbox: initialize mediump vec4 pattern_to
#pragma mapbox: initialize lowp float pixel_ratio_from
#pragma mapbox: initialize lowp float pixel_ratio_to
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Rt(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`
#define scale 0.015873016
#define LINE_DISTANCE_SCALE 2.0
attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
#pragma mapbox: define highp vec4 color
#pragma mapbox: define lowp float blur
#pragma mapbox: define lowp float opacity
#pragma mapbox: define mediump float gapwidth
#pragma mapbox: define lowp float offset
#pragma mapbox: define mediump float width
#pragma mapbox: define lowp float floorwidth
void main() {
#pragma mapbox: initialize highp vec4 color
#pragma mapbox: initialize lowp float blur
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize mediump float gapwidth
#pragma mapbox: initialize lowp float offset
#pragma mapbox: initialize mediump float width
#pragma mapbox: initialize lowp float floorwidth
float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
#ifdef TERRAIN3D
v_gamma_scale=1.0;
#else
float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
#endif
v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`),raster:Rt(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,"uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),symbolIcon:Rt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define lowp float opacity
void main() {
#pragma mapbox: initialize lowp float opacity
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Rt(`#define SDF_PX 8.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Rt(`#define SDF_PX 8.0
#define SDF 1.0
#define ICON 0.0
uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
#ifdef OVERDRAW_INSPECTOR
gl_FragColor=vec4(1.0);
#endif
}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
#pragma mapbox: define highp vec4 fill_color
#pragma mapbox: define highp vec4 halo_color
#pragma mapbox: define lowp float opacity
#pragma mapbox: define lowp float halo_width
#pragma mapbox: define lowp float halo_blur
void main() {
#pragma mapbox: initialize highp vec4 fill_color
#pragma mapbox: initialize highp vec4 halo_color
#pragma mapbox: initialize lowp float opacity
#pragma mapbox: initialize lowp float halo_width
#pragma mapbox: initialize lowp float halo_blur
vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
camera_to_anchor_distance/u_camera_to_center_distance :
u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Rt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Rt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Rt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Rt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Rt(Ze,O){const fe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Re=O.match(/attribute ([\w]+) ([\w]+)/g),Oe=Ze.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),We=O.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Mt=We?We.concat(Oe):Oe,zt={};return{fragmentSource:Ze=Ze.replace(fe,(rr,Tr,zr,qr,pn)=>(zt[pn]=!0,Tr==="define"?`
#ifndef HAS_UNIFORM_u_${pn}
varying ${zr} ${qr} ${pn};
#else
uniform ${zr} ${qr} u_${pn};
#endif
`:`
#ifdef HAS_UNIFORM_u_${pn}
    ${zr} ${qr} ${pn} = u_${pn};
#endif
`)),vertexSource:O=O.replace(fe,(rr,Tr,zr,qr,pn)=>{const Dn=qr==="float"?"vec2":"vec4",nt=pn.match(/color/)?"color":Dn;return zt[pn]?Tr==="define"?`
#ifndef HAS_UNIFORM_u_${pn}
uniform lowp float u_${pn}_t;
attribute ${zr} ${Dn} a_${pn};
varying ${zr} ${qr} ${pn};
#else
uniform ${zr} ${qr} u_${pn};
#endif
`:nt==="vec4"?`
#ifndef HAS_UNIFORM_u_${pn}
    ${pn} = a_${pn};
#else
    ${zr} ${qr} ${pn} = u_${pn};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pn}
    ${pn} = unpack_mix_${nt}(a_${pn}, u_${pn}_t);
#else
    ${zr} ${qr} ${pn} = u_${pn};
#endif
`:Tr==="define"?`
#ifndef HAS_UNIFORM_u_${pn}
uniform lowp float u_${pn}_t;
attribute ${zr} ${Dn} a_${pn};
#else
uniform ${zr} ${qr} u_${pn};
#endif
`:nt==="vec4"?`
#ifndef HAS_UNIFORM_u_${pn}
    ${zr} ${qr} ${pn} = a_${pn};
#else
    ${zr} ${qr} ${pn} = u_${pn};
#endif
`:`
#ifndef HAS_UNIFORM_u_${pn}
    ${zr} ${qr} ${pn} = unpack_mix_${nt}(a_${pn}, u_${pn}_t);
#else
    ${zr} ${qr} ${pn} = u_${pn};
#endif
`}),staticAttributes:Re,staticUniforms:Mt}}class xr{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(O,fe,Re,Oe,We,Mt,zt,rr,Tr){this.context=O;let zr=this.boundPaintVertexBuffers.length!==Oe.length;for(let qr=0;!zr&&qr<Oe.length;qr++)this.boundPaintVertexBuffers[qr]!==Oe[qr]&&(zr=!0);!this.vao||this.boundProgram!==fe||this.boundLayoutVertexBuffer!==Re||zr||this.boundIndexBuffer!==We||this.boundVertexOffset!==Mt||this.boundDynamicVertexBuffer!==zt||this.boundDynamicVertexBuffer2!==rr||this.boundDynamicVertexBuffer3!==Tr?this.freshBind(fe,Re,Oe,We,Mt,zt,rr,Tr):(O.bindVertexArray.set(this.vao),zt&&zt.bind(),We&&We.dynamicDraw&&We.bind(),rr&&rr.bind(),Tr&&Tr.bind())}freshBind(O,fe,Re,Oe,We,Mt,zt,rr){const Tr=O.numAttributes,zr=this.context,qr=zr.gl;this.vao&&this.destroy(),this.vao=zr.createVertexArray(),zr.bindVertexArray.set(this.vao),this.boundProgram=O,this.boundLayoutVertexBuffer=fe,this.boundPaintVertexBuffers=Re,this.boundIndexBuffer=Oe,this.boundVertexOffset=We,this.boundDynamicVertexBuffer=Mt,this.boundDynamicVertexBuffer2=zt,this.boundDynamicVertexBuffer3=rr,fe.enableAttributes(qr,O);for(const pn of Re)pn.enableAttributes(qr,O);Mt&&Mt.enableAttributes(qr,O),zt&&zt.enableAttributes(qr,O),rr&&rr.enableAttributes(qr,O),fe.bind(),fe.setVertexAttribPointers(qr,O,We);for(const pn of Re)pn.bind(),pn.setVertexAttribPointers(qr,O,We);Mt&&(Mt.bind(),Mt.setVertexAttribPointers(qr,O,We)),Oe&&Oe.bind(),zt&&(zt.bind(),zt.setVertexAttribPointers(qr,O,We)),rr&&(rr.bind(),rr.setVertexAttribPointers(qr,O,We)),zr.currentNumAttributes=Tr}destroy(){this.vao&&(this.context.deleteVertexArray(this.vao),this.vao=null)}}const Wr=(Ze,O,fe,Re,Oe)=>({u_matrix:Ze,u_texture:0,u_ele_delta:O,u_fog_matrix:fe,u_fog_color:Re?Re.properties.get("fog-color"):r.aM.white,u_fog_ground_blend:Re?Re.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:Re?Re.calculateFogBlendOpacity(Oe):0,u_horizon_color:Re?Re.properties.get("horizon-color"):r.aM.white,u_horizon_fog_blend:Re?Re.properties.get("horizon-fog-blend"):1});function An(Ze){const O=[];for(let fe=0;fe<Ze.length;fe++){if(Ze[fe]===null)continue;const Re=Ze[fe].split(" ");O.push(Re.pop())}return O}class Xn{constructor(O,fe,Re,Oe,We,Mt){const zt=O.gl;this.program=zt.createProgram();const rr=An(fe.staticAttributes),Tr=Re?Re.getBinderAttributes():[],zr=rr.concat(Tr),qr=hn.prelude.staticUniforms?An(hn.prelude.staticUniforms):[],pn=fe.staticUniforms?An(fe.staticUniforms):[],Dn=Re?Re.getBinderUniforms():[],nt=qr.concat(pn).concat(Dn),ut=[];for(const Or of nt)ut.indexOf(Or)<0&&ut.push(Or);const wt=Re?Re.defines():[];We&&wt.push("#define OVERDRAW_INSPECTOR;"),Mt&&wt.push("#define TERRAIN3D;");const kt=wt.concat(hn.prelude.fragmentSource,fe.fragmentSource).join(`
`),Ht=wt.concat(hn.prelude.vertexSource,fe.vertexSource).join(`
`),Ot=zt.createShader(zt.FRAGMENT_SHADER);if(zt.isContextLost())return void(this.failedToCreate=!0);if(zt.shaderSource(Ot,kt),zt.compileShader(Ot),!zt.getShaderParameter(Ot,zt.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${zt.getShaderInfoLog(Ot)}`);zt.attachShader(this.program,Ot);const Kt=zt.createShader(zt.VERTEX_SHADER);if(zt.isContextLost())return void(this.failedToCreate=!0);if(zt.shaderSource(Kt,Ht),zt.compileShader(Kt),!zt.getShaderParameter(Kt,zt.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${zt.getShaderInfoLog(Kt)}`);zt.attachShader(this.program,Kt),this.attributes={};const Cr={};this.numAttributes=zr.length;for(let Or=0;Or<this.numAttributes;Or++)zr[Or]&&(zt.bindAttribLocation(this.program,Or,zr[Or]),this.attributes[zr[Or]]=Or);if(zt.linkProgram(this.program),!zt.getProgramParameter(this.program,zt.LINK_STATUS))throw new Error(`Program failed to link: ${zt.getProgramInfoLog(this.program)}`);zt.deleteShader(Kt),zt.deleteShader(Ot);for(let Or=0;Or<ut.length;Or++){const Vr=ut[Or];if(Vr&&!Cr[Vr]){const sn=zt.getUniformLocation(this.program,Vr);sn&&(Cr[Vr]=sn)}}this.fixedUniforms=Oe(O,Cr),this.terrainUniforms=((Or,Vr)=>({u_depth:new r.aH(Or,Vr.u_depth),u_terrain:new r.aH(Or,Vr.u_terrain),u_terrain_dim:new r.aI(Or,Vr.u_terrain_dim),u_terrain_matrix:new r.aJ(Or,Vr.u_terrain_matrix),u_terrain_unpack:new r.aK(Or,Vr.u_terrain_unpack),u_terrain_exaggeration:new r.aI(Or,Vr.u_terrain_exaggeration)}))(O,Cr),this.binderUniforms=Re?Re.getUniforms(O,Cr):[]}draw(O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn,nt,ut,wt,kt,Ht){const Ot=O.gl;if(this.failedToCreate)return;if(O.program.set(this.program),O.setDepthMode(Re),O.setStencilMode(Oe),O.setColorMode(We),O.setCullFace(Mt),rr){O.activeTexture.set(Ot.TEXTURE2),Ot.bindTexture(Ot.TEXTURE_2D,rr.depthTexture),O.activeTexture.set(Ot.TEXTURE3),Ot.bindTexture(Ot.TEXTURE_2D,rr.texture);for(const Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(rr[Cr])}for(const Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(zt[Cr]);ut&&ut.setUniforms(O,this.binderUniforms,Dn,{zoom:nt});let Kt=0;switch(fe){case Ot.LINES:Kt=2;break;case Ot.TRIANGLES:Kt=3;break;case Ot.LINE_STRIP:Kt=1}for(const Cr of pn.get()){const Or=Cr.vaos||(Cr.vaos={});(Or[Tr]||(Or[Tr]=new xr)).bind(O,this,zr,ut?ut.getPaintVertexBuffers():[],qr,Cr.vertexOffset,wt,kt,Ht),Ot.drawElements(fe,Cr.primitiveLength*Kt,Ot.UNSIGNED_SHORT,Cr.primitiveOffset*Kt*2)}}}function na(Ze,O,fe){const Re=1/ha(fe,1,O.transform.tileZoom),Oe=Math.pow(2,fe.tileID.overscaledZ),We=fe.tileSize*Math.pow(2,O.transform.tileZoom)/Oe,Mt=We*(fe.tileID.canonical.x+fe.tileID.wrap*Oe),zt=We*fe.tileID.canonical.y;return{u_image:0,u_texsize:fe.imageAtlasTexture.size,u_scale:[Re,Ze.fromScale,Ze.toScale],u_fade:Ze.t,u_pixel_coord_upper:[Mt>>16,zt>>16],u_pixel_coord_lower:[65535&Mt,65535&zt]}}const ra=(Ze,O,fe,Re)=>{const Oe=O.style.light,We=Oe.properties.get("position"),Mt=[We.x,We.y,We.z],zt=(function(){var Tr=new r.A(9);return r.A!=Float32Array&&(Tr[1]=0,Tr[2]=0,Tr[3]=0,Tr[5]=0,Tr[6]=0,Tr[7]=0),Tr[0]=1,Tr[4]=1,Tr[8]=1,Tr})();Oe.properties.get("anchor")==="viewport"&&(function(Tr,zr){var qr=Math.sin(zr),pn=Math.cos(zr);Tr[0]=pn,Tr[1]=qr,Tr[2]=0,Tr[3]=-qr,Tr[4]=pn,Tr[5]=0,Tr[6]=0,Tr[7]=0,Tr[8]=1})(zt,-O.transform.angle),(function(Tr,zr,qr){var pn=zr[0],Dn=zr[1],nt=zr[2];Tr[0]=pn*qr[0]+Dn*qr[3]+nt*qr[6],Tr[1]=pn*qr[1]+Dn*qr[4]+nt*qr[7],Tr[2]=pn*qr[2]+Dn*qr[5]+nt*qr[8]})(Mt,Mt,zt);const rr=Oe.properties.get("color");return{u_matrix:Ze,u_lightpos:Mt,u_lightintensity:Oe.properties.get("intensity"),u_lightcolor:[rr.r,rr.g,rr.b],u_vertical_gradient:+fe,u_opacity:Re}},Sn=(Ze,O,fe,Re,Oe,We,Mt)=>r.e(ra(Ze,O,fe,Re),na(We,O,Mt),{u_height_factor:-Math.pow(2,Oe.overscaledZ)/Mt.tileSize/8}),Wn=Ze=>({u_matrix:Ze}),Fi=(Ze,O,fe,Re)=>r.e(Wn(Ze),na(fe,O,Re)),Ya=(Ze,O)=>({u_matrix:Ze,u_world:O}),Wi=(Ze,O,fe,Re,Oe)=>r.e(Fi(Ze,O,fe,Re),{u_world:Oe}),uo=(Ze,O,fe,Re)=>{const Oe=Ze.transform;let We,Mt;if(Re.paint.get("circle-pitch-alignment")==="map"){const zt=ha(fe,1,Oe.zoom);We=!0,Mt=[zt,zt]}else We=!1,Mt=Oe.pixelsToGLUnits;return{u_camera_to_center_distance:Oe.cameraToCenterDistance,u_scale_with_map:+(Re.paint.get("circle-pitch-scale")==="map"),u_matrix:Ze.translatePosMatrix(O.posMatrix,fe,Re.paint.get("circle-translate"),Re.paint.get("circle-translate-anchor")),u_pitch_with_map:+We,u_device_pixel_ratio:Ze.pixelRatio,u_extrude_scale:Mt}},Ao=(Ze,O,fe)=>({u_matrix:Ze,u_inv_matrix:O,u_camera_to_center_distance:fe.cameraToCenterDistance,u_viewport_size:[fe.width,fe.height]}),wo=(Ze,O,fe=1)=>({u_matrix:Ze,u_color:O,u_overlay:0,u_overlay_scale:fe}),Uo=Ze=>({u_matrix:Ze}),Ri=(Ze,O,fe,Re)=>({u_matrix:Ze,u_extrude_scale:ha(O,1,fe),u_intensity:Re}),ps=(Ze,O,fe,Re)=>{const Oe=r.H();r.aP(Oe,0,Ze.width,Ze.height,0,0,1);const We=Ze.context.gl;return{u_matrix:Oe,u_world:[We.drawingBufferWidth,We.drawingBufferHeight],u_image:fe,u_color_ramp:Re,u_opacity:O.paint.get("heatmap-opacity")}};function as(Ze,O){const fe=Math.pow(2,O.canonical.z),Re=O.canonical.y;return[new r.Z(0,Re/fe).toLngLat().lat,new r.Z(0,(Re+1)/fe).toLngLat().lat]}const el=(Ze,O,fe,Re)=>{const Oe=Ze.transform;return{u_matrix:Ks(Ze,O,fe,Re),u_ratio:1/ha(O,1,Oe.zoom),u_device_pixel_ratio:Ze.pixelRatio,u_units_to_pixels:[1/Oe.pixelsToGLUnits[0],1/Oe.pixelsToGLUnits[1]]}},As=(Ze,O,fe,Re,Oe)=>r.e(el(Ze,O,fe,Oe),{u_image:0,u_image_height:Re}),hs=(Ze,O,fe,Re,Oe)=>{const We=Ze.transform,Mt=tl(O,We);return{u_matrix:Ks(Ze,O,fe,Oe),u_texsize:O.imageAtlasTexture.size,u_ratio:1/ha(O,1,We.zoom),u_device_pixel_ratio:Ze.pixelRatio,u_image:0,u_scale:[Mt,Re.fromScale,Re.toScale],u_fade:Re.t,u_units_to_pixels:[1/We.pixelsToGLUnits[0],1/We.pixelsToGLUnits[1]]}},es=(Ze,O,fe,Re,Oe,We)=>{const Mt=Ze.lineAtlas,zt=tl(O,Ze.transform),rr=fe.layout.get("line-cap")==="round",Tr=Mt.getDash(Re.from,rr),zr=Mt.getDash(Re.to,rr),qr=Tr.width*Oe.fromScale,pn=zr.width*Oe.toScale;return r.e(el(Ze,O,fe,We),{u_patternscale_a:[zt/qr,-Tr.height/2],u_patternscale_b:[zt/pn,-zr.height/2],u_sdfgamma:Mt.width/(256*Math.min(qr,pn)*Ze.pixelRatio)/2,u_image:0,u_tex_y_a:Tr.y,u_tex_y_b:zr.y,u_mix:Oe.t})};function tl(Ze,O){return 1/ha(Ze,1,O.tileZoom)}function Ks(Ze,O,fe,Re){return Ze.translatePosMatrix(Re?Re.posMatrix:O.tileID.posMatrix,O,fe.paint.get("line-translate"),fe.paint.get("line-translate-anchor"))}const pl=(Ze,O,fe,Re,Oe)=>{return{u_matrix:Ze,u_tl_parent:O,u_scale_parent:fe,u_buffer_scale:1,u_fade_t:Re.mix,u_opacity:Re.opacity*Oe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:Oe.paint.get("raster-brightness-min"),u_brightness_high:Oe.paint.get("raster-brightness-max"),u_saturation_factor:(Mt=Oe.paint.get("raster-saturation"),Mt>0?1-1/(1.001-Mt):-Mt),u_contrast_factor:(We=Oe.paint.get("raster-contrast"),We>0?1/(1-We):1+We),u_spin_weights:Ss(Oe.paint.get("raster-hue-rotate"))};var We,Mt};function Ss(Ze){Ze*=Math.PI/180;const O=Math.sin(Ze),fe=Math.cos(Ze);return[(2*fe+1)/3,(-Math.sqrt(3)*O-fe+1)/3,(Math.sqrt(3)*O-fe+1)/3]}const ls=(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn)=>{const nt=Mt.transform;return{u_is_size_zoom_constant:+(Ze==="constant"||Ze==="source"),u_is_size_feature_constant:+(Ze==="constant"||Ze==="camera"),u_size_t:O?O.uSizeT:0,u_size:O?O.uSize:0,u_camera_to_center_distance:nt.cameraToCenterDistance,u_pitch:nt.pitch/360*2*Math.PI,u_rotate_symbol:+fe,u_aspect_ratio:nt.width/nt.height,u_fade_change:Mt.options.fadeDuration?Mt.symbolFadeChange:1,u_matrix:zt,u_label_plane_matrix:rr,u_coord_matrix:Tr,u_is_text:+qr,u_pitch_with_map:+Re,u_is_along_line:Oe,u_is_variable_anchor:We,u_texsize:pn,u_texture:0,u_translation:zr,u_pitched_scale:Dn}},Lo=(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn,nt)=>{const ut=Mt.transform;return r.e(ls(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,nt),{u_gamma_scale:Re?Math.cos(ut._pitch)*ut.cameraToCenterDistance:1,u_device_pixel_ratio:Mt.pixelRatio,u_is_halo:1})},Es=(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn)=>r.e(Lo(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,!0,qr,!0,Dn),{u_texsize_icon:pn,u_texture_icon:1}),ml=(Ze,O,fe)=>({u_matrix:Ze,u_opacity:O,u_color:fe}),zl=(Ze,O,fe,Re,Oe,We)=>r.e((function(Mt,zt,rr,Tr){const zr=rr.imageManager.getPattern(Mt.from.toString()),qr=rr.imageManager.getPattern(Mt.to.toString()),{width:pn,height:Dn}=rr.imageManager.getPixelSize(),nt=Math.pow(2,Tr.tileID.overscaledZ),ut=Tr.tileSize*Math.pow(2,rr.transform.tileZoom)/nt,wt=ut*(Tr.tileID.canonical.x+Tr.tileID.wrap*nt),kt=ut*Tr.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:zr.tl,u_pattern_br_a:zr.br,u_pattern_tl_b:qr.tl,u_pattern_br_b:qr.br,u_texsize:[pn,Dn],u_mix:zt.t,u_pattern_size_a:zr.displaySize,u_pattern_size_b:qr.displaySize,u_scale_a:zt.fromScale,u_scale_b:zt.toScale,u_tile_units_to_pixels:1/ha(Tr,1,rr.transform.tileZoom),u_pixel_coord_upper:[wt>>16,kt>>16],u_pixel_coord_lower:[65535&wt,65535&kt]}})(Re,We,fe,Oe),{u_matrix:Ze,u_opacity:O}),Bl={fillExtrusion:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_lightpos:new r.aN(Ze,O.u_lightpos),u_lightintensity:new r.aI(Ze,O.u_lightintensity),u_lightcolor:new r.aN(Ze,O.u_lightcolor),u_vertical_gradient:new r.aI(Ze,O.u_vertical_gradient),u_opacity:new r.aI(Ze,O.u_opacity)}),fillExtrusionPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_lightpos:new r.aN(Ze,O.u_lightpos),u_lightintensity:new r.aI(Ze,O.u_lightintensity),u_lightcolor:new r.aN(Ze,O.u_lightcolor),u_vertical_gradient:new r.aI(Ze,O.u_vertical_gradient),u_height_factor:new r.aI(Ze,O.u_height_factor),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade),u_opacity:new r.aI(Ze,O.u_opacity)}),fill:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix)}),fillPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),fillOutline:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world)}),fillOutlinePattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world),u_image:new r.aH(Ze,O.u_image),u_texsize:new r.aO(Ze,O.u_texsize),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),circle:(Ze,O)=>({u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_scale_with_map:new r.aH(Ze,O.u_scale_with_map),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_extrude_scale:new r.aO(Ze,O.u_extrude_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_matrix:new r.aJ(Ze,O.u_matrix)}),collisionBox:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_pixel_extrude_scale:new r.aO(Ze,O.u_pixel_extrude_scale)}),collisionCircle:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_inv_matrix:new r.aJ(Ze,O.u_inv_matrix),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_viewport_size:new r.aO(Ze,O.u_viewport_size)}),debug:(Ze,O)=>({u_color:new r.aL(Ze,O.u_color),u_matrix:new r.aJ(Ze,O.u_matrix),u_overlay:new r.aH(Ze,O.u_overlay),u_overlay_scale:new r.aI(Ze,O.u_overlay_scale)}),clippingMask:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix)}),heatmap:(Ze,O)=>({u_extrude_scale:new r.aI(Ze,O.u_extrude_scale),u_intensity:new r.aI(Ze,O.u_intensity),u_matrix:new r.aJ(Ze,O.u_matrix)}),heatmapTexture:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_world:new r.aO(Ze,O.u_world),u_image:new r.aH(Ze,O.u_image),u_color_ramp:new r.aH(Ze,O.u_color_ramp),u_opacity:new r.aI(Ze,O.u_opacity)}),hillshade:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_latrange:new r.aO(Ze,O.u_latrange),u_light:new r.aO(Ze,O.u_light),u_shadow:new r.aL(Ze,O.u_shadow),u_highlight:new r.aL(Ze,O.u_highlight),u_accent:new r.aL(Ze,O.u_accent)}),hillshadePrepare:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_image:new r.aH(Ze,O.u_image),u_dimension:new r.aO(Ze,O.u_dimension),u_zoom:new r.aI(Ze,O.u_zoom),u_unpack:new r.aK(Ze,O.u_unpack)}),line:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels)}),lineGradient:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_image:new r.aH(Ze,O.u_image),u_image_height:new r.aI(Ze,O.u_image_height)}),linePattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texsize:new r.aO(Ze,O.u_texsize),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_image:new r.aH(Ze,O.u_image),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_scale:new r.aN(Ze,O.u_scale),u_fade:new r.aI(Ze,O.u_fade)}),lineSDF:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ratio:new r.aI(Ze,O.u_ratio),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_units_to_pixels:new r.aO(Ze,O.u_units_to_pixels),u_patternscale_a:new r.aO(Ze,O.u_patternscale_a),u_patternscale_b:new r.aO(Ze,O.u_patternscale_b),u_sdfgamma:new r.aI(Ze,O.u_sdfgamma),u_image:new r.aH(Ze,O.u_image),u_tex_y_a:new r.aI(Ze,O.u_tex_y_a),u_tex_y_b:new r.aI(Ze,O.u_tex_y_b),u_mix:new r.aI(Ze,O.u_mix)}),raster:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_tl_parent:new r.aO(Ze,O.u_tl_parent),u_scale_parent:new r.aI(Ze,O.u_scale_parent),u_buffer_scale:new r.aI(Ze,O.u_buffer_scale),u_fade_t:new r.aI(Ze,O.u_fade_t),u_opacity:new r.aI(Ze,O.u_opacity),u_image0:new r.aH(Ze,O.u_image0),u_image1:new r.aH(Ze,O.u_image1),u_brightness_low:new r.aI(Ze,O.u_brightness_low),u_brightness_high:new r.aI(Ze,O.u_brightness_high),u_saturation_factor:new r.aI(Ze,O.u_saturation_factor),u_contrast_factor:new r.aI(Ze,O.u_contrast_factor),u_spin_weights:new r.aN(Ze,O.u_spin_weights)}),symbolIcon:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texture:new r.aH(Ze,O.u_texture),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),symbolSDF:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texture:new r.aH(Ze,O.u_texture),u_gamma_scale:new r.aI(Ze,O.u_gamma_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_is_halo:new r.aH(Ze,O.u_is_halo),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),symbolTextAndIcon:(Ze,O)=>({u_is_size_zoom_constant:new r.aH(Ze,O.u_is_size_zoom_constant),u_is_size_feature_constant:new r.aH(Ze,O.u_is_size_feature_constant),u_size_t:new r.aI(Ze,O.u_size_t),u_size:new r.aI(Ze,O.u_size),u_camera_to_center_distance:new r.aI(Ze,O.u_camera_to_center_distance),u_pitch:new r.aI(Ze,O.u_pitch),u_rotate_symbol:new r.aH(Ze,O.u_rotate_symbol),u_aspect_ratio:new r.aI(Ze,O.u_aspect_ratio),u_fade_change:new r.aI(Ze,O.u_fade_change),u_matrix:new r.aJ(Ze,O.u_matrix),u_label_plane_matrix:new r.aJ(Ze,O.u_label_plane_matrix),u_coord_matrix:new r.aJ(Ze,O.u_coord_matrix),u_is_text:new r.aH(Ze,O.u_is_text),u_pitch_with_map:new r.aH(Ze,O.u_pitch_with_map),u_is_along_line:new r.aH(Ze,O.u_is_along_line),u_is_variable_anchor:new r.aH(Ze,O.u_is_variable_anchor),u_texsize:new r.aO(Ze,O.u_texsize),u_texsize_icon:new r.aO(Ze,O.u_texsize_icon),u_texture:new r.aH(Ze,O.u_texture),u_texture_icon:new r.aH(Ze,O.u_texture_icon),u_gamma_scale:new r.aI(Ze,O.u_gamma_scale),u_device_pixel_ratio:new r.aI(Ze,O.u_device_pixel_ratio),u_is_halo:new r.aH(Ze,O.u_is_halo),u_translation:new r.aO(Ze,O.u_translation),u_pitched_scale:new r.aI(Ze,O.u_pitched_scale)}),background:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_opacity:new r.aI(Ze,O.u_opacity),u_color:new r.aL(Ze,O.u_color)}),backgroundPattern:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_opacity:new r.aI(Ze,O.u_opacity),u_image:new r.aH(Ze,O.u_image),u_pattern_tl_a:new r.aO(Ze,O.u_pattern_tl_a),u_pattern_br_a:new r.aO(Ze,O.u_pattern_br_a),u_pattern_tl_b:new r.aO(Ze,O.u_pattern_tl_b),u_pattern_br_b:new r.aO(Ze,O.u_pattern_br_b),u_texsize:new r.aO(Ze,O.u_texsize),u_mix:new r.aI(Ze,O.u_mix),u_pattern_size_a:new r.aO(Ze,O.u_pattern_size_a),u_pattern_size_b:new r.aO(Ze,O.u_pattern_size_b),u_scale_a:new r.aI(Ze,O.u_scale_a),u_scale_b:new r.aI(Ze,O.u_scale_b),u_pixel_coord_upper:new r.aO(Ze,O.u_pixel_coord_upper),u_pixel_coord_lower:new r.aO(Ze,O.u_pixel_coord_lower),u_tile_units_to_pixels:new r.aI(Ze,O.u_tile_units_to_pixels)}),terrain:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texture:new r.aH(Ze,O.u_texture),u_ele_delta:new r.aI(Ze,O.u_ele_delta),u_fog_matrix:new r.aJ(Ze,O.u_fog_matrix),u_fog_color:new r.aL(Ze,O.u_fog_color),u_fog_ground_blend:new r.aI(Ze,O.u_fog_ground_blend),u_fog_ground_blend_opacity:new r.aI(Ze,O.u_fog_ground_blend_opacity),u_horizon_color:new r.aL(Ze,O.u_horizon_color),u_horizon_fog_blend:new r.aI(Ze,O.u_horizon_fog_blend)}),terrainDepth:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_ele_delta:new r.aI(Ze,O.u_ele_delta)}),terrainCoords:(Ze,O)=>({u_matrix:new r.aJ(Ze,O.u_matrix),u_texture:new r.aH(Ze,O.u_texture),u_terrain_coords_id:new r.aI(Ze,O.u_terrain_coords_id),u_ele_delta:new r.aI(Ze,O.u_ele_delta)}),sky:(Ze,O)=>({u_sky_color:new r.aL(Ze,O.u_sky_color),u_horizon_color:new r.aL(Ze,O.u_horizon_color),u_horizon:new r.aI(Ze,O.u_horizon),u_sky_horizon_blend:new r.aI(Ze,O.u_sky_horizon_blend)})};class Fs{constructor(O,fe,Re){this.context=O;const Oe=O.gl;this.buffer=Oe.createBuffer(),this.dynamicDraw=!!Re,this.context.unbindVAO(),O.bindElementBuffer.set(this.buffer),Oe.bufferData(Oe.ELEMENT_ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?Oe.DYNAMIC_DRAW:Oe.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(O){const fe=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),fe.bufferSubData(fe.ELEMENT_ARRAY_BUFFER,0,O.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Di={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class _o{constructor(O,fe,Re,Oe){this.length=fe.length,this.attributes=Re,this.itemSize=fe.bytesPerElement,this.dynamicDraw=Oe,this.context=O;const We=O.gl;this.buffer=We.createBuffer(),O.bindVertexBuffer.set(this.buffer),We.bufferData(We.ARRAY_BUFFER,fe.arrayBuffer,this.dynamicDraw?We.DYNAMIC_DRAW:We.STATIC_DRAW),this.dynamicDraw||delete fe.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(O){if(O.length!==this.length)throw new Error(`Length of new data is ${O.length}, which doesn't match current length of ${this.length}`);const fe=this.context.gl;this.bind(),fe.bufferSubData(fe.ARRAY_BUFFER,0,O.arrayBuffer)}enableAttributes(O,fe){for(let Re=0;Re<this.attributes.length;Re++){const Oe=fe.attributes[this.attributes[Re].name];Oe!==void 0&&O.enableVertexAttribArray(Oe)}}setVertexAttribPointers(O,fe,Re){for(let Oe=0;Oe<this.attributes.length;Oe++){const We=this.attributes[Oe],Mt=fe.attributes[We.name];Mt!==void 0&&O.vertexAttribPointer(Mt,We.components,O[Di[We.type]],!1,this.itemSize,We.offset+this.itemSize*(Re||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}const Nl=new WeakMap;function Vs(Ze){var O;if(Nl.has(Ze))return Nl.get(Ze);{const fe=(O=Ze.getParameter(Ze.VERSION))===null||O===void 0?void 0:O.startsWith("WebGL 2.0");return Nl.set(Ze,fe),fe}}class Ko{constructor(O){this.gl=O.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(O){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class jl extends Ko{getDefault(){return r.aM.transparent}set(O){const fe=this.current;(O.r!==fe.r||O.g!==fe.g||O.b!==fe.b||O.a!==fe.a||this.dirty)&&(this.gl.clearColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class rl extends Ko{getDefault(){return 1}set(O){(O!==this.current||this.dirty)&&(this.gl.clearDepth(O),this.current=O,this.dirty=!1)}}class yl extends Ko{getDefault(){return 0}set(O){(O!==this.current||this.dirty)&&(this.gl.clearStencil(O),this.current=O,this.dirty=!1)}}class Cu extends Ko{getDefault(){return[!0,!0,!0,!0]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||O[3]!==fe[3]||this.dirty)&&(this.gl.colorMask(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class yo extends Ko{getDefault(){return!0}set(O){(O!==this.current||this.dirty)&&(this.gl.depthMask(O),this.current=O,this.dirty=!1)}}class Ps extends Ko{getDefault(){return 255}set(O){(O!==this.current||this.dirty)&&(this.gl.stencilMask(O),this.current=O,this.dirty=!1)}}class ms extends Ko{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(O){const fe=this.current;(O.func!==fe.func||O.ref!==fe.ref||O.mask!==fe.mask||this.dirty)&&(this.gl.stencilFunc(O.func,O.ref,O.mask),this.current=O,this.dirty=!1)}}class Kl extends Ko{getDefault(){const O=this.gl;return[O.KEEP,O.KEEP,O.KEEP]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||this.dirty)&&(this.gl.stencilOp(O[0],O[1],O[2]),this.current=O,this.dirty=!1)}}class Jl extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.STENCIL_TEST):fe.disable(fe.STENCIL_TEST),this.current=O,this.dirty=!1}}class Wo extends Ko{getDefault(){return[0,1]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||this.dirty)&&(this.gl.depthRange(O[0],O[1]),this.current=O,this.dirty=!1)}}class pu extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.DEPTH_TEST):fe.disable(fe.DEPTH_TEST),this.current=O,this.dirty=!1}}class _u extends Ko{getDefault(){return this.gl.LESS}set(O){(O!==this.current||this.dirty)&&(this.gl.depthFunc(O),this.current=O,this.dirty=!1)}}class Xs extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.BLEND):fe.disable(fe.BLEND),this.current=O,this.dirty=!1}}class Pl extends Ko{getDefault(){const O=this.gl;return[O.ONE,O.ZERO]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||this.dirty)&&(this.gl.blendFunc(O[0],O[1]),this.current=O,this.dirty=!1)}}class Gl extends Ko{getDefault(){return r.aM.transparent}set(O){const fe=this.current;(O.r!==fe.r||O.g!==fe.g||O.b!==fe.b||O.a!==fe.a||this.dirty)&&(this.gl.blendColor(O.r,O.g,O.b,O.a),this.current=O,this.dirty=!1)}}class Yl extends Ko{getDefault(){return this.gl.FUNC_ADD}set(O){(O!==this.current||this.dirty)&&(this.gl.blendEquation(O),this.current=O,this.dirty=!1)}}class tc extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;O?fe.enable(fe.CULL_FACE):fe.disable(fe.CULL_FACE),this.current=O,this.dirty=!1}}class bf extends Ko{getDefault(){return this.gl.BACK}set(O){(O!==this.current||this.dirty)&&(this.gl.cullFace(O),this.current=O,this.dirty=!1)}}class Qc extends Ko{getDefault(){return this.gl.CCW}set(O){(O!==this.current||this.dirty)&&(this.gl.frontFace(O),this.current=O,this.dirty=!1)}}class ff extends Ko{getDefault(){return null}set(O){(O!==this.current||this.dirty)&&(this.gl.useProgram(O),this.current=O,this.dirty=!1)}}class Wh extends Ko{getDefault(){return this.gl.TEXTURE0}set(O){(O!==this.current||this.dirty)&&(this.gl.activeTexture(O),this.current=O,this.dirty=!1)}}class Dh extends Ko{getDefault(){const O=this.gl;return[0,0,O.drawingBufferWidth,O.drawingBufferHeight]}set(O){const fe=this.current;(O[0]!==fe[0]||O[1]!==fe[1]||O[2]!==fe[2]||O[3]!==fe[3]||this.dirty)&&(this.gl.viewport(O[0],O[1],O[2],O[3]),this.current=O,this.dirty=!1)}}class Ll extends Ko{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindFramebuffer(fe.FRAMEBUFFER,O),this.current=O,this.dirty=!1}}class jc extends Ko{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindRenderbuffer(fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class Yh extends Ko{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindTexture(fe.TEXTURE_2D,O),this.current=O,this.dirty=!1}}class hc extends Ko{getDefault(){return null}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.bindBuffer(fe.ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class rc extends Ko{getDefault(){return null}set(O){const fe=this.gl;fe.bindBuffer(fe.ELEMENT_ARRAY_BUFFER,O),this.current=O,this.dirty=!1}}class dc extends Ko{getDefault(){return null}set(O){var fe;if(O===this.current&&!this.dirty)return;const Re=this.gl;Vs(Re)?Re.bindVertexArray(O):(fe=Re.getExtension("OES_vertex_array_object"))===null||fe===void 0||fe.bindVertexArrayOES(O),this.current=O,this.dirty=!1}}class hf extends Ko{getDefault(){return 4}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_ALIGNMENT,O),this.current=O,this.dirty=!1}}class au extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_PREMULTIPLY_ALPHA_WEBGL,O),this.current=O,this.dirty=!1}}class nc extends Ko{getDefault(){return!1}set(O){if(O===this.current&&!this.dirty)return;const fe=this.gl;fe.pixelStorei(fe.UNPACK_FLIP_Y_WEBGL,O),this.current=O,this.dirty=!1}}class Js extends Ko{constructor(O,fe){super(O),this.context=O,this.parent=fe}getDefault(){return null}}class Ul extends Js{setDirty(){this.dirty=!0}set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferTexture2D(fe.FRAMEBUFFER,fe.COLOR_ATTACHMENT0,fe.TEXTURE_2D,O,0),this.current=O,this.dirty=!1}}class Df extends Js{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferRenderbuffer(fe.FRAMEBUFFER,fe.DEPTH_ATTACHMENT,fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class Cc extends Js{set(O){if(O===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);const fe=this.gl;fe.framebufferRenderbuffer(fe.FRAMEBUFFER,fe.DEPTH_STENCIL_ATTACHMENT,fe.RENDERBUFFER,O),this.current=O,this.dirty=!1}}class Wf{constructor(O,fe,Re,Oe,We){this.context=O,this.width=fe,this.height=Re;const Mt=O.gl,zt=this.framebuffer=Mt.createFramebuffer();if(this.colorAttachment=new Ul(O,zt),Oe)this.depthAttachment=We?new Cc(O,zt):new Df(O,zt);else if(We)throw new Error("Stencil cannot be set without depth");if(Mt.checkFramebufferStatus(Mt.FRAMEBUFFER)!==Mt.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer is not complete")}destroy(){const O=this.context.gl,fe=this.colorAttachment.get();if(fe&&O.deleteTexture(fe),this.depthAttachment){const Re=this.depthAttachment.get();Re&&O.deleteRenderbuffer(Re)}O.deleteFramebuffer(this.framebuffer)}}class mu{constructor(O,fe,Re){this.blendFunction=O,this.blendColor=fe,this.mask=Re}}mu.Replace=[1,0],mu.disabled=new mu(mu.Replace,r.aM.transparent,[!1,!1,!1,!1]),mu.unblended=new mu(mu.Replace,r.aM.transparent,[!0,!0,!0,!0]),mu.alphaBlended=new mu([1,771],r.aM.transparent,[!0,!0,!0,!0]);class Vd{constructor(O){var fe,Re;if(this.gl=O,this.clearColor=new jl(this),this.clearDepth=new rl(this),this.clearStencil=new yl(this),this.colorMask=new Cu(this),this.depthMask=new yo(this),this.stencilMask=new Ps(this),this.stencilFunc=new ms(this),this.stencilOp=new Kl(this),this.stencilTest=new Jl(this),this.depthRange=new Wo(this),this.depthTest=new pu(this),this.depthFunc=new _u(this),this.blend=new Xs(this),this.blendFunc=new Pl(this),this.blendColor=new Gl(this),this.blendEquation=new Yl(this),this.cullFace=new tc(this),this.cullFaceSide=new bf(this),this.frontFace=new Qc(this),this.program=new ff(this),this.activeTexture=new Wh(this),this.viewport=new Dh(this),this.bindFramebuffer=new Ll(this),this.bindRenderbuffer=new jc(this),this.bindTexture=new Yh(this),this.bindVertexBuffer=new hc(this),this.bindElementBuffer=new rc(this),this.bindVertexArray=new dc(this),this.pixelStoreUnpack=new hf(this),this.pixelStoreUnpackPremultiplyAlpha=new au(this),this.pixelStoreUnpackFlipY=new nc(this),this.extTextureFilterAnisotropic=O.getExtension("EXT_texture_filter_anisotropic")||O.getExtension("MOZ_EXT_texture_filter_anisotropic")||O.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=O.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=O.getParameter(O.MAX_TEXTURE_SIZE),Vs(O)){this.HALF_FLOAT=O.HALF_FLOAT;const Oe=O.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(fe=O.RGBA16F)!==null&&fe!==void 0?fe:Oe?.RGBA16F_EXT,this.RGB16F=(Re=O.RGB16F)!==null&&Re!==void 0?Re:Oe?.RGB16F_EXT,O.getExtension("EXT_color_buffer_float")}else{O.getExtension("EXT_color_buffer_half_float"),O.getExtension("OES_texture_half_float_linear");const Oe=O.getExtension("OES_texture_half_float");this.HALF_FLOAT=Oe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(O,fe){return new Fs(this,O,fe)}createVertexBuffer(O,fe,Re){return new _o(this,O,fe,Re)}createRenderbuffer(O,fe,Re){const Oe=this.gl,We=Oe.createRenderbuffer();return this.bindRenderbuffer.set(We),Oe.renderbufferStorage(Oe.RENDERBUFFER,O,fe,Re),this.bindRenderbuffer.set(null),We}createFramebuffer(O,fe,Re,Oe){return new Wf(this,O,fe,Re,Oe)}clear({color:O,depth:fe,stencil:Re}){const Oe=this.gl;let We=0;O&&(We|=Oe.COLOR_BUFFER_BIT,this.clearColor.set(O),this.colorMask.set([!0,!0,!0,!0])),fe!==void 0&&(We|=Oe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(fe),this.depthMask.set(!0)),Re!==void 0&&(We|=Oe.STENCIL_BUFFER_BIT,this.clearStencil.set(Re),this.stencilMask.set(255)),Oe.clear(We)}setCullFace(O){O.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(O.mode),this.frontFace.set(O.frontFace))}setDepthMode(O){O.func!==this.gl.ALWAYS||O.mask?(this.depthTest.set(!0),this.depthFunc.set(O.func),this.depthMask.set(O.mask),this.depthRange.set(O.range)):this.depthTest.set(!1)}setStencilMode(O){O.test.func!==this.gl.ALWAYS||O.mask?(this.stencilTest.set(!0),this.stencilMask.set(O.mask),this.stencilOp.set([O.fail,O.depthFail,O.pass]),this.stencilFunc.set({func:O.test.func,ref:O.ref,mask:O.test.mask})):this.stencilTest.set(!1)}setColorMode(O){r.aE(O.blendFunction,mu.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(O.blendFunction),this.blendColor.set(O.blendColor)),this.colorMask.set(O.mask)}createVertexArray(){var O;return Vs(this.gl)?this.gl.createVertexArray():(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0?void 0:O.createVertexArrayOES()}deleteVertexArray(O){var fe;return Vs(this.gl)?this.gl.deleteVertexArray(O):(fe=this.gl.getExtension("OES_vertex_array_object"))===null||fe===void 0?void 0:fe.deleteVertexArrayOES(O)}unbindVAO(){this.bindVertexArray.set(null)}}class Ws{constructor(O,fe,Re){this.func=O,this.mask=fe,this.range=Re}}Ws.ReadOnly=!1,Ws.ReadWrite=!0,Ws.disabled=new Ws(519,Ws.ReadOnly,[0,1]);const cv=7680;class Tl{constructor(O,fe,Re,Oe,We,Mt){this.test=O,this.ref=fe,this.mask=Re,this.fail=Oe,this.depthFail=We,this.pass=Mt}}Tl.disabled=new Tl({func:519,mask:0},0,0,cv,cv,cv);class Zo{constructor(O,fe,Re){this.enable=O,this.mode=fe,this.frontFace=Re}}let dh;function df(Ze,O,fe,Re,Oe){const We=Ze.context,Mt=We.gl,zt=Ze.useProgram("collisionBox"),rr=[];let Tr=0,zr=0;for(let kt=0;kt<Re.length;kt++){const Ht=Re[kt],Ot=O.getTile(Ht).getBucket(fe);if(!Ot)continue;const Kt=Oe?Ot.textCollisionBox:Ot.iconCollisionBox,Cr=Ot.collisionCircleArray;if(Cr.length>0){const Or=r.H();r.aQ(Or,Ot.placementInvProjMatrix,Ze.transform.glCoordMatrix),r.aQ(Or,Or,Ot.placementViewportMatrix),rr.push({circleArray:Cr,circleOffset:zr,transform:Ht.posMatrix,invTransform:Or,coord:Ht}),Tr+=Cr.length/4,zr=Tr}Kt&&zt.draw(We,Mt.LINES,Ws.disabled,Tl.disabled,Ze.colorModeForRenderPass(),Zo.disabled,{u_matrix:Ht.posMatrix,u_pixel_extrude_scale:[1/(qr=Ze.transform).width,1/qr.height]},Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Ht),fe.id,Kt.layoutVertexBuffer,Kt.indexBuffer,Kt.segments,null,Ze.transform.zoom,null,null,Kt.collisionVertexBuffer)}var qr;if(!Oe||!rr.length)return;const pn=Ze.useProgram("collisionCircle"),Dn=new r.aR;Dn.resize(4*Tr),Dn._trim();let nt=0;for(const kt of rr)for(let Ht=0;Ht<kt.circleArray.length/4;Ht++){const Ot=4*Ht,Kt=kt.circleArray[Ot+0],Cr=kt.circleArray[Ot+1],Or=kt.circleArray[Ot+2],Vr=kt.circleArray[Ot+3];Dn.emplace(nt++,Kt,Cr,Or,Vr,0),Dn.emplace(nt++,Kt,Cr,Or,Vr,1),Dn.emplace(nt++,Kt,Cr,Or,Vr,2),Dn.emplace(nt++,Kt,Cr,Or,Vr,3)}(!dh||dh.length<2*Tr)&&(dh=(function(kt){const Ht=2*kt,Ot=new r.aT;Ot.resize(Ht),Ot._trim();for(let Kt=0;Kt<Ht;Kt++){const Cr=6*Kt;Ot.uint16[Cr+0]=4*Kt+0,Ot.uint16[Cr+1]=4*Kt+1,Ot.uint16[Cr+2]=4*Kt+2,Ot.uint16[Cr+3]=4*Kt+2,Ot.uint16[Cr+4]=4*Kt+3,Ot.uint16[Cr+5]=4*Kt+0}return Ot})(Tr));const ut=We.createIndexBuffer(dh,!0),wt=We.createVertexBuffer(Dn,r.aS.members,!0);for(const kt of rr){const Ht=Ao(kt.transform,kt.invTransform,Ze.transform);pn.draw(We,Mt.TRIANGLES,Ws.disabled,Tl.disabled,Ze.colorModeForRenderPass(),Zo.disabled,Ht,Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(kt.coord),fe.id,wt,ut,r.a0.simpleSegment(0,2*kt.circleOffset,kt.circleArray.length,kt.circleArray.length/2),null,Ze.transform.zoom,null,null,null)}wt.destroy(),ut.destroy()}Zo.disabled=new Zo(!1,1029,2305),Zo.backCCW=new Zo(!0,1029,2305);const Hu=r.an(new Float32Array(16));function Zh(Ze,O,fe,Re,Oe,We){const{horizontalAlign:Mt,verticalAlign:zt}=r.au(Ze);return new r.P((-(Mt-.5)*O/Oe+Re[0])*We,(-(zt-.5)*fe/Oe+Re[1])*We)}function Yf(Ze,O,fe,Re,Oe,We){const Mt=O.tileAnchorPoint.add(new r.P(O.translation[0],O.translation[1]));if(O.pitchWithMap){let zt=Re.mult(We);fe||(zt=zt.rotate(-Oe));const rr=Mt.add(zt);return Dt(rr.x,rr.y,O.labelPlaneMatrix,O.getElevation).point}if(fe){const zt=Ft(O.tileAnchorPoint.x+1,O.tileAnchorPoint.y,O).point.sub(Ze),rr=Math.atan(zt.y/zt.x)+(zt.x<0?Math.PI:0);return Ze.add(Re.rotate(rr))}return Ze.add(Re)}function wh(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr,pn,Dn){const nt=Ze.text.placedSymbolArray,ut=Ze.text.dynamicLayoutVertexArray,wt=Ze.icon.dynamicLayoutVertexArray,kt={};ut.clear();for(let Ht=0;Ht<nt.length;Ht++){const Ot=nt.get(Ht),Kt=Ot.hidden||!Ot.crossTileID||Ze.allowVerticalPlacement&&!Ot.placedOrientation?null:Re[Ot.crossTileID];if(Kt){const Cr=new r.P(Ot.anchorX,Ot.anchorY),Or={getElevation:Dn,width:Oe.width,height:Oe.height,labelPlaneMatrix:We,pitchWithMap:fe,projection:zr,tileAnchorPoint:Cr,translation:qr,unwrappedTileID:pn},Vr=fe?Dt(Cr.x,Cr.y,Mt,Dn):Ft(Cr.x,Cr.y,Or),sn=$e(Oe.cameraToCenterDistance,Vr.signedDistanceFromCamera);let bn=r.ai(Ze.textSizeData,rr,Ot)*sn/r.ap;fe&&(bn*=Ze.tilePixelRatio/zt);const{width:Un,height:Gn,anchor:ua,textOffset:Ha,textBoxScale:Ti}=Kt,mi=Zh(ua,Un,Gn,Ha,Ti,bn),Ai=zr.getPitchedTextCorrection(Oe,Cr.add(new r.P(qr[0],qr[1])),pn),po=Yf(Vr.point,Or,O,mi,Oe.angle,Ai),Fo=Ze.allowVerticalPlacement&&Ot.placedOrientation===r.ah.vertical?Math.PI/2:0;for(let Po=0;Po<Ot.numGlyphs;Po++)r.aj(ut,po,Fo);Tr&&Ot.associatedIconIndex>=0&&(kt[Ot.associatedIconIndex]={shiftedAnchor:po,angle:Fo})}else Mr(Ot.numGlyphs,ut)}if(Tr){wt.clear();const Ht=Ze.icon.placedSymbolArray;for(let Ot=0;Ot<Ht.length;Ot++){const Kt=Ht.get(Ot);if(Kt.hidden)Mr(Kt.numGlyphs,wt);else{const Cr=kt[Ot];if(Cr)for(let Or=0;Or<Kt.numGlyphs;Or++)r.aj(wt,Cr.shiftedAnchor,Cr.angle);else Mr(Kt.numGlyphs,wt)}}Ze.icon.dynamicLayoutVertexBuffer.updateData(wt)}Ze.text.dynamicLayoutVertexBuffer.updateData(ut)}function ac(Ze,O,fe){return fe.iconsInText&&O?"symbolTextAndIcon":Ze?"symbolSDF":"symbolIcon"}function Cd(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr,zr,qr){const pn=Ze.context,Dn=pn.gl,nt=Ze.transform,ut=$a(),wt=zt==="map",kt=rr==="map",Ht=zt!=="viewport"&&fe.layout.get("symbol-placement")!=="point",Ot=wt&&!kt&&!Ht,Kt=!kt&&Ht,Cr=!fe.layout.get("symbol-sort-key").isConstant();let Or=!1;const Vr=Ze.depthModeForSublayer(0,Ws.ReadOnly),sn=fe._unevaluatedLayout.hasValue("text-variable-anchor")||fe._unevaluatedLayout.hasValue("text-variable-anchor-offset"),bn=[],Un=ut.getCircleRadiusCorrection(nt);for(const Gn of Re){const ua=O.getTile(Gn),Ha=ua.getBucket(fe);if(!Ha)continue;const Ti=Oe?Ha.text:Ha.icon;if(!Ti||!Ti.segments.get().length||!Ti.hasVisibleVertices)continue;const mi=Ti.programConfigurations.get(fe.id),Ai=Oe||Ha.sdfIcons,po=Oe?Ha.textSizeData:Ha.iconSizeData,Fo=kt||nt.pitch!==0,Po=Ze.useProgram(ac(Ai,Oe,Ha),mi),us=r.ag(po,nt.zoom),il=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Gn);let ol,Bs,hl,bu,cu=[0,0],js=null;if(Oe)Bs=ua.glyphAtlasTexture,hl=Dn.LINEAR,ol=ua.glyphAtlasTexture.size,Ha.iconsInText&&(cu=ua.imageAtlasTexture.size,js=ua.imageAtlasTexture,bu=Fo||Ze.options.rotating||Ze.options.zooming||po.kind==="composite"||po.kind==="camera"?Dn.LINEAR:Dn.NEAREST);else{const Mn=fe.layout.get("icon-size").constantOr(0)!==1||Ha.iconsNeedLinear;Bs=ua.imageAtlasTexture,hl=Ai||Ze.options.rotating||Ze.options.zooming||Mn||Fo?Dn.LINEAR:Dn.NEAREST,ol=ua.imageAtlasTexture.size}const Us=ha(ua,1,Ze.transform.zoom),Bu=Kt?Gn.posMatrix:Hu,pc=Nr(Bu,kt,wt,Ze.transform,Us),Xc=Jr(Bu,kt,wt,Ze.transform,Us),Te=Jr(Gn.posMatrix,kt,wt,Ze.transform,Us),He=ut.translatePosition(Ze.transform,ua,We,Mt),ct=sn&&Ha.hasTextData(),Pt=fe.layout.get("icon-text-fit")!=="none"&&ct&&Ha.hasIconData();if(Ht){const Mn=Ze.style.map.terrain?(Vn,Ka)=>Ze.style.map.terrain.getElevation(Gn,Vn,Ka):null,jn=fe.layout.get("text-rotation-alignment")==="map";De(Ha,Gn.posMatrix,Ze,Oe,pc,Te,kt,Tr,jn,ut,Gn.toUnwrapped(),nt.width,nt.height,He,Mn)}const It=Gn.posMatrix,Ut=Oe&&sn||Pt,hr=Ht||Ut?Hu:pc,fr=Xc,Pr=Ai&&fe.paint.get(Oe?"text-halo-width":"icon-halo-width").constantOr(1)!==0;let ln;ln=Ai?Ha.iconsInText?Es(po.kind,us,Ot,kt,Ht,Ut,Ze,It,hr,fr,He,ol,cu,Un):Lo(po.kind,us,Ot,kt,Ht,Ut,Ze,It,hr,fr,He,Oe,ol,!0,Un):ls(po.kind,us,Ot,kt,Ht,Ut,Ze,It,hr,fr,He,Oe,ol,Un);const on={program:Po,buffers:Ti,uniformValues:ln,atlasTexture:Bs,atlasTextureIcon:js,atlasInterpolation:hl,atlasInterpolationIcon:bu,isSDF:Ai,hasHalo:Pr};if(Cr&&Ha.canOverlap){Or=!0;const Mn=Ti.segments.get();for(const jn of Mn)bn.push({segments:new r.a0([jn]),sortKey:jn.sortKey,state:on,terrainData:il})}else bn.push({segments:Ti.segments,sortKey:0,state:on,terrainData:il})}Or&&bn.sort((Gn,ua)=>Gn.sortKey-ua.sortKey);for(const Gn of bn){const ua=Gn.state;if(pn.activeTexture.set(Dn.TEXTURE0),ua.atlasTexture.bind(ua.atlasInterpolation,Dn.CLAMP_TO_EDGE),ua.atlasTextureIcon&&(pn.activeTexture.set(Dn.TEXTURE1),ua.atlasTextureIcon&&ua.atlasTextureIcon.bind(ua.atlasInterpolationIcon,Dn.CLAMP_TO_EDGE)),ua.isSDF){const Ha=ua.uniformValues;ua.hasHalo&&(Ha.u_is_halo=1,ad(ua.buffers,Gn.segments,fe,Ze,ua.program,Vr,zr,qr,Ha,Gn.terrainData)),Ha.u_is_halo=0}ad(ua.buffers,Gn.segments,fe,Ze,ua.program,Vr,zr,qr,ua.uniformValues,Gn.terrainData)}}function ad(Ze,O,fe,Re,Oe,We,Mt,zt,rr,Tr){const zr=Re.context;Oe.draw(zr,zr.gl.TRIANGLES,We,Mt,zt,Zo.disabled,rr,Tr,fe.id,Ze.layoutVertexBuffer,Ze.indexBuffer,O,fe.paint,Re.transform.zoom,Ze.programConfigurations.get(fe.id),Ze.dynamicLayoutVertexBuffer,Ze.opacityVertexBuffer)}function Th(Ze,O,fe,Re){const Oe=Ze.context,We=Oe.gl,Mt=Tl.disabled,zt=new mu([We.ONE,We.ONE],r.aM.transparent,[!0,!0,!0,!0]),rr=O.getBucket(fe);if(!rr)return;const Tr=Re.key;let zr=fe.heatmapFbos.get(Tr);zr||(zr=$h(Oe,O.tileSize,O.tileSize),fe.heatmapFbos.set(Tr,zr)),Oe.bindFramebuffer.set(zr.framebuffer),Oe.viewport.set([0,0,O.tileSize,O.tileSize]),Oe.clear({color:r.aM.transparent});const qr=rr.programConfigurations.get(fe.id),pn=Ze.useProgram("heatmap",qr),Dn=Ze.style.map.terrain.getTerrainData(Re);pn.draw(Oe,We.TRIANGLES,Ws.disabled,Mt,zt,Zo.disabled,Ri(Re.posMatrix,O,Ze.transform.zoom,fe.paint.get("heatmap-intensity")),Dn,fe.id,rr.layoutVertexBuffer,rr.indexBuffer,rr.segments,fe.paint,Ze.transform.zoom,qr)}function Zf(Ze,O,fe){const Re=Ze.context,Oe=Re.gl;Re.setColorMode(Ze.colorModeForRenderPass());const We=Kh(Re,O),Mt=fe.key,zt=O.heatmapFbos.get(Mt);zt&&(Re.activeTexture.set(Oe.TEXTURE0),Oe.bindTexture(Oe.TEXTURE_2D,zt.colorAttachment.get()),Re.activeTexture.set(Oe.TEXTURE1),We.bind(Oe.LINEAR,Oe.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(Re,Oe.TRIANGLES,Ws.disabled,Tl.disabled,Ze.colorModeForRenderPass(),Zo.disabled,ps(Ze,O,0,1),null,O.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments,O.paint,Ze.transform.zoom),zt.destroy(),O.heatmapFbos.delete(Mt))}function $h(Ze,O,fe){var Re,Oe;const We=Ze.gl,Mt=We.createTexture();We.bindTexture(We.TEXTURE_2D,Mt),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_S,We.CLAMP_TO_EDGE),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_WRAP_T,We.CLAMP_TO_EDGE),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MIN_FILTER,We.LINEAR),We.texParameteri(We.TEXTURE_2D,We.TEXTURE_MAG_FILTER,We.LINEAR);const zt=(Re=Ze.HALF_FLOAT)!==null&&Re!==void 0?Re:We.UNSIGNED_BYTE,rr=(Oe=Ze.RGBA16F)!==null&&Oe!==void 0?Oe:We.RGBA;We.texImage2D(We.TEXTURE_2D,0,rr,O,fe,0,We.RGBA,zt,null);const Tr=Ze.createFramebuffer(O,fe,!1,!1);return Tr.colorAttachment.set(Mt),Tr}function Kh(Ze,O){return O.colorRampTexture||(O.colorRampTexture=new f(Ze,O.colorRamp,Ze.gl.RGBA)),O.colorRampTexture}function vf(Ze,O,fe,Re,Oe){if(!fe||!Re||!Re.imageAtlas)return;const We=Re.imageAtlas.patternPositions;let Mt=We[fe.to.toString()],zt=We[fe.from.toString()];if(!Mt&&zt&&(Mt=zt),!zt&&Mt&&(zt=Mt),!Mt||!zt){const rr=Oe.getPaintProperty(O);Mt=We[rr],zt=We[rr]}Mt&&zt&&Ze.setConstantPatternPositions(Mt,zt)}function id(Ze,O,fe,Re,Oe,We,Mt){const zt=Ze.context.gl,rr="fill-pattern",Tr=fe.paint.get(rr),zr=Tr&&Tr.constantOr(1),qr=fe.getCrossfadeParameters();let pn,Dn,nt,ut,wt;Mt?(Dn=zr&&!fe.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",pn=zt.LINES):(Dn=zr?"fillPattern":"fill",pn=zt.TRIANGLES);const kt=Tr.constantOr(null);for(const Ht of Re){const Ot=O.getTile(Ht);if(zr&&!Ot.patternsLoaded())continue;const Kt=Ot.getBucket(fe);if(!Kt)continue;const Cr=Kt.programConfigurations.get(fe.id),Or=Ze.useProgram(Dn,Cr),Vr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(Ht);zr&&(Ze.context.activeTexture.set(zt.TEXTURE0),Ot.imageAtlasTexture.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),Cr.updatePaintBuffers(qr)),vf(Cr,rr,kt,Ot,fe);const sn=Vr?Ht:null,bn=Ze.translatePosMatrix(sn?sn.posMatrix:Ht.posMatrix,Ot,fe.paint.get("fill-translate"),fe.paint.get("fill-translate-anchor"));if(Mt){ut=Kt.indexBuffer2,wt=Kt.segments2;const Un=[zt.drawingBufferWidth,zt.drawingBufferHeight];nt=Dn==="fillOutlinePattern"&&zr?Wi(bn,Ze,qr,Ot,Un):Ya(bn,Un)}else ut=Kt.indexBuffer,wt=Kt.segments,nt=zr?Fi(bn,Ze,qr,Ot):Wn(bn);Or.draw(Ze.context,pn,Oe,Ze.stencilModeForClipping(Ht),We,Zo.disabled,nt,Vr,fe.id,Kt.layoutVertexBuffer,ut,wt,fe.paint,Ze.transform.zoom,Cr)}}function Of(Ze,O,fe,Re,Oe,We,Mt){const zt=Ze.context,rr=zt.gl,Tr="fill-extrusion-pattern",zr=fe.paint.get(Tr),qr=zr.constantOr(1),pn=fe.getCrossfadeParameters(),Dn=fe.paint.get("fill-extrusion-opacity"),nt=zr.constantOr(null);for(const ut of Re){const wt=O.getTile(ut),kt=wt.getBucket(fe);if(!kt)continue;const Ht=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(ut),Ot=kt.programConfigurations.get(fe.id),Kt=Ze.useProgram(qr?"fillExtrusionPattern":"fillExtrusion",Ot);qr&&(Ze.context.activeTexture.set(rr.TEXTURE0),wt.imageAtlasTexture.bind(rr.LINEAR,rr.CLAMP_TO_EDGE),Ot.updatePaintBuffers(pn)),vf(Ot,Tr,nt,wt,fe);const Cr=Ze.translatePosMatrix(ut.posMatrix,wt,fe.paint.get("fill-extrusion-translate"),fe.paint.get("fill-extrusion-translate-anchor")),Or=fe.paint.get("fill-extrusion-vertical-gradient"),Vr=qr?Sn(Cr,Ze,Or,Dn,ut,pn,wt):ra(Cr,Ze,Or,Dn);Kt.draw(zt,zt.gl.TRIANGLES,Oe,We,Mt,Zo.backCCW,Vr,Ht,fe.id,kt.layoutVertexBuffer,kt.indexBuffer,kt.segments,fe.paint,Ze.transform.zoom,Ot,Ze.style.map.terrain&&kt.centroidVertexBuffer)}}function wf(Ze,O,fe,Re,Oe,We,Mt){const zt=Ze.context,rr=zt.gl,Tr=fe.fbo;if(!Tr)return;const zr=Ze.useProgram("hillshade"),qr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(O);zt.activeTexture.set(rr.TEXTURE0),rr.bindTexture(rr.TEXTURE_2D,Tr.colorAttachment.get()),zr.draw(zt,rr.TRIANGLES,Oe,We,Mt,Zo.disabled,((pn,Dn,nt,ut)=>{const wt=nt.paint.get("hillshade-shadow-color"),kt=nt.paint.get("hillshade-highlight-color"),Ht=nt.paint.get("hillshade-accent-color");let Ot=nt.paint.get("hillshade-illumination-direction")*(Math.PI/180);nt.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ot-=pn.transform.angle);const Kt=!pn.options.moving;return{u_matrix:ut?ut.posMatrix:pn.transform.calculatePosMatrix(Dn.tileID.toUnwrapped(),Kt),u_image:0,u_latrange:as(0,Dn.tileID),u_light:[nt.paint.get("hillshade-exaggeration"),Ot],u_shadow:wt,u_highlight:kt,u_accent:Ht}})(Ze,fe,Re,qr?O:null),qr,Re.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments)}function ic(Ze,O,fe,Re,Oe,We){const Mt=Ze.context,zt=Mt.gl,rr=O.dem;if(rr&&rr.data){const Tr=rr.dim,zr=rr.stride,qr=rr.getPixels();if(Mt.activeTexture.set(zt.TEXTURE1),Mt.pixelStoreUnpackPremultiplyAlpha.set(!1),O.demTexture=O.demTexture||Ze.getTileTexture(zr),O.demTexture){const Dn=O.demTexture;Dn.update(qr,{premultiply:!1}),Dn.bind(zt.NEAREST,zt.CLAMP_TO_EDGE)}else O.demTexture=new f(Mt,qr,zt.RGBA,{premultiply:!1}),O.demTexture.bind(zt.NEAREST,zt.CLAMP_TO_EDGE);Mt.activeTexture.set(zt.TEXTURE0);let pn=O.fbo;if(!pn){const Dn=new f(Mt,{width:Tr,height:Tr,data:null},zt.RGBA);Dn.bind(zt.LINEAR,zt.CLAMP_TO_EDGE),pn=O.fbo=Mt.createFramebuffer(Tr,Tr,!0,!1),pn.colorAttachment.set(Dn.texture)}Mt.bindFramebuffer.set(pn.framebuffer),Mt.viewport.set([0,0,Tr,Tr]),Ze.useProgram("hillshadePrepare").draw(Mt,zt.TRIANGLES,Re,Oe,We,Zo.disabled,((Dn,nt)=>{const ut=nt.stride,wt=r.H();return r.aP(wt,0,r.X,-r.X,0,0,1),r.J(wt,wt,[0,-r.X,0]),{u_matrix:wt,u_image:1,u_dimension:[ut,ut],u_zoom:Dn.overscaledZ,u_unpack:nt.getUnpackVector()}})(O.tileID,rr),null,fe.id,Ze.rasterBoundsBuffer,Ze.quadTriangleIndexBuffer,Ze.rasterBoundsSegments),O.needsHillshadePrepare=!1}}function ih(Ze,O,fe,Re,Oe,We){const Mt=Re.paint.get("raster-fade-duration");if(!We&&Mt>0){const zt=s.now(),rr=(zt-Ze.timeAdded)/Mt,Tr=O?(zt-O.timeAdded)/Mt:-1,zr=fe.getSource(),qr=Oe.coveringZoomLevel({tileSize:zr.tileSize,roundZoom:zr.roundZoom}),pn=!O||Math.abs(O.tileID.overscaledZ-qr)>Math.abs(Ze.tileID.overscaledZ-qr),Dn=pn&&Ze.refreshedUponExpiration?1:r.ac(pn?rr:1-Tr,0,1);return Ze.refreshedUponExpiration&&rr>=1&&(Ze.refreshedUponExpiration=!1),O?{opacity:1,mix:1-Dn}:{opacity:Dn,mix:0}}return{opacity:1,mix:0}}const Jh=new r.aM(1,0,0,1),Xl=new r.aM(0,1,0,1),Oh=new r.aM(0,0,1,1),Hd=new r.aM(1,0,1,1),od=new r.aM(0,1,1,1);function Ah(Ze,O,fe,Re){Uc(Ze,0,O+fe/2,Ze.transform.width,fe,Re)}function sd(Ze,O,fe,Re){Uc(Ze,O-fe/2,0,fe,Ze.transform.height,Re)}function Uc(Ze,O,fe,Re,Oe,We){const Mt=Ze.context,zt=Mt.gl;zt.enable(zt.SCISSOR_TEST),zt.scissor(O*Ze.pixelRatio,fe*Ze.pixelRatio,Re*Ze.pixelRatio,Oe*Ze.pixelRatio),Mt.clear({color:We}),zt.disable(zt.SCISSOR_TEST)}function ld(Ze,O,fe){const Re=Ze.context,Oe=Re.gl,We=fe.posMatrix,Mt=Ze.useProgram("debug"),zt=Ws.disabled,rr=Tl.disabled,Tr=Ze.colorModeForRenderPass(),zr="$debug",qr=Ze.style.map.terrain&&Ze.style.map.terrain.getTerrainData(fe);Re.activeTexture.set(Oe.TEXTURE0);const pn=O.getTileByID(fe.key).latestRawTileData,Dn=Math.floor((pn&&pn.byteLength||0)/1024),nt=O.getTile(fe).tileSize,ut=512/Math.min(nt,512)*(fe.overscaledZ/Ze.transform.zoom)*.5;let wt=fe.canonical.toString();fe.overscaledZ!==fe.canonical.z&&(wt+=` => ${fe.overscaledZ}`),(function(kt,Ht){kt.initDebugOverlayCanvas();const Ot=kt.debugOverlayCanvas,Kt=kt.context.gl,Cr=kt.debugOverlayCanvas.getContext("2d");Cr.clearRect(0,0,Ot.width,Ot.height),Cr.shadowColor="white",Cr.shadowBlur=2,Cr.lineWidth=1.5,Cr.strokeStyle="white",Cr.textBaseline="top",Cr.font="bold 36px Open Sans, sans-serif",Cr.fillText(Ht,5,5),Cr.strokeText(Ht,5,5),kt.debugOverlayTexture.update(Ot),kt.debugOverlayTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE)})(Ze,`${wt} ${Dn}kB`),Mt.draw(Re,Oe.TRIANGLES,zt,rr,mu.alphaBlended,Zo.disabled,wo(We,r.aM.transparent,ut),null,zr,Ze.debugBuffer,Ze.quadTriangleIndexBuffer,Ze.debugSegments),Mt.draw(Re,Oe.LINE_STRIP,zt,rr,Tr,Zo.disabled,wo(We,r.aM.red),qr,zr,Ze.debugBuffer,Ze.tileBorderIndexBuffer,Ze.debugSegments)}function Su(Ze,O,fe){const Re=Ze.context,Oe=Re.gl,We=Ze.colorModeForRenderPass(),Mt=new Ws(Oe.LEQUAL,Ws.ReadWrite,Ze.depthRangeFor3D),zt=Ze.useProgram("terrain"),rr=O.getTerrainMesh();Re.bindFramebuffer.set(null),Re.viewport.set([0,0,Ze.width,Ze.height]);for(const Tr of fe){const zr=Ze.renderToTexture.getTexture(Tr),qr=O.getTerrainData(Tr.tileID);Re.activeTexture.set(Oe.TEXTURE0),Oe.bindTexture(Oe.TEXTURE_2D,zr.texture);const pn=Ze.transform.calculatePosMatrix(Tr.tileID.toUnwrapped()),Dn=O.getMeshFrameDelta(Ze.transform.zoom),nt=Ze.transform.calculateFogMatrix(Tr.tileID.toUnwrapped()),ut=Wr(pn,Dn,nt,Ze.style.sky,Ze.transform.pitch);zt.draw(Re,Oe.TRIANGLES,Mt,Tl.disabled,We,Zo.backCCW,ut,qr,"terrain",rr.vertexBuffer,rr.indexBuffer,rr.segments)}}class qc{constructor(O,fe,Re){this.vertexBuffer=O,this.indexBuffer=fe,this.segments=Re}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class $f{constructor(O,fe){this.context=new Vd(O),this.transform=fe,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:r.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Zt.maxUnderzooming+Zt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Qr}resize(O,fe,Re){if(this.width=Math.floor(O*Re),this.height=Math.floor(fe*Re),this.pixelRatio=Re,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(const Oe of this.style._order)this.style._layers[Oe].resize()}setup(){const O=this.context,fe=new r.aX;fe.emplaceBack(0,0),fe.emplaceBack(r.X,0),fe.emplaceBack(0,r.X),fe.emplaceBack(r.X,r.X),this.tileExtentBuffer=O.createVertexBuffer(fe,Tn.members),this.tileExtentSegments=r.a0.simpleSegment(0,0,4,2);const Re=new r.aX;Re.emplaceBack(0,0),Re.emplaceBack(r.X,0),Re.emplaceBack(0,r.X),Re.emplaceBack(r.X,r.X),this.debugBuffer=O.createVertexBuffer(Re,Tn.members),this.debugSegments=r.a0.simpleSegment(0,0,4,5);const Oe=new r.$;Oe.emplaceBack(0,0,0,0),Oe.emplaceBack(r.X,0,r.X,0),Oe.emplaceBack(0,r.X,0,r.X),Oe.emplaceBack(r.X,r.X,r.X,r.X),this.rasterBoundsBuffer=O.createVertexBuffer(Oe,rt.members),this.rasterBoundsSegments=r.a0.simpleSegment(0,0,4,2);const We=new r.aX;We.emplaceBack(0,0),We.emplaceBack(1,0),We.emplaceBack(0,1),We.emplaceBack(1,1),this.viewportBuffer=O.createVertexBuffer(We,Tn.members),this.viewportSegments=r.a0.simpleSegment(0,0,4,2);const Mt=new r.aZ;Mt.emplaceBack(0),Mt.emplaceBack(1),Mt.emplaceBack(3),Mt.emplaceBack(2),Mt.emplaceBack(0),this.tileBorderIndexBuffer=O.createIndexBuffer(Mt);const zt=new r.aY;zt.emplaceBack(0,1,2),zt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=O.createIndexBuffer(zt);const rr=this.context.gl;this.stencilClearMode=new Tl({func:rr.ALWAYS,mask:0},0,255,rr.ZERO,rr.ZERO,rr.ZERO)}clearStencil(){const O=this.context,fe=O.gl;this.nextStencilID=1,this.currentStencilSource=void 0;const Re=r.H();r.aP(Re,0,this.width,this.height,0,0,1),r.K(Re,Re,[fe.drawingBufferWidth,fe.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(O,fe.TRIANGLES,Ws.disabled,this.stencilClearMode,mu.disabled,Zo.disabled,Uo(Re),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(O,fe){if(this.currentStencilSource===O.source||!O.isTileClipped()||!fe||!fe.length)return;this.currentStencilSource=O.source;const Re=this.context,Oe=Re.gl;this.nextStencilID+fe.length>256&&this.clearStencil(),Re.setColorMode(mu.disabled),Re.setDepthMode(Ws.disabled);const We=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(const Mt of fe){const zt=this._tileClippingMaskIDs[Mt.key]=this.nextStencilID++,rr=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Mt);We.draw(Re,Oe.TRIANGLES,Ws.disabled,new Tl({func:Oe.ALWAYS,mask:0},zt,255,Oe.KEEP,Oe.KEEP,Oe.REPLACE),mu.disabled,Zo.disabled,Uo(Mt.posMatrix),rr,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();const O=this.nextStencilID++,fe=this.context.gl;return new Tl({func:fe.NOTEQUAL,mask:255},O,255,fe.KEEP,fe.KEEP,fe.REPLACE)}stencilModeForClipping(O){const fe=this.context.gl;return new Tl({func:fe.EQUAL,mask:255},this._tileClippingMaskIDs[O.key],0,fe.KEEP,fe.KEEP,fe.REPLACE)}stencilConfigForOverlap(O){const fe=this.context.gl,Re=O.sort((Mt,zt)=>zt.overscaledZ-Mt.overscaledZ),Oe=Re[Re.length-1].overscaledZ,We=Re[0].overscaledZ-Oe+1;if(We>1){this.currentStencilSource=void 0,this.nextStencilID+We>256&&this.clearStencil();const Mt={};for(let zt=0;zt<We;zt++)Mt[zt+Oe]=new Tl({func:fe.GEQUAL,mask:255},zt+this.nextStencilID,255,fe.KEEP,fe.KEEP,fe.REPLACE);return this.nextStencilID+=We,[Mt,Re]}return[{[Oe]:Tl.disabled},Re]}colorModeForRenderPass(){const O=this.context.gl;return this._showOverdrawInspector?new mu([O.CONSTANT_COLOR,O.ONE],new r.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?mu.unblended:mu.alphaBlended}depthModeForSublayer(O,fe,Re){if(!this.opaquePassEnabledForLayer())return Ws.disabled;const Oe=1-((1+this.currentLayer)*this.numSublayers+O)*this.depthEpsilon;return new Ws(Re||this.context.gl.LEQUAL,fe,[Oe,Oe])}opaquePassEnabledForLayer(){return this.currentLayer<this.opaquePassCutoff}render(O,fe){this.style=O,this.options=fe,this.lineAtlas=O.lineAtlas,this.imageManager=O.imageManager,this.glyphManager=O.glyphManager,this.symbolFadeChange=O.placement.symbolFadeChange(s.now()),this.imageManager.beginFrame();const Re=this.style._order,Oe=this.style.sourceCaches,We={},Mt={},zt={};for(const rr in Oe){const Tr=Oe[rr];Tr.used&&Tr.prepare(this.context),We[rr]=Tr.getVisibleCoordinates(),Mt[rr]=We[rr].slice().reverse(),zt[rr]=Tr.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let rr=0;rr<Re.length;rr++)if(this.style._layers[Re[rr]].is3D()){this.opaquePassCutoff=rr;break}this.maybeDrawDepthAndCoords(!1),this.renderToTexture&&(this.renderToTexture.prepareForRender(this.style,this.transform.zoom),this.opaquePassCutoff=0),this.renderPass="offscreen";for(const rr of Re){const Tr=this.style._layers[rr];if(!Tr.hasOffscreenPass()||Tr.isHidden(this.transform.zoom))continue;const zr=Mt[Tr.source];(Tr.type==="custom"||zr.length)&&this.renderLayer(this,Oe[Tr.source],Tr,zr)}if(this.context.bindFramebuffer.set(null),this.context.clear({color:fe.showOverdrawInspector?r.aM.black:r.aM.transparent,depth:1}),this.clearStencil(),this.style.sky&&(function(rr,Tr){const zr=rr.context,qr=zr.gl,pn=((kt,Ht,Ot)=>({u_sky_color:kt.properties.get("sky-color"),u_horizon_color:kt.properties.get("horizon-color"),u_horizon:(Ht.height/2+Ht.getHorizon())*Ot,u_sky_horizon_blend:kt.properties.get("sky-horizon-blend")*Ht.height/2*Ot}))(Tr,rr.style.map.transform,rr.pixelRatio),Dn=new Ws(qr.LEQUAL,Ws.ReadWrite,[0,1]),nt=Tl.disabled,ut=rr.colorModeForRenderPass(),wt=rr.useProgram("sky");if(!Tr.mesh){const kt=new r.aX;kt.emplaceBack(-1,-1),kt.emplaceBack(1,-1),kt.emplaceBack(1,1),kt.emplaceBack(-1,1);const Ht=new r.aY;Ht.emplaceBack(0,1,2),Ht.emplaceBack(0,2,3),Tr.mesh=new qc(zr.createVertexBuffer(kt,Tn.members),zr.createIndexBuffer(Ht),r.a0.simpleSegment(0,0,kt.length,Ht.length))}wt.draw(zr,qr.TRIANGLES,Dn,nt,ut,Zo.disabled,pn,void 0,"sky",Tr.mesh.vertexBuffer,Tr.mesh.indexBuffer,Tr.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=fe.showOverdrawInspector,this.depthRangeFor3D=[0,1-(O._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){const rr=this.style._layers[Re[this.currentLayer]],Tr=Oe[rr.source],zr=We[rr.source];this._renderTileClippingMasks(rr,zr),this.renderLayer(this,Tr,rr,zr)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<Re.length;this.currentLayer++){const rr=this.style._layers[Re[this.currentLayer]],Tr=Oe[rr.source];if(this.renderToTexture&&this.renderToTexture.renderLayer(rr))continue;const zr=(rr.type==="symbol"?zt:Mt)[rr.source];this._renderTileClippingMasks(rr,We[rr.source]),this.renderLayer(this,Tr,rr,zr)}if(this.options.showTileBoundaries){const rr=(function(Tr,zr){let qr=null;const pn=Object.values(Tr._layers).flatMap(wt=>wt.source&&!wt.isHidden(zr)?[Tr.sourceCaches[wt.source]]:[]),Dn=pn.filter(wt=>wt.getSource().type==="vector"),nt=pn.filter(wt=>wt.getSource().type!=="vector"),ut=wt=>{(!qr||qr.getSource().maxzoom<wt.getSource().maxzoom)&&(qr=wt)};return Dn.forEach(wt=>ut(wt)),qr||nt.forEach(wt=>ut(wt)),qr})(this.style,this.transform.zoom);rr&&(function(Tr,zr,qr){for(let pn=0;pn<qr.length;pn++)ld(Tr,zr,qr[pn])})(this,rr,rr.getVisibleCoordinates())}this.options.showPadding&&(function(rr){const Tr=rr.transform.padding;Ah(rr,rr.transform.height-(Tr.top||0),3,Jh),Ah(rr,Tr.bottom||0,3,Xl),sd(rr,Tr.left||0,3,Oh),sd(rr,rr.transform.width-(Tr.right||0),3,Hd);const zr=rr.transform.centerPoint;(function(qr,pn,Dn,nt){Uc(qr,pn-1,Dn-10,2,20,nt),Uc(qr,pn-10,Dn-1,20,2,nt)})(rr,zr.x,rr.transform.height-zr.y,od)})(this),this.context.setDefault()}maybeDrawDepthAndCoords(O){if(!this.style||!this.style.map||!this.style.map.terrain)return;const fe=this.terrainFacilitator.matrix,Re=this.transform.modelViewProjectionMatrix;let Oe=this.terrainFacilitator.dirty;Oe||(Oe=O?!r.a_(fe,Re):!r.a$(fe,Re)),Oe||(Oe=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),Oe&&(r.b0(fe,Re),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function(We,Mt){const zt=We.context,rr=zt.gl,Tr=mu.unblended,zr=new Ws(rr.LEQUAL,Ws.ReadWrite,[0,1]),qr=Mt.getTerrainMesh(),pn=Mt.sourceCache.getRenderableTiles(),Dn=We.useProgram("terrainDepth");zt.bindFramebuffer.set(Mt.getFramebuffer("depth").framebuffer),zt.viewport.set([0,0,We.width/devicePixelRatio,We.height/devicePixelRatio]),zt.clear({color:r.aM.transparent,depth:1});for(const nt of pn){const ut=Mt.getTerrainData(nt.tileID),wt={u_matrix:We.transform.calculatePosMatrix(nt.tileID.toUnwrapped()),u_ele_delta:Mt.getMeshFrameDelta(We.transform.zoom)};Dn.draw(zt,rr.TRIANGLES,zr,Tl.disabled,Tr,Zo.backCCW,wt,ut,"terrain",qr.vertexBuffer,qr.indexBuffer,qr.segments)}zt.bindFramebuffer.set(null),zt.viewport.set([0,0,We.width,We.height])})(this,this.style.map.terrain),(function(We,Mt){const zt=We.context,rr=zt.gl,Tr=mu.unblended,zr=new Ws(rr.LEQUAL,Ws.ReadWrite,[0,1]),qr=Mt.getTerrainMesh(),pn=Mt.getCoordsTexture(),Dn=Mt.sourceCache.getRenderableTiles(),nt=We.useProgram("terrainCoords");zt.bindFramebuffer.set(Mt.getFramebuffer("coords").framebuffer),zt.viewport.set([0,0,We.width/devicePixelRatio,We.height/devicePixelRatio]),zt.clear({color:r.aM.transparent,depth:1}),Mt.coordsIndex=[];for(const ut of Dn){const wt=Mt.getTerrainData(ut.tileID);zt.activeTexture.set(rr.TEXTURE0),rr.bindTexture(rr.TEXTURE_2D,pn.texture);const kt={u_matrix:We.transform.calculatePosMatrix(ut.tileID.toUnwrapped()),u_terrain_coords_id:(255-Mt.coordsIndex.length)/255,u_texture:0,u_ele_delta:Mt.getMeshFrameDelta(We.transform.zoom)};nt.draw(zt,rr.TRIANGLES,zr,Tl.disabled,Tr,Zo.backCCW,kt,wt,"terrain",qr.vertexBuffer,qr.indexBuffer,qr.segments),Mt.coordsIndex.push(ut.tileID.key)}zt.bindFramebuffer.set(null),zt.viewport.set([0,0,We.width,We.height])})(this,this.style.map.terrain))}renderLayer(O,fe,Re,Oe){if(!Re.isHidden(this.transform.zoom)&&(Re.type==="background"||Re.type==="custom"||(Oe||[]).length))switch(this.id=Re.id,Re.type){case"symbol":(function(We,Mt,zt,rr,Tr){if(We.renderPass!=="translucent")return;const zr=Tl.disabled,qr=We.colorModeForRenderPass();(zt._unevaluatedLayout.hasValue("text-variable-anchor")||zt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(pn,Dn,nt,ut,wt,kt,Ht,Ot,Kt){const Cr=Dn.transform,Or=$a(),Vr=wt==="map",sn=kt==="map";for(const bn of pn){const Un=ut.getTile(bn),Gn=Un.getBucket(nt);if(!Gn||!Gn.text||!Gn.text.segments.get().length)continue;const ua=r.ag(Gn.textSizeData,Cr.zoom),Ha=ha(Un,1,Dn.transform.zoom),Ti=Nr(bn.posMatrix,sn,Vr,Dn.transform,Ha),mi=nt.layout.get("icon-text-fit")!=="none"&&Gn.hasIconData();if(ua){const Ai=Math.pow(2,Cr.zoom-Un.tileID.overscaledZ),po=Dn.style.map.terrain?(Po,us)=>Dn.style.map.terrain.getElevation(bn,Po,us):null,Fo=Or.translatePosition(Cr,Un,Ht,Ot);wh(Gn,Vr,sn,Kt,Cr,Ti,bn.posMatrix,Ai,ua,mi,Or,Fo,bn.toUnwrapped(),po)}}})(rr,We,zt,Mt,zt.layout.get("text-rotation-alignment"),zt.layout.get("text-pitch-alignment"),zt.paint.get("text-translate"),zt.paint.get("text-translate-anchor"),Tr),zt.paint.get("icon-opacity").constantOr(1)!==0&&Cd(We,Mt,zt,rr,!1,zt.paint.get("icon-translate"),zt.paint.get("icon-translate-anchor"),zt.layout.get("icon-rotation-alignment"),zt.layout.get("icon-pitch-alignment"),zt.layout.get("icon-keep-upright"),zr,qr),zt.paint.get("text-opacity").constantOr(1)!==0&&Cd(We,Mt,zt,rr,!0,zt.paint.get("text-translate"),zt.paint.get("text-translate-anchor"),zt.layout.get("text-rotation-alignment"),zt.layout.get("text-pitch-alignment"),zt.layout.get("text-keep-upright"),zr,qr),Mt.map.showCollisionBoxes&&(df(We,Mt,zt,rr,!0),df(We,Mt,zt,rr,!1))})(O,fe,Re,Oe,this.style.placement.variableOffsets);break;case"circle":(function(We,Mt,zt,rr){if(We.renderPass!=="translucent")return;const Tr=zt.paint.get("circle-opacity"),zr=zt.paint.get("circle-stroke-width"),qr=zt.paint.get("circle-stroke-opacity"),pn=!zt.layout.get("circle-sort-key").isConstant();if(Tr.constantOr(1)===0&&(zr.constantOr(1)===0||qr.constantOr(1)===0))return;const Dn=We.context,nt=Dn.gl,ut=We.depthModeForSublayer(0,Ws.ReadOnly),wt=Tl.disabled,kt=We.colorModeForRenderPass(),Ht=[];for(let Ot=0;Ot<rr.length;Ot++){const Kt=rr[Ot],Cr=Mt.getTile(Kt),Or=Cr.getBucket(zt);if(!Or)continue;const Vr=Or.programConfigurations.get(zt.id),sn=We.useProgram("circle",Vr),bn=Or.layoutVertexBuffer,Un=Or.indexBuffer,Gn=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Kt),ua={programConfiguration:Vr,program:sn,layoutVertexBuffer:bn,indexBuffer:Un,uniformValues:uo(We,Kt,Cr,zt),terrainData:Gn};if(pn){const Ha=Or.segments.get();for(const Ti of Ha)Ht.push({segments:new r.a0([Ti]),sortKey:Ti.sortKey,state:ua})}else Ht.push({segments:Or.segments,sortKey:0,state:ua})}pn&&Ht.sort((Ot,Kt)=>Ot.sortKey-Kt.sortKey);for(const Ot of Ht){const{programConfiguration:Kt,program:Cr,layoutVertexBuffer:Or,indexBuffer:Vr,uniformValues:sn,terrainData:bn}=Ot.state;Cr.draw(Dn,nt.TRIANGLES,ut,wt,kt,Zo.disabled,sn,bn,zt.id,Or,Vr,Ot.segments,zt.paint,We.transform.zoom,Kt)}})(O,fe,Re,Oe);break;case"heatmap":(function(We,Mt,zt,rr){if(zt.paint.get("heatmap-opacity")===0)return;const Tr=We.context;if(We.style.map.terrain){for(const zr of rr){const qr=Mt.getTile(zr);Mt.hasRenderableParent(zr)||(We.renderPass==="offscreen"?Th(We,qr,zt,zr):We.renderPass==="translucent"&&Zf(We,zt,zr))}Tr.viewport.set([0,0,We.width,We.height])}else We.renderPass==="offscreen"?(function(zr,qr,pn,Dn){const nt=zr.context,ut=nt.gl,wt=Tl.disabled,kt=new mu([ut.ONE,ut.ONE],r.aM.transparent,[!0,!0,!0,!0]);(function(Ht,Ot,Kt){const Cr=Ht.gl;Ht.activeTexture.set(Cr.TEXTURE1),Ht.viewport.set([0,0,Ot.width/4,Ot.height/4]);let Or=Kt.heatmapFbos.get(r.aU);Or?(Cr.bindTexture(Cr.TEXTURE_2D,Or.colorAttachment.get()),Ht.bindFramebuffer.set(Or.framebuffer)):(Or=$h(Ht,Ot.width/4,Ot.height/4),Kt.heatmapFbos.set(r.aU,Or))})(nt,zr,pn),nt.clear({color:r.aM.transparent});for(let Ht=0;Ht<Dn.length;Ht++){const Ot=Dn[Ht];if(qr.hasRenderableParent(Ot))continue;const Kt=qr.getTile(Ot),Cr=Kt.getBucket(pn);if(!Cr)continue;const Or=Cr.programConfigurations.get(pn.id),Vr=zr.useProgram("heatmap",Or),{zoom:sn}=zr.transform;Vr.draw(nt,ut.TRIANGLES,Ws.disabled,wt,kt,Zo.disabled,Ri(Ot.posMatrix,Kt,sn,pn.paint.get("heatmap-intensity")),null,pn.id,Cr.layoutVertexBuffer,Cr.indexBuffer,Cr.segments,pn.paint,zr.transform.zoom,Or)}nt.viewport.set([0,0,zr.width,zr.height])})(We,Mt,zt,rr):We.renderPass==="translucent"&&(function(zr,qr){const pn=zr.context,Dn=pn.gl;pn.setColorMode(zr.colorModeForRenderPass());const nt=qr.heatmapFbos.get(r.aU);nt&&(pn.activeTexture.set(Dn.TEXTURE0),Dn.bindTexture(Dn.TEXTURE_2D,nt.colorAttachment.get()),pn.activeTexture.set(Dn.TEXTURE1),Kh(pn,qr).bind(Dn.LINEAR,Dn.CLAMP_TO_EDGE),zr.useProgram("heatmapTexture").draw(pn,Dn.TRIANGLES,Ws.disabled,Tl.disabled,zr.colorModeForRenderPass(),Zo.disabled,ps(zr,qr,0,1),null,qr.id,zr.viewportBuffer,zr.quadTriangleIndexBuffer,zr.viewportSegments,qr.paint,zr.transform.zoom))})(We,zt)})(O,fe,Re,Oe);break;case"line":(function(We,Mt,zt,rr){if(We.renderPass!=="translucent")return;const Tr=zt.paint.get("line-opacity"),zr=zt.paint.get("line-width");if(Tr.constantOr(1)===0||zr.constantOr(1)===0)return;const qr=We.depthModeForSublayer(0,Ws.ReadOnly),pn=We.colorModeForRenderPass(),Dn=zt.paint.get("line-dasharray"),nt=zt.paint.get("line-pattern"),ut=nt.constantOr(1),wt=zt.paint.get("line-gradient"),kt=zt.getCrossfadeParameters(),Ht=ut?"linePattern":Dn?"lineSDF":wt?"lineGradient":"line",Ot=We.context,Kt=Ot.gl;let Cr=!0;for(const Or of rr){const Vr=Mt.getTile(Or);if(ut&&!Vr.patternsLoaded())continue;const sn=Vr.getBucket(zt);if(!sn)continue;const bn=sn.programConfigurations.get(zt.id),Un=We.context.program.get(),Gn=We.useProgram(Ht,bn),ua=Cr||Gn.program!==Un,Ha=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Or),Ti=nt.constantOr(null);if(Ti&&Vr.imageAtlas){const po=Vr.imageAtlas,Fo=po.patternPositions[Ti.to.toString()],Po=po.patternPositions[Ti.from.toString()];Fo&&Po&&bn.setConstantPatternPositions(Fo,Po)}const mi=Ha?Or:null,Ai=ut?hs(We,Vr,zt,kt,mi):Dn?es(We,Vr,zt,Dn,kt,mi):wt?As(We,Vr,zt,sn.lineClipsArray.length,mi):el(We,Vr,zt,mi);if(ut)Ot.activeTexture.set(Kt.TEXTURE0),Vr.imageAtlasTexture.bind(Kt.LINEAR,Kt.CLAMP_TO_EDGE),bn.updatePaintBuffers(kt);else if(Dn&&(ua||We.lineAtlas.dirty))Ot.activeTexture.set(Kt.TEXTURE0),We.lineAtlas.bind(Ot);else if(wt){const po=sn.gradients[zt.id];let Fo=po.texture;if(zt.gradientVersion!==po.version){let Po=256;if(zt.stepInterpolant){const us=Mt.getSource().maxzoom,il=Or.canonical.z===us?Math.ceil(1<<We.transform.maxZoom-Or.canonical.z):1;Po=r.ac(r.aV(sn.maxLineLength/r.X*1024*il),256,Ot.maxTextureSize)}po.gradient=r.aW({expression:zt.gradientExpression(),evaluationKey:"lineProgress",resolution:Po,image:po.gradient||void 0,clips:sn.lineClipsArray}),po.texture?po.texture.update(po.gradient):po.texture=new f(Ot,po.gradient,Kt.RGBA),po.version=zt.gradientVersion,Fo=po.texture}Ot.activeTexture.set(Kt.TEXTURE0),Fo.bind(zt.stepInterpolant?Kt.NEAREST:Kt.LINEAR,Kt.CLAMP_TO_EDGE)}Gn.draw(Ot,Kt.TRIANGLES,qr,We.stencilModeForClipping(Or),pn,Zo.disabled,Ai,Ha,zt.id,sn.layoutVertexBuffer,sn.indexBuffer,sn.segments,zt.paint,We.transform.zoom,bn,sn.layoutVertexBuffer2),Cr=!1}})(O,fe,Re,Oe);break;case"fill":(function(We,Mt,zt,rr){const Tr=zt.paint.get("fill-color"),zr=zt.paint.get("fill-opacity");if(zr.constantOr(1)===0)return;const qr=We.colorModeForRenderPass(),pn=zt.paint.get("fill-pattern"),Dn=We.opaquePassEnabledForLayer()&&!pn.constantOr(1)&&Tr.constantOr(r.aM.transparent).a===1&&zr.constantOr(0)===1?"opaque":"translucent";if(We.renderPass===Dn){const nt=We.depthModeForSublayer(1,We.renderPass==="opaque"?Ws.ReadWrite:Ws.ReadOnly);id(We,Mt,zt,rr,nt,qr,!1)}if(We.renderPass==="translucent"&&zt.paint.get("fill-antialias")){const nt=We.depthModeForSublayer(zt.getPaintProperty("fill-outline-color")?2:0,Ws.ReadOnly);id(We,Mt,zt,rr,nt,qr,!0)}})(O,fe,Re,Oe);break;case"fill-extrusion":(function(We,Mt,zt,rr){const Tr=zt.paint.get("fill-extrusion-opacity");if(Tr!==0&&We.renderPass==="translucent"){const zr=new Ws(We.context.gl.LEQUAL,Ws.ReadWrite,We.depthRangeFor3D);if(Tr!==1||zt.paint.get("fill-extrusion-pattern").constantOr(1))Of(We,Mt,zt,rr,zr,Tl.disabled,mu.disabled),Of(We,Mt,zt,rr,zr,We.stencilModeFor3D(),We.colorModeForRenderPass());else{const qr=We.colorModeForRenderPass();Of(We,Mt,zt,rr,zr,Tl.disabled,qr)}}})(O,fe,Re,Oe);break;case"hillshade":(function(We,Mt,zt,rr){if(We.renderPass!=="offscreen"&&We.renderPass!=="translucent")return;const Tr=We.context,zr=We.depthModeForSublayer(0,Ws.ReadOnly),qr=We.colorModeForRenderPass(),[pn,Dn]=We.renderPass==="translucent"?We.stencilConfigForOverlap(rr):[{},rr];for(const nt of Dn){const ut=Mt.getTile(nt);ut.needsHillshadePrepare!==void 0&&ut.needsHillshadePrepare&&We.renderPass==="offscreen"?ic(We,ut,zt,zr,Tl.disabled,qr):We.renderPass==="translucent"&&wf(We,nt,ut,zt,zr,pn[nt.overscaledZ],qr)}Tr.viewport.set([0,0,We.width,We.height])})(O,fe,Re,Oe);break;case"raster":(function(We,Mt,zt,rr){if(We.renderPass!=="translucent"||zt.paint.get("raster-opacity")===0||!rr.length)return;const Tr=We.context,zr=Tr.gl,qr=Mt.getSource(),pn=We.useProgram("raster"),Dn=We.colorModeForRenderPass(),[nt,ut]=qr instanceof pt?[{},rr]:We.stencilConfigForOverlap(rr),wt=ut[ut.length-1].overscaledZ,kt=!We.options.moving;for(const Ht of ut){const Ot=We.depthModeForSublayer(Ht.overscaledZ-wt,zt.paint.get("raster-opacity")===1?Ws.ReadWrite:Ws.ReadOnly,zr.LESS),Kt=Mt.getTile(Ht);Kt.registerFadeDuration(zt.paint.get("raster-fade-duration"));const Cr=Mt.findLoadedParent(Ht,0),Or=Mt.findLoadedSibling(Ht),Vr=ih(Kt,Cr||Or||null,Mt,zt,We.transform,We.style.map.terrain);let sn,bn;const Un=zt.paint.get("raster-resampling")==="nearest"?zr.NEAREST:zr.LINEAR;Tr.activeTexture.set(zr.TEXTURE0),Kt.texture.bind(Un,zr.CLAMP_TO_EDGE,zr.LINEAR_MIPMAP_NEAREST),Tr.activeTexture.set(zr.TEXTURE1),Cr?(Cr.texture.bind(Un,zr.CLAMP_TO_EDGE,zr.LINEAR_MIPMAP_NEAREST),sn=Math.pow(2,Cr.tileID.overscaledZ-Kt.tileID.overscaledZ),bn=[Kt.tileID.canonical.x*sn%1,Kt.tileID.canonical.y*sn%1]):Kt.texture.bind(Un,zr.CLAMP_TO_EDGE,zr.LINEAR_MIPMAP_NEAREST),Kt.texture.useMipmap&&Tr.extTextureFilterAnisotropic&&We.transform.pitch>20&&zr.texParameterf(zr.TEXTURE_2D,Tr.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Tr.extTextureFilterAnisotropicMax);const Gn=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Ht),ua=Gn?Ht:null,Ha=ua?ua.posMatrix:We.transform.calculatePosMatrix(Ht.toUnwrapped(),kt),Ti=pl(Ha,bn||[0,0],sn||1,Vr,zt);qr instanceof pt?pn.draw(Tr,zr.TRIANGLES,Ot,Tl.disabled,Dn,Zo.disabled,Ti,Gn,zt.id,qr.boundsBuffer,We.quadTriangleIndexBuffer,qr.boundsSegments):pn.draw(Tr,zr.TRIANGLES,Ot,nt[Ht.overscaledZ],Dn,Zo.disabled,Ti,Gn,zt.id,We.rasterBoundsBuffer,We.quadTriangleIndexBuffer,We.rasterBoundsSegments)}})(O,fe,Re,Oe);break;case"background":(function(We,Mt,zt,rr){const Tr=zt.paint.get("background-color"),zr=zt.paint.get("background-opacity");if(zr===0)return;const qr=We.context,pn=qr.gl,Dn=We.transform,nt=Dn.tileSize,ut=zt.paint.get("background-pattern");if(We.isPatternMissing(ut))return;const wt=!ut&&Tr.a===1&&zr===1&&We.opaquePassEnabledForLayer()?"opaque":"translucent";if(We.renderPass!==wt)return;const kt=Tl.disabled,Ht=We.depthModeForSublayer(0,wt==="opaque"?Ws.ReadWrite:Ws.ReadOnly),Ot=We.colorModeForRenderPass(),Kt=We.useProgram(ut?"backgroundPattern":"background"),Cr=rr||Dn.coveringTiles({tileSize:nt,terrain:We.style.map.terrain});ut&&(qr.activeTexture.set(pn.TEXTURE0),We.imageManager.bind(We.context));const Or=zt.getCrossfadeParameters();for(const Vr of Cr){const sn=rr?Vr.posMatrix:We.transform.calculatePosMatrix(Vr.toUnwrapped()),bn=ut?zl(sn,zr,We,ut,{tileID:Vr,tileSize:nt},Or):ml(sn,zr,Tr),Un=We.style.map.terrain&&We.style.map.terrain.getTerrainData(Vr);Kt.draw(qr,pn.TRIANGLES,Ht,kt,Ot,Zo.disabled,bn,Un,zt.id,We.tileExtentBuffer,We.quadTriangleIndexBuffer,We.tileExtentSegments)}})(O,0,Re,Oe);break;case"custom":(function(We,Mt,zt){const rr=We.context,Tr=zt.implementation;if(We.renderPass==="offscreen"){const zr=Tr.prerender;zr&&(We.setCustomLayerDefaults(),rr.setColorMode(We.colorModeForRenderPass()),zr.call(Tr,rr.gl,We.transform.customLayerMatrix()),rr.setDirty(),We.setBaseState())}else if(We.renderPass==="translucent"){We.setCustomLayerDefaults(),rr.setColorMode(We.colorModeForRenderPass()),rr.setStencilMode(Tl.disabled);const zr=Tr.renderingMode==="3d"?new Ws(We.context.gl.LEQUAL,Ws.ReadWrite,We.depthRangeFor3D):We.depthModeForSublayer(0,Ws.ReadOnly);rr.setDepthMode(zr),Tr.render(rr.gl,We.transform.customLayerMatrix(),{farZ:We.transform.farZ,nearZ:We.transform.nearZ,fov:We.transform._fov,modelViewProjectionMatrix:We.transform.modelViewProjectionMatrix,projectionMatrix:We.transform.projectionMatrix}),rr.setDirty(),We.setBaseState(),rr.bindFramebuffer.set(null)}})(O,0,Re)}}translatePosMatrix(O,fe,Re,Oe,We){if(!Re[0]&&!Re[1])return O;const Mt=We?Oe==="map"?this.transform.angle:0:Oe==="viewport"?-this.transform.angle:0;if(Mt){const Tr=Math.sin(Mt),zr=Math.cos(Mt);Re=[Re[0]*zr-Re[1]*Tr,Re[0]*Tr+Re[1]*zr]}const zt=[We?Re[0]:ha(fe,Re[0],this.transform.zoom),We?Re[1]:ha(fe,Re[1],this.transform.zoom),0],rr=new Float32Array(16);return r.J(rr,O,zt),rr}saveTileTexture(O){const fe=this._tileTextures[O.size[0]];fe?fe.push(O):this._tileTextures[O.size[0]]=[O]}getTileTexture(O){const fe=this._tileTextures[O];return fe&&fe.length>0?fe.pop():null}isPatternMissing(O){if(!O)return!1;if(!O.from||!O.to)return!0;const fe=this.imageManager.getPattern(O.from.toString()),Re=this.imageManager.getPattern(O.to.toString());return!fe||!Re}useProgram(O,fe){this.cache=this.cache||{};const Re=O+(fe?fe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[Re]||(this.cache[Re]=new Xn(this.context,hn[O],fe,Bl[O],this._showOverdrawInspector,this.style.map.terrain)),this.cache[Re]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){const O=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(O.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new f(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){const{drawingBufferWidth:O,drawingBufferHeight:fe}=this.context.gl;return this.width!==O||this.height!==fe}}class iu{constructor(O,fe){this.points=O,this.planes=fe}static fromInvProjectionMatrix(O,fe,Re){const Oe=Math.pow(2,Re),We=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(zt=>{const rr=1/(zt=r.af([],zt,O))[3]/fe*Oe;return r.b1(zt,zt,[rr,rr,1/zt[3],rr])}),Mt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(zt=>{const rr=(function(pn,Dn){var nt=Dn[0],ut=Dn[1],wt=Dn[2],kt=nt*nt+ut*ut+wt*wt;return kt>0&&(kt=1/Math.sqrt(kt)),pn[0]=Dn[0]*kt,pn[1]=Dn[1]*kt,pn[2]=Dn[2]*kt,pn})([],(function(pn,Dn,nt){var ut=Dn[0],wt=Dn[1],kt=Dn[2],Ht=nt[0],Ot=nt[1],Kt=nt[2];return pn[0]=wt*Kt-kt*Ot,pn[1]=kt*Ht-ut*Kt,pn[2]=ut*Ot-wt*Ht,pn})([],k([],We[zt[0]],We[zt[1]]),k([],We[zt[2]],We[zt[1]]))),Tr=-((zr=rr)[0]*(qr=We[zt[1]])[0]+zr[1]*qr[1]+zr[2]*qr[2]);var zr,qr;return rr.concat(Tr)});return new iu(We,Mt)}}class zf{constructor(O,fe){this.min=O,this.max=fe,this.center=(function(Re,Oe,We){return Re[0]=.5*Oe[0],Re[1]=.5*Oe[1],Re[2]=.5*Oe[2],Re})([],(function(Re,Oe,We){return Re[0]=Oe[0]+We[0],Re[1]=Oe[1]+We[1],Re[2]=Oe[2]+We[2],Re})([],this.min,this.max))}quadrant(O){const fe=[O%2==0,O<2],Re=T(this.min),Oe=T(this.max);for(let We=0;We<fe.length;We++)Re[We]=fe[We]?this.min[We]:this.center[We],Oe[We]=fe[We]?this.center[We]:this.max[We];return Oe[2]=this.max[2],new zf(Re,Oe)}distanceX(O){return Math.max(Math.min(this.max[0],O[0]),this.min[0])-O[0]}distanceY(O){return Math.max(Math.min(this.max[1],O[1]),this.min[1])-O[1]}intersects(O){const fe=[[this.min[0],this.min[1],this.min[2],1],[this.max[0],this.min[1],this.min[2],1],[this.max[0],this.max[1],this.min[2],1],[this.min[0],this.max[1],this.min[2],1],[this.min[0],this.min[1],this.max[2],1],[this.max[0],this.min[1],this.max[2],1],[this.max[0],this.max[1],this.max[2],1],[this.min[0],this.max[1],this.max[2],1]];let Re=!0;for(let Oe=0;Oe<O.planes.length;Oe++){const We=O.planes[Oe];let Mt=0;for(let zt=0;zt<fe.length;zt++)r.b2(We,fe[zt])>=0&&Mt++;if(Mt===0)return 0;Mt!==fe.length&&(Re=!1)}if(Re)return 2;for(let Oe=0;Oe<3;Oe++){let We=Number.MAX_VALUE,Mt=-Number.MAX_VALUE;for(let zt=0;zt<O.points.length;zt++){const rr=O.points[zt][Oe]-this.min[Oe];We=Math.min(We,rr),Mt=Math.max(Mt,rr)}if(Mt<0||We>this.max[Oe]-this.min[Oe])return 0}return 1}}class wc{constructor(O=0,fe=0,Re=0,Oe=0){if(isNaN(O)||O<0||isNaN(fe)||fe<0||isNaN(Re)||Re<0||isNaN(Oe)||Oe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=O,this.bottom=fe,this.left=Re,this.right=Oe}interpolate(O,fe,Re){return fe.top!=null&&O.top!=null&&(this.top=r.y.number(O.top,fe.top,Re)),fe.bottom!=null&&O.bottom!=null&&(this.bottom=r.y.number(O.bottom,fe.bottom,Re)),fe.left!=null&&O.left!=null&&(this.left=r.y.number(O.left,fe.left,Re)),fe.right!=null&&O.right!=null&&(this.right=r.y.number(O.right,fe.right,Re)),this}getCenter(O,fe){const Re=r.ac((this.left+O-this.right)/2,0,O),Oe=r.ac((this.top+fe-this.bottom)/2,0,fe);return new r.P(Re,Oe)}equals(O){return this.top===O.top&&this.bottom===O.bottom&&this.left===O.left&&this.right===O.right}clone(){return new wc(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}const Vc=85.051129;class yu{constructor(O,fe,Re,Oe,We){this.tileSize=512,this._renderWorldCopies=We===void 0||!!We,this._minZoom=O||0,this._maxZoom=fe||22,this._minPitch=Re??0,this._maxPitch=Oe??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new r.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new wc,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){const O=new yu(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return O.apply(this),O}apply(O){this.tileSize=O.tileSize,this.latRange=O.latRange,this.lngRange=O.lngRange,this.width=O.width,this.height=O.height,this._center=O._center,this._elevation=O._elevation,this.minElevationForCurrentTile=O.minElevationForCurrentTile,this.zoom=O.zoom,this.angle=O.angle,this._fov=O._fov,this._pitch=O._pitch,this._unmodified=O._unmodified,this._edgeInsets=O._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(O){this._minZoom!==O&&(this._minZoom=O,this.zoom=Math.max(this.zoom,O))}get maxZoom(){return this._maxZoom}set maxZoom(O){this._maxZoom!==O&&(this._maxZoom=O,this.zoom=Math.min(this.zoom,O))}get minPitch(){return this._minPitch}set minPitch(O){this._minPitch!==O&&(this._minPitch=O,this.pitch=Math.max(this.pitch,O))}get maxPitch(){return this._maxPitch}set maxPitch(O){this._maxPitch!==O&&(this._maxPitch=O,this.pitch=Math.min(this.pitch,O))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(O){O===void 0?O=!0:O===null&&(O=!1),this._renderWorldCopies=O}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new r.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(O){const fe=-r.b3(O,-180,180)*Math.PI/180;this.angle!==fe&&(this._unmodified=!1,this.angle=fe,this._calcMatrices(),this.rotationMatrix=(function(){var Re=new r.A(4);return r.A!=Float32Array&&(Re[1]=0,Re[2]=0),Re[0]=1,Re[3]=1,Re})(),(function(Re,Oe,We){var Mt=Oe[0],zt=Oe[1],rr=Oe[2],Tr=Oe[3],zr=Math.sin(We),qr=Math.cos(We);Re[0]=Mt*qr+rr*zr,Re[1]=zt*qr+Tr*zr,Re[2]=Mt*-zr+rr*qr,Re[3]=zt*-zr+Tr*qr})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(O){const fe=r.ac(O,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==fe&&(this._unmodified=!1,this._pitch=fe,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(O){O=Math.max(.01,Math.min(60,O)),this._fov!==O&&(this._unmodified=!1,this._fov=O/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(O){const fe=Math.min(Math.max(O,this.minZoom),this.maxZoom);this._zoom!==fe&&(this._unmodified=!1,this._zoom=fe,this.tileZoom=Math.max(0,Math.floor(fe)),this.scale=this.zoomScale(fe),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(O){O.lat===this._center.lat&&O.lng===this._center.lng||(this._unmodified=!1,this._center=O,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(O){O!==this._elevation&&(this._elevation=O,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(O){this._edgeInsets.equals(O)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,O,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(O){return this._edgeInsets.equals(O)}interpolatePadding(O,fe,Re){this._unmodified=!1,this._edgeInsets.interpolate(O,fe,Re),this._constrain(),this._calcMatrices()}coveringZoomLevel(O){const fe=(O.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/O.tileSize));return Math.max(0,fe)}getVisibleUnwrappedCoordinates(O){const fe=[new r.b4(0,O)];if(this._renderWorldCopies){const Re=this.pointCoordinate(new r.P(0,0)),Oe=this.pointCoordinate(new r.P(this.width,0)),We=this.pointCoordinate(new r.P(this.width,this.height)),Mt=this.pointCoordinate(new r.P(0,this.height)),zt=Math.floor(Math.min(Re.x,Oe.x,We.x,Mt.x)),rr=Math.floor(Math.max(Re.x,Oe.x,We.x,Mt.x)),Tr=1;for(let zr=zt-Tr;zr<=rr+Tr;zr++)zr!==0&&fe.push(new r.b4(zr,O))}return fe}coveringTiles(O){var fe,Re;let Oe=this.coveringZoomLevel(O);const We=Oe;if(O.minzoom!==void 0&&Oe<O.minzoom)return[];O.maxzoom!==void 0&&Oe>O.maxzoom&&(Oe=O.maxzoom);const Mt=this.pointCoordinate(this.getCameraPoint()),zt=r.Z.fromLngLat(this.center),rr=Math.pow(2,Oe),Tr=[rr*Mt.x,rr*Mt.y,0],zr=[rr*zt.x,rr*zt.y,0],qr=iu.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,Oe);let pn=O.minzoom||0;!O.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(pn=Oe);const Dn=O.terrain?2/Math.min(this.tileSize,O.tileSize)*this.tileSize:3,nt=Ot=>({aabb:new zf([Ot*rr,0,0],[(Ot+1)*rr,rr,0]),zoom:0,x:0,y:0,wrap:Ot,fullyVisible:!1}),ut=[],wt=[],kt=Oe,Ht=O.reparseOverscaled?We:Oe;if(this._renderWorldCopies)for(let Ot=1;Ot<=3;Ot++)ut.push(nt(-Ot)),ut.push(nt(Ot));for(ut.push(nt(0));ut.length>0;){const Ot=ut.pop(),Kt=Ot.x,Cr=Ot.y;let Or=Ot.fullyVisible;if(!Or){const Gn=Ot.aabb.intersects(qr);if(Gn===0)continue;Or=Gn===2}const Vr=O.terrain?Tr:zr,sn=Ot.aabb.distanceX(Vr),bn=Ot.aabb.distanceY(Vr),Un=Math.max(Math.abs(sn),Math.abs(bn));if(Ot.zoom===kt||Un>Dn+(1<<kt-Ot.zoom)-2&&Ot.zoom>=pn){const Gn=kt-Ot.zoom,ua=Tr[0]-.5-(Kt<<Gn),Ha=Tr[1]-.5-(Cr<<Gn);wt.push({tileID:new r.S(Ot.zoom===kt?Ht:Ot.zoom,Ot.wrap,Ot.zoom,Kt,Cr),distanceSq:b([zr[0]-.5-Kt,zr[1]-.5-Cr]),tileDistanceToCamera:Math.sqrt(ua*ua+Ha*Ha)})}else for(let Gn=0;Gn<4;Gn++){const ua=(Kt<<1)+Gn%2,Ha=(Cr<<1)+(Gn>>1),Ti=Ot.zoom+1;let mi=Ot.aabb.quadrant(Gn);if(O.terrain){const Ai=new r.S(Ti,Ot.wrap,Ti,ua,Ha),po=O.terrain.getMinMaxElevation(Ai),Fo=(fe=po.minElevation)!==null&&fe!==void 0?fe:this.elevation,Po=(Re=po.maxElevation)!==null&&Re!==void 0?Re:this.elevation;mi=new zf([mi.min[0],mi.min[1],Fo],[mi.max[0],mi.max[1],Po])}ut.push({aabb:mi,zoom:Ti,x:ua,y:Ha,wrap:Ot.wrap,fullyVisible:Or})}}return wt.sort((Ot,Kt)=>Ot.distanceSq-Kt.distanceSq).map(Ot=>Ot.tileID)}resize(O,fe){this.width=O,this.height=fe,this.pixelsToGLUnits=[2/O,-2/fe],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(O){return Math.pow(2,O)}scaleZoom(O){return Math.log(O)/Math.LN2}project(O){const fe=r.ac(O.lat,-85.051129,Vc);return new r.P(r.O(O.lng)*this.worldSize,r.Q(fe)*this.worldSize)}unproject(O){return new r.Z(O.x/this.worldSize,O.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(O){const fe=this.elevation,Re=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,Oe=this.pointLocation(this.centerPoint,O),We=O.getElevationForLngLatZoom(Oe,this.tileZoom);if(!(this.elevation-We))return;const Mt=Re+fe-We,zt=Math.cos(this._pitch)*this.cameraToCenterDistance/Mt/r.b5(1,Oe.lat),rr=this.scaleZoom(zt/this.tileSize);this._elevation=We,this._center=Oe,this.zoom=rr}setLocationAtPoint(O,fe){const Re=this.pointCoordinate(fe),Oe=this.pointCoordinate(this.centerPoint),We=this.locationCoordinate(O),Mt=new r.Z(We.x-(Re.x-Oe.x),We.y-(Re.y-Oe.y));this.center=this.coordinateLocation(Mt),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(O,fe){return fe?this.coordinatePoint(this.locationCoordinate(O),fe.getElevationForLngLatZoom(O,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(O))}pointLocation(O,fe){return this.coordinateLocation(this.pointCoordinate(O,fe))}locationCoordinate(O){return r.Z.fromLngLat(O)}coordinateLocation(O){return O&&O.toLngLat()}pointCoordinate(O,fe){if(fe){const pn=fe.pointCoordinate(O);if(pn!=null)return pn}const Re=[O.x,O.y,0,1],Oe=[O.x,O.y,1,1];r.af(Re,Re,this.pixelMatrixInverse),r.af(Oe,Oe,this.pixelMatrixInverse);const We=Re[3],Mt=Oe[3],zt=Re[1]/We,rr=Oe[1]/Mt,Tr=Re[2]/We,zr=Oe[2]/Mt,qr=Tr===zr?0:(0-Tr)/(zr-Tr);return new r.Z(r.y.number(Re[0]/We,Oe[0]/Mt,qr)/this.worldSize,r.y.number(zt,rr,qr)/this.worldSize)}coordinatePoint(O,fe=0,Re=this.pixelMatrix){const Oe=[O.x*this.worldSize,O.y*this.worldSize,fe,1];return r.af(Oe,Oe,Re),new r.P(Oe[0]/Oe[3],Oe[1]/Oe[3])}getBounds(){const O=Math.max(0,this.height/2-this.getHorizon());return new ue().extend(this.pointLocation(new r.P(0,O))).extend(this.pointLocation(new r.P(this.width,O))).extend(this.pointLocation(new r.P(this.width,this.height))).extend(this.pointLocation(new r.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new ue([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(O){O?(this.lngRange=[O.getWest(),O.getEast()],this.latRange=[O.getSouth(),O.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Vc])}calculateTileMatrix(O){const fe=O.canonical,Re=this.worldSize/this.zoomScale(fe.z),Oe=fe.x+Math.pow(2,fe.z)*O.wrap,We=r.an(new Float64Array(16));return r.J(We,We,[Oe*Re,fe.y*Re,0]),r.K(We,We,[Re/r.X,Re/r.X,1]),We}calculatePosMatrix(O,fe=!1){const Re=O.key,Oe=fe?this._alignedPosMatrixCache:this._posMatrixCache;if(Oe[Re])return Oe[Re];const We=this.calculateTileMatrix(O);return r.L(We,fe?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,We),Oe[Re]=new Float32Array(We),Oe[Re]}calculateFogMatrix(O){const fe=O.key,Re=this._fogMatrixCache;if(Re[fe])return Re[fe];const Oe=this.calculateTileMatrix(O);return r.L(Oe,this.fogMatrix,Oe),Re[fe]=new Float32Array(Oe),Re[fe]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(O,fe){fe=r.ac(+fe,this.minZoom,this.maxZoom);const Re={center:new r.N(O.lng,O.lat),zoom:fe};let Oe=this.lngRange;if(!this._renderWorldCopies&&Oe===null){const Ot=179.9999999999;Oe=[-Ot,Ot]}const We=this.tileSize*this.zoomScale(Re.zoom);let Mt=0,zt=We,rr=0,Tr=We,zr=0,qr=0;const{x:pn,y:Dn}=this.size;if(this.latRange){const Ot=this.latRange;Mt=r.Q(Ot[1])*We,zt=r.Q(Ot[0])*We,zt-Mt<Dn&&(zr=Dn/(zt-Mt))}Oe&&(rr=r.b3(r.O(Oe[0])*We,0,We),Tr=r.b3(r.O(Oe[1])*We,0,We),Tr<rr&&(Tr+=We),Tr-rr<pn&&(qr=pn/(Tr-rr)));const{x:nt,y:ut}=this.project.call({worldSize:We},O);let wt,kt;const Ht=Math.max(qr||0,zr||0);if(Ht){const Ot=new r.P(qr?(Tr+rr)/2:nt,zr?(zt+Mt)/2:ut);return Re.center=this.unproject.call({worldSize:We},Ot).wrap(),Re.zoom+=this.scaleZoom(Ht),Re}if(this.latRange){const Ot=Dn/2;ut-Ot<Mt&&(kt=Mt+Ot),ut+Ot>zt&&(kt=zt-Ot)}if(Oe){const Ot=(rr+Tr)/2;let Kt=nt;this._renderWorldCopies&&(Kt=r.b3(nt,Ot-We/2,Ot+We/2));const Cr=pn/2;Kt-Cr<rr&&(wt=rr+Cr),Kt+Cr>Tr&&(wt=Tr-Cr)}if(wt!==void 0||kt!==void 0){const Ot=new r.P(wt??nt,kt??ut);Re.center=this.unproject.call({worldSize:We},Ot).wrap()}return Re}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;const O=this._unmodified,{center:fe,zoom:Re}=this.getConstrained(this.center,this.zoom);this.center=fe,this.zoom=Re,this._unmodified=O,this._constraining=!1}_calcMatrices(){if(!this.height)return;const O=this.centerOffset,fe=this.point.x,Re=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=r.b5(1,this.center.lat)*this.worldSize;let Oe=r.an(new Float64Array(16));r.K(Oe,Oe,[this.width/2,-this.height/2,1]),r.J(Oe,Oe,[1,-1,0]),this.labelPlaneMatrix=Oe,Oe=r.an(new Float64Array(16)),r.K(Oe,Oe,[1,-1,1]),r.J(Oe,Oe,[-1,-1,0]),r.K(Oe,Oe,[2/this.width,2/this.height,1]),this.glCoordMatrix=Oe;const We=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Mt=Math.min(this.elevation,this.minElevationForCurrentTile),zt=We-Mt*this._pixelPerMeter/Math.cos(this._pitch),rr=Mt<0?zt:We,Tr=Math.PI/2+this._pitch,zr=this._fov*(.5+O.y/this.height),qr=Math.sin(zr)*rr/Math.sin(r.ac(Math.PI-Tr-zr,.01,Math.PI-.01)),pn=this.getHorizon(),Dn=2*Math.atan(pn/this.cameraToCenterDistance)*(.5+O.y/(2*pn)),nt=Math.sin(Dn)*rr/Math.sin(r.ac(Math.PI-Tr-Dn,.01,Math.PI-.01)),ut=Math.min(qr,nt);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ut+rr),this.nearZ=this.height/50,Oe=new Float64Array(16),r.b6(Oe,this._fov,this.width/this.height,this.nearZ,this.farZ),Oe[8]=2*-O.x/this.width,Oe[9]=2*O.y/this.height,this.projectionMatrix=r.ae(Oe),r.K(Oe,Oe,[1,-1,1]),r.J(Oe,Oe,[0,0,-this.cameraToCenterDistance]),r.b7(Oe,Oe,this._pitch),r.ad(Oe,Oe,this.angle),r.J(Oe,Oe,[-fe,-Re,0]),this.mercatorMatrix=r.K([],Oe,[this.worldSize,this.worldSize,this.worldSize]),r.K(Oe,Oe,[1,1,this._pixelPerMeter]),this.pixelMatrix=r.L(new Float64Array(16),this.labelPlaneMatrix,Oe),r.J(Oe,Oe,[0,0,-this.elevation]),this.modelViewProjectionMatrix=Oe,this.invModelViewProjectionMatrix=r.as([],Oe),this.fogMatrix=new Float64Array(16),r.b6(this.fogMatrix,this._fov,this.width/this.height,We,this.farZ),this.fogMatrix[8]=2*-O.x/this.width,this.fogMatrix[9]=2*O.y/this.height,r.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),r.b7(this.fogMatrix,this.fogMatrix,this._pitch),r.ad(this.fogMatrix,this.fogMatrix,this.angle),r.J(this.fogMatrix,this.fogMatrix,[-fe,-Re,0]),r.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),r.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=r.L(new Float64Array(16),this.labelPlaneMatrix,Oe);const wt=this.width%2/2,kt=this.height%2/2,Ht=Math.cos(this.angle),Ot=Math.sin(this.angle),Kt=fe-Math.round(fe)+Ht*wt+Ot*kt,Cr=Re-Math.round(Re)+Ht*kt+Ot*wt,Or=new Float64Array(Oe);if(r.J(Or,Or,[Kt>.5?Kt-1:Kt,Cr>.5?Cr-1:Cr,0]),this.alignedModelViewProjectionMatrix=Or,Oe=r.as(new Float64Array(16),this.pixelMatrix),!Oe)throw new Error("failed to invert matrix");this.pixelMatrixInverse=Oe,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;const O=this.pointCoordinate(new r.P(0,0)),fe=[O.x*this.worldSize,O.y*this.worldSize,0,1];return r.af(fe,fe,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){const O=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new r.P(0,O))}getCameraQueryGeometry(O){const fe=this.getCameraPoint();if(O.length===1)return[O[0],fe];{let Re=fe.x,Oe=fe.y,We=fe.x,Mt=fe.y;for(const zt of O)Re=Math.min(Re,zt.x),Oe=Math.min(Oe,zt.y),We=Math.max(We,zt.x),Mt=Math.max(Mt,zt.y);return[new r.P(Re,Oe),new r.P(We,Oe),new r.P(We,Mt),new r.P(Re,Mt),new r.P(Re,Oe)]}}lngLatToCameraDepth(O,fe){const Re=this.locationCoordinate(O),Oe=[Re.x*this.worldSize,Re.y*this.worldSize,fe,1];return r.af(Oe,Oe,this.modelViewProjectionMatrix),Oe[2]/Oe[3]}}function vh(Ze,O){let fe,Re=!1,Oe=null,We=null;const Mt=()=>{Oe=null,Re&&(Ze.apply(We,fe),Oe=setTimeout(Mt,O),Re=!1)};return(...zt)=>(Re=!0,We=this,fe=zt,Oe||Mt(),Oe)}class Tf{constructor(O){this._getCurrentHash=()=>{const fe=window.location.hash.replace("#","");if(this._hashName){let Re;return fe.split("&").map(Oe=>Oe.split("=")).forEach(Oe=>{Oe[0]===this._hashName&&(Re=Oe)}),(Re&&Re[1]||"").split("/")}return fe.split("/")},this._onHashChange=()=>{const fe=this._getCurrentHash();if(fe.length>=3&&!fe.some(Re=>isNaN(Re))){const Re=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(fe[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+fe[2],+fe[1]],zoom:+fe[0],bearing:Re,pitch:+(fe[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{const fe=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,fe)},this._removeHash=()=>{const fe=this._getCurrentHash();if(fe.length===0)return;const Re=fe.join("/");let Oe=Re;Oe.split("&").length>0&&(Oe=Oe.split("&")[0]),this._hashName&&(Oe=`${this._hashName}=${Re}`);let We=window.location.hash.replace(Oe,"");We.startsWith("#&")?We=We.slice(0,1)+We.slice(2):We==="#"&&(We="");let Mt=window.location.href.replace(/(#.+)?$/,We);Mt=Mt.replace("&&","&"),window.history.replaceState(window.history.state,null,Mt)},this._updateHash=vh(this._updateHashUnthrottled,300),this._hashName=O&&encodeURIComponent(O)}addTo(O){return this._map=O,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(O){const fe=this._map.getCenter(),Re=Math.round(100*this._map.getZoom())/100,Oe=Math.ceil((Re*Math.LN2+Math.log(512/360/.5))/Math.LN10),We=Math.pow(10,Oe),Mt=Math.round(fe.lng*We)/We,zt=Math.round(fe.lat*We)/We,rr=this._map.getBearing(),Tr=this._map.getPitch();let zr="";if(zr+=O?`/${Mt}/${zt}/${Re}`:`${Re}/${zt}/${Mt}`,(rr||Tr)&&(zr+="/"+Math.round(10*rr)/10),Tr&&(zr+=`/${Math.round(Tr)}`),this._hashName){const qr=this._hashName;let pn=!1;const Dn=window.location.hash.slice(1).split("&").map(nt=>{const ut=nt.split("=")[0];return ut===qr?(pn=!0,`${ut}=${zr}`):nt}).filter(nt=>nt);return pn||Dn.push(`${qr}=${zr}`),`#${Dn.join("&")}`}return`#${zr}`}}const Kf={linearity:.3,easing:r.b8(0,0,.3,1)},zh=r.e({deceleration:2500,maxSpeed:1400},Kf),Gd=r.e({deceleration:20,maxSpeed:1400},Kf),Tv=r.e({deceleration:1e3,maxSpeed:360},Kf),ph=r.e({deceleration:1e3,maxSpeed:90},Kf);class Nh{constructor(O){this._map=O,this.clear()}clear(){this._inertiaBuffer=[]}record(O){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:s.now(),settings:O})}_drainInertiaBuffer(){const O=this._inertiaBuffer,fe=s.now();for(;O.length>0&&fe-O[0].time>160;)O.shift()}_onMoveEnd(O){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;const fe={zoom:0,bearing:0,pitch:0,pan:new r.P(0,0),pinchAround:void 0,around:void 0};for(const{settings:We}of this._inertiaBuffer)fe.zoom+=We.zoomDelta||0,fe.bearing+=We.bearingDelta||0,fe.pitch+=We.pitchDelta||0,We.panDelta&&fe.pan._add(We.panDelta),We.around&&(fe.around=We.around),We.pinchAround&&(fe.pinchAround=We.pinchAround);const Re=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Oe={};if(fe.pan.mag()){const We=Fh(fe.pan.mag(),Re,r.e({},zh,O||{}));Oe.offset=fe.pan.mult(We.amount/fe.pan.mag()),Oe.center=this._map.transform.center,ef(Oe,We)}if(fe.zoom){const We=Fh(fe.zoom,Re,Gd);Oe.zoom=this._map.transform.zoom+We.amount,ef(Oe,We)}if(fe.bearing){const We=Fh(fe.bearing,Re,Tv);Oe.bearing=this._map.transform.bearing+r.ac(We.amount,-179,179),ef(Oe,We)}if(fe.pitch){const We=Fh(fe.pitch,Re,ph);Oe.pitch=this._map.transform.pitch+We.amount,ef(Oe,We)}if(Oe.zoom||Oe.bearing){const We=fe.pinchAround===void 0?fe.around:fe.pinchAround;Oe.around=We?this._map.unproject(We):this._map.getCenter()}return this.clear(),r.e(Oe,{noMoveStart:!0})}}function ef(Ze,O){(!Ze.duration||Ze.duration<O.duration)&&(Ze.duration=O.duration,Ze.easing=O.easing)}function Fh(Ze,O,fe){const{maxSpeed:Re,linearity:Oe,deceleration:We}=fe,Mt=r.ac(Ze*Oe/(O/1e3),-Re,Re),zt=Math.abs(Mt)/(We*Oe);return{easing:fe.easing,duration:1e3*zt,amount:Mt*(zt/2)}}class vc extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re,Oe={}){const We=o.mousePos(fe.getCanvas(),Re),Mt=fe.unproject(We);super(O,r.e({point:We,lngLat:Mt,originalEvent:Re},Oe)),this._defaultPrevented=!1,this.target=fe}}class mh extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re){const Oe=O==="touchend"?Re.changedTouches:Re.touches,We=o.touchPos(fe.getCanvasContainer(),Oe),Mt=We.map(rr=>fe.unproject(rr)),zt=We.reduce((rr,Tr,zr,qr)=>rr.add(Tr.div(qr.length)),new r.P(0,0));super(O,{points:We,point:zt,lngLats:Mt,lngLat:fe.unproject(zt),originalEvent:Re}),this._defaultPrevented=!1}}class ud extends r.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(O,fe,Re){super(O,{originalEvent:Re}),this._defaultPrevented=!1}}class yh{constructor(O,fe){this._map=O,this._clickTolerance=fe.clickTolerance}reset(){delete this._mousedownPos}wheel(O){return this._firePreventable(new ud(O.type,this._map,O))}mousedown(O,fe){return this._mousedownPos=fe,this._firePreventable(new vc(O.type,this._map,O))}mouseup(O){this._map.fire(new vc(O.type,this._map,O))}click(O,fe){this._mousedownPos&&this._mousedownPos.dist(fe)>=this._clickTolerance||this._map.fire(new vc(O.type,this._map,O))}dblclick(O){return this._firePreventable(new vc(O.type,this._map,O))}mouseover(O){this._map.fire(new vc(O.type,this._map,O))}mouseout(O){this._map.fire(new vc(O.type,this._map,O))}touchstart(O){return this._firePreventable(new mh(O.type,this._map,O))}touchmove(O){this._map.fire(new mh(O.type,this._map,O))}touchend(O){this._map.fire(new mh(O.type,this._map,O))}touchcancel(O){this._map.fire(new mh(O.type,this._map,O))}_firePreventable(O){if(this._map.fire(O),O.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class uu{constructor(O){this._map=O}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(O){this._map.fire(new vc(O.type,this._map,O))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new vc("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(O){this._delayContextMenu?this._contextMenuEvent=O:this._ignoreContextMenu||this._map.fire(new vc(O.type,this._map,O)),this._map.listens("contextmenu")&&O.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Hc{constructor(O){this._map=O}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(O){return this.transform.pointLocation(r.P.convert(O),this._map.terrain)}}class pf{constructor(O,fe){this._map=O,this._tr=new Hc(O),this._el=O.getCanvasContainer(),this._container=O.getContainer(),this._clickTolerance=fe.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(O,fe){this.isEnabled()&&O.shiftKey&&O.button===0&&(o.disableDrag(),this._startPos=this._lastPos=fe,this._active=!0)}mousemoveWindow(O,fe){if(!this._active)return;const Re=fe;if(this._lastPos.equals(Re)||!this._box&&Re.dist(this._startPos)<this._clickTolerance)return;const Oe=this._startPos;this._lastPos=Re,this._box||(this._box=o.create("div","maplibregl-boxzoom",this._container),this._container.classList.add("maplibregl-crosshair"),this._fireEvent("boxzoomstart",O));const We=Math.min(Oe.x,Re.x),Mt=Math.max(Oe.x,Re.x),zt=Math.min(Oe.y,Re.y),rr=Math.max(Oe.y,Re.y);o.setTransform(this._box,`translate(${We}px,${zt}px)`),this._box.style.width=Mt-We+"px",this._box.style.height=rr-zt+"px"}mouseupWindow(O,fe){if(!this._active||O.button!==0)return;const Re=this._startPos,Oe=fe;if(this.reset(),o.suppressClick(),Re.x!==Oe.x||Re.y!==Oe.y)return this._map.fire(new r.k("boxzoomend",{originalEvent:O})),{cameraAnimation:We=>We.fitScreenCoordinates(Re,Oe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",O)}keydown(O){this._active&&O.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",O))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(o.remove(this._box),this._box=null),o.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(O,fe){return this._map.fire(new r.k(O,{originalEvent:fe}))}}function Qh(Ze,O){if(Ze.length!==O.length)throw new Error(`The number of touches and points are not equal - touches ${Ze.length}, points ${O.length}`);const fe={};for(let Re=0;Re<Ze.length;Re++)fe[Ze[Re].identifier]=O[Re];return fe}class du{constructor(O){this.reset(),this.numTouches=O.numTouches}reset(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1}touchstart(O,fe,Re){(this.centroid||Re.length>this.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=O.timeStamp),Re.length===this.numTouches&&(this.centroid=(function(Oe){const We=new r.P(0,0);for(const Mt of Oe)We._add(Mt);return We.div(Oe.length)})(fe),this.touches=Qh(Re,fe)))}touchmove(O,fe,Re){if(this.aborted||!this.centroid)return;const Oe=Qh(Re,fe);for(const We in this.touches){const Mt=Oe[We];(!Mt||Mt.dist(this.touches[We])>30)&&(this.aborted=!0)}}touchend(O,fe,Re){if((!this.centroid||O.timeStamp-this.startTime>500)&&(this.aborted=!0),Re.length===0){const Oe=!this.aborted&&this.centroid;if(this.reset(),Oe)return Oe}}}class Sh{constructor(O){this.singleTap=new du(O),this.numTaps=O.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(O,fe,Re){this.singleTap.touchstart(O,fe,Re)}touchmove(O,fe,Re){this.singleTap.touchmove(O,fe,Re)}touchend(O,fe,Re){const Oe=this.singleTap.touchend(O,fe,Re);if(Oe){const We=O.timeStamp-this.lastTime<500,Mt=!this.lastTap||this.lastTap.dist(Oe)<30;if(We&&Mt||this.reset(),this.count++,this.lastTime=O.timeStamp,this.lastTap=Oe,this.count===this.numTaps)return this.reset(),Oe}}}class Jf{constructor(O){this._tr=new Hc(O),this._zoomIn=new Sh({numTouches:1,numTaps:2}),this._zoomOut=new Sh({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(O,fe,Re){this._zoomIn.touchstart(O,fe,Re),this._zoomOut.touchstart(O,fe,Re)}touchmove(O,fe,Re){this._zoomIn.touchmove(O,fe,Re),this._zoomOut.touchmove(O,fe,Re)}touchend(O,fe,Re){const Oe=this._zoomIn.touchend(O,fe,Re),We=this._zoomOut.touchend(O,fe,Re),Mt=this._tr;return Oe?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:zt=>zt.easeTo({duration:300,zoom:Mt.zoom+1,around:Mt.unproject(Oe)},{originalEvent:O})}):We?(this._active=!0,O.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:zt=>zt.easeTo({duration:300,zoom:Mt.zoom-1,around:Mt.unproject(We)},{originalEvent:O})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class tf{constructor(O){this._enabled=!!O.enable,this._moveStateManager=O.moveStateManager,this._clickTolerance=O.clickTolerance||1,this._moveFunction=O.move,this._activateOnStart=!!O.activateOnStart,O.assignEvents(this),this.reset()}reset(O){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(O)}_move(...O){const fe=this._moveFunction(...O);if(fe.bearingDelta||fe.pitchDelta||fe.around||fe.panDelta)return this._active=!0,fe}dragStart(O,fe){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(O)&&(this._moveStateManager.startMove(O),this._lastPoint=fe.length?fe[0]:fe,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(O,fe){if(!this.isEnabled())return;const Re=this._lastPoint;if(!Re)return;if(O.preventDefault(),!this._moveStateManager.isValidMoveEvent(O))return void this.reset(O);const Oe=fe.length?fe[0]:fe;return!this._moved&&Oe.dist(Re)<this._clickTolerance?void 0:(this._moved=!0,this._lastPoint=Oe,this._move(Re,Oe))}dragEnd(O){this.isEnabled()&&this._lastPoint&&this._moveStateManager.isValidEndEvent(O)&&(this._moved&&o.suppressClick(),this.reset(O))}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}getClickTolerance(){return this._clickTolerance}}const Eh={0:1,2:2};class Af{constructor(O){this._correctEvent=O.checkCorrectEvent}startMove(O){const fe=o.mouseButton(O);this._eventButton=fe}endMove(O){delete this._eventButton}isValidStartEvent(O){return this._correctEvent(O)}isValidMoveEvent(O){return!(function(fe,Re){const Oe=Eh[Re];return fe.buttons===void 0||(fe.buttons&Oe)!==Oe})(O,this._eventButton)}isValidEndEvent(O){return o.mouseButton(O)===this._eventButton}}class Mh{constructor(){this._firstTouch=void 0}_isOneFingerTouch(O){return O.targetTouches.length===1}_isSameTouchEvent(O){return O.targetTouches[0].identifier===this._firstTouch}startMove(O){this._firstTouch=O.targetTouches[0].identifier}endMove(O){delete this._firstTouch}isValidStartEvent(O){return this._isOneFingerTouch(O)}isValidMoveEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}isValidEndEvent(O){return this._isOneFingerTouch(O)&&this._isSameTouchEvent(O)}}const Xd=Ze=>{Ze.mousedown=Ze.dragStart,Ze.mousemoveWindow=Ze.dragMove,Ze.mouseup=Ze.dragEnd,Ze.contextmenu=O=>{O.preventDefault()}},yc=({enable:Ze,clickTolerance:O,bearingDegreesPerPixelMoved:fe=.8})=>{const Re=new Af({checkCorrectEvent:Oe=>o.mouseButton(Oe)===0&&Oe.ctrlKey||o.mouseButton(Oe)===2});return new tf({clickTolerance:O,move:(Oe,We)=>({bearingDelta:(We.x-Oe.x)*fe}),moveStateManager:Re,enable:Ze,assignEvents:Xd})},cd=({enable:Ze,clickTolerance:O,pitchDegreesPerPixelMoved:fe=-.5})=>{const Re=new Af({checkCorrectEvent:Oe=>o.mouseButton(Oe)===0&&Oe.ctrlKey||o.mouseButton(Oe)===2});return new tf({clickTolerance:O,move:(Oe,We)=>({pitchDelta:(We.y-Oe.y)*fe}),moveStateManager:Re,enable:Ze,assignEvents:Xd})};class rf{constructor(O,fe){this._clickTolerance=O.clickTolerance||1,this._map=fe,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new r.P(0,0)}_shouldBePrevented(O){return O<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(O,fe,Re){return this._calculateTransform(O,fe,Re)}touchmove(O,fe,Re){if(this._active){if(!this._shouldBePrevented(Re.length))return O.preventDefault(),this._calculateTransform(O,fe,Re);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",O)}}touchend(O,fe,Re){this._calculateTransform(O,fe,Re),this._active&&this._shouldBePrevented(Re.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(O,fe,Re){Re.length>0&&(this._active=!0);const Oe=Qh(Re,fe),We=new r.P(0,0),Mt=new r.P(0,0);let zt=0;for(const Tr in Oe){const zr=Oe[Tr],qr=this._touches[Tr];qr&&(We._add(zr),Mt._add(zr.sub(qr)),zt++,Oe[Tr]=zr)}if(this._touches=Oe,this._shouldBePrevented(zt)||!Mt.mag())return;const rr=Mt.div(zt);return this._sum._add(rr),this._sum.mag()<this._clickTolerance?void 0:{around:We.div(zt),panDelta:rr}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Nf{constructor(){this.reset()}reset(){this._active=!1,delete this._firstTwoTouches}touchstart(O,fe,Re){this._firstTwoTouches||Re.length<2||(this._firstTwoTouches=[Re[0].identifier,Re[1].identifier],this._start([fe[0],fe[1]]))}touchmove(O,fe,Re){if(!this._firstTwoTouches)return;O.preventDefault();const[Oe,We]=this._firstTwoTouches,Mt=Sf(Re,fe,Oe),zt=Sf(Re,fe,We);if(!Mt||!zt)return;const rr=this._aroundCenter?null:Mt.add(zt).div(2);return this._move([Mt,zt],rr,O)}touchend(O,fe,Re){if(!this._firstTwoTouches)return;const[Oe,We]=this._firstTwoTouches,Mt=Sf(Re,fe,Oe),zt=Sf(Re,fe,We);Mt&&zt||(this._active&&o.suppressClick(),this.reset())}touchcancel(){this.reset()}enable(O){this._enabled=!0,this._aroundCenter=!!O&&O.around==="center"}disable(){this._enabled=!1,this.reset()}isEnabled(){return!!this._enabled}isActive(){return!!this._active}}function Sf(Ze,O,fe){for(let Re=0;Re<Ze.length;Re++)if(Ze[Re].identifier===fe)return O[Re]}function ku(Ze,O){return Math.log(Ze/O)/Math.LN2}class kc extends Nf{reset(){super.reset(),delete this._distance,delete this._startDistance}_start(O){this._startDistance=this._distance=O[0].dist(O[1])}_move(O,fe){const Re=this._distance;if(this._distance=O[0].dist(O[1]),this._active||!(Math.abs(ku(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:ku(this._distance,Re),pinchAround:fe}}}function xu(Ze,O){return 180*Ze.angleWith(O)/Math.PI}class Qf extends Nf{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(O){this._startVector=this._vector=O[0].sub(O[1]),this._minDiameter=O[0].dist(O[1])}_move(O,fe,Re){const Oe=this._vector;if(this._vector=O[0].sub(O[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:xu(this._vector,Oe),pinchAround:fe}}_isBelowThreshold(O){this._minDiameter=Math.min(this._minDiameter,O.mag());const fe=25/(Math.PI*this._minDiameter)*360,Re=xu(O,this._startVector);return Math.abs(Re)<fe}}function Ef(Ze){return Math.abs(Ze.y)>Math.abs(Ze.x)}class ed extends Nf{constructor(O){super(),this._currentTouchCount=0,this._map=O}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(O,fe,Re){super.touchstart(O,fe,Re),this._currentTouchCount=Re.length}_start(O){this._lastPoints=O,Ef(O[0].sub(O[1]))&&(this._valid=!1)}_move(O,fe,Re){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;const Oe=O[0].sub(this._lastPoints[0]),We=O[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(Oe,We,Re.timeStamp),this._valid?(this._lastPoints=O,this._active=!0,{pitchDelta:(Oe.y+We.y)/2*-.5}):void 0}gestureBeginsVertically(O,fe,Re){if(this._valid!==void 0)return this._valid;const Oe=O.mag()>=2,We=fe.mag()>=2;if(!Oe&&!We)return;if(!Oe||!We)return this._firstMove===void 0&&(this._firstMove=Re),Re-this._firstMove<100&&void 0;const Mt=O.y>0==fe.y>0;return Ef(O)&&Ef(fe)&&Mt}}const wr={panStep:100,bearingStep:15,pitchStep:10};class Hr{constructor(O){this._tr=new Hc(O);const fe=wr;this._panStep=fe.panStep,this._bearingStep=fe.bearingStep,this._pitchStep=fe.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(O){if(O.altKey||O.ctrlKey||O.metaKey)return;let fe=0,Re=0,Oe=0,We=0,Mt=0;switch(O.keyCode){case 61:case 107:case 171:case 187:fe=1;break;case 189:case 109:case 173:fe=-1;break;case 37:O.shiftKey?Re=-1:(O.preventDefault(),We=-1);break;case 39:O.shiftKey?Re=1:(O.preventDefault(),We=1);break;case 38:O.shiftKey?Oe=1:(O.preventDefault(),Mt=-1);break;case 40:O.shiftKey?Oe=-1:(O.preventDefault(),Mt=1);break;default:return}return this._rotationDisabled&&(Re=0,Oe=0),{cameraAnimation:zt=>{const rr=this._tr;zt.easeTo({duration:300,easeId:"keyboardHandler",easing:kn,zoom:fe?Math.round(rr.zoom)+fe*(O.shiftKey?2:1):rr.zoom,bearing:rr.bearing+Re*this._bearingStep,pitch:rr.pitch+Oe*this._pitchStep,offset:[-We*this._panStep,-Mt*this._panStep],center:rr.center},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function kn(Ze){return Ze*(2-Ze)}const _n=4.000244140625;class $n{constructor(O,fe){this._onTimeout=Re=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(Re)},this._map=O,this._tr=new Hc(O),this._triggerRenderFrame=fe,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(O){this._defaultZoomRate=O}setWheelZoomRate(O){this._wheelZoomRate=O}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(O){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!O&&O.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(O){return!!this._map.cooperativeGestures.isEnabled()&&!(O.ctrlKey||this._map.cooperativeGestures.isBypassed(O))}wheel(O){if(!this.isEnabled())return;if(this._shouldBePrevented(O))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",O);let fe=O.deltaMode===WheelEvent.DOM_DELTA_LINE?40*O.deltaY:O.deltaY;const Re=s.now(),Oe=Re-(this._lastWheelEventTime||0);this._lastWheelEventTime=Re,fe!==0&&fe%_n==0?this._type="wheel":fe!==0&&Math.abs(fe)<4?this._type="trackpad":Oe>400?(this._type=null,this._lastValue=fe,this._timeout=setTimeout(this._onTimeout,40,O)):this._type||(this._type=Math.abs(Oe*fe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,fe+=this._lastValue)),O.shiftKey&&fe&&(fe/=4),this._type&&(this._lastWheelEvent=O,this._delta-=fe,this._active||this._start(O)),O.preventDefault()}_start(O){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);const fe=o.mousePos(this._map.getCanvas(),O),Re=this._tr;this._around=fe.y>Re.transform.height/2-Re.transform.getHorizon()?r.N.convert(this._aroundCenter?Re.center:Re.unproject(fe)):r.N.convert(Re.center),this._aroundPoint=Re.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;const O=this._tr.transform;if(this._delta!==0){const rr=this._type==="wheel"&&Math.abs(this._delta)>_n?this._wheelZoomRate:this._defaultZoomRate;let Tr=2/(1+Math.exp(-Math.abs(this._delta*rr)));this._delta<0&&Tr!==0&&(Tr=1/Tr);const zr=typeof this._targetZoom=="number"?O.zoomScale(this._targetZoom):O.scale;this._targetZoom=Math.min(O.maxZoom,Math.max(O.minZoom,O.scaleZoom(zr*Tr))),this._type==="wheel"&&(this._startZoom=O.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}const fe=typeof this._targetZoom=="number"?this._targetZoom:O.zoom,Re=this._startZoom,Oe=this._easing;let We,Mt=!1;const zt=s.now()-this._lastWheelEventTime;if(this._type==="wheel"&&Re&&Oe&&zt){const rr=Math.min(zt/200,1),Tr=Oe(rr);We=r.y.number(Re,fe,Tr),rr<1?this._frameId||(this._frameId=!0):Mt=!0}else We=fe,Mt=!0;return this._active=!0,Mt&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Mt,zoomDelta:We-O.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(O){let fe=r.b9;if(this._prevEase){const Re=this._prevEase,Oe=(s.now()-Re.start)/Re.duration,We=Re.easing(Oe+.01)-Re.easing(Oe),Mt=.27/Math.sqrt(We*We+1e-4)*.01,zt=Math.sqrt(.0729-Mt*Mt);fe=r.b8(Mt,zt,.25,1)}return this._prevEase={start:s.now(),duration:O,easing:fe},fe}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ga{constructor(O,fe){this._clickZoom=O,this._tapZoom=fe}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ba{constructor(O){this._tr=new Hc(O),this.reset()}reset(){this._active=!1}dblclick(O,fe){return O.preventDefault(),{cameraAnimation:Re=>{Re.easeTo({duration:300,zoom:this._tr.zoom+(O.shiftKey?-1:1),around:this._tr.unproject(fe)},{originalEvent:O})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class wi{constructor(){this._tap=new Sh({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(O,fe,Re){if(!this._swipePoint)if(this._tapTime){const Oe=fe[0],We=O.timeStamp-this._tapTime<500,Mt=this._tapPoint.dist(Oe)<30;We&&Mt?Re.length>0&&(this._swipePoint=Oe,this._swipeTouch=Re[0].identifier):this.reset()}else this._tap.touchstart(O,fe,Re)}touchmove(O,fe,Re){if(this._tapTime){if(this._swipePoint){if(Re[0].identifier!==this._swipeTouch)return;const Oe=fe[0],We=Oe.y-this._swipePoint.y;return this._swipePoint=Oe,O.preventDefault(),this._active=!0,{zoomDelta:We/128}}}else this._tap.touchmove(O,fe,Re)}touchend(O,fe,Re){if(this._tapTime)this._swipePoint&&Re.length===0&&this.reset();else{const Oe=this._tap.touchend(O,fe,Re);Oe&&(this._tapTime=O.timeStamp,this._tapPoint=Oe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ki{constructor(O,fe,Re){this._el=O,this._mousePan=fe,this._touchPan=Re}enable(O){this._inertiaOptions=O||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class to{constructor(O,fe,Re){this._pitchWithRotate=O.pitchWithRotate,this._mouseRotate=fe,this._mousePitch=Re}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class ci{constructor(O,fe,Re,Oe){this._el=O,this._touchZoom=fe,this._touchRotate=Re,this._tapDragZoom=Oe,this._rotationDisabled=!1,this._enabled=!0}enable(O){this._touchZoom.enable(O),this._rotationDisabled||this._touchRotate.enable(O),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class qi{constructor(O,fe){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=O,this._options=fe,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;const O=this._map.getCanvasContainer();O.classList.add("maplibregl-cooperative-gestures"),this._container=o.create("div","maplibregl-cooperative-gesture-screen",O);let fe=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(fe=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));const Re=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),Oe=document.createElement("div");Oe.className="maplibregl-desktop-message",Oe.textContent=fe,this._container.appendChild(Oe);const We=document.createElement("div");We.className="maplibregl-mobile-message",We.textContent=Re,this._container.appendChild(We),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(o.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(O){return O[this._bypassKey]}notifyGestureBlocked(O,fe){this._enabled&&(this._map.fire(new r.k("cooperativegestureprevented",{gestureType:O,originalEvent:fe})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}const xi=Ze=>Ze.zoom||Ze.drag||Ze.pitch||Ze.rotate;class oi extends r.k{}function fo(Ze){return Ze.panDelta&&Ze.panDelta.mag()||Ze.zoomDelta||Ze.bearingDelta||Ze.pitchDelta}class Qo{constructor(O,fe){this.handleWindowEvent=Oe=>{this.handleEvent(Oe,`${Oe.type}Window`)},this.handleEvent=(Oe,We)=>{if(Oe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;const Mt=Oe.type==="renderFrame"?void 0:Oe,zt={needsRenderFrame:!1},rr={},Tr={},zr=Oe.touches,qr=zr?this._getMapTouches(zr):void 0,pn=qr?o.touchPos(this._map.getCanvas(),qr):o.mousePos(this._map.getCanvas(),Oe);for(const{handlerName:ut,handler:wt,allowed:kt}of this._handlers){if(!wt.isEnabled())continue;let Ht;this._blockedByActive(Tr,kt,ut)?wt.reset():wt[We||Oe.type]&&(Ht=wt[We||Oe.type](Oe,pn,qr),this.mergeHandlerResult(zt,rr,Ht,ut,Mt),Ht&&Ht.needsRenderFrame&&this._triggerRenderFrame()),(Ht||wt.isActive())&&(Tr[ut]=wt)}const Dn={};for(const ut in this._previousActiveHandlers)Tr[ut]||(Dn[ut]=Mt);this._previousActiveHandlers=Tr,(Object.keys(Dn).length||fo(zt))&&(this._changes.push([zt,rr,Dn]),this._triggerRenderFrame()),(Object.keys(Tr).length||fo(zt))&&this._map._stop(!0),this._updatingCamera=!1;const{cameraAnimation:nt}=zt;nt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],nt(this._map))},this._map=O,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Nh(O),this._bearingSnap=fe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(fe);const Re=this._el;this._listeners=[[Re,"touchstart",{passive:!0}],[Re,"touchmove",{passive:!1}],[Re,"touchend",void 0],[Re,"touchcancel",void 0],[Re,"mousedown",void 0],[Re,"mousemove",void 0],[Re,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[Re,"mouseover",void 0],[Re,"mouseout",void 0],[Re,"dblclick",void 0],[Re,"click",void 0],[Re,"keydown",{capture:!1}],[Re,"keyup",void 0],[Re,"wheel",{passive:!1}],[Re,"contextmenu",void 0],[window,"blur",void 0]];for(const[Oe,We,Mt]of this._listeners)o.addEventListener(Oe,We,Oe===document?this.handleWindowEvent:this.handleEvent,Mt)}destroy(){for(const[O,fe,Re]of this._listeners)o.removeEventListener(O,fe,O===document?this.handleWindowEvent:this.handleEvent,Re)}_addDefaultHandlers(O){const fe=this._map,Re=fe.getCanvasContainer();this._add("mapEvent",new yh(fe,O));const Oe=fe.boxZoom=new pf(fe,O);this._add("boxZoom",Oe),O.interactive&&O.boxZoom&&Oe.enable();const We=fe.cooperativeGestures=new qi(fe,O.cooperativeGestures);this._add("cooperativeGestures",We),O.cooperativeGestures&&We.enable();const Mt=new Jf(fe),zt=new Ba(fe);fe.doubleClickZoom=new Ga(zt,Mt),this._add("tapZoom",Mt),this._add("clickZoom",zt),O.interactive&&O.doubleClickZoom&&fe.doubleClickZoom.enable();const rr=new wi;this._add("tapDragZoom",rr);const Tr=fe.touchPitch=new ed(fe);this._add("touchPitch",Tr),O.interactive&&O.touchPitch&&fe.touchPitch.enable(O.touchPitch);const zr=yc(O),qr=cd(O);fe.dragRotate=new to(O,zr,qr),this._add("mouseRotate",zr,["mousePitch"]),this._add("mousePitch",qr,["mouseRotate"]),O.interactive&&O.dragRotate&&fe.dragRotate.enable();const pn=(({enable:Ht,clickTolerance:Ot})=>{const Kt=new Af({checkCorrectEvent:Cr=>o.mouseButton(Cr)===0&&!Cr.ctrlKey});return new tf({clickTolerance:Ot,move:(Cr,Or)=>({around:Or,panDelta:Or.sub(Cr)}),activateOnStart:!0,moveStateManager:Kt,enable:Ht,assignEvents:Xd})})(O),Dn=new rf(O,fe);fe.dragPan=new ki(Re,pn,Dn),this._add("mousePan",pn),this._add("touchPan",Dn,["touchZoom","touchRotate"]),O.interactive&&O.dragPan&&fe.dragPan.enable(O.dragPan);const nt=new Qf,ut=new kc;fe.touchZoomRotate=new ci(Re,ut,nt,rr),this._add("touchRotate",nt,["touchPan","touchZoom"]),this._add("touchZoom",ut,["touchPan","touchRotate"]),O.interactive&&O.touchZoomRotate&&fe.touchZoomRotate.enable(O.touchZoomRotate);const wt=fe.scrollZoom=new $n(fe,()=>this._triggerRenderFrame());this._add("scrollZoom",wt,["mousePan"]),O.interactive&&O.scrollZoom&&fe.scrollZoom.enable(O.scrollZoom);const kt=fe.keyboard=new Hr(fe);this._add("keyboard",kt),O.interactive&&O.keyboard&&fe.keyboard.enable(),this._add("blockableMapEvent",new uu(fe))}_add(O,fe,Re){this._handlers.push({handlerName:O,handler:fe,allowed:Re}),this._handlersById[O]=fe}stop(O){if(!this._updatingCamera){for(const{handler:fe}of this._handlers)fe.reset();this._inertia.clear(),this._fireEvents({},{},O),this._changes=[]}}isActive(){for(const{handler:O}of this._handlers)if(O.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!xi(this._eventsInProgress)||this.isZooming()}_blockedByActive(O,fe,Re){for(const Oe in O)if(Oe!==Re&&(!fe||fe.indexOf(Oe)<0))return!0;return!1}_getMapTouches(O){const fe=[];for(const Re of O)this._el.contains(Re.target)&&fe.push(Re);return fe}mergeHandlerResult(O,fe,Re,Oe,We){if(!Re)return;r.e(O,Re);const Mt={handlerName:Oe,originalEvent:Re.originalEvent||We};Re.zoomDelta!==void 0&&(fe.zoom=Mt),Re.panDelta!==void 0&&(fe.drag=Mt),Re.pitchDelta!==void 0&&(fe.pitch=Mt),Re.bearingDelta!==void 0&&(fe.rotate=Mt)}_applyChanges(){const O={},fe={},Re={};for(const[Oe,We,Mt]of this._changes)Oe.panDelta&&(O.panDelta=(O.panDelta||new r.P(0,0))._add(Oe.panDelta)),Oe.zoomDelta&&(O.zoomDelta=(O.zoomDelta||0)+Oe.zoomDelta),Oe.bearingDelta&&(O.bearingDelta=(O.bearingDelta||0)+Oe.bearingDelta),Oe.pitchDelta&&(O.pitchDelta=(O.pitchDelta||0)+Oe.pitchDelta),Oe.around!==void 0&&(O.around=Oe.around),Oe.pinchAround!==void 0&&(O.pinchAround=Oe.pinchAround),Oe.noInertia&&(O.noInertia=Oe.noInertia),r.e(fe,We),r.e(Re,Mt);this._updateMapTransform(O,fe,Re),this._changes=[]}_updateMapTransform(O,fe,Re){const Oe=this._map,We=Oe._getTransformForUpdate(),Mt=Oe.terrain;if(!(fo(O)||Mt&&this._terrainMovement))return this._fireEvents(fe,Re,!0);let{panDelta:zt,zoomDelta:rr,bearingDelta:Tr,pitchDelta:zr,around:qr,pinchAround:pn}=O;pn!==void 0&&(qr=pn),Oe._stop(!0),qr=qr||Oe.transform.centerPoint;const Dn=We.pointLocation(zt?qr.sub(zt):qr);Tr&&(We.bearing+=Tr),zr&&(We.pitch+=zr),rr&&(We.zoom+=rr),Mt?this._terrainMovement||!fe.drag&&!fe.zoom?fe.drag&&this._terrainMovement?We.center=We.pointLocation(We.centerPoint.sub(zt)):We.setLocationAtPoint(Dn,qr):(this._terrainMovement=!0,this._map._elevationFreeze=!0,We.setLocationAtPoint(Dn,qr)):We.setLocationAtPoint(Dn,qr),Oe._applyUpdatedTransform(We),this._map._update(),O.noInertia||this._inertia.record(O),this._fireEvents(fe,Re,!0)}_fireEvents(O,fe,Re){const Oe=xi(this._eventsInProgress),We=xi(O),Mt={};for(const qr in O){const{originalEvent:pn}=O[qr];this._eventsInProgress[qr]||(Mt[`${qr}start`]=pn),this._eventsInProgress[qr]=O[qr]}!Oe&&We&&this._fireEvent("movestart",We.originalEvent);for(const qr in Mt)this._fireEvent(qr,Mt[qr]);We&&this._fireEvent("move",We.originalEvent);for(const qr in O){const{originalEvent:pn}=O[qr];this._fireEvent(qr,pn)}const zt={};let rr;for(const qr in this._eventsInProgress){const{handlerName:pn,originalEvent:Dn}=this._eventsInProgress[qr];this._handlersById[pn].isActive()||(delete this._eventsInProgress[qr],rr=fe[pn]||Dn,zt[`${qr}end`]=rr)}for(const qr in zt)this._fireEvent(qr,zt[qr]);const Tr=xi(this._eventsInProgress),zr=(Oe||We)&&!Tr;if(zr&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;const qr=this._map._getTransformForUpdate();qr.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(qr)}if(Re&&zr){this._updatingCamera=!0;const qr=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),pn=Dn=>Dn!==0&&-this._bearingSnap<Dn&&Dn<this._bearingSnap;!qr||!qr.essential&&s.prefersReducedMotion?(this._map.fire(new r.k("moveend",{originalEvent:rr})),pn(this._map.getBearing())&&this._map.resetNorth()):(pn(qr.bearing||this._map.getBearing())&&(qr.bearing=0),qr.freezeElevation=!0,this._map.easeTo(qr,{originalEvent:rr})),this._updatingCamera=!1}}_fireEvent(O,fe){this._map.fire(new r.k(O,fe?{originalEvent:fe}:{}))}_requestFrame(){return this._map.triggerRepaint(),this._map._renderTaskQueue.add(O=>{delete this._frameId,this.handleEvent(new oi("renderFrame",{timeStamp:O})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Yo extends r.E{constructor(O,fe){super(),this._renderFrameCallback=()=>{const Re=Math.min((s.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Re)),Re<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=O,this._bearingSnap=fe.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new r.N(this.transform.center.lng,this.transform.center.lat)}setCenter(O,fe){return this.jumpTo({center:O},fe)}panBy(O,fe,Re){return O=r.P.convert(O).mult(-1),this.panTo(this.transform.center,r.e({offset:O},fe),Re)}panTo(O,fe,Re){return this.easeTo(r.e({center:O},fe),Re)}getZoom(){return this.transform.zoom}setZoom(O,fe){return this.jumpTo({zoom:O},fe),this}zoomTo(O,fe,Re){return this.easeTo(r.e({zoom:O},fe),Re)}zoomIn(O,fe){return this.zoomTo(this.getZoom()+1,O,fe),this}zoomOut(O,fe){return this.zoomTo(this.getZoom()-1,O,fe),this}getBearing(){return this.transform.bearing}setBearing(O,fe){return this.jumpTo({bearing:O},fe),this}getPadding(){return this.transform.padding}setPadding(O,fe){return this.jumpTo({padding:O},fe),this}rotateTo(O,fe,Re){return this.easeTo(r.e({bearing:O},fe),Re)}resetNorth(O,fe){return this.rotateTo(0,r.e({duration:1e3},O),fe),this}resetNorthPitch(O,fe){return this.easeTo(r.e({bearing:0,pitch:0,duration:1e3},O),fe),this}snapToNorth(O,fe){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(O,fe):this}getPitch(){return this.transform.pitch}setPitch(O,fe){return this.jumpTo({pitch:O},fe),this}cameraForBounds(O,fe){O=ue.convert(O).adjustAntiMeridian();const Re=fe&&fe.bearing||0;return this._cameraForBoxAndBearing(O.getNorthWest(),O.getSouthEast(),Re,fe)}_cameraForBoxAndBearing(O,fe,Re,Oe){const We={top:0,bottom:0,right:0,left:0};if(typeof(Oe=r.e({padding:We,offset:[0,0],maxZoom:this.transform.maxZoom},Oe)).padding=="number"){const Gn=Oe.padding;Oe.padding={top:Gn,bottom:Gn,right:Gn,left:Gn}}Oe.padding=r.e(We,Oe.padding);const Mt=this.transform,zt=Mt.padding,rr=new ue(O,fe),Tr=Mt.project(rr.getNorthWest()),zr=Mt.project(rr.getNorthEast()),qr=Mt.project(rr.getSouthEast()),pn=Mt.project(rr.getSouthWest()),Dn=r.ba(-Re),nt=Tr.rotate(Dn),ut=zr.rotate(Dn),wt=qr.rotate(Dn),kt=pn.rotate(Dn),Ht=new r.P(Math.max(nt.x,ut.x,kt.x,wt.x),Math.max(nt.y,ut.y,kt.y,wt.y)),Ot=new r.P(Math.min(nt.x,ut.x,kt.x,wt.x),Math.min(nt.y,ut.y,kt.y,wt.y)),Kt=Ht.sub(Ot),Cr=(Mt.width-(zt.left+zt.right+Oe.padding.left+Oe.padding.right))/Kt.x,Or=(Mt.height-(zt.top+zt.bottom+Oe.padding.top+Oe.padding.bottom))/Kt.y;if(Or<0||Cr<0)return void r.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");const Vr=Math.min(Mt.scaleZoom(Mt.scale*Math.min(Cr,Or)),Oe.maxZoom),sn=r.P.convert(Oe.offset),bn=new r.P((Oe.padding.left-Oe.padding.right)/2,(Oe.padding.top-Oe.padding.bottom)/2).rotate(r.ba(Re)),Un=sn.add(bn).mult(Mt.scale/Mt.zoomScale(Vr));return{center:Mt.unproject(Tr.add(qr).div(2).sub(Un)),zoom:Vr,bearing:Re}}fitBounds(O,fe,Re){return this._fitInternal(this.cameraForBounds(O,fe),fe,Re)}fitScreenCoordinates(O,fe,Re,Oe,We){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(r.P.convert(O)),this.transform.pointLocation(r.P.convert(fe)),Re,Oe),Oe,We)}_fitInternal(O,fe,Re){return O?(delete(fe=r.e(O,fe)).padding,fe.linear?this.easeTo(fe,Re):this.flyTo(fe,Re)):this}jumpTo(O,fe){this.stop();const Re=this._getTransformForUpdate();let Oe=!1,We=!1,Mt=!1;return"zoom"in O&&Re.zoom!==+O.zoom&&(Oe=!0,Re.zoom=+O.zoom),O.center!==void 0&&(Re.center=r.N.convert(O.center)),"bearing"in O&&Re.bearing!==+O.bearing&&(We=!0,Re.bearing=+O.bearing),"pitch"in O&&Re.pitch!==+O.pitch&&(Mt=!0,Re.pitch=+O.pitch),O.padding==null||Re.isPaddingEqual(O.padding)||(Re.padding=O.padding),this._applyUpdatedTransform(Re),this.fire(new r.k("movestart",fe)).fire(new r.k("move",fe)),Oe&&this.fire(new r.k("zoomstart",fe)).fire(new r.k("zoom",fe)).fire(new r.k("zoomend",fe)),We&&this.fire(new r.k("rotatestart",fe)).fire(new r.k("rotate",fe)).fire(new r.k("rotateend",fe)),Mt&&this.fire(new r.k("pitchstart",fe)).fire(new r.k("pitch",fe)).fire(new r.k("pitchend",fe)),this.fire(new r.k("moveend",fe))}calculateCameraOptionsFromTo(O,fe,Re,Oe=0){const We=r.Z.fromLngLat(O,fe),Mt=r.Z.fromLngLat(Re,Oe),zt=Mt.x-We.x,rr=Mt.y-We.y,Tr=Mt.z-We.z,zr=Math.hypot(zt,rr,Tr);if(zr===0)throw new Error("Can't calculate camera options with same From and To");const qr=Math.hypot(zt,rr),pn=this.transform.scaleZoom(this.transform.cameraToCenterDistance/zr/this.transform.tileSize),Dn=180*Math.atan2(zt,-rr)/Math.PI;let nt=180*Math.acos(qr/zr)/Math.PI;return nt=Tr<0?90-nt:90+nt,{center:Mt.toLngLat(),zoom:pn,pitch:nt,bearing:Dn}}easeTo(O,fe){var Re;this._stop(!1,O.easeId),((O=r.e({offset:[0,0],duration:500,easing:r.b9},O)).animate===!1||!O.essential&&s.prefersReducedMotion)&&(O.duration=0);const Oe=this._getTransformForUpdate(),We=Oe.zoom,Mt=Oe.bearing,zt=Oe.pitch,rr=Oe.padding,Tr="bearing"in O?this._normalizeBearing(O.bearing,Mt):Mt,zr="pitch"in O?+O.pitch:zt,qr="padding"in O?O.padding:Oe.padding,pn=r.P.convert(O.offset);let Dn=Oe.centerPoint.add(pn);const nt=Oe.pointLocation(Dn),{center:ut,zoom:wt}=Oe.getConstrained(r.N.convert(O.center||nt),(Re=O.zoom)!==null&&Re!==void 0?Re:We);this._normalizeCenter(ut,Oe);const kt=Oe.project(nt),Ht=Oe.project(ut).sub(kt),Ot=Oe.zoomScale(wt-We);let Kt,Cr;O.around&&(Kt=r.N.convert(O.around),Cr=Oe.locationPoint(Kt));const Or={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||wt!==We,this._rotating=this._rotating||Mt!==Tr,this._pitching=this._pitching||zr!==zt,this._padding=!Oe.isPaddingEqual(qr),this._easeId=O.easeId,this._prepareEase(fe,O.noMoveStart,Or),this.terrain&&this._prepareElevation(ut),this._ease(Vr=>{if(this._zooming&&(Oe.zoom=r.y.number(We,wt,Vr)),this._rotating&&(Oe.bearing=r.y.number(Mt,Tr,Vr)),this._pitching&&(Oe.pitch=r.y.number(zt,zr,Vr)),this._padding&&(Oe.interpolatePadding(rr,qr,Vr),Dn=Oe.centerPoint.add(pn)),this.terrain&&!O.freezeElevation&&this._updateElevation(Vr),Kt)Oe.setLocationAtPoint(Kt,Cr);else{const sn=Oe.zoomScale(Oe.zoom-We),bn=wt>We?Math.min(2,Ot):Math.max(.5,Ot),Un=Math.pow(bn,1-Vr),Gn=Oe.unproject(kt.add(Ht.mult(Vr*Un)).mult(sn));Oe.setLocationAtPoint(Oe.renderWorldCopies?Gn.wrap():Gn,Dn)}this._applyUpdatedTransform(Oe),this._fireMoveEvents(fe)},Vr=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(fe,Vr)},O),this}_prepareEase(O,fe,Re={}){this._moving=!0,fe||Re.moving||this.fire(new r.k("movestart",O)),this._zooming&&!Re.zooming&&this.fire(new r.k("zoomstart",O)),this._rotating&&!Re.rotating&&this.fire(new r.k("rotatestart",O)),this._pitching&&!Re.pitching&&this.fire(new r.k("pitchstart",O))}_prepareElevation(O){this._elevationCenter=O,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(O,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(O){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);const fe=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(O<1&&fe!==this._elevationTarget){const Re=this._elevationTarget-this._elevationStart;this._elevationStart+=O*(Re-(fe-(Re*O+this._elevationStart))/(1-O)),this._elevationTarget=fe}this.transform.elevation=r.y.number(this._elevationStart,this._elevationTarget,O)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(O){const fe=O.getCameraPosition(),Re=this.terrain.getElevationForLngLatZoom(fe.lngLat,O.zoom);if(fe.altitude<Re){const Oe=this.calculateCameraOptionsFromTo(fe.lngLat,Re,O.center,O.elevation);return{pitch:Oe.pitch,zoom:Oe.zoom}}return{}}_applyUpdatedTransform(O){const fe=[];if(this.terrain&&fe.push(Oe=>this._elevateCameraIfInsideTerrain(Oe)),this.transformCameraUpdate&&fe.push(Oe=>this.transformCameraUpdate(Oe)),!fe.length)return;const Re=O.clone();for(const Oe of fe){const We=Re.clone(),{center:Mt,zoom:zt,pitch:rr,bearing:Tr,elevation:zr}=Oe(We);Mt&&(We.center=Mt),zt!==void 0&&(We.zoom=zt),rr!==void 0&&(We.pitch=rr),Tr!==void 0&&(We.bearing=Tr),zr!==void 0&&(We.elevation=zr),Re.apply(We)}this.transform.apply(Re)}_fireMoveEvents(O){this.fire(new r.k("move",O)),this._zooming&&this.fire(new r.k("zoom",O)),this._rotating&&this.fire(new r.k("rotate",O)),this._pitching&&this.fire(new r.k("pitch",O))}_afterEase(O,fe){if(this._easeId&&fe&&this._easeId===fe)return;delete this._easeId;const Re=this._zooming,Oe=this._rotating,We=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Re&&this.fire(new r.k("zoomend",O)),Oe&&this.fire(new r.k("rotateend",O)),We&&this.fire(new r.k("pitchend",O)),this.fire(new r.k("moveend",O))}flyTo(O,fe){var Re;if(!O.essential&&s.prefersReducedMotion){const Ai=r.M(O,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ai,fe)}this.stop(),O=r.e({offset:[0,0],speed:1.2,curve:1.42,easing:r.b9},O);const Oe=this._getTransformForUpdate(),We=Oe.zoom,Mt=Oe.bearing,zt=Oe.pitch,rr=Oe.padding,Tr="bearing"in O?this._normalizeBearing(O.bearing,Mt):Mt,zr="pitch"in O?+O.pitch:zt,qr="padding"in O?O.padding:Oe.padding,pn=r.P.convert(O.offset);let Dn=Oe.centerPoint.add(pn);const nt=Oe.pointLocation(Dn),{center:ut,zoom:wt}=Oe.getConstrained(r.N.convert(O.center||nt),(Re=O.zoom)!==null&&Re!==void 0?Re:We);this._normalizeCenter(ut,Oe);const kt=Oe.zoomScale(wt-We),Ht=Oe.project(nt),Ot=Oe.project(ut).sub(Ht);let Kt=O.curve;const Cr=Math.max(Oe.width,Oe.height),Or=Cr/kt,Vr=Ot.mag();if("minZoom"in O){const Ai=r.ac(Math.min(O.minZoom,We,wt),Oe.minZoom,Oe.maxZoom),po=Cr/Oe.zoomScale(Ai-We);Kt=Math.sqrt(po/Vr*2)}const sn=Kt*Kt;function bn(Ai){const po=(Or*Or-Cr*Cr+(Ai?-1:1)*sn*sn*Vr*Vr)/(2*(Ai?Or:Cr)*sn*Vr);return Math.log(Math.sqrt(po*po+1)-po)}function Un(Ai){return(Math.exp(Ai)-Math.exp(-Ai))/2}function Gn(Ai){return(Math.exp(Ai)+Math.exp(-Ai))/2}const ua=bn(!1);let Ha=function(Ai){return Gn(ua)/Gn(ua+Kt*Ai)},Ti=function(Ai){return Cr*((Gn(ua)*(Un(po=ua+Kt*Ai)/Gn(po))-Un(ua))/sn)/Vr;var po},mi=(bn(!0)-ua)/Kt;if(Math.abs(Vr)<1e-6||!isFinite(mi)){if(Math.abs(Cr-Or)<1e-6)return this.easeTo(O,fe);const Ai=Or<Cr?-1:1;mi=Math.abs(Math.log(Or/Cr))/Kt,Ti=()=>0,Ha=po=>Math.exp(Ai*Kt*po)}return O.duration="duration"in O?+O.duration:1e3*mi/("screenSpeed"in O?+O.screenSpeed/Kt:+O.speed),O.maxDuration&&O.duration>O.maxDuration&&(O.duration=0),this._zooming=!0,this._rotating=Mt!==Tr,this._pitching=zr!==zt,this._padding=!Oe.isPaddingEqual(qr),this._prepareEase(fe,!1),this.terrain&&this._prepareElevation(ut),this._ease(Ai=>{const po=Ai*mi,Fo=1/Ha(po);Oe.zoom=Ai===1?wt:We+Oe.scaleZoom(Fo),this._rotating&&(Oe.bearing=r.y.number(Mt,Tr,Ai)),this._pitching&&(Oe.pitch=r.y.number(zt,zr,Ai)),this._padding&&(Oe.interpolatePadding(rr,qr,Ai),Dn=Oe.centerPoint.add(pn)),this.terrain&&!O.freezeElevation&&this._updateElevation(Ai);const Po=Ai===1?ut:Oe.unproject(Ht.add(Ot.mult(Ti(po))).mult(Fo));Oe.setLocationAtPoint(Oe.renderWorldCopies?Po.wrap():Po,Dn),this._applyUpdatedTransform(Oe),this._fireMoveEvents(fe)},()=>{this.terrain&&O.freezeElevation&&this._finalizeElevation(),this._afterEase(fe)},O),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(O,fe){var Re;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){const Oe=this._onEaseEnd;delete this._onEaseEnd,Oe.call(this,fe)}return O||(Re=this.handlers)===null||Re===void 0||Re.stop(!1),this}_ease(O,fe,Re){Re.animate===!1||Re.duration===0?(O(1),fe()):(this._easeStart=s.now(),this._easeOptions=Re,this._onEaseFrame=O,this._onEaseEnd=fe,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(O,fe){O=r.b3(O,-180,180);const Re=Math.abs(O-fe);return Math.abs(O-360-fe)<Re&&(O-=360),Math.abs(O+360-fe)<Re&&(O+=360),O}_normalizeCenter(O,fe){if(!fe.renderWorldCopies||fe.lngRange)return;const Re=O.lng-fe.center.lng;O.lng+=Re>180?-360:Re<-180?360:0}queryTerrainElevation(O){return this.terrain?this.terrain.getElevationForLngLatZoom(r.N.convert(O),this.transform.tileZoom)-this.transform.elevation:null}}const is={compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank">MapLibre</a>'};class ts{constructor(O=is){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=fe=>{!fe||fe.sourceDataType!=="metadata"&&fe.sourceDataType!=="visibility"&&fe.dataType!=="style"&&fe.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=O}getDefaultPosition(){return"bottom-right"}onAdd(O){return this._map=O,this._compact=this.options.compact,this._container=o.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=o.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=o.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(){o.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(O,fe){const Re=this._map._getUIString(`AttributionControl.${fe}`);O.title=Re,O.setAttribute("aria-label",Re)}_updateAttributions(){if(!this._map.style)return;let O=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?O=O.concat(this.options.customAttribution.map(Oe=>typeof Oe!="string"?"":Oe)):typeof this.options.customAttribution=="string"&&O.push(this.options.customAttribution)),this._map.style.stylesheet){const Oe=this._map.style.stylesheet;this.styleOwner=Oe.owner,this.styleId=Oe.id}const fe=this._map.style.sourceCaches;for(const Oe in fe){const We=fe[Oe];if(We.used||We.usedForTerrain){const Mt=We.getSource();Mt.attribution&&O.indexOf(Mt.attribution)<0&&O.push(Mt.attribution)}}O=O.filter(Oe=>String(Oe).trim()),O.sort((Oe,We)=>Oe.length-We.length),O=O.filter((Oe,We)=>{for(let Mt=We+1;Mt<O.length;Mt++)if(O[Mt].indexOf(Oe)>=0)return!1;return!0});const Re=O.join(" | ");Re!==this._attribHTML&&(this._attribHTML=Re,O.length?(this._innerContainer.innerHTML=Re,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class vo{constructor(O={}){this._updateCompact=()=>{const fe=this._container.children;if(fe.length){const Re=fe[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&Re.classList.add("maplibregl-compact"):Re.classList.remove("maplibregl-compact")}},this.options=O}getDefaultPosition(){return"bottom-left"}onAdd(O){this._map=O,this._compact=this.options&&this.options.compact,this._container=o.create("div","maplibregl-ctrl");const fe=o.create("a","maplibregl-ctrl-logo");return fe.target="_blank",fe.rel="noopener nofollow",fe.href="https://maplibre.org/",fe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),fe.setAttribute("rel","noopener nofollow"),this._container.appendChild(fe),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){o.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Yi{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(O){const fe=++this._id;return this._queue.push({callback:O,id:fe,cancelled:!1}),fe}remove(O){const fe=this._currentlyRunning,Re=fe?this._queue.concat(fe):this._queue;for(const Oe of Re)if(Oe.id===O)return void(Oe.cancelled=!0)}run(O=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");const fe=this._currentlyRunning=this._queue;this._queue=[];for(const Re of fe)if(!Re.cancelled&&(Re.callback(O),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var ys=r.Y([{name:"a_pos3d",type:"Int16",components:3}]);class Ys extends r.E{constructor(O){super(),this.sourceCache=O,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,O.usedForTerrain=!0,O.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(O,fe){this.sourceCache.update(O,fe),this._renderableTilesKeys=[];const Re={};for(const Oe of O.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:fe}))Re[Oe.key]=!0,this._renderableTilesKeys.push(Oe.key),this._tiles[Oe.key]||(Oe.posMatrix=new Float64Array(16),r.aP(Oe.posMatrix,0,r.X,0,r.X,0,1),this._tiles[Oe.key]=new bt(Oe,this.tileSize));for(const Oe in this._tiles)Re[Oe]||delete this._tiles[Oe]}freeRtt(O){for(const fe in this._tiles){const Re=this._tiles[fe];(!O||Re.tileID.equals(O)||Re.tileID.isChildOf(O)||O.isChildOf(Re.tileID))&&(Re.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(O=>this.getTileByID(O))}getTileByID(O){return this._tiles[O]}getTerrainCoords(O){const fe={};for(const Re of this._renderableTilesKeys){const Oe=this._tiles[Re].tileID;if(Oe.canonical.equals(O.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16),r.aP(We.posMatrix,0,r.X,0,r.X,0,1),fe[Re]=We}else if(Oe.canonical.isChildOf(O.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16);const Mt=Oe.canonical.z-O.canonical.z,zt=Oe.canonical.x-(Oe.canonical.x>>Mt<<Mt),rr=Oe.canonical.y-(Oe.canonical.y>>Mt<<Mt),Tr=r.X>>Mt;r.aP(We.posMatrix,0,Tr,0,Tr,0,1),r.J(We.posMatrix,We.posMatrix,[-zt*Tr,-rr*Tr,0]),fe[Re]=We}else if(O.canonical.isChildOf(Oe.canonical)){const We=O.clone();We.posMatrix=new Float64Array(16);const Mt=O.canonical.z-Oe.canonical.z,zt=O.canonical.x-(O.canonical.x>>Mt<<Mt),rr=O.canonical.y-(O.canonical.y>>Mt<<Mt),Tr=r.X>>Mt;r.aP(We.posMatrix,0,r.X,0,r.X,0,1),r.J(We.posMatrix,We.posMatrix,[zt*Tr,rr*Tr,0]),r.K(We.posMatrix,We.posMatrix,[1/2**Mt,1/2**Mt,0]),fe[Re]=We}}return fe}getSourceTile(O,fe){const Re=this.sourceCache._source;let Oe=O.overscaledZ-this.deltaZoom;if(Oe>Re.maxzoom&&(Oe=Re.maxzoom),Oe<Re.minzoom)return null;this._sourceTileCache[O.key]||(this._sourceTileCache[O.key]=O.scaledTo(Oe).key);let We=this.sourceCache.getTileByID(this._sourceTileCache[O.key]);if((!We||!We.dem)&&fe)for(;Oe>=Re.minzoom&&(!We||!We.dem);)We=this.sourceCache.getTileByID(O.scaledTo(Oe--).key);return We}tilesAfterTime(O=Date.now()){return Object.values(this._tiles).filter(fe=>fe.timeAdded>=O)}}class Rl{constructor(O,fe,Re){this.painter=O,this.sourceCache=new Ys(fe),this.options=Re,this.exaggeration=typeof Re.exaggeration=="number"?Re.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(O,fe,Re,Oe=r.X){var We;if(!(fe>=0&&fe<Oe&&Re>=0&&Re<Oe))return 0;const Mt=this.getTerrainData(O),zt=(We=Mt.tile)===null||We===void 0?void 0:We.dem;if(!zt)return 0;const rr=(function(nt,ut,wt){var kt=ut[0],Ht=ut[1];return nt[0]=wt[0]*kt+wt[4]*Ht+wt[12],nt[1]=wt[1]*kt+wt[5]*Ht+wt[13],nt})([],[fe/Oe*r.X,Re/Oe*r.X],Mt.u_terrain_matrix),Tr=[rr[0]*zt.dim,rr[1]*zt.dim],zr=Math.floor(Tr[0]),qr=Math.floor(Tr[1]),pn=Tr[0]-zr,Dn=Tr[1]-qr;return zt.get(zr,qr)*(1-pn)*(1-Dn)+zt.get(zr+1,qr)*pn*(1-Dn)+zt.get(zr,qr+1)*(1-pn)*Dn+zt.get(zr+1,qr+1)*pn*Dn}getElevationForLngLatZoom(O,fe){if(!r.bb(fe,O.wrap()))return 0;const{tileID:Re,mercatorX:Oe,mercatorY:We}=this._getOverscaledTileIDFromLngLatZoom(O,fe);return this.getElevation(Re,Oe%r.X,We%r.X,r.X)}getElevation(O,fe,Re,Oe=r.X){return this.getDEMElevation(O,fe,Re,Oe)*this.exaggeration}getTerrainData(O){if(!this._emptyDemTexture){const Oe=this.painter.context,We=new r.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new f(Oe,We,Oe.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new f(Oe,new r.R({width:1,height:1}),Oe.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Oe.gl.NEAREST,Oe.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=r.an([])}const fe=this.sourceCache.getSourceTile(O,!0);if(fe&&fe.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){const Oe=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new f(Oe,fe.dem.getPixels(),Oe.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Oe.gl.NEAREST,Oe.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}const Re=fe&&fe+fe.tileID.key+O.key;if(Re&&!this._demMatrixCache[Re]){const Oe=this.sourceCache.sourceCache._source.maxzoom;let We=O.canonical.z-fe.tileID.canonical.z;O.overscaledZ>O.canonical.z&&(O.canonical.z>=Oe?We=O.canonical.z-Oe:r.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));const Mt=O.canonical.x-(O.canonical.x>>We<<We),zt=O.canonical.y-(O.canonical.y>>We<<We),rr=r.bc(new Float64Array(16),[1/(r.X<<We),1/(r.X<<We),0]);r.J(rr,rr,[Mt*r.X,zt*r.X,0]),this._demMatrixCache[O.key]={matrix:rr,coord:O}}return{u_depth:2,u_terrain:3,u_terrain_dim:fe&&fe.dem&&fe.dem.dim||1,u_terrain_matrix:Re?this._demMatrixCache[O.key].matrix:this._emptyDemMatrix,u_terrain_unpack:fe&&fe.dem&&fe.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(fe&&fe.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:fe}}getFramebuffer(O){const fe=this.painter,Re=fe.width/devicePixelRatio,Oe=fe.height/devicePixelRatio;return!this._fbo||this._fbo.width===Re&&this._fbo.height===Oe||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new f(fe.context,{width:Re,height:Oe,data:null},fe.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(fe.context.gl.NEAREST,fe.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new f(fe.context,{width:Re,height:Oe,data:null},fe.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(fe.context.gl.NEAREST,fe.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=fe.context.createFramebuffer(Re,Oe,!0,!1),this._fbo.depthAttachment.set(fe.context.createRenderbuffer(fe.context.gl.DEPTH_COMPONENT16,Re,Oe))),this._fbo.colorAttachment.set(O==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){const O=this.painter.context;if(this._coordsTexture)return this._coordsTexture;const fe=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let We=0,Mt=0;We<this._coordsTextureSize;We++)for(let zt=0;zt<this._coordsTextureSize;zt++,Mt+=4)fe[Mt+0]=255&zt,fe[Mt+1]=255&We,fe[Mt+2]=zt>>8<<4|We>>8,fe[Mt+3]=0;const Re=new r.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(fe.buffer)),Oe=new f(O,Re,O.gl.RGBA,{premultiply:!1});return Oe.bind(O.gl.NEAREST,O.gl.CLAMP_TO_EDGE),this._coordsTexture=Oe,Oe}pointCoordinate(O){this.painter.maybeDrawDepthAndCoords(!0);const fe=new Uint8Array(4),Re=this.painter.context,Oe=Re.gl,We=Math.round(O.x*this.painter.pixelRatio/devicePixelRatio),Mt=Math.round(O.y*this.painter.pixelRatio/devicePixelRatio),zt=Math.round(this.painter.height/devicePixelRatio);Re.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),Oe.readPixels(We,zt-Mt-1,1,1,Oe.RGBA,Oe.UNSIGNED_BYTE,fe),Re.bindFramebuffer.set(null);const rr=fe[0]+(fe[2]>>4<<8),Tr=fe[1]+((15&fe[2])<<8),zr=this.coordsIndex[255-fe[3]],qr=zr&&this.sourceCache.getTileByID(zr);if(!qr)return null;const pn=this._coordsTextureSize,Dn=(1<<qr.tileID.canonical.z)*pn;return new r.Z((qr.tileID.canonical.x*pn+rr)/Dn+qr.tileID.wrap,(qr.tileID.canonical.y*pn+Tr)/Dn,this.getElevation(qr.tileID,rr,Tr,pn))}depthAtPoint(O){const fe=new Uint8Array(4),Re=this.painter.context,Oe=Re.gl;return Re.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer),Oe.readPixels(O.x,this.painter.height/devicePixelRatio-O.y-1,1,1,Oe.RGBA,Oe.UNSIGNED_BYTE,fe),Re.bindFramebuffer.set(null),(fe[0]/16777216+fe[1]/65536+fe[2]/256+fe[3])/256}getTerrainMesh(){if(this._mesh)return this._mesh;const O=this.painter.context,fe=new r.bd,Re=new r.aY,Oe=this.meshSize,We=r.X/Oe,Mt=Oe*Oe;for(let qr=0;qr<=Oe;qr++)for(let pn=0;pn<=Oe;pn++)fe.emplaceBack(pn*We,qr*We,0);for(let qr=0;qr<Mt;qr+=Oe+1)for(let pn=0;pn<Oe;pn++)Re.emplaceBack(pn+qr,Oe+pn+qr+1,Oe+pn+qr+2),Re.emplaceBack(pn+qr,Oe+pn+qr+2,pn+qr+1);const zt=fe.length,rr=zt+2*(Oe+1);for(const qr of[0,1])for(let pn=0;pn<=Oe;pn++)for(const Dn of[0,1])fe.emplaceBack(pn*We,qr*r.X,Dn);for(let qr=0;qr<2*Oe;qr+=2)Re.emplaceBack(rr+qr,rr+qr+1,rr+qr+3),Re.emplaceBack(rr+qr,rr+qr+3,rr+qr+2),Re.emplaceBack(zt+qr,zt+qr+3,zt+qr+1),Re.emplaceBack(zt+qr,zt+qr+2,zt+qr+3);const Tr=fe.length,zr=Tr+2*(Oe+1);for(const qr of[0,1])for(let pn=0;pn<=Oe;pn++)for(const Dn of[0,1])fe.emplaceBack(qr*r.X,pn*We,Dn);for(let qr=0;qr<2*Oe;qr+=2)Re.emplaceBack(Tr+qr,Tr+qr+1,Tr+qr+3),Re.emplaceBack(Tr+qr,Tr+qr+3,Tr+qr+2),Re.emplaceBack(zr+qr,zr+qr+3,zr+qr+1),Re.emplaceBack(zr+qr,zr+qr+2,zr+qr+3);return this._mesh=new qc(O.createVertexBuffer(fe,ys.members),O.createIndexBuffer(Re),r.a0.simpleSegment(0,0,fe.length,Re.length)),this._mesh}getMeshFrameDelta(O){return 2*Math.PI*r.be/Math.pow(2,O)/5}getMinTileElevationForLngLatZoom(O,fe){var Re;const{tileID:Oe}=this._getOverscaledTileIDFromLngLatZoom(O,fe);return(Re=this.getMinMaxElevation(Oe).minElevation)!==null&&Re!==void 0?Re:0}getMinMaxElevation(O){const fe=this.getTerrainData(O).tile,Re={minElevation:null,maxElevation:null};return fe&&fe.dem&&(Re.minElevation=fe.dem.min*this.exaggeration,Re.maxElevation=fe.dem.max*this.exaggeration),Re}_getOverscaledTileIDFromLngLatZoom(O,fe){const Re=r.Z.fromLngLat(O.wrap()),Oe=(1<<fe)*r.X,We=Re.x*Oe,Mt=Re.y*Oe,zt=Math.floor(We/r.X),rr=Math.floor(Mt/r.X);return{tileID:new r.S(fe,0,fe,zt,rr),mercatorX:We,mercatorY:Mt}}}class Ql{constructor(O,fe,Re){this._context=O,this._size=fe,this._tileSize=Re,this._objects=[],this._recentlyUsed=[],this._stamp=0}destruct(){for(const O of this._objects)O.texture.destroy(),O.fbo.destroy()}_createObject(O){const fe=this._context.createFramebuffer(this._tileSize,this._tileSize,!0,!0),Re=new f(this._context,{width:this._tileSize,height:this._tileSize,data:null},this._context.gl.RGBA);return Re.bind(this._context.gl.LINEAR,this._context.gl.CLAMP_TO_EDGE),fe.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL,this._tileSize,this._tileSize)),fe.colorAttachment.set(Re.texture),{id:O,fbo:fe,texture:Re,stamp:-1,inUse:!1}}getObjectForId(O){return this._objects[O]}useObject(O){O.inUse=!0,this._recentlyUsed=this._recentlyUsed.filter(fe=>O.id!==fe),this._recentlyUsed.push(O.id)}stampObject(O){O.stamp=++this._stamp}getOrCreateFreeObject(){for(const fe of this._recentlyUsed)if(!this._objects[fe].inUse)return this._objects[fe];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");const O=this._createObject(this._objects.length);return this._objects.push(O),O}freeObject(O){O.inUse=!1}freeAllObjects(){for(const O of this._objects)this.freeObject(O)}isFull(){return!(this._objects.length<this._size)&&this._objects.some(O=>!O.inUse)===!1}}const Dl={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class eu{constructor(O,fe){this.painter=O,this.terrain=fe,this.pool=new Ql(O.context,30,fe.sourceCache.tileSize*fe.qualityFactor)}destruct(){this.pool.destruct()}getTexture(O){return this.pool.getObjectForId(O.rtt[this._stacks.length-1].id).texture}prepareForRender(O,fe){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=O._order.filter(Re=>!O._layers[Re].isHidden(fe)),this._coordsDescendingInv={};for(const Re in O.sourceCaches){this._coordsDescendingInv[Re]={};const Oe=O.sourceCaches[Re].getVisibleCoordinates();for(const We of Oe){const Mt=this.terrain.sourceCache.getTerrainCoords(We);for(const zt in Mt)this._coordsDescendingInv[Re][zt]||(this._coordsDescendingInv[Re][zt]=[]),this._coordsDescendingInv[Re][zt].push(Mt[zt])}}this._coordsDescendingInvStr={};for(const Re of O._order){const Oe=O._layers[Re],We=Oe.source;if(Dl[Oe.type]&&!this._coordsDescendingInvStr[We]){this._coordsDescendingInvStr[We]={};for(const Mt in this._coordsDescendingInv[We])this._coordsDescendingInvStr[We][Mt]=this._coordsDescendingInv[We][Mt].map(zt=>zt.key).sort().join()}}for(const Re of this._renderableTiles)for(const Oe in this._coordsDescendingInvStr){const We=this._coordsDescendingInvStr[Oe][Re.tileID.key];We&&We!==Re.rttCoords[Oe]&&(Re.rtt=[])}}renderLayer(O){if(O.isHidden(this.painter.transform.zoom))return!1;const fe=O.type,Re=this.painter,Oe=this._renderableLayerIds[this._renderableLayerIds.length-1]===O.id;if(Dl[fe]&&(this._prevType&&Dl[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(O.id),!Oe))return!0;if(Dl[this._prevType]||Dl[fe]&&Oe){this._prevType=fe;const We=this._stacks.length-1,Mt=this._stacks[We]||[];for(const zt of this._renderableTiles){if(this.pool.isFull()&&(Su(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(zt),zt.rtt[We]){const Tr=this.pool.getObjectForId(zt.rtt[We].id);if(Tr.stamp===zt.rtt[We].stamp){this.pool.useObject(Tr);continue}}const rr=this.pool.getOrCreateFreeObject();this.pool.useObject(rr),this.pool.stampObject(rr),zt.rtt[We]={id:rr.id,stamp:rr.stamp},Re.context.bindFramebuffer.set(rr.fbo.framebuffer),Re.context.clear({color:r.aM.transparent,stencil:0}),Re.currentStencilSource=void 0;for(let Tr=0;Tr<Mt.length;Tr++){const zr=Re.style._layers[Mt[Tr]],qr=zr.source?this._coordsDescendingInv[zr.source][zt.tileID.key]:[zt.tileID];Re.context.viewport.set([0,0,rr.fbo.width,rr.fbo.height]),Re._renderTileClippingMasks(zr,qr),Re.renderLayer(Re,Re.style.sourceCaches[zr.source],zr,qr),zr.source&&(zt.rttCoords[zr.source]=this._coordsDescendingInvStr[zr.source][zt.tileID.key])}}return Su(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects(),Dl[fe]}return!1}}const cl={"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":"Reset bearing to 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","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Du=a,Pu={hash:!1,interactive:!0,bearingSnap:7,attributionControl:is,maplibreLogo:!1,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,refreshExpiredTiles:!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],zoom:0,bearing:0,pitch:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:r.a.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0},Zl=Ze=>{Ze.touchstart=Ze.dragStart,Ze.touchmoveWindow=Ze.dragMove,Ze.touchend=Ze.dragEnd},Oo={showCompass:!0,showZoom:!0,visualizePitch:!1};class Ls{constructor(O,fe,Re=!1){this.mousedown=Mt=>{this.startMouse(r.e({},Mt,{ctrlKey:!0,preventDefault:()=>Mt.preventDefault()}),o.mousePos(this.element,Mt)),o.addEventListener(window,"mousemove",this.mousemove),o.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Mt=>{this.moveMouse(Mt,o.mousePos(this.element,Mt))},this.mouseup=Mt=>{this.mouseRotate.dragEnd(Mt),this.mousePitch&&this.mousePitch.dragEnd(Mt),this.offTemp()},this.touchstart=Mt=>{Mt.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=o.touchPos(this.element,Mt.targetTouches)[0],this.startTouch(Mt,this._startPos),o.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.addEventListener(window,"touchend",this.touchend))},this.touchmove=Mt=>{Mt.targetTouches.length!==1?this.reset():(this._lastPos=o.touchPos(this.element,Mt.targetTouches)[0],this.moveTouch(Mt,this._lastPos))},this.touchend=Mt=>{Mt.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),delete this._startPos,delete this._lastPos,this.offTemp()},this.reset=()=>{this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;const Oe=O.dragRotate._mouseRotate.getClickTolerance(),We=O.dragRotate._mousePitch.getClickTolerance();this.element=fe,this.mouseRotate=yc({clickTolerance:Oe,enable:!0}),this.touchRotate=(({enable:Mt,clickTolerance:zt,bearingDegreesPerPixelMoved:rr=.8})=>{const Tr=new Mh;return new tf({clickTolerance:zt,move:(zr,qr)=>({bearingDelta:(qr.x-zr.x)*rr}),moveStateManager:Tr,enable:Mt,assignEvents:Zl})})({clickTolerance:Oe,enable:!0}),this.map=O,Re&&(this.mousePitch=cd({clickTolerance:We,enable:!0}),this.touchPitch=(({enable:Mt,clickTolerance:zt,pitchDegreesPerPixelMoved:rr=-.5})=>{const Tr=new Mh;return new tf({clickTolerance:zt,move:(zr,qr)=>({pitchDelta:(qr.y-zr.y)*rr}),moveStateManager:Tr,enable:Mt,assignEvents:Zl})})({clickTolerance:We,enable:!0})),o.addEventListener(fe,"mousedown",this.mousedown),o.addEventListener(fe,"touchstart",this.touchstart,{passive:!1}),o.addEventListener(fe,"touchcancel",this.reset)}startMouse(O,fe){this.mouseRotate.dragStart(O,fe),this.mousePitch&&this.mousePitch.dragStart(O,fe),o.disableDrag()}startTouch(O,fe){this.touchRotate.dragStart(O,fe),this.touchPitch&&this.touchPitch.dragStart(O,fe),o.disableDrag()}moveMouse(O,fe){const Re=this.map,{bearingDelta:Oe}=this.mouseRotate.dragMove(O,fe)||{};if(Oe&&Re.setBearing(Re.getBearing()+Oe),this.mousePitch){const{pitchDelta:We}=this.mousePitch.dragMove(O,fe)||{};We&&Re.setPitch(Re.getPitch()+We)}}moveTouch(O,fe){const Re=this.map,{bearingDelta:Oe}=this.touchRotate.dragMove(O,fe)||{};if(Oe&&Re.setBearing(Re.getBearing()+Oe),this.touchPitch){const{pitchDelta:We}=this.touchPitch.dragMove(O,fe)||{};We&&Re.setPitch(Re.getPitch()+We)}}off(){const O=this.element;o.removeEventListener(O,"mousedown",this.mousedown),o.removeEventListener(O,"touchstart",this.touchstart,{passive:!1}),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend),o.removeEventListener(O,"touchcancel",this.reset),this.offTemp()}offTemp(){o.enableDrag(),o.removeEventListener(window,"mousemove",this.mousemove),o.removeEventListener(window,"mouseup",this.mouseup),o.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),o.removeEventListener(window,"touchend",this.touchend)}}let ql;function Al(Ze,O,fe){const Re=new r.N(Ze.lng,Ze.lat);if(Ze=new r.N(Ze.lng,Ze.lat),O){const Oe=new r.N(Ze.lng-360,Ze.lat),We=new r.N(Ze.lng+360,Ze.lat),Mt=fe.locationPoint(Ze).distSqr(O);fe.locationPoint(Oe).distSqr(O)<Mt?Ze=Oe:fe.locationPoint(We).distSqr(O)<Mt&&(Ze=We)}for(;Math.abs(Ze.lng-fe.center.lng)>180;){const Oe=fe.locationPoint(Ze);if(Oe.x>=0&&Oe.y>=0&&Oe.x<=fe.width&&Oe.y<=fe.height)break;Ze.lng>fe.center.lng?Ze.lng-=360:Ze.lng+=360}return Ze.lng!==Re.lng&&fe.locationPoint(Ze).y>fe.height/2-fe.getHorizon()?Ze:Re}const Tc={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Ac(Ze,O,fe){const Re=Ze.classList;for(const Oe in Tc)Re.remove(`maplibregl-${fe}-anchor-${Oe}`);Re.add(`maplibregl-${fe}-anchor-${O}`)}class Pc extends r.E{constructor(O){if(super(),this._onKeyPress=fe=>{const Re=fe.code,Oe=fe.charCode||fe.keyCode;Re!=="Space"&&Re!=="Enter"&&Oe!==32&&Oe!==13||this.togglePopup()},this._onMapClick=fe=>{const Re=fe.originalEvent.target,Oe=this._element;this._popup&&(Re===Oe||Oe.contains(Re))&&this.togglePopup()},this._update=fe=>{var Re;if(!this._map)return;const Oe=this._map.loaded()&&!this._map.isMoving();(fe?.type==="terrain"||fe?.type==="render"&&!Oe)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Al(this._lngLat,this._flatPos,this._map.transform):(Re=this._lngLat)===null||Re===void 0?void 0:Re.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let We="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?We=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(We=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Mt="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Mt="rotateX(0deg)":this._pitchAlignment==="map"&&(Mt=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||fe&&fe.type!=="moveend"||(this._pos=this._pos.round()),o.setTransform(this._element,`${Tc[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Mt} ${We}`),s.frameAsync(new AbortController).then(()=>{this._updateOpacity(fe&&fe.type==="moveend")}).catch(()=>{})},this._onMove=fe=>{if(!this._isDragging){const Re=this._clickTolerance||this._map._clickTolerance;this._isDragging=fe.point.dist(this._pointerdownPos)>=Re}this._isDragging&&(this._pos=fe.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 r.k("dragstart"))),this.fire(new r.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new r.k("dragend")),this._state="inactive"},this._addDragHandler=fe=>{this._element.contains(fe.originalEvent.target)&&(fe.preventDefault(),this._positionDelta=fe.point.sub(this._pos).add(this._offset),this._pointerdownPos=fe.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=O&&O.anchor||"center",this._color=O&&O.color||"#3FB1CE",this._scale=O&&O.scale||1,this._draggable=O&&O.draggable||!1,this._clickTolerance=O&&O.clickTolerance||0,this._subpixelPositioning=O&&O.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=O&&O.rotation||0,this._rotationAlignment=O&&O.rotationAlignment||"auto",this._pitchAlignment=O&&O.pitchAlignment&&O.pitchAlignment!=="auto"?O.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(O?.opacity,O?.opacityWhenCovered),O&&O.element)this._element=O.element,this._offset=r.P.convert(O&&O.offset||[0,0]);else{this._defaultMarker=!0,this._element=o.create("div");const fe=o.createNS("http://www.w3.org/2000/svg","svg"),Re=41,Oe=27;fe.setAttributeNS(null,"display","block"),fe.setAttributeNS(null,"height",`${Re}px`),fe.setAttributeNS(null,"width",`${Oe}px`),fe.setAttributeNS(null,"viewBox",`0 0 ${Oe} ${Re}`);const We=o.createNS("http://www.w3.org/2000/svg","g");We.setAttributeNS(null,"stroke","none"),We.setAttributeNS(null,"stroke-width","1"),We.setAttributeNS(null,"fill","none"),We.setAttributeNS(null,"fill-rule","evenodd");const Mt=o.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"fill-rule","nonzero");const zt=o.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),zt.setAttributeNS(null,"fill","#000000");const rr=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];for(const kt of rr){const Ht=o.createNS("http://www.w3.org/2000/svg","ellipse");Ht.setAttributeNS(null,"opacity","0.04"),Ht.setAttributeNS(null,"cx","10.5"),Ht.setAttributeNS(null,"cy","5.80029008"),Ht.setAttributeNS(null,"rx",kt.rx),Ht.setAttributeNS(null,"ry",kt.ry),zt.appendChild(Ht)}const Tr=o.createNS("http://www.w3.org/2000/svg","g");Tr.setAttributeNS(null,"fill",this._color);const zr=o.createNS("http://www.w3.org/2000/svg","path");zr.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Tr.appendChild(zr);const qr=o.createNS("http://www.w3.org/2000/svg","g");qr.setAttributeNS(null,"opacity","0.25"),qr.setAttributeNS(null,"fill","#000000");const pn=o.createNS("http://www.w3.org/2000/svg","path");pn.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),qr.appendChild(pn);const Dn=o.createNS("http://www.w3.org/2000/svg","g");Dn.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Dn.setAttributeNS(null,"fill","#FFFFFF");const nt=o.createNS("http://www.w3.org/2000/svg","g");nt.setAttributeNS(null,"transform","translate(8.0, 8.0)");const ut=o.createNS("http://www.w3.org/2000/svg","circle");ut.setAttributeNS(null,"fill","#000000"),ut.setAttributeNS(null,"opacity","0.25"),ut.setAttributeNS(null,"cx","5.5"),ut.setAttributeNS(null,"cy","5.5"),ut.setAttributeNS(null,"r","5.4999962");const wt=o.createNS("http://www.w3.org/2000/svg","circle");wt.setAttributeNS(null,"fill","#FFFFFF"),wt.setAttributeNS(null,"cx","5.5"),wt.setAttributeNS(null,"cy","5.5"),wt.setAttributeNS(null,"r","5.4999962"),nt.appendChild(ut),nt.appendChild(wt),Mt.appendChild(zt),Mt.appendChild(Tr),Mt.appendChild(qr),Mt.appendChild(Dn),Mt.appendChild(nt),fe.appendChild(Mt),fe.setAttributeNS(null,"height",Re*this._scale+"px"),fe.setAttributeNS(null,"width",Oe*this._scale+"px"),this._element.appendChild(fe),this._offset=r.P.convert(O&&O.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",fe=>{fe.preventDefault()}),this._element.addEventListener("mousedown",fe=>{fe.preventDefault()}),Ac(this._element,this._anchor,"marker"),O&&O.className)for(const fe of O.className.split(" "))this._element.classList.add(fe);this._popup=null}addTo(O){return this.remove(),this._map=O,this._element.setAttribute("aria-label",O._getUIString("Marker.Title")),O.getCanvasContainer().appendChild(this._element),O.on("move",this._update),O.on("moveend",this._update),O.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),o.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(O){return this._lngLat=r.N.convert(O),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(O){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),O){if(!("offset"in O.options)){const Oe=Math.abs(13.5)/Math.SQRT2;O.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[Oe,-1*(38.1-13.5+Oe)],"bottom-right":[-Oe,-1*(38.1-13.5+Oe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=O,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(O){return this._subpixelPositioning=O,this}getPopup(){return this._popup}togglePopup(){const O=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:O?(O.isOpen()?O.remove():(O.setLngLat(this._lngLat),O.addTo(this._map)),this):this}_updateOpacity(O=!1){var fe,Re;if(!(!((fe=this._map)===null||fe===void 0)&&fe.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(O)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}const Oe=this._map,We=Oe.terrain.depthAtPoint(this._pos),Mt=Oe.terrain.getElevationForLngLatZoom(this._lngLat,Oe.transform.tileZoom);if(Oe.transform.lngLatToCameraDepth(this._lngLat,Mt)-We<.006)return void(this._element.style.opacity=this._opacity);const zt=-this._offset.y/Oe.transform._pixelPerMeter,rr=Math.sin(Oe.getPitch()*Math.PI/180)*zt,Tr=Oe.terrain.depthAtPoint(new r.P(this._pos.x,this._pos.y-this._offset.y)),zr=Oe.transform.lngLatToCameraDepth(this._lngLat,Mt+rr)-Tr>.006;!((Re=this._popup)===null||Re===void 0)&&Re.isOpen()&&zr&&this._popup.remove(),this._element.style.opacity=zr?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(O){return this._offset=r.P.convert(O),this._update(),this}addClassName(O){this._element.classList.add(O)}removeClassName(O){this._element.classList.remove(O)}toggleClassName(O){return this._element.classList.toggle(O)}setDraggable(O){return this._draggable=!!O,this._map&&(O?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(O){return this._rotation=O||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(O){return this._rotationAlignment=O||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(O){return this._pitchAlignment=O&&O!=="auto"?O:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(O,fe){return O===void 0&&fe===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),O!==void 0&&(this._opacity=O),fe!==void 0&&(this._opacityWhenCovered=fe),this._map&&this._updateOpacity(!0),this}}const oh={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0};let Sc=0,Ff=!1;const Ou={maxWidth:100,unit:"metric"};function Bf(Ze,O,fe){const Re=fe&&fe.maxWidth||100,Oe=Ze._container.clientHeight/2,We=Ze.unproject([0,Oe]),Mt=Ze.unproject([Re,Oe]),zt=We.distanceTo(Mt);if(fe&&fe.unit==="imperial"){const rr=3.2808*zt;rr>5280?os(O,Re,rr/5280,Ze._getUIString("ScaleControl.Miles")):os(O,Re,rr,Ze._getUIString("ScaleControl.Feet"))}else fe&&fe.unit==="nautical"?os(O,Re,zt/1852,Ze._getUIString("ScaleControl.NauticalMiles")):zt>=1e3?os(O,Re,zt/1e3,Ze._getUIString("ScaleControl.Kilometers")):os(O,Re,zt,Ze._getUIString("ScaleControl.Meters"))}function os(Ze,O,fe,Re){const Oe=(function(We){const Mt=Math.pow(10,`${Math.floor(We)}`.length-1);let zt=We/Mt;return zt=zt>=10?10:zt>=5?5:zt>=3?3:zt>=2?2:zt>=1?1:(function(rr){const Tr=Math.pow(10,Math.ceil(-Math.log(rr)/Math.LN10));return Math.round(rr*Tr)/Tr})(zt),Mt*zt})(fe);Ze.style.width=O*(Oe/fe)+"px",Ze.innerHTML=`${Oe}&nbsp;${Re}`}const _s={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},jf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function nf(Ze){if(Ze){if(typeof Ze=="number"){const O=Math.round(Math.abs(Ze)/Math.SQRT2);return{center:new r.P(0,0),top:new r.P(0,Ze),"top-left":new r.P(O,O),"top-right":new r.P(-O,O),bottom:new r.P(0,-Ze),"bottom-left":new r.P(O,-O),"bottom-right":new r.P(-O,-O),left:new r.P(Ze,0),right:new r.P(-Ze,0)}}if(Ze instanceof r.P||Array.isArray(Ze)){const O=r.P.convert(Ze);return{center:O,top:O,"top-left":O,"top-right":O,bottom:O,"bottom-left":O,"bottom-right":O,left:O,right:O}}return{center:r.P.convert(Ze.center||[0,0]),top:r.P.convert(Ze.top||[0,0]),"top-left":r.P.convert(Ze["top-left"]||[0,0]),"top-right":r.P.convert(Ze["top-right"]||[0,0]),bottom:r.P.convert(Ze.bottom||[0,0]),"bottom-left":r.P.convert(Ze["bottom-left"]||[0,0]),"bottom-right":r.P.convert(Ze["bottom-right"]||[0,0]),left:r.P.convert(Ze.left||[0,0]),right:r.P.convert(Ze.right||[0,0])}}return nf(new r.P(0,0))}const Gc=a;t.AJAXError=r.bh,t.Evented=r.E,t.LngLat=r.N,t.MercatorCoordinate=r.Z,t.Point=r.P,t.addProtocol=r.bi,t.config=r.a,t.removeProtocol=r.bj,t.AttributionControl=ts,t.BoxZoomHandler=pf,t.CanvasSource=ht,t.CooperativeGesturesHandler=qi,t.DoubleClickZoomHandler=Ga,t.DragPanHandler=ki,t.DragRotateHandler=to,t.EdgeInsets=wc,t.FullscreenControl=class extends r.E{constructor(Ze={}){super(),this._onFullscreenChange=()=>{var O;let fe=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((O=fe?.shadowRoot)===null||O===void 0)&&O.fullscreenElement;)fe=fe.shadowRoot.fullscreenElement;fe===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Ze&&Ze.container&&(Ze.container instanceof HTMLElement?this._container=Ze.container:r.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Ze){return this._map=Ze,this._container||(this._container=this._map.getContainer()),this._controlContainer=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){o.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){const Ze=this._fullscreenButton=o.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);o.create("span","maplibregl-ctrl-icon",Ze).setAttribute("aria-hidden","true"),Ze.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){const Ze=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Ze),this._fullscreenButton.title=Ze}_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 r.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new r.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},t.GeoJSONSource=Ve,t.GeolocateControl=class extends r.E{constructor(Ze){super(),this._onSuccess=O=>{if(this._map){if(this._isOutOfMapMaxBounds(O))return this._setErrorState(),this.fire(new r.k("outofmaxbounds",O)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=O,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(O),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(O),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new r.k("geolocate",O)),this._finish()}},this._updateCamera=O=>{const fe=new r.N(O.coords.longitude,O.coords.latitude),Re=O.coords.accuracy,Oe=this._map.getBearing(),We=r.e({bearing:Oe},this.options.fitBoundsOptions),Mt=ue.fromLngLat(fe,Re);this._map.fitBounds(Mt,We,{geolocateSource:!0})},this._updateMarker=O=>{if(O){const fe=new r.N(O.coords.longitude,O.coords.latitude);this._accuracyCircleMarker.setLngLat(fe).addTo(this._map),this._userLocationDotMarker.setLngLat(fe).addTo(this._map),this._accuracy=O.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=O=>{if(this._map){if(this.options.trackUserLocation)if(O.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;const fe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(O.code===3&&Ff)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new r.k("error",O)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",O=>O.preventDefault()),this._geolocateButton=o.create("button","maplibregl-ctrl-geolocate",this._container),o.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=O=>{if(this._map){if(O===!1){r.w("Geolocation support is not available so the GeolocateControl will be disabled.");const fe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}else{const fe=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=fe,this._geolocateButton.setAttribute("aria-label",fe)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=o.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new Pc({element:this._dotElement}),this._circleElement=o.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Pc({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",fe=>{fe.geolocateSource||this._watchState!=="ACTIVE_LOCK"||fe.originalEvent&&fe.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new r.k("trackuserlocationend")),this.fire(new r.k("userlocationlostfocus")))})}},this.options=r.e({},oh,Ze)}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return r._(this,arguments,void 0,function*(O=!1){if(ql!==void 0&&!O)return ql;if(window.navigator.permissions===void 0)return ql=!!window.navigator.geolocation,ql;try{ql=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ql=!!window.navigator.geolocation}return ql})})().then(O=>this._finishSetupUI(O)),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(),o.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Sc=0,Ff=!1}_isOutOfMapMaxBounds(Ze){const O=this._map.getMaxBounds(),fe=Ze.coords;return O&&(fe.longitude<O.getWest()||fe.longitude>O.getEast()||fe.latitude<O.getSouth()||fe.latitude>O.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){const Ze=this._map.getBounds(),O=Ze.getSouthEast(),fe=Ze.getNorthEast(),Re=O.distanceTo(fe),Oe=Math.ceil(this._accuracy/(Re/this._map._container.clientHeight)*2);this._circleElement.style.width=`${Oe}px`,this._circleElement.style.height=`${Oe}px`}trigger(){if(!this._setup)return r.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new r.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Sc--,Ff=!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 r.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new r.k("trackuserlocationstart")),this.fire(new r.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Ze;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Sc++,Sc>1?(Ze={maximumAge:6e5,timeout:0},Ff=!0):(Ze=this.options.positionOptions,Ff=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Ze)}}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)}},t.Hash=Tf,t.ImageSource=pt,t.KeyboardHandler=Hr,t.LngLatBounds=ue,t.LogoControl=vo,t.Map=class extends Yo{constructor(Ze){r.bf.mark(r.bg.create);const O=Object.assign(Object.assign({},Pu),Ze);if(O.minZoom!=null&&O.maxZoom!=null&&O.minZoom>O.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(O.minPitch!=null&&O.maxPitch!=null&&O.minPitch>O.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(O.minPitch!=null&&O.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(O.maxPitch!=null&&O.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new yu(O.minZoom,O.maxZoom,O.minPitch,O.maxPitch,O.renderWorldCopies),{bearingSnap:O.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Yi,this._controls=[],this._mapId=r.a4(),this._contextLost=fe=>{fe.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new r.k("webglcontextlost",{originalEvent:fe}))},this._contextRestored=fe=>{this._setupPainter(),this.resize(),this._update(),this.fire(new r.k("webglcontextrestored",{originalEvent:fe}))},this._onMapScroll=fe=>{if(fe.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=O.interactive,this._maxTileCacheSize=O.maxTileCacheSize,this._maxTileCacheZoomLevels=O.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=O.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=O.preserveDrawingBuffer===!0,this._antialias=O.antialias===!0,this._trackResize=O.trackResize===!0,this._bearingSnap=O.bearingSnap,this._refreshExpiredTiles=O.refreshExpiredTiles===!0,this._fadeDuration=O.fadeDuration,this._crossSourceCollisions=O.crossSourceCollisions===!0,this._collectResourceTiming=O.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},cl),O.locale),this._clickTolerance=O.clickTolerance,this._overridePixelRatio=O.pixelRatio,this._maxCanvasSize=O.maxCanvasSize,this.transformCameraUpdate=O.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=O.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=c.addThrottleControl(()=>this.isMoving()),this._requestManager=new _(O.transformRequest),typeof O.container=="string"){if(this._container=document.getElementById(O.container),!this._container)throw new Error(`Container '${O.container}' not found.`)}else{if(!(O.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=O.container}if(O.maxBounds&&this.setMaxBounds(O.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let fe=!1;const Re=vh(Oe=>{this._trackResize&&!this._removed&&(this.resize(Oe),this.redraw())},50);this._resizeObserver=new ResizeObserver(Oe=>{fe?Re(Oe):fe=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Qo(this,O),this._hash=O.hash&&new Tf(typeof O.hash=="string"&&O.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:O.center,zoom:O.zoom,bearing:O.bearing,pitch:O.pitch}),O.bounds&&(this.resize(),this.fitBounds(O.bounds,r.e({},O.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=O.localIdeographFontFamily,this._validateStyle=O.validateStyle,O.style&&this.setStyle(O.style,{localIdeographFontFamily:O.localIdeographFontFamily}),O.attributionControl&&this.addControl(new ts(typeof O.attributionControl=="boolean"?void 0:O.attributionControl)),O.maplibreLogo&&this.addControl(new vo,O.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",fe=>{this._update(fe.dataType==="style"),this.fire(new r.k(`${fe.dataType}data`,fe))}),this.on("dataloading",fe=>{this.fire(new r.k(`${fe.dataType}dataloading`,fe))}),this.on("dataabort",fe=>{this.fire(new r.k("sourcedataabort",fe))})}_getMapId(){return this._mapId}addControl(Ze,O){if(O===void 0&&(O=Ze.getDefaultPosition?Ze.getDefaultPosition():"top-right"),!Ze||!Ze.onAdd)return this.fire(new r.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const fe=Ze.onAdd(this);this._controls.push(Ze);const Re=this._controlPositions[O];return O.indexOf("bottom")!==-1?Re.insertBefore(fe,Re.firstChild):Re.appendChild(fe),this}removeControl(Ze){if(!Ze||!Ze.onRemove)return this.fire(new r.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const O=this._controls.indexOf(Ze);return O>-1&&this._controls.splice(O,1),Ze.onRemove(this),this}hasControl(Ze){return this._controls.indexOf(Ze)>-1}calculateCameraOptionsFromTo(Ze,O,fe,Re){return Re==null&&this.terrain&&(Re=this.terrain.getElevationForLngLatZoom(fe,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Ze,O,fe,Re)}resize(Ze){var O;const fe=this._containerDimensions(),Re=fe[0],Oe=fe[1],We=this._getClampedPixelRatio(Re,Oe);if(this._resizeCanvas(Re,Oe,We),this.painter.resize(Re,Oe,We),this.painter.overLimit()){const zt=this.painter.context.gl;this._maxCanvasSize=[zt.drawingBufferWidth,zt.drawingBufferHeight];const rr=this._getClampedPixelRatio(Re,Oe);this._resizeCanvas(Re,Oe,rr),this.painter.resize(Re,Oe,rr)}this.transform.resize(Re,Oe),(O=this._requestedCameraState)===null||O===void 0||O.resize(Re,Oe);const Mt=!this._moving;return Mt&&(this.stop(),this.fire(new r.k("movestart",Ze)).fire(new r.k("move",Ze))),this.fire(new r.k("resize",Ze)),Mt&&this.fire(new r.k("moveend",Ze)),this}_getClampedPixelRatio(Ze,O){const{0:fe,1:Re}=this._maxCanvasSize,Oe=this.getPixelRatio(),We=Ze*Oe,Mt=O*Oe;return Math.min(We>fe?fe/We:1,Mt>Re?Re/Mt:1)*Oe}getPixelRatio(){var Ze;return(Ze=this._overridePixelRatio)!==null&&Ze!==void 0?Ze:devicePixelRatio}setPixelRatio(Ze){this._overridePixelRatio=Ze,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Ze){return this.transform.setMaxBounds(ue.convert(Ze)),this._update()}setMinZoom(Ze){if((Ze=Ze??-2)>=-2&&Ze<=this.transform.maxZoom)return this.transform.minZoom=Ze,this._update(),this.getZoom()<Ze&&this.setZoom(Ze),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Ze){if((Ze=Ze??22)>=this.transform.minZoom)return this.transform.maxZoom=Ze,this._update(),this.getZoom()>Ze&&this.setZoom(Ze),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Ze){if((Ze=Ze??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Ze>=0&&Ze<=this.transform.maxPitch)return this.transform.minPitch=Ze,this._update(),this.getPitch()<Ze&&this.setPitch(Ze),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Ze){if((Ze=Ze??60)>85)throw new Error("maxPitch must be less than or equal to 85");if(Ze>=this.transform.minPitch)return this.transform.maxPitch=Ze,this._update(),this.getPitch()>Ze&&this.setPitch(Ze),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Ze){return this.transform.renderWorldCopies=Ze,this._update()}project(Ze){return this.transform.locationPoint(r.N.convert(Ze),this.style&&this.terrain)}unproject(Ze){return this.transform.pointLocation(r.P.convert(Ze),this.terrain)}isMoving(){var Ze;return this._moving||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isMoving())}isZooming(){var Ze;return this._zooming||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isZooming())}isRotating(){var Ze;return this._rotating||((Ze=this.handlers)===null||Ze===void 0?void 0:Ze.isRotating())}_createDelegatedListener(Ze,O,fe){if(Ze==="mouseenter"||Ze==="mouseover"){let Re=!1;return{layers:O,listener:fe,delegates:{mousemove:We=>{const Mt=O.filter(rr=>this.getLayer(rr)),zt=Mt.length!==0?this.queryRenderedFeatures(We.point,{layers:Mt}):[];zt.length?Re||(Re=!0,fe.call(this,new vc(Ze,this,We.originalEvent,{features:zt}))):Re=!1},mouseout:()=>{Re=!1}}}}if(Ze==="mouseleave"||Ze==="mouseout"){let Re=!1;return{layers:O,listener:fe,delegates:{mousemove:Mt=>{const zt=O.filter(rr=>this.getLayer(rr));(zt.length!==0?this.queryRenderedFeatures(Mt.point,{layers:zt}):[]).length?Re=!0:Re&&(Re=!1,fe.call(this,new vc(Ze,this,Mt.originalEvent)))},mouseout:Mt=>{Re&&(Re=!1,fe.call(this,new vc(Ze,this,Mt.originalEvent)))}}}}{const Re=Oe=>{const We=O.filter(zt=>this.getLayer(zt)),Mt=We.length!==0?this.queryRenderedFeatures(Oe.point,{layers:We}):[];Mt.length&&(Oe.features=Mt,fe.call(this,Oe),delete Oe.features)};return{layers:O,listener:fe,delegates:{[Ze]:Re}}}}_saveDelegatedListener(Ze,O){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Ze]=this._delegatedListeners[Ze]||[],this._delegatedListeners[Ze].push(O)}_removeDelegatedListener(Ze,O,fe){if(!this._delegatedListeners||!this._delegatedListeners[Ze])return;const Re=this._delegatedListeners[Ze];for(let Oe=0;Oe<Re.length;Oe++){const We=Re[Oe];if(We.listener===fe&&We.layers.length===O.length&&We.layers.every(Mt=>O.includes(Mt))){for(const Mt in We.delegates)this.off(Mt,We.delegates[Mt]);return void Re.splice(Oe,1)}}}on(Ze,O,fe){if(fe===void 0)return super.on(Ze,O);const Re=this._createDelegatedListener(Ze,typeof O=="string"?[O]:O,fe);this._saveDelegatedListener(Ze,Re);for(const Oe in Re.delegates)this.on(Oe,Re.delegates[Oe]);return this}once(Ze,O,fe){if(fe===void 0)return super.once(Ze,O);const Re=typeof O=="string"?[O]:O,Oe=this._createDelegatedListener(Ze,Re,fe);for(const We in Oe.delegates){const Mt=Oe.delegates[We];Oe.delegates[We]=(...zt)=>{this._removeDelegatedListener(Ze,Re,fe),Mt(...zt)}}this._saveDelegatedListener(Ze,Oe);for(const We in Oe.delegates)this.once(We,Oe.delegates[We]);return this}off(Ze,O,fe){return fe===void 0?super.off(Ze,O):(this._removeDelegatedListener(Ze,typeof O=="string"?[O]:O,fe),this)}queryRenderedFeatures(Ze,O){if(!this.style)return[];let fe;const Re=Ze instanceof r.P||Array.isArray(Ze),Oe=Re?Ze:[[0,0],[this.transform.width,this.transform.height]];if(O=O||(Re?{}:Ze)||{},Oe instanceof r.P||typeof Oe[0]=="number")fe=[r.P.convert(Oe)];else{const We=r.P.convert(Oe[0]),Mt=r.P.convert(Oe[1]);fe=[We,new r.P(Mt.x,We.y),Mt,new r.P(We.x,Mt.y),We]}return this.style.queryRenderedFeatures(fe,O,this.transform)}querySourceFeatures(Ze,O){return this.style.querySourceFeatures(Ze,O)}setStyle(Ze,O){return(O=r.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},O)).diff!==!1&&O.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Ze?(this._diffStyle(Ze,O),this):(this._localIdeographFontFamily=O.localIdeographFontFamily,this._updateStyle(Ze,O))}setTransformRequest(Ze){return this._requestManager.setTransformRequest(Ze),this}_getUIString(Ze){const O=this._locale[Ze];if(O==null)throw new Error(`Missing UI string '${Ze}'`);return O}_updateStyle(Ze,O){if(O.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Ze,O));const fe=this.style&&O.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Ze)),Ze?(this.style=new en(this,O||{}),this.style.setEventedParent(this,{style:this.style}),typeof Ze=="string"?this.style.loadURL(Ze,O,fe):this.style.loadJSON(Ze,O,fe),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new en(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Ze,O){if(typeof Ze=="string"){const fe=this._requestManager.transformRequest(Ze,"Style");r.h(fe,new AbortController).then(Re=>{this._updateDiff(Re.data,O)}).catch(Re=>{Re&&this.fire(new r.j(Re))})}else typeof Ze=="object"&&this._updateDiff(Ze,O)}_updateDiff(Ze,O){try{this.style.setState(Ze,O)&&this._update(!0)}catch(fe){r.w(`Unable to perform style diff: ${fe.message||fe.error||fe}.  Rebuilding the style from scratch.`),this._updateStyle(Ze,O)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():r.w("There is no style added to the map.")}addSource(Ze,O){return this._lazyInitEmptyStyle(),this.style.addSource(Ze,O),this._update(!0)}isSourceLoaded(Ze){const O=this.style&&this.style.sourceCaches[Ze];if(O!==void 0)return O.loaded();this.fire(new r.j(new Error(`There is no source with ID '${Ze}'`)))}setTerrain(Ze){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Ze){const O=this.style.sourceCaches[Ze.source];if(!O)throw new Error(`cannot load terrain, because there exists no source with ID: ${Ze.source}`);this.terrain===null&&O.reload();for(const fe in this.style._layers){const Re=this.style._layers[fe];Re.type==="hillshade"&&Re.source===Ze.source&&r.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Rl(this.painter,O,Ze),this.painter.renderToTexture=new eu(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=fe=>{fe.dataType==="style"?this.terrain.sourceCache.freeRtt():fe.dataType==="source"&&fe.tile&&(fe.sourceId!==Ze.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(fe.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new r.k("terrain",{terrain:Ze})),this}getTerrain(){var Ze,O;return(O=(Ze=this.terrain)===null||Ze===void 0?void 0:Ze.options)!==null&&O!==void 0?O:null}areTilesLoaded(){const Ze=this.style&&this.style.sourceCaches;for(const O in Ze){const fe=Ze[O]._tiles;for(const Re in fe){const Oe=fe[Re];if(Oe.state!=="loaded"&&Oe.state!=="errored")return!1}}return!0}removeSource(Ze){return this.style.removeSource(Ze),this._update(!0)}getSource(Ze){return this.style.getSource(Ze)}addImage(Ze,O,fe={}){const{pixelRatio:Re=1,sdf:Oe=!1,stretchX:We,stretchY:Mt,content:zt,textFitWidth:rr,textFitHeight:Tr}=fe;if(this._lazyInitEmptyStyle(),!(O instanceof HTMLImageElement||r.b(O))){if(O.width===void 0||O.height===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{const{width:zr,height:qr,data:pn}=O,Dn=O;return this.style.addImage(Ze,{data:new r.R({width:zr,height:qr},new Uint8Array(pn)),pixelRatio:Re,stretchX:We,stretchY:Mt,content:zt,textFitWidth:rr,textFitHeight:Tr,sdf:Oe,version:0,userImage:Dn}),Dn.onAdd&&Dn.onAdd(this,Ze),this}}{const{width:zr,height:qr,data:pn}=s.getImageData(O);this.style.addImage(Ze,{data:new r.R({width:zr,height:qr},pn),pixelRatio:Re,stretchX:We,stretchY:Mt,content:zt,textFitWidth:rr,textFitHeight:Tr,sdf:Oe,version:0})}}updateImage(Ze,O){const fe=this.style.getImage(Ze);if(!fe)return this.fire(new r.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const Re=O instanceof HTMLImageElement||r.b(O)?s.getImageData(O):O,{width:Oe,height:We,data:Mt}=Re;if(Oe===void 0||We===void 0)return this.fire(new r.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(Oe!==fe.data.width||We!==fe.data.height)return this.fire(new r.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));const zt=!(O instanceof HTMLImageElement||r.b(O));return fe.data.replace(Mt,zt),this.style.updateImage(Ze,fe),this}getImage(Ze){return this.style.getImage(Ze)}hasImage(Ze){return Ze?!!this.style.getImage(Ze):(this.fire(new r.j(new Error("Missing required image id"))),!1)}removeImage(Ze){this.style.removeImage(Ze)}loadImage(Ze){return c.getImage(this._requestManager.transformRequest(Ze,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Ze,O){return this._lazyInitEmptyStyle(),this.style.addLayer(Ze,O),this._update(!0)}moveLayer(Ze,O){return this.style.moveLayer(Ze,O),this._update(!0)}removeLayer(Ze){return this.style.removeLayer(Ze),this._update(!0)}getLayer(Ze){return this.style.getLayer(Ze)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Ze,O,fe){return this.style.setLayerZoomRange(Ze,O,fe),this._update(!0)}setFilter(Ze,O,fe={}){return this.style.setFilter(Ze,O,fe),this._update(!0)}getFilter(Ze){return this.style.getFilter(Ze)}setPaintProperty(Ze,O,fe,Re={}){return this.style.setPaintProperty(Ze,O,fe,Re),this._update(!0)}getPaintProperty(Ze,O){return this.style.getPaintProperty(Ze,O)}setLayoutProperty(Ze,O,fe,Re={}){return this.style.setLayoutProperty(Ze,O,fe,Re),this._update(!0)}getLayoutProperty(Ze,O){return this.style.getLayoutProperty(Ze,O)}setGlyphs(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Ze,O),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Ze,O,fe={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Ze,O,fe,Re=>{Re||this._update(!0)}),this}removeSprite(Ze){return this._lazyInitEmptyStyle(),this.style.removeSprite(Ze),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Ze,O,fe=>{fe||this._update(!0)}),this}setLight(Ze,O={}){return this._lazyInitEmptyStyle(),this.style.setLight(Ze,O),this._update(!0)}getLight(){return this.style.getLight()}setSky(Ze){return this._lazyInitEmptyStyle(),this.style.setSky(Ze),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Ze,O){return this.style.setFeatureState(Ze,O),this._update()}removeFeatureState(Ze,O){return this.style.removeFeatureState(Ze,O),this._update()}getFeatureState(Ze){return this.style.getFeatureState(Ze)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Ze=0,O=0;return this._container&&(Ze=this._container.clientWidth||400,O=this._container.clientHeight||300),[Ze,O]}_setupContainer(){const Ze=this._container;Ze.classList.add("maplibregl-map");const O=this._canvasContainer=o.create("div","maplibregl-canvas-container",Ze);this._interactive&&O.classList.add("maplibregl-interactive"),this._canvas=o.create("canvas","maplibregl-canvas",O),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");const fe=this._containerDimensions(),Re=this._getClampedPixelRatio(fe[0],fe[1]);this._resizeCanvas(fe[0],fe[1],Re);const Oe=this._controlContainer=o.create("div","maplibregl-control-container",Ze),We=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Mt=>{We[Mt]=o.create("div",`maplibregl-ctrl-${Mt} `,Oe)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Ze,O,fe){this._canvas.width=Math.floor(fe*Ze),this._canvas.height=Math.floor(fe*O),this._canvas.style.width=`${Ze}px`,this._canvas.style.height=`${O}px`}_setupPainter(){const Ze={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1};let O=null;this._canvas.addEventListener("webglcontextcreationerror",Re=>{O={requestedAttributes:Ze},Re&&(O.statusMessage=Re.statusMessage,O.type=Re.type)},{once:!0});const fe=this._canvas.getContext("webgl2",Ze)||this._canvas.getContext("webgl",Ze);if(!fe){const Re="Failed to initialize WebGL";throw O?(O.message=Re,new Error(JSON.stringify(O))):new Error(Re)}this.painter=new $f(fe,this.transform),u.testSupport(fe)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Ze){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Ze,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Ze){return this._update(),this._renderTaskQueue.add(Ze)}_cancelRenderFrame(Ze){this._renderTaskQueue.remove(Ze)}_render(Ze){const O=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Ze),this._removed)return;let fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;const Oe=this.transform.zoom,We=s.now();this.style.zoomHistory.update(Oe,We);const Mt=new r.z(Oe,{now:We,fadeDuration:O,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),zt=Mt.crossFadingFactor();zt===1&&zt===this._crossFadingFactor||(fe=!0,this._crossFadingFactor=zt),this.style.update(Mt)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,O,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:O,showPadding:this.showPadding}),this.fire(new r.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,r.bf.mark(r.bg.load),this.fire(new r.k("load"))),this.style&&(this.style.hasTransitions()||fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();const Re=this._sourcesDirty||this._styleDirty||this._placementDirty;return Re||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new r.k("idle")),!this._loaded||this._fullyLoaded||Re||(this._fullyLoaded=!0,r.bf.mark(r.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Ze;this._hash&&this._hash.remove();for(const fe of this._controls)fe.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),c.removeThrottleControl(this._imageQueueHandle),(Ze=this._resizeObserver)===null||Ze===void 0||Ze.disconnect();const O=this.painter.context.gl.getExtension("WEBGL_lose_context");O?.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),o.remove(this._canvasContainer),o.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),r.bf.clearMetrics(),this._removed=!0,this.fire(new r.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frameAsync(this._frameRequest).then(Ze=>{r.bf.frame(Ze),this._frameRequest=null,this._render(Ze)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Ze){this._showTileBoundaries!==Ze&&(this._showTileBoundaries=Ze,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Ze){this._showPadding!==Ze&&(this._showPadding=Ze,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Ze){this._showCollisionBoxes!==Ze&&(this._showCollisionBoxes=Ze,Ze?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Ze){this._showOverdrawInspector!==Ze&&(this._showOverdrawInspector=Ze,this._update())}get repaint(){return!!this._repaint}set repaint(Ze){this._repaint!==Ze&&(this._repaint=Ze,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Ze){this._vertices=Ze,this._update()}get version(){return Du}getCameraTargetElevation(){return this.transform.elevation}},t.MapMouseEvent=vc,t.MapTouchEvent=mh,t.MapWheelEvent=ud,t.Marker=Pc,t.NavigationControl=class{constructor(Ze){this._updateZoomButtons=()=>{const O=this._map.getZoom(),fe=O===this._map.getMaxZoom(),Re=O===this._map.getMinZoom();this._zoomInButton.disabled=fe,this._zoomOutButton.disabled=Re,this._zoomInButton.setAttribute("aria-disabled",fe.toString()),this._zoomOutButton.setAttribute("aria-disabled",Re.toString())},this._rotateCompassArrow=()=>{const O=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle*(180/Math.PI)}deg)`:`rotate(${this._map.transform.angle*(180/Math.PI)}deg)`;this._compassIcon.style.transform=O},this._setButtonTitle=(O,fe)=>{const Re=this._map._getUIString(`NavigationControl.${fe}`);O.title=Re,O.setAttribute("aria-label",Re)},this.options=r.e({},Oo,Ze),this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",O=>O.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",O=>this._map.zoomIn({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",O=>this._map.zoomOut({},{originalEvent:O})),o.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",O=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:O}):this._map.resetNorth({},{originalEvent:O})}),this._compassIcon=o.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Ze){return this._map=Ze,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Ls(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){o.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Ze,O){const fe=o.create("button",Ze,this._container);return fe.type="button",fe.addEventListener("click",O),fe}},t.Popup=class extends r.E{constructor(Ze){super(),this.remove=()=>(this._content&&o.remove(this._content),this._container&&(o.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new r.k("close"))),this),this._onMouseUp=O=>{this._update(O.point)},this._onMouseMove=O=>{this._update(O.point)},this._onDrag=O=>{this._update(O.point)},this._update=O=>{var fe;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=o.create("div","maplibregl-popup",this._map.getContainer()),this._tip=o.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(const zt of this.options.className.split(" "))this._container.classList.add(zt);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Al(this._lngLat,this._flatPos,this._map.transform):(fe=this._lngLat)===null||fe===void 0?void 0:fe.wrap(),this._trackPointer&&!O)return;const Re=this._flatPos=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&O?O:this._map.transform.locationPoint(this._lngLat));let Oe=this.options.anchor;const We=nf(this.options.offset);if(!Oe){const zt=this._container.offsetWidth,rr=this._container.offsetHeight;let Tr;Tr=Re.y+We.bottom.y<rr?["top"]:Re.y>this._map.transform.height-rr?["bottom"]:[],Re.x<zt/2?Tr.push("left"):Re.x>this._map.transform.width-zt/2&&Tr.push("right"),Oe=Tr.length===0?"bottom":Tr.join("-")}let Mt=Re.add(We[Oe]);this.options.subpixelPositioning||(Mt=Mt.round()),o.setTransform(this._container,`${Tc[Oe]} translate(${Mt.x}px,${Mt.y}px)`),Ac(this._container,Oe,"popup")},this._onClose=()=>{this.remove()},this.options=r.e(Object.create(_s),Ze)}addTo(Ze){return this._map&&this.remove(),this._map=Ze,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new r.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Ze){return this._lngLat=r.N.convert(Ze),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Ze){return this.setDOMContent(document.createTextNode(Ze))}setHTML(Ze){const O=document.createDocumentFragment(),fe=document.createElement("body");let Re;for(fe.innerHTML=Ze;Re=fe.firstChild,Re;)O.appendChild(Re);return this.setDOMContent(O)}getMaxWidth(){var Ze;return(Ze=this._container)===null||Ze===void 0?void 0:Ze.style.maxWidth}setMaxWidth(Ze){return this.options.maxWidth=Ze,this._update(),this}setDOMContent(Ze){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=o.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Ze),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Ze){return this._container&&this._container.classList.add(Ze),this}removeClassName(Ze){return this._container&&this._container.classList.remove(Ze),this}setOffset(Ze){return this.options.offset=Ze,this._update(),this}toggleClassName(Ze){if(this._container)return this._container.classList.toggle(Ze)}setSubpixelPositioning(Ze){this.options.subpixelPositioning=Ze}_createCloseButton(){this.options.closeButton&&(this._closeButton=o.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const Ze=this._container.querySelector(jf);Ze&&Ze.focus()}},t.RasterDEMTileSource=Ge,t.RasterTileSource=ze,t.ScaleControl=class{constructor(Ze){this._onMove=()=>{Bf(this._map,this._container,this.options)},this.setUnit=O=>{this.options.unit=O,Bf(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ou),Ze)}getDefaultPosition(){return"bottom-left"}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Ze.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){o.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},t.ScrollZoomHandler=$n,t.Style=en,t.TerrainControl=class{constructor(Ze){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=Ze}onAdd(Ze){return this._map=Ze,this._container=o.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=o.create("button","maplibregl-ctrl-terrain",this._container),o.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(){o.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},t.TwoFingersTouchPitchHandler=ed,t.TwoFingersTouchRotateHandler=Qf,t.TwoFingersTouchZoomHandler=kc,t.TwoFingersTouchZoomRotateHandler=ci,t.VectorTileSource=Le,t.VideoSource=gt,t.addSourceType=(Ze,O)=>r._(void 0,void 0,void 0,function*(){if(Fe(Ze))throw new Error(`A source type called "${Ze}" already exists.`);((fe,Re)=>{lt[fe]=Re})(Ze,O)}),t.clearPrewarmedResources=function(){const Ze=me;Ze&&(Ze.isPreloaded()&&Ze.numActive()===1?(Ze.release(le),me=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},t.getMaxParallelImageRequests=function(){return r.a.MAX_PARALLEL_IMAGE_REQUESTS},t.getRTLTextPluginStatus=function(){return mt().getRTLTextPluginStatus()},t.getVersion=function(){return Gc},t.getWorkerCount=function(){return ye.workerCount},t.getWorkerUrl=function(){return r.a.WORKER_URL},t.importScriptInWorkers=function(Ze){return ee().broadcast("IS",Ze)},t.prewarm=function(){ie().acquire(le)},t.setMaxParallelImageRequests=function(Ze){r.a.MAX_PARALLEL_IMAGE_REQUESTS=Ze},t.setRTLTextPlugin=function(Ze,O){return mt().setRTLTextPlugin(Ze,O)},t.setWorkerCount=function(Ze){ye.workerCount=Ze},t.setWorkerUrl=function(Ze){r.a.WORKER_URL=Ze}});var P=v;return P})}}),kte=Ne({"src/plots/map/layers.js"(te,Z){var v=In(),w=uc().sanitizeHTML,C=fF(),P=Fb();function t(s,o){this.subplot=s,this.uid=s.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=P.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var r=t.prototype;r.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=a(o)},r.needsNewImage=function(s){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&s.sourcetype==="image"&&(this.source!==s.source||JSON.stringify(this.coordinates)!==JSON.stringify(s.coordinates))},r.needsNewSource=function(s){return this.sourceType!==s.sourcetype||JSON.stringify(this.source)!==JSON.stringify(s.source)||this.layerType!==s.type},r.needsNewLayer=function(s){return this.layerType!==s.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},r.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},r.updateImage=function(s){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:s.source,coordinates:s.coordinates});var u=this.findFollowingMapLayerId(this.lookupBelow());u!==null&&this.subplot.map.moveLayer(this.idLayer,u)},r.updateSource=function(s){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=s.sourcetype,this.source=s.source,!!a(s)){var u=i(s);o.addSource(this.idSource,u)}},r.findFollowingMapLayerId=function(s){if(s==="traces")for(var o=this.subplot.getMapLayers(),u=0;u<o.length;u++){var d=o[u].id;if(typeof d=="string"&&d.indexOf(P.traceLayerPrefix)===0){s=d;break}}return s},r.updateLayer=function(s){var o=this.subplot,u=l(s),d=this.lookupBelow(),h=this.findFollowingMapLayerId(d);this.removeLayer(),a(s)&&o.addLayer({id:this.idLayer,source:this.idSource,"source-layer":s.sourcelayer||"",type:s.type,minzoom:s.minzoom,maxzoom:s.maxzoom,layout:u.layout,paint:u.paint},h),this.layerType=s.type,this.below=d},r.updateStyle=function(s){if(a(s)){var o=l(s);this.subplot.setOptions(this.idLayer,"setLayoutProperty",o.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",o.paint)}},r.removeLayer=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer)},r.dispose=function(){var s=this.subplot.map;s.getLayer(this.idLayer)&&s.removeLayer(this.idLayer),s.getSource(this.idSource)&&s.removeSource(this.idSource)};function a(s){if(!s.visible)return!1;var o=s.source;if(Array.isArray(o)&&o.length>0){for(var u=0;u<o.length;u++)if(typeof o[u]!="string"||o[u].length===0)return!1;return!0}return v.isPlainObject(o)||typeof o=="string"&&o.length>0}function l(s){var o={},u={};switch(s.type){case"circle":v.extendFlat(u,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":v.extendFlat(u,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":v.extendFlat(u,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var d=s.symbol,h=C(d.textposition,d.iconsize);v.extendFlat(o,{"icon-image":d.icon+"-15","icon-size":d.iconsize/10,"text-field":d.text,"text-size":d.textfont.size,"text-anchor":h.anchor,"text-offset":h.offset,"symbol-placement":d.placement}),v.extendFlat(u,{"icon-color":s.color,"text-color":d.textfont.color,"text-opacity":s.opacity});break;case"raster":v.extendFlat(u,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:o,paint:u}}function i(s){var o=s.sourcetype,u=s.source,d={type:o},h;return o==="geojson"?h="data":o==="vector"?h=typeof u=="string"?"url":"tiles":o==="raster"?(h="tiles",d.tileSize=256):o==="image"&&(h="url",d.coordinates=s.coordinates),d[h]=u,s.sourceattribution&&(d.attribution=w(s.sourceattribution)),d}Z.exports=function(o,u,d){var h=new t(o,u);return h.update(d),h}}}),Pte=Ne({"src/plots/map/map.js"(te,Z){var v=Cte(),w=In(),C=Db(),P=Xo(),t=Os(),r=Bv(),a=nh(),l=Pm(),i=l.drawMode,s=l.selectMode,o=fh().prepSelect,u=fh().clearOutline,d=fh().clearSelectionsCache,h=fh().selectOnClick,y=Fb(),m=kte();function E(b,A){this.id=A,this.gd=b;var g=b._fullLayout,f=b._context;this.container=g._glcontainer.node(),this.isStatic=f.staticPlot,this.uid=g._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(g),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var c=E.prototype;c.plot=function(b,A,g){var f=this,p;f.map?p=new Promise(function(x,N){f.updateMap(b,A,x,N)}):p=new Promise(function(x,N){f.createMap(b,A,x,N)}),g.push(p)},c.createMap=function(b,A,g,f){var p=this,x=A[p.id],N=p.styleObj=T(x.style),D=x.bounds,B=D?[[D.west,D.south],[D.east,D.north]]:null,U=p.map=new v.Map({container:p.div,style:N.style,center:k(x.center),zoom:x.zoom,bearing:x.bearing,pitch:x.pitch,maxBounds:B,interactive:!p.isStatic,preserveDrawingBuffer:p.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new v.AttributionControl({compact:!0})),V={};U.on("styleimagemissing",function(z){var H=z.id;if(!V[H]&&H.includes("-15")){V[H]=!0;var G=new Image(15,15);G.onload=function(){U.addImage(H,G)},G.crossOrigin="Anonymous",G.src="https://unpkg.com/maki@2.1.0/icons/"+H+".svg"}}),U.setTransformRequest(function(z){return z=z.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),z=z.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),z=z.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:z}}),U._canvas.style.left="0px",U._canvas.style.top="0px",p.rejectOnError(f),p.isStatic||p.initFx(b,A);var q=[];q.push(new Promise(function(z){U.once("load",z)})),q=q.concat(C.fetchTraceGeoData(b)),Promise.all(q).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(g)}).catch(f)},c.updateMap=function(b,A,g,f){var p=this,x=p.map,N=A[this.id];p.rejectOnError(f);var D=[],B=T(N.style);JSON.stringify(p.styleObj)!==JSON.stringify(B)&&(p.styleObj=B,x.setStyle(B.style),p.traceHash={},D.push(new Promise(function(U){x.once("styledata",U)}))),D=D.concat(C.fetchTraceGeoData(b)),Promise.all(D).then(function(){p.fillBelowLookup(b,A),p.updateData(b),p.updateLayout(A),p.resolveOnRender(g)}).catch(f)},c.fillBelowLookup=function(b,A){var g=A[this.id],f=g.layers,p,x,N=this.belowLookup={},D=!1;for(p=0;p<b.length;p++){var B=b[p][0].trace,U=B._module;typeof B.below=="string"?x=B.below:U.getBelow&&(x=U.getBelow(B,this)),x===""&&(D=!0),N["trace-"+B.uid]=x||""}for(p=0;p<f.length;p++){var V=f[p];typeof V.below=="string"?x=V.below:D?x="traces":x="",N["layout-"+p]=x}var q={},z,H;for(z in N)x=N[z],q[x]?q[x].push(z):q[x]=[z];for(x in q){var G=q[x];if(G.length>1)for(p=0;p<G.length;p++)z=G[p],z.indexOf("trace-")===0?(H=z.split("trace-")[1],this.traceHash[H]&&(this.traceHash[H].below=null)):z.indexOf("layout-")===0&&(H=z.split("layout-")[1],this.layerList[H]&&(this.layerList[H].below=null))}};var _={choroplethmap:0,densitymap:1,scattermap:2};c.updateData=function(b){var A=this.traceHash,g,f,p,x,N=b.slice().sort(function(q,z){return _[q[0].trace.type]-_[z[0].trace.type]});for(p=0;p<N.length;p++){var D=N[p];f=D[0].trace,g=A[f.uid];var B=!1;g&&(g.type===f.type?(g.update(D),B=!0):g.dispose()),!B&&f._module&&(A[f.uid]=f._module.plot(this,D))}var U=Object.keys(A);e:for(p=0;p<U.length;p++){var V=U[p];for(x=0;x<b.length;x++)if(f=b[x][0].trace,V===f.uid)continue e;g=A[V],g.dispose(),delete A[V]}},c.updateLayout=function(b){var A=this.map,g=b[this.id];!this.dragging&&!this.wheeling&&(A.setCenter(k(g.center)),A.setZoom(g.zoom),A.setBearing(g.bearing),A.setPitch(g.pitch)),this.updateLayers(b),this.updateFramework(b),this.updateFx(b),this.map.resize(),this.gd._context._scrollZoom.map?A.scrollZoom.enable():A.scrollZoom.disable()},c.resolveOnRender=function(b){var A=this.map;A.on("render",function g(){A.loaded()&&(A.off("render",g),setTimeout(b,10))})},c.rejectOnError=function(b){var A=this.map;function g(){b(new Error(y.mapOnErrorMsg))}A.once("error",g),A.once("style.error",g),A.once("source.error",g),A.once("tile.error",g),A.once("layer.error",g)},c.createFramework=function(b){var A=this,g=A.div=document.createElement("div");g.id=A.uid,g.style.position="absolute",A.container.appendChild(g),A.xaxis={_id:"x",c2p:function(f){return A.project(f).x}},A.yaxis={_id:"y",c2p:function(f){return A.project(f).y}},A.updateFramework(b),A.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(A.mockAxis,b)},c.initFx=function(b,A){var g=this,f=g.gd,p=g.map;p.on("moveend",function(D){if(g.map){var B=f._fullLayout;if(D.originalEvent||g.wheeling){var U=B[g.id];P.call("_storeDirectGUIEdit",f.layout,B._preGUI,g.getViewEdits(U));var V=g.getView();U._input.center=U.center=V.center,U._input.zoom=U.zoom=V.zoom,U._input.bearing=U.bearing=V.bearing,U._input.pitch=U.pitch=V.pitch,f.emit("plotly_relayout",g.getViewEditsWithDerived(V))}D.originalEvent&&D.originalEvent.type==="mouseup"?g.dragging=!1:g.wheeling&&(g.wheeling=!1),B&&B._rehover&&B._rehover()}}),p.on("wheel",function(){g.wheeling=!0}),p.on("mousemove",function(D){var B=g.div.getBoundingClientRect(),U=[D.originalEvent.offsetX,D.originalEvent.offsetY];D.target.getBoundingClientRect=function(){return B},g.xaxis.p2c=function(){return p.unproject(U).lng},g.yaxis.p2c=function(){return p.unproject(U).lat},f._fullLayout._rehover=function(){f._fullLayout._hoversubplot===g.id&&f._fullLayout[g.id]&&a.hover(f,D,g.id)},a.hover(f,D,g.id),f._fullLayout._hoversubplot=g.id});function x(){a.loneUnhover(A._hoverlayer)}p.on("dragstart",function(){g.dragging=!0,x()}),p.on("zoomstart",x),p.on("mouseout",function(){f._fullLayout._hoversubplot=null});function N(){var D=g.getView();f.emit("plotly_relayouting",g.getViewEditsWithDerived(D))}p.on("drag",N),p.on("zoom",N),p.on("dblclick",function(){var D=f._fullLayout[g.id];P.call("_storeDirectGUIEdit",f.layout,f._fullLayout._preGUI,g.getViewEdits(D));var B=g.viewInitial;p.setCenter(k(B.center)),p.setZoom(B.zoom),p.setBearing(B.bearing),p.setPitch(B.pitch);var U=g.getView();D._input.center=D.center=U.center,D._input.zoom=D.zoom=U.zoom,D._input.bearing=D.bearing=U.bearing,D._input.pitch=D.pitch=U.pitch,f.emit("plotly_doubleclick",null),f.emit("plotly_relayout",g.getViewEditsWithDerived(U))}),g.clearOutline=function(){d(g.dragOptions),u(g.dragOptions.gd)},g.onClickInPanFn=function(D){return function(B){var U=f._fullLayout.clickmode;U.indexOf("select")>-1&&h(B.originalEvent,f,[g.xaxis],[g.yaxis],g.id,D),U.indexOf("event")>-1&&a.click(f,B.originalEvent)}}},c.updateFx=function(b){var A=this,g=A.map,f=A.gd;if(A.isStatic)return;function p(B){var U=A.map.unproject(B);return[U.lng,U.lat]}var x=b.dragmode,N;N=function(B,U){if(U.isRect){var V=B.range={};V[A.id]=[p([U.xmin,U.ymin]),p([U.xmax,U.ymax])]}else{var q=B.lassoPoints={};q[A.id]=U.map(p)}};var D=A.dragOptions;A.dragOptions=w.extendDeep(D||{},{dragmode:b.dragmode,element:A.div,gd:f,plotinfo:{id:A.id,domain:b[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis,fillRangeItems:N},xaxes:[A.xaxis],yaxes:[A.yaxis],subplot:A.id}),g.off("click",A.onClickInPanHandler),s(x)||i(x)?(g.dragPan.disable(),g.on("zoomstart",A.clearOutline),A.dragOptions.prepFn=function(B,U,V){o(B,U,V,A.dragOptions,x)},r.init(A.dragOptions)):(g.dragPan.enable(),g.off("zoomstart",A.clearOutline),A.div.onmousedown=null,A.div.ontouchstart=null,A.div.removeEventListener("touchstart",A.div._ontouchstart),A.onClickInPanHandler=A.onClickInPanFn(A.dragOptions),g.on("click",A.onClickInPanHandler))},c.updateFramework=function(b){var A=b[this.id].domain,g=b._size,f=this.div.style;f.width=g.w*(A.x[1]-A.x[0])+"px",f.height=g.h*(A.y[1]-A.y[0])+"px",f.left=g.l+A.x[0]*g.w+"px",f.top=g.t+(1-A.y[1])*g.h+"px",this.xaxis._offset=g.l+A.x[0]*g.w,this.xaxis._length=g.w*(A.x[1]-A.x[0]),this.yaxis._offset=g.t+(1-A.y[1])*g.h,this.yaxis._length=g.h*(A.y[1]-A.y[0])},c.updateLayers=function(b){var A=b[this.id],g=A.layers,f=this.layerList,p;if(g.length!==f.length){for(p=0;p<f.length;p++)f[p].dispose();for(f=this.layerList=[],p=0;p<g.length;p++)f.push(m(this,p,g[p]))}else for(p=0;p<g.length;p++)f[p].update(g[p])},c.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},c.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},c.setOptions=function(b,A,g){for(var f in g)this.map[A](b,f,g[f])},c.getMapLayers=function(){return this.map.getStyle().layers},c.addLayer=function(b,A){var g=this.map;if(typeof A=="string"){if(A===""){g.addLayer(b,A);return}for(var f=this.getMapLayers(),p=0;p<f.length;p++)if(A===f[p].id){g.addLayer(b,A);return}w.warn(["Trying to add layer with *below* value",A,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}g.addLayer(b)},c.project=function(b){return this.map.project(new v.LngLat(b[0],b[1]))},c.getView=function(){var b=this.map,A=b.getCenter(),g=A.lng,f=A.lat,p={lon:g,lat:f},x=b.getCanvas(),N=parseInt(x.style.width),D=parseInt(x.style.height);return{center:p,zoom:b.getZoom(),bearing:b.getBearing(),pitch:b.getPitch(),_derived:{coordinates:[b.unproject([0,0]).toArray(),b.unproject([N,0]).toArray(),b.unproject([N,D]).toArray(),b.unproject([0,D]).toArray()]}}},c.getViewEdits=function(b){for(var A=this.id,g=["center","zoom","bearing","pitch"],f={},p=0;p<g.length;p++){var x=g[p];f[A+"."+x]=b[x]}return f},c.getViewEditsWithDerived=function(b){var A=this.id,g=this.getViewEdits(b);return g[A+"._derived"]=b._derived,g};function T(b){var A={};return w.isPlainObject(b)?(A.id=b.id,A.style=b):typeof b=="string"?(A.id=b,y.stylesMap[b]?A.style=y.stylesMap[b]:A.style=b):(A.id=y.styleValueDflt,A.style=M(y.styleValueDflt)),A.transition={duration:0,delay:0},A}function M(b){return y.styleUrlPrefix+b+"-"+y.styleUrlSuffix}function k(b){return[b.lon,b.lat]}Z.exports=E}}),Lte=Ne({"src/plots/map/layout_defaults.js"(te,Z){var v=In(),w=X0(),C=zd(),P=m6();Z.exports=function(l,i,s){w(l,i,s,{type:"map",attributes:P,handleDefaults:t,partition:"y"})};function t(a,l,i){i("style"),i("center.lon"),i("center.lat"),i("zoom"),i("bearing"),i("pitch");var s=i("bounds.west"),o=i("bounds.east"),u=i("bounds.south"),d=i("bounds.north");(s===void 0||o===void 0||u===void 0||d===void 0)&&delete l.bounds,C(a,l,{name:"layers",handleItemDefaults:r}),l._input=a}function r(a,l){function i(y,m){return v.coerce(a,l,P.layers,y,m)}var s=i("visible");if(s){var o=i("sourcetype"),u=o==="raster"||o==="image";i("source"),i("sourceattribution"),o==="vector"&&i("sourcelayer"),o==="image"&&i("coordinates");var d;u&&(d="raster");var h=i("type",d);u&&h!=="raster"&&(h=l.type="raster",v.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),h==="circle"&&i("circle.radius"),h==="line"&&(i("line.width"),i("line.dash")),h==="fill"&&i("fill.outlinecolor"),h==="symbol"&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),v.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}}}),UR=Ne({"src/plots/map/index.js"(te){var Z=In(),v=Z.strTranslate,w=Z.strScale,C=iv().getSubplotCalcData,P=cp(),t=xn(),r=zs(),a=uc(),l=Pte(),i="map";te.name=i,te.attr="subplot",te.idRoot=i,te.idRegex=te.attrRegex=Z.counterRegex(i),te.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},te.layoutAttributes=m6(),te.supplyLayoutDefaults=Lte(),te.plot=function(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[i],y=0;y<h.length;y++){var m=h[y],E=C(d,i,m),c=u[m],_=c._subplot;_||(_=new l(o,m),u[m]._subplot=_),_.viewInitial||(_.viewInitial={center:Z.extendFlat({},c.center),zoom:c.zoom,bearing:c.bearing,pitch:c.pitch}),_.plot(E,u,o._promises)}},te.clean=function(s,o,u,d){for(var h=d._subplots[i]||[],y=0;y<h.length;y++){var m=h[y];!o[m]&&d[m]._subplot&&d[m]._subplot.destroy()}},te.toSVG=function(s){for(var o=s._fullLayout,u=o._subplots[i],d=o._size,h=0;h<u.length;h++){var y=o[u[h]],m=y.domain,E=y._subplot,c=E.toImage("png"),_=o._glimages.append("svg:image");_.attr({xmlns:P.svg,"xlink:href":c,x:d.l+d.w*m.x[0],y:d.t+d.h*(1-m.y[1]),width:d.w*(m.x[1]-m.x[0]),height:d.h*(m.y[1]-m.y[0]),preserveAspectRatio:"none"});var T=t.select(y._subplot.div),M=T.select(".maplibregl-ctrl-attrib").text().replace("Improve this map",""),k=o._glimages.append("g"),b=k.append("text");b.text(M).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":M});var A=r.bBox(b.node()),g=d.w*(m.x[1]-m.x[0]);if(A.width>g/2){var f=M.split("|").join("<br>");b.text(f).attr("data-unformatted",f).call(a.convertToTspans,s),A=r.bBox(b.node())}b.attr("transform",v(-3,-A.height+8)),k.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var p=1;A.width+6>g&&(p=g/(A.width+6));var x=[d.l+d.w*m.x[1],d.t+d.h*(1-m.y[0])];k.attr("transform",v(x[0],x[1])+w(p))}},te.updateFx=function(s){for(var o=s._fullLayout,u=o._subplots[i],d=0;d<u.length;d++){var h=o[u[d]]._subplot;h.updateFx(o)}}}}),Rte=Ne({"src/traces/scattermap/index.js"(te,Z){Z.exports={attributes:BR(),supplyDefaults:Tte(),colorbar:ah(),formatLabels:cF(),calc:mR(),plot:Ste(),hoverPoints:jR().hoverPoints,eventData:Ete(),selectPoints:Mte(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.update(w)}},moduleType:"trace",name:"scattermap",basePlotModule:UR(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}}}),Ite=Ne({"lib/scattermap.js"(te,Z){Z.exports=Rte()}}),hF=Ne({"src/traces/choroplethmap/attributes.js"(te,Z){var v=KS(),w=Vu(),{hovertemplateAttrs:C,templatefallbackAttrs:P}=Il(),t=ns(),r=co().extendFlat;Z.exports=r({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:r({},v.featureidkey,{}),below:{valType:"string",editType:"plot"},text:v.text,hovertext:v.hovertext,marker:{line:{color:r({},v.marker.line.color,{editType:"plot"}),width:r({},v.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:r({},v.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:r({},v.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:r({},v.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:v.hoverinfo,hovertemplate:C({},{keys:["properties"]}),hovertemplatefallback:P(),showlegend:r({},t.showlegend,{dflt:!1})},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),Dte=Ne({"src/traces/choroplethmap/defaults.js"(te,Z){var v=In(),w=Ph(),C=hF();Z.exports=function(t,r,a,l){function i(h,y){return v.coerce(t,r,C,h,y)}var s=i("locations"),o=i("z"),u=i("geojson");if(!v.isArrayOrTypedArray(s)||!s.length||!v.isArrayOrTypedArray(o)||!o.length||!(typeof u=="string"&&u!==""||v.isPlainObject(u))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(s.length,o.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var d=i("marker.line.width");d&&i("marker.line.color"),i("marker.opacity"),w(t,r,l,i,{prefix:"",cLetter:"z"}),v.coerceSelectionMarkerOpacity(r,i)}}}),dF=Ne({"src/traces/choroplethmap/convert.js"(te,Z){var v=la(),w=In(),C=Dc(),P=zs(),t=Ib().makeBlank,r=Db();function a(i){var s=i[0].trace,o=s.visible===!0&&s._length!==0,u={layout:{visibility:"none"},paint:{}},d={layout:{visibility:"none"},paint:{}},h=s._opts={fill:u,line:d,geojson:t()};if(!o)return h;var y=r.extractTraceFeature(i);if(!y)return h;var m=C.makeColorScaleFuncFromTrace(s),E=s.marker,c=E.line||{},_;w.isArrayOrTypedArray(E.opacity)&&(_=function(p){var x=p.mo;return v(x)?+w.constrain(x,0,1):0});var T;w.isArrayOrTypedArray(c.color)&&(T=function(p){return p.mlc});var M;w.isArrayOrTypedArray(c.width)&&(M=function(p){return p.mlw});for(var k=0;k<i.length;k++){var b=i[k],A=b.fOut;if(A){var g=A.properties;g.fc=m(b.z),_&&(g.mo=_(b)),T&&(g.mlc=T(b)),M&&(g.mlw=M(b)),b.ct=g.ct,b._polygons=r.feature2polygons(A)}}var f=_?{type:"identity",property:"mo"}:E.opacity;return w.extendFlat(u.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":f}),w.extendFlat(d.paint,{"line-color":T?{type:"identity",property:"mlc"}:c.color,"line-width":M?{type:"identity",property:"mlw"}:c.width,"line-opacity":f}),u.layout.visibility="visible",d.layout.visibility="visible",h.geojson={type:"FeatureCollection",features:y},l(i),h}function l(i){var s=i[0].trace,o=s._opts,u;if(s.selectedpoints){for(var d=P.makeSelectedPointStyleFns(s),h=0;h<i.length;h++){var y=i[h];y.fOut&&(y.fOut.properties.mo2=d.selectedOpacityFn(y))}u={type:"identity",property:"mo2"}}else u=w.isArrayOrTypedArray(s.marker.opacity)?{type:"identity",property:"mo"}:s.marker.opacity;return w.extendFlat(o.fill.paint,{"fill-opacity":u}),w.extendFlat(o.line.paint,{"line-opacity":u}),o}Z.exports={convert:a,convertOnSelect:l}}}),Ote=Ne({"src/traces/choroplethmap/plot.js"(te,Z){var v=dF().convert,w=dF().convertOnSelect,C=Fb().traceLayerPrefix;function P(r,a){this.type="choroplethmap",this.subplot=r,this.uid=a,this.sourceId="source-"+a,this.layerList=[["fill",C+a+"-fill"],["line",C+a+"-line"]],this.below=null}var t=P.prototype;t.update=function(r){this._update(v(r)),r[0].trace._glTrace=this},t.updateOnSelect=function(r){this._update(w(r))},t._update=function(r){var a=this.subplot,l=this.layerList,i=a.belowLookup["trace-"+this.uid];a.map.getSource(this.sourceId).setData(r.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(r,i),this.below=i);for(var s=0;s<l.length;s++){var o=l[s],u=o[0],d=o[1],h=r[u];a.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&a.setOptions(d,"setPaintProperty",h.paint)}},t._addLayers=function(r,a){for(var l=this.subplot,i=this.layerList,s=this.sourceId,o=0;o<i.length;o++){var u=i[o],d=u[0],h=r[d];l.addLayer({type:d,id:u[1],source:s,layout:h.layout,paint:h.paint},a)}},t._removeLayers=function(){for(var r=this.subplot.map,a=this.layerList,l=a.length-1;l>=0;l--)r.removeLayer(a[l][1])},t.dispose=function(){var r=this.subplot.map;this._removeLayers(),r.removeSource(this.sourceId)},Z.exports=function(a,l){var i=l[0].trace,s=new P(a,i.uid),o=s.sourceId,u=v(l),d=s.below=a.belowLookup["trace-"+i.uid];return a.map.addSource(o,{type:"geojson",data:u.geojson}),s._addLayers(u,d),l[0].trace._glTrace=s,s}}}),zte=Ne({"src/traces/choroplethmap/index.js"(te,Z){Z.exports={attributes:hF(),supplyDefaults:Dte(),colorbar:Fy(),calc:xR(),plot:Ote(),hoverPoints:wR(),eventData:TR(),selectPoints:AR(),styleOnSelect:function(v,w){if(w){var C=w[0].trace;C._glTrace.updateOnSelect(w)}},getBelow:function(v,w){for(var C=w.getMapLayers(),P=C.length-2;P>=0;P--){var t=C[P].id;if(typeof t=="string"&&t.indexOf("water")===0){for(var r=P+1;r<C.length;r++)if(t=C[r].id,typeof t=="string"&&t.indexOf("plotly-")===-1)return t}}},moduleType:"trace",name:"choroplethmap",basePlotModule:UR(),categories:["map","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_map"}}}}),Nte=Ne({"lib/choroplethmap.js"(te,Z){Z.exports=zte()}}),vF=Ne({"src/traces/densitymap/attributes.js"(te,Z){var v=Vu(),{hovertemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=ns(),t=BR(),r=co().extendFlat;Z.exports=r({lon:t.lon,lat:t.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:t.text,hovertext:t.hovertext,hoverinfo:r({},P.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:w(),hovertemplatefallback:C(),showlegend:r({},P.showlegend,{dflt:!1})},v("",{cLetter:"z",editTypeOverride:"calc"}))}}),Fte=Ne({"src/traces/densitymap/defaults.js"(te,Z){var v=In(),w=Ph(),C=vF();Z.exports=function(t,r,a,l){function i(d,h){return v.coerce(t,r,C,d,h)}var s=i("lon")||[],o=i("lat")||[],u=Math.min(s.length,o.length);if(!u){r.visible=!1;return}r._length=u,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),w(t,r,l,i,{prefix:"",cLetter:"z"})}}}),Bte=Ne({"src/traces/densitymap/calc.js"(te,Z){var v=la(),w=In().isArrayOrTypedArray,C=ja().BADNUM,P=Nd(),t=In()._;Z.exports=function(a,l){for(var i=l._length,s=new Array(i),o=l.z,u=w(o)&&o.length,d=0;d<i;d++){var h=s[d]={},y=l.lon[d],m=l.lat[d];if(h.lonlat=v(y)&&v(m)?[+y,+m]:[C,C],u){var E=o[d];h.z=v(E)?E:C}}return P(a,l,{vals:u?o:[0,1],containerStr:"",cLetter:"z"}),i&&(s[0].t={labels:{lat:t(a,"lat:")+" ",lon:t(a,"lon:")+" "}}),s}}}),jte=Ne({"src/traces/densitymap/convert.js"(te,Z){var v=la(),w=In(),C=io(),P=Dc(),t=ja().BADNUM,r=Ib().makeBlank;Z.exports=function(l){var i=l[0].trace,s=i.visible===!0&&i._length!==0,o={layout:{visibility:"none"},paint:{}},u=i._opts={heatmap:o,geojson:r()};if(!s)return u;var d=[],h,y=i.z,m=i.radius,E=w.isArrayOrTypedArray(y)&&y.length,c=w.isArrayOrTypedArray(m);for(h=0;h<l.length;h++){var _=l[h],T=_.lonlat;if(T[0]!==t){var M={};if(E){var k=_.z;M.z=k!==t?k:0}c&&(M.r=v(m[h])&&m[h]>0?+m[h]:0),d.push({type:"Feature",geometry:{type:"Point",coordinates:T},properties:M})}}var b=P.extractOpts(i),A=b.reversescale?P.flipScale(b.colorscale):b.colorscale,g=A[0][1],f=C.opacity(g)<1?g:C.addOpacity(g,0),p=["interpolate",["linear"],["heatmap-density"],0,f];for(h=1;h<A.length;h++)p.push(A[h][0],A[h][1]);var x=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return w.extendFlat(u.heatmap.paint,{"heatmap-weight":E?x:1/(b.max-b.min),"heatmap-color":p,"heatmap-radius":c?{type:"identity",property:"r"}:i.radius,"heatmap-opacity":i.opacity}),u.geojson={type:"FeatureCollection",features:d},u.heatmap.layout.visibility="visible",u}}}),Ute=Ne({"src/traces/densitymap/plot.js"(te,Z){var v=jte(),w=Fb().traceLayerPrefix;function C(t,r){this.type="densitymap",this.subplot=t,this.uid=r,this.sourceId="source-"+r,this.layerList=[["heatmap",w+r+"-heatmap"]],this.below=null}var P=C.prototype;P.update=function(t){var r=this.subplot,a=this.layerList,l=v(t),i=r.belowLookup["trace-"+this.uid];r.map.getSource(this.sourceId).setData(l.geojson),i!==this.below&&(this._removeLayers(),this._addLayers(l,i),this.below=i);for(var s=0;s<a.length;s++){var o=a[s],u=o[0],d=o[1],h=l[u];r.setOptions(d,"setLayoutProperty",h.layout),h.layout.visibility==="visible"&&r.setOptions(d,"setPaintProperty",h.paint)}},P._addLayers=function(t,r){for(var a=this.subplot,l=this.layerList,i=this.sourceId,s=0;s<l.length;s++){var o=l[s],u=o[0],d=t[u];a.addLayer({type:u,id:o[1],source:i,layout:d.layout,paint:d.paint},r)}},P._removeLayers=function(){for(var t=this.subplot.map,r=this.layerList,a=r.length-1;a>=0;a--)t.removeLayer(r[a][1])},P.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},Z.exports=function(r,a){var l=a[0].trace,i=new C(r,l.uid),s=i.sourceId,o=v(a),u=i.below=r.belowLookup["trace-"+l.uid];return r.map.addSource(s,{type:"geojson",data:o.geojson}),i._addLayers(o,u),i}}}),qte=Ne({"src/traces/densitymap/hover.js"(te,Z){var v=Os(),w=jR().hoverPoints,C=jR().getExtraText;Z.exports=function(t,r,a){var l=w(t,r,a);if(l){var i=l[0],s=i.cd,o=s[0].trace,u=s[i.index];if(delete i.color,"z"in u){var d=i.subplot.mockAxis;i.z=u.z,i.zLabel=v.tickText(d,d.c2l(u.z),"hover").text}return i.extraText=C(o,u,s[0].t.labels),[i]}}}}),Vte=Ne({"src/traces/densitymap/event_data.js"(te,Z){Z.exports=function(w,C){return w.lon=C.lon,w.lat=C.lat,w.z=C.z,w}}}),Hte=Ne({"src/traces/densitymap/index.js"(te,Z){Z.exports={attributes:vF(),supplyDefaults:Fte(),colorbar:Fy(),formatLabels:cF(),calc:Bte(),plot:Ute(),hoverPoints:qte(),eventData:Vte(),getBelow:function(v,w){for(var C=w.getMapLayers(),P=0;P<C.length;P++){var t=C[P],r=t.id;if(t.type==="symbol"&&typeof r=="string"&&r.indexOf("plotly-")===-1)return r}},moduleType:"trace",name:"densitymap",basePlotModule:UR(),categories:["map","gl","showLegend"],meta:{hr_name:"density_map"}}}}),Gte=Ne({"lib/densitymap.js"(te,Z){Z.exports=Hte()}}),pF=Ne({"src/traces/sankey/attributes.js"(te,Z){var v=$o(),w=ns(),C=lu(),P=Ml(),t=Oc().attributes,{hovertemplateAttrs:r,templatefallbackAttrs:a}=Il(),l=Vu(),i=Tu().templatedArray,s=bc().descriptionOnlyNumbers,o=co().extendFlat,u=Kc().overrideAll;Z.exports=u({hoverinfo:o({},w.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:P.hoverlabel,domain:t({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:s("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:v({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:C.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:P.hoverlabel,hovertemplate:r({},{keys:["value","label"]}),hovertemplatefallback:a(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"}},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:C.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:P.hoverlabel,hovertemplate:r({},{keys:["value","label"]}),hovertemplatefallback:a(),colorscales:i("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:o(l().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")}}),Xte=Ne({"src/traces/sankey/defaults.js"(te,Z){var v=In(),w=pF(),C=io(),P=Ro(),t=Oc().defaults,r=Iw(),a=Tu(),l=zd();Z.exports=function(o,u,d,h){function y(D,B){return v.coerce(o,u,w,D,B)}var m=v.extendDeep(h.hoverlabel,o.hoverlabel),E=o.node,c=a.newContainer(u,"node");function _(D,B){return v.coerce(E,c,w.node,D,B)}_("label"),_("groups"),_("x"),_("y"),_("pad"),_("thickness"),_("line.color"),_("line.width"),_("hoverinfo",o.hoverinfo),r(E,c,_,m),_("hovertemplate"),_("align");var T=h.colorway,M=function(D){return T[D%T.length]};_("color",c.label.map(function(D,B){return C.addOpacity(M(B),.8)})),_("customdata");var k=o.link||{},b=a.newContainer(u,"link");function A(D,B){return v.coerce(k,b,w.link,D,B)}A("label"),A("arrowlen"),A("source"),A("target"),A("value"),A("line.color"),A("line.width"),A("hoverinfo",o.hoverinfo),r(k,b,A,m),A("hovertemplate");var g=P(h.paper_bgcolor).getLuminance()<.333,f=g?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",p=A("color",f);function x(D){var B=P(D);if(!B.isValid())return D;var U=B.getAlpha();return U<=.8?B.setAlpha(U+.2):B=g?B.brighten():B.darken(),B.toRgbString()}A("hovercolor",Array.isArray(p)?p.map(x):x(p)),A("customdata"),l(k,b,{name:"colorscales",handleItemDefaults:i}),t(u,h,y),y("orientation"),y("valueformat"),y("valuesuffix");var N;c.x.length&&c.y.length&&(N="freeform"),y("arrangement",N),v.coerceFont(y,"textfont",h.font,{autoShadowDflt:!0}),u._length=null};function i(s,o){function u(d,h){return v.coerce(s,o,w.link.colorscales,d,h)}u("label"),u("cmin"),u("cmax"),u("colorscale")}}}),mF=Ne({"node_modules/strongly-connected-components/scc.js"(te,Z){Z.exports=v;function v(w){for(var C=w.length,P=new Array(C),t=new Array(C),r=new Array(C),a=new Array(C),l=new Array(C),i=new Array(C),s=0;s<C;++s)P[s]=-1,t[s]=0,r[s]=!1,a[s]=0,l[s]=-1,i[s]=[];var o=0,u=[],d=[];function h(c){var _=[c],T=[c];for(P[c]=t[c]=o,r[c]=!0,o+=1;T.length>0;){c=T[T.length-1];var M=w[c];if(a[c]<M.length){for(var k=a[c];k<M.length;++k){var b=M[k];if(P[b]<0){P[b]=t[b]=o,r[b]=!0,o+=1,_.push(b),T.push(b);break}else r[b]&&(t[c]=Math.min(t[c],t[b])|0);l[b]>=0&&i[c].push(l[b])}a[c]=k}else{if(t[c]===P[c]){for(var A=[],g=[],f=0,k=_.length-1;k>=0;--k){var p=_[k];if(r[p]=!1,A.push(p),g.push(i[p]),f+=i[p].length,l[p]=u.length,p===c){_.length=k;break}}u.push(A);for(var x=new Array(f),k=0;k<g.length;k++)for(var N=0;N<g[k].length;N++)x[--f]=g[k][N];d.push(x)}T.pop()}}}for(var s=0;s<C;++s)P[s]<0&&h(s);for(var y,s=0;s<d.length;s++){var m=d[s];if(m.length!==0){m.sort(function(_,T){return _-T}),y=[m[0]];for(var E=1;E<m.length;E++)m[E]!==m[E-1]&&y.push(m[E]);d[s]=y}}return{components:u,adjacencyList:d}}}}),Wte=Ne({"src/traces/sankey/calc.js"(te,Z){var v=mF(),w=In(),C=a1().wrap,P=w.isArrayOrTypedArray,t=w.isIndex,r=Dc();function a(i){var s=i.node,o=i.link,u=[],d=P(o.color),h=P(o.hovercolor),y=P(o.customdata),m={},E={},c=o.colorscales.length,_;for(_=0;_<c;_++){var T=o.colorscales[_],M=r.extractScale(T,{cLetter:"c"}),k=r.makeColorScaleFunc(M);E[T.label]=k}var b=0;for(_=0;_<o.value.length;_++)o.source[_]>b&&(b=o.source[_]),o.target[_]>b&&(b=o.target[_]);var A=b+1;i.node._count=A;var g,f=i.node.groups,p={};for(_=0;_<f.length;_++){var x=f[_];for(g=0;g<x.length;g++){var N=x[g],D=A+_;p.hasOwnProperty(N)?w.warn("Node "+N+" is already part of a group."):p[N]=D}}var B={source:[],target:[]};for(_=0;_<o.value.length;_++){var U=o.value[_],V=o.source[_],q=o.target[_];if(U>0&&t(V,A)&&t(q,A)&&!(p.hasOwnProperty(V)&&p.hasOwnProperty(q)&&p[V]===p[q])){p.hasOwnProperty(q)&&(q=p[q]),p.hasOwnProperty(V)&&(V=p[V]),V=+V,q=+q,m[V]=m[q]=!0;var z="";o.label&&o.label[_]&&(z=o.label[_]);var H=null;z&&E.hasOwnProperty(z)&&(H=E[z]),u.push({pointNumber:_,label:z,color:d?o.color[_]:o.color,hovercolor:h?o.hovercolor[_]:o.hovercolor,customdata:y?o.customdata[_]:o.customdata,concentrationscale:H,source:V,target:q,value:+U}),B.source.push(V),B.target.push(q)}}var G=A+f.length,J=P(s.color),le=P(s.customdata),ye=[];for(_=0;_<G;_++)if(m[_]){var de=s.label[_];ye.push({group:_>A-1,childrenNodes:[],pointNumber:_,label:de,color:J?s.color[_]:s.color,customdata:le?s.customdata[_]:s.customdata})}var me=!1;return l(G,B.source,B.target)&&(me=!0),{circular:me,links:u,nodes:ye,groups:f,groupLookup:p}}function l(i,s,o){for(var u=w.init2dArray(i,0),d=0;d<Math.min(s.length,o.length);d++)if(w.isIndex(s[d],i)&&w.isIndex(o[d],i)){if(s[d]===o[d])return!0;u[s[d]].push(o[d])}var h=v(u);return h.components.some(function(y){return y.length>1})}Z.exports=function(s,o){var u=a(o);return C({circular:u.circular,_nodes:u.nodes,_links:u.links,_groups:u.groups,_groupLookup:u.groupLookup})}}}),Yte=Ne({"node_modules/d3-quadtree/dist/d3-quadtree.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){function w(A){var g=+this._x.call(null,A),f=+this._y.call(null,A);return C(this.cover(g,f),g,f,A)}function C(A,g,f,p){if(isNaN(g)||isNaN(f))return A;var x,N=A._root,D={data:p},B=A._x0,U=A._y0,V=A._x1,q=A._y1,z,H,G,J,le,ye,de,me;if(!N)return A._root=D,A;for(;N.length;)if((le=g>=(z=(B+V)/2))?B=z:V=z,(ye=f>=(H=(U+q)/2))?U=H:q=H,x=N,!(N=N[de=ye<<1|le]))return x[de]=D,A;if(G=+A._x.call(null,N.data),J=+A._y.call(null,N.data),g===G&&f===J)return D.next=N,x?x[de]=D:A._root=D,A;do x=x?x[de]=new Array(4):A._root=new Array(4),(le=g>=(z=(B+V)/2))?B=z:V=z,(ye=f>=(H=(U+q)/2))?U=H:q=H;while((de=ye<<1|le)===(me=(J>=H)<<1|G>=z));return x[me]=N,x[de]=D,A}function P(A){var g,f,p=A.length,x,N,D=new Array(p),B=new Array(p),U=1/0,V=1/0,q=-1/0,z=-1/0;for(f=0;f<p;++f)isNaN(x=+this._x.call(null,g=A[f]))||isNaN(N=+this._y.call(null,g))||(D[f]=x,B[f]=N,x<U&&(U=x),x>q&&(q=x),N<V&&(V=N),N>z&&(z=N));if(U>q||V>z)return this;for(this.cover(U,V).cover(q,z),f=0;f<p;++f)C(this,D[f],B[f],A[f]);return this}function t(A,g){if(isNaN(A=+A)||isNaN(g=+g))return this;var f=this._x0,p=this._y0,x=this._x1,N=this._y1;if(isNaN(f))x=(f=Math.floor(A))+1,N=(p=Math.floor(g))+1;else{for(var D=x-f,B=this._root,U,V;f>A||A>=x||p>g||g>=N;)switch(V=(g<p)<<1|A<f,U=new Array(4),U[V]=B,B=U,D*=2,V){case 0:x=f+D,N=p+D;break;case 1:f=x-D,N=p+D;break;case 2:x=f+D,p=N-D;break;case 3:f=x-D,p=N-D;break}this._root&&this._root.length&&(this._root=B)}return this._x0=f,this._y0=p,this._x1=x,this._y1=N,this}function r(){var A=[];return this.visit(function(g){if(!g.length)do A.push(g.data);while(g=g.next)}),A}function a(A){return arguments.length?this.cover(+A[0][0],+A[0][1]).cover(+A[1][0],+A[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function l(A,g,f,p,x){this.node=A,this.x0=g,this.y0=f,this.x1=p,this.y1=x}function i(A,g,f){var p,x=this._x0,N=this._y0,D,B,U,V,q=this._x1,z=this._y1,H=[],G=this._root,J,le;for(G&&H.push(new l(G,x,N,q,z)),f==null?f=1/0:(x=A-f,N=g-f,q=A+f,z=g+f,f*=f);J=H.pop();)if(!(!(G=J.node)||(D=J.x0)>q||(B=J.y0)>z||(U=J.x1)<x||(V=J.y1)<N))if(G.length){var ye=(D+U)/2,de=(B+V)/2;H.push(new l(G[3],ye,de,U,V),new l(G[2],D,de,ye,V),new l(G[1],ye,B,U,de),new l(G[0],D,B,ye,de)),(le=(g>=de)<<1|A>=ye)&&(J=H[H.length-1],H[H.length-1]=H[H.length-1-le],H[H.length-1-le]=J)}else{var me=A-+this._x.call(null,G.data),W=g-+this._y.call(null,G.data),ie=me*me+W*W;if(ie<f){var se=Math.sqrt(f=ie);x=A-se,N=g-se,q=A+se,z=g+se,p=G.data}}return p}function s(A){if(isNaN(q=+this._x.call(null,A))||isNaN(z=+this._y.call(null,A)))return this;var g,f=this._root,p,x,N,D=this._x0,B=this._y0,U=this._x1,V=this._y1,q,z,H,G,J,le,ye,de;if(!f)return this;if(f.length)for(;;){if((J=q>=(H=(D+U)/2))?D=H:U=H,(le=z>=(G=(B+V)/2))?B=G:V=G,g=f,!(f=f[ye=le<<1|J]))return this;if(!f.length)break;(g[ye+1&3]||g[ye+2&3]||g[ye+3&3])&&(p=g,de=ye)}for(;f.data!==A;)if(x=f,!(f=f.next))return this;return(N=f.next)&&delete f.next,x?(N?x.next=N:delete x.next,this):g?(N?g[ye]=N:delete g[ye],(f=g[0]||g[1]||g[2]||g[3])&&f===(g[3]||g[2]||g[1]||g[0])&&!f.length&&(p?p[de]=f:this._root=f),this):(this._root=N,this)}function o(A){for(var g=0,f=A.length;g<f;++g)this.remove(A[g]);return this}function u(){return this._root}function d(){var A=0;return this.visit(function(g){if(!g.length)do++A;while(g=g.next)}),A}function h(A){var g=[],f,p=this._root,x,N,D,B,U;for(p&&g.push(new l(p,this._x0,this._y0,this._x1,this._y1));f=g.pop();)if(!A(p=f.node,N=f.x0,D=f.y0,B=f.x1,U=f.y1)&&p.length){var V=(N+B)/2,q=(D+U)/2;(x=p[3])&&g.push(new l(x,V,q,B,U)),(x=p[2])&&g.push(new l(x,N,q,V,U)),(x=p[1])&&g.push(new l(x,V,D,B,q)),(x=p[0])&&g.push(new l(x,N,D,V,q))}return this}function y(A){var g=[],f=[],p;for(this._root&&g.push(new l(this._root,this._x0,this._y0,this._x1,this._y1));p=g.pop();){var x=p.node;if(x.length){var N,D=p.x0,B=p.y0,U=p.x1,V=p.y1,q=(D+U)/2,z=(B+V)/2;(N=x[0])&&g.push(new l(N,D,B,q,z)),(N=x[1])&&g.push(new l(N,q,B,U,z)),(N=x[2])&&g.push(new l(N,D,z,q,V)),(N=x[3])&&g.push(new l(N,q,z,U,V))}f.push(p)}for(;p=f.pop();)A(p.node,p.x0,p.y0,p.x1,p.y1);return this}function m(A){return A[0]}function E(A){return arguments.length?(this._x=A,this):this._x}function c(A){return A[1]}function _(A){return arguments.length?(this._y=A,this):this._y}function T(A,g,f){var p=new M(g??m,f??c,NaN,NaN,NaN,NaN);return A==null?p:p.addAll(A)}function M(A,g,f,p,x,N){this._x=A,this._y=g,this._x0=f,this._y0=p,this._x1=x,this._y1=N,this._root=void 0}function k(A){for(var g={data:A.data},f=g;A=A.next;)f=f.next={data:A.data};return g}var b=T.prototype=M.prototype;b.copy=function(){var A=new M(this._x,this._y,this._x0,this._y0,this._x1,this._y1),g=this._root,f,p;if(!g)return A;if(!g.length)return A._root=k(g),A;for(f=[{source:g,target:A._root=new Array(4)}];g=f.pop();)for(var x=0;x<4;++x)(p=g.source[x])&&(p.length?f.push({source:p,target:g.target[x]=new Array(4)}):g.target[x]=k(p));return A},b.add=w,b.addAll=P,b.cover=t,b.data=r,b.extent=a,b.find=i,b.remove=s,b.removeAll=o,b.root=u,b.size=d,b.visit=h,b.visitAfter=y,b.x=E,b.y=_,v.quadtree=T,Object.defineProperty(v,"__esModule",{value:!0})})}}),qR=Ne({"node_modules/d3-collection/dist/d3-collection.js"(te,Z){(function(v,w){w(typeof te=="object"&&typeof Z<"u"?te:v.d3=v.d3||{})})(te,function(v){var w="$";function C(){}C.prototype=P.prototype={constructor:C,has:function(m){return w+m in this},get:function(m){return this[w+m]},set:function(m,E){return this[w+m]=E,this},remove:function(m){var E=w+m;return E in this&&delete this[E]},clear:function(){for(var m in this)m[0]===w&&delete this[m]},keys:function(){var m=[];for(var E in this)E[0]===w&&m.push(E.slice(1));return m},values:function(){var m=[];for(var E in this)E[0]===w&&m.push(this[E]);return m},entries:function(){var m=[];for(var E in this)E[0]===w&&m.push({key:E.slice(1),value:this[E]});return m},size:function(){var m=0;for(var E in this)E[0]===w&&++m;return m},empty:function(){for(var m in this)if(m[0]===w)return!1;return!0},each:function(m){for(var E in this)E[0]===w&&m(this[E],E.slice(1),this)}};function P(m,E){var c=new C;if(m instanceof C)m.each(function(b,A){c.set(A,b)});else if(Array.isArray(m)){var _=-1,T=m.length,M;if(E==null)for(;++_<T;)c.set(_,m[_]);else for(;++_<T;)c.set(E(M=m[_],_,m),M)}else if(m)for(var k in m)c.set(k,m[k]);return c}function t(){var m=[],E=[],c,_,T;function M(b,A,g,f){if(A>=m.length)return c!=null&&b.sort(c),_!=null?_(b):b;for(var p=-1,x=b.length,N=m[A++],D,B,U=P(),V,q=g();++p<x;)(V=U.get(D=N(B=b[p])+""))?V.push(B):U.set(D,[B]);return U.each(function(z,H){f(q,H,M(z,A,g,f))}),q}function k(b,A){if(++A>m.length)return b;var g,f=E[A-1];return _!=null&&A>=m.length?g=b.entries():(g=[],b.each(function(p,x){g.push({key:x,values:k(p,A)})})),f!=null?g.sort(function(p,x){return f(p.key,x.key)}):g}return T={object:function(b){return M(b,0,r,a)},map:function(b){return M(b,0,l,i)},entries:function(b){return k(M(b,0,l,i),0)},key:function(b){return m.push(b),T},sortKeys:function(b){return E[m.length-1]=b,T},sortValues:function(b){return c=b,T},rollup:function(b){return _=b,T}}}function r(){return{}}function a(m,E,c){m[E]=c}function l(){return P()}function i(m,E,c){m.set(E,c)}function s(){}var o=P.prototype;s.prototype=u.prototype={constructor:s,has:o.has,add:function(m){return m+="",this[w+m]=m,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function u(m,E){var c=new s;if(m instanceof s)m.each(function(M){c.add(M)});else if(m){var _=-1,T=m.length;if(E==null)for(;++_<T;)c.add(m[_]);else for(;++_<T;)c.add(E(m[_],_,m))}return c}function d(m){var E=[];for(var c in m)E.push(c);return E}function h(m){var E=[];for(var c in m)E.push(m[c]);return E}function y(m){var E=[];for(var c in m)E.push({key:c,value:m[c]});return E}v.nest=t,v.set=u,v.map=P,v.keys=d,v.values=h,v.entries=y,Object.defineProperty(v,"__esModule",{value:!0})})}}),Zte=Ne({"node_modules/d3-dispatch/dist/d3-dispatch.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w={value:function(){}};function C(){for(var l=0,i=arguments.length,s={},o;l<i;++l){if(!(o=arguments[l]+"")||o in s||/[\s.]/.test(o))throw new Error("illegal type: "+o);s[o]=[]}return new P(s)}function P(l){this._=l}function t(l,i){return l.trim().split(/^|\s+/).map(function(s){var o="",u=s.indexOf(".");if(u>=0&&(o=s.slice(u+1),s=s.slice(0,u)),s&&!i.hasOwnProperty(s))throw new Error("unknown type: "+s);return{type:s,name:o}})}P.prototype=C.prototype={constructor:P,on:function(l,i){var s=this._,o=t(l+"",s),u,d=-1,h=o.length;if(arguments.length<2){for(;++d<h;)if((u=(l=o[d]).type)&&(u=r(s[u],l.name)))return u;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++d<h;)if(u=(l=o[d]).type)s[u]=a(s[u],l.name,i);else if(i==null)for(u in s)s[u]=a(s[u],l.name,null);return this},copy:function(){var l={},i=this._;for(var s in i)l[s]=i[s].slice();return new P(l)},call:function(l,i){if((u=arguments.length-2)>0)for(var s=new Array(u),o=0,u,d;o<u;++o)s[o]=arguments[o+2];if(!this._.hasOwnProperty(l))throw new Error("unknown type: "+l);for(d=this._[l],o=0,u=d.length;o<u;++o)d[o].value.apply(i,s)},apply:function(l,i,s){if(!this._.hasOwnProperty(l))throw new Error("unknown type: "+l);for(var o=this._[l],u=0,d=o.length;u<d;++u)o[u].value.apply(i,s)}};function r(l,i){for(var s=0,o=l.length,u;s<o;++s)if((u=l[s]).name===i)return u.value}function a(l,i,s){for(var o=0,u=l.length;o<u;++o)if(l[o].name===i){l[o]=w,l=l.slice(0,o).concat(l.slice(o+1));break}return s!=null&&l.push({name:i,value:s}),l}v.dispatch=C,Object.defineProperty(v,"__esModule",{value:!0})})}}),$te=Ne({"node_modules/d3-timer/dist/d3-timer.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=0,C=0,P=0,t=1e3,r,a,l=0,i=0,s=0,o=typeof performance=="object"&&performance.now?performance:Date,u=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function d(){return i||(u(h),i=o.now()+s)}function h(){i=0}function y(){this._call=this._time=this._next=null}y.prototype=m.prototype={constructor:y,restart:function(A,g,f){if(typeof A!="function")throw new TypeError("callback is not a function");f=(f==null?d():+f)+(g==null?0:+g),!this._next&&a!==this&&(a?a._next=this:r=this,a=this),this._call=A,this._time=f,M()},stop:function(){this._call&&(this._call=null,this._time=1/0,M())}};function m(A,g,f){var p=new y;return p.restart(A,g,f),p}function E(){d(),++w;for(var A=r,g;A;)(g=i-A._time)>=0&&A._call.call(null,g),A=A._next;--w}function c(){i=(l=o.now())+s,w=C=0;try{E()}finally{w=0,T(),i=0}}function _(){var A=o.now(),g=A-l;g>t&&(s-=g,l=A)}function T(){for(var A,g=r,f,p=1/0;g;)g._call?(p>g._time&&(p=g._time),A=g,g=g._next):(f=g._next,g._next=null,g=A?A._next=f:r=f);a=A,M(p)}function M(A){if(!w){C&&(C=clearTimeout(C));var g=A-i;g>24?(A<1/0&&(C=setTimeout(c,A-o.now()-s)),P&&(P=clearInterval(P))):(P||(l=o.now(),P=setInterval(_,t)),w=1,u(c))}}function k(A,g,f){var p=new y;return g=g==null?0:+g,p.restart(function(x){p.stop(),A(x+g)},g,f),p}function b(A,g,f){var p=new y,x=g;return g==null?(p.restart(A,g,f),p):(g=+g,f=f==null?d():+f,p.restart(function N(D){D+=x,p.restart(N,x+=g,f),A(D)},g,f),p)}v.interval=b,v.now=d,v.timeout=k,v.timer=m,v.timerFlush=E,Object.defineProperty(v,"__esModule",{value:!0})})}}),Kte=Ne({"node_modules/d3-force/dist/d3-force.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,Yte(),qR(),Zte(),$te()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(te,function(v,w,C,P,t){function r(A,g){var f;A==null&&(A=0),g==null&&(g=0);function p(){var x,N=f.length,D,B=0,U=0;for(x=0;x<N;++x)D=f[x],B+=D.x,U+=D.y;for(B=B/N-A,U=U/N-g,x=0;x<N;++x)D=f[x],D.x-=B,D.y-=U}return p.initialize=function(x){f=x},p.x=function(x){return arguments.length?(A=+x,p):A},p.y=function(x){return arguments.length?(g=+x,p):g},p}function a(A){return function(){return A}}function l(){return(Math.random()-.5)*1e-6}function i(A){return A.x+A.vx}function s(A){return A.y+A.vy}function o(A){var g,f,p=1,x=1;typeof A!="function"&&(A=a(A==null?1:+A));function N(){for(var U,V=g.length,q,z,H,G,J,le,ye=0;ye<x;++ye)for(q=w.quadtree(g,i,s).visitAfter(D),U=0;U<V;++U)z=g[U],J=f[z.index],le=J*J,H=z.x+z.vx,G=z.y+z.vy,q.visit(de);function de(me,W,ie,se,ee){var pe=me.data,oe=me.r,Y=J+oe;if(pe){if(pe.index>z.index){var ce=H-pe.x-pe.vx,ue=G-pe.y-pe.vy,_e=ce*ce+ue*ue;_e<Y*Y&&(ce===0&&(ce=l(),_e+=ce*ce),ue===0&&(ue=l(),_e+=ue*ue),_e=(Y-(_e=Math.sqrt(_e)))/_e*p,z.vx+=(ce*=_e)*(Y=(oe*=oe)/(le+oe)),z.vy+=(ue*=_e)*Y,pe.vx-=ce*(Y=1-Y),pe.vy-=ue*Y)}return}return W>H+Y||se<H-Y||ie>G+Y||ee<G-Y}}function D(U){if(U.data)return U.r=f[U.data.index];for(var V=U.r=0;V<4;++V)U[V]&&U[V].r>U.r&&(U.r=U[V].r)}function B(){if(g){var U,V=g.length,q;for(f=new Array(V),U=0;U<V;++U)q=g[U],f[q.index]=+A(q,U,g)}}return N.initialize=function(U){g=U,B()},N.iterations=function(U){return arguments.length?(x=+U,N):x},N.strength=function(U){return arguments.length?(p=+U,N):p},N.radius=function(U){return arguments.length?(A=typeof U=="function"?U:a(+U),B(),N):A},N}function u(A){return A.index}function d(A,g){var f=A.get(g);if(!f)throw new Error("missing: "+g);return f}function h(A){var g=u,f=q,p,x=a(30),N,D,B,U,V=1;A==null&&(A=[]);function q(le){return 1/Math.min(B[le.source.index],B[le.target.index])}function z(le){for(var ye=0,de=A.length;ye<V;++ye)for(var me=0,W,ie,se,ee,pe,oe,Y;me<de;++me)W=A[me],ie=W.source,se=W.target,ee=se.x+se.vx-ie.x-ie.vx||l(),pe=se.y+se.vy-ie.y-ie.vy||l(),oe=Math.sqrt(ee*ee+pe*pe),oe=(oe-N[me])/oe*le*p[me],ee*=oe,pe*=oe,se.vx-=ee*(Y=U[me]),se.vy-=pe*Y,ie.vx+=ee*(Y=1-Y),ie.vy+=pe*Y}function H(){if(D){var le,ye=D.length,de=A.length,me=C.map(D,g),W;for(le=0,B=new Array(ye);le<de;++le)W=A[le],W.index=le,typeof W.source!="object"&&(W.source=d(me,W.source)),typeof W.target!="object"&&(W.target=d(me,W.target)),B[W.source.index]=(B[W.source.index]||0)+1,B[W.target.index]=(B[W.target.index]||0)+1;for(le=0,U=new Array(de);le<de;++le)W=A[le],U[le]=B[W.source.index]/(B[W.source.index]+B[W.target.index]);p=new Array(de),G(),N=new Array(de),J()}}function G(){if(D)for(var le=0,ye=A.length;le<ye;++le)p[le]=+f(A[le],le,A)}function J(){if(D)for(var le=0,ye=A.length;le<ye;++le)N[le]=+x(A[le],le,A)}return z.initialize=function(le){D=le,H()},z.links=function(le){return arguments.length?(A=le,H(),z):A},z.id=function(le){return arguments.length?(g=le,z):g},z.iterations=function(le){return arguments.length?(V=+le,z):V},z.strength=function(le){return arguments.length?(f=typeof le=="function"?le:a(+le),G(),z):f},z.distance=function(le){return arguments.length?(x=typeof le=="function"?le:a(+le),J(),z):x},z}function y(A){return A.x}function m(A){return A.y}var E=10,c=Math.PI*(3-Math.sqrt(5));function _(A){var g,f=1,p=.001,x=1-Math.pow(p,1/300),N=0,D=.6,B=C.map(),U=t.timer(q),V=P.dispatch("tick","end");A==null&&(A=[]);function q(){z(),V.call("tick",g),f<p&&(U.stop(),V.call("end",g))}function z(J){var le,ye=A.length,de;J===void 0&&(J=1);for(var me=0;me<J;++me)for(f+=(N-f)*x,B.each(function(W){W(f)}),le=0;le<ye;++le)de=A[le],de.fx==null?de.x+=de.vx*=D:(de.x=de.fx,de.vx=0),de.fy==null?de.y+=de.vy*=D:(de.y=de.fy,de.vy=0);return g}function H(){for(var J=0,le=A.length,ye;J<le;++J){if(ye=A[J],ye.index=J,ye.fx!=null&&(ye.x=ye.fx),ye.fy!=null&&(ye.y=ye.fy),isNaN(ye.x)||isNaN(ye.y)){var de=E*Math.sqrt(J),me=J*c;ye.x=de*Math.cos(me),ye.y=de*Math.sin(me)}(isNaN(ye.vx)||isNaN(ye.vy))&&(ye.vx=ye.vy=0)}}function G(J){return J.initialize&&J.initialize(A),J}return H(),g={tick:z,restart:function(){return U.restart(q),g},stop:function(){return U.stop(),g},nodes:function(J){return arguments.length?(A=J,H(),B.each(G),g):A},alpha:function(J){return arguments.length?(f=+J,g):f},alphaMin:function(J){return arguments.length?(p=+J,g):p},alphaDecay:function(J){return arguments.length?(x=+J,g):+x},alphaTarget:function(J){return arguments.length?(N=+J,g):N},velocityDecay:function(J){return arguments.length?(D=1-J,g):1-D},force:function(J,le){return arguments.length>1?(le==null?B.remove(J):B.set(J,G(le)),g):B.get(J)},find:function(J,le,ye){var de=0,me=A.length,W,ie,se,ee,pe;for(ye==null?ye=1/0:ye*=ye,de=0;de<me;++de)ee=A[de],W=J-ee.x,ie=le-ee.y,se=W*W+ie*ie,se<ye&&(pe=ee,ye=se);return pe},on:function(J,le){return arguments.length>1?(V.on(J,le),g):V.on(J)}}}function T(){var A,g,f,p=a(-30),x,N=1,D=1/0,B=.81;function U(H){var G,J=A.length,le=w.quadtree(A,y,m).visitAfter(q);for(f=H,G=0;G<J;++G)g=A[G],le.visit(z)}function V(){if(A){var H,G=A.length,J;for(x=new Array(G),H=0;H<G;++H)J=A[H],x[J.index]=+p(J,H,A)}}function q(H){var G=0,J,le,ye=0,de,me,W;if(H.length){for(de=me=W=0;W<4;++W)(J=H[W])&&(le=Math.abs(J.value))&&(G+=J.value,ye+=le,de+=le*J.x,me+=le*J.y);H.x=de/ye,H.y=me/ye}else{J=H,J.x=J.data.x,J.y=J.data.y;do G+=x[J.data.index];while(J=J.next)}H.value=G}function z(H,G,J,le){if(!H.value)return!0;var ye=H.x-g.x,de=H.y-g.y,me=le-G,W=ye*ye+de*de;if(me*me/B<W)return W<D&&(ye===0&&(ye=l(),W+=ye*ye),de===0&&(de=l(),W+=de*de),W<N&&(W=Math.sqrt(N*W)),g.vx+=ye*H.value*f/W,g.vy+=de*H.value*f/W),!0;if(H.length||W>=D)return;(H.data!==g||H.next)&&(ye===0&&(ye=l(),W+=ye*ye),de===0&&(de=l(),W+=de*de),W<N&&(W=Math.sqrt(N*W)));do H.data!==g&&(me=x[H.data.index]*f/W,g.vx+=ye*me,g.vy+=de*me);while(H=H.next)}return U.initialize=function(H){A=H,V()},U.strength=function(H){return arguments.length?(p=typeof H=="function"?H:a(+H),V(),U):p},U.distanceMin=function(H){return arguments.length?(N=H*H,U):Math.sqrt(N)},U.distanceMax=function(H){return arguments.length?(D=H*H,U):Math.sqrt(D)},U.theta=function(H){return arguments.length?(B=H*H,U):Math.sqrt(B)},U}function M(A,g,f){var p,x=a(.1),N,D;typeof A!="function"&&(A=a(+A)),g==null&&(g=0),f==null&&(f=0);function B(V){for(var q=0,z=p.length;q<z;++q){var H=p[q],G=H.x-g||1e-6,J=H.y-f||1e-6,le=Math.sqrt(G*G+J*J),ye=(D[q]-le)*N[q]*V/le;H.vx+=G*ye,H.vy+=J*ye}}function U(){if(p){var V,q=p.length;for(N=new Array(q),D=new Array(q),V=0;V<q;++V)D[V]=+A(p[V],V,p),N[V]=isNaN(D[V])?0:+x(p[V],V,p)}}return B.initialize=function(V){p=V,U()},B.strength=function(V){return arguments.length?(x=typeof V=="function"?V:a(+V),U(),B):x},B.radius=function(V){return arguments.length?(A=typeof V=="function"?V:a(+V),U(),B):A},B.x=function(V){return arguments.length?(g=+V,B):g},B.y=function(V){return arguments.length?(f=+V,B):f},B}function k(A){var g=a(.1),f,p,x;typeof A!="function"&&(A=a(A==null?0:+A));function N(B){for(var U=0,V=f.length,q;U<V;++U)q=f[U],q.vx+=(x[U]-q.x)*p[U]*B}function D(){if(f){var B,U=f.length;for(p=new Array(U),x=new Array(U),B=0;B<U;++B)p[B]=isNaN(x[B]=+A(f[B],B,f))?0:+g(f[B],B,f)}}return N.initialize=function(B){f=B,D()},N.strength=function(B){return arguments.length?(g=typeof B=="function"?B:a(+B),D(),N):g},N.x=function(B){return arguments.length?(A=typeof B=="function"?B:a(+B),D(),N):A},N}function b(A){var g=a(.1),f,p,x;typeof A!="function"&&(A=a(A==null?0:+A));function N(B){for(var U=0,V=f.length,q;U<V;++U)q=f[U],q.vy+=(x[U]-q.y)*p[U]*B}function D(){if(f){var B,U=f.length;for(p=new Array(U),x=new Array(U),B=0;B<U;++B)p[B]=isNaN(x[B]=+A(f[B],B,f))?0:+g(f[B],B,f)}}return N.initialize=function(B){f=B,D()},N.strength=function(B){return arguments.length?(g=typeof B=="function"?B:a(+B),D(),N):g},N.y=function(B){return arguments.length?(A=typeof B=="function"?B:a(+B),D(),N):A},N}v.forceCenter=r,v.forceCollide=o,v.forceLink=h,v.forceManyBody=T,v.forceRadial=M,v.forceSimulation=_,v.forceX=k,v.forceY=b,Object.defineProperty(v,"__esModule",{value:!0})})}}),Jte=Ne({"node_modules/d3-path/dist/d3-path.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te):(v=v||self,w(v.d3=v.d3||{}))})(te,function(v){var w=Math.PI,C=2*w,P=1e-6,t=C-P;function r(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new r}r.prototype=a.prototype={constructor:r,moveTo:function(l,i){this._+="M"+(this._x0=this._x1=+l)+","+(this._y0=this._y1=+i)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(l,i){this._+="L"+(this._x1=+l)+","+(this._y1=+i)},quadraticCurveTo:function(l,i,s,o){this._+="Q"+ +l+","+ +i+","+(this._x1=+s)+","+(this._y1=+o)},bezierCurveTo:function(l,i,s,o,u,d){this._+="C"+ +l+","+ +i+","+ +s+","+ +o+","+(this._x1=+u)+","+(this._y1=+d)},arcTo:function(l,i,s,o,u){l=+l,i=+i,s=+s,o=+o,u=+u;var d=this._x1,h=this._y1,y=s-l,m=o-i,E=d-l,c=h-i,_=E*E+c*c;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=l)+","+(this._y1=i);else if(_>P)if(!(Math.abs(c*y-m*E)>P)||!u)this._+="L"+(this._x1=l)+","+(this._y1=i);else{var T=s-d,M=o-h,k=y*y+m*m,b=T*T+M*M,A=Math.sqrt(k),g=Math.sqrt(_),f=u*Math.tan((w-Math.acos((k+_-b)/(2*A*g)))/2),p=f/g,x=f/A;Math.abs(p-1)>P&&(this._+="L"+(l+p*E)+","+(i+p*c)),this._+="A"+u+","+u+",0,0,"+ +(c*T>E*M)+","+(this._x1=l+x*y)+","+(this._y1=i+x*m)}},arc:function(l,i,s,o,u,d){l=+l,i=+i,s=+s,d=!!d;var h=s*Math.cos(o),y=s*Math.sin(o),m=l+h,E=i+y,c=1^d,_=d?o-u:u-o;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+m+","+E:(Math.abs(this._x1-m)>P||Math.abs(this._y1-E)>P)&&(this._+="L"+m+","+E),s&&(_<0&&(_=_%C+C),_>t?this._+="A"+s+","+s+",0,1,"+c+","+(l-h)+","+(i-y)+"A"+s+","+s+",0,1,"+c+","+(this._x1=m)+","+(this._y1=E):_>P&&(this._+="A"+s+","+s+",0,"+ +(_>=w)+","+c+","+(this._x1=l+s*Math.cos(u))+","+(this._y1=i+s*Math.sin(u))))},rect:function(l,i,s,o){this._+="M"+(this._x0=this._x1=+l)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +o+"h"+-s+"Z"},toString:function(){return this._}},v.path=a,Object.defineProperty(v,"__esModule",{value:!0})})}}),yF=Ne({"node_modules/d3-shape/dist/d3-shape.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,Jte()):(v=v||self,w(v.d3=v.d3||{},v.d3))})(te,function(v,w){function C(Rt){return function(){return Rt}}var P=Math.abs,t=Math.atan2,r=Math.cos,a=Math.max,l=Math.min,i=Math.sin,s=Math.sqrt,o=1e-12,u=Math.PI,d=u/2,h=2*u;function y(Rt){return Rt>1?0:Rt<-1?u:Math.acos(Rt)}function m(Rt){return Rt>=1?d:Rt<=-1?-d:Math.asin(Rt)}function E(Rt){return Rt.innerRadius}function c(Rt){return Rt.outerRadius}function _(Rt){return Rt.startAngle}function T(Rt){return Rt.endAngle}function M(Rt){return Rt&&Rt.padAngle}function k(Rt,xr,Wr,An,Xn,na,ra,Sn){var Wn=Wr-Rt,Fi=An-xr,Ya=ra-Xn,Wi=Sn-na,uo=Wi*Wn-Ya*Fi;if(!(uo*uo<o))return uo=(Ya*(xr-na)-Wi*(Rt-Xn))/uo,[Rt+uo*Wn,xr+uo*Fi]}function b(Rt,xr,Wr,An,Xn,na,ra){var Sn=Rt-Wr,Wn=xr-An,Fi=(ra?na:-na)/s(Sn*Sn+Wn*Wn),Ya=Fi*Wn,Wi=-Fi*Sn,uo=Rt+Ya,Ao=xr+Wi,wo=Wr+Ya,Uo=An+Wi,Ri=(uo+wo)/2,ps=(Ao+Uo)/2,as=wo-uo,el=Uo-Ao,As=as*as+el*el,hs=Xn-na,es=uo*Uo-wo*Ao,tl=(el<0?-1:1)*s(a(0,hs*hs*As-es*es)),Ks=(es*el-as*tl)/As,pl=(-es*as-el*tl)/As,Ss=(es*el+as*tl)/As,ls=(-es*as+el*tl)/As,Lo=Ks-Ri,Es=pl-ps,ml=Ss-Ri,zl=ls-ps;return Lo*Lo+Es*Es>ml*ml+zl*zl&&(Ks=Ss,pl=ls),{cx:Ks,cy:pl,x01:-Ya,y01:-Wi,x11:Ks*(Xn/hs-1),y11:pl*(Xn/hs-1)}}function A(){var Rt=E,xr=c,Wr=C(0),An=null,Xn=_,na=T,ra=M,Sn=null;function Wn(){var Fi,Ya,Wi=+Rt.apply(this,arguments),uo=+xr.apply(this,arguments),Ao=Xn.apply(this,arguments)-d,wo=na.apply(this,arguments)-d,Uo=P(wo-Ao),Ri=wo>Ao;if(Sn||(Sn=Fi=w.path()),uo<Wi&&(Ya=uo,uo=Wi,Wi=Ya),!(uo>o))Sn.moveTo(0,0);else if(Uo>h-o)Sn.moveTo(uo*r(Ao),uo*i(Ao)),Sn.arc(0,0,uo,Ao,wo,!Ri),Wi>o&&(Sn.moveTo(Wi*r(wo),Wi*i(wo)),Sn.arc(0,0,Wi,wo,Ao,Ri));else{var ps=Ao,as=wo,el=Ao,As=wo,hs=Uo,es=Uo,tl=ra.apply(this,arguments)/2,Ks=tl>o&&(An?+An.apply(this,arguments):s(Wi*Wi+uo*uo)),pl=l(P(uo-Wi)/2,+Wr.apply(this,arguments)),Ss=pl,ls=pl,Lo,Es;if(Ks>o){var ml=m(Ks/Wi*i(tl)),zl=m(Ks/uo*i(tl));(hs-=ml*2)>o?(ml*=Ri?1:-1,el+=ml,As-=ml):(hs=0,el=As=(Ao+wo)/2),(es-=zl*2)>o?(zl*=Ri?1:-1,ps+=zl,as-=zl):(es=0,ps=as=(Ao+wo)/2)}var Bl=uo*r(ps),Fs=uo*i(ps),Di=Wi*r(As),_o=Wi*i(As);if(pl>o){var Nl=uo*r(as),Vs=uo*i(as),Ko=Wi*r(el),jl=Wi*i(el),rl;if(Uo<u&&(rl=k(Bl,Fs,Ko,jl,Nl,Vs,Di,_o))){var yl=Bl-rl[0],Cu=Fs-rl[1],yo=Nl-rl[0],Ps=Vs-rl[1],ms=1/i(y((yl*yo+Cu*Ps)/(s(yl*yl+Cu*Cu)*s(yo*yo+Ps*Ps)))/2),Kl=s(rl[0]*rl[0]+rl[1]*rl[1]);Ss=l(pl,(Wi-Kl)/(ms-1)),ls=l(pl,(uo-Kl)/(ms+1))}}es>o?ls>o?(Lo=b(Ko,jl,Bl,Fs,uo,ls,Ri),Es=b(Nl,Vs,Di,_o,uo,ls,Ri),Sn.moveTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),ls<pl?Sn.arc(Lo.cx,Lo.cy,ls,t(Lo.y01,Lo.x01),t(Es.y01,Es.x01),!Ri):(Sn.arc(Lo.cx,Lo.cy,ls,t(Lo.y01,Lo.x01),t(Lo.y11,Lo.x11),!Ri),Sn.arc(0,0,uo,t(Lo.cy+Lo.y11,Lo.cx+Lo.x11),t(Es.cy+Es.y11,Es.cx+Es.x11),!Ri),Sn.arc(Es.cx,Es.cy,ls,t(Es.y11,Es.x11),t(Es.y01,Es.x01),!Ri))):(Sn.moveTo(Bl,Fs),Sn.arc(0,0,uo,ps,as,!Ri)):Sn.moveTo(Bl,Fs),!(Wi>o)||!(hs>o)?Sn.lineTo(Di,_o):Ss>o?(Lo=b(Di,_o,Nl,Vs,Wi,-Ss,Ri),Es=b(Bl,Fs,Ko,jl,Wi,-Ss,Ri),Sn.lineTo(Lo.cx+Lo.x01,Lo.cy+Lo.y01),Ss<pl?Sn.arc(Lo.cx,Lo.cy,Ss,t(Lo.y01,Lo.x01),t(Es.y01,Es.x01),!Ri):(Sn.arc(Lo.cx,Lo.cy,Ss,t(Lo.y01,Lo.x01),t(Lo.y11,Lo.x11),!Ri),Sn.arc(0,0,Wi,t(Lo.cy+Lo.y11,Lo.cx+Lo.x11),t(Es.cy+Es.y11,Es.cx+Es.x11),Ri),Sn.arc(Es.cx,Es.cy,Ss,t(Es.y11,Es.x11),t(Es.y01,Es.x01),!Ri))):Sn.arc(0,0,Wi,As,el,Ri)}if(Sn.closePath(),Fi)return Sn=null,Fi+""||null}return Wn.centroid=function(){var Fi=(+Rt.apply(this,arguments)+ +xr.apply(this,arguments))/2,Ya=(+Xn.apply(this,arguments)+ +na.apply(this,arguments))/2-u/2;return[r(Ya)*Fi,i(Ya)*Fi]},Wn.innerRadius=function(Fi){return arguments.length?(Rt=typeof Fi=="function"?Fi:C(+Fi),Wn):Rt},Wn.outerRadius=function(Fi){return arguments.length?(xr=typeof Fi=="function"?Fi:C(+Fi),Wn):xr},Wn.cornerRadius=function(Fi){return arguments.length?(Wr=typeof Fi=="function"?Fi:C(+Fi),Wn):Wr},Wn.padRadius=function(Fi){return arguments.length?(An=Fi==null?null:typeof Fi=="function"?Fi:C(+Fi),Wn):An},Wn.startAngle=function(Fi){return arguments.length?(Xn=typeof Fi=="function"?Fi:C(+Fi),Wn):Xn},Wn.endAngle=function(Fi){return arguments.length?(na=typeof Fi=="function"?Fi:C(+Fi),Wn):na},Wn.padAngle=function(Fi){return arguments.length?(ra=typeof Fi=="function"?Fi:C(+Fi),Wn):ra},Wn.context=function(Fi){return arguments.length?(Sn=Fi??null,Wn):Sn},Wn}function g(Rt){this._context=Rt}g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);break;case 1:this._point=2;default:this._context.lineTo(Rt,xr);break}}};function f(Rt){return new g(Rt)}function p(Rt){return Rt[0]}function x(Rt){return Rt[1]}function N(){var Rt=p,xr=x,Wr=C(!0),An=null,Xn=f,na=null;function ra(Sn){var Wn,Fi=Sn.length,Ya,Wi=!1,uo;for(An==null&&(na=Xn(uo=w.path())),Wn=0;Wn<=Fi;++Wn)!(Wn<Fi&&Wr(Ya=Sn[Wn],Wn,Sn))===Wi&&((Wi=!Wi)?na.lineStart():na.lineEnd()),Wi&&na.point(+Rt(Ya,Wn,Sn),+xr(Ya,Wn,Sn));if(uo)return na=null,uo+""||null}return ra.x=function(Sn){return arguments.length?(Rt=typeof Sn=="function"?Sn:C(+Sn),ra):Rt},ra.y=function(Sn){return arguments.length?(xr=typeof Sn=="function"?Sn:C(+Sn),ra):xr},ra.defined=function(Sn){return arguments.length?(Wr=typeof Sn=="function"?Sn:C(!!Sn),ra):Wr},ra.curve=function(Sn){return arguments.length?(Xn=Sn,An!=null&&(na=Xn(An)),ra):Xn},ra.context=function(Sn){return arguments.length?(Sn==null?An=na=null:na=Xn(An=Sn),ra):An},ra}function D(){var Rt=p,xr=null,Wr=C(0),An=x,Xn=C(!0),na=null,ra=f,Sn=null;function Wn(Ya){var Wi,uo,Ao,wo=Ya.length,Uo,Ri=!1,ps,as=new Array(wo),el=new Array(wo);for(na==null&&(Sn=ra(ps=w.path())),Wi=0;Wi<=wo;++Wi){if(!(Wi<wo&&Xn(Uo=Ya[Wi],Wi,Ya))===Ri)if(Ri=!Ri)uo=Wi,Sn.areaStart(),Sn.lineStart();else{for(Sn.lineEnd(),Sn.lineStart(),Ao=Wi-1;Ao>=uo;--Ao)Sn.point(as[Ao],el[Ao]);Sn.lineEnd(),Sn.areaEnd()}Ri&&(as[Wi]=+Rt(Uo,Wi,Ya),el[Wi]=+Wr(Uo,Wi,Ya),Sn.point(xr?+xr(Uo,Wi,Ya):as[Wi],An?+An(Uo,Wi,Ya):el[Wi]))}if(ps)return Sn=null,ps+""||null}function Fi(){return N().defined(Xn).curve(ra).context(na)}return Wn.x=function(Ya){return arguments.length?(Rt=typeof Ya=="function"?Ya:C(+Ya),xr=null,Wn):Rt},Wn.x0=function(Ya){return arguments.length?(Rt=typeof Ya=="function"?Ya:C(+Ya),Wn):Rt},Wn.x1=function(Ya){return arguments.length?(xr=Ya==null?null:typeof Ya=="function"?Ya:C(+Ya),Wn):xr},Wn.y=function(Ya){return arguments.length?(Wr=typeof Ya=="function"?Ya:C(+Ya),An=null,Wn):Wr},Wn.y0=function(Ya){return arguments.length?(Wr=typeof Ya=="function"?Ya:C(+Ya),Wn):Wr},Wn.y1=function(Ya){return arguments.length?(An=Ya==null?null:typeof Ya=="function"?Ya:C(+Ya),Wn):An},Wn.lineX0=Wn.lineY0=function(){return Fi().x(Rt).y(Wr)},Wn.lineY1=function(){return Fi().x(Rt).y(An)},Wn.lineX1=function(){return Fi().x(xr).y(Wr)},Wn.defined=function(Ya){return arguments.length?(Xn=typeof Ya=="function"?Ya:C(!!Ya),Wn):Xn},Wn.curve=function(Ya){return arguments.length?(ra=Ya,na!=null&&(Sn=ra(na)),Wn):ra},Wn.context=function(Ya){return arguments.length?(Ya==null?na=Sn=null:Sn=ra(na=Ya),Wn):na},Wn}function B(Rt,xr){return xr<Rt?-1:xr>Rt?1:xr>=Rt?0:NaN}function U(Rt){return Rt}function V(){var Rt=U,xr=B,Wr=null,An=C(0),Xn=C(h),na=C(0);function ra(Sn){var Wn,Fi=Sn.length,Ya,Wi,uo=0,Ao=new Array(Fi),wo=new Array(Fi),Uo=+An.apply(this,arguments),Ri=Math.min(h,Math.max(-h,Xn.apply(this,arguments)-Uo)),ps,as=Math.min(Math.abs(Ri)/Fi,na.apply(this,arguments)),el=as*(Ri<0?-1:1),As;for(Wn=0;Wn<Fi;++Wn)(As=wo[Ao[Wn]=Wn]=+Rt(Sn[Wn],Wn,Sn))>0&&(uo+=As);for(xr!=null?Ao.sort(function(hs,es){return xr(wo[hs],wo[es])}):Wr!=null&&Ao.sort(function(hs,es){return Wr(Sn[hs],Sn[es])}),Wn=0,Wi=uo?(Ri-Fi*el)/uo:0;Wn<Fi;++Wn,Uo=ps)Ya=Ao[Wn],As=wo[Ya],ps=Uo+(As>0?As*Wi:0)+el,wo[Ya]={data:Sn[Ya],index:Wn,value:As,startAngle:Uo,endAngle:ps,padAngle:as};return wo}return ra.value=function(Sn){return arguments.length?(Rt=typeof Sn=="function"?Sn:C(+Sn),ra):Rt},ra.sortValues=function(Sn){return arguments.length?(xr=Sn,Wr=null,ra):xr},ra.sort=function(Sn){return arguments.length?(Wr=Sn,xr=null,ra):Wr},ra.startAngle=function(Sn){return arguments.length?(An=typeof Sn=="function"?Sn:C(+Sn),ra):An},ra.endAngle=function(Sn){return arguments.length?(Xn=typeof Sn=="function"?Sn:C(+Sn),ra):Xn},ra.padAngle=function(Sn){return arguments.length?(na=typeof Sn=="function"?Sn:C(+Sn),ra):na},ra}var q=H(f);function z(Rt){this._curve=Rt}z.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Rt,xr){this._curve.point(xr*Math.sin(Rt),xr*-Math.cos(Rt))}};function H(Rt){function xr(Wr){return new z(Rt(Wr))}return xr._curve=Rt,xr}function G(Rt){var xr=Rt.curve;return Rt.angle=Rt.x,delete Rt.x,Rt.radius=Rt.y,delete Rt.y,Rt.curve=function(Wr){return arguments.length?xr(H(Wr)):xr()._curve},Rt}function J(){return G(N().curve(q))}function le(){var Rt=D().curve(q),xr=Rt.curve,Wr=Rt.lineX0,An=Rt.lineX1,Xn=Rt.lineY0,na=Rt.lineY1;return Rt.angle=Rt.x,delete Rt.x,Rt.startAngle=Rt.x0,delete Rt.x0,Rt.endAngle=Rt.x1,delete Rt.x1,Rt.radius=Rt.y,delete Rt.y,Rt.innerRadius=Rt.y0,delete Rt.y0,Rt.outerRadius=Rt.y1,delete Rt.y1,Rt.lineStartAngle=function(){return G(Wr())},delete Rt.lineX0,Rt.lineEndAngle=function(){return G(An())},delete Rt.lineX1,Rt.lineInnerRadius=function(){return G(Xn())},delete Rt.lineY0,Rt.lineOuterRadius=function(){return G(na())},delete Rt.lineY1,Rt.curve=function(ra){return arguments.length?xr(H(ra)):xr()._curve},Rt}function ye(Rt,xr){return[(xr=+xr)*Math.cos(Rt-=Math.PI/2),xr*Math.sin(Rt)]}var de=Array.prototype.slice;function me(Rt){return Rt.source}function W(Rt){return Rt.target}function ie(Rt){var xr=me,Wr=W,An=p,Xn=x,na=null;function ra(){var Sn,Wn=de.call(arguments),Fi=xr.apply(this,Wn),Ya=Wr.apply(this,Wn);if(na||(na=Sn=w.path()),Rt(na,+An.apply(this,(Wn[0]=Fi,Wn)),+Xn.apply(this,Wn),+An.apply(this,(Wn[0]=Ya,Wn)),+Xn.apply(this,Wn)),Sn)return na=null,Sn+""||null}return ra.source=function(Sn){return arguments.length?(xr=Sn,ra):xr},ra.target=function(Sn){return arguments.length?(Wr=Sn,ra):Wr},ra.x=function(Sn){return arguments.length?(An=typeof Sn=="function"?Sn:C(+Sn),ra):An},ra.y=function(Sn){return arguments.length?(Xn=typeof Sn=="function"?Sn:C(+Sn),ra):Xn},ra.context=function(Sn){return arguments.length?(na=Sn??null,ra):na},ra}function se(Rt,xr,Wr,An,Xn){Rt.moveTo(xr,Wr),Rt.bezierCurveTo(xr=(xr+An)/2,Wr,xr,Xn,An,Xn)}function ee(Rt,xr,Wr,An,Xn){Rt.moveTo(xr,Wr),Rt.bezierCurveTo(xr,Wr=(Wr+Xn)/2,An,Wr,An,Xn)}function pe(Rt,xr,Wr,An,Xn){var na=ye(xr,Wr),ra=ye(xr,Wr=(Wr+Xn)/2),Sn=ye(An,Wr),Wn=ye(An,Xn);Rt.moveTo(na[0],na[1]),Rt.bezierCurveTo(ra[0],ra[1],Sn[0],Sn[1],Wn[0],Wn[1])}function oe(){return ie(se)}function Y(){return ie(ee)}function ce(){var Rt=ie(pe);return Rt.angle=Rt.x,delete Rt.x,Rt.radius=Rt.y,delete Rt.y,Rt}var ue={draw:function(Rt,xr){var Wr=Math.sqrt(xr/u);Rt.moveTo(Wr,0),Rt.arc(0,0,Wr,0,h)}},_e={draw:function(Rt,xr){var Wr=Math.sqrt(xr/5)/2;Rt.moveTo(-3*Wr,-Wr),Rt.lineTo(-Wr,-Wr),Rt.lineTo(-Wr,-3*Wr),Rt.lineTo(Wr,-3*Wr),Rt.lineTo(Wr,-Wr),Rt.lineTo(3*Wr,-Wr),Rt.lineTo(3*Wr,Wr),Rt.lineTo(Wr,Wr),Rt.lineTo(Wr,3*Wr),Rt.lineTo(-Wr,3*Wr),Rt.lineTo(-Wr,Wr),Rt.lineTo(-3*Wr,Wr),Rt.closePath()}},Le=Math.sqrt(1/3),ze=Le*2,Ge={draw:function(Rt,xr){var Wr=Math.sqrt(xr/ze),An=Wr*Le;Rt.moveTo(0,-Wr),Rt.lineTo(An,0),Rt.lineTo(0,Wr),Rt.lineTo(-An,0),Rt.closePath()}},Ve=.8908130915292852,rt=Math.sin(u/10)/Math.sin(7*u/10),pt=Math.sin(h/10)*rt,gt=-Math.cos(h/10)*rt,ht={draw:function(Rt,xr){var Wr=Math.sqrt(xr*Ve),An=pt*Wr,Xn=gt*Wr;Rt.moveTo(0,-Wr),Rt.lineTo(An,Xn);for(var na=1;na<5;++na){var ra=h*na/5,Sn=Math.cos(ra),Wn=Math.sin(ra);Rt.lineTo(Wn*Wr,-Sn*Wr),Rt.lineTo(Sn*An-Wn*Xn,Wn*An+Sn*Xn)}Rt.closePath()}},lt={draw:function(Rt,xr){var Wr=Math.sqrt(xr),An=-Wr/2;Rt.rect(An,An,Wr,Wr)}},Fe=Math.sqrt(3),Pe={draw:function(Rt,xr){var Wr=-Math.sqrt(xr/(Fe*3));Rt.moveTo(0,Wr*2),Rt.lineTo(-Fe*Wr,-Wr),Rt.lineTo(Fe*Wr,-Wr),Rt.closePath()}},be=-.5,Ye=Math.sqrt(3)/2,mt=1/Math.sqrt(12),bt=(mt/2+1)*3,ft={draw:function(Rt,xr){var Wr=Math.sqrt(xr/bt),An=Wr/2,Xn=Wr*mt,na=An,ra=Wr*mt+Wr,Sn=-na,Wn=ra;Rt.moveTo(An,Xn),Rt.lineTo(na,ra),Rt.lineTo(Sn,Wn),Rt.lineTo(be*An-Ye*Xn,Ye*An+be*Xn),Rt.lineTo(be*na-Ye*ra,Ye*na+be*ra),Rt.lineTo(be*Sn-Ye*Wn,Ye*Sn+be*Wn),Rt.lineTo(be*An+Ye*Xn,be*Xn-Ye*An),Rt.lineTo(be*na+Ye*ra,be*ra-Ye*na),Rt.lineTo(be*Sn+Ye*Wn,be*Wn-Ye*Sn),Rt.closePath()}},Wt=[ue,_e,Ge,lt,ht,Pe,ft];function Zt(){var Rt=C(ue),xr=C(64),Wr=null;function An(){var Xn;if(Wr||(Wr=Xn=w.path()),Rt.apply(this,arguments).draw(Wr,+xr.apply(this,arguments)),Xn)return Wr=null,Xn+""||null}return An.type=function(Xn){return arguments.length?(Rt=typeof Xn=="function"?Xn:C(Xn),An):Rt},An.size=function(Xn){return arguments.length?(xr=typeof Xn=="function"?Xn:C(+Xn),An):xr},An.context=function(Xn){return arguments.length?(Wr=Xn??null,An):Wr},An}function cr(){}function pr(Rt,xr,Wr){Rt._context.bezierCurveTo((2*Rt._x0+Rt._x1)/3,(2*Rt._y0+Rt._y1)/3,(Rt._x0+2*Rt._x1)/3,(Rt._y0+2*Rt._y1)/3,(Rt._x0+4*Rt._x1+xr)/6,(Rt._y0+4*Rt._y1+Wr)/6)}function Br(Rt){this._context=Rt}Br.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:pr(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(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);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:pr(this,Rt,xr);break}this._x0=this._x1,this._x1=Rt,this._y0=this._y1,this._y1=xr}};function Fr(Rt){return new Br(Rt)}function cn(Rt){this._context=Rt}cn.prototype={areaStart:cr,areaEnd:cr,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(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._x2=Rt,this._y2=xr;break;case 1:this._point=2,this._x3=Rt,this._y3=xr;break;case 2:this._point=3,this._x4=Rt,this._y4=xr,this._context.moveTo((this._x0+4*this._x1+Rt)/6,(this._y0+4*this._y1+xr)/6);break;default:pr(this,Rt,xr);break}this._x0=this._x1,this._x1=Rt,this._y0=this._y1,this._y1=xr}};function Nr(Rt){return new cn(Rt)}function Jr(Rt){this._context=Rt}Jr.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(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Wr=(this._x0+4*this._x1+Rt)/6,An=(this._y0+4*this._y1+xr)/6;this._line?this._context.lineTo(Wr,An):this._context.moveTo(Wr,An);break;case 3:this._point=4;default:pr(this,Rt,xr);break}this._x0=this._x1,this._x1=Rt,this._y0=this._y1,this._y1=xr}};function Dt(Rt){return new Jr(Rt)}function $e(Rt,xr){this._basis=new Br(Rt),this._beta=xr}$e.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Rt=this._x,xr=this._y,Wr=Rt.length-1;if(Wr>0)for(var An=Rt[0],Xn=xr[0],na=Rt[Wr]-An,ra=xr[Wr]-Xn,Sn=-1,Wn;++Sn<=Wr;)Wn=Sn/Wr,this._basis.point(this._beta*Rt[Sn]+(1-this._beta)*(An+Wn*na),this._beta*xr[Sn]+(1-this._beta)*(Xn+Wn*ra));this._x=this._y=null,this._basis.lineEnd()},point:function(Rt,xr){this._x.push(+Rt),this._y.push(+xr)}};var ot=(function Rt(xr){function Wr(An){return xr===1?new Br(An):new $e(An,xr)}return Wr.beta=function(An){return Rt(+An)},Wr})(.85);function De(Rt,xr,Wr){Rt._context.bezierCurveTo(Rt._x1+Rt._k*(Rt._x2-Rt._x0),Rt._y1+Rt._k*(Rt._y2-Rt._y0),Rt._x2+Rt._k*(Rt._x1-xr),Rt._y2+Rt._k*(Rt._y1-Wr),Rt._x2,Rt._y2)}function Ee(Rt,xr){this._context=Rt,this._k=(1-xr)/6}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);break;case 1:this._point=2,this._x1=Rt,this._y1=xr;break;case 2:this._point=3;default:De(this,Rt,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Ae=(function Rt(xr){function Wr(An){return new Ee(An,xr)}return Wr.tension=function(An){return Rt(+An)},Wr})(0);function Ie(Rt,xr){this._context=Rt,this._k=(1-xr)/6}Ie.prototype={areaStart:cr,areaEnd:cr,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(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._x3=Rt,this._y3=xr;break;case 1:this._point=2,this._context.moveTo(this._x4=Rt,this._y4=xr);break;case 2:this._point=3,this._x5=Rt,this._y5=xr;break;default:De(this,Rt,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var tt=(function Rt(xr){function Wr(An){return new Ie(An,xr)}return Wr.tension=function(An){return Rt(+An)},Wr})(0);function st(Rt,xr){this._context=Rt,this._k=(1-xr)/6}st.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(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:De(this,Rt,xr);break}this._x0=this._x1,this._x1=this._x2,this._x2=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Ft=(function Rt(xr){function Wr(An){return new st(An,xr)}return Wr.tension=function(An){return Rt(+An)},Wr})(0);function Nt(Rt,xr,Wr){var An=Rt._x1,Xn=Rt._y1,na=Rt._x2,ra=Rt._y2;if(Rt._l01_a>o){var Sn=2*Rt._l01_2a+3*Rt._l01_a*Rt._l12_a+Rt._l12_2a,Wn=3*Rt._l01_a*(Rt._l01_a+Rt._l12_a);An=(An*Sn-Rt._x0*Rt._l12_2a+Rt._x2*Rt._l01_2a)/Wn,Xn=(Xn*Sn-Rt._y0*Rt._l12_2a+Rt._y2*Rt._l01_2a)/Wn}if(Rt._l23_a>o){var Fi=2*Rt._l23_2a+3*Rt._l23_a*Rt._l12_a+Rt._l12_2a,Ya=3*Rt._l23_a*(Rt._l23_a+Rt._l12_a);na=(na*Fi+Rt._x1*Rt._l23_2a-xr*Rt._l12_2a)/Ya,ra=(ra*Fi+Rt._y1*Rt._l23_2a-Wr*Rt._l12_2a)/Ya}Rt._context.bezierCurveTo(An,Xn,na,ra,Rt._x2,Rt._y2)}function Xt(Rt,xr){this._context=Rt,this._alpha=xr}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(Rt,xr){if(Rt=+Rt,xr=+xr,this._point){var Wr=this._x2-Rt,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Wr*Wr+An*An,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);break;case 1:this._point=2;break;case 2:this._point=3;default:Nt(this,Rt,xr);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=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var lr=(function Rt(xr){function Wr(An){return xr?new Xt(An,xr):new Ee(An,0)}return Wr.alpha=function(An){return Rt(+An)},Wr})(.5);function Rr(Rt,xr){this._context=Rt,this._alpha=xr}Rr.prototype={areaStart:cr,areaEnd:cr,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(Rt,xr){if(Rt=+Rt,xr=+xr,this._point){var Wr=this._x2-Rt,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Wr*Wr+An*An,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Rt,this._y3=xr;break;case 1:this._point=2,this._context.moveTo(this._x4=Rt,this._y4=xr);break;case 2:this._point=3,this._x5=Rt,this._y5=xr;break;default:Nt(this,Rt,xr);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=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Mr=(function Rt(xr){function Wr(An){return xr?new Rr(An,xr):new Ie(An,0)}return Wr.alpha=function(An){return Rt(+An)},Wr})(.5);function Sr(Rt,xr){this._context=Rt,this._alpha=xr}Sr.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(Rt,xr){if(Rt=+Rt,xr=+xr,this._point){var Wr=this._x2-Rt,An=this._y2-xr;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Wr*Wr+An*An,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:Nt(this,Rt,xr);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=Rt,this._y0=this._y1,this._y1=this._y2,this._y2=xr}};var Kr=(function Rt(xr){function Wr(An){return xr?new Sr(An,xr):new st(An,0)}return Wr.alpha=function(An){return Rt(+An)},Wr})(.5);function qn(Rt){this._context=Rt}qn.prototype={areaStart:cr,areaEnd:cr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Rt,xr){Rt=+Rt,xr=+xr,this._point?this._context.lineTo(Rt,xr):(this._point=1,this._context.moveTo(Rt,xr))}};function ha(Rt){return new qn(Rt)}function ia(Rt){return Rt<0?-1:1}function xa(Rt,xr,Wr){var An=Rt._x1-Rt._x0,Xn=xr-Rt._x1,na=(Rt._y1-Rt._y0)/(An||Xn<0&&-0),ra=(Wr-Rt._y1)/(Xn||An<0&&-0),Sn=(na*Xn+ra*An)/(An+Xn);return(ia(na)+ia(ra))*Math.min(Math.abs(na),Math.abs(ra),.5*Math.abs(Sn))||0}function ba(Rt,xr){var Wr=Rt._x1-Rt._x0;return Wr?(3*(Rt._y1-Rt._y0)/Wr-xr)/2:xr}function ea(Rt,xr,Wr){var An=Rt._x0,Xn=Rt._y0,na=Rt._x1,ra=Rt._y1,Sn=(na-An)/3;Rt._context.bezierCurveTo(An+Sn,Xn+Sn*xr,na-Sn,ra-Sn*Wr,na,ra)}function Za(Rt){this._context=Rt}Za.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:ea(this,this._t0,ba(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Rt,xr){var Wr=NaN;if(Rt=+Rt,xr=+xr,!(Rt===this._x1&&xr===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);break;case 1:this._point=2;break;case 2:this._point=3,ea(this,ba(this,Wr=xa(this,Rt,xr)),Wr);break;default:ea(this,this._t0,Wr=xa(this,Rt,xr));break}this._x0=this._x1,this._x1=Rt,this._y0=this._y1,this._y1=xr,this._t0=Wr}}};function ui(Rt){this._context=new _r(Rt)}(ui.prototype=Object.create(Za.prototype)).point=function(Rt,xr){Za.prototype.point.call(this,xr,Rt)};function _r(Rt){this._context=Rt}_r.prototype={moveTo:function(Rt,xr){this._context.moveTo(xr,Rt)},closePath:function(){this._context.closePath()},lineTo:function(Rt,xr){this._context.lineTo(xr,Rt)},bezierCurveTo:function(Rt,xr,Wr,An,Xn,na){this._context.bezierCurveTo(xr,Rt,An,Wr,na,Xn)}};function Qt(Rt){return new Za(Rt)}function yr(Rt){return new ui(Rt)}function br(Rt){this._context=Rt}br.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Rt=this._x,xr=this._y,Wr=Rt.length;if(Wr)if(this._line?this._context.lineTo(Rt[0],xr[0]):this._context.moveTo(Rt[0],xr[0]),Wr===2)this._context.lineTo(Rt[1],xr[1]);else for(var An=nn(Rt),Xn=nn(xr),na=0,ra=1;ra<Wr;++na,++ra)this._context.bezierCurveTo(An[0][na],Xn[0][na],An[1][na],Xn[1][na],Rt[ra],xr[ra]);(this._line||this._line!==0&&Wr===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(Rt,xr){this._x.push(+Rt),this._y.push(+xr)}};function nn(Rt){var xr,Wr=Rt.length-1,An,Xn=new Array(Wr),na=new Array(Wr),ra=new Array(Wr);for(Xn[0]=0,na[0]=2,ra[0]=Rt[0]+2*Rt[1],xr=1;xr<Wr-1;++xr)Xn[xr]=1,na[xr]=4,ra[xr]=4*Rt[xr]+2*Rt[xr+1];for(Xn[Wr-1]=2,na[Wr-1]=7,ra[Wr-1]=8*Rt[Wr-1]+Rt[Wr],xr=1;xr<Wr;++xr)An=Xn[xr]/na[xr-1],na[xr]-=An,ra[xr]-=An*ra[xr-1];for(Xn[Wr-1]=ra[Wr-1]/na[Wr-1],xr=Wr-2;xr>=0;--xr)Xn[xr]=(ra[xr]-Xn[xr+1])/na[xr];for(na[Wr-1]=(Rt[Wr]+Xn[Wr-1])/2,xr=0;xr<Wr-1;++xr)na[xr]=2*Rt[xr+1]-Xn[xr+1];return[Xn,na]}function wn(Rt){return new br(Rt)}function Ln(Rt,xr){this._context=Rt,this._t=xr}Ln.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Rt,xr){switch(Rt=+Rt,xr=+xr,this._point){case 0:this._point=1,this._line?this._context.lineTo(Rt,xr):this._context.moveTo(Rt,xr);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,xr),this._context.lineTo(Rt,xr);else{var Wr=this._x*(1-this._t)+Rt*this._t;this._context.lineTo(Wr,this._y),this._context.lineTo(Wr,xr)}break}}this._x=Rt,this._y=xr}};function Fn(Rt){return new Ln(Rt,.5)}function va(Rt){return new Ln(Rt,0)}function Da(Rt){return new Ln(Rt,1)}function Pa(Rt,xr){if((ra=Rt.length)>1)for(var Wr=1,An,Xn,na=Rt[xr[0]],ra,Sn=na.length;Wr<ra;++Wr)for(Xn=na,na=Rt[xr[Wr]],An=0;An<Sn;++An)na[An][1]+=na[An][0]=isNaN(Xn[An][1])?Xn[An][0]:Xn[An][1]}function Fa(Rt){for(var xr=Rt.length,Wr=new Array(xr);--xr>=0;)Wr[xr]=xr;return Wr}function $a(Rt,xr){return Rt[xr]}function oa(){var Rt=C([]),xr=Fa,Wr=Pa,An=$a;function Xn(na){var ra=Rt.apply(this,arguments),Sn,Wn=na.length,Fi=ra.length,Ya=new Array(Fi),Wi;for(Sn=0;Sn<Fi;++Sn){for(var uo=ra[Sn],Ao=Ya[Sn]=new Array(Wn),wo=0,Uo;wo<Wn;++wo)Ao[wo]=Uo=[0,+An(na[wo],uo,wo,na)],Uo.data=na[wo];Ao.key=uo}for(Sn=0,Wi=xr(Ya);Sn<Fi;++Sn)Ya[Wi[Sn]].index=Sn;return Wr(Ya,Wi),Ya}return Xn.keys=function(na){return arguments.length?(Rt=typeof na=="function"?na:C(de.call(na)),Xn):Rt},Xn.value=function(na){return arguments.length?(An=typeof na=="function"?na:C(+na),Xn):An},Xn.order=function(na){return arguments.length?(xr=na==null?Fa:typeof na=="function"?na:C(de.call(na)),Xn):xr},Xn.offset=function(na){return arguments.length?(Wr=na??Pa,Xn):Wr},Xn}function zi(Rt,xr){if((An=Rt.length)>0){for(var Wr,An,Xn=0,na=Rt[0].length,ra;Xn<na;++Xn){for(ra=Wr=0;Wr<An;++Wr)ra+=Rt[Wr][Xn][1]||0;if(ra)for(Wr=0;Wr<An;++Wr)Rt[Wr][Xn][1]/=ra}Pa(Rt,xr)}}function Gi(Rt,xr){if((Wn=Rt.length)>0)for(var Wr,An=0,Xn,na,ra,Sn,Wn,Fi=Rt[xr[0]].length;An<Fi;++An)for(ra=Sn=0,Wr=0;Wr<Wn;++Wr)(na=(Xn=Rt[xr[Wr]][An])[1]-Xn[0])>0?(Xn[0]=ra,Xn[1]=ra+=na):na<0?(Xn[1]=Sn,Xn[0]=Sn+=na):(Xn[0]=0,Xn[1]=na)}function qt(Rt,xr){if((Xn=Rt.length)>0){for(var Wr=0,An=Rt[xr[0]],Xn,na=An.length;Wr<na;++Wr){for(var ra=0,Sn=0;ra<Xn;++ra)Sn+=Rt[ra][Wr][1]||0;An[Wr][1]+=An[Wr][0]=-Sn/2}Pa(Rt,xr)}}function Ct(Rt,xr){if(!(!((ra=Rt.length)>0)||!((na=(Xn=Rt[xr[0]]).length)>0))){for(var Wr=0,An=1,Xn,na,ra;An<na;++An){for(var Sn=0,Wn=0,Fi=0;Sn<ra;++Sn){for(var Ya=Rt[xr[Sn]],Wi=Ya[An][1]||0,uo=Ya[An-1][1]||0,Ao=(Wi-uo)/2,wo=0;wo<Sn;++wo){var Uo=Rt[xr[wo]],Ri=Uo[An][1]||0,ps=Uo[An-1][1]||0;Ao+=Ri-ps}Wn+=Wi,Fi+=Ao*Wi}Xn[An-1][1]+=Xn[An-1][0]=Wr,Wn&&(Wr-=Fi/Wn)}Xn[An-1][1]+=Xn[An-1][0]=Wr,Pa(Rt,xr)}}function Ur(Rt){var xr=Rt.map(Qr);return Fa(Rt).sort(function(Wr,An){return xr[Wr]-xr[An]})}function Qr(Rt){for(var xr=-1,Wr=0,An=Rt.length,Xn,na=-1/0;++xr<An;)(Xn=+Rt[xr][1])>na&&(na=Xn,Wr=xr);return Wr}function tn(Rt){var xr=Rt.map(Xr);return Fa(Rt).sort(function(Wr,An){return xr[Wr]-xr[An]})}function Xr(Rt){for(var xr=0,Wr=-1,An=Rt.length,Xn;++Wr<An;)(Xn=+Rt[Wr][1])&&(xr+=Xn);return xr}function en(Rt){return tn(Rt).reverse()}function Tn(Rt){var xr=Rt.length,Wr,An,Xn=Rt.map(Xr),na=Ur(Rt),ra=0,Sn=0,Wn=[],Fi=[];for(Wr=0;Wr<xr;++Wr)An=na[Wr],ra<Sn?(ra+=Xn[An],Wn.push(An)):(Sn+=Xn[An],Fi.push(An));return Fi.reverse().concat(Wn)}function hn(Rt){return Fa(Rt).reverse()}v.arc=A,v.area=D,v.areaRadial=le,v.curveBasis=Fr,v.curveBasisClosed=Nr,v.curveBasisOpen=Dt,v.curveBundle=ot,v.curveCardinal=Ae,v.curveCardinalClosed=tt,v.curveCardinalOpen=Ft,v.curveCatmullRom=lr,v.curveCatmullRomClosed=Mr,v.curveCatmullRomOpen=Kr,v.curveLinear=f,v.curveLinearClosed=ha,v.curveMonotoneX=Qt,v.curveMonotoneY=yr,v.curveNatural=wn,v.curveStep=Fn,v.curveStepAfter=Da,v.curveStepBefore=va,v.line=N,v.lineRadial=J,v.linkHorizontal=oe,v.linkRadial=ce,v.linkVertical=Y,v.pie=V,v.pointRadial=ye,v.radialArea=le,v.radialLine=J,v.stack=oa,v.stackOffsetDiverging=Gi,v.stackOffsetExpand=zi,v.stackOffsetNone=Pa,v.stackOffsetSilhouette=qt,v.stackOffsetWiggle=Ct,v.stackOrderAppearance=Ur,v.stackOrderAscending=tn,v.stackOrderDescending=en,v.stackOrderInsideOut=Tn,v.stackOrderNone=Fa,v.stackOrderReverse=hn,v.symbol=Zt,v.symbolCircle=ue,v.symbolCross=_e,v.symbolDiamond=Ge,v.symbolSquare=lt,v.symbolStar=ht,v.symbolTriangle=Pe,v.symbolWye=ft,v.symbols=Wt,Object.defineProperty(v,"__esModule",{value:!0})})}}),Qte=Ne({"node_modules/@plotly/d3-sankey/build/d3-sankey.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,s6(),qR(),yF()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3)})(te,function(v,w,C,P){function t(f){return f.target.depth}function r(f){return f.depth}function a(f,p){return p-1-f.height}function l(f,p){return f.sourceLinks.length?f.depth:p-1}function i(f){return f.targetLinks.length?f.depth:f.sourceLinks.length?w.min(f.sourceLinks,t)-1:0}function s(f){return function(){return f}}function o(f,p){return d(f.source,p.source)||f.index-p.index}function u(f,p){return d(f.target,p.target)||f.index-p.index}function d(f,p){return f.y0-p.y0}function h(f){return f.value}function y(f){return(f.y0+f.y1)/2}function m(f){return y(f.source)*f.value}function E(f){return y(f.target)*f.value}function c(f){return f.index}function _(f){return f.nodes}function T(f){return f.links}function M(f,p){var x=f.get(p);if(!x)throw new Error("missing: "+p);return x}var k=function(){var f=0,p=0,x=1,N=1,D=24,B=8,U=c,V=l,q=_,z=T,H=32,G=2/3;function J(){var ie={nodes:q.apply(null,arguments),links:z.apply(null,arguments)};return le(ie),ye(ie),de(ie),me(ie),W(ie),ie}J.update=function(ie){return W(ie),ie},J.nodeId=function(ie){return arguments.length?(U=typeof ie=="function"?ie:s(ie),J):U},J.nodeAlign=function(ie){return arguments.length?(V=typeof ie=="function"?ie:s(ie),J):V},J.nodeWidth=function(ie){return arguments.length?(D=+ie,J):D},J.nodePadding=function(ie){return arguments.length?(B=+ie,J):B},J.nodes=function(ie){return arguments.length?(q=typeof ie=="function"?ie:s(ie),J):q},J.links=function(ie){return arguments.length?(z=typeof ie=="function"?ie:s(ie),J):z},J.size=function(ie){return arguments.length?(f=p=0,x=+ie[0],N=+ie[1],J):[x-f,N-p]},J.extent=function(ie){return arguments.length?(f=+ie[0][0],x=+ie[1][0],p=+ie[0][1],N=+ie[1][1],J):[[f,p],[x,N]]},J.iterations=function(ie){return arguments.length?(H=+ie,J):H};function le(ie){ie.nodes.forEach(function(ee,pe){ee.index=pe,ee.sourceLinks=[],ee.targetLinks=[]});var se=C.map(ie.nodes,U);ie.links.forEach(function(ee,pe){ee.index=pe;var oe=ee.source,Y=ee.target;typeof oe!="object"&&(oe=ee.source=M(se,oe)),typeof Y!="object"&&(Y=ee.target=M(se,Y)),oe.sourceLinks.push(ee),Y.targetLinks.push(ee)})}function ye(ie){ie.nodes.forEach(function(se){se.value=Math.max(w.sum(se.sourceLinks,h),w.sum(se.targetLinks,h))})}function de(ie){var se,ee,pe;for(se=ie.nodes,ee=[],pe=0;se.length;++pe,se=ee,ee=[])se.forEach(function(Y){Y.depth=pe,Y.sourceLinks.forEach(function(ce){ee.indexOf(ce.target)<0&&ee.push(ce.target)})});for(se=ie.nodes,ee=[],pe=0;se.length;++pe,se=ee,ee=[])se.forEach(function(Y){Y.height=pe,Y.targetLinks.forEach(function(ce){ee.indexOf(ce.source)<0&&ee.push(ce.source)})});var oe=(x-f-D)/(pe-1);ie.nodes.forEach(function(Y){Y.x1=(Y.x0=f+Math.max(0,Math.min(pe-1,Math.floor(V.call(null,Y,pe))))*oe)+D})}function me(ie){var se=C.nest().key(function(_e){return _e.x0}).sortKeys(w.ascending).entries(ie.nodes).map(function(_e){return _e.values});oe(),ue();for(var ee=1,pe=H;pe>0;--pe)ce(ee*=.99),ue(),Y(ee),ue();function oe(){var _e=w.max(se,function(Ge){return Ge.length}),Le=G*(N-p)/(_e-1);B>Le&&(B=Le);var ze=w.min(se,function(Ge){return(N-p-(Ge.length-1)*B)/w.sum(Ge,h)});se.forEach(function(Ge){Ge.forEach(function(Ve,rt){Ve.y1=(Ve.y0=rt)+Ve.value*ze})}),ie.links.forEach(function(Ge){Ge.width=Ge.value*ze})}function Y(_e){se.forEach(function(Le){Le.forEach(function(ze){if(ze.targetLinks.length){var Ge=(w.sum(ze.targetLinks,m)/w.sum(ze.targetLinks,h)-y(ze))*_e;ze.y0+=Ge,ze.y1+=Ge}})})}function ce(_e){se.slice().reverse().forEach(function(Le){Le.forEach(function(ze){if(ze.sourceLinks.length){var Ge=(w.sum(ze.sourceLinks,E)/w.sum(ze.sourceLinks,h)-y(ze))*_e;ze.y0+=Ge,ze.y1+=Ge}})})}function ue(){se.forEach(function(_e){var Le,ze,Ge=p,Ve=_e.length,rt;for(_e.sort(d),rt=0;rt<Ve;++rt)Le=_e[rt],ze=Ge-Le.y0,ze>0&&(Le.y0+=ze,Le.y1+=ze),Ge=Le.y1+B;if(ze=Ge-B-N,ze>0)for(Ge=Le.y0-=ze,Le.y1-=ze,rt=Ve-2;rt>=0;--rt)Le=_e[rt],ze=Le.y1+B-Ge,ze>0&&(Le.y0-=ze,Le.y1-=ze),Ge=Le.y0})}}function W(ie){ie.nodes.forEach(function(se){se.sourceLinks.sort(u),se.targetLinks.sort(o)}),ie.nodes.forEach(function(se){var ee=se.y0,pe=ee;se.sourceLinks.forEach(function(oe){oe.y0=ee+oe.width/2,ee+=oe.width}),se.targetLinks.forEach(function(oe){oe.y1=pe+oe.width/2,pe+=oe.width})})}return J};function b(f){return[f.source.x1,f.y0]}function A(f){return[f.target.x0,f.y1]}var g=function(){return P.linkHorizontal().source(b).target(A)};v.sankey=k,v.sankeyCenter=i,v.sankeyLeft=r,v.sankeyRight=a,v.sankeyJustify=l,v.sankeyLinkHorizontal=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),ere=Ne({"node_modules/elementary-circuits-directed-graph/johnson.js"(te,Z){var v=mF();Z.exports=function(C,P){var t=[],r=[],a=[],l={},i=[],s;function o(M){a[M]=!1,l.hasOwnProperty(M)&&Object.keys(l[M]).forEach(function(k){delete l[M][k],a[k]&&o(k)})}function u(M){var k=!1;r.push(M),a[M]=!0;var b,A;for(b=0;b<i[M].length;b++)A=i[M][b],A===s?(d(s,r),k=!0):a[A]||(k=u(A));if(k)o(M);else for(b=0;b<i[M].length;b++){A=i[M][b];var g=l[A];g||(g={},l[A]=g),g[A]=!0}return r.pop(),k}function d(M,k){var b=[].concat(k).concat(M);P?P(u):t.push(b)}function h(M){for(var k=0;k<C.length;k++)k<M&&(C[k]=[]),C[k]=C[k].filter(function(b){return b>=M})}function y(M){h(M);for(var k=C,b=v(k),A=b.components.filter(function(B){return B.length>1}),g=1/0,f,p=0;p<A.length;p++)for(var x=0;x<A[p].length;x++)A[p][x]<g&&(g=A[p][x],f=p);var N=A[f];if(!N)return!1;var D=C.map(function(B,U){return N.indexOf(U)===-1?[]:B.filter(function(V){return N.indexOf(V)!==-1})});return{leastVertex:g,adjList:D}}s=0;for(var m=C.length;s<m;){var E=y(s);if(s=E.leastVertex,i=E.adjList,i){for(var c=0;c<i.length;c++)for(var _=0;_<i[c].length;_++){var T=i[c][_];a[+T]=!1,l[T]={}}u(s),s=s+1}else s=m}if(!P)return t}}}),tre=Ne({"node_modules/@plotly/d3-sankey-circular/dist/d3-sankey-circular.js"(te,Z){(function(v,w){typeof te=="object"&&typeof Z<"u"?w(te,s6(),qR(),yF(),ere()):w(v.d3=v.d3||{},v.d3,v.d3,v.d3,null)})(te,function(v,w,C,P,t){t=t&&t.hasOwnProperty("default")?t.default:t;function r(Ve){return Ve.target.depth}function a(Ve){return Ve.depth}function l(Ve,rt){return rt-1-Ve.height}function i(Ve,rt){return Ve.sourceLinks.length?Ve.depth:rt-1}function s(Ve){return Ve.targetLinks.length?Ve.depth:Ve.sourceLinks.length?w.min(Ve.sourceLinks,r)-1:0}function o(Ve){return function(){return Ve}}var u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ve){return typeof Ve}:function(Ve){return Ve&&typeof Symbol=="function"&&Ve.constructor===Symbol&&Ve!==Symbol.prototype?"symbol":typeof Ve};function d(Ve,rt){return y(Ve.source,rt.source)||Ve.index-rt.index}function h(Ve,rt){return y(Ve.target,rt.target)||Ve.index-rt.index}function y(Ve,rt){return Ve.partOfCycle===rt.partOfCycle?Ve.y0-rt.y0:Ve.circularLinkType==="top"||rt.circularLinkType==="bottom"?-1:1}function m(Ve){return Ve.value}function E(Ve){return(Ve.y0+Ve.y1)/2}function c(Ve){return E(Ve.source)}function _(Ve){return E(Ve.target)}function T(Ve){return Ve.index}function M(Ve){return Ve.nodes}function k(Ve){return Ve.links}function b(Ve,rt){var pt=Ve.get(rt);if(!pt)throw new Error("missing: "+rt);return pt}function A(Ve,rt){return rt(Ve)}var g=25,f=10,p=.3;function x(){var Ve=0,rt=0,pt=1,gt=1,ht=24,lt,Fe=T,Pe=i,be=M,Ye=k,mt=32,bt=2,ft,Wt=null;function Zt(){var Dt={nodes:be.apply(null,arguments),links:Ye.apply(null,arguments)};cr(Dt),N(Dt,Fe,Wt),pr(Dt),cn(Dt),D(Dt,Fe),Nr(Dt,mt,Fe),Jr(Dt);for(var $e=4,ot=0;ot<$e;ot++)ce(Dt,gt,Fe),ue(Dt,gt,Fe),pe(Dt,rt,gt,Fe),ce(Dt,gt,Fe),ue(Dt,gt,Fe);return Ge(Dt,rt,gt),H(Dt,bt,gt,Fe),Dt}Zt.nodeId=function(Dt){return arguments.length?(Fe=typeof Dt=="function"?Dt:o(Dt),Zt):Fe},Zt.nodeAlign=function(Dt){return arguments.length?(Pe=typeof Dt=="function"?Dt:o(Dt),Zt):Pe},Zt.nodeWidth=function(Dt){return arguments.length?(ht=+Dt,Zt):ht},Zt.nodePadding=function(Dt){return arguments.length?(lt=+Dt,Zt):lt},Zt.nodes=function(Dt){return arguments.length?(be=typeof Dt=="function"?Dt:o(Dt),Zt):be},Zt.links=function(Dt){return arguments.length?(Ye=typeof Dt=="function"?Dt:o(Dt),Zt):Ye},Zt.size=function(Dt){return arguments.length?(Ve=rt=0,pt=+Dt[0],gt=+Dt[1],Zt):[pt-Ve,gt-rt]},Zt.extent=function(Dt){return arguments.length?(Ve=+Dt[0][0],pt=+Dt[1][0],rt=+Dt[0][1],gt=+Dt[1][1],Zt):[[Ve,rt],[pt,gt]]},Zt.iterations=function(Dt){return arguments.length?(mt=+Dt,Zt):mt},Zt.circularLinkGap=function(Dt){return arguments.length?(bt=+Dt,Zt):bt},Zt.nodePaddingRatio=function(Dt){return arguments.length?(ft=+Dt,Zt):ft},Zt.sortNodes=function(Dt){return arguments.length?(Wt=Dt,Zt):Wt},Zt.update=function(Dt){return D(Dt,Fe),Jr(Dt),Dt.links.forEach(function($e){$e.circular&&($e.circularLinkType=$e.y0+$e.y1<gt?"top":"bottom",$e.source.circularLinkType=$e.circularLinkType,$e.target.circularLinkType=$e.circularLinkType)}),ce(Dt,gt,Fe,!1),ue(Dt,gt,Fe),H(Dt,bt,gt,Fe),Dt};function cr(Dt){Dt.nodes.forEach(function(ot,De){ot.index=De,ot.sourceLinks=[],ot.targetLinks=[]});var $e=C.map(Dt.nodes,Fe);return Dt.links.forEach(function(ot,De){ot.index=De;var Ee=ot.source,Ae=ot.target;(typeof Ee>"u"?"undefined":u(Ee))!=="object"&&(Ee=ot.source=b($e,Ee)),(typeof Ae>"u"?"undefined":u(Ae))!=="object"&&(Ae=ot.target=b($e,Ae)),Ee.sourceLinks.push(ot),Ae.targetLinks.push(ot)}),Dt}function pr(Dt){Dt.nodes.forEach(function($e){$e.partOfCycle=!1,$e.value=Math.max(w.sum($e.sourceLinks,m),w.sum($e.targetLinks,m)),$e.sourceLinks.forEach(function(ot){ot.circular&&($e.partOfCycle=!0,$e.circularLinkType=ot.circularLinkType)}),$e.targetLinks.forEach(function(ot){ot.circular&&($e.partOfCycle=!0,$e.circularLinkType=ot.circularLinkType)})})}function Br(Dt){var $e=0,ot=0,De=0,Ee=0,Ae=w.max(Dt.nodes,function(Ie){return Ie.column});return Dt.links.forEach(function(Ie){Ie.circular&&(Ie.circularLinkType=="top"?$e=$e+Ie.width:ot=ot+Ie.width,Ie.target.column==0&&(Ee=Ee+Ie.width),Ie.source.column==Ae&&(De=De+Ie.width))}),$e=$e>0?$e+g+f:$e,ot=ot>0?ot+g+f:ot,De=De>0?De+g+f:De,Ee=Ee>0?Ee+g+f:Ee,{top:$e,bottom:ot,left:Ee,right:De}}function Fr(Dt,$e){var ot=w.max(Dt.nodes,function(Ft){return Ft.column}),De=pt-Ve,Ee=gt-rt,Ae=De+$e.right+$e.left,Ie=Ee+$e.top+$e.bottom,tt=De/Ae,st=Ee/Ie;return Ve=Ve*tt+$e.left,pt=$e.right==0?pt:pt*tt,rt=rt*st+$e.top,gt=gt*st,Dt.nodes.forEach(function(Ft){Ft.x0=Ve+Ft.column*((pt-Ve-ht)/ot),Ft.x1=Ft.x0+ht}),st}function cn(Dt){var $e,ot,De;for($e=Dt.nodes,ot=[],De=0;$e.length;++De,$e=ot,ot=[])$e.forEach(function(Ee){Ee.depth=De,Ee.sourceLinks.forEach(function(Ae){ot.indexOf(Ae.target)<0&&!Ae.circular&&ot.push(Ae.target)})});for($e=Dt.nodes,ot=[],De=0;$e.length;++De,$e=ot,ot=[])$e.forEach(function(Ee){Ee.height=De,Ee.targetLinks.forEach(function(Ae){ot.indexOf(Ae.source)<0&&!Ae.circular&&ot.push(Ae.source)})});Dt.nodes.forEach(function(Ee){Ee.column=Math.floor(Pe.call(null,Ee,De))})}function Nr(Dt,$e,ot){var De=C.nest().key(function(Ft){return Ft.column}).sortKeys(w.ascending).entries(Dt.nodes).map(function(Ft){return Ft.values});Ie(ot),st();for(var Ee=1,Ae=$e;Ae>0;--Ae)tt(Ee*=.99,ot),st();function Ie(Ft){if(ft){var Nt=1/0;De.forEach(function(Mr){var Sr=gt*ft/(Mr.length+1);Nt=Sr<Nt?Sr:Nt}),lt=Nt}var Xt=w.min(De,function(Mr){return(gt-rt-(Mr.length-1)*lt)/w.sum(Mr,m)});Xt=Xt*p,Dt.links.forEach(function(Mr){Mr.width=Mr.value*Xt});var lr=Br(Dt),Rr=Fr(Dt,lr);Xt=Xt*Rr,Dt.links.forEach(function(Mr){Mr.width=Mr.value*Xt}),De.forEach(function(Mr){var Sr=Mr.length;Mr.forEach(function(Kr,qn){Kr.depth==De.length-1&&Sr==1||Kr.depth==0&&Sr==1?(Kr.y0=gt/2-Kr.value*Xt,Kr.y1=Kr.y0+Kr.value*Xt):Kr.partOfCycle?V(Kr,Ft)==0?(Kr.y0=gt/2+qn,Kr.y1=Kr.y0+Kr.value*Xt):Kr.circularLinkType=="top"?(Kr.y0=rt+qn,Kr.y1=Kr.y0+Kr.value*Xt):(Kr.y0=gt-Kr.value*Xt-qn,Kr.y1=Kr.y0+Kr.value*Xt):lr.top==0||lr.bottom==0?(Kr.y0=(gt-rt)/Sr*qn,Kr.y1=Kr.y0+Kr.value*Xt):(Kr.y0=(gt-rt)/2-Sr/2+qn,Kr.y1=Kr.y0+Kr.value*Xt)})})}function tt(Ft,Nt){var Xt=De.length;De.forEach(function(lr){var Rr=lr.length,Mr=lr[0].depth;lr.forEach(function(Sr){var Kr;if((Sr.sourceLinks.length||Sr.targetLinks.length)&&!(Sr.partOfCycle&&V(Sr,Nt)>0))if(Mr==0&&Rr==1)Kr=Sr.y1-Sr.y0,Sr.y0=gt/2-Kr/2,Sr.y1=gt/2+Kr/2;else if(Mr==Xt-1&&Rr==1)Kr=Sr.y1-Sr.y0,Sr.y0=gt/2-Kr/2,Sr.y1=gt/2+Kr/2;else{var qn=0,ha=w.mean(Sr.sourceLinks,_),ia=w.mean(Sr.targetLinks,c);ha&&ia?qn=(ha+ia)/2:qn=ha||ia;var xa=(qn-E(Sr))*Ft;Sr.y0+=xa,Sr.y1+=xa}})})}function st(){De.forEach(function(Ft){var Nt,Xt,lr=rt,Rr=Ft.length,Mr;for(Ft.sort(y),Mr=0;Mr<Rr;++Mr)Nt=Ft[Mr],Xt=lr-Nt.y0,Xt>0&&(Nt.y0+=Xt,Nt.y1+=Xt),lr=Nt.y1+lt;if(Xt=lr-lt-gt,Xt>0)for(lr=Nt.y0-=Xt,Nt.y1-=Xt,Mr=Rr-2;Mr>=0;--Mr)Nt=Ft[Mr],Xt=Nt.y1+lt-lr,Xt>0&&(Nt.y0-=Xt,Nt.y1-=Xt),lr=Nt.y0})}}function Jr(Dt){Dt.nodes.forEach(function($e){$e.sourceLinks.sort(h),$e.targetLinks.sort(d)}),Dt.nodes.forEach(function($e){var ot=$e.y0,De=ot,Ee=$e.y1,Ae=Ee;$e.sourceLinks.forEach(function(Ie){Ie.circular?(Ie.y0=Ee-Ie.width/2,Ee=Ee-Ie.width):(Ie.y0=ot+Ie.width/2,ot+=Ie.width)}),$e.targetLinks.forEach(function(Ie){Ie.circular?(Ie.y1=Ae-Ie.width/2,Ae=Ae-Ie.width):(Ie.y1=De+Ie.width/2,De+=Ie.width)})})}return Zt}function N(Ve,rt,pt){var gt=0;if(pt===null){for(var ht=[],lt=0;lt<Ve.links.length;lt++){var Fe=Ve.links[lt],Pe=Fe.source.index,be=Fe.target.index;ht[Pe]||(ht[Pe]=[]),ht[be]||(ht[be]=[]),ht[Pe].indexOf(be)===-1&&ht[Pe].push(be)}var Ye=t(ht);Ye.sort(function(Wt,Zt){return Wt.length-Zt.length});var mt={};for(lt=0;lt<Ye.length;lt++){var bt=Ye[lt],ft=bt.slice(-2);mt[ft[0]]||(mt[ft[0]]={}),mt[ft[0]][ft[1]]=!0}Ve.links.forEach(function(Wt){var Zt=Wt.target.index,cr=Wt.source.index;Zt===cr||mt[cr]&&mt[cr][Zt]?(Wt.circular=!0,Wt.circularLinkID=gt,gt=gt+1):Wt.circular=!1})}else Ve.links.forEach(function(Wt){Wt.source[pt]<Wt.target[pt]?Wt.circular=!1:(Wt.circular=!0,Wt.circularLinkID=gt,gt=gt+1)})}function D(Ve,rt){var pt=0,gt=0;Ve.links.forEach(function(ht){ht.circular&&(ht.source.circularLinkType||ht.target.circularLinkType?ht.circularLinkType=ht.source.circularLinkType?ht.source.circularLinkType:ht.target.circularLinkType:ht.circularLinkType=pt<gt?"top":"bottom",ht.circularLinkType=="top"?pt=pt+1:gt=gt+1,Ve.nodes.forEach(function(lt){(A(lt,rt)==A(ht.source,rt)||A(lt,rt)==A(ht.target,rt))&&(lt.circularLinkType=ht.circularLinkType)}))}),Ve.links.forEach(function(ht){ht.circular&&(ht.source.circularLinkType==ht.target.circularLinkType&&(ht.circularLinkType=ht.source.circularLinkType),ze(ht,rt)&&(ht.circularLinkType=ht.source.circularLinkType))})}function B(Ve){var rt=Math.abs(Ve.y1-Ve.y0),pt=Math.abs(Ve.target.x0-Ve.source.x1);return Math.atan(pt/rt)}function U(Ve,rt){return Ve.source.column<rt.target.column?!1:!(Ve.target.column>rt.source.column)}function V(Ve,rt){var pt=0;Ve.sourceLinks.forEach(function(ht){pt=ht.circular&&!ze(ht,rt)?pt+1:pt});var gt=0;return Ve.targetLinks.forEach(function(ht){gt=ht.circular&&!ze(ht,rt)?gt+1:gt}),pt+gt}function q(Ve){var rt=Ve.source.sourceLinks,pt=0;rt.forEach(function(lt){pt=lt.circular?pt+1:pt});var gt=Ve.target.targetLinks,ht=0;return gt.forEach(function(lt){ht=lt.circular?ht+1:ht}),!(pt>1||ht>1)}function z(Ve,rt,pt){return Ve.sort(J),Ve.forEach(function(gt,ht){var lt=0;if(ze(gt,pt)&&q(gt))gt.circularPathData.verticalBuffer=lt+gt.width/2;else{var Fe=0;for(Fe;Fe<ht;Fe++)if(U(Ve[ht],Ve[Fe])){var Pe=Ve[Fe].circularPathData.verticalBuffer+Ve[Fe].width/2+rt;lt=Pe>lt?Pe:lt}gt.circularPathData.verticalBuffer=lt+gt.width/2}}),Ve}function H(Ve,rt,pt,gt){var ht=5,lt=w.min(Ve.links,function(be){return be.source.y0});Ve.links.forEach(function(be){be.circular&&(be.circularPathData={})});var Fe=Ve.links.filter(function(be){return be.circularLinkType=="top"});z(Fe,rt,gt);var Pe=Ve.links.filter(function(be){return be.circularLinkType=="bottom"});z(Pe,rt,gt),Ve.links.forEach(function(be){if(be.circular){if(be.circularPathData.arcRadius=be.width+f,be.circularPathData.leftNodeBuffer=ht,be.circularPathData.rightNodeBuffer=ht,be.circularPathData.sourceWidth=be.source.x1-be.source.x0,be.circularPathData.sourceX=be.source.x0+be.circularPathData.sourceWidth,be.circularPathData.targetX=be.target.x0,be.circularPathData.sourceY=be.y0,be.circularPathData.targetY=be.y1,ze(be,gt)&&q(be))be.circularPathData.leftSmallArcRadius=f+be.width/2,be.circularPathData.leftLargeArcRadius=f+be.width/2,be.circularPathData.rightSmallArcRadius=f+be.width/2,be.circularPathData.rightLargeArcRadius=f+be.width/2,be.circularLinkType=="bottom"?(be.circularPathData.verticalFullExtent=be.source.y1+g+be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.rightLargeArcRadius):(be.circularPathData.verticalFullExtent=be.source.y0-g-be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.rightLargeArcRadius);else{var Ye=be.source.column,mt=be.circularLinkType,bt=Ve.links.filter(function(Zt){return Zt.source.column==Ye&&Zt.circularLinkType==mt});be.circularLinkType=="bottom"?bt.sort(ye):bt.sort(le);var ft=0;bt.forEach(function(Zt,cr){Zt.circularLinkID==be.circularLinkID&&(be.circularPathData.leftSmallArcRadius=f+be.width/2+ft,be.circularPathData.leftLargeArcRadius=f+be.width/2+cr*rt+ft),ft=ft+Zt.width}),Ye=be.target.column,bt=Ve.links.filter(function(Zt){return Zt.target.column==Ye&&Zt.circularLinkType==mt}),be.circularLinkType=="bottom"?bt.sort(me):bt.sort(de),ft=0,bt.forEach(function(Zt,cr){Zt.circularLinkID==be.circularLinkID&&(be.circularPathData.rightSmallArcRadius=f+be.width/2+ft,be.circularPathData.rightLargeArcRadius=f+be.width/2+cr*rt+ft),ft=ft+Zt.width}),be.circularLinkType=="bottom"?(be.circularPathData.verticalFullExtent=Math.max(pt,be.source.y1,be.target.y1)+g+be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent-be.circularPathData.rightLargeArcRadius):(be.circularPathData.verticalFullExtent=lt-g-be.circularPathData.verticalBuffer,be.circularPathData.verticalLeftInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.leftLargeArcRadius,be.circularPathData.verticalRightInnerExtent=be.circularPathData.verticalFullExtent+be.circularPathData.rightLargeArcRadius)}be.circularPathData.leftInnerExtent=be.circularPathData.sourceX+be.circularPathData.leftNodeBuffer,be.circularPathData.rightInnerExtent=be.circularPathData.targetX-be.circularPathData.rightNodeBuffer,be.circularPathData.leftFullExtent=be.circularPathData.sourceX+be.circularPathData.leftLargeArcRadius+be.circularPathData.leftNodeBuffer,be.circularPathData.rightFullExtent=be.circularPathData.targetX-be.circularPathData.rightLargeArcRadius-be.circularPathData.rightNodeBuffer}if(be.circular)be.path=G(be);else{var Wt=P.linkHorizontal().source(function(Zt){var cr=Zt.source.x0+(Zt.source.x1-Zt.source.x0),pr=Zt.y0;return[cr,pr]}).target(function(Zt){var cr=Zt.target.x0,pr=Zt.y1;return[cr,pr]});be.path=Wt(be)}})}function G(Ve){var rt="";return Ve.circularLinkType=="top"?rt="M"+Ve.circularPathData.sourceX+" "+Ve.circularPathData.sourceY+" L"+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.sourceY+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftSmallArcRadius+" 0 0 0 "+Ve.circularPathData.leftFullExtent+" "+(Ve.circularPathData.sourceY-Ve.circularPathData.leftSmallArcRadius)+" L"+Ve.circularPathData.leftFullExtent+" "+Ve.circularPathData.verticalLeftInnerExtent+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftLargeArcRadius+" 0 0 0 "+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" L"+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightLargeArcRadius+" 0 0 0 "+Ve.circularPathData.rightFullExtent+" "+Ve.circularPathData.verticalRightInnerExtent+" L"+Ve.circularPathData.rightFullExtent+" "+(Ve.circularPathData.targetY-Ve.circularPathData.rightSmallArcRadius)+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightSmallArcRadius+" 0 0 0 "+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.targetY+" L"+Ve.circularPathData.targetX+" "+Ve.circularPathData.targetY:rt="M"+Ve.circularPathData.sourceX+" "+Ve.circularPathData.sourceY+" L"+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.sourceY+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftSmallArcRadius+" 0 0 1 "+Ve.circularPathData.leftFullExtent+" "+(Ve.circularPathData.sourceY+Ve.circularPathData.leftSmallArcRadius)+" L"+Ve.circularPathData.leftFullExtent+" "+Ve.circularPathData.verticalLeftInnerExtent+" A"+Ve.circularPathData.leftLargeArcRadius+" "+Ve.circularPathData.leftLargeArcRadius+" 0 0 1 "+Ve.circularPathData.leftInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" L"+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.verticalFullExtent+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightLargeArcRadius+" 0 0 1 "+Ve.circularPathData.rightFullExtent+" "+Ve.circularPathData.verticalRightInnerExtent+" L"+Ve.circularPathData.rightFullExtent+" "+(Ve.circularPathData.targetY+Ve.circularPathData.rightSmallArcRadius)+" A"+Ve.circularPathData.rightLargeArcRadius+" "+Ve.circularPathData.rightSmallArcRadius+" 0 0 1 "+Ve.circularPathData.rightInnerExtent+" "+Ve.circularPathData.targetY+" L"+Ve.circularPathData.targetX+" "+Ve.circularPathData.targetY,rt}function J(Ve,rt){return W(Ve)==W(rt)?Ve.circularLinkType=="bottom"?ye(Ve,rt):le(Ve,rt):W(rt)-W(Ve)}function le(Ve,rt){return Ve.y0-rt.y0}function ye(Ve,rt){return rt.y0-Ve.y0}function de(Ve,rt){return Ve.y1-rt.y1}function me(Ve,rt){return rt.y1-Ve.y1}function W(Ve){return Ve.target.column-Ve.source.column}function ie(Ve){return Ve.target.x0-Ve.source.x1}function se(Ve,rt){var pt=B(Ve),gt=ie(rt)/Math.tan(pt),ht=Le(Ve)=="up"?Ve.y1+gt:Ve.y1-gt;return ht}function ee(Ve,rt){var pt=B(Ve),gt=ie(rt)/Math.tan(pt),ht=Le(Ve)=="up"?Ve.y1-gt:Ve.y1+gt;return ht}function pe(Ve,rt,pt,gt){Ve.links.forEach(function(ht){if(!ht.circular&&ht.target.column-ht.source.column>1){var lt=ht.source.column+1,Fe=ht.target.column-1,Pe=1,be=Fe-lt+1;for(Pe=1;lt<=Fe;lt++,Pe++)Ve.nodes.forEach(function(Ye){if(Ye.column==lt){var mt=Pe/(be+1),bt=Math.pow(1-mt,3),ft=3*mt*Math.pow(1-mt,2),Wt=3*Math.pow(mt,2)*(1-mt),Zt=Math.pow(mt,3),cr=bt*ht.y0+ft*ht.y0+Wt*ht.y1+Zt*ht.y1,pr=cr-ht.width/2,Br=cr+ht.width/2,Fr;pr>Ye.y0&&pr<Ye.y1?(Fr=Ye.y1-pr+10,Fr=Ye.circularLinkType=="bottom"?Fr:-Fr,Ye=Y(Ye,Fr,rt,pt),Ve.nodes.forEach(function(cn){A(cn,gt)==A(Ye,gt)||cn.column!=Ye.column||oe(Ye,cn)&&Y(cn,Fr,rt,pt)})):Br>Ye.y0&&Br<Ye.y1?(Fr=Br-Ye.y0+10,Ye=Y(Ye,Fr,rt,pt),Ve.nodes.forEach(function(cn){A(cn,gt)==A(Ye,gt)||cn.column!=Ye.column||cn.y0<Ye.y1&&cn.y1>Ye.y1&&Y(cn,Fr,rt,pt)})):pr<Ye.y0&&Br>Ye.y1&&(Fr=Br-Ye.y0+10,Ye=Y(Ye,Fr,rt,pt),Ve.nodes.forEach(function(cn){A(cn,gt)==A(Ye,gt)||cn.column!=Ye.column||cn.y0<Ye.y1&&cn.y1>Ye.y1&&Y(cn,Fr,rt,pt)}))}})}})}function oe(Ve,rt){return Ve.y0>rt.y0&&Ve.y0<rt.y1||Ve.y1>rt.y0&&Ve.y1<rt.y1?!0:Ve.y0<rt.y0&&Ve.y1>rt.y1}function Y(Ve,rt,pt,gt){return Ve.y0+rt>=pt&&Ve.y1+rt<=gt&&(Ve.y0=Ve.y0+rt,Ve.y1=Ve.y1+rt,Ve.targetLinks.forEach(function(ht){ht.y1=ht.y1+rt}),Ve.sourceLinks.forEach(function(ht){ht.y0=ht.y0+rt})),Ve}function ce(Ve,rt,pt,gt){Ve.nodes.forEach(function(ht){gt&&ht.y+(ht.y1-ht.y0)>rt&&(ht.y=ht.y-(ht.y+(ht.y1-ht.y0)-rt));var lt=Ve.links.filter(function(be){return A(be.source,pt)==A(ht,pt)}),Fe=lt.length;Fe>1&&lt.sort(function(be,Ye){if(!be.circular&&!Ye.circular){if(be.target.column==Ye.target.column)return be.y1-Ye.y1;if(_e(be,Ye)){if(be.target.column>Ye.target.column){var mt=ee(Ye,be);return be.y1-mt}if(Ye.target.column>be.target.column){var bt=ee(be,Ye);return bt-Ye.y1}}else return be.y1-Ye.y1}if(be.circular&&!Ye.circular)return be.circularLinkType=="top"?-1:1;if(Ye.circular&&!be.circular)return Ye.circularLinkType=="top"?1:-1;if(be.circular&&Ye.circular)return be.circularLinkType===Ye.circularLinkType&&be.circularLinkType=="top"?be.target.column===Ye.target.column?be.target.y1-Ye.target.y1:Ye.target.column-be.target.column:be.circularLinkType===Ye.circularLinkType&&be.circularLinkType=="bottom"?be.target.column===Ye.target.column?Ye.target.y1-be.target.y1:be.target.column-Ye.target.column:be.circularLinkType=="top"?-1:1});var Pe=ht.y0;lt.forEach(function(be){be.y0=Pe+be.width/2,Pe=Pe+be.width}),lt.forEach(function(be,Ye){if(be.circularLinkType=="bottom"){var mt=Ye+1,bt=0;for(mt;mt<Fe;mt++)bt=bt+lt[mt].width;be.y0=ht.y1-bt-be.width/2}})})}function ue(Ve,rt,pt){Ve.nodes.forEach(function(gt){var ht=Ve.links.filter(function(Pe){return A(Pe.target,pt)==A(gt,pt)}),lt=ht.length;lt>1&&ht.sort(function(Pe,be){if(!Pe.circular&&!be.circular){if(Pe.source.column==be.source.column)return Pe.y0-be.y0;if(_e(Pe,be)){if(be.source.column<Pe.source.column){var Ye=se(be,Pe);return Pe.y0-Ye}if(Pe.source.column<be.source.column){var mt=se(Pe,be);return mt-be.y0}}else return Pe.y0-be.y0}if(Pe.circular&&!be.circular)return Pe.circularLinkType=="top"?-1:1;if(be.circular&&!Pe.circular)return be.circularLinkType=="top"?1:-1;if(Pe.circular&&be.circular)return Pe.circularLinkType===be.circularLinkType&&Pe.circularLinkType=="top"?Pe.source.column===be.source.column?Pe.source.y1-be.source.y1:Pe.source.column-be.source.column:Pe.circularLinkType===be.circularLinkType&&Pe.circularLinkType=="bottom"?Pe.source.column===be.source.column?Pe.source.y1-be.source.y1:be.source.column-Pe.source.column:Pe.circularLinkType=="top"?-1:1});var Fe=gt.y0;ht.forEach(function(Pe){Pe.y1=Fe+Pe.width/2,Fe=Fe+Pe.width}),ht.forEach(function(Pe,be){if(Pe.circularLinkType=="bottom"){var Ye=be+1,mt=0;for(Ye;Ye<lt;Ye++)mt=mt+ht[Ye].width;Pe.y1=gt.y1-mt-Pe.width/2}})})}function _e(Ve,rt){return Le(Ve)==Le(rt)}function Le(Ve){return Ve.y0-Ve.y1>0?"up":"down"}function ze(Ve,rt){return A(Ve.source,rt)==A(Ve.target,rt)}function Ge(Ve,rt,pt){var gt=Ve.nodes,ht=Ve.links,lt=!1,Fe=!1;if(ht.forEach(function(ft){ft.circularLinkType=="top"?lt=!0:ft.circularLinkType=="bottom"&&(Fe=!0)}),lt==!1||Fe==!1){var Pe=w.min(gt,function(ft){return ft.y0}),be=w.max(gt,function(ft){return ft.y1}),Ye=be-Pe,mt=pt-rt,bt=mt/Ye;gt.forEach(function(ft){var Wt=(ft.y1-ft.y0)*bt;ft.y0=(ft.y0-Pe)*bt,ft.y1=ft.y0+Wt}),ht.forEach(function(ft){ft.y0=(ft.y0-Pe)*bt,ft.y1=(ft.y1-Pe)*bt,ft.width=ft.width*bt})}}v.sankeyCircular=x,v.sankeyCenter=s,v.sankeyLeft=a,v.sankeyRight=l,v.sankeyJustify=i,Object.defineProperty(v,"__esModule",{value:!0})})}}),gF=Ne({"src/traces/sankey/constants.js"(te,Z){Z.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"}}}}),rre=Ne({"src/traces/sankey/render.js"(te,Z){var v=Kte(),w=(bo(),$r(Ui)).interpolateNumber,C=xn(),P=Qte(),t=tre(),r=gF(),a=Ro(),l=io(),i=zs(),s=In(),o=s.strTranslate,u=s.strRotate,d=a1(),h=d.keyFun,y=d.repeat,m=d.unwrap,E=uc(),c=Xo(),_=bd(),T=_.CAP_SHIFT,M=_.LINE_SPACING,k=3;function b(se,ee,pe){var oe=m(ee),Y=oe.trace,ce=Y.domain,ue=Y.orientation==="h",_e=Y.node.pad,Le=Y.node.thickness,ze={justify:P.sankeyJustify,left:P.sankeyLeft,right:P.sankeyRight,center:P.sankeyCenter}[Y.node.align],Ge=se.width*(ce.x[1]-ce.x[0]),Ve=se.height*(ce.y[1]-ce.y[0]),rt=oe._nodes,pt=oe._links,gt=oe.circular,ht;gt?ht=t.sankeyCircular().circularLinkGap(0):ht=P.sankey(),ht.iterations(r.sankeyIterations).size(ue?[Ge,Ve]:[Ve,Ge]).nodeWidth(Le).nodePadding(_e).nodeId(function(cn){return cn.pointNumber}).nodeAlign(ze).nodes(rt).links(pt);var lt=ht();ht.nodePadding()<_e&&s.warn("node.pad was reduced to ",ht.nodePadding()," to fit within the figure.");var Fe,Pe,be;for(var Ye in oe._groupLookup){var mt=parseInt(oe._groupLookup[Ye]),bt;for(Fe=0;Fe<lt.nodes.length;Fe++)if(lt.nodes[Fe].pointNumber===mt){bt=lt.nodes[Fe];break}if(bt){var ft={pointNumber:parseInt(Ye),x0:bt.x0,x1:bt.x1,y0:bt.y0,y1:bt.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};lt.nodes.unshift(ft),bt.childrenNodes.unshift(ft)}}function Wt(){for(Fe=0;Fe<lt.nodes.length;Fe++){var cn=lt.nodes[Fe],Nr={},Jr,Dt;for(Pe=0;Pe<cn.targetLinks.length;Pe++)Dt=cn.targetLinks[Pe],Jr=Dt.source.pointNumber+":"+Dt.target.pointNumber,Nr.hasOwnProperty(Jr)||(Nr[Jr]=[]),Nr[Jr].push(Dt);var $e=Object.keys(Nr);for(Pe=0;Pe<$e.length;Pe++){Jr=$e[Pe];var ot=Nr[Jr],De=0,Ee={};for(be=0;be<ot.length;be++)Dt=ot[be],Ee[Dt.label]||(Ee[Dt.label]=0),Ee[Dt.label]+=Dt.value,De+=Dt.value;for(be=0;be<ot.length;be++)Dt=ot[be],Dt.flow={value:De,labelConcentration:Ee[Dt.label]/De,concentration:Dt.value/De,links:ot},Dt.concentrationscale&&(Dt.color=a(Dt.concentrationscale(Dt.flow.labelConcentration)))}var Ae=0;for(Pe=0;Pe<cn.sourceLinks.length;Pe++)Ae+=cn.sourceLinks[Pe].value;for(Pe=0;Pe<cn.sourceLinks.length;Pe++)Dt=cn.sourceLinks[Pe],Dt.concentrationOut=Dt.value/Ae;var Ie=0;for(Pe=0;Pe<cn.targetLinks.length;Pe++)Ie+=cn.targetLinks[Pe].value;for(Pe=0;Pe<cn.targetLinks.length;Pe++)Dt=cn.targetLinks[Pe],Dt.concenrationIn=Dt.value/Ie}}Wt();function Zt(cn){cn.forEach(function(Nr){var Jr,Dt,$e=0,ot=Nr.length,De;for(Nr.sort(function(Ee,Ae){return Ee.y0-Ae.y0}),De=0;De<ot;++De)Jr=Nr[De],Jr.y0>=$e||(Dt=$e-Jr.y0,Dt>1e-6&&(Jr.y0+=Dt,Jr.y1+=Dt)),$e=Jr.y1+_e})}function cr(cn){var Nr=cn.map(function(Ae,Ie){return{x0:Ae.x0,index:Ie}}).sort(function(Ae,Ie){return Ae.x0-Ie.x0}),Jr=[],Dt=-1,$e,ot=-1/0,De;for(Fe=0;Fe<Nr.length;Fe++){var Ee=cn[Nr[Fe].index];Ee.x0>ot+Le&&(Dt+=1,$e=Ee.x0),ot=Ee.x0,Jr[Dt]||(Jr[Dt]=[]),Jr[Dt].push(Ee),De=$e-Ee.x0,Ee.x0+=De,Ee.x1+=De}return Jr}if(Y.node.x.length&&Y.node.y.length){for(Fe=0;Fe<Math.min(Y.node.x.length,Y.node.y.length,lt.nodes.length);Fe++)if(Y.node.x[Fe]&&Y.node.y[Fe]){var pr=[Y.node.x[Fe]*Ge,Y.node.y[Fe]*Ve];lt.nodes[Fe].x0=pr[0]-Le/2,lt.nodes[Fe].x1=pr[0]+Le/2;var Br=lt.nodes[Fe].y1-lt.nodes[Fe].y0;lt.nodes[Fe].y0=pr[1]-Br/2,lt.nodes[Fe].y1=pr[1]+Br/2}if(Y.arrangement==="snap"){rt=lt.nodes;var Fr=cr(rt);Zt(Fr)}ht.update(lt)}return{circular:gt,key:pe,trace:Y,guid:s.randstr(),horizontal:ue,width:Ge,height:Ve,nodePad:Y.node.pad,nodeLineColor:Y.node.line.color,nodeLineWidth:Y.node.line.width,linkLineColor:Y.link.line.color,linkLineWidth:Y.link.line.width,linkArrowLength:Y.link.arrowlen,valueFormat:Y.valueformat,valueSuffix:Y.valuesuffix,textFont:Y.textfont,translateX:ce.x[0]*se.width+se.margin.l,translateY:se.height-ce.y[1]*se.height+se.margin.t,dragParallel:ue?Ve:Ge,dragPerpendicular:ue?Ge:Ve,arrangement:Y.arrangement,sankey:ht,graph:lt,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(se,ee,pe){var oe=a(ee.color),Y=a(ee.hovercolor),ce=ee.source.label+"|"+ee.target.label,ue=ce+"__"+pe;return ee.trace=se.trace,ee.curveNumber=se.trace.index,{circular:se.circular,key:ue,traceId:se.key,pointNumber:ee.pointNumber,link:ee,tinyColorHue:l.tinyRGB(oe),tinyColorAlpha:oe.getAlpha(),tinyColorHoverHue:l.tinyRGB(Y),tinyColorHoverAlpha:Y.getAlpha(),linkPath:f,linkLineColor:se.linkLineColor,linkLineWidth:se.linkLineWidth,linkArrowLength:se.linkArrowLength,valueFormat:se.valueFormat,valueSuffix:se.valueSuffix,sankey:se.sankey,parent:se,interactionState:se.interactionState,flow:ee.flow}}function g(se,ee){var pe="",oe=se.width/2,Y=se.circularPathData,ce=Y.sourceX+Y.verticalBuffer<Y.targetX,ue=Y.rightFullExtent-Y.rightLargeArcRadius-ee<=Y.leftFullExtent-oe;return Math.abs(Y.rightFullExtent-Y.leftFullExtent-oe)<oe,se.circularLinkType==="top"?(pe="M "+(Y.targetX-ee)+" "+(Y.targetY+oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.targetY+oe)+"A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightSmallArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent-oe-ee)+" "+(Y.targetY-Y.rightSmallArcRadius)+"L "+(Y.rightFullExtent-oe-ee)+" "+Y.verticalRightInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius+oe))+" L "+(Y.rightFullExtent+oe-(Y.rightLargeArcRadius-oe)-ee)+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius+oe))+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 0 "+(Y.rightFullExtent-oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius-oe))+" L "+(Y.leftFullExtent+oe+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalRightInnerExtent-(Y.rightLargeArcRadius-oe))+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 1 "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent-oe)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent,pe+=" L "+(Y.leftFullExtent+oe)+" "+(Y.sourceY-Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.sourceY+oe)+" L "+Y.sourceX+" "+(Y.sourceY+oe)+" L "+Y.sourceX+" "+(Y.sourceY-oe)+" L "+Y.leftInnerExtent+" "+(Y.sourceY-oe)+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftSmallArcRadius-oe)+" 0 0 0 "+(Y.leftFullExtent-oe)+" "+(Y.sourceY-Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-oe)+" "+Y.verticalLeftInnerExtent,ce&&ue?pe+=" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent-oe)+" "+(Y.verticalFullExtent+oe)+"L"+(Y.rightFullExtent+oe-ee)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightFullExtent-oe-ee)+" "+(Y.verticalFullExtent-oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:pe+=" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent,pe+=" L "+(Y.rightFullExtent+oe-ee)+" "+(Y.targetY-Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 0 "+(Y.rightInnerExtent-ee)+" "+(Y.targetY-oe)+" L "+(Y.targetX-ee)+" "+(Y.targetY-oe)+(ee>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"):(pe="M "+(Y.targetX-ee)+" "+(Y.targetY-oe)+"  L "+(Y.rightInnerExtent-ee)+" "+(Y.targetY-oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightSmallArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent-oe-ee)+" "+(Y.targetY+Y.rightSmallArcRadius)+" L "+(Y.rightFullExtent-oe-ee)+" "+Y.verticalRightInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightInnerExtent-oe-ee)+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightFullExtent+oe-ee-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent-ee-oe-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" L "+(Y.leftFullExtent+oe+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent:pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent+oe)+" L "+Y.leftInnerExtent+" "+(Y.verticalFullExtent+oe)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+Y.verticalLeftInnerExtent,pe+=" L "+(Y.leftFullExtent+oe)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" A "+(Y.leftLargeArcRadius+oe)+" "+(Y.leftSmallArcRadius+oe)+" 0 0 0 "+Y.leftInnerExtent+" "+(Y.sourceY-oe)+" L "+Y.sourceX+" "+(Y.sourceY-oe)+" L "+Y.sourceX+" "+(Y.sourceY+oe)+" L "+Y.leftInnerExtent+" "+(Y.sourceY+oe)+" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent-oe)+" "+(Y.sourceY+Y.leftSmallArcRadius)+" L "+(Y.leftFullExtent-oe)+" "+Y.verticalLeftInnerExtent,ce&&ue?pe+=" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.leftFullExtent-oe-(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightFullExtent+oe-ee+(Y.rightLargeArcRadius-oe))+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:ce?pe+=" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.leftFullExtent+oe)+" "+(Y.verticalFullExtent+oe)+" L "+(Y.rightFullExtent-ee-oe)+" "+(Y.verticalFullExtent+oe)+" A "+(Y.rightLargeArcRadius+oe)+" "+(Y.rightLargeArcRadius+oe)+" 0 0 0 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent:pe+=" A "+(Y.leftLargeArcRadius-oe)+" "+(Y.leftLargeArcRadius-oe)+" 0 0 1 "+Y.leftInnerExtent+" "+(Y.verticalFullExtent-oe)+" L "+(Y.rightInnerExtent-ee)+" "+(Y.verticalFullExtent-oe)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightLargeArcRadius-oe)+" 0 0 1 "+(Y.rightFullExtent+oe-ee)+" "+Y.verticalRightInnerExtent,pe+=" L "+(Y.rightFullExtent+oe-ee)+" "+(Y.targetY+Y.rightSmallArcRadius)+" A "+(Y.rightLargeArcRadius-oe)+" "+(Y.rightSmallArcRadius-oe)+" 0 0 1 "+(Y.rightInnerExtent-ee)+" "+(Y.targetY+oe)+" L "+(Y.targetX-ee)+" "+(Y.targetY+oe)+(ee>0?" L "+Y.targetX+" "+Y.targetY:"")+"Z"),pe}function f(){var se=.5;function ee(pe){var oe=pe.linkArrowLength;if(pe.link.circular)return g(pe.link,oe);var Y=Math.abs((pe.link.target.x0-pe.link.source.x1)/2);oe>Y&&(oe=Y);var ce=pe.link.source.x1,ue=pe.link.target.x0-oe,_e=w(ce,ue),Le=_e(se),ze=_e(1-se),Ge=pe.link.y0-pe.link.width/2,Ve=pe.link.y0+pe.link.width/2,rt=pe.link.y1-pe.link.width/2,pt=pe.link.y1+pe.link.width/2,gt="M"+ce+","+Ge,ht="C"+Le+","+Ge+" "+ze+","+rt+" "+ue+","+rt,lt="C"+ze+","+pt+" "+Le+","+Ve+" "+ce+","+Ve,Fe=oe>0?"L"+(ue+oe)+","+(rt+pe.link.width/2):"";return Fe+="L"+ue+","+pt,gt+ht+Fe+lt+"Z"}return ee}function p(se,ee){var pe=a(ee.color),oe=r.nodePadAcross,Y=se.nodePad/2;ee.dx=ee.x1-ee.x0,ee.dy=ee.y1-ee.y0;var ce=ee.dx,ue=Math.max(.5,ee.dy),_e="node_"+ee.pointNumber;return ee.group&&(_e=s.randstr()),ee.trace=se.trace,ee.curveNumber=se.trace.index,{index:ee.pointNumber,key:_e,partOfGroup:ee.partOfGroup||!1,group:ee.group,traceId:se.key,trace:se.trace,node:ee,nodePad:se.nodePad,nodeLineColor:se.nodeLineColor,nodeLineWidth:se.nodeLineWidth,textFont:se.textFont,size:se.horizontal?se.height:se.width,visibleWidth:Math.ceil(ce),visibleHeight:ue,zoneX:-oe,zoneY:-Y,zoneWidth:ce+2*oe,zoneHeight:ue+2*Y,labelY:se.horizontal?ee.dy/2+1:ee.dx/2+1,left:ee.originalLayer===1,sizeAcross:se.width,forceLayouts:se.forceLayouts,horizontal:se.horizontal,darkBackground:pe.getBrightness()<=128,tinyColorHue:l.tinyRGB(pe),tinyColorAlpha:pe.getAlpha(),valueFormat:se.valueFormat,valueSuffix:se.valueSuffix,sankey:se.sankey,graph:se.graph,arrangement:se.arrangement,uniqueNodeLabelPathId:[se.guid,se.key,_e].join("_"),interactionState:se.interactionState,figure:se}}function x(se){se.attr("transform",function(ee){return o(ee.node.x0.toFixed(3),ee.node.y0.toFixed(3))})}function N(se){se.call(x)}function D(se,ee){se.call(N),ee.attr("d",f())}function B(se){se.attr("width",function(ee){return ee.node.x1-ee.node.x0}).attr("height",function(ee){return ee.visibleHeight})}function U(se){return se.link.width>1||se.linkLineWidth>0}function V(se){var ee=o(se.translateX,se.translateY);return ee+(se.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function q(se,ee,pe){se.on(".basic",null).on("mouseover.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.hover(this,oe,ee),oe.interactionState.hovered=[this,oe])}).on("mousemove.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.follow(this,oe),oe.interactionState.hovered=[this,oe])}).on("mouseout.basic",function(oe){!oe.interactionState.dragInProgress&&!oe.partOfGroup&&(pe.unhover(this,oe,ee),oe.interactionState.hovered=!1)}).on("click.basic",function(oe){oe.interactionState.hovered&&(pe.unhover(this,oe,ee),oe.interactionState.hovered=!1),!oe.interactionState.dragInProgress&&!oe.partOfGroup&&pe.select(this,oe,ee)})}function z(se,ee,pe,oe){var Y=C.behavior.drag().origin(function(ce){return{x:ce.node.x0+ce.visibleWidth/2,y:ce.node.y0+ce.visibleHeight/2}}).on("dragstart",function(ce){if(ce.arrangement!=="fixed"&&(s.ensureSingle(oe._fullLayout._infolayer,"g","dragcover",function(_e){oe._fullLayout._dragCover=_e}),s.raiseToTop(this),ce.interactionState.dragInProgress=ce.node,de(ce.node),ce.interactionState.hovered&&(pe.nodeEvents.unhover.apply(0,ce.interactionState.hovered),ce.interactionState.hovered=!1),ce.arrangement==="snap")){var ue=ce.traceId+"|"+ce.key;ce.forceLayouts[ue]?ce.forceLayouts[ue].alpha(1):H(se,ue,ce),G(se,ee,ce,ue,oe)}}).on("drag",function(ce){if(ce.arrangement!=="fixed"){var ue=C.event.x,_e=C.event.y;ce.arrangement==="snap"?(ce.node.x0=ue-ce.visibleWidth/2,ce.node.x1=ue+ce.visibleWidth/2,ce.node.y0=_e-ce.visibleHeight/2,ce.node.y1=_e+ce.visibleHeight/2):(ce.arrangement==="freeform"&&(ce.node.x0=ue-ce.visibleWidth/2,ce.node.x1=ue+ce.visibleWidth/2),_e=Math.max(0,Math.min(ce.size-ce.visibleHeight/2,_e)),ce.node.y0=_e-ce.visibleHeight/2,ce.node.y1=_e+ce.visibleHeight/2),de(ce.node),ce.arrangement!=="snap"&&(ce.sankey.update(ce.graph),D(se.filter(me(ce)),ee))}}).on("dragend",function(ce){if(ce.arrangement!=="fixed"){ce.interactionState.dragInProgress=!1;for(var ue=0;ue<ce.node.childrenNodes.length;ue++)ce.node.childrenNodes[ue].x=ce.node.x,ce.node.childrenNodes[ue].y=ce.node.y;ce.arrangement!=="snap"&&le(ce,oe)}});se.on(".drag",null).call(Y)}function H(se,ee,pe,oe){W(pe.graph.nodes);var Y=pe.graph.nodes.filter(function(ce){return ce.originalX===pe.node.originalX}).filter(function(ce){return!ce.partOfGroup});pe.forceLayouts[ee]=v.forceSimulation(Y).alphaDecay(0).force("collide",v.forceCollide().radius(function(ce){return ce.dy/2+pe.nodePad/2}).strength(1).iterations(r.forceIterations)).force("constrain",J(se,ee,Y,pe)).stop()}function G(se,ee,pe,oe,Y){window.requestAnimationFrame(function ce(){var ue;for(ue=0;ue<r.forceTicksPerFrame;ue++)pe.forceLayouts[oe].tick();var _e=pe.graph.nodes;if(ie(_e),pe.sankey.update(pe.graph),D(se.filter(me(pe)),ee),pe.forceLayouts[oe].alpha()>0)window.requestAnimationFrame(ce);else{var Le=pe.node.originalX;pe.node.x0=Le-pe.visibleWidth/2,pe.node.x1=Le+pe.visibleWidth/2,le(pe,Y)}})}function J(se,ee,pe,oe){return function(){for(var ce=0,ue=0;ue<pe.length;ue++){var _e=pe[ue];_e===oe.interactionState.dragInProgress?(_e.x=_e.lastDraggedX,_e.y=_e.lastDraggedY):(_e.vx=(_e.originalX-_e.x)/r.forceTicksPerFrame,_e.y=Math.min(oe.size-_e.dy/2,Math.max(_e.dy/2,_e.y))),ce=Math.max(ce,Math.abs(_e.vx),Math.abs(_e.vy))}!oe.interactionState.dragInProgress&&ce<.1&&oe.forceLayouts[ee].alpha()>0&&oe.forceLayouts[ee].alpha(0)}}function le(se,ee){for(var pe=[],oe=[],Y=0;Y<se.graph.nodes.length;Y++){var ce=(se.graph.nodes[Y].x0+se.graph.nodes[Y].x1)/2,ue=(se.graph.nodes[Y].y0+se.graph.nodes[Y].y1)/2;pe.push(ce/se.figure.width),oe.push(ue/se.figure.height)}c.call("_guiRestyle",ee,{"node.x":[pe],"node.y":[oe]},se.trace.index).then(function(){ee._fullLayout._dragCover&&ee._fullLayout._dragCover.remove()})}function ye(se){var ee=[],pe;for(pe=0;pe<se.length;pe++)se[pe].originalX=(se[pe].x0+se[pe].x1)/2,se[pe].originalY=(se[pe].y0+se[pe].y1)/2,ee.indexOf(se[pe].originalX)===-1&&ee.push(se[pe].originalX);for(ee.sort(function(oe,Y){return oe-Y}),pe=0;pe<se.length;pe++)se[pe].originalLayerIndex=ee.indexOf(se[pe].originalX),se[pe].originalLayer=se[pe].originalLayerIndex/(ee.length-1)}function de(se){se.lastDraggedX=se.x0+se.dx/2,se.lastDraggedY=se.y0+se.dy/2}function me(se){return function(ee){return ee.node.originalX===se.node.originalX}}function W(se){for(var ee=0;ee<se.length;ee++)se[ee].y=(se[ee].y0+se[ee].y1)/2,se[ee].x=(se[ee].x0+se[ee].x1)/2}function ie(se){for(var ee=0;ee<se.length;ee++)se[ee].y0=se[ee].y-se[ee].dy/2,se[ee].y1=se[ee].y0+se[ee].dy,se[ee].x0=se[ee].x-se[ee].dx/2,se[ee].x1=se[ee].x0+se[ee].dx}Z.exports=function(se,ee,pe,oe,Y){var ce=se._context.staticPlot,ue=!1;s.ensureSingle(se._fullLayout._infolayer,"g","first-render",function(){ue=!0});var _e=se._fullLayout._dragCover,Le=pe.filter(function(lt){return m(lt).trace.visible}).map(b.bind(null,oe)),ze=ee.selectAll("."+r.cn.sankey).data(Le,h);ze.exit().remove(),ze.enter().append("g").classed(r.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",ce?"none":"auto").attr("transform",V),ze.each(function(lt,Fe){se._fullData[Fe]._sankey=lt;var Pe="bgsankey-"+lt.trace.uid+"-"+Fe;s.ensureSingle(se._fullLayout._draggers,"rect",Pe),se._fullData[Fe]._bgRect=C.select("."+Pe),se._fullData[Fe]._bgRect.style("pointer-events",ce?"none":"all").attr("width",lt.width).attr("height",lt.height).attr("x",lt.translateX).attr("y",lt.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),ze.transition().ease(r.ease).duration(r.duration).attr("transform",V);var Ge=ze.selectAll("."+r.cn.sankeyLinks).data(y,h);Ge.enter().append("g").classed(r.cn.sankeyLinks,!0).style("fill","none");var Ve=Ge.selectAll("."+r.cn.sankeyLink).data(function(lt){var Fe=lt.graph.links;return Fe.filter(function(Pe){return Pe.value}).map(A.bind(null,lt))},h);Ve.enter().append("path").classed(r.cn.sankeyLink,!0).call(q,ze,Y.linkEvents),Ve.style("stroke",function(lt){return U(lt)?l.tinyRGB(a(lt.linkLineColor)):lt.tinyColorHue}).style("stroke-opacity",function(lt){return U(lt)?l.opacity(lt.linkLineColor):lt.tinyColorAlpha}).style("fill",function(lt){return lt.tinyColorHue}).style("fill-opacity",function(lt){return lt.tinyColorAlpha}).style("stroke-width",function(lt){return U(lt)?lt.linkLineWidth:1}).attr("d",f()),Ve.style("opacity",function(){return se._context.staticPlot||ue||_e?1:0}).transition().ease(r.ease).duration(r.duration).style("opacity",1),Ve.exit().transition().ease(r.ease).duration(r.duration).style("opacity",0).remove();var rt=ze.selectAll("."+r.cn.sankeyNodeSet).data(y,h);rt.enter().append("g").classed(r.cn.sankeyNodeSet,!0),rt.style("cursor",function(lt){switch(lt.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var pt=rt.selectAll("."+r.cn.sankeyNode).data(function(lt){var Fe=lt.graph.nodes;return ye(Fe),Fe.map(p.bind(null,lt))},h);pt.enter().append("g").classed(r.cn.sankeyNode,!0).call(x).style("opacity",function(lt){return(se._context.staticPlot||ue)&&!lt.partOfGroup?1:0}),pt.call(q,ze,Y.nodeEvents).call(z,Ve,Y,se),pt.transition().ease(r.ease).duration(r.duration).call(x).style("opacity",function(lt){return lt.partOfGroup?0:1}),pt.exit().transition().ease(r.ease).duration(r.duration).style("opacity",0).remove();var gt=pt.selectAll("."+r.cn.nodeRect).data(y);gt.enter().append("rect").classed(r.cn.nodeRect,!0).call(B),gt.style("stroke-width",function(lt){return lt.nodeLineWidth}).style("stroke",function(lt){return l.tinyRGB(a(lt.nodeLineColor))}).style("stroke-opacity",function(lt){return l.opacity(lt.nodeLineColor)}).style("fill",function(lt){return lt.tinyColorHue}).style("fill-opacity",function(lt){return lt.tinyColorAlpha}),gt.transition().ease(r.ease).duration(r.duration).call(B);var ht=pt.selectAll("."+r.cn.nodeLabel).data(y);ht.enter().append("text").classed(r.cn.nodeLabel,!0).style("cursor","default"),ht.attr("data-notex",1).text(function(lt){return lt.node.label}).each(function(lt){var Fe=C.select(this);i.font(Fe,lt.textFont),E.convertToTspans(Fe,se)}).attr("text-anchor",function(lt){return lt.horizontal&&lt.left?"end":"start"}).attr("transform",function(lt){var Fe=C.select(this),Pe=E.lineCount(Fe),be=lt.textFont.size*((Pe-1)*M-T),Ye=lt.nodeLineWidth/2+k,mt=((lt.horizontal?lt.visibleHeight:lt.visibleWidth)-be)/2;lt.horizontal&&(lt.left?Ye=-Ye:Ye+=lt.visibleWidth);var bt=lt.horizontal?"":"scale(-1,1)"+u(90);return o(lt.horizontal?Ye:mt,lt.horizontal?mt:Ye)+bt}),ht.transition().ease(r.ease).duration(r.duration)}}}),_F=Ne({"src/traces/sankey/plot.js"(te,Z){var v=xn(),w=In(),C=w.numberFormat,P=rre(),t=nh(),r=io(),a=gF().cn,l=w._;function i(T){return T!==""}function s(T,M){return T.filter(function(k){return k.key===M.traceId})}function o(T,M){v.select(T).select("path").style("fill-opacity",M),v.select(T).select("rect").style("fill-opacity",M)}function u(T){v.select(T).select("text.name").style("fill","black")}function d(T){return function(M){return T.node.sourceLinks.indexOf(M.link)!==-1||T.node.targetLinks.indexOf(M.link)!==-1}}function h(T){return function(M){return M.node.sourceLinks.indexOf(T.link)!==-1||M.node.targetLinks.indexOf(T.link)!==-1}}function y(T,M,k){M&&k&&s(k,M).selectAll("."+a.sankeyLink).filter(d(M)).call(E.bind(0,M,k,!1))}function m(T,M,k){M&&k&&s(k,M).selectAll("."+a.sankeyLink).filter(d(M)).call(c.bind(0,M,k,!1))}function E(T,M,k,b){b.style("fill",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverHue}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.tinyColorHoverAlpha}),b.each(function(A){var g=A.link.label;g!==""&&s(M,T).selectAll("."+a.sankeyLink).filter(function(f){return f.link.label===g}).style("fill",function(f){if(!f.link.concentrationscale)return f.tinyColorHoverHue}).style("fill-opacity",function(f){if(!f.link.concentrationscale)return f.tinyColorHoverAlpha})}),k&&s(M,T).selectAll("."+a.sankeyNode).filter(h(T)).call(y)}function c(T,M,k,b){b.style("fill",function(A){return A.tinyColorHue}).style("fill-opacity",function(A){return A.tinyColorAlpha}),b.each(function(A){var g=A.link.label;g!==""&&s(M,T).selectAll("."+a.sankeyLink).filter(function(f){return f.link.label===g}).style("fill",function(f){return f.tinyColorHue}).style("fill-opacity",function(f){return f.tinyColorAlpha})}),k&&s(M,T).selectAll(a.sankeyNode).filter(h(T)).call(m)}function _(T,M){var k=T.hoverlabel||{},b=w.nestedProperty(k,M).get();return Array.isArray(b)?!1:b}Z.exports=function(M,k){for(var b=M._fullLayout,A=b._paper,g=b._size,f=0;f<M._fullData.length;f++)if(M._fullData[f].visible&&M._fullData[f].type===a.sankey&&!M._fullData[f]._viewInitial){var p=M._fullData[f].node;M._fullData[f]._viewInitial={node:{groups:p.groups.slice(),x:p.x.slice(),y:p.y.slice()}}}var x=function(de,me){var W=me.link;W.originalEvent=v.event,M._hoverdata=[W],t.click(M,{target:!0})},N=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(E.bind(0,me,W,!0)),me.link.trace.link.hoverinfo!=="skip"&&(me.link.fullData=me.link.trace,M.emit("plotly_hover",{event:v.event,points:[me.link]})))},D=l(M,"source:")+" ",B=l(M,"target:")+" ",U=l(M,"concentration:")+" ",V=l(M,"incoming flow count:")+" ",q=l(M,"outgoing flow count:")+" ",z=function(de,me){if(M._fullLayout.hovermode===!1)return;var W=me.link.trace.link;if(W.hoverinfo==="none"||W.hoverinfo==="skip")return;var ie=[];function se(_e){var Le,ze;_e.circular?(Le=(_e.circularPathData.leftInnerExtent+_e.circularPathData.rightInnerExtent)/2,ze=_e.circularPathData.verticalFullExtent):(Le=(_e.source.x1+_e.target.x0)/2,ze=(_e.y0+_e.y1)/2);var Ge=[Le,ze];return _e.trace.orientation==="v"&&Ge.reverse(),Ge[0]+=me.parent.translateX,Ge[1]+=me.parent.translateY,Ge}for(var ee=0,pe=0;pe<me.flow.links.length;pe++){var oe=me.flow.links[pe];if(!(M._fullLayout.hovermode==="closest"&&me.link.pointNumber!==oe.pointNumber)){me.link.pointNumber===oe.pointNumber&&(ee=pe),oe.fullData=oe.trace,W=me.link.trace.link;var Y=se(oe),ce={valueLabel:C(me.valueFormat)(oe.value)+me.valueSuffix};ie.push({x:Y[0],y:Y[1],name:ce.valueLabel,text:[oe.label||"",D+oe.source.label,B+oe.target.label,oe.concentrationscale?U+C("%0.2f")(oe.flow.labelConcentration):""].filter(i).join("<br>"),color:_(W,"bgcolor")||r.addOpacity(oe.color,1),borderColor:_(W,"bordercolor"),fontFamily:_(W,"font.family"),fontSize:_(W,"font.size"),fontColor:_(W,"font.color"),fontWeight:_(W,"font.weight"),fontStyle:_(W,"font.style"),fontVariant:_(W,"font.variant"),fontTextcase:_(W,"font.textcase"),fontLineposition:_(W,"font.lineposition"),fontShadow:_(W,"font.shadow"),nameLength:_(W,"namelength"),textAlign:_(W,"align"),idealAlign:v.event.x<Y[0]?"right":"left",hovertemplate:W.hovertemplate,hovertemplateLabels:ce,eventData:[oe]})}}var ue=t.loneHover(ie,{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:M,anchorIndex:ee});ue.each(function(){var _e=this;me.link.concentrationscale||o(_e,.65),u(_e)})},H=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(c.bind(0,me,W,!0)),me.link.trace.link.hoverinfo!=="skip"&&(me.link.fullData=me.link.trace,M.emit("plotly_unhover",{event:v.event,points:[me.link]})),t.loneUnhover(b._hoverlayer.node()))},G=function(de,me,W){var ie=me.node;ie.originalEvent=v.event,M._hoverdata=[ie],v.select(de).call(m,me,W),t.click(M,{target:!0})},J=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(y,me,W),me.node.trace.node.hoverinfo!=="skip"&&(me.node.fullData=me.node.trace,M.emit("plotly_hover",{event:v.event,points:[me.node]})))},le=function(de,me){if(M._fullLayout.hovermode!==!1){var W=me.node.trace.node;if(!(W.hoverinfo==="none"||W.hoverinfo==="skip")){var ie=v.select(de).select("."+a.nodeRect),se=M._fullLayout._paperdiv.node().getBoundingClientRect(),ee=ie.node().getBoundingClientRect(),pe=ee.left-2-se.left,oe=ee.right+2-se.left,Y=ee.top+ee.height/4-se.top,ce={valueLabel:C(me.valueFormat)(me.node.value)+me.valueSuffix};me.node.fullData=me.node.trace,M._fullLayout._calcInverseTransform(M);var ue=M._fullLayout._invScaleX,_e=M._fullLayout._invScaleY,Le=t.loneHover({x0:ue*pe,x1:ue*oe,y:_e*Y,name:C(me.valueFormat)(me.node.value)+me.valueSuffix,text:[me.node.label,V+me.node.targetLinks.length,q+me.node.sourceLinks.length].filter(i).join("<br>"),color:_(W,"bgcolor")||me.tinyColorHue,borderColor:_(W,"bordercolor"),fontFamily:_(W,"font.family"),fontSize:_(W,"font.size"),fontColor:_(W,"font.color"),fontWeight:_(W,"font.weight"),fontStyle:_(W,"font.style"),fontVariant:_(W,"font.variant"),fontTextcase:_(W,"font.textcase"),fontLineposition:_(W,"font.lineposition"),fontShadow:_(W,"font.shadow"),nameLength:_(W,"namelength"),textAlign:_(W,"align"),idealAlign:"left",hovertemplate:W.hovertemplate,hovertemplateLabels:ce,eventData:[me.node]},{container:b._hoverlayer.node(),outerContainer:b._paper.node(),gd:M});o(Le,.85),u(Le)}}},ye=function(de,me,W){M._fullLayout.hovermode!==!1&&(v.select(de).call(m,me,W),me.node.trace.node.hoverinfo!=="skip"&&(me.node.fullData=me.node.trace,M.emit("plotly_unhover",{event:v.event,points:[me.node]})),t.loneUnhover(b._hoverlayer.node()))};P(M,A,k,{width:g.w,height:g.h,margin:{t:g.t,r:g.r,b:g.b,l:g.l}},{linkEvents:{hover:N,follow:z,unhover:H,select:x},nodeEvents:{hover:J,follow:le,unhover:ye,select:G}})}}}),nre=Ne({"src/traces/sankey/base_plot.js"(te){var Z=Kc().overrideAll,v=iv().getModuleCalcData,w=_F(),C=Bo(),P=km(),t=Bv(),r=fh().prepSelect,a=In(),l=Xo(),i="sankey";te.name=i,te.baseLayoutAttrOverrides=Z({hoverlabel:C.hoverlabel},"plot","nested"),te.plot=function(o){var u=v(o.calcdata,i)[0];w(o,u),te.updateFx(o)},te.clean=function(o,u,d,h){var y=h._has&&h._has(i),m=u._has&&u._has(i);y&&!m&&(h._paperdiv.selectAll(".sankey").remove(),h._paperdiv.selectAll(".bgsankey").remove())},te.updateFx=function(o){for(var u=0;u<o._fullData.length;u++)s(o,u)};function s(o,u){var d=o._fullData[u],h=o._fullLayout,y=h.dragmode,m=h.dragmode==="pan"?"move":"crosshair",E=d._bgRect;if(E&&!(y==="pan"||y==="zoom")){P(E,m);var c={_id:"x",c2p:a.identity,_offset:d._sankey.translateX,_length:d._sankey.width},_={_id:"y",c2p:a.identity,_offset:d._sankey.translateY,_length:d._sankey.height},T={gd:o,element:E.node(),plotinfo:{id:u,xaxis:c,yaxis:_,fillRangeItems:a.noop},subplot:u,xaxes:[c],yaxes:[_],doneFnCompleted:function(M){var k=o._fullData[u],b,A=k.node.groups.slice(),g=[];function f(D){for(var B=k._sankey.graph.nodes,U=0;U<B.length;U++)if(B[U].pointNumber===D)return B[U]}for(var p=0;p<M.length;p++){var x=f(M[p].pointNumber);if(x)if(x.group){for(var N=0;N<x.childrenNodes.length;N++)g.push(x.childrenNodes[N].pointNumber);A[x.pointNumber-k.node._count]=!1}else g.push(x.pointNumber)}b=A.filter(Boolean).concat([g]),l.call("_guiRestyle",o,{"node.groups":[b]},u)}};T.prepFn=function(M,k,b){r(M,k,b,T,y)},t.init(T)}}}}),are=Ne({"src/traces/sankey/select.js"(te,Z){Z.exports=function(w,C){for(var P=w.cd,t=[],r=P[0].trace,a=r._sankey.graph.nodes,l=0;l<a.length;l++){var i=a[l];if(!i.partOfGroup){var s=[(i.x0+i.x1)/2,(i.y0+i.y1)/2];r.orientation==="v"&&s.reverse(),C&&C.contains(s,!1,l,w)&&t.push({pointNumber:i.pointNumber})}}return t}}}),ire=Ne({"src/traces/sankey/index.js"(te,Z){Z.exports={attributes:pF(),supplyDefaults:Xte(),calc:Wte(),plot:_F(),moduleType:"trace",name:"sankey",basePlotModule:nre(),selectPoints:are(),categories:["noOpacity"],meta:{}}}}),ore=Ne({"lib/sankey.js"(te,Z){Z.exports=ire()}}),sre=Ne({"src/traces/indicator/base_plot.js"(te){var Z=uf();te.name="indicator",te.plot=function(v,w,C,P){Z.plotBasePlot(te.name,v,w,C,P)},te.clean=function(v,w,C,P){Z.cleanBasePlot(te.name,v,w,C,P)}}}),xF=Ne({"src/traces/indicator/attributes.js"(te,Z){var v=co().extendFlat,w=co().extendDeep,C=Kc().overrideAll,P=$o(),t=lu(),r=Oc().attributes,a=wd(),l=Tu().templatedArray,i=a_(),s=bc().descriptionOnlyNumbers,o=P({editType:"plot",colorEditType:"plot"}),u={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:t.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"},d={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},h=l("step",w({},u,{range:d}));Z.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:r({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:v({},o,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:s("value")},font:v({},o,{}),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:s("value")},increasing:{symbol:{valType:"string",dflt:i.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:i.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:i.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:i.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:v({},o,{}),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:w({},u,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:t.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:C({range:d,visible:v({},a.visible,{dflt:!0}),tickmode:a.minor.tickmode,nticks:a.nticks,tick0:a.tick0,dtick:a.dtick,tickvals:a.tickvals,ticktext:a.ticktext,ticks:v({},a.ticks,{dflt:"outside"}),ticklen:a.ticklen,tickwidth:a.tickwidth,tickcolor:a.tickcolor,ticklabelstep:a.ticklabelstep,showticklabels:a.showticklabels,labelalias:a.labelalias,tickfont:P({}),tickangle:a.tickangle,tickformat:a.tickformat,tickformatstops:a.tickformatstops,tickprefix:a.tickprefix,showtickprefix:a.showtickprefix,ticksuffix:a.ticksuffix,showticksuffix:a.showticksuffix,separatethousands:a.separatethousands,exponentformat:a.exponentformat,minexponent:a.minexponent,showexponent:a.showexponent,editType:"plot"},"plot"),steps:h,threshold:{line:{color:v({},u.line.color,{}),width:v({},u.line.width,{dflt:1}),editType:"plot"},thickness:v({},u.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}}}),bF=Ne({"src/traces/indicator/constants.js"(te,Z){Z.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}}}),lre=Ne({"src/traces/indicator/defaults.js"(te,Z){var v=In(),w=xF(),C=Oc().defaults,P=Tu(),t=zd(),r=bF(),a=Tg(),l=B0(),i=Em(),s=fp();function o(d,h,y,m){function E(z,H){return v.coerce(d,h,w,z,H)}C(h,m,E),E("mode"),h._hasNumber=h.mode.indexOf("number")!==-1,h._hasDelta=h.mode.indexOf("delta")!==-1,h._hasGauge=h.mode.indexOf("gauge")!==-1;var c=E("value");h._range=[0,typeof c=="number"?1.5*c:1];var _=new Array(2),T;if(h._hasNumber){E("number.valueformat");var M=v.extendFlat({},m.font);M.size=void 0,v.coerceFont(E,"number.font",M),h.number.font.size===void 0&&(h.number.font.size=r.defaultNumberFontSize,_[0]=!0),E("number.prefix"),E("number.suffix"),T=h.number.font.size}var k;if(h._hasDelta){var b=v.extendFlat({},m.font);b.size=void 0,v.coerceFont(E,"delta.font",b),h.delta.font.size===void 0&&(h.delta.font.size=(h._hasNumber?.5:1)*(T||r.defaultNumberFontSize),_[1]=!0),E("delta.reference",h.value),E("delta.relative"),E("delta.valueformat",h.delta.relative?"2%":""),E("delta.increasing.symbol"),E("delta.increasing.color"),E("delta.decreasing.symbol"),E("delta.decreasing.color"),E("delta.position"),E("delta.prefix"),E("delta.suffix"),k=h.delta.font.size}h._scaleNumbers=(!h._hasNumber||_[0])&&(!h._hasDelta||_[1])||!1;var A=v.extendFlat({},m.font);A.size=.25*(T||k||r.defaultNumberFontSize),v.coerceFont(E,"title.font",A),E("title.text");var g,f,p,x;function N(z,H){return v.coerce(g,f,w.gauge,z,H)}function D(z,H){return v.coerce(p,x,w.gauge.axis,z,H)}if(h._hasGauge){g=d.gauge,g||(g={}),f=P.newContainer(h,"gauge"),N("shape");var B=h._isBullet=h.gauge.shape==="bullet";B||E("title.align","center");var U=h._isAngular=h.gauge.shape==="angular";U||E("align","center"),N("bgcolor",m.paper_bgcolor),N("borderwidth"),N("bordercolor"),N("bar.color"),N("bar.line.color"),N("bar.line.width");var V=r.valueThickness*(h.gauge.shape==="bullet"?.5:1);N("bar.thickness",V),t(g,f,{name:"steps",handleItemDefaults:u}),N("threshold.value"),N("threshold.thickness"),N("threshold.line.width"),N("threshold.line.color"),p={},g&&(p=g.axis||{}),x=P.newContainer(f,"axis"),D("visible"),h._range=D("range",h._range);var q={font:m.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};a(p,x,D,"linear"),s(p,x,D,"linear",q),i(p,x,D,"linear",q),l(p,x,D,q)}else E("title.align","center"),E("align","center"),h._isAngular=h._isBullet=!1;h._length=null}function u(d,h){function y(m,E){return v.coerce(d,h,w.gauge.steps,m,E)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}Z.exports={supplyDefaults:o}}}),ure=Ne({"src/traces/indicator/calc.js"(te,Z){function v(w,C){var P=[],t=C.value;typeof C._lastValue!="number"&&(C._lastValue=C.value);var r=C._lastValue,a=r;return C._hasDelta&&typeof C.delta.reference=="number"&&(a=C.delta.reference),P[0]={y:t,lastY:r,delta:t-a,relativeDelta:(t-a)/a},P}Z.exports={calc:v}}}),cre=Ne({"src/traces/indicator/plot.js"(te,Z){var v=xn(),w=(bo(),$r(Ui)).interpolate,C=(bo(),$r(Ui)).interpolateNumber,P=In(),t=P.strScale,r=P.strTranslate,a=P.rad2deg,l=bd().MID_SHIFT,i=zs(),s=bF(),o=uc(),u=Os(),d=Om(),h=hp(),y=wd(),m=io(),E={left:"start",center:"middle",right:"end"},c={left:0,center:.5,right:1},_=/[yzafpnµmkMGTPEZY]/;function T(B){return B&&B.duration>0}Z.exports=function(U,V,q,z){var H=U._fullLayout,G;T(q)&&z&&(G=z()),P.makeTraceGroups(H._indicatorlayer,V,"trace").each(function(J){var le=J[0],ye=le.trace,de=v.select(this),me=ye._hasGauge,W=ye._isAngular,ie=ye._isBullet,se=ye.domain,ee={w:H._size.w*(se.x[1]-se.x[0]),h:H._size.h*(se.y[1]-se.y[0]),l:H._size.l+H._size.w*se.x[0],r:H._size.r+H._size.w*(1-se.x[1]),t:H._size.t+H._size.h*(1-se.y[1]),b:H._size.b+H._size.h*se.y[0]},pe=ee.l+ee.w/2,oe=ee.t+ee.h/2,Y=Math.min(ee.w/2,ee.h),ce=s.innerRadius*Y,ue,_e,Le,ze=ye.align||"center";if(_e=oe,!me)ue=ee.l+c[ze]*ee.w,Le=function(be){return p(be,ee.w,ee.h)};else if(W&&(ue=pe,_e=oe+Y/2,Le=function(be){return x(be,.9*ce)}),ie){var Ge=s.bulletPadding,Ve=1-s.bulletNumberDomainSize+Ge;ue=ee.l+(Ve+(1-Ve)*c[ze])*ee.w,Le=function(be){return p(be,(s.bulletNumberDomainSize-Ge)*ee.w,ee.h)}}b(U,de,J,{numbersX:ue,numbersY:_e,numbersScaler:Le,transitionOpts:q,onComplete:G});var rt,pt;me&&(rt={range:ye.gauge.axis.range,color:ye.gauge.bgcolor,line:{color:ye.gauge.bordercolor,width:0},thickness:1},pt={range:ye.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ye.gauge.bordercolor,width:ye.gauge.borderwidth},thickness:1});var gt=de.selectAll("g.angular").data(W?J:[]);gt.exit().remove();var ht=de.selectAll("g.angularaxis").data(W?J:[]);ht.exit().remove(),W&&k(U,de,J,{radius:Y,innerRadius:ce,gauge:gt,layer:ht,size:ee,gaugeBg:rt,gaugeOutline:pt,transitionOpts:q,onComplete:G});var lt=de.selectAll("g.bullet").data(ie?J:[]);lt.exit().remove();var Fe=de.selectAll("g.bulletaxis").data(ie?J:[]);Fe.exit().remove(),ie&&M(U,de,J,{gauge:lt,layer:Fe,size:ee,gaugeBg:rt,gaugeOutline:pt,transitionOpts:q,onComplete:G});var Pe=de.selectAll("text.title").data(J);Pe.exit().remove(),Pe.enter().append("text").classed("title",!0),Pe.attr("text-anchor",function(){return ie?E.right:E[ye.title.align]}).text(ye.title.text).call(i.font,ye.title.font).call(o.convertToTspans,U),Pe.attr("transform",function(){var be=ee.l+ee.w*c[ye.title.align],Ye,mt=s.titlePadding,bt=i.bBox(Pe.node());if(me){if(W)if(ye.gauge.axis.visible){var ft=i.bBox(ht.node());Ye=ft.top-mt-bt.bottom}else Ye=ee.t+ee.h/2-Y/2-bt.bottom-mt;ie&&(Ye=_e-(bt.top+bt.bottom)/2,be=ee.l-s.bulletPadding*ee.w)}else Ye=ye._numbersTop-mt-bt.bottom;return r(be,Ye)})})};function M(B,U,V,q){var z=V[0].trace,H=q.gauge,G=q.layer,J=q.gaugeBg,le=q.gaugeOutline,ye=q.size,de=z.domain,me=q.transitionOpts,W=q.onComplete,ie,se,ee,pe,oe;H.enter().append("g").classed("bullet",!0),H.attr("transform",r(ye.l,ye.t)),G.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),G.selectAll("g.xbulletaxistick,path,text").remove();var Y=ye.h,ce=z.gauge.bar.thickness*Y,ue=de.x[0],_e=de.x[0]+(de.x[1]-de.x[0])*(z._hasNumber||z._hasDelta?1-s.bulletNumberDomainSize:1);ie=f(B,z.gauge.axis),ie._id="xbulletaxis",ie.domain=[ue,_e],ie.setScale(),se=u.calcTicks(ie),ee=u.makeTransTickFn(ie),pe=u.getTickSigns(ie)[2],oe=ye.t+ye.h,ie.visible&&(u.drawTicks(B,ie,{vals:ie.ticks==="inside"?u.clipEnds(ie,se):se,layer:G,path:u.makeTickPath(ie,oe,pe),transFn:ee}),u.drawLabels(B,ie,{vals:se,layer:G,transFn:ee,labelFns:u.makeLabelFns(ie,oe)}));function Le(ht){ht.attr("width",function(lt){return Math.max(0,ie.c2p(lt.range[1])-ie.c2p(lt.range[0]))}).attr("x",function(lt){return ie.c2p(lt.range[0])}).attr("y",function(lt){return .5*(1-lt.thickness)*Y}).attr("height",function(lt){return lt.thickness*Y})}var ze=[J].concat(z.gauge.steps),Ge=H.selectAll("g.bg-bullet").data(ze);Ge.enter().append("g").classed("bg-bullet",!0).append("rect"),Ge.select("rect").call(Le).call(A),Ge.exit().remove();var Ve=H.selectAll("g.value-bullet").data([z.gauge.bar]);Ve.enter().append("g").classed("value-bullet",!0).append("rect"),Ve.select("rect").attr("height",ce).attr("y",(Y-ce)/2).call(A),T(me)?Ve.select("rect").transition().duration(me.duration).ease(me.easing).each("end",function(){W&&W()}).each("interrupt",function(){W&&W()}).attr("width",Math.max(0,ie.c2p(Math.min(z.gauge.axis.range[1],V[0].y)))):Ve.select("rect").attr("width",typeof V[0].y=="number"?Math.max(0,ie.c2p(Math.min(z.gauge.axis.range[1],V[0].y))):0),Ve.exit().remove();var rt=V.filter(function(){return z.gauge.threshold.value||z.gauge.threshold.value===0}),pt=H.selectAll("g.threshold-bullet").data(rt);pt.enter().append("g").classed("threshold-bullet",!0).append("line"),pt.select("line").attr("x1",ie.c2p(z.gauge.threshold.value)).attr("x2",ie.c2p(z.gauge.threshold.value)).attr("y1",(1-z.gauge.threshold.thickness)/2*Y).attr("y2",(1-(1-z.gauge.threshold.thickness)/2)*Y).call(m.stroke,z.gauge.threshold.line.color).style("stroke-width",z.gauge.threshold.line.width),pt.exit().remove();var gt=H.selectAll("g.gauge-outline").data([le]);gt.enter().append("g").classed("gauge-outline",!0).append("rect"),gt.select("rect").call(Le).call(A),gt.exit().remove()}function k(B,U,V,q){var z=V[0].trace,H=q.size,G=q.radius,J=q.innerRadius,le=q.gaugeBg,ye=q.gaugeOutline,de=[H.l+H.w/2,H.t+H.h/2+G/2],me=q.gauge,W=q.layer,ie=q.transitionOpts,se=q.onComplete,ee=Math.PI/2;function pe(Wt){var Zt=z.gauge.axis.range[0],cr=z.gauge.axis.range[1],pr=(Wt-Zt)/(cr-Zt)*Math.PI-ee;return pr<-ee?-ee:pr>ee?ee:pr}function oe(Wt){return v.svg.arc().innerRadius((J+G)/2-Wt/2*(G-J)).outerRadius((J+G)/2+Wt/2*(G-J)).startAngle(-ee)}function Y(Wt){Wt.attr("d",function(Zt){return oe(Zt.thickness).startAngle(pe(Zt.range[0])).endAngle(pe(Zt.range[1]))()})}var ce,ue,_e,Le;me.enter().append("g").classed("angular",!0),me.attr("transform",r(de[0],de[1])),W.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),W.selectAll("g.xangularaxistick,path,text").remove(),ce=f(B,z.gauge.axis),ce.type="linear",ce.range=z.gauge.axis.range,ce._id="xangularaxis",ce.ticklabeloverflow="allow",ce.setScale();var ze=function(Wt){return(ce.range[0]-Wt.x)/(ce.range[1]-ce.range[0])*Math.PI+Math.PI},Ge={},Ve=u.makeLabelFns(ce,0),rt=Ve.labelStandoff;Ge.xFn=function(Wt){var Zt=ze(Wt);return Math.cos(Zt)*rt},Ge.yFn=function(Wt){var Zt=ze(Wt),cr=Math.sin(Zt)>0?.2:1;return-Math.sin(Zt)*(rt+Wt.fontSize*cr)+Math.abs(Math.cos(Zt))*(Wt.fontSize*l)},Ge.anchorFn=function(Wt){var Zt=ze(Wt),cr=Math.cos(Zt);return Math.abs(cr)<.1?"middle":cr>0?"start":"end"},Ge.heightFn=function(Wt,Zt,cr){var pr=ze(Wt);return-.5*(1+Math.sin(pr))*cr};var pt=function(Wt){return r(de[0]+G*Math.cos(Wt),de[1]-G*Math.sin(Wt))};_e=function(Wt){return pt(ze(Wt))};var gt=function(Wt){var Zt=ze(Wt);return pt(Zt)+"rotate("+-a(Zt)+")"};if(ue=u.calcTicks(ce),Le=u.getTickSigns(ce)[2],ce.visible){Le=ce.ticks==="inside"?-1:1;var ht=(ce.linewidth||1)/2;u.drawTicks(B,ce,{vals:ue,layer:W,path:"M"+Le*ht+",0h"+Le*ce.ticklen,transFn:gt}),u.drawLabels(B,ce,{vals:ue,layer:W,transFn:_e,labelFns:Ge})}var lt=[le].concat(z.gauge.steps),Fe=me.selectAll("g.bg-arc").data(lt);Fe.enter().append("g").classed("bg-arc",!0).append("path"),Fe.select("path").call(Y).call(A),Fe.exit().remove();var Pe=oe(z.gauge.bar.thickness),be=me.selectAll("g.value-arc").data([z.gauge.bar]);be.enter().append("g").classed("value-arc",!0).append("path");var Ye=be.select("path");T(ie)?(Ye.transition().duration(ie.duration).ease(ie.easing).each("end",function(){se&&se()}).each("interrupt",function(){se&&se()}).attrTween("d",g(Pe,pe(V[0].lastY),pe(V[0].y))),z._lastValue=V[0].y):Ye.attr("d",typeof V[0].y=="number"?Pe.endAngle(pe(V[0].y)):"M0,0Z"),Ye.call(A),be.exit().remove(),lt=[];var mt=z.gauge.threshold.value;(mt||mt===0)&&lt.push({range:[mt,mt],color:z.gauge.threshold.color,line:{color:z.gauge.threshold.line.color,width:z.gauge.threshold.line.width},thickness:z.gauge.threshold.thickness});var bt=me.selectAll("g.threshold-arc").data(lt);bt.enter().append("g").classed("threshold-arc",!0).append("path"),bt.select("path").call(Y).call(A),bt.exit().remove();var ft=me.selectAll("g.gauge-outline").data([ye]);ft.enter().append("g").classed("gauge-outline",!0).append("path"),ft.select("path").call(Y).call(A),ft.exit().remove()}function b(B,U,V,q){var z=V[0].trace,H=q.numbersX,G=q.numbersY,J=z.align||"center",le=E[J],ye=q.transitionOpts,de=q.onComplete,me=P.ensureSingle(U,"g","numbers"),W,ie,se,ee=[];z._hasNumber&&ee.push("number"),z._hasDelta&&(ee.push("delta"),z.delta.position==="left"&&ee.reverse());var pe=me.selectAll("text").data(ee);pe.enter().append("text"),pe.attr("text-anchor",function(){return le}).attr("class",function(pt){return pt}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),pe.exit().remove();function oe(pt,gt,ht,lt){if(pt.match("s")&&ht>=0!=lt>=0&&!gt(ht).slice(-1).match(_)&&!gt(lt).slice(-1).match(_)){var Fe=pt.slice().replace("s","f").replace(/\d+/,function(be){return parseInt(be)-1}),Pe=f(B,{tickformat:Fe});return function(be){return Math.abs(be)<1?u.tickText(Pe,be).text:gt(be)}}else return gt}function Y(){var pt=f(B,{tickformat:z.number.valueformat},z._range);pt.setScale(),u.prepTicks(pt);var gt=function(be){return u.tickText(pt,be).text},ht=z.number.suffix,lt=z.number.prefix,Fe=me.select("text.number");function Pe(){var be=typeof V[0].y=="number"?lt+gt(V[0].y)+ht:"-";Fe.text(be).call(i.font,z.number.font).call(o.convertToTspans,B)}return T(ye)?Fe.transition().duration(ye.duration).ease(ye.easing).each("end",function(){Pe(),de&&de()}).each("interrupt",function(){Pe(),de&&de()}).attrTween("text",function(){var be=v.select(this),Ye=C(V[0].lastY,V[0].y);z._lastValue=V[0].y;var mt=oe(z.number.valueformat,gt,V[0].lastY,V[0].y);return function(bt){be.text(lt+mt(Ye(bt))+ht)}}):Pe(),W=N(lt+gt(V[0].y)+ht,z.number.font,le,B),Fe}function ce(){var pt=f(B,{tickformat:z.delta.valueformat},z._range);pt.setScale(),u.prepTicks(pt);var gt=function(bt){return u.tickText(pt,bt).text},ht=z.delta.suffix,lt=z.delta.prefix,Fe=function(bt){var ft=z.delta.relative?bt.relativeDelta:bt.delta;return ft},Pe=function(bt,ft){return bt===0||typeof bt!="number"||isNaN(bt)?"-":(bt>0?z.delta.increasing.symbol:z.delta.decreasing.symbol)+lt+ft(bt)+ht},be=function(bt){return bt.delta>=0?z.delta.increasing.color:z.delta.decreasing.color};z._deltaLastValue===void 0&&(z._deltaLastValue=Fe(V[0]));var Ye=me.select("text.delta");Ye.call(i.font,z.delta.font).call(m.fill,be({delta:z._deltaLastValue}));function mt(){Ye.text(Pe(Fe(V[0]),gt)).call(m.fill,be(V[0])).call(o.convertToTspans,B)}return T(ye)?Ye.transition().duration(ye.duration).ease(ye.easing).tween("text",function(){var bt=v.select(this),ft=Fe(V[0]),Wt=z._deltaLastValue,Zt=oe(z.delta.valueformat,gt,Wt,ft),cr=C(Wt,ft);return z._deltaLastValue=ft,function(pr){bt.text(Pe(cr(pr),Zt)),bt.call(m.fill,be({delta:cr(pr)}))}}).each("end",function(){mt(),de&&de()}).each("interrupt",function(){mt(),de&&de()}):mt(),ie=N(Pe(Fe(V[0]),gt),z.delta.font,le,B),Ye}var ue=z.mode+z.align,_e;if(z._hasDelta&&(_e=ce(),ue+=z.delta.position+z.delta.font.size+z.delta.font.family+z.delta.valueformat,ue+=z.delta.increasing.symbol+z.delta.decreasing.symbol,se=ie),z._hasNumber&&(Y(),ue+=z.number.font.size+z.number.font.family+z.number.valueformat+z.number.suffix+z.number.prefix,se=W),z._hasDelta&&z._hasNumber){var Le=[(W.left+W.right)/2,(W.top+W.bottom)/2],ze=[(ie.left+ie.right)/2,(ie.top+ie.bottom)/2],Ge,Ve,rt=.75*z.delta.font.size;z.delta.position==="left"&&(Ge=D(z,"deltaPos",0,-1*(W.width*c[z.align]+ie.width*(1-c[z.align])+rt),ue,Math.min),Ve=Le[1]-ze[1],se={width:W.width+ie.width+rt,height:Math.max(W.height,ie.height),left:ie.left+Ge,right:W.right,top:Math.min(W.top,ie.top+Ve),bottom:Math.max(W.bottom,ie.bottom+Ve)}),z.delta.position==="right"&&(Ge=D(z,"deltaPos",0,W.width*(1-c[z.align])+ie.width*c[z.align]+rt,ue,Math.max),Ve=Le[1]-ze[1],se={width:W.width+ie.width+rt,height:Math.max(W.height,ie.height),left:W.left,right:ie.right+Ge,top:Math.min(W.top,ie.top+Ve),bottom:Math.max(W.bottom,ie.bottom+Ve)}),z.delta.position==="bottom"&&(Ge=null,Ve=ie.height,se={width:Math.max(W.width,ie.width),height:W.height+ie.height,left:Math.min(W.left,ie.left),right:Math.max(W.right,ie.right),top:W.bottom-W.height,bottom:W.bottom+ie.height}),z.delta.position==="top"&&(Ge=null,Ve=W.top,se={width:Math.max(W.width,ie.width),height:W.height+ie.height,left:Math.min(W.left,ie.left),right:Math.max(W.right,ie.right),top:W.bottom-W.height-ie.height,bottom:W.bottom}),_e.attr({dx:Ge,dy:Ve})}(z._hasNumber||z._hasDelta)&&me.attr("transform",function(){var pt=q.numbersScaler(se);ue+=pt[2];var gt=D(z,"numbersScale",1,pt[0],ue,Math.min),ht;z._scaleNumbers||(gt=1),z._isAngular?ht=G-gt*se.bottom:ht=G-gt*(se.top+se.bottom)/2,z._numbersTop=gt*se.top+ht;var lt=se[J];J==="center"&&(lt=(se.left+se.right)/2);var Fe=H-gt*lt;return Fe=D(z,"numbersTranslate",0,Fe,ue,Math.max),r(Fe,ht)+t(gt)})}function A(B){B.each(function(U){m.stroke(v.select(this),U.line.color)}).each(function(U){m.fill(v.select(this),U.color)}).style("stroke-width",function(U){return U.line.width})}function g(B,U,V){return function(){var q=w(U,V);return function(z){return B.endAngle(q(z))()}}}function f(B,U,V){var q=B._fullLayout,z=P.extendFlat({type:"linear",ticks:"outside",range:V,showline:!0},U),H={type:"linear",_id:"x"+U._id},G={letter:"x",font:q.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function J(le,ye){return P.coerce(z,H,y,le,ye)}return d(z,H,J,G,q),h(z,H,J,G),H}function p(B,U,V){var q=Math.min(U/B.width,V/B.height);return[q,B,U+"x"+V]}function x(B,U){var V=Math.sqrt(B.width/2*(B.width/2)+B.height*B.height),q=U/V;return[q,B,U]}function N(B,U,V,q){var z=document.createElementNS("http://www.w3.org/2000/svg","text"),H=v.select(z);return H.text(B).attr("x",0).attr("y",0).attr("text-anchor",V).attr("data-unformatted",B).call(o.convertToTspans,q).call(i.font,U),i.bBox(H.node())}function D(B,U,V,q,z,H){var G="_cache"+U;B[G]&&B[G].key===z||(B[G]={key:z,value:V});var J=P.aggNums(H,null,[B[G].value,q],2);return B[G].value=J,J}}}),fre=Ne({"src/traces/indicator/index.js"(te,Z){Z.exports={moduleType:"trace",name:"indicator",basePlotModule:sre(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:xF(),supplyDefaults:lre().supplyDefaults,calc:ure().calc,plot:cre(),meta:{}}}}),hre=Ne({"lib/indicator.js"(te,Z){Z.exports=fre()}}),wF=Ne({"src/traces/table/attributes.js"(te,Z){var v=Ey(),w=co().extendFlat,C=Kc().overrideAll,P=$o(),t=Oc().attributes,r=bc().descriptionOnlyNumbers;Z.exports=C({domain:t({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:r("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:w({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:w({},P({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:r("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:w({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:w({},P({arrayOk:!0}))}},"calc","from-root")}}),dre=Ne({"src/traces/table/defaults.js"(te,Z){var v=In(),w=wF(),C=Oc().defaults;function P(t,r){for(var a=t.columnorder||[],l=t.header.values.length,i=a.slice(0,l),s=i.slice().sort(function(d,h){return d-h}),o=i.map(function(d){return s.indexOf(d)}),u=o.length;u<l;u++)o.push(u);r("columnorder",o)}Z.exports=function(r,a,l,i){function s(o,u){return v.coerce(r,a,w,o,u)}C(a,i,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),v.coerceFont(s,"header.font",i.font),P(a,s),s("cells.values"),s("cells.format"),s("cells.align"),s("cells.prefix"),s("cells.suffix"),s("cells.height"),s("cells.line.width"),s("cells.line.color"),s("cells.fill.color"),v.coerceFont(s,"cells.font",i.font),a._length=null}}}),vre=Ne({"src/traces/table/calc.js"(te,Z){var v=a1().wrap;Z.exports=function(){return v({})}}}),TF=Ne({"src/traces/table/constants.js"(te,Z){Z.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",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"}}}}),pre=Ne({"src/traces/table/data_preparation_helper.js"(te,Z){var v=TF(),w=co().extendFlat,C=la(),P=vi().isTypedArray,t=vi().isArrayOrTypedArray;Z.exports=function(y,m){var E=l(m.cells.values),c=function(le){return le.slice(m.header.values.length,le.length)},_=l(m.header.values);_.length&&!_[0].length&&(_[0]=[""],_=l(_));var T=_.concat(c(E).map(function(){return i((_[0]||[""]).length)})),M=m.domain,k=Math.floor(y._fullLayout._size.w*(M.x[1]-M.x[0])),b=Math.floor(y._fullLayout._size.h*(M.y[1]-M.y[0])),A=m.header.values.length?T[0].map(function(){return m.header.height}):[v.emptyHeaderHeight],g=E.length?E[0].map(function(){return m.cells.height}):[],f=A.reduce(a,0),p=b-f,x=p+v.uplift,N=u(g,x),D=u(A,f),B=o(D,[]),U=o(N,B),V={},q=m._fullInput.columnorder;t(q)&&(q=Array.from(q)),q=q.concat(c(E.map(function(le,ye){return ye})));var z=T.map(function(le,ye){var de=t(m.columnwidth)?m.columnwidth[Math.min(ye,m.columnwidth.length-1)]:m.columnwidth;return C(de)?Number(de):1}),H=z.reduce(a,0);z=z.map(function(le){return le/H*k});var G=Math.max(r(m.header.line.width),r(m.cells.line.width)),J={key:m.uid+y._context.staticPlot,translateX:M.x[0]*y._fullLayout._size.w,translateY:y._fullLayout._size.h*(1-M.y[1]),size:y._fullLayout._size,width:k,maxLineWidth:G,height:b,columnOrder:q,groupHeight:b,rowBlocks:U,headerRowBlocks:B,scrollY:0,cells:w({},m.cells,{values:E}),headerCells:w({},m.header,{values:T}),gdColumns:T.map(function(le){return le[0]}),gdColumnsOriginalOrder:T.map(function(le){return le[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:T.map(function(le,ye){var de=V[le];V[le]=(de||0)+1;var me=le+"__"+V[le];return{key:me,label:le,specIndex:ye,xIndex:q[ye],xScale:s,x:void 0,calcdata:void 0,columnWidth:z[ye]}})};return J.columns.forEach(function(le){le.calcdata=J,le.x=s(le)}),J};function r(h){if(t(h)){for(var y=0,m=0;m<h.length;m++)y=Math.max(y,r(h[m]));return y}return h}function a(h,y){return h+y}function l(h){var y=h.slice(),m=1/0,E=0,c;for(c=0;c<y.length;c++)P(y[c])?y[c]=Array.from(y[c]):t(y[c])||(y[c]=[y[c]]),m=Math.min(m,y[c].length),E=Math.max(E,y[c].length);if(m!==E)for(c=0;c<y.length;c++){var _=E-y[c].length;_&&(y[c]=y[c].concat(i(_)))}return y}function i(h){for(var y=new Array(h),m=0;m<h;m++)y[m]="";return y}function s(h){return h.calcdata.columns.reduce(function(y,m){return m.xIndex<h.xIndex?y+m.columnWidth:y},0)}function o(h,y){var m=Object.keys(h);return m.map(function(E){return w({},h[E],{auxiliaryBlocks:y})})}function u(h,y){for(var m={},E,c=0,_=0,T=d(),M=0,k=0,b=0;b<h.length;b++)E=h[b],T.rows.push({rowIndex:b,rowHeight:E}),_+=E,(_>=y||b===h.length-1)&&(m[c]=T,T.key=k++,T.firstRowIndex=M,T.lastRowIndex=b,T=d(),c+=_,M=b+1,_=0);return m}function d(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),mre=Ne({"src/traces/table/data_split_helpers.js"(te){var Z=co().extendFlat;te.splitToPanels=function(w){var C=[0,0],P=Z({},w,{key:"header",type:"header",page:0,prevPages:C,currentRepaint:[null,null],dragHandle:!0,values:w.calcdata.headerCells.values[w.specIndex],rowBlocks:w.calcdata.headerRowBlocks,calcdata:Z({},w.calcdata,{cells:w.calcdata.headerCells})}),t=Z({},w,{key:"cells1",type:"cells",page:0,prevPages:C,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks}),r=Z({},w,{key:"cells2",type:"cells",page:1,prevPages:C,currentRepaint:[null,null],dragHandle:!1,values:w.calcdata.cells.values[w.specIndex],rowBlocks:w.calcdata.rowBlocks});return[t,r,P]},te.splitToCells=function(w){var C=v(w);return(w.values||[]).slice(C[0],C[1]).map(function(P,t){var r=typeof P=="string"&&P.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:t+r,key:C[0]+t,column:w,calcdata:w.calcdata,page:w.page,rowBlocks:w.rowBlocks,value:P}})};function v(w){var C=w.rowBlocks[w.page],P=C?C.rows[0].rowIndex:0,t=C?P+C.rows.length:0;return[P,t]}}}),AF=Ne({"src/traces/table/plot.js"(te,Z){var v=TF(),w=xn(),C=In(),P=C.numberFormat,t=a1(),r=zs(),a=uc(),l=In().raiseToTop,i=In().strTranslate,s=In().cancelTransition,o=pre(),u=mre(),d=io();Z.exports=function(ue,_e){var Le=!ue._context.staticPlot,ze=ue._fullLayout._paper.selectAll("."+v.cn.table).data(_e.map(function(ft){var Wt=t.unwrap(ft),Zt=Wt.trace;return o(ue,Zt)}),t.keyFun);ze.exit().remove(),ze.enter().append("g").classed(v.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),ze.attr("width",function(ft){return ft.width+ft.size.l+ft.size.r}).attr("height",function(ft){return ft.height+ft.size.t+ft.size.b}).attr("transform",function(ft){return i(ft.translateX,ft.translateY)});var Ge=ze.selectAll("."+v.cn.tableControlView).data(t.repeat,t.keyFun),Ve=Ge.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(Le){var rt="onwheel"in document?"wheel":"mousewheel";Ve.on("mousemove",function(ft){Ge.filter(function(Wt){return ft===Wt}).call(c,ue)}).on(rt,function(ft){if(!ft.scrollbarState.wheeling){ft.scrollbarState.wheeling=!0;var Wt=ft.scrollY+w.event.deltaY,Zt=le(ue,Ge,null,Wt)(ft);Zt||(w.event.stopPropagation(),w.event.preventDefault()),ft.scrollbarState.wheeling=!1}}).call(c,ue,!0)}Ge.attr("transform",function(ft){return i(ft.size.l,ft.size.t)});var pt=Ge.selectAll("."+v.cn.scrollBackground).data(t.repeat,t.keyFun);pt.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),pt.attr("width",function(ft){return ft.width}).attr("height",function(ft){return ft.height}),Ge.each(function(ft){r.setClipUrl(w.select(this),y(ue,ft),ue)});var gt=Ge.selectAll("."+v.cn.yColumn).data(function(ft){return ft.columns},t.keyFun);gt.enter().append("g").classed(v.cn.yColumn,!0),gt.exit().remove(),gt.attr("transform",function(ft){return i(ft.x,0)}),Le&&gt.call(w.behavior.drag().origin(function(ft){var Wt=w.select(this);return V(Wt,ft,-v.uplift),l(this),ft.calcdata.columnDragInProgress=!0,c(Ge.filter(function(Zt){return ft.calcdata.key===Zt.key}),ue),ft}).on("drag",function(ft){var Wt=w.select(this),Zt=function(Br){return(ft===Br?w.event.x:Br.x)+Br.columnWidth/2};ft.x=Math.max(-v.overdrag,Math.min(ft.calcdata.width+v.overdrag-ft.columnWidth,w.event.x));var cr=E(gt).filter(function(Br){return Br.calcdata.key===ft.calcdata.key}),pr=cr.sort(function(Br,Fr){return Zt(Br)-Zt(Fr)});pr.forEach(function(Br,Fr){Br.xIndex=Fr,Br.x=ft===Br?Br.x:Br.xScale(Br)}),gt.filter(function(Br){return ft!==Br}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Br){return i(Br.x,0)}),Wt.call(s).attr("transform",i(ft.x,-v.uplift))}).on("dragend",function(ft){var Wt=w.select(this),Zt=ft.calcdata;ft.x=ft.xScale(ft),ft.calcdata.columnDragInProgress=!1,V(Wt,ft,0),B(ue,Zt,Zt.columns.map(function(cr){return cr.xIndex}))})),gt.each(function(ft){r.setClipUrl(w.select(this),m(ue,ft),ue)});var ht=gt.selectAll("."+v.cn.columnBlock).data(u.splitToPanels,t.keyFun);ht.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(ft){return ft.key}),ht.style("cursor",function(ft){return ft.dragHandle?"ew-resize":ft.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var lt=ht.filter(z),Fe=ht.filter(q);Le&&Fe.call(w.behavior.drag().origin(function(ft){return w.event.stopPropagation(),ft}).on("drag",le(ue,Ge,-1)).on("dragend",function(){})),_(ue,Ge,lt,ht),_(ue,Ge,Fe,ht);var Pe=Ge.selectAll("."+v.cn.scrollAreaClip).data(t.repeat,t.keyFun);Pe.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(ft){return y(ue,ft)});var be=Pe.selectAll("."+v.cn.scrollAreaClipRect).data(t.repeat,t.keyFun);be.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),be.attr("width",function(ft){return ft.width+2*v.overdrag}).attr("height",function(ft){return ft.height+v.uplift});var Ye=gt.selectAll("."+v.cn.columnBoundary).data(t.repeat,t.keyFun);Ye.enter().append("g").classed(v.cn.columnBoundary,!0);var mt=gt.selectAll("."+v.cn.columnBoundaryClippath).data(t.repeat,t.keyFun);mt.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),mt.attr("id",function(ft){return m(ue,ft)});var bt=mt.selectAll("."+v.cn.columnBoundaryRect).data(t.repeat,t.keyFun);bt.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),bt.attr("width",function(ft){return ft.columnWidth+2*h(ft)}).attr("height",function(ft){return ft.calcdata.height+2*h(ft)+v.uplift}).attr("x",function(ft){return-h(ft)}).attr("y",function(ft){return-h(ft)}),J(null,Fe,Ge)};function h(ce){return Math.ceil(ce.calcdata.maxLineWidth/2)}function y(ce,ue){return"clip"+ce._fullLayout._uid+"_scrollAreaBottomClip_"+ue.key}function m(ce,ue){return"clip"+ce._fullLayout._uid+"_columnBoundaryClippath_"+ue.calcdata.key+"_"+ue.specIndex}function E(ce){return[].concat.apply([],ce.map(function(ue){return ue})).map(function(ue){return ue.__data__})}function c(ce,ue,_e){function Le(gt){var ht=gt.rowBlocks;return se(ht,ht.length-1)+(ht.length?ee(ht[ht.length-1],1/0):1)}var ze=ce.selectAll("."+v.cn.scrollbarKit).data(t.repeat,t.keyFun);ze.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),ze.each(function(gt){var ht=gt.scrollbarState;ht.totalHeight=Le(gt),ht.scrollableAreaHeight=gt.groupHeight-H(gt),ht.currentlyVisibleHeight=Math.min(ht.totalHeight,ht.scrollableAreaHeight),ht.ratio=ht.currentlyVisibleHeight/ht.totalHeight,ht.barLength=Math.max(ht.ratio*ht.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),ht.barWiggleRoom=ht.currentlyVisibleHeight-ht.barLength,ht.wiggleRoom=Math.max(0,ht.totalHeight-ht.scrollableAreaHeight),ht.topY=ht.barWiggleRoom===0?0:gt.scrollY/ht.wiggleRoom*ht.barWiggleRoom,ht.bottomY=ht.topY+ht.barLength,ht.dragMultiplier=ht.wiggleRoom/ht.barWiggleRoom}).attr("transform",function(gt){var ht=gt.width+v.scrollbarWidth/2+v.scrollbarOffset;return i(ht,H(gt))});var Ge=ze.selectAll("."+v.cn.scrollbar).data(t.repeat,t.keyFun);Ge.enter().append("g").classed(v.cn.scrollbar,!0);var Ve=Ge.selectAll("."+v.cn.scrollbarSlider).data(t.repeat,t.keyFun);Ve.enter().append("g").classed(v.cn.scrollbarSlider,!0),Ve.attr("transform",function(gt){return i(0,gt.scrollbarState.topY||0)});var rt=Ve.selectAll("."+v.cn.scrollbarGlyph).data(t.repeat,t.keyFun);rt.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),rt.attr("y2",function(gt){return gt.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(gt){return gt.columnDragInProgress||!gt.scrollbarState.barWiggleRoom||_e?0:.4}),rt.transition().delay(0).duration(0),rt.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var pt=Ge.selectAll("."+v.cn.scrollbarCaptureZone).data(t.repeat,t.keyFun);pt.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(gt){var ht=w.event.y,lt=this.getBoundingClientRect(),Fe=gt.scrollbarState,Pe=ht-lt.top,be=w.scale.linear().domain([0,Fe.scrollableAreaHeight]).range([0,Fe.totalHeight]).clamp(!0);Fe.topY<=Pe&&Pe<=Fe.bottomY||le(ue,ce,null,be(Pe-Fe.barLength/2))(gt)}).call(w.behavior.drag().origin(function(gt){return w.event.stopPropagation(),gt.scrollbarState.scrollbarScrollInProgress=!0,gt}).on("drag",le(ue,ce)).on("dragend",function(){})),pt.attr("y2",function(gt){return gt.scrollbarState.scrollableAreaHeight}),ue._context.staticPlot&&(rt.remove(),pt.remove())}function _(ce,ue,_e,Le){var ze=T(_e),Ge=M(ze);g(Ge);var Ve=k(Ge);p(Ve);var rt=A(Ge),pt=b(rt);f(pt),x(pt,ue,Le,ce),ie(Ge)}function T(ce){var ue=ce.selectAll("."+v.cn.columnCells).data(t.repeat,t.keyFun);return ue.enter().append("g").classed(v.cn.columnCells,!0),ue.exit().remove(),ue}function M(ce){var ue=ce.selectAll("."+v.cn.columnCell).data(u.splitToCells,function(_e){return _e.keyWithinBlock});return ue.enter().append("g").classed(v.cn.columnCell,!0),ue.exit().remove(),ue}function k(ce){var ue=ce.selectAll("."+v.cn.cellRect).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("rect").classed(v.cn.cellRect,!0),ue}function b(ce){var ue=ce.selectAll("."+v.cn.cellText).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){w.event.stopPropagation()}),ue}function A(ce){var ue=ce.selectAll("."+v.cn.cellTextHolder).data(t.repeat,function(_e){return _e.keyWithinBlock});return ue.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ue}function g(ce){ce.each(function(ue,_e){var Le=ue.calcdata.cells.font,ze=ue.column.specIndex,Ge={size:U(Le.size,ze,_e),color:U(Le.color,ze,_e),family:U(Le.family,ze,_e),weight:U(Le.weight,ze,_e),style:U(Le.style,ze,_e),variant:U(Le.variant,ze,_e),textcase:U(Le.textcase,ze,_e),lineposition:U(Le.lineposition,ze,_e),shadow:U(Le.shadow,ze,_e)};ue.rowNumber=ue.key,ue.align=U(ue.calcdata.cells.align,ze,_e),ue.cellBorderWidth=U(ue.calcdata.cells.line.width,ze,_e),ue.font=Ge})}function f(ce){ce.each(function(ue){r.font(w.select(this),ue.font)})}function p(ce){ce.attr("width",function(ue){return ue.column.columnWidth}).attr("stroke-width",function(ue){return ue.cellBorderWidth}).each(function(ue){var _e=w.select(this);d.stroke(_e,U(ue.calcdata.cells.line.color,ue.column.specIndex,ue.rowNumber)),d.fill(_e,U(ue.calcdata.cells.fill.color,ue.column.specIndex,ue.rowNumber))})}function x(ce,ue,_e,Le){ce.text(function(ze){var Ge=ze.column.specIndex,Ve=ze.rowNumber,rt=ze.value,pt=typeof rt=="string",gt=pt&&rt.match(/<br>/i),ht=!pt||gt;ze.mayHaveMarkup=pt&&rt.match(/[<&>]/);var lt=N(rt);ze.latex=lt;var Fe=lt?"":U(ze.calcdata.cells.prefix,Ge,Ve)||"",Pe=lt?"":U(ze.calcdata.cells.suffix,Ge,Ve)||"",be=lt?null:U(ze.calcdata.cells.format,Ge,Ve)||null,Ye=Fe+(be?P(be)(ze.value):ze.value)+Pe,mt;ze.wrappingNeeded=!ze.wrapped&&!ht&&!lt&&(mt=D(Ye)),ze.cellHeightMayIncrease=gt||lt||ze.mayHaveMarkup||(mt===void 0?D(Ye):mt),ze.needsConvertToTspans=ze.mayHaveMarkup||ze.wrappingNeeded||ze.latex;var bt;if(ze.wrappingNeeded){var ft=v.wrapSplitCharacter===" "?Ye.replace(/<a href=/ig,"<a_href="):Ye,Wt=ft.split(v.wrapSplitCharacter),Zt=v.wrapSplitCharacter===" "?Wt.map(function(cr){return cr.replace(/<a_href=/ig,"<a href=")}):Wt;ze.fragments=Zt.map(function(cr){return{text:cr,width:null}}),ze.fragments.push({fragment:v.wrapSpacer,width:null}),bt=Zt.join(v.lineBreaker)+v.lineBreaker+v.wrapSpacer}else delete ze.fragments,bt=Ye;return bt}).attr("dy",function(ze){return ze.needsConvertToTspans?0:"0.75em"}).each(function(ze){var Ge=this,Ve=w.select(Ge),rt=ze.wrappingNeeded?de:me;ze.needsConvertToTspans?a.convertToTspans(Ve,Le,rt(_e,Ge,ue,Le,ze)):w.select(Ge.parentNode).attr("transform",function(pt){return i(W(pt),v.cellPad)}).attr("text-anchor",function(pt){return{left:"start",center:"middle",right:"end"}[pt.align]})})}function N(ce){return typeof ce=="string"&&ce.match(v.latexCheck)}function D(ce){return ce.indexOf(v.wrapSplitCharacter)!==-1}function B(ce,ue,_e){var Le=ue.gdColumnsOriginalOrder;ue.gdColumns.sort(function(ze,Ge){return _e[Le.indexOf(ze)]-_e[Le.indexOf(Ge)]}),ue.columnorder=_e,ce.emit("plotly_restyle")}function U(ce,ue,_e){if(C.isArrayOrTypedArray(ce)){var Le=ce[Math.min(ue,ce.length-1)];return C.isArrayOrTypedArray(Le)?Le[Math.min(_e,Le.length-1)]:Le}else return ce}function V(ce,ue,_e){ce.transition().ease(v.releaseTransitionEase).duration(v.releaseTransitionDuration).attr("transform",i(ue.x,_e))}function q(ce){return ce.type==="cells"}function z(ce){return ce.type==="header"}function H(ce){var ue=ce.rowBlocks.length?ce.rowBlocks[0].auxiliaryBlocks:[];return ue.reduce(function(_e,Le){return _e+ee(Le,1/0)},0)}function G(ce,ue,_e){for(var Le=[],ze=0,Ge=0;Ge<ce.length;Ge++){for(var Ve=ce[Ge],rt=Ve.rows,pt=0,gt=0;gt<rt.length;gt++)pt+=rt[gt].rowHeight;Ve.allRowsHeight=pt;var ht=ze+pt,lt=ue,Fe=lt+_e;lt<ht&&Fe>ze&&Le.push(Ge),ze+=pt}return Le}function J(ce,ue,_e){var Le=E(ue)[0];if(Le!==void 0){var ze=Le.rowBlocks,Ge=Le.calcdata,Ve=se(ze,ze.length),rt=Le.calcdata.groupHeight-H(Le),pt=Ge.scrollY=Math.max(0,Math.min(Ve-rt,Ge.scrollY)),gt=G(ze,pt,rt);gt.length===1&&(gt[0]===ze.length-1?gt.unshift(gt[0]-1):gt.push(gt[0]+1)),gt[0]%2&&gt.reverse(),ue.each(function(ht,lt){ht.page=gt[lt],ht.scrollY=pt}),ue.attr("transform",function(ht){var lt=se(ht.rowBlocks,ht.page)-ht.scrollY;return i(0,lt)}),ce&&(ye(ce,_e,ue,gt,Le.prevPages,Le,0),ye(ce,_e,ue,gt,Le.prevPages,Le,1),c(_e,ce))}}function le(ce,ue,_e,Le){return function(Ge){var Ve=Ge.calcdata?Ge.calcdata:Ge,rt=ue.filter(function(lt){return Ve.key===lt.key}),pt=_e||Ve.scrollbarState.dragMultiplier,gt=Ve.scrollY;Ve.scrollY=Le===void 0?Ve.scrollY+pt*w.event.dy:Le;var ht=rt.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(q);return J(ce,ht,rt),Ve.scrollY===gt}}function ye(ce,ue,_e,Le,ze,Ge,Ve){var rt=Le[Ve]!==ze[Ve];rt&&(clearTimeout(Ge.currentRepaint[Ve]),Ge.currentRepaint[Ve]=setTimeout(function(){var pt=_e.filter(function(gt,ht){return ht===Ve&&Le[ht]!==ze[ht]});_(ce,ue,pt,_e),ze[Ve]=Le[Ve]}))}function de(ce,ue,_e,Le){return function(){var Ge=w.select(ue.parentNode);Ge.each(function(Ve){var rt=Ve.fragments;Ge.selectAll("tspan.line").each(function(Ye,mt){rt[mt].width=this.getComputedTextLength()});var pt=rt[rt.length-1].width,gt=rt.slice(0,-1),ht=[],lt,Fe,Pe=0,be=Ve.column.columnWidth-2*v.cellPad;for(Ve.value="";gt.length;)lt=gt.shift(),Fe=lt.width+pt,Pe+Fe>be&&(Ve.value+=ht.join(v.wrapSpacer)+v.lineBreaker,ht=[],Pe=0),ht.push(lt.text),Pe+=Fe;Pe&&(Ve.value+=ht.join(v.wrapSpacer)),Ve.wrapped=!0}),Ge.selectAll("tspan.line").remove(),x(Ge.select("."+v.cn.cellText),_e,ce,Le),w.select(ue.parentNode.parentNode).call(ie)}}function me(ce,ue,_e,Le,ze){return function(){if(!ze.settledY){var Ve=w.select(ue.parentNode),rt=oe(ze),pt=ze.key-rt.firstRowIndex,gt=rt.rows[pt].rowHeight,ht=ze.cellHeightMayIncrease?ue.parentNode.getBoundingClientRect().height+2*v.cellPad:gt,lt=Math.max(ht,gt),Fe=lt-rt.rows[pt].rowHeight;Fe&&(rt.rows[pt].rowHeight=lt,ce.selectAll("."+v.cn.columnCell).call(ie),J(null,ce.filter(q),0),c(_e,Le,!0)),Ve.attr("transform",function(){var Pe=this,be=Pe.parentNode,Ye=be.getBoundingClientRect(),mt=w.select(Pe.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),bt=Pe.transform.baseVal.consolidate(),ft=mt.top-Ye.top+(bt?bt.matrix.f:v.cellPad);return i(W(ze,w.select(Pe.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),ft)}),ze.settledY=!0}}}function W(ce,ue){switch(ce.align){case"left":return v.cellPad;case"right":return ce.column.columnWidth-(ue||0)-v.cellPad;case"center":return(ce.column.columnWidth-(ue||0))/2;default:return v.cellPad}}function ie(ce){ce.attr("transform",function(ue){var _e=ue.rowBlocks[0].auxiliaryBlocks.reduce(function(Ve,rt){return Ve+ee(rt,1/0)},0),Le=oe(ue),ze=ee(Le,ue.key),Ge=ze+_e;return i(0,Ge)}).selectAll("."+v.cn.cellRect).attr("height",function(ue){return Y(oe(ue),ue.key).rowHeight})}function se(ce,ue){for(var _e=0,Le=ue-1;Le>=0;Le--)_e+=pe(ce[Le]);return _e}function ee(ce,ue){for(var _e=0,Le=0;Le<ce.rows.length&&ce.rows[Le].rowIndex<ue;Le++)_e+=ce.rows[Le].rowHeight;return _e}function pe(ce){var ue=ce.allRowsHeight;if(ue!==void 0)return ue;for(var _e=0,Le=0;Le<ce.rows.length;Le++)_e+=ce.rows[Le].rowHeight;return ce.allRowsHeight=_e,_e}function oe(ce){return ce.rowBlocks[ce.page]}function Y(ce,ue){return ce.rows[ue-ce.firstRowIndex]}}}),yre=Ne({"src/traces/table/base_plot.js"(te){var Z=iv().getModuleCalcData,v=AF(),w="table";te.name=w,te.plot=function(C){var P=Z(C.calcdata,w)[0];P.length&&v(C,P)},te.clean=function(C,P,t,r){var a=r._has&&r._has(w),l=P._has&&P._has(w);a&&!l&&r._paperdiv.selectAll(".table").remove()}}}),gre=Ne({"src/traces/table/index.js"(te,Z){Z.exports={attributes:wF(),supplyDefaults:dre(),calc:vre(),plot:AF(),moduleType:"trace",name:"table",basePlotModule:yre(),categories:["noOpacity"],meta:{}}}}),_re=Ne({"lib/table.js"(te,Z){Z.exports=gre()}}),xre=Ne({"src/traces/carpet/axis_attributes.js"(te,Z){var v=$o(),w=lu(),C=wd(),P=bc().descriptionWithDates,t=Kc().overrideAll,r=Dd().dash,a=co().extendFlat;Z.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:v({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:C.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:a({},C.labelalias,{editType:"calc"}),tickfont:v({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:P("tick label")},tickformatstops:t(C.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:w.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:a({},r,{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:a({},r,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:w.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"}}}),VR=Ne({"src/traces/carpet/attributes.js"(te,Z){var v=$o(),w=xre(),C=lu(),P=v({editType:"calc"}),t=Jc().zorder;P.family.dflt='"Open Sans", verdana, arial, sans-serif',P.size.dflt=12,P.color.dflt=C.defaultLine,Z.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:w,baxis:w,font:P,color:{valType:"color",dflt:C.defaultLine,editType:"plot"},zorder:t}}}),bre=Ne({"src/traces/carpet/xy_defaults.js"(te,Z){var v=In().isArray1D;Z.exports=function(C,P,t){var r=t("x"),a=r&&r.length,l=t("y"),i=l&&l.length;if(!a&&!i)return!1;if(P._cheater=!r,(!a||v(r))&&(!i||v(l))){var s=a?r.length:1/0;i&&(s=Math.min(s,l.length)),P.a&&P.a.length&&(s=Math.min(s,P.a.length)),P.b&&P.b.length&&(s=Math.min(s,P.b.length)),P._length=s}else P._length=null;return!0}}}),wre=Ne({"src/traces/carpet/axis_defaults.js"(te,Z){var v=VR(),w=io().addOpacity,C=Xo(),P=In(),t=Tg(),r=Em(),a=fp(),l=Gf(),i=qp(),s=Ty();Z.exports=function(d,h,y){var m=y.letter,E=y.font||{},c=v[m+"axis"];function _(G,J){return P.coerce(d,h,c,G,J)}function T(G,J){return P.coerce2(d,h,c,G,J)}y.name&&(h._name=y.name,h._id=y.name),_("autotypenumbers",y.autotypenumbersDflt);var M=_("type");if(M==="-"&&(y.data&&o(h,y.data),h.type==="-"?h.type="linear":M=d.type=h.type),_("smoothing"),_("cheatertype"),_("showticklabels"),_("labelprefix",m+" = "),_("labelsuffix"),_("showtickprefix"),_("showticksuffix"),_("separatethousands"),_("tickformat"),_("exponentformat"),_("minexponent"),_("showexponent"),_("categoryorder"),_("tickmode"),_("tickvals"),_("ticktext"),_("tick0"),_("dtick"),h.tickmode==="array"&&(_("arraytick0"),_("arraydtick")),_("labelpadding"),h._hovertitle=m,M==="date"){var k=C.getComponentMethod("calendars","handleDefaults");k(d,h,"calendar",y.calendar)}i(h,y.fullLayout),h.c2p=P.identity;var b=_("color",y.dfltColor),A=b===d.color?b:E.color,g=_("title.text");g&&(P.coerceFont(_,"title.font",E,{overrideDflt:{size:P.bigFont(E.size),color:A}}),_("title.offset")),_("tickangle");var f=_("autorange",!h.isValidRange(d.range));f&&_("rangemode"),_("range"),h.cleanRange(),_("fixedrange"),t(d,h,_,M),a(d,h,_,M,y),r(d,h,_,M,y),l(d,h,_,{data:y.data,dataAttr:m});var p=T("gridcolor",w(b,.3)),x=T("gridwidth"),N=T("griddash"),D=_("showgrid");D||(delete h.gridcolor,delete h.gridwidth,delete h.griddash);var B=T("startlinecolor",b),U=T("startlinewidth",x),V=_("startline",h.showgrid||!!B||!!U);V||(delete h.startlinecolor,delete h.startlinewidth);var q=T("endlinecolor",b),z=T("endlinewidth",x),H=_("endline",h.showgrid||!!q||!!z);return H||(delete h.endlinecolor,delete h.endlinewidth),D?(_("minorgridcount"),_("minorgridwidth",x),_("minorgriddash",N),_("minorgridcolor",w(p,.06)),h.minorgridcount||(delete h.minorgridwidth,delete h.minorgriddash,delete h.minorgridcolor)):(delete h.gridcolor,delete h.gridwidth,delete h.griddash),h.showticklabels==="none"&&(delete h.tickfont,delete h.tickangle,delete h.showexponent,delete h.exponentformat,delete h.minexponent,delete h.tickformat,delete h.showticksuffix,delete h.showtickprefix),h.showticksuffix||delete h.ticksuffix,h.showtickprefix||delete h.tickprefix,_("tickmode"),h};function o(u,d){if(u.type==="-"){var h=u._id,y=h.charAt(0),m=y+"calendar",E=u[m];u.type=s(d,E,{autotypenumbers:u.autotypenumbers})}}}}),Tre=Ne({"src/traces/carpet/ab_defaults.js"(te,Z){var v=wre(),w=Tu();Z.exports=function(t,r,a,l,i){var s=l("a");s||(l("da"),l("a0"));var o=l("b");o||(l("db"),l("b0")),C(t,r,a,i)};function C(P,t,r,a){var l=["aaxis","baxis"];l.forEach(function(i){var s=i.charAt(0),o=P[i]||{},u=w.newContainer(t,i),d={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:s+"axis",letter:s,font:t.font,name:i,data:P[s],calendar:t.calendar,dfltColor:a,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};v(o,u,d),u._categories=u._categories||[],!P[i]&&o.type!=="-"&&(P[i]={type:o.type})})}}}),Are=Ne({"src/traces/carpet/defaults.js"(te,Z){var v=In(),w=bre(),C=Tre(),P=VR(),t=lu();Z.exports=function(a,l,i,s){function o(h,y){return v.coerce(a,l,P,h,y)}l._clipPathId="clip"+l.uid+"carpet";var u=o("color",t.defaultLine);if(v.coerceFont(o,"font",s.font),o("carpet"),C(a,l,s,o,u),!l.a||!l.b){l.visible=!1;return}l.a.length<3&&(l.aaxis.smoothing=0),l.b.length<3&&(l.baxis.smoothing=0);var d=w(a,l,o);d||(l.visible=!1),l._cheater&&o("cheaterslope"),o("zorder")}}}),SF=Ne({"src/traces/carpet/map_1d_array.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(C,P,t){var r;for(v(C)?C.length>P.length&&(C=C.slice(0,P.length)):C=[],r=0;r<P.length;r++)C[r]=t(P[r]);return C}}}),EF=Ne({"src/traces/carpet/makepath.js"(te,Z){Z.exports=function(w,C,P){if(w.length===0)return"";var t,r=[],a=P?3:1;for(t=0;t<w.length;t+=a)r.push(w[t]+","+C[t]),P&&t<w.length-a&&(r.push("C"),r.push([w[t+1]+","+C[t+1],w[t+2]+","+C[t+2]+" "].join(" ")));return r.join(P?"":"L")}}}),Sre=Ne({"src/traces/carpet/orient_text.js"(te,Z){Z.exports=function(w,C,P,t,r,a){var l=r[0]*w.dpdx(C),i=r[1]*w.dpdy(P),s=1,o=1;if(a){var u=Math.sqrt(r[0]*r[0]+r[1]*r[1]),d=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=(r[0]*a[0]+r[1]*a[1])/u/d;o=Math.max(0,h)}var y=Math.atan2(i,l)*180/Math.PI;return y<-90?(y+=180,s=-s):y>90&&(y-=180,s=-s),{angle:y,flip:s,p:w.c2p(t,C,P),offsetMultplier:o}}}}),Ere=Ne({"src/traces/carpet/plot.js"(te,Z){var v=xn(),w=zs(),C=SF(),P=EF(),t=Sre(),r=uc(),a=In(),l=a.strRotate,i=a.strTranslate,s=bd();Z.exports=function(_,T,M,k){var b=_._context.staticPlot,A=T.xaxis,g=T.yaxis,f=_._fullLayout,p=f._clips;a.makeTraceGroups(k,M,"trace").each(function(x){var N=v.select(this),D=x[0],B=D.trace,U=B.aaxis,V=B.baxis,q=a.ensureSingle(N,"g","minorlayer"),z=a.ensureSingle(N,"g","majorlayer"),H=a.ensureSingle(N,"g","boundarylayer"),G=a.ensureSingle(N,"g","labellayer");N.style("opacity",B.opacity),u(A,g,z,U,"a",U._gridlines,!0),u(A,g,z,V,"b",V._gridlines,!0),u(A,g,q,U,"a",U._minorgridlines,!0),u(A,g,q,V,"b",V._minorgridlines,!0),u(A,g,H,U,"a-boundary",U._boundarylines,b),u(A,g,H,V,"b-boundary",V._boundarylines,b);var J=d(_,A,g,B,D,G,U._labels,"a-label"),le=d(_,A,g,B,D,G,V._labels,"b-label");h(_,G,B,D,A,g,J,le),o(B,D,p,A,g)})};function o(c,_,T,M,k){var b,A,g,f,p=T.select("#"+c._clipPathId);p.size()||(p=T.append("clipPath").classed("carpetclip",!0));var x=a.ensureSingle(p,"path","carpetboundary"),N=_.clipsegments,D=[];for(f=0;f<N.length;f++)b=N[f],A=C([],b.x,M.c2p),g=C([],b.y,k.c2p),D.push(P(A,g,b.bicubic));var B="M"+D.join("L")+"Z";p.attr("id",c._clipPathId),x.attr("d",B)}function u(c,_,T,M,k,b,A){var g="const-"+k+"-lines",f=T.selectAll("."+g).data(b);f.enter().append("path").classed(g,!0).style("vector-effect",A?"none":"non-scaling-stroke"),f.each(function(p){var x=p,N=x.x,D=x.y,B=C([],N,c.c2p),U=C([],D,_.c2p),V="M"+P(B,U,x.smoothing),q=v.select(this);q.attr("d",V).style("stroke-width",x.width).style("stroke",x.color).style("stroke-dasharray",w.dashStyle(x.dash,x.width)).style("fill","none")}),f.exit().remove()}function d(c,_,T,M,k,b,A,g){var f=b.selectAll("text."+g).data(A);f.enter().append("text").classed(g,!0);var p=0,x={};return f.each(function(N,D){var B;if(N.axis.tickangle==="auto")B=t(M,_,T,N.xy,N.dxy);else{var U=(N.axis.tickangle+180)*Math.PI/180;B=t(M,_,T,N.xy,[Math.cos(U),Math.sin(U)])}D||(x={angle:B.angle,flip:B.flip});var V=(N.endAnchor?-1:1)*B.flip,q=v.select(this).attr({"text-anchor":V>0?"start":"end","data-notex":1}).call(w.font,N.font).text(N.text).call(r.convertToTspans,c),z=w.bBox(this);q.attr("transform",i(B.p[0],B.p[1])+l(B.angle)+i(N.axis.labelpadding*V,z.height*.3)),p=Math.max(p,z.width+N.axis.labelpadding)}),f.exit().remove(),x.maxExtent=p,x}function h(c,_,T,M,k,b,A,g){var f,p,x,N,D=a.aggNums(Math.min,null,T.a),B=a.aggNums(Math.max,null,T.a),U=a.aggNums(Math.min,null,T.b),V=a.aggNums(Math.max,null,T.b);f=.5*(D+B),p=U,x=T.ab2xy(f,p,!0),N=T.dxyda_rough(f,p),A.angle===void 0&&a.extendFlat(A,t(T,k,b,x,T.dxydb_rough(f,p))),E(c,_,T,M,x,N,T.aaxis,k,b,A,"a-title"),f=D,p=.5*(U+V),x=T.ab2xy(f,p,!0),N=T.dxydb_rough(f,p),g.angle===void 0&&a.extendFlat(g,t(T,k,b,x,T.dxyda_rough(f,p))),E(c,_,T,M,x,N,T.baxis,k,b,g,"b-title")}var y=s.LINE_SPACING,m=(1-s.MID_SHIFT)/y+1;function E(c,_,T,M,k,b,A,g,f,p,x){var N=[];A.title.text&&N.push(A.title.text);var D=_.selectAll("text."+x).data(N),B=p.maxExtent;D.enter().append("text").classed(x,!0),D.each(function(){var U=t(T,g,f,k,b);["start","both"].indexOf(A.showticklabels)===-1&&(B=0);var V=A.title.font.size;B+=V+A.title.offset;var q=p.angle+(p.flip<0?180:0),z=(q-U.angle+450)%360,H=z>90&&z<270,G=v.select(this);G.text(A.title.text).call(r.convertToTspans,c),H&&(B=(-r.lineCount(G)+m)*y*V-B),G.attr("transform",i(U.p[0],U.p[1])+l(U.angle)+i(0,B)).attr("text-anchor","middle").call(w.font,A.title.font)}),D.exit().remove()}}}),Mre=Ne({"src/traces/carpet/cheater_basis.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(w,C,P){var t,r,a,l,i,s,o=[],u=v(w)?w.length:w,d=v(C)?C.length:C,h=v(w)?w:null,y=v(C)?C:null;h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(u-1)),y&&(l=(y.length-1)/(y[y.length-1]-y[0])/(d-1));var m,E=1/0,c=-1/0;for(r=0;r<d;r++)for(o[r]=[],s=y?(y[r]-y[0])*l:r/(d-1),t=0;t<u;t++)i=h?(h[t]-h[0])*a:t/(u-1),m=i-s*P,E=Math.min(m,E),c=Math.max(m,c),o[r][t]=m;var _=1/(c-E),T=-E*_;for(r=0;r<d;r++)for(t=0;t<u;t++)o[r][t]=_*o[r][t]+T;return o}}}),Cre=Ne({"src/traces/carpet/array_minmax.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(C){return w(C,0)};function w(C,P){if(!v(C)||P>=10)return null;for(var t=1/0,r=-1/0,a=C.length,l=0;l<a;l++){var i=C[l];if(v(i)){var s=w(i,P+1);s&&(t=Math.min(s[0],t),r=Math.max(s[1],r))}else t=Math.min(i,t),r=Math.max(i,r)}return[t,r]}}}),kre=Ne({"src/traces/carpet/calc_gridlines.js"(te,Z){var v=Os(),w=co().extendFlat;Z.exports=function(P,t,r){var a,l,i,s,o,u,d,h,y,m,E,c,_,T,M=P["_"+t],k=P[t+"axis"],b=k._gridlines=[],A=k._minorgridlines=[],g=k._boundarylines=[],f=P["_"+r],p=P[r+"axis"];k.tickmode==="array"&&(k.tickvals=M.slice());var x=P._xctrl,N=P._yctrl,D=x[0].length,B=x.length,U=P._a.length,V=P._b.length;v.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var q=k.smoothing?3:1;function z(G){var J,le,ye,de,me,W,ie,se,ee,pe,oe,Y,ce=[],ue=[],_e={};if(t==="b")for(le=P.b2j(G),ye=Math.floor(Math.max(0,Math.min(V-2,le))),de=le-ye,_e.length=V,_e.crossLength=U,_e.xy=function(Le){return P.evalxy([],Le,le)},_e.dxy=function(Le,ze){return P.dxydi([],Le,ye,ze,de)},J=0;J<U;J++)W=Math.min(U-2,J),ie=J-W,se=P.evalxy([],J,le),p.smoothing&&J>0&&(ee=P.dxydi([],J-1,ye,0,de),ce.push(me[0]+ee[0]/3),ue.push(me[1]+ee[1]/3),pe=P.dxydi([],J-1,ye,1,de),ce.push(se[0]-pe[0]/3),ue.push(se[1]-pe[1]/3)),ce.push(se[0]),ue.push(se[1]),me=se;else for(J=P.a2i(G),W=Math.floor(Math.max(0,Math.min(U-2,J))),ie=J-W,_e.length=U,_e.crossLength=V,_e.xy=function(Le){return P.evalxy([],J,Le)},_e.dxy=function(Le,ze){return P.dxydj([],W,Le,ie,ze)},le=0;le<V;le++)ye=Math.min(V-2,le),de=le-ye,se=P.evalxy([],J,le),p.smoothing&&le>0&&(oe=P.dxydj([],W,le-1,ie,0),ce.push(me[0]+oe[0]/3),ue.push(me[1]+oe[1]/3),Y=P.dxydj([],W,le-1,ie,1),ce.push(se[0]-Y[0]/3),ue.push(se[1]-Y[1]/3)),ce.push(se[0]),ue.push(se[1]),me=se;return _e.axisLetter=t,_e.axis=k,_e.crossAxis=p,_e.value=G,_e.constvar=r,_e.index=h,_e.x=ce,_e.y=ue,_e.smoothing=p.smoothing,_e}function H(G){var J,le,ye,de,me,W=[],ie=[],se={};if(se.length=M.length,se.crossLength=f.length,t==="b")for(ye=Math.max(0,Math.min(V-2,G)),me=Math.min(1,Math.max(0,G-ye)),se.xy=function(ee){return P.evalxy([],ee,G)},se.dxy=function(ee,pe){return P.dxydi([],ee,ye,pe,me)},J=0;J<D;J++)W[J]=x[G*q][J],ie[J]=N[G*q][J];else for(le=Math.max(0,Math.min(U-2,G)),de=Math.min(1,Math.max(0,G-le)),se.xy=function(ee){return P.evalxy([],G,ee)},se.dxy=function(ee,pe){return P.dxydj([],le,ee,de,pe)},J=0;J<B;J++)W[J]=x[J][G*q],ie[J]=N[J][G*q];return se.axisLetter=t,se.axis=k,se.crossAxis=p,se.value=M[G],se.constvar=r,se.index=G,se.x=W,se.y=ie,se.smoothing=p.smoothing,se}if(k.tickmode==="array"){for(s=5e-15,o=[Math.floor((M.length-1-k.arraytick0)/k.arraydtick*(1+s)),Math.ceil(-k.arraytick0/k.arraydtick/(1+s))].sort(function(G,J){return G-J}),u=o[0]-1,d=o[1]+1,h=u;h<d;h++)l=k.arraytick0+k.arraydtick*h,!(l<0||l>M.length-1)&&b.push(w(H(l),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(h=u;h<d;h++)if(i=k.arraytick0+k.arraydtick*h,E=Math.min(i+k.arraydtick,M.length-1),!(i<0||i>M.length-1)&&!(E<0||E>M.length-1))for(c=M[i],_=M[E],a=0;a<k.minorgridcount;a++)T=E-i,!(T<=0)&&(m=c+(_-c)*(a+1)/(k.minorgridcount+1)*(k.arraydtick/T),!(m<M[0]||m>M[M.length-1])&&A.push(w(z(m),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&g.push(w(H(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&g.push(w(H(M.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,o=[Math.floor((M[M.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((M[0]-k.tick0)/k.dtick/(1+s))].sort(function(G,J){return G-J}),u=o[0],d=o[1],h=u;h<=d;h++)y=k.tick0+k.dtick*h,b.push(w(z(y),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(h=u-1;h<d+1;h++)for(y=k.tick0+k.dtick*h,a=0;a<k.minorgridcount;a++)m=y+k.dtick*(a+1)/(k.minorgridcount+1),!(m<M[0]||m>M[M.length-1])&&A.push(w(z(m),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&g.push(w(z(M[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&g.push(w(z(M[M.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}}}),Pre=Ne({"src/traces/carpet/calc_labels.js"(te,Z){var v=Os(),w=co().extendFlat;Z.exports=function(P,t){var r,a,l,i,s,o=t._labels=[],u=t._gridlines;for(r=0;r<u.length;r++)s=u[r],["start","both"].indexOf(t.showticklabels)!==-1&&(a=v.tickText(t,s.value),w(a,{prefix:l,suffix:i,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:r===0,isLast:r===u.length-1}),o.push(a)),["end","both"].indexOf(t.showticklabels)!==-1&&(a=v.tickText(t,s.value),w(a,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:r===0,isLast:r===u.length-1}),o.push(a))}}}),Lre=Ne({"src/traces/carpet/calc_clippath.js"(te,Z){Z.exports=function(w,C,P,t){var r,a,l,i=[],s=!!P.smoothing,o=!!t.smoothing,u=w[0].length-1,d=w.length-1;for(r=0,a=[],l=[];r<=u;r++)a[r]=w[0][r],l[r]=C[0][r];for(i.push({x:a,y:l,bicubic:s}),r=0,a=[],l=[];r<=d;r++)a[r]=w[r][u],l[r]=C[r][u];for(i.push({x:a,y:l,bicubic:o}),r=u,a=[],l=[];r>=0;r--)a[u-r]=w[d][r],l[u-r]=C[d][r];for(i.push({x:a,y:l,bicubic:s}),r=d,a=[],l=[];r>=0;r--)a[d-r]=w[r][0],l[d-r]=C[r][0];return i.push({x:a,y:l,bicubic:o}),i}}}),Rre=Ne({"src/traces/carpet/smooth_fill_2d_array.js"(te,Z){var v=In();Z.exports=function(C,P,t){var r,a,l,i=[],s=[],o=C[0].length,u=C.length;function d(le,ye){var de=0,me,W=0;return le>0&&(me=C[ye][le-1])!==void 0&&(W++,de+=me),le<o-1&&(me=C[ye][le+1])!==void 0&&(W++,de+=me),ye>0&&(me=C[ye-1][le])!==void 0&&(W++,de+=me),ye<u-1&&(me=C[ye+1][le])!==void 0&&(W++,de+=me),de/Math.max(1,W)}var h=0;for(r=0;r<o;r++)for(a=0;a<u;a++)C[a][r]===void 0&&(i.push(r),s.push(a),C[a][r]=d(r,a)),h=Math.max(h,Math.abs(C[a][r]));if(!i.length)return C;var y,m,E,c,_,T,M,k,b,A,g,f=1e-5,p=0,x=100,N=0,D=i.length;do{for(p=0,l=0;l<D;l++){r=i[l],a=s[l];var B=0,U=0,V,q,z,H,G,J;r===0?(G=Math.min(o-1,2),z=P[G],H=P[1],V=C[a][G],q=C[a][1],U+=q+(q-V)*(P[0]-H)/(H-z),B++):r===o-1&&(G=Math.max(0,o-3),z=P[G],H=P[o-2],V=C[a][G],q=C[a][o-2],U+=q+(q-V)*(P[o-1]-H)/(H-z),B++),(r===0||r===o-1)&&a>0&&a<u-1&&(y=t[a+1]-t[a],m=t[a]-t[a-1],U+=(m*C[a+1][r]+y*C[a-1][r])/(m+y),B++),a===0?(J=Math.min(u-1,2),z=t[J],H=t[1],V=C[J][r],q=C[1][r],U+=q+(q-V)*(t[0]-H)/(H-z),B++):a===u-1&&(J=Math.max(0,u-3),z=t[J],H=t[u-2],V=C[J][r],q=C[u-2][r],U+=q+(q-V)*(t[u-1]-H)/(H-z),B++),(a===0||a===u-1)&&r>0&&r<o-1&&(y=P[r+1]-P[r],m=P[r]-P[r-1],U+=(m*C[a][r+1]+y*C[a][r-1])/(m+y),B++),B?U/=B:(E=P[r+1]-P[r],c=P[r]-P[r-1],_=t[a+1]-t[a],T=t[a]-t[a-1],M=E*c*(E+c),k=_*T*(_+T),U=(M*(T*C[a+1][r]+_*C[a-1][r])+k*(c*C[a][r+1]+E*C[a][r-1]))/(k*(c+E)+M*(T+_))),b=U-C[a][r],A=b/h,p+=A*A,g=B?0:.85,C[a][r]+=b*(1+g)}p=Math.sqrt(p)}while(N++<x&&p>f);return v.log("Smoother converged to",p,"after",N,"iterations"),C}}}),Ire=Ne({"src/traces/carpet/constants.js"(te,Z){Z.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),Dre=Ne({"src/traces/carpet/catmull_rom.js"(te,Z){var v=.5;Z.exports=function(C,P,t,r){var a=C[0]-P[0],l=C[1]-P[1],i=t[0]-P[0],s=t[1]-P[1],o=Math.pow(a*a+l*l,v/2),u=Math.pow(i*i+s*s,v/2),d=(u*u*a-o*o*i)*r,h=(u*u*l-o*o*s)*r,y=u*(o+u)*3,m=o*(o+u)*3;return[[P[0]+(y&&d/y),P[1]+(y&&h/y)],[P[0]-(m&&d/m),P[1]-(m&&h/m)]]}}}),Ore=Ne({"src/traces/carpet/compute_control_points.js"(te,Z){var v=Dre(),w=In().ensureArray;function C(P,t,r){var a=-.5*r[0]+1.5*t[0],l=-.5*r[1]+1.5*t[1];return[(2*a+P[0])/3,(2*l+P[1])/3]}Z.exports=function(t,r,a,l,i,s){var o,u,d,h,y,m,E,c,_,T,M=a[0].length,k=a.length,b=i?3*M-2:M,A=s?3*k-2:k;for(t=w(t,A),r=w(r,A),d=0;d<A;d++)t[d]=w(t[d],b),r[d]=w(r[d],b);for(u=0,h=0;u<k;u++,h+=s?3:1)for(y=t[h],m=r[h],E=a[u],c=l[u],o=0,d=0;o<M;o++,d+=i?3:1)y[d]=E[o],m[d]=c[o];if(i)for(u=0,h=0;u<k;u++,h+=s?3:1){for(o=1,d=3;o<M-1;o++,d+=3)_=v([a[u][o-1],l[u][o-1]],[a[u][o],l[u][o]],[a[u][o+1],l[u][o+1]],i),t[h][d-1]=_[0][0],r[h][d-1]=_[0][1],t[h][d+1]=_[1][0],r[h][d+1]=_[1][1];T=C([t[h][0],r[h][0]],[t[h][2],r[h][2]],[t[h][3],r[h][3]]),t[h][1]=T[0],r[h][1]=T[1],T=C([t[h][b-1],r[h][b-1]],[t[h][b-3],r[h][b-3]],[t[h][b-4],r[h][b-4]]),t[h][b-2]=T[0],r[h][b-2]=T[1]}if(s)for(d=0;d<b;d++){for(h=3;h<A-3;h+=3)_=v([t[h-3][d],r[h-3][d]],[t[h][d],r[h][d]],[t[h+3][d],r[h+3][d]],s),t[h-1][d]=_[0][0],r[h-1][d]=_[0][1],t[h+1][d]=_[1][0],r[h+1][d]=_[1][1];T=C([t[0][d],r[0][d]],[t[2][d],r[2][d]],[t[3][d],r[3][d]]),t[1][d]=T[0],r[1][d]=T[1],T=C([t[A-1][d],r[A-1][d]],[t[A-3][d],r[A-3][d]],[t[A-4][d],r[A-4][d]]),t[A-2][d]=T[0],r[A-2][d]=T[1]}if(i&&s)for(h=1;h<A;h+=(h+1)%3===0?2:1){for(d=3;d<b-3;d+=3)_=v([t[h][d-3],r[h][d-3]],[t[h][d],r[h][d]],[t[h][d+3],r[h][d+3]],i),t[h][d-1]=.5*(t[h][d-1]+_[0][0]),r[h][d-1]=.5*(r[h][d-1]+_[0][1]),t[h][d+1]=.5*(t[h][d+1]+_[1][0]),r[h][d+1]=.5*(r[h][d+1]+_[1][1]);T=C([t[h][0],r[h][0]],[t[h][2],r[h][2]],[t[h][3],r[h][3]]),t[h][1]=.5*(t[h][1]+T[0]),r[h][1]=.5*(r[h][1]+T[1]),T=C([t[h][b-1],r[h][b-1]],[t[h][b-3],r[h][b-3]],[t[h][b-4],r[h][b-4]]),t[h][b-2]=.5*(t[h][b-2]+T[0]),r[h][b-2]=.5*(r[h][b-2]+T[1])}return[t,r]}}}),zre=Ne({"src/traces/carpet/create_spline_evaluator.js"(te,Z){Z.exports=function(v,w,C,P,t){var r=w-2,a=C-2;return P&&t?function(l,i,s){l||(l=[]);var o,u,d,h,y,m,E=Math.max(0,Math.min(Math.floor(i),r)),c=Math.max(0,Math.min(Math.floor(s),a)),_=Math.max(0,Math.min(1,i-E)),T=Math.max(0,Math.min(1,s-c));E*=3,c*=3;var M=_*_,k=M*_,b=1-_,A=b*b,g=A*b,f=T*T,p=f*T,x=1-T,N=x*x,D=N*x;for(m=0;m<v.length;m++)y=v[m],o=g*y[c][E]+3*(A*_*y[c][E+1]+b*M*y[c][E+2])+k*y[c][E+3],u=g*y[c+1][E]+3*(A*_*y[c+1][E+1]+b*M*y[c+1][E+2])+k*y[c+1][E+3],d=g*y[c+2][E]+3*(A*_*y[c+2][E+1]+b*M*y[c+2][E+2])+k*y[c+2][E+3],h=g*y[c+3][E]+3*(A*_*y[c+3][E+1]+b*M*y[c+3][E+2])+k*y[c+3][E+3],l[m]=D*o+3*(N*T*u+x*f*d)+p*h;return l}:P?function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),y,m,E,c,_,T;o*=3;var M=d*d,k=M*d,b=1-d,A=b*b,g=A*b,f=1-h;for(_=0;_<v.length;_++)T=v[_],y=f*T[u][o]+h*T[u+1][o],m=f*T[u][o+1]+h*T[u+1][o+1],E=f*T[u][o+2]+h*T[u+1][o+1],c=f*T[u][o+3]+h*T[u+1][o+1],l[_]=g*y+3*(A*d*m+b*M*E)+k*c;return l}:t?function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),y,m,E,c,_,T;u*=3;var M=h*h,k=M*h,b=1-h,A=b*b,g=A*b,f=1-d;for(_=0;_<v.length;_++)T=v[_],y=f*T[u][o]+d*T[u][o+1],m=f*T[u+1][o]+d*T[u+1][o+1],E=f*T[u+2][o]+d*T[u+2][o+1],c=f*T[u+3][o]+d*T[u+3][o+1],l[_]=g*y+3*(A*h*m+b*M*E)+k*c;return l}:function(l,i,s){l||(l=[]);var o=Math.max(0,Math.min(Math.floor(i),r)),u=Math.max(0,Math.min(Math.floor(s),a)),d=Math.max(0,Math.min(1,i-o)),h=Math.max(0,Math.min(1,s-u)),y,m,E,c,_=1-h,T=1-d;for(E=0;E<v.length;E++)c=v[E],y=T*c[u][o]+d*c[u][o+1],m=T*c[u+1][o]+d*c[u+1][o+1],l[E]=_*y+h*m;return l}}}}),Nre=Ne({"src/traces/carpet/create_i_derivative_evaluator.js"(te,Z){Z.exports=function(v,w,C){return w&&C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3,r*=3;var y=a*a,m=1-a,E=m*m,c=m*a*2,_=-3*E,T=3*(E-c),M=3*(c-y),k=3*y,b=l*l,A=b*l,g=1-l,f=g*g,p=f*g;for(h=0;h<v.length;h++)d=v[h],i=_*d[r][t]+T*d[r][t+1]+M*d[r][t+2]+k*d[r][t+3],s=_*d[r+1][t]+T*d[r+1][t+1]+M*d[r+1][t+2]+k*d[r+1][t+3],o=_*d[r+2][t]+T*d[r+2][t+1]+M*d[r+2][t+2]+k*d[r+2][t+3],u=_*d[r+3][t]+T*d[r+3][t+1]+M*d[r+3][t+2]+k*d[r+3][t+3],P[h]=p*i+3*(f*l*s+g*b*o)+A*u;return P}:w?function(P,t,r,a,l){P||(P=[]);var i,s,o,u;t*=3;var d=a*a,h=1-a,y=h*h,m=h*a*2,E=-3*y,c=3*(y-m),_=3*(m-d),T=3*d,M=1-l;for(o=0;o<v.length;o++)u=v[o],i=E*u[r][t]+c*u[r][t+1]+_*u[r][t+2]+T*u[r][t+3],s=E*u[r+1][t]+c*u[r+1][t+1]+_*u[r+1][t+2]+T*u[r+1][t+3],P[o]=M*i+l*s;return P}:C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;r*=3;var y=l*l,m=y*l,E=1-l,c=E*E,_=c*E;for(d=0;d<v.length;d++)h=v[d],i=h[r][t+1]-h[r][t],s=h[r+1][t+1]-h[r+1][t],o=h[r+2][t+1]-h[r+2][t],u=h[r+3][t+1]-h[r+3][t],P[d]=_*i+3*(c*l*s+E*y*o)+m*u;return P}:function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d=1-l;for(o=0;o<v.length;o++)u=v[o],i=u[r][t+1]-u[r][t],s=u[r+1][t+1]-u[r+1][t],P[o]=d*i+l*s;return P}}}}),Fre=Ne({"src/traces/carpet/create_j_derivative_evaluator.js"(te,Z){Z.exports=function(v,w,C){return w&&C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3,r*=3;var y=a*a,m=y*a,E=1-a,c=E*E,_=c*E,T=l*l,M=1-l,k=M*M,b=M*l*2,A=-3*k,g=3*(k-b),f=3*(b-T),p=3*T;for(h=0;h<v.length;h++)d=v[h],i=A*d[r][t]+g*d[r+1][t]+f*d[r+2][t]+p*d[r+3][t],s=A*d[r][t+1]+g*d[r+1][t+1]+f*d[r+2][t+1]+p*d[r+3][t+1],o=A*d[r][t+2]+g*d[r+1][t+2]+f*d[r+2][t+2]+p*d[r+3][t+2],u=A*d[r][t+3]+g*d[r+1][t+3]+f*d[r+2][t+3]+p*d[r+3][t+3],P[h]=_*i+3*(c*a*s+E*y*o)+m*u;return P}:w?function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d,h;t*=3;var y=l*l,m=y*l,E=1-l,c=E*E,_=c*E;for(d=0;d<v.length;d++)h=v[d],i=h[r+1][t]-h[r][t],s=h[r+1][t+1]-h[r][t+1],o=h[r+1][t+2]-h[r][t+2],u=h[r+1][t+3]-h[r][t+3],P[d]=_*i+3*(c*l*s+E*y*o)+m*u;return P}:C?function(P,t,r,a,l){P||(P=[]);var i,s,o,u;r*=3;var d=1-a,h=l*l,y=1-l,m=y*y,E=y*l*2,c=-3*m,_=3*(m-E),T=3*(E-h),M=3*h;for(o=0;o<v.length;o++)u=v[o],i=c*u[r][t]+_*u[r+1][t]+T*u[r+2][t]+M*u[r+3][t],s=c*u[r][t+1]+_*u[r+1][t+1]+T*u[r+2][t+1]+M*u[r+3][t+1],P[o]=d*i+a*s;return P}:function(P,t,r,a,l){P||(P=[]);var i,s,o,u,d=1-a;for(o=0;o<v.length;o++)u=v[o],i=u[r+1][t]-u[r][t],s=u[r+1][t+1]-u[r][t+1],P[o]=d*i+a*s;return P}}}}),Bre=Ne({"src/traces/carpet/set_convert.js"(te,Z){var v=Ire(),w=gy().findBin,C=Ore(),P=zre(),t=Nre(),r=Fre();Z.exports=function(l){var i=l._a,s=l._b,o=i.length,u=s.length,d=l.aaxis,h=l.baxis,y=i[0],m=i[o-1],E=s[0],c=s[u-1],_=i[i.length-1]-i[0],T=s[s.length-1]-s[0],M=_*v.RELATIVE_CULL_TOLERANCE,k=T*v.RELATIVE_CULL_TOLERANCE;y-=M,m+=M,E-=k,c+=k,l.isVisible=function(b,A){return b>y&&b<m&&A>E&&A<c},l.isOccluded=function(b,A){return b<y||b>m||A<E||A>c},l.setScale=function(){var b=l._x,A=l._y,g=C(l._xctrl,l._yctrl,b,A,d.smoothing,h.smoothing);l._xctrl=g[0],l._yctrl=g[1],l.evalxy=P([l._xctrl,l._yctrl],o,u,d.smoothing,h.smoothing),l.dxydi=t([l._xctrl,l._yctrl],d.smoothing,h.smoothing),l.dxydj=r([l._xctrl,l._yctrl],d.smoothing,h.smoothing)},l.i2a=function(b){var A=Math.max(0,Math.floor(b[0]),o-2),g=b[0]-A;return(1-g)*i[A]+g*i[A+1]},l.j2b=function(b){var A=Math.max(0,Math.floor(b[1]),o-2),g=b[1]-A;return(1-g)*s[A]+g*s[A+1]},l.ij2ab=function(b){return[l.i2a(b[0]),l.j2b(b[1])]},l.a2i=function(b){var A=Math.max(0,Math.min(w(b,i),o-2)),g=i[A],f=i[A+1];return Math.max(0,Math.min(o-1,A+(b-g)/(f-g)))},l.b2j=function(b){var A=Math.max(0,Math.min(w(b,s),u-2)),g=s[A],f=s[A+1];return Math.max(0,Math.min(u-1,A+(b-g)/(f-g)))},l.ab2ij=function(b){return[l.a2i(b[0]),l.b2j(b[1])]},l.i2c=function(b,A){return l.evalxy([],b,A)},l.ab2xy=function(b,A,g){if(!g&&(b<i[0]||b>i[o-1]|A<s[0]||A>s[u-1]))return[!1,!1];var f=l.a2i(b),p=l.b2j(A),x=l.evalxy([],f,p);if(g){var N=0,D=0,B=[],U,V,q,z;b<i[0]?(U=0,V=0,N=(b-i[0])/(i[1]-i[0])):b>i[o-1]?(U=o-2,V=1,N=(b-i[o-1])/(i[o-1]-i[o-2])):(U=Math.max(0,Math.min(o-2,Math.floor(f))),V=f-U),A<s[0]?(q=0,z=0,D=(A-s[0])/(s[1]-s[0])):A>s[u-1]?(q=u-2,z=1,D=(A-s[u-1])/(s[u-1]-s[u-2])):(q=Math.max(0,Math.min(u-2,Math.floor(p))),z=p-q),N&&(l.dxydi(B,U,q,V,z),x[0]+=B[0]*N,x[1]+=B[1]*N),D&&(l.dxydj(B,U,q,V,z),x[0]+=B[0]*D,x[1]+=B[1]*D)}return x},l.c2p=function(b,A,g){return[A.c2p(b[0]),g.c2p(b[1])]},l.p2x=function(b,A,g){return[A.p2c(b[0]),g.p2c(b[1])]},l.dadi=function(b){var A=Math.max(0,Math.min(i.length-2,b));return i[A+1]-i[A]},l.dbdj=function(b){var A=Math.max(0,Math.min(s.length-2,b));return s[A+1]-s[A]},l.dxyda=function(b,A,g,f){var p=l.dxydi(null,b,A,g,f),x=l.dadi(b,g);return[p[0]/x,p[1]/x]},l.dxydb=function(b,A,g,f){var p=l.dxydj(null,b,A,g,f),x=l.dbdj(A,f);return[p[0]/x,p[1]/x]},l.dxyda_rough=function(b,A,g){var f=_*(g||.1),p=l.ab2xy(b+f,A,!0),x=l.ab2xy(b-f,A,!0);return[(p[0]-x[0])*.5/f,(p[1]-x[1])*.5/f]},l.dxydb_rough=function(b,A,g){var f=T*(g||.1),p=l.ab2xy(b,A+f,!0),x=l.ab2xy(b,A-f,!0);return[(p[0]-x[0])*.5/f,(p[1]-x[1])*.5/f]},l.dpdx=function(b){return b._m},l.dpdy=function(b){return b._m}}}}),jre=Ne({"src/traces/carpet/calc.js"(te,Z){var v=Os(),w=In().isArray1D,C=Mre(),P=Cre(),t=kre(),r=Pre(),a=Lre(),l=i2(),i=Rre(),s=a2(),o=Bre();Z.exports=function(d,h){var y=v.getFromId(d,h.xaxis),m=v.getFromId(d,h.yaxis),E=h.aaxis,c=h.baxis,_=h.x,T=h.y,M=[];_&&w(_)&&M.push("x"),T&&w(T)&&M.push("y"),M.length&&s(h,E,c,"a","b",M);var k=h._a=h._a||h.a,b=h._b=h._b||h.b;_=h._x||h.x,T=h._y||h.y;var A={};if(h._cheater){var g=E.cheatertype==="index"?k.length:k,f=c.cheatertype==="index"?b.length:b;_=C(g,f,h.cheaterslope)}h._x=_=l(_),h._y=T=l(T),i(_,k,b),i(T,k,b),o(h),h.setScale();var p=P(_),x=P(T),N=.5*(p[1]-p[0]),D=.5*(p[1]+p[0]),B=.5*(x[1]-x[0]),U=.5*(x[1]+x[0]),V=1.3;return p=[D-N*V,D+N*V],x=[U-B*V,U+B*V],h._extremes[y._id]=v.findExtremes(y,p,{padded:!0}),h._extremes[m._id]=v.findExtremes(m,x,{padded:!0}),t(h,"a","b"),t(h,"b","a"),r(h,E),r(h,c),A.clipsegments=a(h._xctrl,h._yctrl,E,c),A.x=_,A.y=T,A.a=k,A.b=b,[A]}}}),Ure=Ne({"src/traces/carpet/index.js"(te,Z){Z.exports={attributes:VR(),supplyDefaults:Are(),plot:Ere(),calc:jre(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Lh(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),qre=Ne({"lib/carpet.js"(te,Z){Z.exports=Ure()}}),MF=Ne({"src/traces/scattercarpet/attributes.js"(te,Z){var v=jv(),w=Jc(),C=ns(),{hovertemplateAttrs:P,texttemplateAttrs:t,templatefallbackAttrs:r}=Il(),a=Vu(),l=co().extendFlat,i=w.marker,s=w.line,o=i.line;Z.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},w.mode,{dflt:"markers"}),text:l({},w.text,{}),texttemplate:t({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:r({editType:"plot"}),hovertext:l({},w.hovertext,{}),line:{color:s.color,width:s.width,dash:s.dash,backoff:s.backoff,shape:l({},s.shape,{values:["linear","spline"]}),smoothing:s.smoothing,editType:"calc"},connectgaps:w.connectgaps,fill:l({},w.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:l({symbol:i.symbol,opacity:i.opacity,maxdisplayed:i.maxdisplayed,angle:i.angle,angleref:i.angleref,standoff:i.standoff,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode,line:l({width:o.width,editType:"calc"},a("marker.line")),gradient:i.gradient,editType:"calc"},a("marker")),textfont:w.textfont,textposition:w.textposition,selected:w.selected,unselected:w.unselected,hoverinfo:l({},C.hoverinfo,{flags:["a","b","text","name"]}),hoveron:w.hoveron,hovertemplate:P(),hovertemplatefallback:r(),zorder:w.zorder}}}),Vre=Ne({"src/traces/scattercarpet/defaults.js"(te,Z){var v=In(),w=a0(),C=vu(),P=xv(),t=Im(),r=bv(),a=Xp(),l=ov(),i=MF();Z.exports=function(o,u,d,h){function y(k,b){return v.coerce(o,u,i,k,b)}y("carpet"),u.xaxis="x",u.yaxis="y";var m=y("a"),E=y("b"),c=Math.min(m.length,E.length);if(!c){u.visible=!1;return}u._length=c,y("text"),y("texttemplate"),y("texttemplatefallback"),y("hovertext");var _=c<w.PTS_LINESONLY?"lines+markers":"lines";y("mode",_),C.hasMarkers(u)&&P(o,u,d,h,y,{gradient:!0}),C.hasLines(u)&&(t(o,u,d,h,y,{backoff:!0}),r(o,u,y),y("connectgaps")),C.hasText(u)&&a(o,u,h,y);var T=[];(C.hasMarkers(u)||C.hasText(u))&&(y("marker.maxdisplayed"),T.push("points")),y("fill"),u.fill!=="none"&&(l(o,u,d,y),C.hasLines(u)||r(o,u,y)),(u.fill==="tonext"||u.fill==="toself")&&T.push("fills");var M=y("hoveron",T.join("+")||"points");M!=="fills"&&(y("hovertemplate"),y("hovertemplatefallback")),y("zorder"),v.coerceSelectionMarkerOpacity(u,y)}}}),Hre=Ne({"src/traces/scattercarpet/format_labels.js"(te,Z){Z.exports=function(w,C){var P={},t=C._carpet,r=t.ab2ij([w.a,w.b]),a=Math.floor(r[0]),l=r[0]-a,i=Math.floor(r[1]),s=r[1]-i,o=t.evalxy([],a,i,l,s);return P.yLabel=o[1].toFixed(3),P}}}),HR=Ne({"src/traces/carpet/lookup_carpetid.js"(te,Z){Z.exports=function(v,w){for(var C=v._fullData.length,P,t=0;t<C;t++){var r=v._fullData[t];if(r.index!==w.index&&r.type==="carpet"&&(P||(P=r),r.carpet===w.carpet))return r}return P}}}),Gre=Ne({"src/traces/scattercarpet/calc.js"(te,Z){var v=la(),w=Wp(),C=o0(),P=Vh(),t=Uv().calcMarkerSize,r=HR();Z.exports=function(l,i){var s=i._carpetTrace=r(l,i);if(!(!s||!s.visible||s.visible==="legendonly")){var o;i.xaxis=s.xaxis,i.yaxis=s.yaxis;var u=i._length,d=new Array(u),h,y,m=!1;for(o=0;o<u;o++)if(h=i.a[o],y=i.b[o],v(h)&&v(y)){var E=s.ab2xy(+h,+y,!0),c=s.isVisible(+h,+y);c||(m=!0),d[o]={x:E[0],y:E[1],a:h,b:y,vis:c}}else d[o]={x:!1,y:!1};return i._needsCull=m,d[0].carpet=s,d[0].trace=i,t(i,u),w(l,i),C(d,i),P(d,i),d}}}}),Xre=Ne({"src/traces/scattercarpet/plot.js"(te,Z){var v=om(),w=Os(),C=zs();Z.exports=function(t,r,a,l){var i,s,o,u=a[0][0].carpet,d=w.getFromId(t,u.xaxis||"x"),h=w.getFromId(t,u.yaxis||"y"),y={xaxis:d,yaxis:h,plot:r.plot};for(i=0;i<a.length;i++)s=a[i][0].trace,s._xA=d,s._yA=h;for(v(t,y,a,l),i=0;i<a.length;i++)s=a[i][0].trace,o=l.selectAll("g.trace"+s.uid+" .js-line"),C.setClipUrl(o,a[i][0].carpet._clipPathId,t)}}}),Wre=Ne({"src/traces/scattercarpet/hover.js"(te,Z){var v=kg(),w=In().fillText;Z.exports=function(P,t,r,a){var l=v(P,t,r,a);if(!l||l[0].index===!1)return;var i=l[0];if(i.index===void 0){var s=1-i.y0/P.ya._length,o=P.xa._length,u=o*s/2,d=o-u;return i.x0=Math.max(Math.min(i.x0,d),u),i.x1=Math.max(Math.min(i.x1,d),u),l}var h=i.cd[i.index];i.a=h.a,i.b=h.b,i.xLabelVal=void 0,i.yLabelVal=void 0;var y=i.trace,m=y._carpet,E=y._module.formatLabels(h,y);i.yLabel=E.yLabel,delete i.text;var c=[];function _(k,b){var A;k.labelprefix&&k.labelprefix.length>0?A=k.labelprefix.replace(/ = $/,""):A=k._hovertitle,c.push(A+": "+b.toFixed(3)+k.labelsuffix)}if(!y.hovertemplate){var T=h.hi||y.hoverinfo,M=T.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&_(m.aaxis,h.a),M.indexOf("b")!==-1&&_(m.baxis,h.b),c.push("y: "+i.yLabel),M.indexOf("text")!==-1&&w(h,y,c),i.extraText=c.join("<br>")}return l}}}),Yre=Ne({"src/traces/scattercarpet/event_data.js"(te,Z){Z.exports=function(w,C,P,t,r){var a=t[r];return w.a=a.a,w.b=a.b,w.y=a.y,w}}}),Zre=Ne({"src/traces/scattercarpet/index.js"(te,Z){Z.exports={attributes:MF(),supplyDefaults:Vre(),colorbar:ah(),formatLabels:Hre(),calc:Gre(),plot:Xre(),style:Hh().style,styleOnSelect:Hh().styleOnSelect,hoverPoints:Wre(),selectPoints:Pg(),eventData:Yre(),moduleType:"trace",name:"scattercarpet",basePlotModule:Lh(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),$re=Ne({"lib/scattercarpet.js"(te,Z){Z.exports=Zre()}}),CF=Ne({"src/traces/contourcarpet/attributes.js"(te,Z){var v=Bd(),w=Gx(),C=Vu(),P=co().extendFlat,t=w.contours;Z.exports=P({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:w.fillcolor,autocontour:w.autocontour,ncontours:w.ncontours,contours:{type:t.type,start:t.start,end:t.end,size:t.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:t.showlines,showlabels:t.showlabels,labelfont:t.labelfont,labelformat:t.labelformat,operation:t.operation,value:t.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:w.line.color,width:w.line.width,dash:w.line.dash,smoothing:w.line.smoothing,editType:"plot"},zorder:w.zorder},C("",{cLetter:"z",autoColorDflt:!1}))}}),kF=Ne({"src/traces/contourcarpet/defaults.js"(te,Z){var v=In(),w=Ih(),C=CF(),P=XA(),t=_2(),r=Xx();Z.exports=function(l,i,s,o){function u(m,E){return v.coerce(l,i,C,m,E)}function d(m){return v.coerce2(l,i,C,m)}if(u("carpet"),l.a&&l.b){var h=w(l,i,u,o,"a","b");if(!h){i.visible=!1;return}u("text");var y=u("contours.type")==="constraint";y?P(l,i,u,o,s,{hasHover:!1}):(t(l,i,u,d),r(l,i,u,o,{hasHover:!1}))}else i._defaultColor=s,i._length=null;u("zorder")}}}),Kre=Ne({"src/traces/contourcarpet/calc.js"(te,Z){var v=Nd(),w=In(),C=a2(),P=i2(),t=o2(),r=s2(),a=FA(),l=kF(),i=HR(),s=qA();Z.exports=function(d,h){var y=h._carpetTrace=i(d,h);if(!(!y||!y.visible||y.visible==="legendonly")){if(!h.a||!h.b){var m=d.data[y.index],E=d.data[h.index];E.a||(E.a=m.a),E.b||(E.b=m.b),l(E,h,h._defaultColor,d._fullLayout)}var c=o(d,h);return s(h,h._z),c}};function o(u,d){var h=d._carpetTrace,y=h.aaxis,m=h.baxis,E,c,_,T,M,k,b;y._minDtick=0,m._minDtick=0,w.isArray1D(d.z)&&C(d,y,m,"a","b",["z"]),E=d._a=d._a||d.a,T=d._b=d._b||d.b,E=E?y.makeCalcdata(d,"_a"):[],T=T?m.makeCalcdata(d,"_b"):[],c=d.a0||0,_=d.da||1,M=d.b0||0,k=d.db||1,b=d._z=P(d._z||d.z,d.transpose),d._emptypoints=r(b),t(b,d._emptypoints);var A=w.maxRowLength(b),g=d.xtype==="scaled"?"":E,f=a(d,g,c,_,A,y),p=d.ytype==="scaled"?"":T,x=a(d,p,M,k,b.length,m),N={a:f,b:x,z:b};return d.contours.type==="levels"&&d.contours.coloring!=="none"&&v(u,d,{vals:b,containerStr:"",cLetter:"z"}),[N]}}}),Jre=Ne({"src/traces/carpet/axis_aligned_line.js"(te,Z){var v=In().isArrayOrTypedArray;Z.exports=function(w,C,P,t){var r,a,l,i,s,o,u,d,h,y,m,E,c,_=v(P)?"a":"b",T=_==="a"?w.aaxis:w.baxis,M=T.smoothing,k=_==="a"?w.a2i:w.b2j,b=_==="a"?P:t,A=_==="a"?t:P,g=_==="a"?C.a.length:C.b.length,f=_==="a"?C.b.length:C.a.length,p=Math.floor(_==="a"?w.b2j(A):w.a2i(A)),x=_==="a"?function(ye){return w.evalxy([],ye,p)}:function(ye){return w.evalxy([],p,ye)};M&&(l=Math.max(0,Math.min(f-2,p)),i=p-l,a=_==="a"?function(ye,de){return w.dxydi([],ye,l,de,i)}:function(ye,de){return w.dxydj([],l,ye,i,de)});var N=k(b[0]),D=k(b[1]),B=N<D?1:-1,U=(D-N)*1e-8,V=B>0?Math.floor:Math.ceil,q=B>0?Math.ceil:Math.floor,z=B>0?Math.min:Math.max,H=B>0?Math.max:Math.min,G=V(N+U),J=q(D-U);u=x(N);var le=[[u]];for(r=G;r*B<J*B;r+=B)s=[],m=H(N,r),E=z(D,r+B),c=E-m,o=Math.max(0,Math.min(g-2,Math.floor(.5*(m+E)))),d=x(E),M&&(h=a(o,m-o),y=a(o,E-o),s.push([u[0]+h[0]/3*c,u[1]+h[1]/3*c]),s.push([d[0]-y[0]/3*c,d[1]-y[1]/3*c])),s.push(d),le.push(s),u=d;return le}}}),Qre=Ne({"src/traces/contourcarpet/plot.js"(te,Z){var v=xn(),w=SF(),C=EF(),P=zs(),t=In(),r=VA(),a=w2(),l=T2(),i=Wx(),s=HM(),o=HA(),u=GM(),d=HR(),h=Jre();Z.exports=function(g,f,p,x){var N=f.xaxis,D=f.yaxis;t.makeTraceGroups(x,p,"contour").each(function(B){var U=v.select(this),V=B[0],q=V.trace,z=q._carpetTrace=d(g,q),H=g.calcdata[z.index][0];if(!z.visible||z.visible==="legendonly")return;var G=V.a,J=V.b,le=q.contours,ye=o(le,f,V),de=le.type==="constraint",me=le._operation,W=de?me==="="?"lines":"fill":le.coloring;function ie(Ge){var Ve=z.ab2xy(Ge[0],Ge[1],!0);return[N.c2p(Ve[0]),D.c2p(Ve[1])]}var se=[[G[0],J[J.length-1]],[G[G.length-1],J[J.length-1]],[G[G.length-1],J[0]],[G[0],J[0]]];r(ye);var ee=(G[G.length-1]-G[0])*1e-8,pe=(J[J.length-1]-J[0])*1e-8;a(ye,ee,pe);var oe=ye;le.type==="constraint"&&(oe=s(ye,me)),y(ye,ie);var Y,ce,ue,_e,Le=[];for(_e=H.clipsegments.length-1;_e>=0;_e--)Y=H.clipsegments[_e],ce=w([],Y.x,N.c2p),ue=w([],Y.y,D.c2p),ce.reverse(),ue.reverse(),Le.push(C(ce,ue,Y.bicubic));var ze="M"+Le.join("L")+"Z";M(U,H.clipsegments,N,D,de,W),k(q,U,N,D,oe,se,ie,z,H,W,ze),m(U,ye,g,V,le,f,z),P.setClipUrl(U,z._clipPathId,g)})};function y(A,g){var f,p,x,N,D,B,U,V,q;for(f=0;f<A.length;f++){for(N=A[f],D=N.pedgepaths=[],B=N.ppaths=[],p=0;p<N.edgepaths.length;p++){for(q=N.edgepaths[p],U=[],x=0;x<q.length;x++)U[x]=g(q[x]);D.push(U)}for(p=0;p<N.paths.length;p++){for(q=N.paths[p],V=[],x=0;x<q.length;x++)V[x]=g(q[x]);B.push(V)}}}function m(A,g,f,p,x,N,D){var B=f._context.staticPlot,U=t.ensureSingle(A,"g","contourlines"),V=x.showlines!==!1,q=x.showlabels,z=V&&q,H=l.createLines(U,V||q,g,B),G=l.createLineClip(U,z,f,p.trace.uid),J=A.selectAll("g.contourlabels").data(q?[0]:[]);if(J.exit().remove(),J.enter().append("g").classed("contourlabels",!0),q){var le=N.xaxis,ye=N.yaxis,de=le._length,me=ye._length,W=[[[0,0],[de,0],[de,me],[0,me]]],ie=[];t.clearLocationCache();var se=l.labelFormatter(f,p),ee=P.tester.append("text").attr("data-notex",1).call(P.font,x.labelfont),pe={left:0,right:de,center:de/2,top:0,bottom:me,middle:me/2},oe=Math.sqrt(de*de+me*me),Y=i.LABELDISTANCE*oe/Math.max(1,g.length/i.LABELINCREASE);H.each(function(ce){var ue=l.calcTextOpts(ce.level,se,ee,f);v.select(this).selectAll("path").each(function(_e){var Le=this,ze=t.getVisibleSegment(Le,pe,ue.height/2);if(ze&&(E(Le,_e,ce,ze,D,ue.height),!(ze.len<(ue.width+ue.height)*i.LABELMIN)))for(var Ge=Math.min(Math.ceil(ze.len/Y),i.LABELMAX),Ve=0;Ve<Ge;Ve++){var rt=l.findBestTextLocation(Le,ze,ue,ie,pe);if(!rt)break;l.addLabelData(rt,ue,ie,W)}})}),ee.remove(),l.drawLabels(J,ie,f,G,z?W:null)}q&&!V&&H.remove()}function E(A,g,f,p,x,N){for(var D,B=0;B<f.pedgepaths.length;B++)g===f.pedgepaths[B]&&(D=f.edgepaths[B]);if(!D)return;var U=x.a[0],V=x.a[x.a.length-1],q=x.b[0],z=x.b[x.b.length-1];function H(de,me){var W=0,ie,se=.1;return(Math.abs(de[0]-U)<se||Math.abs(de[0]-V)<se)&&(ie=_(x.dxydb_rough(de[0],de[1],se)),W=Math.max(W,N*T(me,ie)/2)),(Math.abs(de[1]-q)<se||Math.abs(de[1]-z)<se)&&(ie=_(x.dxyda_rough(de[0],de[1],se)),W=Math.max(W,N*T(me,ie)/2)),W}var G=c(A,0,1),J=c(A,p.total,p.total-1),le=H(D[0],G),ye=p.total-H(D[D.length-1],J);p.min<le&&(p.min=le),p.max>ye&&(p.max=ye),p.len=p.max-p.min}function c(A,g,f){var p=A.getPointAtLength(g),x=A.getPointAtLength(f),N=x.x-p.x,D=x.y-p.y,B=Math.sqrt(N*N+D*D);return[N/B,D/B]}function _(A){var g=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/g,A[1]/g]}function T(A,g){var f=Math.abs(A[0]*g[0]+A[1]*g[1]),p=Math.sqrt(1-f*f);return p/f}function M(A,g,f,p,x,N){var D,B,U,V,q=t.ensureSingle(A,"g","contourbg"),z=q.selectAll("path").data(N==="fill"&&!x?[0]:[]);z.enter().append("path"),z.exit().remove();var H=[];for(V=0;V<g.length;V++)D=g[V],B=w([],D.x,f.c2p),U=w([],D.y,p.c2p),H.push(C(B,U,D.bicubic));z.attr("d","M"+H.join("L")+"Z").style("stroke","none")}function k(A,g,f,p,x,N,D,B,U,V,q){var z=V==="fill";z&&u(x,A.contours);var H=t.ensureSingle(g,"g","contourfill"),G=H.selectAll("path").data(z?x:[]);G.enter().append("path"),G.exit().remove(),G.each(function(J){var le=(J.prefixBoundary?q:"")+b(A,J,N,D,B,U,f,p);le?v.select(this).attr("d",le).style("stroke","none"):v.select(this).remove()})}function b(A,g,f,p,x,N,D,B){var U,V="",q=g.edgepaths.map(function(ue,_e){return _e}),z=!0,H,G,J,le,ye,de,me=Math.abs(f[0][0]-f[2][0])*1e-4,W=Math.abs(f[0][1]-f[2][1])*1e-4;function ie(ue){return Math.abs(ue[1]-f[0][1])<W}function se(ue){return Math.abs(ue[1]-f[2][1])<W}function ee(ue){return Math.abs(ue[0]-f[0][0])<me}function pe(ue){return Math.abs(ue[0]-f[2][0])<me}function oe(ue,_e){var Le,ze,Ge,Ve,rt="";for(ie(ue)&&!pe(ue)||se(ue)&&!ee(ue)?(Ve=x.aaxis,Ge=h(x,N,[ue[0],_e[0]],.5*(ue[1]+_e[1]))):(Ve=x.baxis,Ge=h(x,N,.5*(ue[0]+_e[0]),[ue[1],_e[1]])),Le=1;Le<Ge.length;Le++)for(rt+=Ve.smoothing?"C":"L",ze=0;ze<Ge[Le].length;ze++){var pt=Ge[Le][ze];rt+=[D.c2p(pt[0]),B.c2p(pt[1])]+" "}return rt}for(U=0,H=null;q.length;){var Y=g.edgepaths[U][0];for(H&&(V+=oe(H,Y)),de=P.smoothopen(g.edgepaths[U].map(p),g.smoothing),V+=z?de:de.replace(/^M/,"L"),q.splice(q.indexOf(U),1),H=g.edgepaths[U][g.edgepaths[U].length-1],le=-1,J=0;J<4;J++){if(!H){t.log("Missing end?",U,g);break}for(ie(H)&&!pe(H)?G=f[1]:ee(H)?G=f[0]:se(H)?G=f[3]:pe(H)&&(G=f[2]),ye=0;ye<g.edgepaths.length;ye++){var ce=g.edgepaths[ye][0];Math.abs(H[0]-G[0])<me?Math.abs(H[0]-ce[0])<me&&(ce[1]-H[1])*(G[1]-ce[1])>=0&&(G=ce,le=ye):Math.abs(H[1]-G[1])<W?Math.abs(H[1]-ce[1])<W&&(ce[0]-H[0])*(G[0]-ce[0])>=0&&(G=ce,le=ye):t.log("endpt to newendpt is not vert. or horz.",H,G,ce)}if(le>=0)break;V+=oe(H,G),H=G}if(le===g.edgepaths.length){t.log("unclosed perimeter path");break}U=le,z=q.indexOf(U)===-1,z&&(U=q[0],V+=oe(H,G)+"Z",H=null)}for(U=0;U<g.paths.length;U++)V+=P.smoothclosed(g.paths[U].map(p),g.smoothing);return V}}}),ene=Ne({"src/traces/contourcarpet/index.js"(te,Z){Z.exports={attributes:CF(),supplyDefaults:kF(),colorbar:n_(),calc:Kre(),plot:Qre(),style:Yx(),moduleType:"trace",name:"contourcarpet",basePlotModule:Lh(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}}}),tne=Ne({"lib/contourcarpet.js"(te,Z){Z.exports=ene()}}),GR=Ne({"src/traces/ohlc/attributes.js"(te,Z){var v=In().extendFlat,w=Jc(),C=bc().axisHoverFormat,{hovertemplateAttrs:P,templatefallbackAttrs:t}=Il(),r=Dd().dash,a=Ml(),l=a_(),i=l.INCREASING.COLOR,s=l.DECREASING.COLOR,o=w.line;function u(d){return{line:{color:v({},o.color,{dflt:d}),width:o.width,dash:r,editType:"style"},editType:"style"}}Z.exports={xperiod:w.xperiod,xperiod0:w.xperiod0,xperiodalignment:w.xperiodalignment,xhoverformat:C("x"),yhoverformat:C("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:v({},o.width,{}),dash:v({},r,{}),editType:"style"},increasing:u(i),decreasing:u(s),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:P({},{keys:["open","high","low","close"]}),hovertemplatefallback:t(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:v({},a.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:w.zorder}}}),PF=Ne({"src/traces/ohlc/ohlc_defaults.js"(te,Z){var v=Xo(),w=In();Z.exports=function(P,t,r,a){var l=r("x"),i=r("open"),s=r("high"),o=r("low"),u=r("close");r("hoverlabel.split");var d=v.getComponentMethod("calendars","handleTraceDefaults");if(d(P,t,["x"],a),!!(i&&s&&o&&u)){var h=Math.min(i.length,s.length,o.length,u.length);return l&&(h=Math.min(h,w.minRowLength(l))),t._length=h,h}}}}),rne=Ne({"src/traces/ohlc/defaults.js"(te,Z){var v=In(),w=PF(),C=Rm(),P=GR();Z.exports=function(a,l,i,s){function o(d,h){return v.coerce(a,l,P,d,h)}var u=w(a,l,o,s);if(!u){l.visible=!1;return}C(a,l,s,o,{x:!0}),o("xhoverformat"),o("yhoverformat"),o("line.width"),o("line.dash"),t(a,l,o,"increasing"),t(a,l,o,"decreasing"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),o("tickwidth"),s._requestRangeslider[l.xaxis]=!0,o("zorder")};function t(r,a,l,i){l(i+".line.color"),l(i+".line.width",a.line.width),l(i+".line.dash",a.line.dash)}}}),LF=Ne({"src/traces/ohlc/calc.js"(te,Z){var v=In(),w=v._,C=Os(),P=Dm(),t=ja().BADNUM;function r(s,o){var u=C.getFromId(s,o.xaxis),d=C.getFromId(s,o.yaxis),h=i(s,u,o),y=o._minDiff;o._minDiff=null;var m=o._origX;o._origX=null;var E=o._xcalc;o._xcalc=null;var c=l(s,o,m,E,d,a);return o._extremes[u._id]=C.findExtremes(u,E,{vpad:y/2}),c.length?(v.extendFlat(c[0].t,{wHover:y/2,tickLen:h}),c):[{t:{empty:!0}}]}function a(s,o,u,d){return{o:s,h:o,l:u,c:d}}function l(s,o,u,d,h,y){for(var m=h.makeCalcdata(o,"open"),E=h.makeCalcdata(o,"high"),c=h.makeCalcdata(o,"low"),_=h.makeCalcdata(o,"close"),T=v.isArrayOrTypedArray(o.text),M=v.isArrayOrTypedArray(o.hovertext),k=!0,b=null,A=!!o.xperiodalignment,g=[],f=0;f<d.length;f++){var p=d[f],x=m[f],N=E[f],D=c[f],B=_[f];if(p!==t&&x!==t&&N!==t&&D!==t&&B!==t){B===x?b!==null&&B!==b&&(k=B>b):k=B>x,b=B;var U=y(x,N,D,B);U.pos=p,U.yc=(x+B)/2,U.i=f,U.dir=k?"increasing":"decreasing",U.x=U.pos,U.y=[D,N],A&&(U.orig_p=u[f]),T&&(U.tx=o.text[f]),M&&(U.htx=o.hovertext[f]),g.push(U)}else g.push({pos:p,empty:!0})}return o._extremes[h._id]=C.findExtremes(h,v.concat(c,E),{padded:!0}),g.length&&(g[0].t={labels:{open:w(s,"open:")+" ",high:w(s,"high:")+" ",low:w(s,"low:")+" ",close:w(s,"close:")+" "}}),g}function i(s,o,u){var d=u._minDiff;if(!d){var h=s._fullData,y=[];d=1/0;var m;for(m=0;m<h.length;m++){var E=h[m];if(E.type==="ohlc"&&E.visible===!0&&E.xaxis===o._id){y.push(E);var c=o.makeCalcdata(E,"x");E._origX=c;var _=P(u,o,"x",c).vals;E._xcalc=_;var T=v.distinctVals(_).minDiff;T&&isFinite(T)&&(d=Math.min(d,T))}}for(d===1/0&&(d=1),m=0;m<y.length;m++)y[m]._minDiff=d}return d*u.tickwidth}Z.exports={calc:r,calcCommon:l}}}),nne=Ne({"src/traces/ohlc/plot.js"(te,Z){var v=xn(),w=In();Z.exports=function(P,t,r,a){var l=t.yaxis,i=t.xaxis,s=!!i.rangebreaks;w.makeTraceGroups(a,r,"trace ohlc").each(function(o){var u=v.select(this),d=o[0],h=d.t,y=d.trace;if(y.visible!==!0||h.empty){u.remove();return}var m=h.tickLen,E=u.selectAll("path").data(w.identity);E.enter().append("path"),E.exit().remove(),E.attr("d",function(c){if(c.empty)return"M0,0Z";var _=i.c2p(c.pos-m,!0),T=i.c2p(c.pos+m,!0),M=s?(_+T)/2:i.c2p(c.pos,!0),k=l.c2p(c.o,!0),b=l.c2p(c.h,!0),A=l.c2p(c.l,!0),g=l.c2p(c.c,!0);return"M"+_+","+k+"H"+M+"M"+M+","+b+"V"+A+"M"+T+","+g+"H"+M})})}}}),ane=Ne({"src/traces/ohlc/style.js"(te,Z){var v=xn(),w=zs(),C=io();Z.exports=function(t,r,a){var l=a||v.select(t).selectAll("g.ohlclayer").selectAll("g.trace");l.style("opacity",function(i){return i[0].trace.opacity}),l.each(function(i){var s=i[0].trace;v.select(this).selectAll("path").each(function(o){if(!o.empty){var u=s[o.dir].line;v.select(this).style("fill","none").call(C.stroke,u.color).call(w.dashLine,u.dash,u.width).style("opacity",s.selectedpoints&&!o.selected?.3:1)}})})}}}),RF=Ne({"src/traces/ohlc/hover.js"(te,Z){var v=Os(),w=In(),C=nh(),P=io(),t=In().fillText,r=a_(),a={increasing:r.INCREASING.SYMBOL,decreasing:r.DECREASING.SYMBOL};function l(u,d,h,y){var m=u.cd,E=m[0].trace;return E.hoverlabel.split?s(u,d,h,y):o(u,d,h,y)}function i(u,d,h,y){var m=u.cd,E=u.xa,c=m[0].trace,_=m[0].t,T=c.type,M=T==="ohlc"?"l":"min",k=T==="ohlc"?"h":"max",b,A,g=_.bPos||0,f=function(J){return J.pos+g-d},p=_.bdPos||_.tickLen,x=_.wHover,N=Math.min(1,p/Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0])));b=u.maxHoverDistance-N,A=u.maxSpikeDistance-N;function D(J){var le=f(J);return C.inbox(le-x,le+x,b)}function B(J){var le=J[M],ye=J[k];return le===ye||C.inbox(le-h,ye-h,b)}function U(J){return(D(J)+B(J))/2}var V=C.getDistanceFunction(y,D,B,U);if(C.getClosest(m,V,u),u.index===!1)return null;var q=m[u.index];if(q.empty)return null;var z=q.dir,H=c[z],G=H.line.color;return P.opacity(G)&&H.line.width?u.color=G:u.color=H.fillcolor,u.x0=E.c2p(q.pos+g-p,!0),u.x1=E.c2p(q.pos+g+p,!0),u.xLabelVal=q.orig_p!==void 0?q.orig_p:q.pos,u.spikeDistance=U(q)*A/b,u.xSpike=E.c2p(q.pos,!0),u}function s(u,d,h,y){var m=u.cd,E=u.ya,c=m[0].trace,_=m[0].t,T=[],M=i(u,d,h,y);if(!M)return[];var k=m[M.index],b=k.hi||c.hoverinfo||"";if(b==="none"||b==="skip")return[];for(var A=["high","open","close","low"],g={},f=0;f<A.length;f++){var p=A[f],x=c[p][M.index],N=E.c2p(x,!0),D;x in g?(D=g[x],D.yLabel+="<br>"+_.labels[p]+v.hoverLabelText(E,x,c.yhoverformat)):(D=w.extendFlat({},M),D.y0=D.y1=N,D.yLabelVal=x,D.yLabel=_.labels[p]+v.hoverLabelText(E,x,c.yhoverformat),D.name="",T.push(D),g[x]=D)}return T}function o(u,d,h,y){var m=u.cd,E=u.ya,c=m[0].trace,_=m[0].t,T=i(u,d,h,y);if(!T)return[];var M=T.index,k=m[M],b=T.index=k.i,A=k.dir;function g(U){return _.labels[U]+v.hoverLabelText(E,c[U][b],c.yhoverformat)}var f=k.hi||c.hoverinfo||"",p=f.split("+"),x=f==="all",N=x||p.indexOf("y")!==-1,D=x||p.indexOf("text")!==-1,B=N?[g("open"),g("high"),g("low"),g("close")+"  "+a[A]]:[];return D&&t(k,c,B),T.extraText=B.join("<br>"),T.y0=T.y1=E.c2p(k.yc,!0),[T]}Z.exports={hoverPoints:l,hoverSplit:s,hoverOnPoints:o}}}),IF=Ne({"src/traces/ohlc/select.js"(te,Z){Z.exports=function(w,C){var P=w.cd,t=w.xaxis,r=w.yaxis,a=[],l,i=P[0].t.bPos||0;if(C===!1)for(l=0;l<P.length;l++)P[l].selected=0;else for(l=0;l<P.length;l++){var s=P[l];C.contains([t.c2p(s.pos+i),r.c2p(s.yc)],null,s.i,w)?(a.push({pointNumber:s.i,x:t.c2d(s.pos),y:r.c2d(s.yc)}),s.selected=1):s.selected=0}return a}}}),ine=Ne({"src/traces/ohlc/index.js"(te,Z){Z.exports={moduleType:"trace",name:"ohlc",basePlotModule:Lh(),categories:["cartesian","svg","showLegend"],meta:{},attributes:GR(),supplyDefaults:rne(),calc:LF().calc,plot:nne(),style:ane(),hoverPoints:RF().hoverPoints,selectPoints:IF()}}}),one=Ne({"lib/ohlc.js"(te,Z){Z.exports=ine()}}),DF=Ne({"src/traces/candlestick/attributes.js"(te,Z){var v=In().extendFlat,w=bc().axisHoverFormat,C=GR(),P=Fg();function t(r){return{line:{color:v({},P.line.color,{dflt:r}),width:P.line.width,editType:"style"},fillcolor:P.fillcolor,editType:"style"}}Z.exports={xperiod:C.xperiod,xperiod0:C.xperiod0,xperiodalignment:C.xperiodalignment,xhoverformat:w("x"),yhoverformat:w("y"),x:C.x,open:C.open,high:C.high,low:C.low,close:C.close,line:{width:v({},P.line.width,{}),editType:"style"},increasing:t(C.increasing.line.color.dflt),decreasing:t(C.decreasing.line.color.dflt),text:C.text,hovertext:C.hovertext,hovertemplate:C.hovertemplate,hovertemplatefallback:C.hovertemplatefallback,whiskerwidth:v({},P.whiskerwidth,{dflt:0}),hoverlabel:C.hoverlabel,zorder:P.zorder}}}),sne=Ne({"src/traces/candlestick/defaults.js"(te,Z){var v=In(),w=io(),C=PF(),P=Rm(),t=DF();Z.exports=function(l,i,s,o){function u(h,y){return v.coerce(l,i,t,h,y)}var d=C(l,i,u,o);if(!d){i.visible=!1;return}P(l,i,o,u,{x:!0}),u("xhoverformat"),u("yhoverformat"),u("line.width"),r(l,i,u,"increasing"),r(l,i,u,"decreasing"),u("text"),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),u("whiskerwidth"),o._requestRangeslider[i.xaxis]=!0,u("zorder")};function r(a,l,i,s){var o=i(s+".line.color");i(s+".line.width",l.line.width),i(s+".fillcolor",w.addOpacity(o,.5))}}}),lne=Ne({"src/traces/candlestick/calc.js"(te,Z){var v=In(),w=Os(),C=Dm(),P=LF().calcCommon;Z.exports=function(r,a){var l=r._fullLayout,i=w.getFromId(r,a.xaxis),s=w.getFromId(r,a.yaxis),o=i.makeCalcdata(a,"x"),u=C(a,i,"x",o).vals,d=P(r,a,o,u,s,t);return d.length?(v.extendFlat(d[0].t,{num:l._numBoxes,dPos:v.distinctVals(u).minDiff/2,posLetter:"x",valLetter:"y"}),l._numBoxes++,d):[{t:{empty:!0}}]};function t(r,a,l,i){return{min:l,q1:Math.min(r,i),med:i,q3:Math.max(r,i),max:a}}}}),une=Ne({"src/traces/candlestick/index.js"(te,Z){Z.exports={moduleType:"trace",name:"candlestick",basePlotModule:Lh(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:DF(),layoutAttributes:Ny(),supplyLayoutDefaults:DA().supplyLayoutDefaults,crossTraceCalc:jx().crossTraceCalc,supplyDefaults:sne(),calc:lne(),plot:Ux().plot,layerName:"boxlayer",style:Jw().style,hoverPoints:RF().hoverPoints,selectPoints:IF()}}}),cne=Ne({"lib/candlestick.js"(te,Z){Z.exports=une()}}),OF=Ne({"src/plots/polar/set_convert.js"(te,Z){var v=In(),w=qp(),C=v.deg2rad,P=v.rad2deg;Z.exports=function(s,o,u){switch(w(s,u),s._id){case"x":case"radialaxis":t(s,o);break;case"angularaxis":l(s,o);break}};function t(i,s){var o=s._subplot;i.setGeometry=function(){var u=i._rl[0],d=i._rl[1],h=o.innerRadius,y=(o.radius-h)/(d-u),m=h/y,E=u>d?function(c){return c<=0}:function(c){return c>=0};i.c2g=function(c){var _=i.c2l(c)-u;return(E(_)?_:0)+m},i.g2c=function(c){return i.l2c(c+u-m)},i.g2p=function(c){return c*y},i.c2p=function(c){return i.g2p(i.c2g(c))}}}function r(i,s){return s==="degrees"?C(i):i}function a(i,s){return s==="degrees"?P(i):i}function l(i,s){var o=i.type;if(o==="linear"){var u=i.d2c,d=i.c2d;i.d2c=function(h,y){return r(u(h),y)},i.c2d=function(h,y){return d(a(h,y))}}i.makeCalcdata=function(h,y){var m=h[y],E=h._length,c,_,T=function(g){return i.d2c(g,h.thetaunit)};if(m)for(c=new Array(E),_=0;_<E;_++)c[_]=T(m[_]);else{var M=y+"0",k="d"+y,b=M in h?T(h[M]):0,A=h[k]?T(h[k]):(i.period||2*Math.PI)/E;for(c=new Array(E),_=0;_<E;_++)c[_]=b+_*A}return c},i.setGeometry=function(){var h=s.sector,y=h.map(C),m={clockwise:-1,counterclockwise:1}[i.direction],E=C(i.rotation),c=function(f){return m*f+E},_=function(f){return(f-E)/m},T,M,k,b;switch(o){case"linear":M=T=v.identity,b=C,k=P,i.range=v.isFullCircle(y)?[h[0],h[0]+360]:y.map(_).map(P);break;case"category":var A=i._categories.length,g=i.period?Math.max(i.period,A):A;g===0&&(g=1),M=b=function(f){return f*2*Math.PI/g},T=k=function(f){return f*g/Math.PI/2},i.range=[0,g];break}i.c2g=function(f){return c(M(f))},i.g2c=function(f){return T(_(f))},i.t2g=function(f){return c(b(f))},i.g2t=function(f){return k(_(f))}}}}}),XR=Ne({"src/plots/polar/constants.js"(te,Z){Z.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}}}),WR=Ne({"src/plots/polar/helpers.js"(te,Z){var v=In(),w=j1().tester,C=v.findIndexOfMin,P=v.isAngleInsideSector,t=v.angleDelta,r=v.angleDist;function a(_,T,M,k,b){if(!P(T,k))return!1;var A,g;M[0]<M[1]?(A=M[0],g=M[1]):(A=M[1],g=M[0]);var f=w(u(A,k[0],k[1],b)),p=w(u(g,k[0],k[1],b)),x=[_*Math.cos(T),_*Math.sin(T)];return p.contains(x)&&!f.contains(x)}function l(_,T,M,k){var b,A,g=k[0],f=k[1],p=y(Math.sin(T)-Math.sin(_)),x=y(Math.cos(T)-Math.cos(_)),N=Math.tan(M),D=y(1/N),B=p/x,U=f-B*g;return D?p&&x?(b=U/(N-B),A=N*b):x?(b=f*D,A=f):(b=g,A=g*N):p&&x?(b=0,A=U):x?(b=0,A=f):b=A=NaN,[b,A]}function i(_,T,M,k){var b=-T*M,A=T*T+1,g=2*(T*b-M),f=b*b+M*M-_*_,p=Math.sqrt(g*g-4*A*f),x=(-g+p)/(2*A),N=(-g-p)/(2*A);return[[x,T*x+b+k],[N,T*N+b+k]]}function s(_,T){var M=T.length,k=new Array(M+1),b;for(b=0;b<M;b++){var A=T[b];k[b]=[_*Math.cos(A),_*Math.sin(A)]}return k[b]=k[0].slice(),k}function o(_,T,M,k){var b=k.length,A=[],g,f;function p(H){return[_*Math.cos(H),_*Math.sin(H)]}function x(H,G,J){return l(H,G,J,p(H))}function N(H){return v.mod(H,b)}function D(H){return P(H,[T,M])}var B=C(k,function(H){return D(H)?r(H,T):1/0}),U=x(k[B],k[N(B-1)],T);for(A.push(U),g=B,f=0;f<b;g++,f++){var V=k[N(g)];if(!D(V))break;A.push(p(V))}var q=C(k,function(H){return D(H)?r(H,M):1/0}),z=x(k[q],k[N(q+1)],M);return A.push(z),A.push([0,0]),A.push(A[0].slice()),A}function u(_,T,M,k){return v.isFullCircle([T,M])?s(_,k):o(_,T,M,k)}function d(_,T,M,k){for(var b=1/0,A=1/0,g=u(_,T,M,k),f=0;f<g.length;f++){var p=g[f];b=Math.min(b,p[0]),A=Math.min(A,-p[1])}return[b,A]}function h(_,T){var M=function(A){var g=t(A,_);return g>0?g:1/0},k=C(T,M),b=v.mod(k+1,T.length);return[T[k],T[b]]}function y(_){return Math.abs(_)>1e-10?_:0}function m(_,T,M){T=T||0,M=M||0;for(var k=_.length,b=new Array(k),A=0;A<k;A++){var g=_[A];b[A]=[T+g[0],M-g[1]]}return b}function E(_,T,M,k,b,A){var g=u(_,T,M,k);return"M"+m(g,b,A).join("L")}function c(_,T,M,k,b,A,g){var f,p;_<T?(f=_,p=T):(f=T,p=_);var x=m(u(f,M,k,b),A,g),N=m(u(p,M,k,b),A,g);return"M"+N.reverse().join("L")+"M"+x.join("L")}Z.exports={isPtInsidePolygon:a,findPolygonOffset:d,findEnclosingVertexAngles:h,findIntersectionXY:l,findXYatLength:i,clampTiny:y,pathPolygon:E,pathPolygonAnnulus:c}}}),zF=Ne({"src/plots/smith/helpers.js"(te,Z){function v(a){return a<0?-1:a>0?1:0}function w(a){var l=a[0],i=a[1];if(!isFinite(l)||!isFinite(i))return[1,0];var s=(l+1)*(l+1)+i*i;return[(l*l+i*i-1)/s,2*i/s]}function C(a,l){var i=l[0],s=l[1];return[i*a.radius+a.cx,-s*a.radius+a.cy]}function P(a,l){return l*a.radius}function t(a,l,i,s){var o=C(a,w([i,l])),u=o[0],d=o[1],h=C(a,w([s,l])),y=h[0],m=h[1];if(l===0)return["M"+u+","+d,"L"+y+","+m].join(" ");var E=P(a,1/Math.abs(l));return["M"+u+","+d,"A"+E+","+E+" 0 0,"+(l<0?1:0)+" "+y+","+m].join(" ")}function r(a,l,i,s){var o=P(a,1/(l+1)),u=C(a,w([l,i])),d=u[0],h=u[1],y=C(a,w([l,s])),m=y[0],E=y[1];if(v(i)!==v(s)){var c=C(a,w([l,0])),_=c[0],T=c[1];return["M"+d+","+h,"A"+o+","+o+" 0 0,"+(0<i?0:1)+" "+_+","+T,"A"+o+","+o+" 0 0,"+(s<0?0:1)+m+","+E].join(" ")}return["M"+d+","+h,"A"+o+","+o+" 0 0,"+(s<i?0:1)+" "+m+","+E].join(" ")}Z.exports={smith:w,reactanceArc:t,resistanceArc:r,smithTransform:C}}}),NF=Ne({"src/plots/polar/polar.js"(te,Z){var v=xn(),w=Ro(),C=Xo(),P=In(),t=P.strRotate,r=P.strTranslate,a=io(),l=zs(),i=uf(),s=Os(),o=qp(),u=OF(),d=Cm().doAutoRange,h=vA(),y=Bv(),m=nh(),E=wy(),c=fh().prepSelect,_=fh().selectOnClick,T=fh().clearOutline,M=km(),k=Sx(),b=Fw().redrawReglTraces,A=bd().MID_SHIFT,g=XR(),f=WR(),p=zF(),x=p.smith,N=p.reactanceArc,D=p.resistanceArc,B=p.smithTransform,U=P._,V=P.mod,q=P.deg2rad,z=P.rad2deg;function H(me,W,ie){this.isSmith=ie||!1,this.id=W,this.gd=me,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var se=me._fullLayout,ee="clip"+se._uid+W;this.clipIds.forTraces=ee+"-for-traces",this.clipPaths.forTraces=se._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=se["_"+(ie?"smith":"polar")+"layer"].append("g").attr("class",W),this.getHole=function(pe){return this.isSmith?0:pe.hole},this.getSector=function(pe){return this.isSmith?[0,360]:pe.sector},this.getRadial=function(pe){return this.isSmith?pe.realaxis:pe.radialaxis},this.getAngular=function(pe){return this.isSmith?pe.imaginaryaxis:pe.angularaxis},ie||(this.radialTickLayout=null,this.angularTickLayout=null)}var G=H.prototype;Z.exports=function(W,ie,se){return new H(W,ie,se)},G.plot=function(me,W){for(var ie=this,se=W[ie.id],ee=!1,pe=0;pe<me.length;pe++){var oe=me[pe][0].trace;if(oe.cliponaxis===!1){ee=!0;break}}ie._hasClipOnAxisFalse=ee,ie.updateLayers(W,se),ie.updateLayout(W,se),i.generalUpdatePerTraceModule(ie.gd,ie,me,se),ie.updateFx(W,se),ie.isSmith&&(delete se.realaxis.range,delete se.imaginaryaxis.range)},G.updateLayers=function(me,W){var ie=this,se=ie.isSmith,ee=ie.layers,pe=ie.getRadial(W),oe=ie.getAngular(W),Y=g.layerNames,ce=Y.indexOf("frontplot"),ue=Y.slice(0,ce),_e=oe.layer==="below traces",Le=pe.layer==="below traces";_e&&ue.push("angular-line"),Le&&ue.push("radial-line"),_e&&ue.push("angular-axis"),Le&&ue.push("radial-axis"),ue.push("frontplot"),_e||ue.push("angular-line"),Le||ue.push("radial-line"),_e||ue.push("angular-axis"),Le||ue.push("radial-axis");var ze=(se?"smith":"polar")+"sublayer",Ge=ie.framework.selectAll("."+ze).data(ue,String);Ge.enter().append("g").attr("class",function(Ve){return ze+" "+Ve}).each(function(Ve){var rt=ee[Ve]=v.select(this);switch(Ve){case"frontplot":se||rt.append("g").classed("barlayer",!0),rt.append("g").classed("scatterlayer",!0);break;case"backplot":rt.append("g").classed("maplayer",!0);break;case"plotbg":ee.bg=rt.append("path");break;case"radial-grid":rt.style("fill","none");break;case"angular-grid":rt.style("fill","none");break;case"radial-line":rt.append("line").style("fill","none");break;case"angular-line":rt.append("path").style("fill","none");break}}),Ge.order()},G.updateLayout=function(me,W){var ie=this,se=ie.layers,ee=me._size,pe=ie.getRadial(W),oe=ie.getAngular(W),Y=W.domain.x,ce=W.domain.y;ie.xOffset=ee.l+ee.w*Y[0],ie.yOffset=ee.t+ee.h*(1-ce[1]);var ue=ie.xLength=ee.w*(Y[1]-Y[0]),_e=ie.yLength=ee.h*(ce[1]-ce[0]),Le=ie.getSector(W);ie.sectorInRad=Le.map(q);var ze=ie.sectorBBox=le(Le),Ge=ze[2]-ze[0],Ve=ze[3]-ze[1],rt=_e/ue,pt=Math.abs(Ve/Ge),gt,ht,lt,Fe,Pe;rt>pt?(gt=ue,ht=ue*pt,Pe=(_e-ht)/ee.h/2,lt=[Y[0],Y[1]],Fe=[ce[0]+Pe,ce[1]-Pe]):(gt=_e/pt,ht=_e,Pe=(ue-gt)/ee.w/2,lt=[Y[0]+Pe,Y[1]-Pe],Fe=[ce[0],ce[1]]),ie.xLength2=gt,ie.yLength2=ht,ie.xDomain2=lt,ie.yDomain2=Fe;var be=ie.xOffset2=ee.l+ee.w*lt[0],Ye=ie.yOffset2=ee.t+ee.h*(1-Fe[1]),mt=ie.radius=gt/Ge,bt=ie.innerRadius=ie.getHole(W)*mt,ft=ie.cx=be-mt*ze[0],Wt=ie.cy=Ye+mt*ze[3],Zt=ie.cxx=ft-be,cr=ie.cyy=Wt-Ye,pr=pe.side,Br;pr==="counterclockwise"?(Br=pr,pr="top"):pr==="clockwise"&&(Br=pr,pr="bottom"),ie.radialAxis=ie.mockAxis(me,W,pe,{_id:"x",side:pr,_trueSide:Br,domain:[bt/ee.w,mt/ee.w]}),ie.angularAxis=ie.mockAxis(me,W,oe,{side:"right",domain:[0,Math.PI],autorange:!1}),ie.doAutoRange(me,W),ie.updateAngularAxis(me,W),ie.updateRadialAxis(me,W),ie.updateRadialAxisTitle(me,W),ie.xaxis=ie.mockCartesianAxis(me,W,{_id:"x",domain:lt}),ie.yaxis=ie.mockCartesianAxis(me,W,{_id:"y",domain:Fe});var Fr=ie.pathSubplot();ie.clipPaths.forTraces.select("path").attr("d",Fr).attr("transform",r(Zt,cr)),se.frontplot.attr("transform",r(be,Ye)).call(l.setClipUrl,ie._hasClipOnAxisFalse?null:ie.clipIds.forTraces,ie.gd),se.bg.attr("d",Fr).attr("transform",r(ft,Wt)).call(a.fill,W.bgcolor)},G.mockAxis=function(me,W,ie,se){var ee=P.extendFlat({},ie,se);return u(ee,W,me),ee},G.mockCartesianAxis=function(me,W,ie){var se=this,ee=se.isSmith,pe=ie._id,oe=P.extendFlat({type:"linear"},ie);o(oe,me);var Y={x:[0,2],y:[1,3]};return oe.setRange=function(){var ce=se.sectorBBox,ue=Y[pe],_e=se.radialAxis._rl,Le=(_e[1]-_e[0])/(1-se.getHole(W));oe.range=[ce[ue[0]]*Le,ce[ue[1]]*Le]},oe.isPtWithinRange=pe==="x"&&!ee?function(ce){return se.isPtInside(ce)}:function(){return!0},oe.setRange(),oe.setScale(),oe},G.doAutoRange=function(me,W){var ie=this,se=ie.gd,ee=ie.radialAxis,pe=ie.getRadial(W);d(se,ee);var oe=ee.range;if(pe.range=oe.slice(),pe._input.range=oe.slice(),ee._rl=[ee.r2l(oe[0],null,"gregorian"),ee.r2l(oe[1],null,"gregorian")],ee.minallowed!==void 0){var Y=ee.r2l(ee.minallowed);ee._rl[0]>ee._rl[1]?ee._rl[1]=Math.max(ee._rl[1],Y):ee._rl[0]=Math.max(ee._rl[0],Y)}if(ee.maxallowed!==void 0){var ce=ee.r2l(ee.maxallowed);ee._rl[0]<ee._rl[1]?ee._rl[1]=Math.min(ee._rl[1],ce):ee._rl[0]=Math.min(ee._rl[0],ce)}},G.updateRadialAxis=function(me,W){var ie=this,se=ie.gd,ee=ie.layers,pe=ie.radius,oe=ie.innerRadius,Y=ie.cx,ce=ie.cy,ue=ie.getRadial(W),_e=V(ie.getSector(W)[0],360),Le=ie.radialAxis,ze=oe<pe,Ge=ie.isSmith;Ge||(ie.fillViewInitialKey("radialaxis.angle",ue.angle),ie.fillViewInitialKey("radialaxis.range",Le.range.slice()),Le.setGeometry()),Le.tickangle==="auto"&&_e>90&&_e<=270&&(Le.tickangle=180);var Ve=Ge?function(mt){var bt=B(ie,x([mt.x,0]));return r(bt[0]-Y,bt[1]-ce)}:function(mt){return r(Le.l2p(mt.x)+oe,0)},rt=Ge?function(mt){return D(ie,mt.x,-1/0,1/0)}:function(mt){return ie.pathArc(Le.r2p(mt.x)+oe)},pt=J(ue);if(ie.radialTickLayout!==pt&&(ee["radial-axis"].selectAll(".xtick").remove(),ie.radialTickLayout=pt),ze){Le.setScale();var gt=0,ht=Ge?(Le.tickvals||[]).filter(function(mt){return mt>=0}).map(function(mt){return s.tickText(Le,mt,!0,!1)}):s.calcTicks(Le),lt=Ge?ht:s.clipEnds(Le,ht),Fe=s.getTickSigns(Le)[2];Ge&&((Le.ticks==="top"&&Le.side==="bottom"||Le.ticks==="bottom"&&Le.side==="top")&&(Fe=-Fe),Le.ticks==="top"&&Le.side==="top"&&(gt=-Le.ticklen),Le.ticks==="bottom"&&Le.side==="bottom"&&(gt=Le.ticklen)),s.drawTicks(se,Le,{vals:ht,layer:ee["radial-axis"],path:s.makeTickPath(Le,0,Fe),transFn:Ve,crisp:!1}),s.drawGrid(se,Le,{vals:lt,layer:ee["radial-grid"],path:rt,transFn:P.noop,crisp:!1}),s.drawLabels(se,Le,{vals:ht,layer:ee["radial-axis"],transFn:Ve,labelFns:s.makeLabelFns(Le,gt)})}var Pe=ie.radialAxisAngle=ie.vangles?z(ye(q(ue.angle),ie.vangles)):ue.angle,be=r(Y,ce),Ye=be+t(-Pe);de(ee["radial-axis"],ze&&(ue.showticklabels||ue.ticks),{transform:Ye}),de(ee["radial-grid"],ze&&ue.showgrid,{transform:Ge?"":be}),de(ee["radial-line"].select("line"),ze&&ue.showline,{x1:Ge?-pe:oe,y1:0,x2:pe,y2:0,transform:Ye}).attr("stroke-width",ue.linewidth).call(a.stroke,ue.linecolor)},G.updateRadialAxisTitle=function(me,W,ie){if(!this.isSmith){var se=this,ee=se.gd,pe=se.radius,oe=se.cx,Y=se.cy,ce=se.getRadial(W),ue=se.id+"title",_e=0;if(ce.title){var Le=l.bBox(se.layers["radial-axis"].node()).height,ze=ce.title.font.size,Ge=ce.side;_e=Ge==="top"?ze:Ge==="counterclockwise"?-(Le+ze*.4):Le+ze*.8}var Ve=ie!==void 0?ie:se.radialAxisAngle,rt=q(Ve),pt=Math.cos(rt),gt=Math.sin(rt),ht=oe+pe/2*pt+_e*gt,lt=Y-pe/2*gt+_e*pt;se.layers["radial-axis-title"]=E.draw(ee,ue,{propContainer:ce,propName:se.id+".radialaxis.title.text",placeholder:U(ee,"Click to enter radial axis title"),attributes:{x:ht,y:lt,"text-anchor":"middle"},transform:{rotate:-Ve}})}},G.updateAngularAxis=function(me,W){var ie=this,se=ie.gd,ee=ie.layers,pe=ie.radius,oe=ie.innerRadius,Y=ie.cx,ce=ie.cy,ue=ie.getAngular(W),_e=ie.angularAxis,Le=ie.isSmith;Le||(ie.fillViewInitialKey("angularaxis.rotation",ue.rotation),_e.setGeometry(),_e.setScale());var ze=Le?function(bt){var ft=B(ie,x([0,bt.x]));return Math.atan2(ft[0]-Y,ft[1]-ce)-Math.PI/2}:function(bt){return _e.t2g(bt.x)};_e.type==="linear"&&_e.thetaunit==="radians"&&(_e.tick0=z(_e.tick0),_e.dtick=z(_e.dtick));var Ge=function(bt){return r(Y+pe*Math.cos(bt),ce-pe*Math.sin(bt))},Ve=Le?function(bt){var ft=B(ie,x([0,bt.x]));return r(ft[0],ft[1])}:function(bt){return Ge(ze(bt))},rt=Le?function(bt){var ft=B(ie,x([0,bt.x])),Wt=Math.atan2(ft[0]-Y,ft[1]-ce)-Math.PI/2;return r(ft[0],ft[1])+t(-z(Wt))}:function(bt){var ft=ze(bt);return Ge(ft)+t(-z(ft))},pt=Le?function(bt){return N(ie,bt.x,0,1/0)}:function(bt){var ft=ze(bt),Wt=Math.cos(ft),Zt=Math.sin(ft);return"M"+[Y+oe*Wt,ce-oe*Zt]+"L"+[Y+pe*Wt,ce-pe*Zt]},gt=s.makeLabelFns(_e,0),ht=gt.labelStandoff,lt={};lt.xFn=function(bt){var ft=ze(bt);return Math.cos(ft)*ht},lt.yFn=function(bt){var ft=ze(bt),Wt=Math.sin(ft)>0?.2:1;return-Math.sin(ft)*(ht+bt.fontSize*Wt)+Math.abs(Math.cos(ft))*(bt.fontSize*A)},lt.anchorFn=function(bt){var ft=ze(bt),Wt=Math.cos(ft);return Math.abs(Wt)<.1?"middle":Wt>0?"start":"end"},lt.heightFn=function(bt,ft,Wt){var Zt=ze(bt);return-.5*(1+Math.sin(Zt))*Wt};var Fe=J(ue);ie.angularTickLayout!==Fe&&(ee["angular-axis"].selectAll("."+_e._id+"tick").remove(),ie.angularTickLayout=Fe);var Pe=Le?[1/0].concat(_e.tickvals||[]).map(function(bt){return s.tickText(_e,bt,!0,!1)}):s.calcTicks(_e);Le&&(Pe[0].text="∞",Pe[0].fontSize*=1.75);var be;if(W.gridshape==="linear"?(be=Pe.map(ze),P.angleDelta(be[0],be[1])<0&&(be=be.slice().reverse())):be=null,ie.vangles=be,_e.type==="category"&&(Pe=Pe.filter(function(bt){return P.isAngleInsideSector(ze(bt),ie.sectorInRad)})),_e.visible){var Ye=_e.ticks==="inside"?-1:1,mt=(_e.linewidth||1)/2;s.drawTicks(se,_e,{vals:Pe,layer:ee["angular-axis"],path:"M"+Ye*mt+",0h"+Ye*_e.ticklen,transFn:rt,crisp:!1}),s.drawGrid(se,_e,{vals:Pe,layer:ee["angular-grid"],path:pt,transFn:P.noop,crisp:!1}),s.drawLabels(se,_e,{vals:Pe,layer:ee["angular-axis"],repositionOnUpdate:!0,transFn:Ve,labelFns:lt})}de(ee["angular-line"].select("path"),ue.showline,{d:ie.pathSubplot(),transform:r(Y,ce)}).attr("stroke-width",ue.linewidth).call(a.stroke,ue.linecolor)},G.updateFx=function(me,W){if(!this.gd._context.staticPlot){var ie=!this.isSmith;ie&&(this.updateAngularDrag(me),this.updateRadialDrag(me,W,0),this.updateRadialDrag(me,W,1)),this.updateHoverAndMainDrag(me)}},G.updateHoverAndMainDrag=function(me){var W=this,ie=W.isSmith,se=W.gd,ee=W.layers,pe=me._zoomlayer,oe=g.MINZOOM,Y=g.OFFEDGE,ce=W.radius,ue=W.innerRadius,_e=W.cx,Le=W.cy,ze=W.cxx,Ge=W.cyy,Ve=W.sectorInRad,rt=W.vangles,pt=W.radialAxis,gt=f.clampTiny,ht=f.findXYatLength,lt=f.findEnclosingVertexAngles,Fe=g.cornerHalfWidth,Pe=g.cornerLen/2,be,Ye,mt=h.makeDragger(ee,"path","maindrag",me.dragmode===!1?"none":"crosshair");v.select(mt).attr("d",W.pathSubplot()).attr("transform",r(_e,Le)),mt.onmousemove=function(Mr){m.hover(se,Mr,W.id),se._fullLayout._lasthover=mt,se._fullLayout._hoversubplot=W.id},mt.onmouseout=function(Mr){se._dragging||y.unhover(se,Mr)};var bt={element:mt,gd:se,subplot:W.id,plotinfo:{id:W.id,xaxis:W.xaxis,yaxis:W.yaxis},xaxes:[W.xaxis],yaxes:[W.yaxis]},ft,Wt,Zt,cr,pr,Br,Fr,cn,Nr;function Jr(Mr,Sr){return Math.sqrt(Mr*Mr+Sr*Sr)}function Dt(Mr,Sr){return Jr(Mr-ze,Sr-Ge)}function $e(Mr,Sr){return Math.atan2(Ge-Sr,Mr-ze)}function ot(Mr,Sr){return[Mr*Math.cos(Sr),Mr*Math.sin(-Sr)]}function De(Mr,Sr){if(Mr===0)return W.pathSector(2*Fe);var Kr=Pe/Mr,qn=Sr-Kr,ha=Sr+Kr,ia=Math.max(0,Math.min(Mr,ce)),xa=ia-Fe,ba=ia+Fe;return"M"+ot(xa,qn)+"A"+[xa,xa]+" 0,0,0 "+ot(xa,ha)+"L"+ot(ba,ha)+"A"+[ba,ba]+" 0,0,1 "+ot(ba,qn)+"Z"}function Ee(Mr,Sr,Kr){if(Mr===0)return W.pathSector(2*Fe);var qn=ot(Mr,Sr),ha=ot(Mr,Kr),ia=gt((qn[0]+ha[0])/2),xa=gt((qn[1]+ha[1])/2),ba,ea;if(ia&&xa){var Za=xa/ia,ui=-1/Za,_r=ht(Fe,Za,ia,xa);ba=ht(Pe,ui,_r[0][0],_r[0][1]),ea=ht(Pe,ui,_r[1][0],_r[1][1])}else{var Qt,yr;xa?(Qt=Pe,yr=Fe):(Qt=Fe,yr=Pe),ba=[[ia-Qt,xa-yr],[ia+Qt,xa-yr]],ea=[[ia-Qt,xa+yr],[ia+Qt,xa+yr]]}return"M"+ba.join("L")+"L"+ea.reverse().join("L")+"Z"}function Ae(){Zt=null,cr=null,pr=W.pathSubplot(),Br=!1;var Mr=se._fullLayout[W.id];Fr=w(Mr.bgcolor).getLuminance(),cn=h.makeZoombox(pe,Fr,_e,Le,pr),cn.attr("fill-rule","evenodd"),Nr=h.makeCorners(pe,_e,Le),T(se)}function Ie(Mr,Sr){return Sr=Math.max(Math.min(Sr,ce),ue),Mr<Y?Mr=0:ce-Mr<Y?Mr=ce:Sr<Y?Sr=0:ce-Sr<Y&&(Sr=ce),Math.abs(Sr-Mr)>oe?(Mr<Sr?(Zt=Mr,cr=Sr):(Zt=Sr,cr=Mr),!0):(Zt=null,cr=null,!1)}function tt(Mr,Sr){Mr=Mr||pr,Sr=Sr||"M0,0Z",cn.attr("d",Mr),Nr.attr("d",Sr),h.transitionZoombox(cn,Nr,Br,Fr),Br=!0;var Kr={};lr(Kr),se.emit("plotly_relayouting",Kr)}function st(Mr,Sr){Mr=Mr*be,Sr=Sr*Ye;var Kr=ft+Mr,qn=Wt+Sr,ha=Dt(ft,Wt),ia=Math.min(Dt(Kr,qn),ce),xa=$e(ft,Wt),ba,ea;Ie(ha,ia)&&(ba=pr+W.pathSector(cr),Zt&&(ba+=W.pathSector(Zt)),ea=De(Zt,xa)+De(cr,xa)),tt(ba,ea)}function Ft(Mr,Sr,Kr,qn){var ha=f.findIntersectionXY(Kr,qn,Kr,[Mr-ze,Ge-Sr]);return Jr(ha[0],ha[1])}function Nt(Mr,Sr){var Kr=ft+Mr,qn=Wt+Sr,ha=$e(ft,Wt),ia=$e(Kr,qn),xa=lt(ha,rt),ba=lt(ia,rt),ea=Ft(ft,Wt,xa[0],xa[1]),Za=Math.min(Ft(Kr,qn,ba[0],ba[1]),ce),ui,_r;Ie(ea,Za)&&(ui=pr+W.pathSector(cr),Zt&&(ui+=W.pathSector(Zt)),_r=[Ee(Zt,xa[0],xa[1]),Ee(cr,xa[0],xa[1])].join(" ")),tt(ui,_r)}function Xt(){if(h.removeZoombox(se),!(Zt===null||cr===null)){var Mr={};lr(Mr),h.showDoubleClickNotifier(se),C.call("_guiRelayout",se,Mr)}}function lr(Mr){var Sr=pt._rl,Kr=(Sr[1]-Sr[0])/(1-ue/ce)/ce,qn=[Sr[0]+(Zt-ue)*Kr,Sr[0]+(cr-ue)*Kr];Mr[W.id+".radialaxis.range"]=qn}function Rr(Mr,Sr){var Kr=se._fullLayout.clickmode;if(h.removeZoombox(se),Mr===2){var qn={};for(var ha in W.viewInitial)qn[W.id+"."+ha]=W.viewInitial[ha];se.emit("plotly_doubleclick",null),C.call("_guiRelayout",se,qn)}Kr.indexOf("select")>-1&&Mr===1&&_(Sr,se,[W.xaxis],[W.yaxis],W.id,bt),Kr.indexOf("event")>-1&&m.click(se,Sr,W.id)}bt.prepFn=function(Mr,Sr,Kr){var qn=se._fullLayout.dragmode,ha=mt.getBoundingClientRect();se._fullLayout._calcInverseTransform(se);var ia=se._fullLayout._invTransform;be=se._fullLayout._invScaleX,Ye=se._fullLayout._invScaleY;var xa=P.apply3DTransform(ia)(Sr-ha.left,Kr-ha.top);if(ft=xa[0],Wt=xa[1],rt){var ba=f.findPolygonOffset(ce,Ve[0],Ve[1],rt);ft+=ze+ba[0],Wt+=Ge+ba[1]}switch(qn){case"zoom":bt.clickFn=Rr,ie||(rt?bt.moveFn=Nt:bt.moveFn=st,bt.doneFn=Xt,Ae());break;case"select":case"lasso":c(Mr,Sr,Kr,bt,qn);break}},y.init(bt)},G.updateRadialDrag=function(me,W,ie){var se=this,ee=se.gd,pe=se.layers,oe=se.radius,Y=se.innerRadius,ce=se.cx,ue=se.cy,_e=se.radialAxis,Le=g.radialDragBoxSize,ze=Le/2;if(!_e.visible)return;var Ge=q(se.radialAxisAngle),Ve=_e._rl,rt=Ve[0],pt=Ve[1],gt=Ve[ie],ht=.75*(Ve[1]-Ve[0])/(1-se.getHole(W))/oe,lt,Fe,Pe;ie?(lt=ce+(oe+ze)*Math.cos(Ge),Fe=ue-(oe+ze)*Math.sin(Ge),Pe="radialdrag"):(lt=ce+(Y-ze)*Math.cos(Ge),Fe=ue-(Y-ze)*Math.sin(Ge),Pe="radialdrag-inner");var be=h.makeRectDragger(pe,Pe,"crosshair",-ze,-ze,Le,Le),Ye={element:be,gd:ee};me.dragmode===!1&&(Ye.dragmode=!1),de(v.select(be),_e.visible&&Y<oe,{transform:r(lt,Fe)});var mt,bt,ft;function Wt(Fr,cn){if(mt)mt(Fr,cn);else{var Nr=[Fr,-cn],Jr=[Math.cos(Ge),Math.sin(Ge)],Dt=Math.abs(P.dot(Nr,Jr)/Math.sqrt(P.dot(Nr,Nr)));isNaN(Dt)||(mt=Dt<.5?pr:Br)}var $e={};Zt($e),ee.emit("plotly_relayouting",$e)}function Zt(Fr){bt!==null?Fr[se.id+".radialaxis.angle"]=bt:ft!==null&&(Fr[se.id+".radialaxis.range["+ie+"]"]=ft)}function cr(){bt!==null?C.call("_guiRelayout",ee,se.id+".radialaxis.angle",bt):ft!==null&&C.call("_guiRelayout",ee,se.id+".radialaxis.range["+ie+"]",ft)}function pr(Fr,cn){if(ie!==0){var Nr=lt+Fr,Jr=Fe+cn;bt=Math.atan2(ue-Jr,Nr-ce),se.vangles&&(bt=ye(bt,se.vangles)),bt=z(bt);var Dt=r(ce,ue)+t(-bt);pe["radial-axis"].attr("transform",Dt),pe["radial-line"].select("line").attr("transform",Dt);var $e=se.gd._fullLayout,ot=$e[se.id];se.updateRadialAxisTitle($e,ot,bt)}}function Br(Fr,cn){var Nr=P.dot([Fr,-cn],[Math.cos(Ge),Math.sin(Ge)]);if(ft=gt-ht*Nr,ht>0!=(ie?ft>rt:ft<pt)){ft=null;return}var Jr=ee._fullLayout,Dt=Jr[se.id];_e.range[ie]=ft,_e._rl[ie]=ft,se.updateRadialAxis(Jr,Dt),se.xaxis.setRange(),se.xaxis.setScale(),se.yaxis.setRange(),se.yaxis.setScale();var $e=!1;for(var ot in se.traceHash){var De=se.traceHash[ot],Ee=P.filterVisible(De),Ae=De[0][0].trace._module;Ae.plot(ee,se,Ee,Dt),C.traceIs(ot,"gl")&&Ee.length&&($e=!0)}$e&&(k(ee),b(ee))}Ye.prepFn=function(){mt=null,bt=null,ft=null,Ye.moveFn=Wt,Ye.doneFn=cr,T(ee)},Ye.clampFn=function(Fr,cn){return Math.sqrt(Fr*Fr+cn*cn)<g.MINDRAG&&(Fr=0,cn=0),[Fr,cn]},y.init(Ye)},G.updateAngularDrag=function(me){var W=this,ie=W.gd,se=W.layers,ee=W.radius,pe=W.angularAxis,oe=W.cx,Y=W.cy,ce=W.cxx,ue=W.cyy,_e=g.angularDragBoxSize,Le=h.makeDragger(se,"path","angulardrag",me.dragmode===!1?"none":"move"),ze={element:Le,gd:ie};me.dragmode===!1?ze.dragmode=!1:v.select(Le).attr("d",W.pathAnnulus(ee,ee+_e)).attr("transform",r(oe,Y)).call(M,"move");function Ge(ft,Wt){return Math.atan2(ue+_e-Wt,ft-ce-_e)}var Ve=se.frontplot.select(".scatterlayer").selectAll(".trace"),rt=Ve.selectAll(".point"),pt=Ve.selectAll(".textpoint"),gt,ht,lt,Fe,Pe,be;function Ye(ft,Wt){var Zt=W.gd._fullLayout,cr=Zt[W.id],pr=gt+ft*me._invScaleX,Br=ht+Wt*me._invScaleY,Fr=Ge(pr,Br),cn=z(Fr-be);if(Fe=lt+cn,se.frontplot.attr("transform",r(W.xOffset2,W.yOffset2)+t([-cn,ce,ue])),W.vangles){Pe=W.radialAxisAngle+cn;var Nr=r(oe,Y)+t(-cn),Jr=r(oe,Y)+t(-Pe);se.bg.attr("transform",Nr),se["radial-grid"].attr("transform",Nr),se["radial-axis"].attr("transform",Jr),se["radial-line"].select("line").attr("transform",Jr),W.updateRadialAxisTitle(Zt,cr,Pe)}else W.clipPaths.forTraces.select("path").attr("transform",r(ce,ue)+t(cn));rt.each(function(){var Ie=v.select(this),tt=l.getTranslate(Ie);Ie.attr("transform",r(tt.x,tt.y)+t([cn]))}),pt.each(function(){var Ie=v.select(this),tt=Ie.select("text"),st=l.getTranslate(Ie);Ie.attr("transform",t([cn,tt.attr("x"),tt.attr("y")])+r(st.x,st.y))}),pe.rotation=P.modHalf(Fe,360),W.updateAngularAxis(Zt,cr),W._hasClipOnAxisFalse&&!P.isFullCircle(W.sectorInRad)&&Ve.call(l.hideOutsideRangePoints,W);var Dt=!1;for(var $e in W.traceHash)if(C.traceIs($e,"gl")){var ot=W.traceHash[$e],De=P.filterVisible(ot),Ee=ot[0][0].trace._module;Ee.plot(ie,W,De,cr),De.length&&(Dt=!0)}Dt&&(k(ie),b(ie));var Ae={};mt(Ae),ie.emit("plotly_relayouting",Ae)}function mt(ft){ft[W.id+".angularaxis.rotation"]=Fe,W.vangles&&(ft[W.id+".radialaxis.angle"]=Pe)}function bt(){pt.select("text").attr("transform",null);var ft={};mt(ft),C.call("_guiRelayout",ie,ft)}ze.prepFn=function(ft,Wt,Zt){var cr=me[W.id];lt=cr.angularaxis.rotation;var pr=Le.getBoundingClientRect();gt=Wt-pr.left,ht=Zt-pr.top,ie._fullLayout._calcInverseTransform(ie);var Br=P.apply3DTransform(me._invTransform)(gt,ht);gt=Br[0],ht=Br[1],be=Ge(gt,ht),ze.moveFn=Ye,ze.doneFn=bt,T(ie)},W.vangles&&!P.isFullCircle(W.sectorInRad)&&(ze.prepFn=P.noop,M(v.select(Le),null)),y.init(ze)},G.isPtInside=function(me){if(this.isSmith)return!0;var W=this.sectorInRad,ie=this.vangles,se=this.angularAxis.c2g(me.theta),ee=this.radialAxis,pe=ee.c2l(me.r),oe=ee._rl,Y=ie?f.isPtInsidePolygon:P.isPtInsideSector;return Y(pe,se,oe,W,ie)},G.pathArc=function(me){var W=this.sectorInRad,ie=this.vangles,se=ie?f.pathPolygon:P.pathArc;return se(me,W[0],W[1],ie)},G.pathSector=function(me){var W=this.sectorInRad,ie=this.vangles,se=ie?f.pathPolygon:P.pathSector;return se(me,W[0],W[1],ie)},G.pathAnnulus=function(me,W){var ie=this.sectorInRad,se=this.vangles,ee=se?f.pathPolygonAnnulus:P.pathAnnulus;return ee(me,W,ie[0],ie[1],se)},G.pathSubplot=function(){var me=this.innerRadius,W=this.radius;return me?this.pathAnnulus(me,W):this.pathSector(W)},G.fillViewInitialKey=function(me,W){me in this.viewInitial||(this.viewInitial[me]=W)};function J(me){var W=me.ticks+String(me.ticklen)+String(me.showticklabels);return"side"in me&&(W+=me.side),W}function le(me){var W=me[0],ie=me[1],se=ie-W,ee=V(W,360),pe=ee+se,oe=Math.cos(q(ee)),Y=Math.sin(q(ee)),ce=Math.cos(q(pe)),ue=Math.sin(q(pe)),_e,Le,ze,Ge;return ee<=90&&pe>=90||ee>90&&pe>=450?Ge=1:Y<=0&&ue<=0?Ge=0:Ge=Math.max(Y,ue),ee<=180&&pe>=180||ee>180&&pe>=540?_e=-1:oe>=0&&ce>=0?_e=0:_e=Math.min(oe,ce),ee<=270&&pe>=270||ee>270&&pe>=630?Le=-1:Y>=0&&ue>=0?Le=0:Le=Math.min(Y,ue),pe>=360?ze=1:oe<=0&&ce<=0?ze=0:ze=Math.max(oe,ce),[_e,Le,ze,Ge]}function ye(me,W){var ie=function(ee){return P.angleDist(me,ee)},se=P.findIndexOfMin(W,ie);return W[se]}function de(me,W,ie){return W?(me.attr("display",null),me.attr(ie)):me&&me.attr("display","none"),me}}}),FF=Ne({"src/plots/polar/layout_attributes.js"(te,Z){var v=lu(),w=wd(),C=Oc().attributes,P=In().extendFlat,t=Kc().overrideAll,r=t({color:w.color,showline:P({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:P({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash},"plot","from-root"),a=t({tickmode:w.minor.tickmode,nticks:w.nticks,tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,ticklabelstep:w.ticklabelstep,showticklabels:w.showticklabels,labelalias:w.labelalias,minorloglabels:w.minorloglabels,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickfont:w.tickfont,tickangle:w.tickangle,tickformat:w.tickformat,tickformatstops:w.tickformatstops,layer:w.layer},"plot","from-root"),l={visible:P({},w.visible,{dflt:!0}),type:P({},w.type,{values:["-","linear","log","date","category"]}),autotypenumbers:w.autotypenumbers,autorangeoptions:{minallowed:w.autorangeoptions.minallowed,maxallowed:w.autorangeoptions.maxallowed,clipmin:w.autorangeoptions.clipmin,clipmax:w.autorangeoptions.clipmax,include:w.autorangeoptions.include,editType:"plot"},autorange:P({},w.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:P({},w.minallowed,{editType:"plot"}),maxallowed:P({},w.maxallowed,{editType:"plot"}),range:P({},w.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:w.categoryorder,categoryarray:w.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:w.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:P({},w.title.text,{editType:"plot",dflt:""}),font:P({},w.title.font,{editType:"plot"}),editType:"plot"},hoverformat:w.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};P(l,r,a);var i={visible:P({},w.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:w.autotypenumbers,categoryorder:w.categoryorder,categoryarray:w.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:w.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};P(i,r,a),Z.exports={domain:C({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:v.background},radialaxis:l,angularaxis:i,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),fne=Ne({"src/plots/polar/layout_defaults.js"(te,Z){var v=In(),w=io(),C=Tu(),P=X0(),t=iv().getSubplotData,r=Tg(),a=B0(),l=Em(),i=fp(),s=Gf(),o=Ku(),u=tM(),d=Ty(),h=FF(),y=OF(),m=XR(),E=m.axisNames;function c(T,M,k,b){var A=k("bgcolor");b.bgColor=w.combine(A,b.paper_bgcolor);var g=k("sector");k("hole");var f=t(b.fullData,m.name,b.id),p=b.layoutOut,x;function N(Le,ze){return k(x+"."+Le,ze)}for(var D=0;D<E.length;D++){x=E[D],v.isPlainObject(T[x])||(T[x]={});var B=T[x],U=C.newContainer(M,x);U._id=U._name=x,U._attr=b.id+"."+x,U._traceIndices=f.map(function(Le){return Le.index});var V=m.axisName2dataArray[x],q=_(B,U,N,f,V,b);s(B,U,N,{axData:f,dataAttr:V});var z=N("visible");switch(y(U,M,p),N("uirevision",M.uirevision),U._m=1,x){case"radialaxis":N("minallowed"),N("maxallowed");var H=N("range"),G=U.getAutorangeDflt(H),J=N("autorange",G),le;H&&(H[0]===null&&H[1]===null||(H[0]===null||H[1]===null)&&(J==="reversed"||J===!0)||H[0]!==null&&(J==="min"||J==="max reversed")||H[1]!==null&&(J==="max"||J==="min reversed"))&&(H=void 0,delete U.range,U.autorange=!0,le=!0),le||(G=U.getAutorangeDflt(H),J=N("autorange",G)),B.autorange=J,J&&(u(N,J,H),(q==="linear"||q==="-")&&N("rangemode"),U.isReversed()&&(U._m=-1)),U.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if(q==="date"){v.log("Polar plots do not support date angular axes yet.");for(var ye=0;ye<f.length;ye++)f[ye].visible=!1;q=B.type=U.type="linear"}N(q==="linear"?"thetaunit":"period");var de=N("direction");N("rotation",{counterclockwise:0,clockwise:90}[de]);break}if(i(B,U,N,U.type,{tickSuffixDflt:U.thetaunit==="degrees"?"°":void 0}),z){var me,W,ie,se,ee,pe,oe,Y,ce,ue,_e=b.font||{};me=N("color"),W=me===B.color?me:_e.color,ie=_e.size,se=_e.family,ee=_e.weight,pe=_e.style,oe=_e.variant,Y=_e.textcase,ce=_e.lineposition,ue=_e.shadow,r(B,U,N,U.type),l(B,U,N,U.type,{font:{weight:ee,style:pe,variant:oe,textcase:Y,lineposition:ce,shadow:ue,color:W,size:ie,family:se},noAutotickangles:x==="angularaxis",noTicklabelshift:!0,noTicklabelstandoff:!0}),a(B,U,N,{outerTicks:!0}),o(B,U,N,{dfltColor:me,bgColor:b.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:h[x]}),N("layer"),x==="radialaxis"&&(N("side"),N("angle",g[0]),N("title.text"),v.coerceFont(N,"title.font",{weight:ee,style:pe,variant:oe,textcase:Y,lineposition:ce,shadow:ue,color:W,size:v.bigFont(ie),family:se}))}q!=="category"&&N("hoverformat"),U._input=B}M.angularaxis.type==="category"&&k("gridshape")}function _(T,M,k,b,A,g){var f=k("autotypenumbers",g.autotypenumbersDflt),p=k("type");if(p==="-"){for(var x,N=0;N<b.length;N++)if(b[N].visible){x=b[N];break}x&&x[A]&&(M.type=d(x[A],"gregorian",{noMultiCategory:!0,autotypenumbers:f})),M.type==="-"?M.type="linear":T.type=M.type}return M.type}Z.exports=function(M,k,b){P(M,k,b,{type:m.name,attributes:h,handleDefaults:c,font:k.font,autotypenumbersDflt:k.autotypenumbers,paper_bgcolor:k.paper_bgcolor,fullData:b,layoutOut:k})}}}),YR=Ne({"src/plots/polar/index.js"(te,Z){var v=iv().getSubplotCalcData,w=In().counterRegex,C=NF(),P=XR(),t=P.attr,r=P.name,a=w(r),l={};l[t]={valType:"subplotid",dflt:r,editType:"calc"};function i(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[r],y=0;y<h.length;y++){var m=h[y],E=v(d,r,m),c=u[m]._subplot;c||(c=C(o,m),u[m]._subplot=c),c.plot(E,u,o._promises)}}function s(o,u,d,h){for(var y=h._subplots[r]||[],m=h._has&&h._has("gl"),E=u._has&&u._has("gl"),c=m&&!E,_=0;_<y.length;_++){var T=y[_],M=h[T]._subplot;if(!u[T]&&M){M.framework.remove(),M.layers["radial-axis-title"].remove();for(var k in M.clipPaths)M.clipPaths[k].remove()}c&&M._scene&&(M._scene.destroy(),M._scene=null)}}Z.exports={attr:t,name:r,idRoot:r,idRegex:a,attrRegex:a,attributes:l,layoutAttributes:FF(),supplyLayoutDefaults:fne(),plot:i,clean:s,toSVG:Lh().toSVG}}}),y6=Ne({"src/traces/scatterpolar/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=co().extendFlat,t=jv(),r=Jc(),a=ns(),l=r.line;Z.exports={mode:r.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:r.text,texttemplate:w({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:P({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:r.connectgaps,marker:r.marker,cliponaxis:P({},r.cliponaxis,{dflt:!1}),textposition:r.textposition,textfont:r.textfont,fill:P({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:P({},a.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:r.hoveron,hovertemplate:v(),hovertemplatefallback:C(),selected:r.selected,unselected:r.unselected}}}),ZR=Ne({"src/traces/scatterpolar/defaults.js"(te,Z){var v=In(),w=vu(),C=xv(),P=Im(),t=bv(),r=Xp(),a=ov(),l=a0().PTS_LINESONLY,i=y6();function s(u,d,h,y){function m(_,T){return v.coerce(u,d,i,_,T)}var E=o(u,d,y,m);if(!E){d.visible=!1;return}m("thetaunit"),m("mode",E<l?"lines+markers":"lines"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),w.hasMarkers(d)&&C(u,d,h,y,m,{gradient:!0}),w.hasLines(d)&&(P(u,d,h,y,m,{backoff:!0}),t(u,d,m),m("connectgaps")),w.hasText(d)&&(m("texttemplate"),m("texttemplatefallback"),r(u,d,y,m));var c=[];(w.hasMarkers(d)||w.hasText(d))&&(m("cliponaxis"),m("marker.maxdisplayed"),c.push("points")),m("fill"),d.fill!=="none"&&(a(u,d,h,m),w.hasLines(d)||t(u,d,m)),(d.fill==="tonext"||d.fill==="toself")&&c.push("fills"),m("hoveron",c.join("+")||"points"),v.coerceSelectionMarkerOpacity(d,m)}function o(u,d,h,y){var m=y("r"),E=y("theta");v.isTypedArray(m)&&(d.r=m=Array.from(m)),v.isTypedArray(E)&&(d.theta=E=Array.from(E));var c;if(m)E?c=Math.min(m.length,E.length):(c=m.length,y("theta0"),y("dtheta"));else{if(!E)return 0;c=d.theta.length,y("r0"),y("dr")}return d._length=c,c}Z.exports={handleRThetaDefaults:o,supplyDefaults:s}}}),$R=Ne({"src/traces/scatterpolar/format_labels.js"(te,Z){var v=In(),w=Os();Z.exports=function(P,t,r){var a={},l=r[t.subplot]._subplot,i,s;l?(i=l.radialAxis,s=l.angularAxis):(l=r[t.subplot],i=l.radialaxis,s=l.angularaxis);var o=i.c2l(P.r);a.rLabel=w.tickText(i,o,!0).text;var u=s.thetaunit==="degrees"?v.rad2deg(P.theta):P.theta;return a.thetaLabel=w.tickText(s,u,!0).text,a}}}),hne=Ne({"src/traces/scatterpolar/calc.js"(te,Z){var v=la(),w=ja().BADNUM,C=Os(),P=Wp(),t=o0(),r=Vh(),a=Uv().calcMarkerSize;Z.exports=function(i,s){for(var o=i._fullLayout,u=s.subplot,d=o[u].radialaxis,h=o[u].angularaxis,y=d.makeCalcdata(s,"r"),m=h.makeCalcdata(s,"theta"),E=s._length,c=new Array(E),_=0;_<E;_++){var T=y[_],M=m[_],k=c[_]={};v(T)&&v(M)?(k.r=T,k.theta=M):k.r=w}var b=a(s,E);return s._extremes.x=C.findExtremes(d,y,{ppad:b}),P(i,s),t(c,s),r(c,s),c}}}),dne=Ne({"src/traces/scatterpolar/plot.js"(te,Z){var v=om(),w=ja().BADNUM;Z.exports=function(P,t,r){for(var a=t.layers.frontplot.select("g.scatterlayer"),l=t.xaxis,i=t.yaxis,s={xaxis:l,yaxis:i,plot:t.framework,layerClipId:t._hasClipOnAxisFalse?t.clipIds.forTraces:null},o=t.radialAxis,u=t.angularAxis,d=0;d<r.length;d++)for(var h=r[d],y=0;y<h.length;y++){y===0&&(h[0].trace._xA=l,h[0].trace._yA=i);var m=h[y],E=m.r;if(E===w)m.x=m.y=w;else{var c=o.c2g(E),_=u.c2g(m.theta);m.x=c*Math.cos(_),m.y=c*Math.sin(_)}}v(P,s,r,a)}}}),KR=Ne({"src/traces/scatterpolar/hover.js"(te,Z){var v=kg();function w(P,t,r,a){var l=v(P,t,r,a);if(!(!l||l[0].index===!1)){var i=l[0];if(i.index===void 0)return l;var s=P.subplot,o=i.cd[i.index],u=i.trace;if(s.isPtInside(o))return i.xLabelVal=void 0,i.yLabelVal=void 0,C(o,u,s,i),i.hovertemplate=u.hovertemplate,l}}function C(P,t,r,a){var l=r.radialAxis,i=r.angularAxis;l._hovertitle="r",i._hovertitle="θ";var s={};s[t.subplot]={_subplot:r};var o=t._module.formatLabels(P,t,s);a.rLabel=o.rLabel,a.thetaLabel=o.thetaLabel;var u=P.hi||t.hoverinfo,d=[];function h(m,E){d.push(m._hovertitle+": "+E)}if(!t.hovertemplate){var y=u.split("+");y.indexOf("all")!==-1&&(y=["r","theta","text"]),y.indexOf("r")!==-1&&h(l,a.rLabel),y.indexOf("theta")!==-1&&h(i,a.thetaLabel),y.indexOf("text")!==-1&&a.text&&(d.push(a.text),delete a.text),a.extraText=d.join("<br>")}}Z.exports={hoverPoints:w,makeHoverPointText:C}}}),vne=Ne({"src/traces/scatterpolar/index.js"(te,Z){Z.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:YR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:y6(),supplyDefaults:ZR().supplyDefaults,colorbar:ah(),formatLabels:$R(),calc:hne(),plot:dne(),style:Hh().style,styleOnSelect:Hh().styleOnSelect,hoverPoints:KR().hoverPoints,selectPoints:Pg(),meta:{}}}}),pne=Ne({"lib/scatterpolar.js"(te,Z){Z.exports=vne()}}),BF=Ne({"src/traces/scatterpolargl/attributes.js"(te,Z){var v=y6(),{cliponaxis:w,hoveron:C}=v,P=nr(v,["cliponaxis","hoveron"]),{connectgaps:t,line:{color:r,dash:a,width:l},fill:i,fillcolor:s,marker:o,textfont:u,textposition:d}=l6();Z.exports=sr(gr({},P),{connectgaps:t,fill:i,fillcolor:s,line:{color:r,dash:a,editType:"calc",width:l},marker:o,textfont:u,textposition:d})}}),mne=Ne({"src/traces/scatterpolargl/defaults.js"(te,Z){var v=In(),w=vu(),C=ZR().handleRThetaDefaults,P=xv(),t=Im(),r=Xp(),a=ov(),l=a0().PTS_LINESONLY,i=BF();Z.exports=function(o,u,d,h){function y(E,c){return v.coerce(o,u,i,E,c)}var m=C(o,u,h,y);if(!m){u.visible=!1;return}y("thetaunit"),y("mode",m<l?"lines+markers":"lines"),y("text"),y("hovertext"),u.hoveron!=="fills"&&(y("hovertemplate"),y("hovertemplatefallback")),w.hasMarkers(u)&&P(o,u,d,h,y,{noAngleRef:!0,noStandOff:!0}),w.hasLines(u)&&(t(o,u,d,h,y),y("connectgaps")),w.hasText(u)&&(y("texttemplate"),y("texttemplatefallback"),r(o,u,h,y,{noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0})),y("fill"),u.fill!=="none"&&a(o,u,d,y),v.coerceSelectionMarkerOpacity(u,y)}}}),yne=Ne({"src/traces/scatterpolargl/format_labels.js"(te,Z){var v=$R();Z.exports=function(C,P,t){var r=C.i;return"r"in C||(C.r=P._r[r]),"theta"in C||(C.theta=P._theta[r]),v(C,P,t)}}}),gne=Ne({"src/traces/scatterpolargl/calc.js"(te,Z){var v=Wp(),w=Uv().calcMarkerSize,C=y3(),P=Os(),t=Ob().TOO_MANY_POINTS;Z.exports=function(a,l){var i=a._fullLayout,s=l.subplot,o=i[s].radialaxis,u=i[s].angularaxis,d=l._r=o.makeCalcdata(l,"r"),h=l._theta=u.makeCalcdata(l,"theta"),y=l._length,m={};y<d.length&&(d=d.slice(0,y)),y<h.length&&(h=h.slice(0,y)),m.r=d,m.theta=h,v(a,l);var E=m.opts=C.style(a,l),c;return y<t?c=w(l,y):E.marker&&(c=2*(E.marker.sizeAvg||Math.max(E.marker.size,3))),l._extremes.x=P.findExtremes(o,d,{ppad:c}),[{x:!1,y:!1,t:m,trace:l}]}}}),_ne=Ne({"src/traces/scatterpolargl/hover.js"(te,Z){var v=SR(),w=KR().makeHoverPointText;function C(P,t,r,a){var l=P.cd,i=l[0].t,s=i.r,o=i.theta,u=v.hoverPoints(P,t,r,a);if(!(!u||u[0].index===!1)){var d=u[0];if(d.index===void 0)return u;var h=P.subplot,y=d.cd[d.index],m=d.trace;if(y.r=s[d.index],y.theta=o[d.index],!!h.isPtInside(y))return d.xLabelVal=void 0,d.yLabelVal=void 0,w(y,m,h,d),u}}Z.exports={hoverPoints:C}}}),xne=Ne({"src/traces/scatterpolargl/base_index.js"(te,Z){Z.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:YR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:BF(),supplyDefaults:mne(),colorbar:ah(),formatLabels:yne(),calc:gne(),hoverPoints:_ne().hoverPoints,selectPoints:xN(),meta:{}}}}),bne=Ne({"src/traces/scatterpolargl/plot.js"(te,Z){var v=MR(),w=la(),C=HN(),P=gN(),t=y3(),r=In(),a=Ob().TOO_MANY_POINTS,l={};Z.exports=function(s,o,u){if(u.length){var d=o.radialAxis,h=o.angularAxis,y=P(s,o);return u.forEach(function(m){if(!(!m||!m[0]||!m[0].trace)){var E=m[0],c=E.trace,_=E.t,T=c._length,M=_.r,k=_.theta,b=_.opts,A,g=M.slice(),f=k.slice();for(A=0;A<M.length;A++)o.isPtInside({r:M[A],theta:k[A]})||(g[A]=NaN,f[A]=NaN);var p=new Array(T*2),x=Array(T),N=Array(T);for(A=0;A<T;A++){var D=g[A],B,U;if(w(D)){var V=d.c2g(D),q=h.c2g(f[A],c.thetaunit);B=V*Math.cos(q),U=V*Math.sin(q)}else B=U=NaN;x[A]=p[A*2]=B,N[A]=p[A*2+1]=U}_.tree=v(p),b.marker&&T>=a&&(b.marker.cluster=_.tree),b.marker&&(b.markerSel.positions=b.markerUnsel.positions=b.marker.positions=p),b.line&&p.length>1&&r.extendFlat(b.line,t.linePositions(s,c,p)),b.text&&(r.extendFlat(b.text,{positions:p},t.textPosition(s,c,b.text,b.marker)),r.extendFlat(b.textSel,{positions:p},t.textPosition(s,c,b.text,b.markerSel)),r.extendFlat(b.textUnsel,{positions:p},t.textPosition(s,c,b.text,b.markerUnsel))),b.fill&&!y.fill2d&&(y.fill2d=!0),b.marker&&!y.scatter2d&&(y.scatter2d=!0),b.line&&!y.line2d&&(y.line2d=!0),b.text&&!y.glText&&(y.glText=!0),y.lineOptions.push(b.line),y.fillOptions.push(b.fill),y.markerOptions.push(b.marker),y.markerSelectedOptions.push(b.markerSel),y.markerUnselectedOptions.push(b.markerUnsel),y.textOptions.push(b.text),y.textSelectedOptions.push(b.textSel),y.textUnselectedOptions.push(b.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),_.x=x,_.y=N,_.rawx=x,_.rawy=N,_.r=M,_.theta=k,_.positions=p,_._scene=y,_.index=y.count,y.count++}}),C(s,o,u)}},Z.exports.reglPrecompiled=l}}),wne=Ne({"src/traces/scatterpolargl/index.js"(te,Z){var v=xne();v.plot=bne(),Z.exports=v}}),Tne=Ne({"lib/scatterpolargl.js"(te,Z){Z.exports=wne()}}),jF=Ne({"src/traces/barpolar/attributes.js"(te,Z){var{hovertemplateAttrs:v,templatefallbackAttrs:w}=Il(),C=co().extendFlat,P=y6(),t=rd();Z.exports={r:P.r,theta:P.theta,r0:P.r0,dr:P.dr,theta0:P.theta0,dtheta:P.dtheta,thetaunit:P.thetaunit,base:C({},t.base,{}),offset:C({},t.offset,{}),width:C({},t.width,{}),text:C({},t.text,{}),hovertext:C({},t.hovertext,{}),marker:r(),hoverinfo:P.hoverinfo,hovertemplate:v(),hovertemplatefallback:w(),selected:t.selected,unselected:t.unselected};function r(){var a=C({},t.marker);return delete a.cornerradius,a}}}),UF=Ne({"src/traces/barpolar/layout_attributes.js"(te,Z){Z.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),Ane=Ne({"src/traces/barpolar/defaults.js"(te,Z){var v=In(),w=ZR().handleRThetaDefaults,C=s0(),P=jF();Z.exports=function(r,a,l,i){function s(u,d){return v.coerce(r,a,P,u,d)}var o=w(r,a,i,s);if(!o){a.visible=!1;return}s("thetaunit"),s("base"),s("offset"),s("width"),s("text"),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),C(r,a,s,l,i),v.coerceSelectionMarkerOpacity(a,s)}}}),Sne=Ne({"src/traces/barpolar/layout_defaults.js"(te,Z){var v=In(),w=UF();Z.exports=function(C,P,t){var r={},a;function l(o,u){return v.coerce(C[a]||{},P[a],w,o,u)}for(var i=0;i<t.length;i++){var s=t[i];s.type==="barpolar"&&s.visible===!0&&(a=s.subplot,r[a]||(l("barmode"),l("bargap"),r[a]=1))}}}}),qF=Ne({"src/traces/barpolar/calc.js"(te,Z){var v=Od().hasColorscale,w=Nd(),C=In().isArrayOrTypedArray,P=Nm(),t=U0().setGroupPositions,r=Vh(),a=Xo().traceIs,l=In().extendFlat;function i(o,u){for(var d=o._fullLayout,h=u.subplot,y=d[h].radialaxis,m=d[h].angularaxis,E=y.makeCalcdata(u,"r"),c=m.makeCalcdata(u,"theta"),_=u._length,T=new Array(_),M=E,k=c,b=0;b<_;b++)T[b]={p:k[b],s:M[b]};function A(g){var f=u[g];f!==void 0&&(u["_"+g]=C(f)?m.makeCalcdata(u,g):m.d2c(f,u.thetaunit))}return m.type==="linear"&&(A("width"),A("offset")),v(u,"marker")&&w(o,u,{vals:u.marker.color,containerStr:"marker",cLetter:"c"}),v(u,"marker.line")&&w(o,u,{vals:u.marker.line.color,containerStr:"marker.line",cLetter:"c"}),P(T,u),r(T,u),T}function s(o,u,d){for(var h=o.calcdata,y=[],m=0;m<h.length;m++){var E=h[m],c=E[0].trace;c.visible===!0&&a(c,"bar")&&c.subplot===d&&y.push(E)}var _=l({},u.radialaxis,{_id:"x"}),T=u.angularaxis;t(o,T,_,y,{mode:u.barmode,norm:u.barnorm,gap:u.bargap,groupgap:u.bargroupgap})}Z.exports={calc:i,crossTraceCalc:s}}}),Ene=Ne({"src/traces/barpolar/plot.js"(te,Z){var v=xn(),w=la(),C=In(),P=zs(),t=WR();Z.exports=function(l,i,s){var o=l._context.staticPlot,u=i.xaxis,d=i.yaxis,h=i.radialAxis,y=i.angularAxis,m=r(i),E=i.layers.frontplot.select("g.barlayer");C.makeTraceGroups(E,s,"trace bars").each(function(){var c=v.select(this),_=C.ensureSingle(c,"g","points"),T=_.selectAll("g.point").data(C.identity);T.enter().append("g").style("vector-effect",o?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),T.exit().remove(),T.each(function(M){var k=v.select(this),b=M.rp0=h.c2p(M.s0),A=M.rp1=h.c2p(M.s1),g=M.thetag0=y.c2g(M.p0),f=M.thetag1=y.c2g(M.p1),p;if(!w(b)||!w(A)||!w(g)||!w(f)||b===A||g===f)p="M0,0Z";else{var x=h.c2g(M.s1),N=(g+f)/2;M.ct=[u.c2p(x*Math.cos(N)),d.c2p(x*Math.sin(N))],p=m(b,A,g,f)}C.ensureSingle(k,"path").attr("d",p)}),P.setClipUrl(c,i._hasClipOnAxisFalse?i.clipIds.forTraces:null,l)})};function r(a){var l=a.cxx,i=a.cyy;return a.vangles?function(s,o,u,d){var h,y;C.angleDelta(u,d)>0?(h=u,y=d):(h=d,y=u);var m=t.findEnclosingVertexAngles(h,a.vangles)[0],E=t.findEnclosingVertexAngles(y,a.vangles)[1],c=[m,(h+y)/2,E];return t.pathPolygonAnnulus(s,o,h,y,c,l,i)}:function(s,o,u,d){return C.pathAnnulus(s,o,u,d,l,i)}}}}),Mne=Ne({"src/traces/barpolar/hover.js"(te,Z){var v=nh(),w=In(),C=zc().getTraceColor,P=w.fillText,t=KR().makeHoverPointText,r=WR().isPtInsidePolygon;Z.exports=function(l,i,s){var o=l.cd,u=o[0].trace,d=l.subplot,h=d.radialAxis,y=d.angularAxis,m=d.vangles,E=m?r:w.isPtInsideSector,c=l.maxHoverDistance,_=y._period||2*Math.PI,T=Math.abs(h.g2p(Math.sqrt(i*i+s*s))),M=Math.atan2(s,i);h.range[0]>h.range[1]&&(M+=Math.PI);var k=function(f){return E(T,M,[f.rp0,f.rp1],[f.thetag0,f.thetag1],m)?c+Math.min(1,Math.abs(f.thetag1-f.thetag0)/_)-1+(f.rp1-T)/(f.rp1-f.rp0)-1:1/0};if(v.getClosest(o,k,l),l.index!==!1){var b=l.index,A=o[b];l.x0=l.x1=A.ct[0],l.y0=l.y1=A.ct[1];var g=w.extendFlat({},A,{r:A.s,theta:A.p});return P(A,u,l),t(g,u,d,l),l.hovertemplate=u.hovertemplate,l.color=C(u,A),l.xLabelVal=l.yLabelVal=void 0,A.s<0&&(l.idealAlign="left"),[l]}}}}),Cne=Ne({"src/traces/barpolar/index.js"(te,Z){Z.exports={moduleType:"trace",name:"barpolar",basePlotModule:YR(),categories:["polar","bar","showLegend"],attributes:jF(),layoutAttributes:UF(),supplyDefaults:Ane(),supplyLayoutDefaults:Sne(),calc:qF().calc,crossTraceCalc:qF().crossTraceCalc,plot:Ene(),colorbar:ah(),formatLabels:$R(),style:Fd().style,styleOnSelect:Fd().styleOnSelect,hoverPoints:Mne(),selectPoints:zy(),meta:{}}}}),kne=Ne({"lib/barpolar.js"(te,Z){Z.exports=Cne()}}),VF=Ne({"src/plots/smith/constants.js"(te,Z){Z.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),HF=Ne({"src/plots/smith/layout_attributes.js"(te,Z){var v=lu(),w=wd(),C=Oc().attributes,P=In().extendFlat,t=Kc().overrideAll,r=t({color:w.color,showline:P({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:P({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash},"plot","from-root"),a=t({ticklen:w.ticklen,tickwidth:P({},w.tickwidth,{dflt:2}),tickcolor:w.tickcolor,showticklabels:w.showticklabels,labelalias:w.labelalias,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,tickfont:w.tickfont,tickformat:w.tickformat,hoverformat:w.hoverformat,layer:w.layer},"plot","from-root"),l=P({visible:P({},w.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:P({},w.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},r,a),i=P({visible:P({},w.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:w.ticks,editType:"calc"},r,a);Z.exports={domain:C({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:l,imaginaryaxis:i,editType:"calc"}}}),Pne=Ne({"src/plots/smith/layout_defaults.js"(te,Z){var v=In(),w=io(),C=Tu(),P=X0(),t=iv().getSubplotData,r=fp(),a=Em(),l=Ku(),i=qp(),s=HF(),o=VF(),u=o.axisNames,d=y(function(m){return v.isTypedArray(m)&&(m=Array.from(m)),m.slice().reverse().map(function(E){return-E}).concat([0]).concat(m)},String);function h(m,E,c,_){var T=c("bgcolor");_.bgColor=w.combine(T,_.paper_bgcolor);var M=t(_.fullData,o.name,_.id),k=_.layoutOut,b;function A(G,J){return c(b+"."+G,J)}for(var g=0;g<u.length;g++){b=u[g],v.isPlainObject(m[b])||(m[b]={});var f=m[b],p=C.newContainer(E,b);p._id=p._name=b,p._attr=_.id+"."+b,p._traceIndices=M.map(function(G){return G.index});var x=A("visible");if(p.type="linear",i(p,k),r(f,p,A,p.type),x){var N=b==="realaxis";if(N&&A("side"),N)A("tickvals");else{var D=d(E.realaxis.tickvals||s.realaxis.tickvals.dflt);A("tickvals",D)}v.isTypedArray(p.tickvals)&&(p.tickvals=Array.from(p.tickvals));var B,U,V,q,z=_.font||{};x&&(B=A("color"),U=B===f.color?B:z.color,V=z.size,q=z.family),a(f,p,A,p.type,{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,noAng:!N,noExp:!0,font:{color:U,size:V,family:q}}),v.coerce2(m,E,s,b+".ticklen"),v.coerce2(m,E,s,b+".tickwidth"),v.coerce2(m,E,s,b+".tickcolor",E.color);var H=A("ticks");H||(delete E[b].ticklen,delete E[b].tickwidth,delete E[b].tickcolor),l(f,p,A,{dfltColor:B,bgColor:_.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:s[b]}),A("layer")}A("hoverformat"),delete p.type,p._input=f}}Z.exports=function(E,c,_){P(E,c,_,{noUirevision:!0,type:o.name,attributes:s,handleDefaults:h,font:c.font,paper_bgcolor:c.paper_bgcolor,fullData:_,layoutOut:c})};function y(m,E){var c={};return function(_){var T=E?E(_):_;if(T in c)return c[T];var M=m(_);return c[T]=M,M}}}}),Lne=Ne({"src/plots/smith/index.js"(te,Z){var v=iv().getSubplotCalcData,w=In().counterRegex,C=NF(),P=VF(),t=P.attr,r=P.name,a=w(r),l={};l[t]={valType:"subplotid",dflt:r,editType:"calc"};function i(o){for(var u=o._fullLayout,d=o.calcdata,h=u._subplots[r],y=0;y<h.length;y++){var m=h[y],E=v(d,r,m),c=u[m]._subplot;c||(c=C(o,m,!0),u[m]._subplot=c),c.plot(E,u,o._promises)}}function s(o,u,d,h){for(var y=h._subplots[r]||[],m=0;m<y.length;m++){var E=y[m],c=h[E]._subplot;if(!u[E]&&c){c.framework.remove();for(var _ in c.clipPaths)c.clipPaths[_].remove()}}}Z.exports={attr:t,name:r,idRoot:r,idRegex:a,attrRegex:a,attributes:l,layoutAttributes:HF(),supplyLayoutDefaults:Pne(),plot:i,clean:s,toSVG:Lh().toSVG}}}),GF=Ne({"src/traces/scattersmith/attributes.js"(te,Z){var{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:C}=Il(),P=co().extendFlat,t=jv(),r=Jc(),a=ns(),l=r.line;Z.exports={mode:r.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:r.text,texttemplate:w({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:C({editType:"plot"}),hovertext:r.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:P({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:r.connectgaps,marker:r.marker,cliponaxis:P({},r.cliponaxis,{dflt:!1}),textposition:r.textposition,textfont:r.textfont,fill:P({},r.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:t(),hoverinfo:P({},a.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:r.hoveron,hovertemplate:v(),hovertemplatefallback:C(),selected:r.selected,unselected:r.unselected}}}),Rne=Ne({"src/traces/scattersmith/defaults.js"(te,Z){var v=In(),w=vu(),C=xv(),P=Im(),t=bv(),r=Xp(),a=ov(),l=a0().PTS_LINESONLY,i=GF();Z.exports=function(u,d,h,y){function m(_,T){return v.coerce(u,d,i,_,T)}var E=s(u,d,y,m);if(!E){d.visible=!1;return}m("mode",E<l?"lines+markers":"lines"),m("text"),m("hovertext"),d.hoveron!=="fills"&&(m("hovertemplate"),m("hovertemplatefallback")),w.hasMarkers(d)&&C(u,d,h,y,m,{gradient:!0}),w.hasLines(d)&&(P(u,d,h,y,m,{backoff:!0}),t(u,d,m),m("connectgaps")),w.hasText(d)&&(m("texttemplate"),m("texttemplatefallback"),r(u,d,y,m));var c=[];(w.hasMarkers(d)||w.hasText(d))&&(m("cliponaxis"),m("marker.maxdisplayed"),c.push("points")),m("fill"),d.fill!=="none"&&(a(u,d,h,m),w.hasLines(d)||t(u,d,m)),(d.fill==="tonext"||d.fill==="toself")&&c.push("fills"),m("hoveron",c.join("+")||"points"),v.coerceSelectionMarkerOpacity(d,m)};function s(o,u,d,h){var y=h("real"),m=h("imag"),E;return y&&m&&(E=Math.min(y.length,m.length)),v.isTypedArray(y)&&(u.real=y=Array.from(y)),v.isTypedArray(m)&&(u.imag=m=Array.from(m)),u._length=E,E}}}),Ine=Ne({"src/traces/scattersmith/format_labels.js"(te,Z){var v=Os();Z.exports=function(C,P,t){var r={},a=t[P.subplot]._subplot;return r.realLabel=v.tickText(a.radialAxis,C.real,!0).text,r.imagLabel=v.tickText(a.angularAxis,C.imag,!0).text,r}}}),Dne=Ne({"src/traces/scattersmith/calc.js"(te,Z){var v=la(),w=ja().BADNUM,C=Wp(),P=o0(),t=Vh(),r=Uv().calcMarkerSize;Z.exports=function(l,i){for(var s=l._fullLayout,o=i.subplot,u=s[o].realaxis,d=s[o].imaginaryaxis,h=u.makeCalcdata(i,"real"),y=d.makeCalcdata(i,"imag"),m=i._length,E=new Array(m),c=0;c<m;c++){var _=h[c],T=y[c],M=E[c]={};v(_)&&v(T)?(M.real=_,M.imag=T):M.real=w}return r(i,m),C(l,i),P(E,i),t(E,i),E}}}),One=Ne({"src/traces/scattersmith/plot.js"(te,Z){var v=om(),w=ja().BADNUM,C=zF(),P=C.smith;Z.exports=function(r,a,l){for(var i=a.layers.frontplot.select("g.scatterlayer"),s=a.xaxis,o=a.yaxis,u={xaxis:s,yaxis:o,plot:a.framework,layerClipId:a._hasClipOnAxisFalse?a.clipIds.forTraces:null},d=0;d<l.length;d++)for(var h=l[d],y=0;y<h.length;y++){y===0&&(h[0].trace._xA=s,h[0].trace._yA=o);var m=h[y],E=m.real;if(E===w)m.x=m.y=w;else{var c=P([E,m.imag]);m.x=c[0],m.y=c[1]}}v(r,u,l,i)}}}),zne=Ne({"src/traces/scattersmith/hover.js"(te,Z){var v=kg();function w(P,t,r,a){var l=v(P,t,r,a);if(!(!l||l[0].index===!1)){var i=l[0];if(i.index===void 0)return l;var s=P.subplot,o=i.cd[i.index],u=i.trace;if(s.isPtInside(o))return i.xLabelVal=void 0,i.yLabelVal=void 0,C(o,u,s,i),i.hovertemplate=u.hovertemplate,l}}function C(P,t,r,a){var l=r.radialAxis,i=r.angularAxis;l._hovertitle="real",i._hovertitle="imag";var s={};s[t.subplot]={_subplot:r};var o=t._module.formatLabels(P,t,s);a.realLabel=o.realLabel,a.imagLabel=o.imagLabel;var u=P.hi||t.hoverinfo,d=[];function h(m,E){d.push(m._hovertitle+": "+E)}if(!t.hovertemplate){var y=u.split("+");y.indexOf("all")!==-1&&(y=["real","imag","text"]),y.indexOf("real")!==-1&&h(l,a.realLabel),y.indexOf("imag")!==-1&&h(i,a.imagLabel),y.indexOf("text")!==-1&&a.text&&(d.push(a.text),delete a.text),a.extraText=d.join("<br>")}}Z.exports={hoverPoints:w,makeHoverPointText:C}}}),Nne=Ne({"src/traces/scattersmith/index.js"(te,Z){Z.exports={moduleType:"trace",name:"scattersmith",basePlotModule:Lne(),categories:["smith","symbols","showLegend","scatter-like"],attributes:GF(),supplyDefaults:Rne(),colorbar:ah(),formatLabels:Ine(),calc:Dne(),plot:One(),style:Hh().style,styleOnSelect:Hh().styleOnSelect,hoverPoints:zne().hoverPoints,selectPoints:Pg(),meta:{}}}}),Fne=Ne({"lib/scattersmith.js"(te,Z){Z.exports=Nne()}}),Tp=Ne({"node_modules/world-calendars/dist/main.js"(te,Z){var v=qd();function w(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}v(w.prototype,{instance:function(l,i){l=(l||"gregorian").toLowerCase(),i=i||"";var s=this._localCals[l+"-"+i];if(!s&&this.calendars[l]&&(s=new this.calendars[l](i),this._localCals[l+"-"+i]=s),!s)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,l);return s},newDate:function(l,i,s,o,u){return o=(l!=null&&l.year?l.calendar():typeof o=="string"?this.instance(o,u):o)||this.instance(),o.newDate(l,i,s)},substituteDigits:function(l){return function(i){return(i+"").replace(/[0-9]/g,function(s){return l[s]})}},substituteChineseDigits:function(l,i){return function(s){for(var o="",u=0;s>0;){var d=s%10;o=(d===0?"":l[d]+i[u])+o,u++,s=Math.floor(s/10)}return o.indexOf(l[1]+i[1])===0&&(o=o.substr(1)),o||l[0]}}});function C(l,i,s,o){if(this._calendar=l,this._year=i,this._month=s,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function P(l,i){return l=""+l,"000000".substring(0,i-l.length)+l}v(C.prototype,{newDate:function(l,i,s){return this._calendar.newDate(l??this,i,s)},year:function(l){return arguments.length===0?this._year:this.set(l,"y")},month:function(l){return arguments.length===0?this._month:this.set(l,"m")},day:function(l){return arguments.length===0?this._day:this.set(l,"d")},date:function(l,i,s){if(!this._calendar.isValid(l,i,s))throw(a.local.invalidDate||a.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=l,this._month=i,this._day=s,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(l,i){return this._calendar.add(this,l,i)},set:function(l,i){return this._calendar.set(this,l,i)},compareTo:function(l){if(this._calendar.name!==l._calendar.name)throw(a.local.differentCalendars||a.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,l._calendar.local.name);var i=this._year!==l._year?this._year-l._year:this._month!==l._month?this.monthOfYear()-l.monthOfYear():this._day-l._day;return i===0?0:i<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(l){return this._calendar.fromJD(l)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(l){return this._calendar.fromJSDate(l)},toString:function(){return(this.year()<0?"-":"")+P(Math.abs(this.year()),4)+"-"+P(this.month(),2)+"-"+P(this.day(),2)}});function t(){this.shortYearCutoff="+10"}v(t.prototype,{_validateLevel:0,newDate:function(l,i,s){return l==null?this.today():(l.year&&(this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),s=l.day(),i=l.month(),l=l.year()),new C(this,l,i,s))},today:function(){return this.fromJSDate(new Date)},epoch:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return i.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return(i.year()<0?"-":"")+P(Math.abs(i.year()),4)},monthsInYear:function(l){return this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear),12},monthOfYear:function(l,i){var s=this._validate(l,i,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth);return(s.month()+this.monthsInYear(s)-this.firstMonth)%this.monthsInYear(s)+this.minMonth},fromMonthOfYear:function(l,i){var s=(i+this.firstMonth-2*this.minMonth)%this.monthsInYear(l)+this.minMonth;return this._validate(l,s,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth),s},daysInYear:function(l){var i=this._validate(l,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear);return this.leapYear(i)?366:365},dayOfYear:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(l,i,s){return this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),{}},add:function(l,i,s){return this._validate(l,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate),this._correctAdd(l,this._add(l,i,s),i,s)},_add:function(l,i,s){if(this._validateLevel++,s==="d"||s==="w"){var o=l.toJD()+i*(s==="w"?this.daysInWeek():1),u=l.calendar().fromJD(o);return this._validateLevel--,[u.year(),u.month(),u.day()]}try{var d=l.year()+(s==="y"?i:0),h=l.monthOfYear()+(s==="m"?i:0),u=l.day(),y=function(c){for(;h<c.minMonth;)d--,h+=c.monthsInYear(d);for(var _=c.monthsInYear(d);h>_-1+c.minMonth;)d++,h-=_,_=c.monthsInYear(d)};s==="y"?(l.month()!==this.fromMonthOfYear(d,h)&&(h=this.newDate(d,l.month(),this.minDay).monthOfYear()),h=Math.min(h,this.monthsInYear(d)),u=Math.min(u,this.daysInMonth(d,this.fromMonthOfYear(d,h)))):s==="m"&&(y(this),u=Math.min(u,this.daysInMonth(d,this.fromMonthOfYear(d,h))));var m=[d,this.fromMonthOfYear(d,h),u];return this._validateLevel--,m}catch(E){throw this._validateLevel--,E}},_correctAdd:function(l,i,s,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(i[0]===0||l.year()>0!=i[0]>0)){var u={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],d=s<0?-1:1;i=this._add(l,s*u[0]+d*u[1],u[2])}return l.date(i[0],i[1],i[2])},set:function(l,i,s){this._validate(l,this.minMonth,this.minDay,a.local.invalidDate||a.regionalOptions[""].invalidDate);var o=s==="y"?i:l.year(),u=s==="m"?i:l.month(),d=s==="d"?i:l.day();return(s==="y"||s==="m")&&(d=Math.min(d,this.daysInMonth(o,u))),l.date(o,u,d)},isValid:function(l,i,s){this._validateLevel++;var o=this.hasYearZero||l!==0;if(o){var u=this.newDate(l,i,this.minDay);o=i>=this.minMonth&&i-this.minMonth<this.monthsInYear(u)&&s>=this.minDay&&s-this.minDay<this.daysInMonth(u)}return this._validateLevel--,o},toJSDate:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);return a.instance().fromJD(this.toJD(o)).toJSDate()},fromJSDate:function(l){return this.fromJD(a.instance().fromJSDate(l).toJD())},_validate:function(l,i,s,o){if(l.year){if(this._validateLevel===0&&this.name!==l.calendar().name)throw(a.local.differentCalendars||a.regionalOptions[""].differentCalendars).replace(/\{0\}/,this.local.name).replace(/\{1\}/,l.calendar().local.name);return l}try{if(this._validateLevel++,this._validateLevel===1&&!this.isValid(l,i,s))throw o.replace(/\{0\}/,this.local.name);var u=this.newDate(l,i,s);return this._validateLevel--,u}catch(d){throw this._validateLevel--,d}}});function r(l){this.local=this.regionalOptions[l]||this.regionalOptions[""]}r.prototype=new t,v(r.prototype,{name:"Gregorian",jdEpoch:17214255e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Gregorian",epochs:["BCE","CE"],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(s){var i=this._validate(s,this.minMonth,this.minDay,a.local.invalidYear||a.regionalOptions[""].invalidYear),s=i.year()+(i.year()<0?1:0);return s%4===0&&(s%100!==0||s%400===0)},weekOfYear:function(l,i,s){var o=this.newDate(l,i,s);return o.add(4-(o.dayOfWeek()||7),"d"),Math.floor((o.dayOfYear()-1)/7)+1},daysInMonth:function(l,i){var s=this._validate(l,i,this.minDay,a.local.invalidMonth||a.regionalOptions[""].invalidMonth);return this.daysPerMonth[s.month()-1]+(s.month()===2&&this.leapYear(s.year())?1:0)},weekDay:function(l,i,s){return(this.dayOfWeek(l,i,s)||7)<6},toJD:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate);l=o.year(),i=o.month(),s=o.day(),l<0&&l++,i<3&&(i+=12,l--);var u=Math.floor(l/100),d=2-u+Math.floor(u/4);return Math.floor(365.25*(l+4716))+Math.floor(30.6001*(i+1))+s+d-1524.5},fromJD:function(l){var i=Math.floor(l+.5),s=Math.floor((i-186721625e-2)/36524.25);s=i+1+s-Math.floor(s/4);var o=s+1524,u=Math.floor((o-122.1)/365.25),d=Math.floor(365.25*u),h=Math.floor((o-d)/30.6001),y=o-d-Math.floor(h*30.6001),m=h-(h>13.5?13:1),E=u-(m>2.5?4716:4715);return E<=0&&E--,this.newDate(E,m,y)},toJSDate:function(l,i,s){var o=this._validate(l,i,s,a.local.invalidDate||a.regionalOptions[""].invalidDate),u=new Date(o.year(),o.month()-1,o.day());return u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0),u.setHours(u.getHours()>12?u.getHours()+2:0),u},fromJSDate:function(l){return this.newDate(l.getFullYear(),l.getMonth()+1,l.getDate())}});var a=Z.exports=new w;a.cdate=C,a.baseCalendar=t,a.calendars.gregorian=r}}),Bne=Ne({"node_modules/world-calendars/dist/plus.js"(){var te=qd(),Z=Tp();te(Z.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"}),Z.local=Z.regionalOptions[""],te(Z.cdate.prototype,{formatDate:function(v,w){return typeof v!="string"&&(w=v,v=""),this._calendar.formatDate(v||"",this,w)}}),te(Z.baseCalendar.prototype,{UNIX_EPOCH:Z.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Z.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(v,w,C){if(typeof v!="string"&&(C=w,w=v,v=""),!w)return"";if(w.calendar()!==this)throw Z.local.invalidFormat||Z.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,C=C||{};var P=C.dayNamesShort||this.local.dayNamesShort,t=C.dayNames||this.local.dayNames,r=C.monthNumbers||this.local.monthNumbers,a=C.monthNamesShort||this.local.monthNamesShort,l=C.monthNames||this.local.monthNames;C.calculateWeek||this.local.calculateWeek;for(var i=function(T,M){for(var k=1;_+k<v.length&&v.charAt(_+k)===T;)k++;return _+=k-1,Math.floor(k/(M||1))>1},s=function(T,M,k,b){var A=""+M;if(i(T,b))for(;A.length<k;)A="0"+A;return A},o=function(T,M,k,b){return i(T)?b[M]:k[M]},u=this,d=function(T){return typeof r=="function"?r.call(u,T,i("m")):m(s("m",T.month(),2))},h=function(T,M){return M?typeof l=="function"?l.call(u,T):l[T.month()-u.minMonth]:typeof a=="function"?a.call(u,T):a[T.month()-u.minMonth]},y=this.local.digits,m=function(T){return C.localNumbers&&y?y(T):T},E="",c=!1,_=0;_<v.length;_++)if(c)v.charAt(_)==="'"&&!i("'")?c=!1:E+=v.charAt(_);else switch(v.charAt(_)){case"d":E+=m(s("d",w.day(),2));break;case"D":E+=o("D",w.dayOfWeek(),P,t);break;case"o":E+=s("o",w.dayOfYear(),3);break;case"w":E+=s("w",w.weekOfYear(),2);break;case"m":E+=d(w);break;case"M":E+=h(w,i("M"));break;case"y":E+=i("y",2)?w.year():(w.year()%100<10?"0":"")+w.year()%100;break;case"Y":i("Y",2),E+=w.formatYear();break;case"J":E+=w.toJD();break;case"@":E+=(w.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":E+=(w.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":i("'")?E+="'":c=!0;break;default:E+=v.charAt(_)}return E},parseDate:function(v,w,C){if(w==null)throw Z.local.invalidArguments||Z.regionalOptions[""].invalidArguments;if(w=typeof w=="object"?w.toString():w+"",w==="")return null;v=v||this.local.dateFormat,C=C||{};var P=C.shortYearCutoff||this.shortYearCutoff;P=typeof P!="string"?P:this.today().year()%100+parseInt(P,10);for(var t=C.dayNamesShort||this.local.dayNamesShort,r=C.dayNames||this.local.dayNames,a=C.parseMonth||this.local.parseMonth,l=C.monthNumbers||this.local.monthNumbers,i=C.monthNamesShort||this.local.monthNamesShort,s=C.monthNames||this.local.monthNames,o=-1,u=-1,d=-1,h=-1,y=-1,m=!1,E=!1,c=function(N,D){for(var B=1;f+B<v.length&&v.charAt(f+B)===N;)B++;return f+=B-1,Math.floor(B/(D||1))>1},_=function(N,D){var B=c(N,D),U=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(N)+1],V=new RegExp("^-?\\d{1,"+U+"}"),q=w.substring(g).match(V);if(!q)throw(Z.local.missingNumberAt||Z.regionalOptions[""].missingNumberAt).replace(/\{0\}/,g);return g+=q[0].length,parseInt(q[0],10)},T=this,M=function(){if(typeof l=="function"){c("m");var N=l.call(T,w.substring(g));return g+=N.length,N}return _("m")},k=function(N,D,B,U){for(var V=c(N,U)?B:D,q=0;q<V.length;q++)if(w.substr(g,V[q].length).toLowerCase()===V[q].toLowerCase())return g+=V[q].length,q+T.minMonth;throw(Z.local.unknownNameAt||Z.regionalOptions[""].unknownNameAt).replace(/\{0\}/,g)},b=function(){if(typeof s=="function"){var N=c("M")?s.call(T,w.substring(g)):i.call(T,w.substring(g));return g+=N.length,N}return k("M",i,s)},A=function(){if(w.charAt(g)!==v.charAt(f))throw(Z.local.unexpectedLiteralAt||Z.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,g);g++},g=0,f=0;f<v.length;f++)if(E)v.charAt(f)==="'"&&!c("'")?E=!1:A();else switch(v.charAt(f)){case"d":h=_("d");break;case"D":k("D",t,r);break;case"o":y=_("o");break;case"w":_("w");break;case"m":d=M();break;case"M":d=b();break;case"y":var p=f;m=!c("y",2),f=p,u=_("y",2);break;case"Y":u=_("Y",2);break;case"J":o=_("J")+.5,w.charAt(g)==="."&&(g++,_("J"));break;case"@":o=_("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":o=_("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":g=w.length;break;case"'":c("'")?A():E=!0;break;default:A()}if(g<w.length)throw Z.local.unexpectedText||Z.regionalOptions[""].unexpectedText;if(u===-1?u=this.today().year():u<100&&m&&(u+=P===-1?1900:this.today().year()-this.today().year()%100-(u<=P?0:100)),typeof d=="string"&&(d=a.call(this,u,d)),y>-1){d=1,h=y;for(var x=this.daysInMonth(u,d);h>x;x=this.daysInMonth(u,d))d++,h-=x}return o>-1?this.fromJD(o):this.newDate(u,d,h)},determineDate:function(v,w,C,P,t){C&&typeof C!="object"&&(t=P,P=C,C=null),typeof P!="string"&&(t=P,P="");var r=this,a=function(l){try{return r.parseDate(P,l,t)}catch{}l=l.toLowerCase();for(var i=(l.match(/^c/)&&C?C.newDate():null)||r.today(),s=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=s.exec(l);o;)i.add(parseInt(o[1],10),o[2]||"d"),o=s.exec(l);return i};return w=w?w.newDate():null,v=v==null?w:typeof v=="string"?a(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?w:r.today().add(v,"d"):r.newDate(v),v}})}}),jne=Ne({"node_modules/world-calendars/dist/calendars/chinese.js"(){var te=Tp(),Z=qd(),v=te.instance();function w(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,u){if(typeof o=="string"){var d=o.match(P);return d?d[0]:""}var h=this._validateYear(o),y=o.month(),m=""+this.toChineseMonth(h,y);return u&&m.length<2&&(m="0"+m),this.isIntercalaryMonth(h,y)&&(m+="i"),m},monthNames:function(o){if(typeof o=="string"){var u=o.match(t);return u?u[0]:""}var d=this._validateYear(o),h=o.month(),y=this.toChineseMonth(d,h),m=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][y-1];return this.isIntercalaryMonth(d,h)&&(m="闰"+m),m},monthNamesShort:function(o){if(typeof o=="string"){var u=o.match(r);return u?u[0]:""}var d=this._validateYear(o),h=o.month(),y=this.toChineseMonth(d,h),m=["一","二","三","四","五","六","七","八","九","十","十一","十二"][y-1];return this.isIntercalaryMonth(d,h)&&(m="闰"+m),m},parseMonth:function(o,u){o=this._validateYear(o);var d=parseInt(u),h;if(isNaN(d))u[0]==="闰"&&(h=!0,u=u.substring(1)),u[u.length-1]==="月"&&(u=u.substring(0,u.length-1)),d=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(u);else{var y=u[u.length-1];h=y==="i"||y==="I"}var m=this.toMonthIndex(o,d,h);return m},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(o,u){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw u.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,u,d){var h=this.intercalaryMonth(o),y=d&&u!==h;if(y||u<1||u>12)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var m;return h?!d&&u<=h?m=u-1:m=u:m=u-1,m},toChineseMonth:function(o,u){o.year&&(o=o.year(),u=o.month());var d=this.intercalaryMonth(o),h=d?12:11;if(u<0||u>h)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var y;return d?u<d?y=u+1:y=u:y=u+1,y},intercalaryMonth:function(o){o=this._validateYear(o);var u=a[o-a[0]],d=u>>13;return d},isIntercalaryMonth:function(o,u){o.year&&(o=o.year(),u=o.month());var d=this.intercalaryMonth(o);return!!d&&d===u},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,u,d){var h=this._validateYear(o,te.local.invalidyear),y=l[h-l[0]],m=y>>9&4095,E=y>>5&15,c=y&31,_;_=v.newDate(m,E,c),_.add(4-(_.dayOfWeek()||7),"d");var T=this.toJD(o,u,d)-_.toJD();return 1+Math.floor(T/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,u){o.year&&(u=o.month(),o=o.year()),o=this._validateYear(o);var d=a[o-a[0]],h=d>>13,y=h?12:11;if(u>y)throw te.local.invalidMonth.replace(/\{0\}/,this.local.name);var m=d&1<<12-u?30:29;return m},weekDay:function(o,u,d){return(this.dayOfWeek(o,u,d)||7)<6},toJD:function(o,u,d){var h=this._validate(o,m,d,te.local.invalidDate);o=this._validateYear(h.year()),u=h.month(),d=h.day();var y=this.isIntercalaryMonth(o,u),m=this.toChineseMonth(o,u),E=s(o,m,d,y);return v.toJD(E.year,E.month,E.day)},fromJD:function(o){var u=v.fromJD(o),d=i(u.year(),u.month(),u.day()),h=this.toMonthIndex(d.year,d.month,d.isIntercalary);return this.newDate(d.year,h,d.day)},fromString:function(o){var u=o.match(C),d=this._validateYear(+u[1]),h=+u[2],y=!!u[3],m=this.toMonthIndex(d,h,y),E=+u[4];return this.newDate(d,m,E)},add:function(o,u,d){var h=o.year(),y=o.month(),m=this.isIntercalaryMonth(h,y),E=this.toChineseMonth(h,y),c=Object.getPrototypeOf(w.prototype).add.call(this,o,u,d);if(d==="y"){var _=c.year(),T=c.month(),M=this.isIntercalaryMonth(_,E),k=m&&M?this.toMonthIndex(_,E,!0):this.toMonthIndex(_,E,!1);k!==T&&c.month(k)}return c}});var C=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,P=/^\d?\d[iI]?/m,t=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;te.calendars.chinese=w;var a=[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],l=[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 i(o,u,d,h){var y,m;if(typeof o=="object")y=o,m=u||{};else{var E=typeof o=="number"&&o>=1888&&o<=2111;if(!E)throw new Error("Solar year outside range 1888-2111");var c=typeof u=="number"&&u>=1&&u<=12;if(!c)throw new Error("Solar month outside range 1 - 12");var _=typeof d=="number"&&d>=1&&d<=31;if(!_)throw new Error("Solar day outside range 1 - 31");y={year:o,month:u,day:d},m={}}var T=l[y.year-l[0]],M=y.year<<9|y.month<<5|y.day;m.year=M>=T?y.year:y.year-1,T=l[m.year-l[0]];var k=T>>9&4095,b=T>>5&15,A=T&31,g,f=new Date(k,b-1,A),p=new Date(y.year,y.month-1,y.day);g=Math.round((p-f)/(24*3600*1e3));var x=a[m.year-a[0]],N;for(N=0;N<13;N++){var D=x&1<<12-N?30:29;if(g<D)break;g-=D}var B=x>>13;return!B||N<B?(m.isIntercalary=!1,m.month=1+N):N===B?(m.isIntercalary=!0,m.month=N):(m.isIntercalary=!1,m.month=N),m.day=1+g,m}function s(o,u,d,h,y){var m,E;if(typeof o=="object")E=o,m=u||{};else{var c=typeof o=="number"&&o>=1888&&o<=2111;if(!c)throw new Error("Lunar year outside range 1888-2111");var _=typeof u=="number"&&u>=1&&u<=12;if(!_)throw new Error("Lunar month outside range 1 - 12");var T=typeof d=="number"&&d>=1&&d<=30;if(!T)throw new Error("Lunar day outside range 1 - 30");var M;typeof h=="object"?(M=!1,m=h):(M=!!h,m={}),E={year:o,month:u,day:d,isIntercalary:M}}var k;k=E.day-1;var b=a[E.year-a[0]],A=b>>13,g;A&&(E.month>A||E.isIntercalary)?g=E.month:g=E.month-1;for(var f=0;f<g;f++){var p=b&1<<12-f?30:29;k+=p}var x=l[E.year-l[0]],N=x>>9&4095,D=x>>5&15,B=x&31,U=new Date(N,D-1,B+k);return m.year=U.getFullYear(),m.month=1+U.getMonth(),m.day=U.getDate(),m}}}),Une=Ne({"node_modules/world-calendars/dist/calendars/coptic.js"(){var te=Tp(),Z=qd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()+(C.year()<0?1:0);return P%4===3||P%4===-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear),13},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===13&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),w<0&&w++,t.day()+(t.month()-1)*30+(w-1)*365+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var C=Math.floor(w)+.5-this.jdEpoch,P=Math.floor((C-Math.floor((C+366)/1461))/365)+1;P<=0&&P--,C=Math.floor(w)+.5-this.newDate(P,1,1).toJD();var t=Math.floor(C/30)+1,r=C-(t-1)*30+1;return this.newDate(P,t,r)}}),te.calendars.coptic=v}}),qne=Ne({"node_modules/world-calendars/dist/calendars/discworld.js"(){var te=Tp(),Z=qd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),!1},monthsInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),13},daysInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),400},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return(r.day()+1)%8},weekDay:function(C,P,t){var r=this.dayOfWeek(C,P,t);return r>=2&&r<=6},extraInfo:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return{century:w[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return C=r.year()+(r.year()<0?1:0),P=r.month(),t=r.day(),t+(P>1?16:0)+(P>2?(P-2)*32:0)+(C-1)*400+this.jdEpoch-1},fromJD:function(C){C=Math.floor(C+.5)-Math.floor(this.jdEpoch)-1;var P=Math.floor(C/400)+1;C-=(P-1)*400,C+=C>15?16:0;var t=Math.floor(C/32)+1,r=C-(t-1)*32+1;return this.newDate(P<=0?P-1:P,t,r)}});var w={20:"Fruitbat",21:"Anchovy"};te.calendars.discworld=v}}),Vne=Ne({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var te=Tp(),Z=qd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()+(C.year()<0?1:0);return P%4===3||P%4===-1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear),13},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===13&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),w<0&&w++,t.day()+(t.month()-1)*30+(w-1)*365+Math.floor(w/4)+this.jdEpoch-1},fromJD:function(w){var C=Math.floor(w)+.5-this.jdEpoch,P=Math.floor((C-Math.floor((C+366)/1461))/365)+1;P<=0&&P--,C=Math.floor(w)+.5-this.newDate(P,1,1).toJD();var t=Math.floor(C/30)+1,r=C-(t-1)*30+1;return this.newDate(P,t,r)}}),te.calendars.ethiopian=v}}),Hne=Ne({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var te=Tp(),Z=qd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return this._leapYear(P.year())},_leapYear:function(C){return C=C<0?C+1:C,w(C*7+1,19)<7},monthsInYear:function(C){return this._validate(C,this.minMonth,this.minDay,te.local.invalidYear),this._leapYear(C.year?C.year():C)?13:12},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return C=P.year(),this.toJD(C===-1?1:C+1,7,1)-this.toJD(C,7,1)},daysInMonth:function(C,P){return C.year&&(P=C.month(),C=C.year()),this._validate(C,P,this.minDay,te.local.invalidMonth),P===12&&this.leapYear(C)||P===8&&w(this.daysInYear(C),10)===5?30:P===9&&w(this.daysInYear(C),10)===3?29:this.daysPerMonth[P-1]},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==6},extraInfo:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);C=r.year(),P=r.month(),t=r.day();var a=C<=0?C+1:C,l=this.jdEpoch+this._delay1(a)+this._delay2(a)+t+1;if(P<7){for(var i=7;i<=this.monthsInYear(C);i++)l+=this.daysInMonth(C,i);for(var i=1;i<P;i++)l+=this.daysInMonth(C,i)}else for(var i=7;i<P;i++)l+=this.daysInMonth(C,i);return l},_delay1:function(C){var P=Math.floor((235*C-234)/19),t=12084+13753*P,r=P*29+Math.floor(t/25920);return w(3*(r+1),7)<3&&r++,r},_delay2:function(C){var P=this._delay1(C-1),t=this._delay1(C),r=this._delay1(C+1);return r-t===356?2:t-P===382?1:0},fromJD:function(C){C=Math.floor(C)+.5;for(var P=Math.floor((C-this.jdEpoch)*98496/35975351)-1;C>=this.toJD(P===-1?1:P+1,7,1);)P++;for(var t=C<this.toJD(P,1,1)?7:1;C>this.toJD(P,t,this.daysInMonth(P,t));)t++;var r=C-this.toJD(P,t,1)+1;return this.newDate(P,t,r)}});function w(C,P){return C-P*Math.floor(C/P)}te.calendars.hebrew=v}}),Gne=Ne({"node_modules/world-calendars/dist/calendars/islamic.js"(){var te=Tp(),Z=qd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(w){var C=this._validate(w,this.minMonth,this.minDay,te.local.invalidYear);return(C.year()*11+14)%30<11},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(w){return this.leapYear(w)?355:354},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===12&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return this.dayOfWeek(w,C,P)!==5},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),C=t.month(),P=t.day(),w=w<=0?w+1:w,P+Math.ceil(29.5*(C-1))+(w-1)*354+Math.floor((3+11*w)/30)+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var C=Math.floor((30*(w-this.jdEpoch)+10646)/10631);C=C<=0?C-1:C;var P=Math.min(12,Math.ceil((w-29-this.toJD(C,1,1))/29.5)+1),t=w-this.toJD(C,P,1)+1;return this.newDate(C,P,t)}}),te.calendars.islamic=v}}),Xne=Ne({"node_modules/world-calendars/dist/calendars/julian.js"(){var te=Tp(),Z=qd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Julian",jdEpoch:17214235e-1,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(P){var C=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),P=C.year()<0?C.year()+1:C.year();return P%4===0},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(4-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(w,C){var P=this._validate(w,C,this.minDay,te.local.invalidMonth);return this.daysPerMonth[P.month()-1]+(P.month()===2&&this.leapYear(P.year())?1:0)},weekDay:function(w,C,P){return(this.dayOfWeek(w,C,P)||7)<6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);return w=t.year(),C=t.month(),P=t.day(),w<0&&w++,C<=2&&(w--,C+=12),Math.floor(365.25*(w+4716))+Math.floor(30.6001*(C+1))+P-1524.5},fromJD:function(w){var C=Math.floor(w+.5),P=C+1524,t=Math.floor((P-122.1)/365.25),r=Math.floor(365.25*t),a=Math.floor((P-r)/30.6001),l=a-Math.floor(a<14?1:13),i=t-Math.floor(l>2?4716:4715),s=P-r-Math.floor(30.6001*a);return i<=0&&i--,this.newDate(i,l,s)}}),te.calendars.julian=v}}),Wne=Ne({"node_modules/world-calendars/dist/calendars/mayan.js"(){var te=Tp(),Z=qd();function v(P){this.local=this.regionalOptions[P||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),!1},formatYear:function(P){var t=this._validate(P,this.minMonth,this.minDay,te.local.invalidYear);P=t.year();var r=Math.floor(P/400);P=P%400,P+=P<0?400:0;var a=Math.floor(P/20);return r+"."+a+"."+P%20},forYear:function(P){if(P=P.split("."),P.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r<P.length;r++){var a=parseInt(P[r],10);if(Math.abs(a)>19||r>0&&a<0)throw"Invalid Mayan year";t=t*20+a}return t},monthsInYear:function(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),18},weekOfYear:function(P,t,r){return this._validate(P,t,r,te.local.invalidDate),0},daysInYear:function(P){return this._validate(P,this.minMonth,this.minDay,te.local.invalidYear),360},daysInMonth:function(P,t){return this._validate(P,t,this.minDay,te.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate);return a.day()},weekDay:function(P,t,r){return this._validate(P,t,r,te.local.invalidDate),!0},extraInfo:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate),l=a.toJD(),i=this._toHaab(l),s=this._toTzolkin(l);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[s[0]-1],tzolkinDay:s[0],tzolkinTrecena:s[1]}},_toHaab:function(P){P-=this.jdEpoch;var t=w(P+8+340,365);return[Math.floor(t/20)+1,w(t,20)]},_toTzolkin:function(P){return P-=this.jdEpoch,[C(P+20,20),C(P+4,13)]},toJD:function(P,t,r){var a=this._validate(P,t,r,te.local.invalidDate);return a.day()+a.month()*20+a.year()*360+this.jdEpoch},fromJD:function(P){P=Math.floor(P)+.5-this.jdEpoch;var t=Math.floor(P/360);P=P%360,P+=P<0?360:0;var r=Math.floor(P/20),a=P%20;return this.newDate(t,r,a)}});function w(P,t){return P-t*Math.floor(P/t)}function C(P,t){return w(P-1,t)+1}te.calendars.mayan=v}}),Yne=Ne({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var te=Tp(),Z=qd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar;var w=te.instance("gregorian");Z(v.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear||te.regionalOptions[""].invalidYear);return w.leapYear(P.year()+(P.year()<1?1:0)+1469)},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidMonth),a=r.year();a<0&&a++;for(var l=r.day(),i=1;i<r.month();i++)l+=this.daysPerMonth[i-1];return l+w.toJD(a+1468,3,13)},fromJD:function(C){C=Math.floor(C+.5);for(var P=Math.floor((C-(this.jdEpoch-1))/366);C>=this.toJD(P+1,1,1);)P++;for(var t=C-Math.floor(this.toJD(P,1,1)+.5)+1,r=1;t>this.daysInMonth(P,r);)t-=this.daysInMonth(P,r),r++;return this.newDate(P,r,t)}}),te.calendars.nanakshahi=v}}),Zne=Ne({"node_modules/world-calendars/dist/calendars/nepali.js"(){var te=Tp(),Z=qd();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Nepali",jdEpoch:17007095e-1,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(w){return this.daysInYear(w)!==this.daysPerYear},weekOfYear:function(w,C,P){var t=this.newDate(w,C,P);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(w){var C=this._validate(w,this.minMonth,this.minDay,te.local.invalidYear);if(w=C.year(),typeof this.NEPALI_CALENDAR_DATA[w]>"u")return this.daysPerYear;for(var P=0,t=this.minMonth;t<=12;t++)P+=this.NEPALI_CALENDAR_DATA[w][t];return P},daysInMonth:function(w,C){return w.year&&(C=w.month(),w=w.year()),this._validate(w,C,this.minDay,te.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[w]>"u"?this.daysPerMonth[C-1]:this.NEPALI_CALENDAR_DATA[w][C]},weekDay:function(w,C,P){return this.dayOfWeek(w,C,P)!==6},toJD:function(w,C,P){var t=this._validate(w,C,P,te.local.invalidDate);w=t.year(),C=t.month(),P=t.day();var r=te.instance(),a=0,l=C,i=w;this._createMissingCalendarData(w);var s=w-(l>9||l===9&&P>=this.NEPALI_CALENDAR_DATA[i][0]?56:57);for(C!==9&&(a=P,l--);l!==9;)l<=0&&(l=12,i--),a+=this.NEPALI_CALENDAR_DATA[i][l],l--;return C===9?(a+=P-this.NEPALI_CALENDAR_DATA[i][0],a<0&&(a+=r.daysInYear(s))):a+=this.NEPALI_CALENDAR_DATA[i][9]-this.NEPALI_CALENDAR_DATA[i][0],r.newDate(s,1,1).add(a,"d").toJD()},fromJD:function(w){var C=te.instance(),P=C.fromJD(w),t=P.year(),r=P.dayOfYear(),a=t+56;this._createMissingCalendarData(a);for(var l=9,i=this.NEPALI_CALENDAR_DATA[a][0],s=this.NEPALI_CALENDAR_DATA[a][l]-i+1;r>s;)l++,l>12&&(l=1,a++),s+=this.NEPALI_CALENDAR_DATA[a][l];var o=this.NEPALI_CALENDAR_DATA[a][l]-(s-r);return this.newDate(a,l,o)},_createMissingCalendarData:function(w){var C=this.daysPerMonth.slice(0);C.unshift(17);for(var P=w-1;P<w+2;P++)typeof this.NEPALI_CALENDAR_DATA[P]>"u"&&(this.NEPALI_CALENDAR_DATA[P]=C)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),te.calendars.nepali=v}}),$ne=Ne({"node_modules/world-calendars/dist/calendars/persian.js"(){var te=Tp(),Z=qd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}function w(C){var P=C-475;C<0&&P++;var t=.242197,r=t*P,a=t*(P+1),l=r-Math.floor(r),i=a-Math.floor(a);return l>i}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return w(P.year())},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===12&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==5},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate);C=r.year(),P=r.month(),t=r.day();var a=0;if(C>0)for(var l=1;l<C;l++)w(l)&&a++;else if(C<0)for(var l=C;l<0;l++)w(l)&&a--;return t+(P<=7?(P-1)*31:(P-1)*30+6)+(C>0?C-1:C)*365+a+this.jdEpoch-1},fromJD:function(C){C=Math.floor(C)+.5;var P=475+(C-this.toJD(475,1,1))/365.242197,t=Math.floor(P);t<=0&&t--,C>this.toJD(t,12,w(t)?30:29)&&(t++,t===0&&t++);var r=C-this.toJD(t,1,1)+1,a=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),l=C-this.toJD(t,a,1)+1;return this.newDate(t,a,l)}}),te.calendars.persian=v,te.calendars.jalali=v}}),Kne=Ne({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var te=Tp(),Z=qd(),v=te.instance();function w(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.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(t){var P=this._validate(t,this.minMonth,this.minDay,te.local.invalidYear),t=this._t2gYear(P.year());return v.leapYear(t)},weekOfYear:function(a,P,t){var r=this._validate(a,this.minMonth,this.minDay,te.local.invalidYear),a=this._t2gYear(r.year());return v.weekOfYear(a,r.month(),r.day())},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidDate),a=this._t2gYear(r.year());return v.toJD(a,r.month(),r.day())},fromJD:function(C){var P=v.fromJD(C),t=this._g2tYear(P.year());return this.newDate(t,P.month(),P.day())},_t2gYear:function(C){return C+this.yearsOffset+(C>=-this.yearsOffset&&C<=-1?1:0)},_g2tYear:function(C){return C-this.yearsOffset-(C>=1&&C<=this.yearsOffset?1:0)}}),te.calendars.taiwan=w}}),Jne=Ne({"node_modules/world-calendars/dist/calendars/thai.js"(){var te=Tp(),Z=qd(),v=te.instance();function w(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}w.prototype=new te.baseCalendar,Z(w.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(t){var P=this._validate(t,this.minMonth,this.minDay,te.local.invalidYear),t=this._t2gYear(P.year());return v.leapYear(t)},weekOfYear:function(a,P,t){var r=this._validate(a,this.minMonth,this.minDay,te.local.invalidYear),a=this._t2gYear(r.year());return v.weekOfYear(a,r.month(),r.day())},daysInMonth:function(C,P){var t=this._validate(C,P,this.minDay,te.local.invalidMonth);return this.daysPerMonth[t.month()-1]+(t.month()===2&&this.leapYear(t.year())?1:0)},weekDay:function(C,P,t){return(this.dayOfWeek(C,P,t)||7)<6},toJD:function(a,P,t){var r=this._validate(a,P,t,te.local.invalidDate),a=this._t2gYear(r.year());return v.toJD(a,r.month(),r.day())},fromJD:function(C){var P=v.fromJD(C),t=this._g2tYear(P.year());return this.newDate(t,P.month(),P.day())},_t2gYear:function(C){return C-this.yearsOffset-(C>=1&&C<=this.yearsOffset?1:0)},_g2tYear:function(C){return C+this.yearsOffset+(C>=-this.yearsOffset&&C<=-1?1:0)}}),te.calendars.thai=w}}),Qne=Ne({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var te=Tp(),Z=qd();function v(C){this.local=this.regionalOptions[C||""]||this.regionalOptions[""]}v.prototype=new te.baseCalendar,Z(v.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(C){var P=this._validate(C,this.minMonth,this.minDay,te.local.invalidYear);return this.daysInYear(P.year())===355},weekOfYear:function(C,P,t){var r=this.newDate(C,P,t);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(C){for(var P=0,t=1;t<=12;t++)P+=this.daysInMonth(C,t);return P},daysInMonth:function(C,P){for(var t=this._validate(C,P,this.minDay,te.local.invalidMonth),r=t.toJD()-24e5+.5,a=0,l=0;l<w.length;l++){if(w[l]>r)return w[a]-w[a-1];a++}return 30},weekDay:function(C,P,t){return this.dayOfWeek(C,P,t)!==5},toJD:function(C,P,t){var r=this._validate(C,P,t,te.local.invalidDate),a=12*(r.year()-1)+r.month()-15292,l=r.day()+w[a-1]-1;return l+24e5-.5},fromJD:function(C){for(var P=C-24e5+.5,t=0,r=0;r<w.length&&!(w[r]>P);r++)t++;var a=t+15292,l=Math.floor((a-1)/12),i=l+1,s=a-12*l,o=P-w[t-1]+1;return this.newDate(i,s,o)},isValid:function(C,P,t){var r=te.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(C=C.year!=null?C.year:C,r=C>=1276&&C<=1500),r},_validate:function(C,P,t,r){var a=te.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw r.replace(/\{0\}/,this.local.name);return a}}),te.calendars.ummalqura=v;var w=[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]}}),eae=Ne({"src/components/calendars/calendars.js"(te,Z){Z.exports=Tp(),Bne(),jne(),Une(),qne(),Vne(),Hne(),Gne(),Xne(),Wne(),Yne(),Zne(),$ne(),Kne(),Jne(),Qne()}}),tae=Ne({"src/components/calendars/index.js"(te,Z){var v=eae(),w=In(),C=ja(),P=C.EPOCHJD,t=C.ONEDAY,r={valType:"enumerated",values:w.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},a=function(b,A,g,f){var p={};return p[g]=r,w.coerce(b,A,p,g,f)},l=function(b,A,g,f){for(var p=0;p<g.length;p++)a(b,A,g[p]+"calendar",f.calendar)},i={chinese:"2000-01-01",coptic:"2000-01-01",discworld:"2000-01-01",ethiopian:"2000-01-01",hebrew:"5000-01-01",islamic:"1000-01-01",julian:"2000-01-01",mayan:"5000-01-01",nanakshahi:"1000-01-01",nepali:"2000-01-01",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-01",thai:"2000-01-01",ummalqura:"1400-01-01"},s={chinese:"2000-01-02",coptic:"2000-01-03",discworld:"2000-01-03",ethiopian:"2000-01-05",hebrew:"5000-01-01",islamic:"1000-01-02",julian:"2000-01-03",mayan:"5000-01-01",nanakshahi:"1000-01-05",nepali:"2000-01-05",persian:"1000-01-01",jalali:"1000-01-01",taiwan:"1000-01-04",thai:"2000-01-04",ummalqura:"1400-01-06"},o={chinese:["2000-01-01","2001-01-01"],coptic:["1700-01-01","1701-01-01"],discworld:["1800-01-01","1801-01-01"],ethiopian:["2000-01-01","2001-01-01"],hebrew:["5700-01-01","5701-01-01"],islamic:["1400-01-01","1401-01-01"],julian:["2000-01-01","2001-01-01"],mayan:["5200-01-01","5201-01-01"],nanakshahi:["0500-01-01","0501-01-01"],nepali:["2000-01-01","2001-01-01"],persian:["1400-01-01","1401-01-01"],jalali:["1400-01-01","1401-01-01"],taiwan:["0100-01-01","0101-01-01"],thai:["2500-01-01","2501-01-01"],ummalqura:["1400-01-01","1401-01-01"]},u="##",d={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:u,w:u,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}};function h(b,A,g){for(var f=Math.floor((A+.05)/t)+P,p=m(g).fromJD(f),x=0,N,D,B,U,V;(x=b.indexOf("%",x))!==-1;)N=b.charAt(x+1),N==="0"||N==="-"||N==="_"?(B=3,D=b.charAt(x+2),N==="_"&&(N="-")):(D=N,N="0",B=2),U=d[D],U?(U===u?V=u:V=p.formatDate(U[N]),b=b.substr(0,x)+V+b.substr(x+B),x+=V.length):x+=B;return b}var y={};function m(b){var A=y[b];return A||(A=y[b]=v.instance(b),A)}function E(b){return w.extendFlat({},r,{description:b})}function c(b){return"Sets the calendar system to use with `"+b+"` date data."}var _={xcalendar:E(c("x"))},T=w.extendFlat({},_,{ycalendar:E(c("y"))}),M=w.extendFlat({},T,{zcalendar:E(c("z"))}),k=E(["Sets the calendar system to use for `range` and `tick0`","if this is a date axis. This does not set the calendar for","interpreting data on this axis, that's specified in the trace","or via the global `layout.calendar`"].join(" "));Z.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:T,bar:T,box:T,heatmap:T,contour:T,histogram:T,histogram2d:T,histogram2dcontour:T,scatter3d:M,surface:M,mesh3d:M,scattergl:T,ohlc:_,candlestick:_},layout:{calendar:E(["Sets the default calendar system to use for interpreting and","displaying dates throughout the plot."].join(" "))},subplots:{xaxis:{calendar:k},yaxis:{calendar:k},scene:{xaxis:{calendar:k},yaxis:{calendar:k},zaxis:{calendar:k}},polar:{radialaxis:{calendar:k}}}},layoutAttributes:r,handleDefaults:a,handleTraceDefaults:l,CANONICAL_SUNDAY:s,CANONICAL_TICK:i,DFLTRANGE:o,getCal:m,worldCalFmt:h}}}),rae=Ne({"lib/calendars.js"(te,Z){Z.exports=tae()}}),nae=Ne({"lib/index.js"(te,Z){var v=RA();v.register([Ng(),NA(),NM(),v2(),UM(),Zx(),YA(),$A(),C2(),lC(),Jx(),UC(),ob(),Jy(),pK(),TK(),PK(),WK(),KK(),QK(),nJ(),lJ(),dJ(),yJ(),RJ(),OJ(),gee(),Iee(),Xee(),Jee(),lte(),hte(),xte(),Ite(),Nte(),Gte(),ore(),hre(),_re(),qre(),$re(),tne(),one(),cne(),pne(),Tne(),kne(),Fne(),rae()]),Z.exports=v}});return nae()})();/*!
 * pad-left <https://github.com/jonschlinkert/pad-left>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT license.
 *//*!
 * repeat-string <https://github.com/jonschlinkert/repeat-string>
 *
 * Copyright (c) 2014-2015, Jon Schlinkert.
 * Licensed under the MIT License.
 *//*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *//*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 *//*! Bundled license information:

native-promise-only/lib/npo.src.js:
  (*! Native Promise Only
      v0.8.1 (c) Kyle Simpson
      MIT License: http://getify.mit-license.org
  *)

polybooljs/index.js:
  (*
   * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc
   * @license MIT
   * @preserve Project Home: https://github.com/voidqk/polybooljs
   *)

ieee754/index.js:
  (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)

buffer/index.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <https://feross.org>
   * @license  MIT
   *)

safe-buffer/index.js:
  (*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)

assert/build/internal/util/comparisons.js:
  (*!
   * The buffer module from node.js, for the browser.
   *
   * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
   * @license  MIT
   *)

object-assign/index.js:
  (*
  object-assign
  (c) Sindre Sorhus
  @license MIT
  *)

maplibre-gl/dist/maplibre-gl.js:
  (**
   * MapLibre GL JS
   * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
   *)
*/return window.Plotly=S,S})})(Pk)),Pk.exports}var XX;function C3e(){return XX||(XX=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=L(S3e()),S=L(M3e());function L(Ce){return Ce&&Ce.__esModule?Ce:{default:Ce}}var re=(0,n.default)(S.default),ve=re;e.default=ve})(qO)),qO}var k3e=C3e();const P3e=rh(k3e);function sK(){const[e,n]=Ua.useState(()=>localStorage.getItem("theme")||"dark");return Ua.useEffect(()=>{const L=document.documentElement;e==="dark"?L.classList.add("dark"):L.classList.remove("dark"),localStorage.setItem("theme",e)},[e]),{theme:e,toggleTheme:()=>{n(L=>L==="dark"?"light":"dark")}}}function L3e({sessionId:e}){const{data:n}=L7(e),{theme:S}=sK(),L=Ua.useMemo(()=>n?n.variables.filter(ta=>ta.type==="real"):[],[n]),[re,ve]=Ua.useState(""),[Ce,Be]=Ua.useState(""),[Xe,Ke]=Ua.useState({}),[vt,yt]=Ua.useState({}),[Gt,$t]=Ua.useState(50),[gr,sr]=Ua.useState(50),[nr,jr]=Ua.useState(!1),[Ne,an]=Ua.useState(!1),[yn,Lr]=Ua.useState("Viridis");Ua.useEffect(()=>{L.length>=2&&!re&&(ve(L[0].name),Be(L[1].name))},[L,re]),Ua.useEffect(()=>{if(!n)return;const ta={};n.variables.forEach(qa=>{if(!(qa.name===re||qa.name===Ce))if(qa.type==="real"&&qa.bounds){const la=qa.bounds[0],ja=qa.bounds[1];ta[qa.name]={value:(la+ja)/2,min:la,max:ja,type:"Real"}}else if(qa.type==="integer"&&qa.bounds){const la=qa.bounds[0],ja=qa.bounds[1];ta[qa.name]={value:Math.floor((la+ja)/2),min:la,max:ja,type:"Integer"}}else qa.type==="categorical"&&qa.categories&&(ta[qa.name]={value:qa.categories[0],categories:qa.categories,type:"Categorical"})}),Ke(ta),yt(ta)},[re,Ce,n]);const $r=Ua.useMemo(()=>{if(!re||!Ce)return null;const ta={};return Object.entries(vt).forEach(([la,ja])=>{la!==re&&la!==Ce&&(ta[la]=ja.value)}),{x_var:re,y_var:Ce,fixed_values:ta,grid_resolution:gr,include_experiments:nr,include_suggestions:Ne}},[re,Ce,vt,gr,nr,Ne]),{data:dn,isLoading:Jn,error:xn}=m3e(e,$r,!!$r),Na=Ua.useCallback((ta,qa)=>{Ke(la=>({...la,[ta]:{...la[ta],value:qa}}))},[]),zn=Ua.useCallback((ta,qa)=>{yt(la=>({...la,[ta]:{...la[ta],value:qa}}))},[]);return L.length<2?Vt.jsx("div",{className:"flex items-center justify-center h-96",children:Vt.jsx("p",{className:"text-muted-foreground",children:"Need at least two Real (continuous) variables for contour plotting"})}):Vt.jsxs("div",{className:"flex flex-col h-full gap-2",children:[Vt.jsxs("div",{className:"flex-1 flex flex-col min-h-[550px]",children:[Jn&&Vt.jsx("div",{className:"flex-1 flex items-center justify-center",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx(zT,{className:"w-8 h-8 animate-spin text-primary mx-auto mb-2"}),Vt.jsx("p",{className:"text-sm text-muted-foreground",children:"Generating contour plot..."})]})}),xn&&Vt.jsx("div",{className:"flex-1 flex items-center justify-center",children:Vt.jsxs("div",{className:"text-center",children:[Vt.jsx("p",{className:"text-destructive font-medium",children:"Error loading contour plot"}),Vt.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:xn.message})]})}),!Jn&&!xn&&dn&&Vt.jsx("div",{className:"flex-1 min-h-0",children:Vt.jsx(R3e,{data:dn,xAxis:re,yAxis:Ce,showExperiments:nr,showNextPoint:Ne,colormap:yn,theme:S})})]}),Vt.jsx("div",{className:"bg-muted/30 rounded-lg p-3 flex-shrink-0",children:Vt.jsxs("div",{className:"grid grid-cols-5 gap-3",children:[Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Axes"}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs font-medium block mb-1",children:"X-Axis:"}),Vt.jsx("select",{value:re,onChange:ta=>ve(ta.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-background border border-input rounded-md",children:L.map(ta=>Vt.jsx("option",{value:ta.name,children:ta.name},ta.name))})]}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs font-medium block mb-1",children:"Y-Axis:"}),Vt.jsx("select",{value:Ce,onChange:ta=>Be(ta.target.value),className:"w-full px-2.5 py-1.5 text-xs bg-background border border-input rounded-md",children:L.map(ta=>Vt.jsx("option",{value:ta.name,children:ta.name},ta.name))})]})]}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Fixed Values"}),Vt.jsx("div",{className:"space-y-2 max-h-[120px] overflow-y-auto pr-2",children:Object.entries(Xe).map(([ta,qa])=>Vt.jsxs("div",{children:[Vt.jsxs("label",{className:"text-xs font-medium block mb-1",children:[ta,":"]}),qa.type==="Real"&&Vt.jsxs("div",{children:[Vt.jsx("input",{type:"range",min:qa.min,max:qa.max,step:(qa.max-qa.min)/100,value:qa.value,onChange:la=>Na(ta,parseFloat(la.target.value)),onMouseUp:la=>zn(ta,parseFloat(la.target.value)),onTouchEnd:la=>zn(ta,parseFloat(la.target.value)),className:"w-full"}),Vt.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:qa.value.toFixed(3)})]}),qa.type==="Integer"&&Vt.jsx("input",{type:"number",min:qa.min,max:qa.max,step:1,value:qa.value,onChange:la=>{const ja=parseInt(la.target.value);Na(ta,ja),zn(ta,ja)},className:"w-full px-2 py-1 text-xs bg-background border border-input rounded"}),qa.type==="Categorical"&&Vt.jsx("select",{value:qa.value,onChange:la=>{Na(ta,la.target.value),zn(ta,la.target.value)},className:"w-full px-2 py-1 text-xs bg-background border border-input rounded",children:qa.categories?.map(la=>Vt.jsx("option",{value:la,children:la},la))})]},ta))})]}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Display"}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[Vt.jsx("input",{type:"checkbox",checked:nr,onChange:ta=>jr(ta.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),Vt.jsx("span",{children:"Show Experimental Points"})]}),Vt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[Vt.jsx("input",{type:"checkbox",checked:Ne,onChange:ta=>an(ta.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),Vt.jsx("span",{children:"Show Next Point"})]})]})]}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Colormap"}),Vt.jsx("div",{children:Vt.jsxs("select",{value:yn,onChange:ta=>Lr(ta.target.value),className:"w-full px-2 py-1 text-xs bg-background border border-input rounded",children:[Vt.jsx("option",{value:"Viridis",children:"Viridis"}),Vt.jsx("option",{value:"Plasma",children:"Plasma"}),Vt.jsx("option",{value:"Inferno",children:"Inferno"}),Vt.jsx("option",{value:"Magma",children:"Magma"}),Vt.jsx("option",{value:"Cividis",children:"Cividis"}),Vt.jsx("option",{value:"Jet",children:"Jet"}),Vt.jsx("option",{value:"Hot",children:"Hot"}),Vt.jsx("option",{value:"Cool",children:"Cool"}),Vt.jsx("option",{value:"RdBu",children:"Red-Blue"}),Vt.jsx("option",{value:"YlOrRd",children:"Yellow-Orange-Red"})]})})]}),Vt.jsxs("div",{className:"space-y-2",children:[Vt.jsx("h3",{className:"font-semibold text-xs uppercase tracking-wide text-muted-foreground border-b pb-1.5",children:"Resolution"}),Vt.jsxs("div",{children:[Vt.jsx("label",{className:"text-xs font-medium block mb-1",children:"Grid Resolution:"}),Vt.jsx("input",{type:"range",min:30,max:150,step:10,value:Gt,onChange:ta=>$t(parseInt(ta.target.value)),onMouseUp:ta=>sr(parseInt(ta.target.value)),onTouchEnd:ta=>sr(parseInt(ta.target.value)),className:"w-full"}),Vt.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[Gt," × ",Gt]})]})]})]})})]})}function R3e({data:e,xAxis:n,yAxis:S,showExperiments:L,showNextPoint:re,colormap:ve,theme:Ce}){const Be=e.x_grid[0],Xe=e.y_grid.map($t=>$t[0]),Ke=[],vt={type:"contour",x:Be,y:Xe,z:e.predictions,colorscale:ve,colorbar:{title:{text:"Prediction",side:"right"},thickness:20,len:.7},contours:{coloring:"heatmap"},hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br>Prediction: %{z:.3f}<br><extra></extra>`};if(Ke.push(vt),L&&e.experiments&&e.experiments.x.length>0){const $t={type:"scatter",mode:"markers",x:e.experiments.x,y:e.experiments.y,marker:{color:"white",size:8,line:{color:"black",width:2},symbol:"circle"},name:"Experiments",hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br>Output: %{text}<br><extra></extra>`,text:e.experiments.output.map(gr=>gr.toFixed(3))};Ke.push($t)}if(re&&e.suggestions&&e.suggestions.x.length>0){const $t={type:"scatter",mode:"markers",x:e.suggestions.x,y:e.suggestions.y,marker:{color:"red",size:12,line:{color:"darkred",width:2},symbol:"diamond"},name:"Next Point",hovertemplate:`${n}: %{x:.3f}<br>${S}: %{y:.3f}<br><extra></extra>`};Ke.push($t)}const yt=Ua.useMemo(()=>({title:{text:"Contour Plot of Model Predictions",font:{size:16,family:"Arial, sans-serif"}},xaxis:{title:{text:n,font:{size:14}},range:e.x_bounds,showgrid:!0,zeroline:!1},yaxis:{title:{text:S,font:{size:14}},range:e.y_bounds,showgrid:!0,zeroline:!1},autosize:!0,margin:{l:70,r:110,t:60,b:50},hovermode:"closest",showlegend:!!(L&&e.experiments||re&&e.suggestions),legend:{x:1.05,y:1,xanchor:"left",yanchor:"top",bgcolor:Ce==="dark"?"rgba(40, 46, 56, 0.9)":"rgba(255, 255, 255, 0.9)",bordercolor:Ce==="dark"?"hsl(220 13% 24%)":"#ccc",borderwidth:1,font:{color:Ce==="dark"?"hsl(210 40% 98%)":"hsl(222.2 84% 4.9%)"}},plot_bgcolor:Ce==="dark"?"hsl(220 13% 13%)":"#fafafa",paper_bgcolor:Ce==="dark"?"hsl(220 13% 16%)":"white",font:{color:Ce==="dark"?"hsl(210 40% 98%)":"hsl(222.2 84% 4.9%)"}}),[e.x_bounds,e.y_bounds,n,S,L,re,e.experiments,e.suggestions,Ce]),Gt={responsive:!0,displayModeBar:!0,displaylogo:!1,modeBarButtonsToRemove:["lasso2d","select2d"],toImageButtonOptions:{format:"png",filename:`contour_${n}_${S}`,height:600,width:800,scale:2}};return Vt.jsx("div",{className:"w-full h-full",children:Vt.jsx(P3e,{data:Ke,layout:yt,config:Gt,style:{width:"100%",height:"100%"},useResizeHandler:!0})})}function I3e({sessionId:e,embedded:n=!1}){const[S,L]=Ua.useState("parity"),[re,ve]=Ua.useState("RMSE"),[Ce,Be]=Ua.useState("1.96"),[Xe,Ke]=Ua.useState(!1),vt=Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("div",{className:"p-3 border-b border-border bg-muted/30",children:Vt.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[Vt.jsx("button",{onClick:()=>L("parity"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="parity"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Parity"}),Vt.jsx("button",{onClick:()=>L("metrics"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="metrics"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Metrics"}),Vt.jsx("button",{onClick:()=>L("qq"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="qq"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Q-Q"}),Vt.jsx("button",{onClick:()=>L("calibration"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="calibration"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Calibration"}),Vt.jsx("button",{onClick:()=>L("contour"),className:`px-3 py-1.5 rounded-md text-xs font-medium transition-colors ${S==="contour"?"bg-primary text-primary-foreground":"bg-muted hover:bg-muted/80"}`,children:"Plot Contour"}),S==="metrics"&&Vt.jsxs("select",{value:re,onChange:yt=>ve(yt.target.value),className:"px-2.5 py-1.5 bg-background border border-input rounded-md text-xs",children:[Vt.jsx("option",{value:"RMSE",children:"RMSE"}),Vt.jsx("option",{value:"MAE",children:"MAE"}),Vt.jsx("option",{value:"MAPE",children:"MAPE"}),Vt.jsx("option",{value:"R2",children:"R²"})]}),S==="parity"&&Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("span",{className:"flex items-center text-xs text-muted-foreground ml-2",children:"Error bars:"}),Vt.jsxs("select",{value:Ce,onChange:yt=>Be(yt.target.value),className:"px-2.5 py-1.5 bg-background border border-input rounded-md text-xs",children:[Vt.jsx("option",{value:"None",children:"None"}),Vt.jsx("option",{value:"1.0",children:"1.0σ (68%)"}),Vt.jsx("option",{value:"1.96",children:"1.96σ (95%)"}),Vt.jsx("option",{value:"2.0",children:"2.0σ (95.4%)"}),Vt.jsx("option",{value:"2.58",children:"2.58σ (99%)"}),Vt.jsx("option",{value:"3.0",children:"3.0σ (99.7%)"})]})]})]})}),(S==="parity"||S==="qq"||S==="calibration")&&Vt.jsx("div",{className:"px-3 py-1.5 border-b border-border bg-muted/20",children:Vt.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[Vt.jsx("input",{type:"checkbox",checked:Xe,onChange:yt=>Ke(yt.target.checked),className:"w-3.5 h-3.5 rounded border-gray-300"}),Vt.jsx("span",{children:"Use Calibrated Results"})]})}),Vt.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[S==="parity"&&Vt.jsx(b3e,{sessionId:e,useCalibrated:Xe,sigmaMultiplier:Ce}),S==="metrics"&&Vt.jsx(w3e,{sessionId:e,selectedMetric:re,cvSplits:5}),S==="qq"&&Vt.jsx(T3e,{sessionId:e,useCalibrated:Xe}),S==="calibration"&&Vt.jsx(A3e,{sessionId:e,useCalibrated:Xe}),Vt.jsx("div",{className:S==="contour"?"block h-full":"hidden",children:Vt.jsx(L3e,{sessionId:e})})]}),S==="contour"&&Vt.jsx("div",{className:"border-t border-border bg-muted/30 p-3",children:Vt.jsx("div",{className:"text-xs text-muted-foreground text-center",children:"Use the panel on the right to customize contour plot options"})})]});return n?Vt.jsx("div",{className:"h-full flex flex-col bg-card",children:vt}):null}function D3e({tabs:e,defaultTab:n,className:S=""}){const[L,re]=Ua.useState(n||e[0]?.id);return Vt.jsxs("div",{className:`flex flex-col h-full ${S}`,children:[Vt.jsx("div",{className:"flex border-b bg-muted/30",children:e.map(ve=>Vt.jsxs("button",{onClick:()=>re(ve.id),className:`
              px-6 py-3 text-sm font-medium transition-all relative
              ${L===ve.id?"text-foreground bg-card":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}
            `,children:[ve.label,L===ve.id&&Vt.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary"})]},ve.id))}),Vt.jsx("div",{className:"flex-1 overflow-auto bg-card",children:e.map(ve=>Vt.jsx("div",{className:L===ve.id?"h-full":"hidden",children:ve.content},ve.id))})]})}function O3e({sessionId:e,metadata:n,onSave:S,onCancel:L}){const[re,ve]=Ua.useState(n.name||""),[Ce,Be]=Ua.useState(n.description||""),[Xe,Ke]=Ua.useState(n.tags?.join(", ")||""),[vt,yt]=Ua.useState(n.author||""),[Gt,$t]=Ua.useState(!1);async function gr(){$t(!0);try{const sr=Xe.split(",").map(nr=>nr.trim()).filter(nr=>nr);await S({name:re.trim()||void 0,description:Ce.trim()||void 0,tags:sr.length>0?sr:void 0,author:vt.trim()||void 0})}finally{$t(!1)}}return Vt.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:L,children:Vt.jsxs("div",{className:"bg-card border border-border rounded-lg shadow-lg w-full max-w-xl",onClick:sr=>sr.stopPropagation(),children:[Vt.jsxs("div",{className:"border-b border-border p-4 flex items-center justify-between",children:[Vt.jsx("h3",{className:"text-lg font-semibold",children:"Session Metadata"}),Vt.jsx("button",{onClick:L,className:"p-1.5 rounded hover:bg-accent",children:Vt.jsx(D7,{className:"w-4 h-4"})})]}),Vt.jsxs("div",{className:"p-6 space-y-4",children:[Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium",children:"Session Name"}),Vt.jsx("input",{type:"text",value:re,onChange:sr=>ve(sr.target.value),placeholder:"My Optimization Session",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium",children:"Description"}),Vt.jsx("textarea",{value:Ce,onChange:sr=>Be(sr.target.value),placeholder:"Enter a brief description of this optimization session...",rows:4,className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50 resize-y"})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium",children:"Tags (comma-separated)"}),Vt.jsx("input",{type:"text",value:Xe,onChange:sr=>Ke(sr.target.value),placeholder:"catalyst, optimization, batch-1",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium",children:"Author"}),Vt.jsx("input",{type:"text",value:vt,onChange:sr=>yt(sr.target.value),placeholder:"Your name",className:"w-full px-3 py-2 text-sm rounded-md border border-border bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary/50"})]}),Vt.jsxs("div",{className:"space-y-1",children:[Vt.jsx("label",{className:"block text-sm font-medium text-muted-foreground",children:"Session ID"}),Vt.jsxs("div",{className:"px-3 py-2 text-sm rounded-md border border-border bg-muted text-foreground font-mono",children:[e.substring(0,16),"..."]})]})]}),Vt.jsxs("div",{className:"border-t border-border p-4 flex justify-end gap-3",children:[Vt.jsx("button",{onClick:L,disabled:Gt,className:"px-4 py-2 text-sm rounded-md border border-border hover:bg-accent disabled:opacity-50",children:"Cancel"}),Vt.jsx("button",{onClick:gr,disabled:Gt,className:"px-4 py-2 text-sm rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50",children:Gt?"Saving...":"Save"})]})]})})}function z3e(){const[e,n]=Ua.useState(null),[S,L]=Ua.useState(!1),[re,ve]=Ua.useState(!1),[Ce,Be]=Ua.useState(!1),[Xe,Ke]=Ua.useState(!1),vt=Ua.useRef(null),yt=Wse(),Gt=Kse(),$t=Jse(),gr=Yse(e),{data:sr,error:nr}=Gse(e),{theme:jr,toggleTheme:Ne}=sK(),{isVisualizationOpen:an,closeVisualization:yn,sessionId:Lr}=sW(),{lockStatus:$r}=Qse(e,5e3,vi=>{L(vi)}),[dn,Jn]=Ua.useState([]),[xn,Na]=Ua.useState(!1);Ua.useEffect(()=>{if(!e)return;async function vi(){try{const Pi=await fetch(`/api/v1/sessions/${e}/audit?entry_type=acquisition_locked`);if(!Pi.ok)return;const Eo=await Pi.json();if(Eo.entries&&Eo.entries.length>0){const ma=Eo.entries[Eo.entries.length-1],_a=ma.parameters?.suggestions||[];if(_a.length>0){const Li=ma.parameters?.strategy||"Acquisition",so=_a.map(Ro=>({...Ro,_reason:Li,Iteration:ma.parameters?.iteration}));Jn(so),console.log(`✓ Restored ${_a.length} pending suggestions from audit log`)}}}catch(Pi){console.error("Failed to restore pending suggestions:",Pi)}}vi()},[e]),Ua.useEffect(()=>{const vi=new URLSearchParams(window.location.search);console.log("URL search params:",window.location.search);const Pi=vi.get("session");if(console.log("Session ID from URL:",Pi),Pi)n(Pi),Ke(!0),console.log(`✓ Loaded session from URL: ${Pi}`);else{const ma=Zse();ma&&(n(ma),console.log(`✓ Loaded session from localStorage: ${ma}`))}const Eo=vi.get("mode");console.log("Monitoring mode from URL:",Eo),Eo==="monitor"&&(L(!0),console.log("✓ Monitoring mode enabled"))},[]),Ua.useEffect(()=>{nr&&e&&!Xe?(Nu.error("Session expired or not found. Please create a new session."),ta()):nr&&Xe&&console.warn("Session from URL not found or error loading:",nr)},[nr,e,Xe]),Ua.useEffect(()=>{if(!e)return;const vi=Pi=>{if(sr&&(sr.variable_count>0||sr.experiment_count>0))return Pi.preventDefault(),Pi.returnValue="You have unsaved changes. Are you sure you want to leave?",Pi.returnValue};return window.addEventListener("beforeunload",vi),()=>window.removeEventListener("beforeunload",vi)},[e,sr]),Ua.useEffect(()=>{if(!e)return;const vi=Pi=>{if(sr&&(sr.variable_count>0||sr.experiment_count>0))return Pi.preventDefault(),Pi.returnValue="You have unsaved changes. Are you sure you want to leave?",Pi.returnValue};return window.addEventListener("beforeunload",vi),()=>window.removeEventListener("beforeunload",vi)},[e,sr]);const zn=async()=>{try{const vi=await yt.mutateAsync({ttl_hours:24});n(vi.session_id),Na(!1),Nu.success("Session created successfully!"),ve(!0)}catch(vi){Nu.error(vi.response?.data?.detail||"Failed to create session"),console.error("Error creating session:",vi)}},ta=()=>{$se(),n(null),Na(!1),Nu.info("Session cleared")},qa=async()=>{if(e)try{xn?await Gt.mutateAsync({sessionId:e,serverSide:!0}):await Gt.mutateAsync({sessionId:e,serverSide:!1}),Nu.success("Session exported successfully!")}catch(vi){Nu.error("Failed to export session"),console.error("Error exporting session:",vi)}},la=()=>{vt.current?.click()},ja=async vi=>{const Pi=vi.target.files?.[0];if(Pi)try{const Eo=await $t.mutateAsync(Pi);n(Eo.session_id),Na(!0),Nu.success("Session imported successfully!"),vt.current&&(vt.current.value="")}catch(Eo){Nu.error(Eo.response?.data?.detail||"Failed to import session"),console.error("Error importing session:",Eo)}},pa=async()=>{if(e)try{const vi=await fetch(`/api/v1/sessions/${e}/audit/export`);if(!vi.ok)throw new Error("Failed to export audit log");const Pi=await vi.blob(),Eo=window.URL.createObjectURL(Pi),ma=document.createElement("a");ma.href=Eo,ma.download=`audit_log_${e.substring(0,8)}.md`,document.body.appendChild(ma),ma.click(),window.URL.revokeObjectURL(Eo),document.body.removeChild(ma),Nu.success("Audit log exported successfully!")}catch(vi){Nu.error("Failed to export audit log"),console.error("Error exporting audit log:",vi)}},Ra=async()=>{if(e)try{await navigator.clipboard.writeText(e),Be(!0),Nu.success("Session ID copied to clipboard!"),setTimeout(()=>Be(!1),2e3)}catch(vi){Nu.error("Failed to copy session ID"),console.error("Error copying session ID:",vi)}};return console.log("=== Render State ==="),console.log("sessionId:",e),console.log("isMonitoringMode:",S),console.log("Should show monitoring:",S&&e),Vt.jsxs("div",{className:"h-screen bg-background flex flex-col overflow-hidden",children:[S&&e?Vt.jsx(Hle,{sessionId:e,pollingInterval:9e4}):Vt.jsxs(Vt.Fragment,{children:[Vt.jsx("header",{className:"border-b bg-card px-6 py-1 flex-shrink-0",children:Vt.jsxs("div",{className:"flex items-center justify-between",children:[Vt.jsxs("div",{className:"flex items-center gap-4",children:[Vt.jsxs("div",{className:"flex flex-col gap-0.5",children:[Vt.jsx("img",{src:jr==="dark"?"/NEW_LOGO_DARK.png":"/NEW_LOGO_LIGHT.png",alt:"ALchemist",className:"h-auto",style:{width:"250px"}}),Vt.jsx("p",{className:"text-xs text-muted-foreground",children:"Active Learning Toolkit for Chemical and Materials Research"})]}),Vt.jsx("button",{onClick:Ne,className:"p-2 rounded-md hover:bg-accent transition-colors",title:`Switch to ${jr==="dark"?"light":"dark"} mode`,children:jr==="dark"?Vt.jsx(Ile,{className:"h-5 w-5 text-muted-foreground hover:text-foreground"}):Vt.jsx(Lle,{className:"h-5 w-5 text-muted-foreground hover:text-foreground"})})]}),e?Vt.jsxs("div",{className:"flex items-center gap-3",children:[Vt.jsxs("div",{className:"flex items-center gap-2",children:[Vt.jsxs("div",{className:"text-sm text-muted-foreground",children:[Vt.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:e.substring(0,8)}),sr&&Vt.jsxs("span",{className:"ml-2",children:[sr.variable_count,"V · ",sr.experiment_count,"E"]}),$r?.locked&&Vt.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs bg-blue-500/10 text-blue-500 border border-blue-500/20",children:[Vt.jsx("svg",{className:"h-3 w-3",fill:"currentColor",viewBox:"0 0 20 20",children:Vt.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})}),$r.locked_by]})]}),Vt.jsx("button",{onClick:Ra,className:"p-1.5 rounded hover:bg-accent transition-colors",title:"Copy full session ID to clipboard",children:Ce?Vt.jsx(Ale,{className:"h-3.5 w-3.5 text-green-500"}):Vt.jsx(Mle,{className:"h-3.5 w-3.5 text-muted-foreground hover:text-foreground"})})]}),Vt.jsx("button",{onClick:()=>ve(!0),className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded hover:bg-accent",title:"Edit session metadata",children:"Edit Info"}),Vt.jsx("button",{onClick:pa,className:"text-xs text-muted-foreground hover:text-foreground px-2 py-1 rounded hover:bg-accent",title:"Export audit log as markdown",children:"Export Log"}),Vt.jsx("button",{onClick:qa,disabled:Gt.isPending,className:"text-xs bg-primary text-primary-foreground px-3 py-1.5 rounded hover:bg-primary/90 transition-colors disabled:opacity-50",children:"Save"}),Vt.jsx("button",{onClick:ta,className:"text-xs text-destructive hover:text-destructive/80 px-3 py-1.5 border border-destructive/30 rounded hover:bg-destructive/10 transition-colors",children:"Clear"})]}):Vt.jsxs("div",{className:"flex gap-2",children:[Vt.jsx("button",{onClick:zn,disabled:yt.isPending,className:"text-sm bg-primary text-primary-foreground px-4 py-2 rounded hover:bg-primary/90 disabled:opacity-50",children:yt.isPending?"Creating...":"New Session"}),Vt.jsx("button",{onClick:la,disabled:$t.isPending,className:"text-sm bg-secondary text-secondary-foreground px-4 py-2 rounded hover:bg-secondary/90 disabled:opacity-50",children:$t.isPending?"Loading...":"Load Session"}),Vt.jsx("input",{ref:vt,type:"file",accept:".json",onChange:ja,className:"hidden"})]})]})}),e?Vt.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[Vt.jsxs("div",{className:"w-[580px] flex-shrink-0 overflow-y-auto border-r bg-card p-4 space-y-4",children:[Vt.jsx(hle,{sessionId:e}),Vt.jsx(Nle,{sessionId:e,pendingSuggestions:dn,onStageSuggestions:vi=>Jn(vi)}),Vt.jsx(Fle,{sessionId:e})]}),Vt.jsx("div",{className:"flex-1 flex flex-col bg-background",children:an&&Lr?Vt.jsxs(Vt.Fragment,{children:[Vt.jsxs("div",{className:"border-b bg-card px-4 py-3 flex items-center justify-between",children:[Vt.jsx("h3",{className:"font-semibold",children:"Model Visualizations"}),Vt.jsx("button",{onClick:yn,className:"p-1 rounded hover:bg-accent transition-colors",title:"Close visualizations",children:Vt.jsx(D7,{className:"h-4 w-4"})})]}),Vt.jsx("div",{className:"flex-1 overflow-auto",children:Vt.jsx(I3e,{sessionId:Lr,embedded:!0})})]}):Vt.jsx("div",{className:"flex-1 flex items-center justify-center p-6",children:Vt.jsxs("div",{className:"text-center text-muted-foreground",children:[Vt.jsx("div",{className:"text-6xl mb-4",children:"📊"}),Vt.jsx("p",{className:"text-lg font-medium mb-2",children:"Visualization Panel"}),Vt.jsx("p",{className:"text-sm",children:"Train a model to see visualizations here"}),Vt.jsx("p",{className:"text-xs mt-2 text-muted-foreground/60",children:"Plots will be embedded in this panel"})]})})}),Vt.jsx("div",{className:"w-[320px] flex-shrink-0 border-l bg-card",children:Vt.jsx(D3e,{tabs:[{id:"model",label:"Model",content:Vt.jsx(jle,{sessionId:e})},{id:"acquisition",label:"Acquisition",content:Vt.jsx(Vle,{sessionId:e,modelBackend:sr?.model_trained?sr.model_backend:null,pendingSuggestions:dn,onStageSuggestions:vi=>Jn(vi)})}],defaultTab:"model"})})]}):Vt.jsx("div",{className:"flex-1 flex items-center justify-center bg-background",children:Vt.jsxs("div",{className:"text-center max-w-md",children:[Vt.jsx("div",{className:"text-6xl mb-4",children:"🧪"}),Vt.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Welcome to ALchemist"}),Vt.jsx("p",{className:"text-muted-foreground mb-6",children:"Create a new session or load a previously saved session to begin your optimization workflow."})]})})]}),Vt.jsx(YX,{position:"top-right",richColors:!0}),re&&e&&sr&&Vt.jsx(O3e,{sessionId:e,metadata:sr.metadata||{},onSave:async vi=>{try{await gr.mutateAsync(vi),Nu.success("Session metadata updated"),ve(!1)}catch(Pi){Nu.error("Failed to update metadata: "+(Pi?.message||String(Pi)))}},onCancel:()=>ve(!1)})]})}function N3e(){return Vt.jsx(ooe,{children:Vt.jsx(soe,{children:Vt.jsx(z3e,{})})})}Yae.createRoot(document.getElementById("root")).render(Vt.jsx(Ua.StrictMode,{children:Vt.jsx(N3e,{})}));
